protected function ConfigEntityStorage::invokeHook in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php \Drupal\Core\Config\Entity\ConfigEntityStorage::invokeHook()
Invokes a hook on behalf of the entity.
Parameters
$hook: One of 'presave', 'insert', 'update', 'predelete', or 'delete'.
$entity: The entity object.
Overrides EntityStorageBase::invokeHook
1 call to ConfigEntityStorage::invokeHook()
- ConfigEntityStorage::createFromStorageRecord in core/
lib/ Drupal/ Core/ Config/ Entity/ ConfigEntityStorage.php - Creates a configuration entity from storage values.
File
- core/
lib/ Drupal/ Core/ Config/ Entity/ ConfigEntityStorage.php, line 372 - Contains \Drupal\Core\Config\Entity\ConfigEntityStorage.
Class
- ConfigEntityStorage
- Defines the storage class for configuration entities.
Namespace
Drupal\Core\Config\EntityCode
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,
));
}