You are here

public function MenuTreeResource::__construct in REST Menu Tree 8

Same name and namespace in other branches
  1. 2.x src/Plugin/rest/resource/MenuTreeResource.php \Drupal\rest_menu_tree\Plugin\rest\resource\MenuTreeResource::__construct()

Constructs a Drupal\rest\Plugin\ResourceBase 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.

array $serializer_formats: The available serialization formats.

\Psr\Log\LoggerInterface $logger: A logger instance.

Overrides ResourceBase::__construct

File

src/Plugin/rest/resource/MenuTreeResource.php, line 51

Class

MenuTreeResource
Provides a resource to get view modes by entity and bundle.

Namespace

Drupal\rest_menu_tree\Plugin\rest\resource

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, array $serializer_formats, LoggerInterface $logger, MenuLinkTreeInterface $menu_tree, EntityTypeManagerInterface $entity_type_manager) {
  parent::__construct($configuration, $plugin_id, $plugin_definition, $serializer_formats, $logger);
  $this->menuTree = $menu_tree;
  $this->entityTypeManager = $entity_type_manager;
}