You are here

public function ResourceDecoratorBase::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.

Overrides ResourceInterface::getControllers

File

src/Plugin/resource/Decorators/ResourceDecoratorBase.php, line 163
Contains \Drupal\restful\Plugin\resource\Decorators\ResourceDecoratorBase.

Class

ResourceDecoratorBase
Class ResourceDecoratorBase.

Namespace

Drupal\restful\Plugin\resource\Decorators

Code

public function getControllers() {
  return $this->subject
    ->getControllers();
}