function PathRootsSubscriber::onRouteFinished

Same name and namespace in other branches
  1. 8.9.x core/lib/Drupal/Core/EventSubscriber/PathRootsSubscriber.php \Drupal\Core\EventSubscriber\PathRootsSubscriber::onRouteFinished()
  2. 10 core/lib/Drupal/Core/EventSubscriber/PathRootsSubscriber.php \Drupal\Core\EventSubscriber\PathRootsSubscriber::onRouteFinished()
  3. 11.x core/lib/Drupal/Core/EventSubscriber/PathRootsSubscriber.php \Drupal\Core\EventSubscriber\PathRootsSubscriber::onRouteFinished()

File

core/lib/Drupal/Core/EventSubscriber/PathRootsSubscriber.php, line 59

Class

PathRootsSubscriber
Provides all available first bits of all route paths.

Namespace

Drupal\Core\EventSubscriber

Code

public function onRouteFinished() {
    $this->state
        ->set('router.path_roots', array_keys($this->pathRoots));
    $this->pathRoots = [];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.