You are here

public function DisabledLanguagesEventSubscriber::__construct in Disable language 8

DisabledLanguagesEventSubscriber constructor.

Parameters

\Drupal\disable_language\DisableLanguageManager $disableLanguageManager: Class DisableLanguageManager.

\Drupal\Core\Session\AccountProxyInterface $currentUser: A proxied implementation of AccountInterface.

\Drupal\Core\Config\ConfigFactoryInterface $configFactory: Config factory.

\Drupal\Core\Condition\ConditionManager $conditionManager: A plugin manager for conditions plugins.

\Drupal\Core\StreamWrapper\StreamWrapperManager $streamWrapperManager:

File

src/EventSubscriber/DisabledLanguagesEventSubscriber.php, line 73

Class

DisabledLanguagesEventSubscriber
Subscribe to KernelEvents::REQUEST events.

Namespace

Drupal\disable_language\EventSubscriber

Code

public function __construct(DisableLanguageManager $disableLanguageManager, AccountProxyInterface $currentUser, ConfigFactoryInterface $configFactory, ConditionManager $conditionManager, StreamWrapperManager $streamWrapperManager) {
  $this->currentUser = $currentUser;
  $this->disableLanguageManager = $disableLanguageManager;
  $this->config = $configFactory
    ->get('disable_language.settings');
  $this->conditionManager = $conditionManager;
  $this->schemes = array_keys($streamWrapperManager
    ->getWrappers());
}