function ErrorHandlerSubscriber::getSubscribedEvents

Same name in other branches
  1. 5.x src/EventSubscriber/ErrorHandlerSubscriber.php \Drupal\devel\EventSubscriber\ErrorHandlerSubscriber::getSubscribedEvents()

File

src/EventSubscriber/ErrorHandlerSubscriber.php, line 47

Class

ErrorHandlerSubscriber
Listener for handling PHP errors.

Namespace

Drupal\devel\EventSubscriber

Code

public static function getSubscribedEvents() {
    // Runs as soon as possible in the request but after
    // AuthenticationSubscriber (priority 300) because you need to access to
    // the current user for determine whether register the devel error handler
    // or not.
    $events[KernelEvents::REQUEST][] = [
        'registerErrorHandler',
        256,
    ];
    return $events;
}