protected function getBaseRoute($canonical_path,
$method) { return new Route($canonical_path,
[ '_controller' => 'Drupal\rest\RequestHandler::handle',
],
$this->
getBaseRouteRequirements($method),
[],
'',
[],
// The HTTP method is a requirement for this route.
[$method] );
} /**
* Gets the base route requirements for a particular method.
*
* @param $method
* The HTTP method to be used for the route.
*
* @return array
* An array of requirements for parameters.
*/