function TipPluginTextLegacy::getAriaId

Same name in other branches
  1. 9 core/modules/tour/tests/tour_test/src/Plugin/tour/tip/TipPluginTextLegacy.php \Drupal\tour_test\Plugin\tour\tip\TipPluginTextLegacy::getAriaId()
  2. 11.x core/modules/tour/tests/tour_test/src/Plugin/tour/tip/TipPluginTextLegacy.php \Drupal\tour_test\Plugin\tour\tip\TipPluginTextLegacy::getAriaId()

Returns an ID that is guaranteed uniqueness.

Return value

string A unique id to be used to generate aria attributes.

File

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

Class

TipPluginTextLegacy
Displays some text as a tip.

Namespace

Drupal\tour_test\Plugin\tour\tip

Code

public function getAriaId() {
    if (!$this->ariaId) {
        $this->ariaId = Html::getUniqueId($this->get('id'));
    }
    return $this->ariaId;
}

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