You are here

public function ResourceInterface::getControllers in RESTful 7.2

Gets the controllers for this resource.

@code{ array( '^.*$' => array(RequestInterface::METHOD_GET => array( 'callback' => 'view', 'access callback' => array($this, 'viewAccess'), )), ); }

@todo: Populate the entity controllers so that they have the entity access checks in here.

Return value

array An structured configuration array. Contains the regular expression for the path as the key and an array of key values as its value. That array of key values contains the HTTP method as the key and an array with the callback information as the value.

The callback can be anything that ResourceManager::executeCallback accepts or a string indicating a public method in the resource plugin class.

2 methods override ResourceInterface::getControllers()
Resource::getControllers in src/Plugin/resource/Resource.php
Gets the controllers for this resource.
ResourceDecoratorBase::getControllers in src/Plugin/resource/Decorators/ResourceDecoratorBase.php
Gets the controllers for this resource.

File

src/Plugin/resource/ResourceInterface.php, line 201
Contains \Drupal\restful\Plugin\resource\ResourceInterface.

Class

ResourceInterface
Interface ResourceInterface.

Namespace

Drupal\restful\Plugin\resource

Code

public function getControllers();