function ResourceInterface::routes

Same name in other branches
  1. 9 core/modules/rest/src/Plugin/ResourceInterface.php \Drupal\rest\Plugin\ResourceInterface::routes()
  2. 10 core/modules/rest/src/Plugin/ResourceInterface.php \Drupal\rest\Plugin\ResourceInterface::routes()
  3. 11.x 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();

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