function ConditionExpressionContainer::getExpression
Overrides ExpressionContainerInterface::getExpression
1 call to ConditionExpressionContainer::getExpression()
- ConditionExpressionContainer::addExpressionObject in src/
Engine/ ConditionExpressionContainer.php - Adds an expression object.
File
-
src/
Engine/ ConditionExpressionContainer.php, line 140
Class
- ConditionExpressionContainer
- Container for conditions.
Namespace
Drupal\rules\EngineCode
public function getExpression($uuid) {
foreach ($this->conditions as $condition) {
if ($condition->getUuid() === $uuid) {
return $condition;
}
if ($condition instanceof ExpressionContainerInterface) {
$nested_condition = $condition->getExpression($uuid);
if ($nested_condition) {
return $nested_condition;
}
}
}
return FALSE;
}