protected function RegistrationStorage::invokeHook in RNG - Events and Registrations 3.x
Same name and namespace in other branches
- 8.2 src/RegistrationStorage.php \Drupal\rng\RegistrationStorage::invokeHook()
Invokes a hook on behalf of the entity.
Parameters
string $hook: One of 'create', 'presave', 'insert', 'update', 'predelete', 'delete', or 'revision_delete'.
\Drupal\Core\Entity\EntityInterface $entity: The entity object.
Overrides ContentEntityStorageBase::invokeHook
File
- src/
RegistrationStorage.php, line 45
Class
- RegistrationStorage
- Defines the registration storage.
Namespace
Drupal\rngCode
protected function invokeHook($hook, EntityInterface $entity) {
parent::invokeHook($hook, $entity);
$this->eventDispatcher
->dispatch($this
->getEventName($hook), new RegistrationEvent($entity));
}