You are here

public function BusinessRulesProcessor::processTriggeredRules in Business Rules 2.x

Same name and namespace in other branches
  1. 8 src/Util/BusinessRulesProcessor.php \Drupal\business_rules\Util\BusinessRulesProcessor::processTriggeredRules()

Process the triggered rules.

Parameters

array $triggered_rules: Array of triggered rules.

\Drupal\business_rules\Events\BusinessRulesEvent $event: The event.

1 call to BusinessRulesProcessor::processTriggeredRules()
BusinessRulesProcessor::process in src/Util/BusinessRulesProcessor.php
Process rules.

File

src/Util/BusinessRulesProcessor.php, line 284

Class

BusinessRulesProcessor
Class BusinessRulesProcessor.

Namespace

Drupal\business_rules\Util

Code

public function processTriggeredRules(array $triggered_rules, BusinessRulesEvent $event) {

  /** @var \Drupal\business_rules\Entity\BusinessRule $rule */
  foreach ($triggered_rules as $rule) {
    $items = $rule
      ->getItems();
    $this->ruleBeingExecuted = $rule;
    $this
      ->processItems($items, $event, $rule
      ->id());
    $this->processedRules[$rule
      ->id()] = $rule
      ->id();
    $this->debugArray['triggered_rules'][] = $rule;
  }
}