function ModuleRouteSubscriber::__construct

Same name in other branches
  1. 9 core/lib/Drupal/Core/EventSubscriber/ModuleRouteSubscriber.php \Drupal\Core\EventSubscriber\ModuleRouteSubscriber::__construct()
  2. 10 core/lib/Drupal/Core/EventSubscriber/ModuleRouteSubscriber.php \Drupal\Core\EventSubscriber\ModuleRouteSubscriber::__construct()
  3. 11.x core/lib/Drupal/Core/EventSubscriber/ModuleRouteSubscriber.php \Drupal\Core\EventSubscriber\ModuleRouteSubscriber::__construct()

Constructs a ModuleRouteSubscriber object.

Parameters

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

File

core/lib/Drupal/Core/EventSubscriber/ModuleRouteSubscriber.php, line 27

Class

ModuleRouteSubscriber
A route subscriber to remove routes that depend on modules being enabled.

Namespace

Drupal\Core\EventSubscriber

Code

public function __construct(ModuleHandlerInterface $module_handler) {
    $this->moduleHandler = $module_handler;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.