You are here

public function SystemController::__construct in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/system/src/Controller/SystemController.php \Drupal\system\Controller\SystemController::__construct()

Constructs a new SystemController.

Parameters

\Drupal\system\SystemManager $systemManager: System manager service.

\Drupal\Core\Theme\ThemeAccessCheck $theme_access: The theme access checker service.

\Drupal\Core\Form\FormBuilderInterface $form_builder: The form builder.

\Drupal\Core\Extension\ThemeHandlerInterface $theme_handler: The theme handler.

\Drupal\Core\Menu\MenuLinkTreeInterface $menu_link_tree: The menu link tree service.

\Drupal\Core\Extension\ModuleExtensionList $module_extension_list: The module extension list.

File

core/modules/system/src/Controller/SystemController.php, line 83

Class

SystemController
Returns responses for System routes.

Namespace

Drupal\system\Controller

Code

public function __construct(SystemManager $systemManager, ThemeAccessCheck $theme_access, FormBuilderInterface $form_builder, ThemeHandlerInterface $theme_handler, MenuLinkTreeInterface $menu_link_tree, ModuleExtensionList $module_extension_list = NULL) {
  $this->systemManager = $systemManager;
  $this->themeAccess = $theme_access;
  $this->formBuilder = $form_builder;
  $this->themeHandler = $theme_handler;
  $this->menuLinkTree = $menu_link_tree;
  if ($module_extension_list === NULL) {
    @trigger_error('The extension.list.module service must be passed to ' . __NAMESPACE__ . '\\SystemController::__construct. It was added in Drupal 8.9.0 and will be required before Drupal 10.0.0.', E_USER_DEPRECATED);
    $module_extension_list = \Drupal::service('extension.list.module');
  }
  $this->moduleExtensionList = $module_extension_list;
}