public function ErrorHandlerSubscriber::registerErrorHandler in Devel 8
Same name and namespace in other branches
- 8.3 src/EventSubscriber/ErrorHandlerSubscriber.php \Drupal\devel\EventSubscriber\ErrorHandlerSubscriber::registerErrorHandler()
- 8.2 src/EventSubscriber/ErrorHandlerSubscriber.php \Drupal\devel\EventSubscriber\ErrorHandlerSubscriber::registerErrorHandler()
- 4.x src/EventSubscriber/ErrorHandlerSubscriber.php \Drupal\devel\EventSubscriber\ErrorHandlerSubscriber::registerErrorHandler()
Register devel error handler.
Parameters
\Symfony\Component\EventDispatcher\Event $event: The event to process.
File
- src/
EventSubscriber/ ErrorHandlerSubscriber.php, line 38
Class
- ErrorHandlerSubscriber
- Listener for handling PHP errors.
Namespace
Drupal\devel\EventSubscriberCode
public function registerErrorHandler(Event $event = NULL) {
if ($this->account && $this->account
->hasPermission('access devel information')) {
devel_set_handler(devel_get_handlers());
}
}