public function TestActionSetExpression::executeWithState in Rules 8.3
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.
Overrides ActionSetExpression::executeWithState
File
- tests/
src/ Unit/ ActionSetExpressionTest.php, line 150
Class
- TestActionSetExpression
- A wrapper around ActionSetExpression.
Namespace
Drupal\Tests\rules\UnitCode
public function executeWithState(ExecutionStateInterface $state) {
$uuids = [];
// Use the iterator to ensure the actions are sorted.
foreach ($this as $action) {
$action
->executeWithState($state);
$uuids[] = $action
->getUuid();
}
// Return array of UUID in same order as the actions were executed.
return $uuids;
}