protected ConfigEntityStorage::invokeHook($hook, EntityInterface $entity)
Invokes a hook on behalf of the entity.
$hook: One of 'presave', 'insert', 'update', 'predelete', or 'delete'.
$entity: The entity object.
Overrides EntityStorageBase::invokeHook
protected function invokeHook($hook, EntityInterface $entity) { // Invoke the hook. $this->moduleHandler->invokeAll($this->entityTypeId . '_' . $hook, array($entity)); // Invoke the respective entity-level hook. $this->moduleHandler->invokeAll('entity_' . $hook, array($entity, $this->entityTypeId)); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Config!Entity!ConfigEntityStorage.php/function/ConfigEntityStorage::invokeHook/8.1.x