protected static function Routes::getRouteName in JSON:API 8
Same name and namespace in other branches
- 8.2 src/Routing/Routes.php \Drupal\jsonapi\Routing\Routes::getRouteName()
Get a unique route name for the JSON API resource type and route type.
Parameters
\Drupal\jsonapi\ResourceType\ResourceType $resource_type: The resource type for which the route collection should be created.
string $route_type: The route type. E.g. 'individual' or 'collection'.
Return value
string The generated route name.
2 calls to Routes::getRouteName()
- Routes::getIndividualRoutesForResourceType in src/
Routing/ Routes.php - A collection route for the given resource type.
- Routes::getRoutesForResourceType in src/
Routing/ Routes.php - Gets applicable resource routes for a JSON API resource type.
File
- src/
Routing/ Routes.php, line 255
Class
- Routes
- Defines dynamic routes.
Namespace
Drupal\jsonapi\RoutingCode
protected static function getRouteName(ResourceType $resource_type, $route_type) {
return sprintf('jsonapi.%s.%s', $resource_type
->getTypeName(), $route_type);
}