You are here

public function Menu::__construct in Menu Entity Index 8

Same name in this branch
  1. 8 src/Plugin/views/filter/Menu.php \Drupal\menu_entity_index\Plugin\views\filter\Menu::__construct()
  2. 8 src/Plugin/views/argument_default/Menu.php \Drupal\menu_entity_index\Plugin\views\argument_default\Menu::__construct()
  3. 8 src/Plugin/views/field/Menu.php \Drupal\menu_entity_index\Plugin\views\field\Menu::__construct()

Constructs a Menu 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.

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

\Drupal\menu_entity_index\TrackerInterface $tracker: The Menu Entity Index Tracker service.

Overrides HandlerBase::__construct

File

src/Plugin/views/filter/Menu.php, line 54

Class

Menu
Filter class which allows filtering by menu name.

Namespace

Drupal\menu_entity_index\Plugin\views\filter

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entity_type_manager, TrackerInterface $tracker) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->tracker = $tracker;
  $this->entityTypeManager = $entity_type_manager;
  $this->trackedOnly = isset($this->configuration['tracked_only']) ? $this->configuration['tracked_only'] : FALSE;
}