function ResourceResponseSubscriber::getSubscribedEvents

File

core/modules/rest/src/EventSubscriber/ResourceResponseSubscriber.php, line 202

Class

ResourceResponseSubscriber
Response subscriber that serializes and removes ResourceResponses' data.

Namespace

Drupal\rest\EventSubscriber

Code

public static function getSubscribedEvents() {
  // Run before \Drupal\dynamic_page_cache\EventSubscriber\DynamicPageCacheSubscriber
  // (priority 100), so that Dynamic Page Cache can cache flattened responses.
  $events[KernelEvents::RESPONSE][] = [
    'onResponse',
    128,
  ];
  return $events;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.