function ReactionRuleConfig::getComponent

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 162

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;
}