You are here

public function ReactionRuleConfig::getComponent in Rules 8.3

Gets the Rules component that is invoked when the events are dispatched. The returned component has the definitions of the available event context set.

Overrides RulesUiComponentProviderInterface::getComponent

File

src/Entity/ReactionRuleConfig.php, line 159

Class

ReactionRuleConfig
Reaction rule configuration entity to persistently store configuration.

Namespace

Drupal\rules\Entity

Code

public function getComponent() {
  $component = RulesComponent::create($this
    ->getExpression());
  $component
    ->addContextDefinitionsForEvents($this
    ->getEventNames());
  return $component;
}