function DynamicMenuLinkMock::getRouteName
Overrides MenuLinkBase::getRouteName
File
-
core/
tests/ Drupal/ Tests/ Core/ Menu/ DynamicMenuLinkMock.php, line 56
Class
- DynamicMenuLinkMock
- Defines a mock implementation of a dynamic menu link used in tests only.
Namespace
Drupal\Tests\Core\MenuCode
public function getRouteName() {
if ($this->currentUser
->isAuthenticated()) {
return 'user.logout';
}
else {
return 'user.login';
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.