You are here

public function ResourceInterface::routes in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/rest/src/Plugin/ResourceInterface.php \Drupal\rest\Plugin\ResourceInterface::routes()

Returns a collection of routes with URL path information for the resource.

This method determines where a resource is reachable, what path replacements are used, the required HTTP method for the operation etc.

Return value

\Symfony\Component\Routing\RouteCollection A collection of routes that should be registered for this resource.

1 method overrides ResourceInterface::routes()
ResourceBase::routes in core/modules/rest/src/Plugin/ResourceBase.php
Returns a collection of routes with URL path information for the resource.

File

core/modules/rest/src/Plugin/ResourceInterface.php, line 28

Class

ResourceInterface
Specifies the publicly available methods of a resource plugin.

Namespace

Drupal\rest\Plugin

Code

public function routes();