You are here

protected function RegistrationStorage::getEventName in RNG - Events and Registrations 3.x

Same name and namespace in other branches
  1. 8.2 src/RegistrationStorage.php \Drupal\rng\RegistrationStorage::getEventName()

Gets the event name for the given hook.

Created using the the entity type's module name and ID. For example, the 'presave' hook for registration entities maps to the 'rng.registration.presave' event name.

Parameters

string $hook: One of 'load', 'create', 'presave', 'insert', 'update', 'predelete', 'delete', 'translation_insert', 'translation_delete'.

Return value

string The event name.

1 call to RegistrationStorage::getEventName()
RegistrationStorage::invokeHook in src/RegistrationStorage.php
Invokes a hook on behalf of the entity.

File

src/RegistrationStorage.php, line 64

Class

RegistrationStorage
Defines the registration storage.

Namespace

Drupal\rng

Code

protected function getEventName($hook) {
  return $this->entityType
    ->getProvider() . '.' . $this->entityType
    ->id() . '.' . $hook;
}