You are here

public function TestArticles__1_3::controllersInfo in RESTful 7.2

Gets the controllers.

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 the name of the public method to execute as the value. If an access callback is needed one can be provided by turning the value into an array with the keys: 'callback' and 'access callback'.

Overrides Resource::controllersInfo

See also

getControllers()

File

tests/modules/restful_test/src/Plugin/resource/node/test_article/v1/TestArticles__1_3.php, line 40
Contains \Drupal\restful_test\Plugin\resource\node\test_article\v1\TestArticles__1_3.

Class

TestArticles__1_3
Class TestArticles @package Drupal\restful\Plugin\resource

Namespace

Drupal\restful_test\Plugin\resource\node\test_article\v1

Code

public function controllersInfo() {
  $info = parent::controllersInfo();
  $info['^.*$'][RequestInterface::METHOD_GET] = array(
    'callback' => 'view',
    'access callback' => 'accessViewEntityFalse',
  );
  $info['^.*$'][RequestInterface::METHOD_HEAD] = array(
    'callback' => 'view',
    'access callback' => 'accessViewEntityTrue',
  );
  return $info;
}