protected function DefaultExceptionSubscriber::getHandledFormats in Drupal 10
Same name in this branch
- 10 core/modules/jsonapi/src/EventSubscriber/DefaultExceptionSubscriber.php \Drupal\jsonapi\EventSubscriber\DefaultExceptionSubscriber::getHandledFormats()
- 10 core/modules/serialization/src/EventSubscriber/DefaultExceptionSubscriber.php \Drupal\serialization\EventSubscriber\DefaultExceptionSubscriber::getHandledFormats()
Same name and namespace in other branches
- 8 core/modules/jsonapi/src/EventSubscriber/DefaultExceptionSubscriber.php \Drupal\jsonapi\EventSubscriber\DefaultExceptionSubscriber::getHandledFormats()
- 9 core/modules/jsonapi/src/EventSubscriber/DefaultExceptionSubscriber.php \Drupal\jsonapi\EventSubscriber\DefaultExceptionSubscriber::getHandledFormats()
Specifies the request formats this subscriber will respond to.
Return value
array An indexed array of the format machine names that this subscriber will attempt to process, such as "html" or "json". Returning an empty array will apply to all formats.
Overrides DefaultExceptionSubscriber::getHandledFormats
See also
\Symfony\Component\HttpFoundation\Request
File
- core/
modules/ jsonapi/ src/ EventSubscriber/ DefaultExceptionSubscriber.php, line 37
Class
- DefaultExceptionSubscriber
- Serializes exceptions in compliance with the JSON:API specification.
Namespace
Drupal\jsonapi\EventSubscriberCode
protected function getHandledFormats() {
return [
'api_json',
];
}