public function Language::__construct in Drupal 10
Same name in this branch
- 10 core/lib/Drupal/Core/Language/Language.php \Drupal\Core\Language\Language::__construct()
- 10 core/modules/language/src/Plugin/Condition/Language.php \Drupal\language\Plugin\Condition\Language::__construct()
Same name and namespace in other branches
- 8 core/modules/language/src/Plugin/Condition/Language.php \Drupal\language\Plugin\Condition\Language::__construct()
- 9 core/modules/language/src/Plugin/Condition/Language.php \Drupal\language\Plugin\Condition\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.
File
- core/
modules/ language/ src/ Plugin/ Condition/ Language.php, line 47
Class
- Language
- Provides a 'Language' condition.
Namespace
Drupal\language\Plugin\ConditionCode
public function __construct(LanguageManagerInterface $language_manager, array $configuration, $plugin_id, $plugin_definition) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->languageManager = $language_manager;
}