You are here

function hook_post_action_example_node_postdelete in Hook Post Action 8

Same name and namespace in other branches
  1. 7 hook_post_action_example/hook_post_action_example.module \hook_post_action_example_node_postdelete()

Implements hook_ENTITY_TYPE_postdelete().

File

hook_post_action_example/hook_post_action_example.module, line 90
A working example for hook_post_action module.

Code

function hook_post_action_example_node_postdelete(EntityInterface $entity) {
  $id = $entity
    ->id();
  $bundle = $entity
    ->bundle();
  \Drupal::logger('hook_post_action_test')
    ->info("The deleted node {$bundle} id is {$id} from " . __FUNCTION__);
}