protected function Routes::getEntryPointRoute in JSON:API 8
Same name and namespace in other branches
- 8.2 src/Routing/Routes.php \Drupal\jsonapi\Routing\Routes::getEntryPointRoute()
Provides the entry point route.
Parameters
string $path_prefix: The root path prefix.
Return value
\Symfony\Component\Routing\Route The entry point route.
1 call to Routes::getEntryPointRoute()
- Routes::routes in src/
Routing/ Routes.php
File
- src/
Routing/ Routes.php, line 216
Class
- Routes
- Defines dynamic routes.
Namespace
Drupal\jsonapi\RoutingCode
protected function getEntryPointRoute($path_prefix) {
$entry_point = new Route("/{$path_prefix}");
$entry_point
->addDefaults([
RouteObjectInterface::CONTROLLER_NAME => EntryPoint::class . '::index',
]);
$entry_point
->setRequirement('_permission', 'access jsonapi resource list');
$entry_point
->setMethods([
'GET',
]);
return $entry_point;
}