protected function TraceableEventDispatcher::preDispatch in Devel 4.x
Same name and namespace in other branches
- 8.3 webprofiler/src/EventDispatcher/TraceableEventDispatcher.php \Drupal\webprofiler\EventDispatcher\TraceableEventDispatcher::preDispatch()
- 8 webprofiler/src/EventDispatcher/TraceableEventDispatcher.php \Drupal\webprofiler\EventDispatcher\TraceableEventDispatcher::preDispatch()
- 8.2 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
File
- webprofiler/
src/ EventDispatcher/ TraceableEventDispatcher.php, line 128
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;
}
}