function hook_comment_publish

Respond to a comment being published by a moderator.

Parameters

Drupal\comment\Comment $comment: The comment the action is being performed on.

Related topics

3 functions implement hook_comment_publish()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

forum_comment_publish in drupal/core/modules/forum/forum.module
Implements hook_comment_publish().
search_comment_publish in drupal/core/modules/search/search.module
Implements hook_comment_publish().
tracker_comment_publish in drupal/core/modules/tracker/tracker.module
Implements hook_comment_publish().
1 invocation of hook_comment_publish()

File

drupal/core/modules/comment/comment.api.php, line 146
Hooks provided by the Comment module.

Code

function hook_comment_publish(Drupal\comment\Comment $comment) {
  drupal_set_message(t('Comment: @subject has been published', array(
    '@subject' => $comment->subject->value,
  )));
}