You are here

public function CommentStyleguide::items in Style Guide 8

Same name and namespace in other branches
  1. 2.x src/Plugin/Styleguide/CommentStyleguide.php \Drupal\styleguide\Plugin\Styleguide\CommentStyleguide::items()

Styleguide elements implementation.

Return value

array An array of Styleguide elements.

Overrides StyleguideInterface::items

File

src/Plugin/Styleguide/CommentStyleguide.php, line 72

Class

CommentStyleguide
Comment Styleguide items implementation.

Namespace

Drupal\styleguide\Plugin\Styleguide

Code

public function items() {
  $items = [];
  if ($this->moduleHandler
    ->moduleExists('comment')) {
    $items['comment'] = [
      'title' => $this
        ->t('Comment'),
      'content' => $this
        ->commentPrepare(),
      'group' => $this
        ->t('Comment'),
    ];
  }
  return $items;
}