You are here

public function Rule::getEvent in RNG - Events and Registrations 3.x

Same name and namespace in other branches
  1. 8.2 src/Entity/Rule.php \Drupal\rng\Entity\Rule::getEvent()
  2. 8 src/Entity/Rule.php \Drupal\rng\Entity\Rule::getEvent()

Gets the event entity.

Return value

\Drupal\Core\Entity\EntityInterface|null The event entity. Or NULL if it does not exist.

Overrides RuleInterface::getEvent

File

src/Entity/Rule.php, line 47

Class

Rule
Defines the event rule entity.

Namespace

Drupal\rng\Entity

Code

public function getEvent() {
  return $this
    ->get('event')->entity;
}