function TipPluginImageLegacy::getConfigurationOrNot

Same name in other branches
  1. 10 core/modules/tour/tests/tour_test/src/Plugin/tour/tip/TipPluginImageLegacy.php \Drupal\tour_test\Plugin\tour\tip\TipPluginImageLegacy::getConfigurationOrNot()
  2. 11.x 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)),
    ];
}

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