You are here

public function ActionSet::execute in Business Rules 2.x

Same name and namespace in other branches
  1. 8 src/Plugin/BusinessRulesAction/ActionSet.php \Drupal\business_rules\Plugin\BusinessRulesAction\ActionSet::execute()

Execute the action.

Parameters

\Drupal\business_rules\ActionInterface $action: The configured action.

\Drupal\business_rules\Events\BusinessRulesEvent $event: The event that has triggered the action.

Return value

array The render array to be showed on debug block.

Overrides BusinessRulesActionPlugin::execute

File

src/Plugin/BusinessRulesAction/ActionSet.php, line 353

Class

ActionSet
Class ActionSet.

Namespace

Drupal\business_rules\Plugin\BusinessRulesAction

Code

public function execute(ActionInterface $action, BusinessRulesEvent $event) {
  $actions = $action
    ->getSettings('items');
  $actions = BusinessRulesItemObject::itemsArrayToItemsObject($actions);

  // Process items.
  $this->processor
    ->processItems($actions, $event, $action
    ->id());
}