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/serialization/src/EventSubscriber/DefaultExceptionSubscriber.php \Drupal\serialization\EventSubscriber\DefaultExceptionSubscriber::getHandledFormats()
- 9 core/modules/serialization/src/EventSubscriber/DefaultExceptionSubscriber.php \Drupal\serialization\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 HttpExceptionSubscriberBase::getHandledFormats
See also
\Symfony\Component\HttpFoundation\Request
1 method overrides DefaultExceptionSubscriber::getHandledFormats()
- DefaultExceptionSubscriber::getHandledFormats in core/
modules/ jsonapi/ src/ EventSubscriber/ DefaultExceptionSubscriber.php - Specifies the request formats this subscriber will respond to.
File
- core/
modules/ serialization/ src/ EventSubscriber/ DefaultExceptionSubscriber.php, line 47
Class
- DefaultExceptionSubscriber
- Handles default error responses in serialization formats.
Namespace
Drupal\serialization\EventSubscriberCode
protected function getHandledFormats() {
return $this->serializerFormats;
}