You are here

public function SwitchPageThemeSettingForm::__construct in Switch Page Theme 8

Same name and namespace in other branches
  1. 8.3 src/Form/SwitchPageThemeSettingForm.php \Drupal\switch_page_theme\Form\SwitchPageThemeSettingForm::__construct()
  2. 8.2 src/Form/SwitchPageThemeSettingForm.php \Drupal\switch_page_theme\Form\SwitchPageThemeSettingForm::__construct()

Construct function.

Parameters

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory load.

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.

\Drupal\domain\DomainLoader $domain_loader: The domain loader.

\Drupal\Core\Language\LanguageManagerInterface $language_manager: The language manager service.

\Drupal\Core\Extension\ThemeHandlerInterface $theme_handler: The theme handler.

Overrides ConfigFormBase::__construct

File

src/Form/SwitchPageThemeSettingForm.php, line 61

Class

SwitchPageThemeSettingForm
Configuration page for Switch page theme settings.

Namespace

Drupal\switch_page_theme\Form

Code

public function __construct(ConfigFactoryInterface $config_factory, ModuleHandlerInterface $module_handler, DomainStorageInterface $domain_storage = NULL, LanguageManagerInterface $language_manager = NULL, ThemeHandlerInterface $theme_handler = NULL) {
  parent::__construct($config_factory);
  $this->moduleHandler = $module_handler;
  if ($domain_storage) {
    $this->domainStorage = $domain_storage;
  }
  if ($language_manager) {
    $this->languageManager = $language_manager;
  }
  $this->themeHandler = $theme_handler;
}