function RenderArrayNonHtmlSubscriber::getSubscribedEvents
Same name in other branches
- 9 core/lib/Drupal/Core/EventSubscriber/RenderArrayNonHtmlSubscriber.php \Drupal\Core\EventSubscriber\RenderArrayNonHtmlSubscriber::getSubscribedEvents()
- 8.9.x core/lib/Drupal/Core/EventSubscriber/RenderArrayNonHtmlSubscriber.php \Drupal\Core\EventSubscriber\RenderArrayNonHtmlSubscriber::getSubscribedEvents()
- 11.x core/lib/Drupal/Core/EventSubscriber/RenderArrayNonHtmlSubscriber.php \Drupal\Core\EventSubscriber\RenderArrayNonHtmlSubscriber::getSubscribedEvents()
File
-
core/
lib/ Drupal/ Core/ EventSubscriber/ RenderArrayNonHtmlSubscriber.php, line 37
Class
- RenderArrayNonHtmlSubscriber
- Throws 406 if requesting non-HTML format and controller returns render array.
Namespace
Drupal\Core\EventSubscriberCode
public static function getSubscribedEvents() : array {
$events[KernelEvents::VIEW][] = [
'onRespond',
-10,
];
return $events;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.