function ActionExpressionContainer::deleteExpression

Overrides ExpressionContainerInterface::deleteExpression

File

src/Engine/ActionExpressionContainer.php, line 129

Class

ActionExpressionContainer
Container for actions.

Namespace

Drupal\rules\Engine

Code

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