function ToolbarLinkBuilder::renderDisplayName
Same name in other branches
- 9 core/modules/user/src/ToolbarLinkBuilder.php \Drupal\user\ToolbarLinkBuilder::renderDisplayName()
- 8.9.x core/modules/user/src/ToolbarLinkBuilder.php \Drupal\user\ToolbarLinkBuilder::renderDisplayName()
- 10 core/modules/user/src/ToolbarLinkBuilder.php \Drupal\user\ToolbarLinkBuilder::renderDisplayName()
Lazy builder callback for rendering the username.
Return value
array A renderable array as expected by the renderer service.
File
-
core/
modules/ user/ src/ ToolbarLinkBuilder.php, line 81
Class
- ToolbarLinkBuilder
- ToolbarLinkBuilder fills out the placeholders generated in user_toolbar().
Namespace
Drupal\userCode
public function renderDisplayName() {
return [
'#plain_text' => $this->account
->getDisplayName(),
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.