function hook_ENTITY_TYPE_postupdate in Hook Post Action 8
Gets called after content entity has been updated to database.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: An entity object.
See also
File
- ./
hook_post_action.api.php, line 176 - Documents API functions for hook_post_action module.
Code
function hook_ENTITY_TYPE_postupdate(EntityInterface $entity) {
$id = $entity
->id();
$entity_type = $entity
->getEntityTypeId();
$bundle = $entity
->bundle();
\Drupal::logger('hook_post_action_test')
->info('The updated @entity_type @bundle id is @id from @function.', [
'@id' => $id,
'@bundle' => $bundle,
'@function' => __FUNCTION__,
'@entity_type' => $entity_type,
]);
}