Drupal 8  8.0.2
ResourceInterface Interface Reference
Inheritance diagram for ResourceInterface:

Public Member Functions

 routes ()
 
 permissions ()
 
 availableMethods ()
 
- Public Member Functions inherited from PluginInspectionInterface
 getPluginId ()
 
 getPluginDefinition ()
 

Detailed Description

Specifies the publicly available methods of a resource plugin.

See Also
Plugin API

Member Function Documentation

availableMethods ( )

Returns the available HTTP request methods on this plugin.

Returns
array The list of supported methods. Example: array('GET', 'POST', 'PATCH').

Implemented in ResourceBase.

permissions ( )

Provides an array of permissions suitable for .permissions.yml files.

A resource plugin can define a set of user permissions that are used on the routes for this resource or for other purposes.

Returns
array The permission array.

Implemented in ResourceBase.

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.

Returns
A collection of routes that should be registered for this resource.

Implemented in ResourceBase.


The documentation for this interface was generated from the following file: