function ReactionRuleConfig::hasEvent
Returns if the rule is reacting on the given event.
Parameters
string $event_name: The machine name of the event to look for.
Return value
bool TRUE if the rule is reacting on the given event, FALSE otherwise.
Overrides RulesTriggerableInterface::hasEvent
1 call to ReactionRuleConfig::hasEvent()
- ReactionRuleConfig::addEvent in src/
Entity/ ReactionRuleConfig.php - Adds an event to the rule configuration.
File
-
src/
Entity/ ReactionRuleConfig.php, line 276
Class
- ReactionRuleConfig
- Reaction rule configuration entity to persistently store configuration.
Namespace
Drupal\rules\EntityCode
public function hasEvent(string $event_name) {
return in_array($event_name, $this->getEventNames());
}