function HistoryHooks::nodeDelete
Implements hook_ENTITY_TYPE_delete() for node entities.
File
-
core/
modules/ history/ src/ Hook/ HistoryHooks.php, line 67
Class
- HistoryHooks
- Hook implementations for history.
Namespace
Drupal\history\HookCode
public function nodeDelete(EntityInterface $node) {
\Drupal::database()->delete('history')
->condition('nid', $node->id())
->execute();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.