function comment_view

Generates an array for rendering a comment.

Parameters

Drupal\comment\Comment $comment: The comment object.

$view_mode: View mode, e.g. 'full', 'teaser'...

$langcode: (optional) A language code to use for rendering. Defaults to the global content language of the current request.

Return value

An array as expected by drupal_render().

5 calls to comment_view()

File

drupal/core/modules/comment/comment.module, line 903
Enables users to comment on published content.

Code

function comment_view(Comment $comment, $view_mode = 'full', $langcode = NULL) {
  return entity_view($comment, $view_mode, $langcode);
}