You are here

public function ExpressionBase::execute in Rules 8.3

Executes a rules expression.

Overrides ExecutableInterface::execute

File

src/Engine/ExpressionBase.php, line 66

Class

ExpressionBase
Base class for rules expressions.

Namespace

Drupal\rules\Engine

Code

public function execute() {

  // If there is no state given, we have to assume no required context.
  $state = ExecutionState::create();
  $result = $this
    ->executeWithState($state);

  // Save specifically registered variables in the end after execution.
  $state
    ->autoSave();
  return $result;
}