forum_node_predelete(EntityInterface $node)
Implements hook_ENTITY_TYPE_predelete() for node entities.
File
- core/modules/forum/forum.module, line 231
- Provides discussion forums.
Code
function forum_node_predelete(EntityInterface $node) { if (\Drupal::service('forum_manager')->checkNodeType($node)) { /** @var \Drupal\forum\ForumIndexStorageInterface $forum_index_storage */ $forum_index_storage = \Drupal::service('forum.index_storage'); $forum_index_storage->delete($node); $forum_index_storage->deleteIndex($node); } }
Please login to continue.