public function LanguageDropdownBlock::__construct in Language Switcher Dropdown 8.2
Same name in this branch
- 8.2 src/Plugin/Derivative/LanguageDropdownBlock.php \Drupal\lang_dropdown\Plugin\Derivative\LanguageDropdownBlock::__construct()
- 8.2 src/Plugin/Block/LanguageDropdownBlock.php \Drupal\lang_dropdown\Plugin\Block\LanguageDropdownBlock::__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.
\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.
\Drupal\Core\Asset\LibraryDiscovery $library_discovery: The library discovery service.
\Drupal\Core\Session\AccountProxyInterface $current_user: The current user account.
\Drupal\Core\Form\FormBuilderInterface $form_builder: The form builder service.
Overrides BlockPluginTrait::__construct
File
- src/
Plugin/ Block/ LanguageDropdownBlock.php, line 97
Class
- LanguageDropdownBlock
- Provides a 'Language dropdown switcher' block.
Namespace
Drupal\lang_dropdown\Plugin\BlockCode
public function __construct(array $configuration, $plugin_id, $plugin_definition, LanguageManagerInterface $language_manager, PathMatcherInterface $path_matcher, ModuleHandlerInterface $module_handler, LibraryDiscovery $library_discovery, AccountProxyInterface $current_user, FormBuilderInterface $form_builder) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->languageManager = $language_manager;
$this->pathMatcher = $path_matcher;
$this->moduleHandler = $module_handler;
$this->libraryDiscovery = $library_discovery;
$this->currentUser = $current_user;
$this->formBuilder = $form_builder;
}