You are here

public function Menu::__construct in Context 8

Same name and namespace in other branches
  1. 8.4 src/Plugin/ContextReaction/Menu.php \Drupal\context\Plugin\ContextReaction\Menu::__construct()

Constructs a \Drupal\Component\Plugin\PluginBase object.

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.

Overrides ContextReactionPluginBase::__construct

File

src/Plugin/ContextReaction/Menu.php, line 30

Class

Menu
Provides a content reaction that adds a css 'active' class to menu item.

Namespace

Drupal\context\Plugin\ContextReaction

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, MenuParentFormSelectorInterface $menu_parent_form_selector) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->menuParentFormSelector = $menu_parent_form_selector;
}