You are here

public function Routes::__construct in JSON:API 8

Same name and namespace in other branches
  1. 8.2 src/Routing/Routes.php \Drupal\jsonapi\Routing\Routes::__construct()

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.

File

src/Routing/Routes.php, line 78

Class

Routes
Defines dynamic routes.

Namespace

Drupal\jsonapi\Routing

Code

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