You are here

public function RestMenuItemsResource::__construct in Rest menu items 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/rest/resource/RestMenuItemsResource.php \Drupal\rest_menu_items\Plugin\rest\resource\RestMenuItemsResource::__construct()
  2. 3.0.x src/Plugin/rest/resource/RestMenuItemsResource.php \Drupal\rest_menu_items\Plugin\rest\resource\RestMenuItemsResource::__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/RestMenuItemsResource.php, line 91
Create the menu item REST resource.

Class

RestMenuItemsResource
Provides a resource to get bundles by entity.

Namespace

Drupal\rest_menu_items\Plugin\rest\resource

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, array $serializer_formats, LoggerInterface $logger, EntityManagerInterface $entity_manager, AccountProxyInterface $current_user, AliasManagerInterface $alias_manager) {
  parent::__construct($configuration, $plugin_id, $plugin_definition, $serializer_formats, $logger);
  $this->entityManager = $entity_manager;
  $this->currentUser = $current_user;
  $this->aliasManager = $alias_manager;
}