function ExpressionContainerInterface::addExpressionObject

Adds an expression object.

Parameters

\Drupal\rules\Engine\ExpressionInterface $expression: The expression object.

Return value

$this

Throws

\Drupal\rules\Exception\InvalidExpressionException Thrown if the wrong expression is passed; e.g. if a condition expression is added to an action expression container.

1 call to ExpressionContainerInterface::addExpressionObject()
ExpressionContainerBase::addExpression in src/Engine/ExpressionContainerBase.php
Creates and adds an expression.
3 methods override ExpressionContainerInterface::addExpressionObject()
ActionExpressionContainer::addExpressionObject in src/Engine/ActionExpressionContainer.php
Adds an expression object.
ConditionExpressionContainer::addExpressionObject in src/Engine/ConditionExpressionContainer.php
Adds an expression object.
RuleExpression::addExpressionObject in src/Plugin/RulesExpression/RuleExpression.php
Adds an expression object.

File

src/Engine/ExpressionContainerInterface.php, line 44

Class

ExpressionContainerInterface
Defines a common interface for expressions containing other expressions.

Namespace

Drupal\rules\Engine

Code

public function addExpressionObject(ExpressionInterface $expression);