function CommentThemeHooks::theme

Same name and namespace in other branches
  1. 11.x core/modules/comment/src/Hook/CommentThemeHooks.php \Drupal\comment\Hook\CommentThemeHooks::theme()

Implements hook_theme().

Attributes

#[Hook('theme')]

File

core/modules/comment/src/Hook/CommentThemeHooks.php, line 34

Class

CommentThemeHooks
Hook implementations for comment.

Namespace

Drupal\comment\Hook

Code

public function theme() : array {
  return [
    'comment' => [
      'render element' => 'elements',
      'initial preprocess' => static::class . ':preprocessComment',
    ],
    'field__comment' => [
      'base hook' => 'field',
    ],
  ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.