public static function EventSubscriber::getSubscribedEvents in Scheduler 8
Same name and namespace in other branches
- 2.x tests/modules/scheduler_api_test/src/EventSubscriber.php \Drupal\scheduler_api_test\EventSubscriber::getSubscribedEvents()
File
- tests/
modules/ scheduler_api_test/ src/ EventSubscriber.php, line 32
Class
- EventSubscriber
- Tests events fired on entity objects.
Namespace
Drupal\scheduler_api_testCode
public static function getSubscribedEvents() {
// The values in the arrays give the function names below.
$events[SchedulerEvents::PRE_PUBLISH][] = [
'apiTestPrePublish',
];
$events[SchedulerEvents::PUBLISH][] = [
'apiTestPublish',
];
$events[SchedulerEvents::PRE_UNPUBLISH][] = [
'apiTestPreUnpublish',
];
$events[SchedulerEvents::UNPUBLISH][] = [
'apiTestUnpublish',
];
$events[SchedulerEvents::PRE_PUBLISH_IMMEDIATELY][] = [
'apiTestPrePublishImmediately',
];
$events[SchedulerEvents::PUBLISH_IMMEDIATELY][] = [
'apiTestPublishImmediately',
];
return $events;
}