function RestResourceConfigInterface::getFormats
Same name in other branches
- 8.9.x core/modules/rest/src/RestResourceConfigInterface.php \Drupal\rest\RestResourceConfigInterface::getFormats()
- 10 core/modules/rest/src/RestResourceConfigInterface.php \Drupal\rest\RestResourceConfigInterface::getFormats()
- 11.x core/modules/rest/src/RestResourceConfigInterface.php \Drupal\rest\RestResourceConfigInterface::getFormats()
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.
1 method overrides RestResourceConfigInterface::getFormats()
- RestResourceConfig::getFormats in core/
modules/ rest/ src/ Entity/ RestResourceConfig.php - Retrieves a list of supported response formats.
File
-
core/
modules/ rest/ src/ RestResourceConfigInterface.php, line 59
Class
- RestResourceConfigInterface
- Defines a configuration entity to store enabled REST resources.
Namespace
Drupal\restCode
public function getFormats($method);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.