function HttpExceptionSubscriberBase::getHandledFormats

Same name in other branches
  1. 9 core/lib/Drupal/Core/EventSubscriber/HttpExceptionSubscriberBase.php \Drupal\Core\EventSubscriber\HttpExceptionSubscriberBase::getHandledFormats()
  2. 10 core/lib/Drupal/Core/EventSubscriber/HttpExceptionSubscriberBase.php \Drupal\Core\EventSubscriber\HttpExceptionSubscriberBase::getHandledFormats()
  3. 11.x core/lib/Drupal/Core/EventSubscriber/HttpExceptionSubscriberBase.php \Drupal\Core\EventSubscriber\HttpExceptionSubscriberBase::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.

See also

\Symfony\Component\HttpFoundation\Request

1 call to HttpExceptionSubscriberBase::getHandledFormats()
HttpExceptionSubscriberBase::onException in core/lib/Drupal/Core/EventSubscriber/HttpExceptionSubscriberBase.php
Handles errors for this subscriber.
5 methods override HttpExceptionSubscriberBase::getHandledFormats()
DefaultExceptionHtmlSubscriber::getHandledFormats in core/lib/Drupal/Core/EventSubscriber/DefaultExceptionHtmlSubscriber.php
Specifies the request formats this subscriber will respond to.
DefaultExceptionSubscriber::getHandledFormats in core/modules/serialization/src/EventSubscriber/DefaultExceptionSubscriber.php
Specifies the request formats this subscriber will respond to.
ExceptionJsonSubscriber::getHandledFormats in core/lib/Drupal/Core/EventSubscriber/ExceptionJsonSubscriber.php
Specifies the request formats this subscriber will respond to.
ExceptionTestSiteSubscriber::getHandledFormats in core/lib/Drupal/Core/EventSubscriber/ExceptionTestSiteSubscriber.php
Specifies the request formats this subscriber will respond to.
Fast404ExceptionHtmlSubscriber::getHandledFormats in core/lib/Drupal/Core/EventSubscriber/Fast404ExceptionHtmlSubscriber.php
Specifies the request formats this subscriber will respond to.

File

core/lib/Drupal/Core/EventSubscriber/HttpExceptionSubscriberBase.php, line 67

Class

HttpExceptionSubscriberBase
Utility base class for exception subscribers.

Namespace

Drupal\Core\EventSubscriber

Code

protected abstract function getHandledFormats();

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