function TipPluginImage::getBody
Same name in other branches
- 10 core/modules/tour/tests/tour_test/src/Plugin/tour/tip/TipPluginImage.php \Drupal\tour_test\Plugin\tour\tip\TipPluginImage::getBody()
- 11.x core/modules/tour/tests/tour_test/src/Plugin/tour/tip/TipPluginImage.php \Drupal\tour_test\Plugin\tour\tip\TipPluginImage::getBody()
Overrides TourTipPluginInterface::getBody
File
-
core/
modules/ tour/ tests/ tour_test/ src/ Plugin/ tour/ tip/ TipPluginImage.php, line 71
Class
- TipPluginImage
- Displays an image as a tip.
Namespace
Drupal\tour_test\Plugin\tour\tipCode
public function getBody() : array {
$image = [
'#theme' => 'image',
'#uri' => $this->get('url'),
'#alt' => $this->get('alt'),
];
return [
'#type' => 'html_tag',
'#tag' => 'p',
'#attributes' => [
'class' => [
'tour-tip-image',
],
],
'image' => $image,
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.