function LoginLogoutMenuLink::getCacheContexts
Same name in other branches
- 8.9.x core/modules/user/src/Plugin/Menu/LoginLogoutMenuLink.php \Drupal\user\Plugin\Menu\LoginLogoutMenuLink::getCacheContexts()
- 10 core/modules/user/src/Plugin/Menu/LoginLogoutMenuLink.php \Drupal\user\Plugin\Menu\LoginLogoutMenuLink::getCacheContexts()
- 11.x core/modules/user/src/Plugin/Menu/LoginLogoutMenuLink.php \Drupal\user\Plugin\Menu\LoginLogoutMenuLink::getCacheContexts()
Overrides MenuLinkBase::getCacheContexts
File
-
core/
modules/ user/ src/ Plugin/ Menu/ LoginLogoutMenuLink.php, line 82
Class
- LoginLogoutMenuLink
- A menu link that shows "Log in" or "Log out" as appropriate.
Namespace
Drupal\user\Plugin\MenuCode
public function getCacheContexts() {
return [
'user.roles:authenticated',
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.