protected function ResourceBase::requestMethods

Provides predefined HTTP request methods.

Plugins can override this method to provide additional custom request methods.

Return value

array The list of allowed HTTP request method strings.

2 calls to ResourceBase::requestMethods()
ResourceBase::permissions in drupal/core/modules/rest/lib/Drupal/rest/Plugin/ResourceBase.php
Provides an array of permissions suitable for hook_permission().
ResourceBase::routes in drupal/core/modules/rest/lib/Drupal/rest/Plugin/ResourceBase.php
Returns a collection of routes with URL path information for the resource.

File

drupal/core/modules/rest/lib/Drupal/rest/Plugin/ResourceBase.php, line 93
Definition of Drupal\rest\Plugin\ResourceBase.

Class

ResourceBase
Common base class for resource plugins.

Namespace

Drupal\rest\Plugin

Code

protected function requestMethods() {
  return drupal_map_assoc(array(
    'HEAD',
    'GET',
    'POST',
    'PUT',
    'DELETE',
    'TRACE',
    'OPTIONS',
    'CONNECT',
    'PATCH',
  ));
}