You are here

function hook_post_action_entity_update in Hook Post Action 7

Same name and namespace in other branches
  1. 8 hook_post_action.module \hook_post_action_entity_update()

Parameters

$entity:

$type:

File

./hook_post_action.module, line 20

Code

function hook_post_action_entity_update($entity, $type) {

  //hook_node_update unsets the original property after calling the hook functions.

  //To work around this we save a reference to the original object here,

  //and pass it in to _hook_post_action_post_save as an optional fourth argument.
  $original = isset($entity->original) ? $entity->original : NULL;
  $entity_info = array(
    'entity' => $entity,
    'type' => $type,
    'operation' => 'update',
    'original' => $original,
  );
  drupal_register_shutdown_function('_hook_post_action_post_save', $entity_info);
}