You are here

public static function UsageEventSubscriber::getSubscribedEvents in Bynder 4.0.x

Same name and namespace in other branches
  1. 8.3 modules/bynder_usage/src/EventSubscriber/UsageEventSubscriber.php \Drupal\bynder_usage\EventSubscriber\UsageEventSubscriber::getSubscribedEvents()
  2. 8.2 modules/bynder_usage/src/EventSubscriber/UsageEventSubscriber.php \Drupal\bynder_usage\EventSubscriber\UsageEventSubscriber::getSubscribedEvents()

File

modules/bynder_usage/src/EventSubscriber/UsageEventSubscriber.php, line 66

Class

UsageEventSubscriber
Listens for the usage events from Entity Usage module.

Namespace

Drupal\bynder_usage\EventSubscriber

Code

public static function getSubscribedEvents() {
  $events[Events::USAGE_REGISTER][] = [
    'onUsageRegister',
  ];
  $events[Events::DELETE_BY_SOURCE_ENTITY][] = [
    'onDeleteBySourceEntity',
  ];
  $events[Events::DELETE_BY_TARGET_ENTITY][] = [
    'onDeleteByTargetEntity',
  ];
  return $events;
}