public function LoginLogoutMenuLink::getTitle in SAML Authentication 8.3
Same name and namespace in other branches
- 8.2 src/Plugin/Menu/LoginLogoutMenuLink.php \Drupal\samlauth\Plugin\Menu\LoginLogoutMenuLink::getTitle()
- 4.x src/Plugin/Menu/LoginLogoutMenuLink.php \Drupal\samlauth\Plugin\Menu\LoginLogoutMenuLink::getTitle()
Returns the localized title to be shown for this link.
Return value
string The title of the menu link.
Overrides LoginLogoutMenuLink::getTitle
File
- src/
Plugin/ Menu/ LoginLogoutMenuLink.php, line 62
Class
- LoginLogoutMenuLink
- A menu link that shows "Log in" or "Log out" as appropriate.
Namespace
Drupal\samlauth\Plugin\MenuCode
public function getTitle() {
if ($this->currentUser
->isAuthenticated()) {
$setting = 'logout_menu_item_title';
}
else {
$setting = 'login_menu_item_title';
}
$title = $this->config
->get($setting);
return $title ?: parent::getTitle();
}