protected EntityStorageBase::invokeHook($hook, EntityInterface $entity)
Invokes a hook on behalf of the entity.
string $hook: One of 'presave', 'insert', 'update', 'predelete', 'delete', or 'revision_delete'.
\Drupal\Core\Entity\EntityInterface $entity: The entity object.
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)); }
© 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!Entity!EntityStorageBase.php/function/EntityStorageBase::invokeHook/8.1.x