function AdminController::__construct

Same name in other branches
  1. 9 core/modules/system/src/Controller/AdminController.php \Drupal\system\Controller\AdminController::__construct()
  2. 8.9.x 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 $extension_list_module: The module extension list.

\Drupal\system\ModuleAdminLinksHelper|null $module_admin_links: The module admin links.

\Drupal\user\ModulePermissionsLinkHelper|null $module_permissions_link: The module permission link.

File

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

Class

AdminController
Controller for admin section.

Namespace

Drupal\system\Controller

Code

public function __construct(ModuleExtensionList $extension_list_module, ?ModuleAdminLinksHelper $module_admin_links = NULL, ?ModulePermissionsLinkHelper $module_permissions_link = NULL) {
    $this->moduleExtensionList = $extension_list_module;
    if (!isset($module_admin_links)) {
        @trigger_error('Calling ' . __METHOD__ . '() without the $module_admin_tasks_helper argument is deprecated in drupal:10.2.0 and the $module_admin_tasks_helper argument will be required in drupal:11.0.0. See https://www.drupal.org/node/3038972', E_USER_DEPRECATED);
        $module_admin_links = \Drupal::service('system.module_admin_links_helper');
    }
    $this->moduleAdminLinks = $module_admin_links;
    if (!isset($module_permissions_link)) {
        @trigger_error('Calling ' . __METHOD__ . ' without the $module_permissions_link argument is deprecated in drupal:10.2.0 and the $module_permissions_link argument will be required in drupal:11.0.0. See https://www.drupal.org/node/3038972', E_USER_DEPRECATED);
        $module_permissions_link = \Drupal::service('user.module_permissions_link_helper');
    }
    $this->modulePermissionsLinks = $module_permissions_link;
}

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