public function TipPluginText::getBody in Drupal 10
Same name and namespace in other branches
- 8 core/modules/tour/src/Plugin/tour/tip/TipPluginText.php \Drupal\tour\Plugin\tour\tip\TipPluginText::getBody()
- 9 core/modules/tour/src/Plugin/tour/tip/TipPluginText.php \Drupal\tour\Plugin\tour\tip\TipPluginText::getBody()
Returns the body content of the tooltip.
This typically maps to the Shepherd Step options `text` property.
Return value
array A render array.
Overrides TourTipPluginInterface::getBody
See also
https://shepherdjs.dev/docs/Step.html
File
- core/
modules/ tour/ src/ Plugin/ tour/ tip/ TipPluginText.php, line 62
Class
- TipPluginText
- Displays some text as a tip.
Namespace
Drupal\tour\Plugin\tour\tipCode
public function getBody() : array {
return [
'#type' => 'html_tag',
'#tag' => 'p',
'#value' => $this->token
->replace($this
->get('body')),
'#attributes' => [
'class' => [
'tour-tip-body',
],
],
];
}