function TipPluginTextLegacy::getAttributes

Overrides TipPluginBase::getAttributes

File

core/modules/tour/tests/tour_test/src/Plugin/tour/tip/TipPluginTextLegacy.php, line 99

Class

TipPluginTextLegacy
Displays some text as a tip.

Namespace

Drupal\tour_test\Plugin\tour\tip

Code

public function getAttributes() {
    $attributes = parent::getAttributes();
    $attributes['data-aria-describedby'] = 'tour-tip-' . $this->getAriaId() . '-contents';
    $attributes['data-aria-labelledby'] = 'tour-tip-' . $this->getAriaId() . '-label';
    if ($location = $this->get('location')) {
        $attributes['data-options'] = 'tipLocation:' . $location;
    }
    return $attributes;
}

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