function Language::__construct

Same name in this branch
  1. 9 core/lib/Drupal/Core/Language/Language.php \Drupal\Core\Language\Language::__construct()
Same name in other branches
  1. 8.9.x core/modules/language/src/Plugin/Condition/Language.php \Drupal\language\Plugin\Condition\Language::__construct()
  2. 8.9.x core/lib/Drupal/Core/Language/Language.php \Drupal\Core\Language\Language::__construct()
  3. 10 core/modules/language/src/Plugin/Condition/Language.php \Drupal\language\Plugin\Condition\Language::__construct()
  4. 10 core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/Language.php \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Language::__construct()
  5. 10 core/lib/Drupal/Core/Language/Language.php \Drupal\Core\Language\Language::__construct()
  6. 11.x core/modules/language/src/Plugin/Condition/Language.php \Drupal\language\Plugin\Condition\Language::__construct()
  7. 11.x core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/Language.php \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Language::__construct()
  8. 11.x core/lib/Drupal/Core/Language/Language.php \Drupal\Core\Language\Language::__construct()

Creates a new Language instance.

Parameters

\Drupal\Core\Language\LanguageManagerInterface $language_manager: The language manager.

array $configuration: The plugin configuration, i.e. an array with configuration values keyed by configuration option name. The special key 'context' may be used to initialize the defined contexts by setting it to an array of context values keyed by context names.

string $plugin_id: The plugin_id for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

Overrides ConditionPluginBase::__construct

File

core/modules/language/src/Plugin/Condition/Language.php, line 47

Class

Language
Provides a 'Language' condition.

Namespace

Drupal\language\Plugin\Condition

Code

public function __construct(LanguageManagerInterface $language_manager, array $configuration, $plugin_id, $plugin_definition) {
    parent::__construct($configuration, $plugin_id, $plugin_definition);
    $this->languageManager = $language_manager;
}

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