public function MenuLinkEntity::getTitle in Admin Toolbar 8.2
Same name and namespace in other branches
- 3.x admin_toolbar_tools/src/Plugin/Menu/MenuLinkEntity.php \Drupal\admin_toolbar_tools\Plugin\Menu\MenuLinkEntity::getTitle()
Returns the localized title to be shown for this link.
Return value
string The title of the menu link.
Overrides MenuLinkDefault::getTitle
File
- admin_toolbar_tools/
src/ Plugin/ Menu/ MenuLinkEntity.php, line 59
Class
- MenuLinkEntity
- Provides a menu link plugins for configuration entities.
Namespace
Drupal\admin_toolbar_tools\Plugin\MenuCode
public function getTitle() {
if ($this->entity) {
return (string) $this->entity
->label();
}
return $this->pluginDefinition['title'] ?: $this
->t('Missing');
}