public static function ResourceResponseSubscriber::getSubscribedEvents in JSON:API 8
Same name and namespace in other branches
- 8.2 src/EventSubscriber/ResourceResponseSubscriber.php \Drupal\jsonapi\EventSubscriber\ResourceResponseSubscriber::getSubscribedEvents()
See also
\Drupal\rest\EventSubscriber\ResourceResponseSubscriber::getSubscribedEvents()
\Drupal\dynamic_page_cache\EventSubscriber\DynamicPageCacheSubscriber
File
- src/
EventSubscriber/ ResourceResponseSubscriber.php, line 60
Class
- ResourceResponseSubscriber
- Response subscriber that serializes and removes ResourceResponses' data.
Namespace
Drupal\jsonapi\EventSubscriberCode
public static function getSubscribedEvents() {
// Run before the dynamic page cache subscriber (priority 100), so that
// Dynamic Page Cache can cache flattened responses.
$events[KernelEvents::RESPONSE][] = [
'onResponse',
128,
];
return $events;
}