You are here

public function OgMenuBlock::__construct in Organic Groups Menu (OG Menu) 8

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

Constructs a new SystemMenuBlock.

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.

Overrides BlockPluginTrait::__construct

File

src/Plugin/Block/OgMenuBlock.php, line 85

Class

OgMenuBlock
Provides a generic Menu block.

Namespace

Drupal\og_menu\Plugin\Block

Code

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