function ExpressionInterface::executeWithState

Execute the expression with a given Rules state.

Note that this does not auto-save any changes.

Parameters

\Drupal\rules\Context\ExecutionStateInterface $state: The state with all the execution variables in it.

Return value

null|bool The expression may return a boolean value after execution, this is used by conditions that return their evaluation result.

Throws

\Drupal\rules\Exception\EvaluationException Thrown if the Rules expression triggers errors during execution.

1 call to ExpressionInterface::executeWithState()
ExpressionBase::execute in src/Engine/ExpressionBase.php
Executes a rules expression.
6 methods override ExpressionInterface::executeWithState()
ActionExpression::executeWithState in src/Plugin/RulesExpression/ActionExpression.php
Execute the expression with a given Rules state.
ActionSetExpression::executeWithState in src/Plugin/RulesExpression/ActionSetExpression.php
Execute the expression with a given Rules state.
ConditionExpression::executeWithState in src/Plugin/RulesExpression/ConditionExpression.php
Execute the expression with a given Rules state.
ConditionExpressionContainer::executeWithState in src/Engine/ConditionExpressionContainer.php
Execute the expression with a given Rules state.
LoopExpression::executeWithState in src/Plugin/RulesExpression/LoopExpression.php
Execute the expression with a given Rules state.

... See full list

File

src/Engine/ExpressionInterface.php, line 34

Class

ExpressionInterface
Defines the interface for Rules expressions.

Namespace

Drupal\rules\Engine

Code

public function executeWithState(ExecutionStateInterface $state);