function SessionTestSubscriber::getSubscribedEvents
Same name in other branches
- 9 core/modules/system/tests/modules/session_test/src/EventSubscriber/SessionTestSubscriber.php \Drupal\session_test\EventSubscriber\SessionTestSubscriber::getSubscribedEvents()
- 8.9.x core/modules/system/tests/modules/session_test/src/EventSubscriber/SessionTestSubscriber.php \Drupal\session_test\EventSubscriber\SessionTestSubscriber::getSubscribedEvents()
- 10 core/modules/system/tests/modules/session_test/src/EventSubscriber/SessionTestSubscriber.php \Drupal\session_test\EventSubscriber\SessionTestSubscriber::getSubscribedEvents()
Registers the methods in this class that should be listeners.
Return value
array An array of event listener definitions.
File
-
core/
modules/ system/ tests/ modules/ session_test/ src/ EventSubscriber/ SessionTestSubscriber.php, line 53
Class
- SessionTestSubscriber
- Defines a test session subscriber that checks whether the session is empty.
Namespace
Drupal\session_test\EventSubscriberCode
public static function getSubscribedEvents() : array {
$events[KernelEvents::RESPONSE][] = [
'onKernelResponseSessionTest',
];
$events[KernelEvents::REQUEST][] = [
'onKernelRequestSessionTest',
];
return $events;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.