function HttpExceptionSubscriberBase::getHandledFormats

Same name in other branches
  1. 9 core/lib/Drupal/Core/EventSubscriber/HttpExceptionSubscriberBase.php \Drupal\Core\EventSubscriber\HttpExceptionSubscriberBase::getHandledFormats()
  2. 8.9.x 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()
CsrfExceptionSubscriber::getHandledFormats in core/lib/Drupal/Core/EventSubscriber/CsrfExceptionSubscriber.php
DefaultExceptionHtmlSubscriber::getHandledFormats in core/lib/Drupal/Core/EventSubscriber/DefaultExceptionHtmlSubscriber.php
DefaultExceptionSubscriber::getHandledFormats in core/modules/serialization/src/EventSubscriber/DefaultExceptionSubscriber.php
ExceptionJsonSubscriber::getHandledFormats in core/lib/Drupal/Core/EventSubscriber/ExceptionJsonSubscriber.php
Fast404ExceptionHtmlSubscriber::getHandledFormats in core/lib/Drupal/Core/EventSubscriber/Fast404ExceptionHtmlSubscriber.php

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.