You are here

public function ResourceRoutes::__construct in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/rest/src/Routing/ResourceRoutes.php \Drupal\rest\Routing\ResourceRoutes::__construct()

Constructs a RouteSubscriber object.

Parameters

\Drupal\rest\Plugin\Type\ResourcePluginManager $manager: The resource plugin manager.

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

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

File

core/modules/rest/src/Routing/ResourceRoutes.php, line 50

Class

ResourceRoutes
Subscriber for REST-style routes.

Namespace

Drupal\rest\Routing

Code

public function __construct(ResourcePluginManager $manager, EntityTypeManagerInterface $entity_type_manager, LoggerInterface $logger) {
  $this->manager = $manager;
  $this->resourceConfigStorage = $entity_type_manager
    ->getStorage('rest_resource_config');
  $this->logger = $logger;
}