function AdminController::__construct

Same name in other branches
  1. 9 core/modules/system/src/Controller/AdminController.php \Drupal\system\Controller\AdminController::__construct()
  2. 10 core/modules/system/src/Controller/AdminController.php \Drupal\system\Controller\AdminController::__construct()
  3. 11.x core/modules/system/src/Controller/AdminController.php \Drupal\system\Controller\AdminController::__construct()

AdminController constructor.

Parameters

\Drupal\Core\Extension\ModuleExtensionList|null $extension_list_module: The module extension list. This is left optional for BC reasons, but the optional usage is deprecated and will become required in Drupal 9.0.0.

File

core/modules/system/src/Controller/AdminController.php, line 28

Class

AdminController
Controller for admin section.

Namespace

Drupal\system\Controller

Code

public function __construct(ModuleExtensionList $extension_list_module = NULL) {
    if ($extension_list_module === NULL) {
        @trigger_error('Calling AdminController::__construct() with the $module_extension_list argument is supported in drupal:8.8.0 and will be required before drupal:9.0.0. See https://www.drupal.org/node/2709919.', E_USER_DEPRECATED);
        $extension_list_module = \Drupal::service('extension.list.module');
    }
    $this->moduleExtensionList = $extension_list_module;
}

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