public function DomainLangNegotiationConfigureForm::__construct in Domain Lang 8
Constructs a NegotiationConfigureForm object.
Parameters
\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The factory for configuration objects.
\Drupal\language\ConfigurableLanguageManagerInterface $language_manager: The language manager.
\Drupal\language\LanguageNegotiatorInterface $negotiator: The language negotiation methods manager.
\Drupal\Core\Block\BlockManagerInterface $block_manager: The block manager.
\Drupal\Core\Extension\ThemeHandlerInterface $theme_handler: The theme handler.
\Drupal\Core\Entity\EntityStorageInterface $block_storage: The block storage, or NULL if not available.
\Drupal\domain_lang\DomainLangHandlerInterface $domain_lang_handler: The domain lang handler.
\Drupal\Core\Routing\RouteProviderInterface $route_provider: Route provider.
Overrides NegotiationConfigureForm::__construct
File
- src/
Form/ DomainLangNegotiationConfigureForm.php, line 66
Class
- DomainLangNegotiationConfigureForm
- Configure the selected language negotiation method for this site.
Namespace
Drupal\domain_lang\FormCode
public function __construct(ConfigFactoryInterface $config_factory, ConfigurableLanguageManagerInterface $language_manager, LanguageNegotiatorInterface $negotiator, BlockManagerInterface $block_manager, ThemeHandlerInterface $theme_handler, EntityStorageInterface $block_storage = NULL, DomainLangHandlerInterface $domain_lang_handler, RouteProviderInterface $route_provider) {
parent::__construct($config_factory, $language_manager, $negotiator, $block_manager, $theme_handler, $block_storage);
$this->domainLangHandler = $domain_lang_handler;
$this->routeProvider = $route_provider;
$this->languageTypesConfig = $this->domainLangHandler
->getDomainConfigName('language.types');
$this->languageTypes = $this
->config($this->languageTypesConfig);
// Fill with initial values on first page visit.
if ($this->languageTypes
->isNew()) {
$this->languageTypes
->merge($this
->config('language.types')
->get());
}
}