function HelpController::__construct

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

Creates a new HelpController.

Parameters

\Drupal\Core\Routing\RouteMatchInterface $route_match: The current route match.

\Drupal\help\HelpSectionManager $help_manager: The help section manager.

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

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

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

File

core/modules/help/src/Controller/HelpController.php, line 70

Class

HelpController
Controller routines for help routes.

Namespace

Drupal\help\Controller

Code

public function __construct(RouteMatchInterface $route_match, HelpSectionManager $help_manager, ModuleExtensionList $module_extension_list, ?ModuleAdminLinksHelper $module_admin_links = NULL, ?ModulePermissionsLinkHelper $module_permissions_link = NULL) {
    $this->routeMatch = $route_match;
    $this->helpManager = $help_manager;
    $this->moduleExtensionList = $module_extension_list;
    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 HelpController::__construct() without the $module_permissions_link argument is deprecated in drupal:9.3.0 and the $module_permissions_link argument will be required in drupal:10.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.