function UserTrackerTab::__construct

Same name in other branches
  1. 9 core/modules/tracker/src/Plugin/Menu/UserTrackerTab.php \Drupal\tracker\Plugin\Menu\UserTrackerTab::__construct()
  2. 10 core/modules/tracker/src/Plugin/Menu/UserTrackerTab.php \Drupal\tracker\Plugin\Menu\UserTrackerTab::__construct()

Construct the UserTrackerTab object.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin_id for the plugin instance.

array $plugin_definition: The plugin implementation definition.

\Drupal\Core\Session\AccountInterface $current_user: The current user.

Overrides PluginBase::__construct

File

core/modules/tracker/src/Plugin/Menu/UserTrackerTab.php, line 35

Class

UserTrackerTab
Provides route parameters needed to link to the current user tracker tab.

Namespace

Drupal\tracker\Plugin\Menu

Code

public function __construct(array $configuration, $plugin_id, array $plugin_definition, AccountInterface $current_user) {
    parent::__construct($configuration, $plugin_id, $plugin_definition);
    $this->currentUser = $current_user;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.