function FileUploadResource::getBaseRoute

Same name and namespace in other branches
  1. 8.9.x core/modules/file/src/Plugin/rest/resource/FileUploadResource.php \Drupal\file\Plugin\rest\resource\FileUploadResource::getBaseRoute()
  2. 10 core/modules/file/src/Plugin/rest/resource/FileUploadResource.php \Drupal\file\Plugin\rest\resource\FileUploadResource::getBaseRoute()
  3. 11.x 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 576

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,
    ]);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.