You are here

public function DefaultStyleguide::__construct in Style Guide 8

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

Constructs a new defaultStyleguide.

@internal param \Drupal\Core\Breadcrumb\ChainBreadcrumbBuilderInterface $breadcrumb @internal param \Drupal\styleguide\GeneratorInterface $generator

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.

\Symfony\Component\HttpFoundation\RequestStack $request_stack: The request stack.

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

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

\Drupal\Core\Breadcrumb\ChainBreadcrumbBuilderInterface $breadcrumb_manager: The breadcrumb manager.

\Drupal\Core\Routing\CurrentRouteMatch $current_route_match: The current_route_match service.

\Drupal\Core\Block\BlockManager $block_manager: The block plugin manager.

\Drupal\Core\Theme\ThemeManagerInterface $theme_manager: The theme manager service.

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

Overrides PluginBase::__construct

File

src/Plugin/Styleguide/DefaultStyleguide.php, line 125

Class

DefaultStyleguide
Default Styleguide items implementation.

Namespace

Drupal\styleguide\Plugin\Styleguide

Code

public function __construct(array $configuration, $plugin_id, array $plugin_definition, GeneratorInterface $styleguide_generator, RequestStack $request_stack, MenuLinkTreeInterface $link_tree, FormBuilder $form_builder, ChainBreadcrumbBuilderInterface $breadcrumb_manager, CurrentRouteMatch $current_route_match, BlockManager $block_manager, ThemeManagerInterface $theme_manager, ModuleHandlerInterface $module_handler) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->generator = $styleguide_generator;
  $this->requestStack = $request_stack;
  $this->linkTree = $link_tree;
  $this->formBuilder = $form_builder;
  $this->breadcrumbManager = $breadcrumb_manager;
  $this->currentRouteMatch = $current_route_match;
  $this->blockManager = $block_manager;
  $this->themeManager = $theme_manager;
  $this->moduleHandler = $module_handler;
}