function TipPluginText::getAttributes

Overrides TipPluginBase::getAttributes

File

core/modules/tour/src/Plugin/tour/tip/TipPluginText.php, line 109

Class

TipPluginText
Displays some text as a tip.

Namespace

Drupal\tour\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.