You are here

public function LanguageCookieConditionLanguageAccess::__construct in Language Cookie 8

Constructs a LanguageCookieConditionPath plugin.

Parameters

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

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.

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.

Overrides ConditionPluginBase::__construct

File

src/Plugin/LanguageCookieCondition/LanguageCookieConditionLanguageAccess.php, line 54

Class

LanguageCookieConditionLanguageAccess
Class for language access plugin.

Namespace

Drupal\language_cookie\Plugin\LanguageCookieCondition

Code

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