function ExceptionJsonSubscriber::getHandledFormats

Same name and namespace in other branches
  1. 8.9.x core/lib/Drupal/Core/EventSubscriber/ExceptionJsonSubscriber.php \Drupal\Core\EventSubscriber\ExceptionJsonSubscriber::getHandledFormats()
  2. 10 core/lib/Drupal/Core/EventSubscriber/ExceptionJsonSubscriber.php \Drupal\Core\EventSubscriber\ExceptionJsonSubscriber::getHandledFormats()
  3. 11.x core/lib/Drupal/Core/EventSubscriber/ExceptionJsonSubscriber.php \Drupal\Core\EventSubscriber\ExceptionJsonSubscriber::getHandledFormats()

Overrides HttpExceptionSubscriberBase::getHandledFormats

File

core/lib/Drupal/Core/EventSubscriber/ExceptionJsonSubscriber.php, line 18

Class

ExceptionJsonSubscriber
Default handling for JSON errors.

Namespace

Drupal\Core\EventSubscriber

Code

protected function getHandledFormats() {
    return [
        'json',
        'drupal_modal',
        'drupal_dialog',
        'drupal_ajax',
    ];
}

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