You are here

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

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

Get associated event.

Return value

\Drupal\Core\Entity\ContentEntityInterface|null An entity, or NULL if the event does not exist.

Overrides RegistrationInterface::getEvent

6 calls to Registration::getEvent()
Registration::addGroup in src/Entity/Registration.php
Add a group to the registration.
Registration::createStubs in src/Entity/Registration.php
Registration::getEventMeta in src/Entity/Registration.php
Get the event meta object for this event.
Registration::getRegistrants in src/Entity/Registration.php
Get registrants for the registration.
Registration::postSave in src/Entity/Registration.php
Acts on a saved entity before the insert or update hook is invoked.

... See full list

File

src/Entity/Registration.php, line 77

Class

Registration
Defines the registration entity class.

Namespace

Drupal\rng\Entity

Code

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