protected RestResourceConfig::getFormatsForMethodGranularity($method)
Retrieves a list of supported response formats.
Parameters
string $method: The request method e.g GET or POST.
Return value
string[] A list of supported format IDs.
File
- core/modules/rest/src/Entity/RestResourceConfig.php, line 192
Class
- RestResourceConfig
- Defines a RestResourceConfig configuration entity class.
Namespace
Drupal\rest\Entity
Code
1 2 3 4 5 6 7 | protected function getFormatsForMethodGranularity( $method ) { $method = $this ->normalizeRestMethod( $method ); if (in_array( $method , $this ->getMethods()) && isset( $this ->configuration[ $method ][ 'supported_formats' ])) { return $this ->configuration[ $method ][ 'supported_formats' ]; } return []; } |
Please login to continue.