You are here

public function GroupMenuBlock::__construct in Group Content Menu 8

Same name in this branch
  1. 8 src/Plugin/Derivative/GroupMenuBlock.php \Drupal\group_content_menu\Plugin\Derivative\GroupMenuBlock::__construct()
  2. 8 src/Plugin/Block/GroupMenuBlock.php \Drupal\group_content_menu\Plugin\Block\GroupMenuBlock::__construct()

GroupMenuBlock constructor.

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\Core\Menu\MenuLinkTreeInterface $menu_tree: The menu tree service.

\Drupal\Core\Menu\MenuActiveTrailInterface $menu_active_trail: The active menu trail service.

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

Overrides BlockPluginTrait::__construct

File

src/Plugin/Block/GroupMenuBlock.php, line 75

Class

GroupMenuBlock
Provides a generic Menu block.

Namespace

Drupal\group_content_menu\Plugin\Block

Code

public function __construct(array $configuration, $plugin_id, array $plugin_definition, MenuLinkTreeInterface $menu_tree, MenuActiveTrailInterface $menu_active_trail, EntityTypeManagerInterface $entity_type_manager) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->menuTree = $menu_tree;
  $this->menuActiveTrail = $menu_active_trail;
  $this->entityTypeManager = $entity_type_manager;
}