Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Routes.php

function 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 core/modules/jsonapi/src/Routing/Routes.php

File

core/modules/jsonapi/src/Routing/Routes.php, line 366

Class

Routes
Defines dynamic routes.

Namespace

Drupal\jsonapi\Routing

Code

protected function getEntryPointRoute($path_prefix) {
    $entry_point = new Route("/{$path_prefix}");
    $entry_point->addDefaults([
        RouteObjectInterface::CONTROLLER_NAME => EntryPoint::class . '::index',
    ]);
    $entry_point->setRequirement('_access', 'TRUE');
    $entry_point->setMethods([
        'GET',
    ]);
    return $entry_point;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal