You are here

protected function FileUploadResource::getBaseRoute in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/file/src/Plugin/rest/resource/FileUploadResource.php \Drupal\file\Plugin\rest\resource\FileUploadResource::getBaseRoute()

Gets the base route for a particular method.

Parameters

string $canonical_path: The canonical path for the resource.

string $method: The HTTP method to be used for the route.

Return value

\Symfony\Component\Routing\Route The created base route.

Overrides ResourceBase::getBaseRoute

File

core/modules/file/src/Plugin/rest/resource/FileUploadResource.php, line 555

Class

FileUploadResource
File upload resource.

Namespace

Drupal\file\Plugin\rest\resource

Code

protected function getBaseRoute($canonical_path, $method) {
  return new Route($canonical_path, [
    '_controller' => RequestHandler::class . '::handleRaw',
  ], $this
    ->getBaseRouteRequirements($method), [], '', [], [
    $method,
  ]);
}