You are here

public static function NodeHookHandler::hookNodeDelete in Node expire 7.2

Implements hook_nodeapi_delete().

1 call to NodeHookHandler::hookNodeDelete()
node_expire_node_delete in ./node_expire.module
Implements hook_node_delete().

File

src/Module/Hook/NodeHookHandler.php, line 93
NodeHookHandler class.

Class

NodeHookHandler
NodeHookHandler class.

Namespace

Drupal\node_expire\Module\Hook

Code

public static function hookNodeDelete($node) {

  // Only deal with node types that have the Node expire feature enabled.
  $ntypes = variable_get('node_expire_ntypes', array());
  if (!isset($ntypes[$node->type])) {
    return;
  }

  // TODO: WARNING | Unused variable $ntype.
  if (!($ntype = $ntypes[$node->type])) {
    return;
  }
  DbHandler::deleteNodeExpire($node->nid);
}