You are here

public function RuleComponent::getRule in RNG - Events and Registrations 8

Same name and namespace in other branches
  1. 8.2 src/Entity/RuleComponent.php \Drupal\rng\Entity\RuleComponent::getRule()
  2. 3.x src/Entity/RuleComponent.php \Drupal\rng\Entity\RuleComponent::getRule()

Gets the rule entity.

Return value

\Drupal\rng\Entity\Rule|NULL The rule entity. Or NULL if it does not exist.

Overrides RuleComponentInterface::getRule

File

src/Entity/RuleComponent.php, line 41

Class

RuleComponent
Defines a event rule plugin instance entity: a condition or action.

Namespace

Drupal\rng\Entity

Code

public function getRule() {
  return $this
    ->get('rule')->entity;
}