You are here

public function TipPluginImageLegacy::getOutput in Drupal 9

This method should not be used. It is deprecated from TipPluginInterface.

@todo remove in https://drupal.org/node/3195193

Return value

array An intentionally empty array.

Overrides TipPluginBase::getOutput

File

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

Class

TipPluginImageLegacy
Displays an image as a tip.

Namespace

Drupal\tour_test\Plugin\tour\tip

Code

public function getOutput() {
  $prefix = '<h2 class="tour-tip-label" id="tour-tip-' . $this
    ->get('ariaId') . '-label">' . Html::escape($this
    ->get('label')) . '</h2>';
  $prefix .= '<p class="tour-tip-image" id="tour-tip-' . $this
    ->get('ariaId') . '-contents">';
  return [
    '#prefix' => $prefix,
    '#theme' => 'image',
    '#uri' => $this
      ->get('url'),
    '#alt' => $this
      ->get('alt'),
    '#suffix' => '</p>',
  ];
}