public function TipPluginText::getAttributes

Overrides \Drupal\tour\TipPluginBase::getAttributes().

Overrides TipPluginBase::getAttributes

File

drupal/core/modules/tour/lib/Drupal/tour/Plugin/tour/tip/TipPluginText.php, line 71
Contains \Drupal\tour\Plugin\tour\tip\TipPluginText.

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;
}