public function LanguageBlock::__construct in Drupal 8
Same name and namespace in other branches
- 9 core/modules/language/src/Plugin/Block/LanguageBlock.php \Drupal\language\Plugin\Block\LanguageBlock::__construct()
Constructs an LanguageBlock object.
Parameters
array $configuration: A configuration array containing information about the plugin instance.
string $plugin_id: The plugin_id for the plugin instance.
mixed $plugin_definition: The plugin implementation definition.
\Drupal\Core\Language\LanguageManagerInterface $language_manager: The language manager.
\Drupal\Core\Path\PathMatcherInterface $path_matcher: The path matcher.
Overrides BlockPluginTrait::__construct
File
- core/
modules/ language/ src/ Plugin/ Block/ LanguageBlock.php, line 54
Class
- LanguageBlock
- Provides a 'Language switcher' block.
Namespace
Drupal\language\Plugin\BlockCode
public function __construct(array $configuration, $plugin_id, $plugin_definition, LanguageManagerInterface $language_manager, PathMatcherInterface $path_matcher) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->languageManager = $language_manager;
$this->pathMatcher = $path_matcher;
}