function RestResourceConfig::getMethodsForMethodGranularity

Same name and namespace in other branches
  1. 9 core/modules/rest/src/Entity/RestResourceConfig.php \Drupal\rest\Entity\RestResourceConfig::getMethodsForMethodGranularity()
  2. 8.9.x core/modules/rest/src/Entity/RestResourceConfig.php \Drupal\rest\Entity\RestResourceConfig::getMethodsForMethodGranularity()
  3. 10 core/modules/rest/src/Entity/RestResourceConfig.php \Drupal\rest\Entity\RestResourceConfig::getMethodsForMethodGranularity()

Retrieves a list of supported HTTP methods for this resource.

Return value

string[] A list of supported HTTP methods.

1 call to RestResourceConfig::getMethodsForMethodGranularity()
RestResourceConfig::getMethods in core/modules/rest/src/Entity/RestResourceConfig.php
Retrieves a list of supported HTTP methods.

File

core/modules/rest/src/Entity/RestResourceConfig.php, line 131

Class

RestResourceConfig
Defines a RestResourceConfig configuration entity class.

Namespace

Drupal\rest\Entity

Code

protected function getMethodsForMethodGranularity() {
    $methods = array_keys($this->configuration);
    return array_map([
        $this,
        'normalizeRestMethod',
    ], $methods);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.