You are here

public function HelpTopicSection::__construct in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/help_topics/src/Plugin/HelpSection/HelpTopicSection.php \Drupal\help_topics\Plugin\HelpSection\HelpTopicSection::__construct()

Constructs a HelpTopicSection 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\help_topics\HelpTopicPluginManagerInterface $plugin_manager: The help topic plugin manager service.

\Drupal\Core\Render\RendererInterface $renderer: The renderer.

\Drupal\Core\Language\LanguageDefault $default_language: The default language object.

\Drupal\Core\Language\LanguageManagerInterface $language_manager: The language manager.

\Drupal\Core\StringTranslation\TranslationManager $translation_manager: The translation manager. We are using a method that doesn't exist on an interface, so require this class.

Overrides PluginBase::__construct

File

core/modules/help_topics/src/Plugin/HelpSection/HelpTopicSection.php, line 107

Class

HelpTopicSection
Provides the help topics list section for the help page.

Namespace

Drupal\help_topics\Plugin\HelpSection

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, HelpTopicPluginManagerInterface $plugin_manager, RendererInterface $renderer, LanguageDefault $default_language, LanguageManagerInterface $language_manager, TranslationManager $translation_manager) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->pluginManager = $plugin_manager;
  $this->renderer = $renderer;
  $this->defaultLanguage = $default_language;
  $this->languageManager = $language_manager;
  $this->translationManager = $translation_manager;
}