function ConditionExpressionContainer::deleteExpression

Overrides ExpressionContainerInterface::deleteExpression

File

src/Engine/ConditionExpressionContainer.php, line 158

Class

ConditionExpressionContainer
Container for conditions.

Namespace

Drupal\rules\Engine

Code

public function deleteExpression($uuid) {
    foreach ($this->conditions as $index => $condition) {
        if ($condition->getUuid() === $uuid) {
            unset($this->conditions[$index]);
            return TRUE;
        }
        if ($condition instanceof ExpressionContainerInterface && $condition->deleteExpression($uuid)) {
            return TRUE;
        }
    }
    return FALSE;
}