protected function ConfigStorageController::invokeHook

Invokes a hook on behalf of the entity.

Parameters

$hook: One of 'presave', 'insert', 'update', 'predelete', or 'delete'.

$entity: The entity object.

2 calls to ConfigStorageController::invokeHook()

File

drupal/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php, line 420
Definition of Drupal\Core\Config\Entity\ConfigStorageController.

Class

ConfigStorageController
Defines the storage controller class for configuration entities.

Namespace

Drupal\Core\Config\Entity

Code

protected function invokeHook($hook, EntityInterface $entity) {

  // Invoke the hook.
  module_invoke_all($this->entityType . '_' . $hook, $entity);

  // Invoke the respective entity-level hook.
  module_invoke_all('entity_' . $hook, $entity, $this->entityType);
}