You are here

public function LanguageCookieConditionMethodIsValid::__construct in Language Cookie 8

Constructs a LanguageCookieConditionPath plugin.

Parameters

\Drupal\language\LanguageNegotiatorInterface $language_negotiator: The language negotiator.

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

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/LanguageCookieConditionMethodIsValid.php, line 52

Class

LanguageCookieConditionMethodIsValid
Class for LanguageCookieConditionPathIsValid.

Namespace

Drupal\language_cookie\Plugin\LanguageCookieCondition

Code

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