function TipPluginText::getBody

Same name in other branches
  1. 9 core/modules/tour/src/Plugin/tour/tip/TipPluginText.php \Drupal\tour\Plugin\tour\tip\TipPluginText::getBody()
  2. 8.9.x core/modules/tour/src/Plugin/tour/tip/TipPluginText.php \Drupal\tour\Plugin\tour\tip\TipPluginText::getBody()
  3. 11.x core/modules/tour/src/Plugin/tour/tip/TipPluginText.php \Drupal\tour\Plugin\tour\tip\TipPluginText::getBody()

Overrides TipPluginBase::getBody

File

core/modules/tour/src/Plugin/tour/tip/TipPluginText.php, line 61

Class

TipPluginText
Displays some text as a tip.

Namespace

Drupal\tour\Plugin\tour\tip

Code

public function getBody() : array {
    return [
        '#type' => 'html_tag',
        '#tag' => 'p',
        '#value' => $this->token
            ->replace($this->get('body')),
        '#attributes' => [
            'class' => [
                'tour-tip-body',
            ],
        ],
    ];
}

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