function DynamicMenuLinkMock::getTitle
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Menu/DynamicMenuLinkMock.php \Drupal\Tests\Core\Menu\DynamicMenuLinkMock::getTitle()
- 10 core/tests/Drupal/Tests/Core/Menu/DynamicMenuLinkMock.php \Drupal\Tests\Core\Menu\DynamicMenuLinkMock::getTitle()
- 11.x core/tests/Drupal/Tests/Core/Menu/DynamicMenuLinkMock.php \Drupal\Tests\Core\Menu\DynamicMenuLinkMock::getTitle()
Overrides MenuLinkMock::getTitle
File
-
core/
tests/ Drupal/ Tests/ Core/ Menu/ DynamicMenuLinkMock.php, line 42
Class
- DynamicMenuLinkMock
- Defines a mock implementation of a dynamic menu link used in tests only.
Namespace
Drupal\Tests\Core\MenuCode
public function getTitle() {
if ($this->currentUser
->isAuthenticated()) {
return 'Log out';
}
else {
return 'Log in';
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.