You are here

public function RouterRebuildSubscriber::onKernelTerminate in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/EventSubscriber/RouterRebuildSubscriber.php \Drupal\Core\EventSubscriber\RouterRebuildSubscriber::onKernelTerminate()

Rebuilds routers if necessary.

Parameters

\Symfony\Component\HttpKernel\Event\PostResponseEvent $event: The event object.

File

core/lib/Drupal/Core/EventSubscriber/RouterRebuildSubscriber.php, line 41
Contains \Drupal\Core\EventSubscriber\RouterRebuildSubscriber.

Class

RouterRebuildSubscriber
Rebuilds the router if needed at the end of the request.

Namespace

Drupal\Core\EventSubscriber

Code

public function onKernelTerminate(PostResponseEvent $event) {
  $this->routeBuilder
    ->rebuildIfNeeded();
}