function forum_comment_insert
forum_comment_insert(CommentInterface $comment)
Implements hook_ENTITY_TYPE_insert() for comment entities.
File
- core/modules/forum/forum.module, line 269
- Provides discussion forums.
Code
function forum_comment_insert(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_insert/8.1.x