ResourceInterface
interface ResourceInterface implements PluginInspectionInterface (View source)
Specifies the publicly available methods of a resource plugin.
Methods
Gets the definition of the plugin implementation.
Returns a collection of routes with URL path information for the resource.
Provides an array of permissions suitable for .permissions.yml files.
Returns the available HTTP request methods on this plugin.
Details
string
getPluginId()
Gets the plugin_id of the plugin instance.
array
getPluginDefinition()
Gets the definition of the plugin implementation.
RouteCollection
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.
array
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.
It is not required for a resource plugin to specify permissions: if they have their own access control mechanism, they can use that, and return the empty array.
array
availableMethods()
Returns the available HTTP request methods on this plugin.