protected function ConfigEntityStorage::invokeHook in Drupal 8
Same name and namespace in other branches
- 9 core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php \Drupal\Core\Config\Entity\ConfigEntityStorage::invokeHook()
- 10 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::_doCreateFromStorageRecord in core/
lib/ Drupal/ Core/ Config/ Entity/ ConfigEntityStorage.php - Helps create a configuration entity from storage values.
File
- core/
lib/ Drupal/ Core/ Config/ Entity/ ConfigEntityStorage.php, line 345
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, [
$entity,
]);
// Invoke the respective entity-level hook.
$this->moduleHandler
->invokeAll('entity_' . $hook, [
$entity,
$this->entityTypeId,
]);
}