You are here

public function TipPluginImageLegacy::getConfigurationOrNot in Drupal 10

Same name and namespace in other branches
  1. 9 core/modules/tour/tests/tour_test/src/Plugin/tour/tip/TipPluginImageLegacy.php \Drupal\tour_test\Plugin\tour\tip\TipPluginImageLegacy::getConfigurationOrNot()

File

core/modules/tour/tests/tour_test/src/Plugin/tour/tip/TipPluginImageLegacy.php, line 71

Class

TipPluginImageLegacy
Displays an image as a tip.

Namespace

Drupal\tour_test\Plugin\tour\tip

Code

public function getConfigurationOrNot() {
  $image = [
    '#theme' => 'image',
    '#uri' => $this
      ->get('url'),
    '#alt' => $this
      ->get('alt'),
  ];
  return [
    'title' => Html::escape($this
      ->get('label')),
    'body' => $this->token
      ->replace(\Drupal::service('renderer')
      ->renderPlain($image)),
  ];
}