function HelpTopicTwig::getBody

Returns the body of the topic.

Return value

array A render array representing the body.

Overrides HelpTopicPluginInterface::getBody

File

core/modules/help_topics/src/HelpTopicTwig.php, line 63

Class

HelpTopicTwig
Represents a help topic plugin whose definition comes from a Twig file.

Namespace

Drupal\help_topics

Code

public function getBody() {
  return [
    '#markup' => $this->twig
      ->load('@help_topics/' . $this->getPluginId() . '.html.twig')
      ->render(),
  ];
}

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