You are here

function entity_hierarchy_node_delete in Entity Reference Hierarchy 8

Implements hook_ENTITY_TYPE_delete().

Todo: move this to the services class.

File

./entity_hierarchy.module, line 183
A module to make nodes hierarchical.

Code

function entity_hierarchy_node_delete(EntityInterface $node) {
  db_delete('entity_hierarchy')
    ->condition('hid', $node
    ->id())
    ->execute();
}