public function RulesConditionalElement::getAllSibling in Conditional Rules 8
Same name and namespace in other branches
- 7 includes/rules_conditional.core.inc \RulesConditionalElement::getAllSibling()
Gets sibling elements.
Return value
array of RulesPlugin objects.
1 call to RulesConditionalElement::getAllSibling()
- RulesConditionalDefaultCase::canEvaluate in includes/
rules_conditional.plugin.inc - Determines whether this branch can be evaluated.
File
- includes/
rules_conditional.core.inc, line 285 - Conditional Rules framework implementation.
Class
- RulesConditionalElement
- Base conditional element plugin implementation.
Code
public function getAllSibling() {
if (isset($this->parent)) {
$siblings = NULL;
foreach ($this->parent
->getIterator() as $element) {
if (!($element === $this)) {
$siblings[] = $element;
}
}
return $siblings;
}
// Otherwise, return nothing if no sibling.
return NULL;
}