You are here

public function DropdownLanguage::__construct in Dropdown Language 8

Same name and namespace in other branches
  1. 8.3 src/Plugin/Block/DropdownLanguage.php \Drupal\dropdown_language\Plugin\Block\DropdownLanguage::__construct()
  2. 8.2 src/Plugin/Block/DropdownLanguage.php \Drupal\dropdown_language\Plugin\Block\DropdownLanguage::__construct()
  3. 3.0.x src/Plugin/Block/DropdownLanguage.php \Drupal\dropdown_language\Plugin\Block\DropdownLanguage::__construct()

Constructs a new DropdownLanguage instance.

Parameters

array $block_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\Config\ConfigFactoryInterface $config_factory: The config factory.

Overrides BlockPluginTrait::__construct

File

src/Plugin/Block/DropdownLanguage.php, line 53

Class

DropdownLanguage
Provides an alternative language switcher block.

Namespace

Drupal\dropdown_language\Plugin\Block

Code

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