You are here

public function MenuDevelGenerate::__construct in Devel 4.x

Same name and namespace in other branches
  1. 8.3 devel_generate/src/Plugin/DevelGenerate/MenuDevelGenerate.php \Drupal\devel_generate\Plugin\DevelGenerate\MenuDevelGenerate::__construct()
  2. 8 devel_generate/src/Plugin/DevelGenerate/MenuDevelGenerate.php \Drupal\devel_generate\Plugin\DevelGenerate\MenuDevelGenerate::__construct()
  3. 8.2 devel_generate/src/Plugin/DevelGenerate/MenuDevelGenerate.php \Drupal\devel_generate\Plugin\DevelGenerate\MenuDevelGenerate::__construct()

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

\Drupal\Core\Entity\EntityStorageInterface $menu_storage: The menu storage.

\Drupal\Core\Entity\EntityStorageInterface $menu_link_storage: The menu storage.

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.

\Drupal\Core\Database\Connection $database: Database connection.

Overrides PluginBase::__construct

File

devel_generate/src/Plugin/DevelGenerate/MenuDevelGenerate.php, line 91

Class

MenuDevelGenerate
Provides a MenuDevelGenerate plugin.

Namespace

Drupal\devel_generate\Plugin\DevelGenerate

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, MenuLinkTreeInterface $menu_tree, EntityStorageInterface $menu_storage, EntityStorageInterface $menu_link_storage, ModuleHandlerInterface $module_handler, Connection $database) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->menuLinkTree = $menu_tree;
  $this->menuStorage = $menu_storage;
  $this->menuLinkContentStorage = $menu_link_storage;
  $this->moduleHandler = $module_handler;
  $this->database = $database;
}