You are here

public function HabitatSubscriber::ensureHabitat in Habitat 8

File

src/EventSubscriber/HabitatSubscriber.php, line 18
Contains \Drupal\habitat\EventSubscriber\HabitatSubscriber.

Class

HabitatSubscriber

Namespace

Drupal\habitat\EventSubscriber

Code

public function ensureHabitat(GetResponseEvent $event) {
  $habitat_variable = \Drupal::config('habitat.settings')
    ->get('habitat_variable');
  if ($habitat = Settings::get($habitat_variable)) {
    $this
      ->ensureModulesDisabled($habitat);
    $this
      ->ensureModulesEnabled($habitat);
  }
}