You are here

public function ResourceRoutes::__construct in JSON:API Resources 8

Instantiates a Routes object.

Parameters

\Drupal\jsonapi\ResourceType\ResourceTypeRepositoryInterface $resource_type_repository: The JSON:API resource type repository.

string[] $authentication_providers: The authentication providers, keyed by ID.

string $jsonapi_base_path: The JSON:API base path.

\Symfony\Component\DependencyInjection\ContainerInterface $container: A container instance.

File

src/Unstable/Routing/ResourceRoutes.php, line 61

Class

ResourceRoutes
Route subscriber to decorate JSON:API Resource routes.

Namespace

Drupal\jsonapi_resources\Unstable\Routing

Code

public function __construct(ResourceTypeRepositoryInterface $resource_type_repository, array $authentication_providers, $jsonapi_base_path, ContainerInterface $container) {
  $this->resourceTypeRepository = $resource_type_repository;
  $this->providerIds = array_keys($authentication_providers);
  $this->jsonApiBasePath = $jsonapi_base_path;
  $this->container = $container;
}