You are here

public function BusinessRule::getReactsOnLabel in Business Rules 8

Same name and namespace in other branches
  1. 2.x src/Entity/BusinessRule.php \Drupal\business_rules\Entity\BusinessRule::getReactsOnLabel()

The label of the trigger that will start the rule.

The reacts on event label for the rule.

Overrides BusinessRuleInterface::getReactsOnLabel

File

src/Entity/BusinessRule.php, line 385

Class

BusinessRule
Defines the Rule entity.

Namespace

Drupal\business_rules\Entity

Code

public function getReactsOnLabel() {
  $reacts = self::getEventTypes();
  foreach ($reacts as $react) {
    foreach ($react as $key => $value) {
      if ($key == $this
        ->getReactsOn()) {
        return $value;
      }
    }
  }
  return '';
}