You are here

public function MenuPosition::__construct in Menu Condition 8

Creates a MenuPosition instance.

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\Core\Menu\MenuActiveTrailInterface $menu_active_trail: The menu active trail service.

\Drupal\Core\Menu\MenuParentFormSelectorInterface $menu_parent_form_selector: The menu parent form selector service.

\Drupal\Core\Menu\MenuLinkManagerInterface $plugin_manager_menu_link: The plugin manager menu link service.

Overrides ConditionPluginBase::__construct

File

src/Plugin/Condition/MenuPosition.php, line 61

Class

MenuPosition
Provides a 'Menu position' condition.

Namespace

Drupal\menu_condition\Plugin\Condition

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, MenuActiveTrailInterface $menu_active_trail, MenuParentFormSelectorInterface $menu_parent_form_selector, MenuLinkManagerInterface $plugin_manager_menu_link) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->menuActiveTrail = $menu_active_trail;
  $this->menuParentFormSelector = $menu_parent_form_selector;
  $this->pluginManagerMenuLink = $plugin_manager_menu_link;
}