function TopBarItemBase::label

Same name and namespace in other branches
  1. 11.x core/modules/navigation/src/TopBarItemBase.php \Drupal\navigation\TopBarItemBase::label()

Returns the translated plugin label.

Return value

string|\Stringable The translated plugin label.

Overrides TopBarItemPluginInterface::label

File

core/modules/navigation/src/TopBarItemBase.php, line 17

Class

TopBarItemBase
Base class for top bar item plugins.

Namespace

Drupal\navigation

Code

public function label() : string|\Stringable {
  return $this->pluginDefinition['label'];
}

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