public function ServicesMenuResource::__construct in Services Menu 2.x
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.
\Drupal\Core\Menu\MenuLinkTreeInterface $menuTree: The menu tree.
\Drupal\Core\Routing\UrlGeneratorInterface $urlGenerator: The url generator service.
Overrides ResourceBase::__construct
File
- src/
Plugin/ rest/ resource/ ServicesMenuResource.php, line 58
Class
- ServicesMenuResource
- Provides a service resource for menus.
Namespace
Drupal\services_menu\Plugin\rest\resourceCode
public function __construct(array $configuration, $plugin_id, $plugin_definition, array $serializer_formats, LoggerInterface $logger, MenuLinkTreeInterface $menuTree, UrlGeneratorInterface $urlGenerator) {
parent::__construct($configuration, $plugin_id, $plugin_definition, $serializer_formats, $logger);
$this->menuTree = $menuTree;
$this->urlGenerator = $urlGenerator;
}