You are here

protected function ExceptionHalJsonSubscriber::getHandledFormats in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/hal/src/EventSubscriber/ExceptionHalJsonSubscriber.php \Drupal\hal\EventSubscriber\ExceptionHalJsonSubscriber::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 ExceptionJsonSubscriber::getHandledFormats

See also

\Symfony\Component\HttpFoundation\Request

File

core/modules/hal/src/EventSubscriber/ExceptionHalJsonSubscriber.php, line 20
Contains \Drupal\hal\EventSubscriber\ExceptionHalJsonSubscriber.

Class

ExceptionHalJsonSubscriber
Handle HAL JSON exceptions the same as JSON exceptions.

Namespace

Drupal\hal\EventSubscriber

Code

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