You are here

function ajax_comments_preprocess_comment in AJAX Comments 8

Same name and namespace in other branches
  1. 6 ajax_comments.module \ajax_comments_preprocess_comment()
  2. 7 ajax_comments.module \ajax_comments_preprocess_comment()

Implements template_preprocess_comment().

File

./ajax_comments.module, line 289
AJAX comments module file.

Code

function ajax_comments_preprocess_comment(&$variables) {

  /** @var \Drupal\comment\CommentInterface $comment */
  $comment = $variables['elements']['#comment'];
  $variables['attributes']['class'][] = AjaxCommentsController::$commentClassPrefix . $comment
    ->id();
}