function forum_comment_delete
forum_comment_delete(CommentInterface $comment)
Implements hook_ENTITY_TYPE_delete() for comment entities.
File
- core/modules/forum/forum.module, line 278
- Provides discussion forums.
Code
function forum_comment_delete(CommentInterface $comment) { if ($comment->getCommentedEntityTypeId() == 'node') { \Drupal::service('forum.index_storage')->updateIndex($comment->getCommentedEntity()); } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!forum!forum.module/function/forum_comment_delete/8.1.x