You are here

public static function ConfigSubscriber::getSubscribedEvents in JSON:API Extras 8.3

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

File

src/EventSubscriber/ConfigSubscriber.php, line 98

Class

ConfigSubscriber
Associates config cache tag and rebuilds container + routes when necessary.

Namespace

Drupal\jsonapi_extras\EventSubscriber

Code

public static function getSubscribedEvents() {
  $events[ConfigEvents::SAVE][] = [
    'onSave',
  ];

  // Run before
  // \Drupal\jsonapi\EventSubscriber\ResourceResponseSubscriber::onResponse()
  // (priority 128), so we can add JSON:API's config cache tag.
  $events[KernelEvents::RESPONSE][] = [
    'onResponse',
    150,
  ];
  return $events;
}