You are here

public function DisableLanguageManager::__construct in Disable language 8

DisableLanguageManager constructor.

Parameters

\Drupal\Core\Language\LanguageDefault $default_language: Provides a simple get and set wrapper to the default language object.

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: Defines the interface for a configuration object factory.

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: Interface for classes that manage a set of enabled modules.

\Drupal\language\Config\LanguageConfigFactoryOverrideInterface $config_override: Interface for a configuration factory language override object.

\Symfony\Component\HttpFoundation\RequestStack $request_stack: Request stack that controls the lifecycle of requests.

\Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager: Manages entity type plugin definitions.

\Drupal\Core\Language\LanguageManager $languageManager: Providing language support on language-unaware sites.

Overrides ConfigurableLanguageManager::__construct

File

src/DisableLanguageManager.php, line 67

Class

DisableLanguageManager
Class DisableLanguageManager.

Namespace

Drupal\disable_language

Code

public function __construct(LanguageDefault $default_language, ConfigFactoryInterface $config_factory, ModuleHandlerInterface $module_handler, LanguageConfigFactoryOverrideInterface $config_override, RequestStack $request_stack, EntityTypeManagerInterface $entityTypeManager, languageManager $languageManager) {
  parent::__construct($default_language, $config_factory, $module_handler, $config_override, $request_stack);
  $this->entityTypeManager = $entityTypeManager;
  $this->languageManager = $languageManager;
  $this->disabledLanguages = [];
  $this->enabledLanguages = [];
}