protected function UserTrackerTab::currentUser in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/tracker/src/Plugin/Menu/UserTrackerTab.php \Drupal\tracker\Plugin\Menu\UserTrackerTab::currentUser()
Gets the current active user.
@todo: https://www.drupal.org/node/2105123 put this method in \Drupal\Core\Plugin\PluginBase instead.
Return value
\Drupal\Core\Session\AccountInterface
File
- core/
modules/ tracker/ src/ Plugin/ Menu/ UserTrackerTab.php, line 33 - Contains \Drupal\tracker\Plugin\Menu\UserTrackerTab.
Class
- UserTrackerTab
- Provides route parameters needed to link to the current user tracker tab.
Namespace
Drupal\tracker\Plugin\MenuCode
protected function currentUser() {
if (!$this->currentUser) {
$this->currentUser = \Drupal::currentUser();
}
return $this->currentUser;
}