You are here

public function LoginLogoutMenuLink::__construct in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/modules/user/src/Plugin/Menu/LoginLogoutMenuLink.php \Drupal\user\Plugin\Menu\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 41
Contains \Drupal\user\Plugin\Menu\LoginLogoutMenuLink.

Class

LoginLogoutMenuLink
A menu link that shows "Log in" or "Log out" as appropriate.

Namespace

Drupal\user\Plugin\Menu

Code

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;
}