You are here

protected function ExceptionCdfJsonSubscriber::getHandledFormats in Acquia Content Hub 8

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

src/EventSubscriber/ExceptionCdfJsonSubscriber.php, line 15

Class

ExceptionCdfJsonSubscriber
Handle Content Hub CDF JSON exceptions the same as JSON exceptions.

Namespace

Drupal\acquia_contenthub\EventSubscriber

Code

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