function DefaultExceptionSubscriber::getHandledFormats

Same name in this branch
  1. 11.x core/modules/serialization/src/EventSubscriber/DefaultExceptionSubscriber.php \Drupal\serialization\EventSubscriber\DefaultExceptionSubscriber::getHandledFormats()
Same name in other branches
  1. 9 core/modules/jsonapi/src/EventSubscriber/DefaultExceptionSubscriber.php \Drupal\jsonapi\EventSubscriber\DefaultExceptionSubscriber::getHandledFormats()
  2. 9 core/modules/serialization/src/EventSubscriber/DefaultExceptionSubscriber.php \Drupal\serialization\EventSubscriber\DefaultExceptionSubscriber::getHandledFormats()
  3. 8.9.x core/modules/jsonapi/src/EventSubscriber/DefaultExceptionSubscriber.php \Drupal\jsonapi\EventSubscriber\DefaultExceptionSubscriber::getHandledFormats()
  4. 8.9.x core/modules/serialization/src/EventSubscriber/DefaultExceptionSubscriber.php \Drupal\serialization\EventSubscriber\DefaultExceptionSubscriber::getHandledFormats()
  5. 10 core/modules/jsonapi/src/EventSubscriber/DefaultExceptionSubscriber.php \Drupal\jsonapi\EventSubscriber\DefaultExceptionSubscriber::getHandledFormats()
  6. 10 core/modules/serialization/src/EventSubscriber/DefaultExceptionSubscriber.php \Drupal\serialization\EventSubscriber\DefaultExceptionSubscriber::getHandledFormats()

Overrides DefaultExceptionSubscriber::getHandledFormats

File

core/modules/jsonapi/src/EventSubscriber/DefaultExceptionSubscriber.php, line 37

Class

DefaultExceptionSubscriber
Serializes exceptions in compliance with the JSON:API specification.

Namespace

Drupal\jsonapi\EventSubscriber

Code

protected function getHandledFormats() {
    return [
        'api_json',
    ];
}

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