protected function TraceableEventDispatcher::preDispatch in Devel 8.3
Same name and namespace in other branches
- 8 webprofiler/src/EventDispatcher/TraceableEventDispatcher.php \Drupal\webprofiler\EventDispatcher\TraceableEventDispatcher::preDispatch()
- 8.2 webprofiler/src/EventDispatcher/TraceableEventDispatcher.php \Drupal\webprofiler\EventDispatcher\TraceableEventDispatcher::preDispatch()
- 4.x webprofiler/src/EventDispatcher/TraceableEventDispatcher.php \Drupal\webprofiler\EventDispatcher\TraceableEventDispatcher::preDispatch()
Called before dispatching the event.
Parameters
string $eventName: The event name.
\Symfony\Component\EventDispatcher\Event $event: The event.
1 call to TraceableEventDispatcher::preDispatch()
- TraceableEventDispatcher::dispatch in webprofiler/
src/ EventDispatcher/ TraceableEventDispatcher.php - Dispatches an event to all registered listeners.
File
- webprofiler/
src/ EventDispatcher/ TraceableEventDispatcher.php, line 125
Class
- TraceableEventDispatcher
- Class TraceableEventDispatcher.
Namespace
Drupal\webprofiler\EventDispatcherCode
protected function preDispatch($eventName, Event $event) {
switch ($eventName) {
case KernelEvents::VIEW:
case KernelEvents::RESPONSE:
// Stop only if a controller has been executed.
if ($this->stopwatch
->isStarted('controller')) {
$this->stopwatch
->stop('controller');
}
break;
}
}