You are here

public function TipPluginTextLegacy::getAriaId in Drupal 10

Same name and namespace 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()

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