You are here

public function SearchStyleguide::__construct in Style Guide 8

Same name and namespace in other branches
  1. 2.x src/Plugin/Styleguide/SearchStyleguide.php \Drupal\styleguide\Plugin\Styleguide\SearchStyleguide::__construct()

Constructs a new searchStyleguide.

Parameters

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

string $plugin_id: The plugin_id for the plugin instance.

array $plugin_definition: The plugin implementation definition.

\Drupal\styleguide\GeneratorInterface $styleguide_generator: The styleguide generator service.

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

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

\Drupal\Core\Session\AccountInterface $current_user: The current user.

\Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager: The entity type manager.

\Drupal\Core\Render\RendererInterface $renderer: The Renderer service to format the username and node.

\Drupal\search\SearchPluginManager $search_manager: The search manager.

Overrides PluginBase::__construct

File

src/Plugin/Styleguide/SearchStyleguide.php, line 99

Class

SearchStyleguide
Search Styleguide items implementation.

Namespace

Drupal\styleguide\Plugin\Styleguide

Code

public function __construct(array $configuration, $plugin_id, array $plugin_definition, GeneratorInterface $styleguide_generator, ModuleHandlerInterface $module_handler, FormBuilder $form_builder, AccountInterface $current_user, EntityTypeManagerInterface $entityTypeManager, RendererInterface $renderer, SearchPluginManager $search_manager = NULL) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->generator = $styleguide_generator;
  $this->moduleHandler = $module_handler;
  $this->formBuilder = $form_builder;
  $this->currentUser = $current_user;
  $this->entityTypeManager = $entityTypeManager;
  $this->renderer = $renderer;
  $this->searchManager = $search_manager;
}