public function TipPluginTextLegacy::getAttributes in Drupal 9
@todo remove in https://drupal.org/node/3195193
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\tipCode
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;
}