function HookHelpSection::__construct

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

Constructs a HookHelpSection object.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin ID for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

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

\Drupal\Core\Extension\ModuleExtensionList|null $moduleExtensionList: The module extension list.

File

core/modules/help/src/Plugin/HelpSection/HookHelpSection.php, line 44

Class

HookHelpSection
Provides the module topics list section for the help page.

Namespace

Drupal\help\Plugin\HelpSection

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, ModuleHandlerInterface $module_handler, ?ModuleExtensionList $moduleExtensionList = NULL) {
    parent::__construct($configuration, $plugin_id, $plugin_definition);
    $this->moduleHandler = $module_handler;
    if ($this->moduleExtensionList === NULL) {
        @trigger_error('Calling ' . __METHOD__ . '() without the $moduleExtensionList argument is deprecated in drupal:10.3.0 and will be required in drupal:12.0.0. See https://www.drupal.org/node/3310017', E_USER_DEPRECATED);
        $this->moduleExtensionList = \Drupal::service('extension.list.module');
    }
}

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