function LoginLogoutMenuLink::__construct
Constructs a new LoginLogoutMenuLink.
Parameters
array $configuration: A configuration array containing information about the plugin instance.
string $plugin_id: The plugin_id for the plugin instance.
mixed $plugin_definition: The plugin implementation definition.
\Drupal\Core\Menu\StaticMenuLinkOverridesInterface $static_override: The static override storage.
\Drupal\Core\Session\AccountInterface $current_user: The current user.
Overrides MenuLinkDefault::__construct
File
-
core/
modules/ user/ src/ Plugin/ Menu/ LoginLogoutMenuLink.php, line 36
Class
- LoginLogoutMenuLink
- A menu link that shows "Log in" or "Log out" as appropriate.
Namespace
Drupal\user\Plugin\MenuCode
public function __construct(array $configuration, $plugin_id, $plugin_definition, StaticMenuLinkOverridesInterface $static_override, AccountInterface $current_user) {
parent::__construct($configuration, $plugin_id, $plugin_definition, $static_override);
$this->currentUser = $current_user;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.