You are here

public static function ConfigSubscriber::getSubscribedEvents in JSON:API Image Styles 2.0.x

Same name and namespace in other branches
  1. 3.0.x src/EventSubscriber/ConfigSubscriber.php \Drupal\jsonapi_image_styles\EventSubscriber\ConfigSubscriber::getSubscribedEvents()

File

src/EventSubscriber/ConfigSubscriber.php, line 18

Class

ConfigSubscriber
Associates config cache tag with all JSON:API responses.

Namespace

Drupal\jsonapi_image_styles\EventSubscriber

Code

public static function getSubscribedEvents() : array {

  // Run before
  // \Drupal\jsonapi\EventSubscriber\ResourceResponseSubscriber::onResponse()
  // (priority 128) so config cache tag can be added.
  $events[KernelEvents::RESPONSE][] = [
    'onResponse',
    129,
  ];
  return $events;
}