예제 #1
0
 /**
  * {@inheritdoc}
  */
 public function collect(Request $request, Response $response, \Exception $exception = NULL)
 {
     $this->data['routing'] = [];
     foreach ($this->routeProvider->getAllRoutes() as $route_name => $route) {
         // @TODO Find a better visual representation.
         $this->data['routing'][] = ['name' => $route_name, 'path' => $route->getPath()];
     }
 }
예제 #2
0
 protected function getAllRoutes(DrupalStyle $io)
 {
     $routes = $this->routeProvider->getAllRoutes();
     $tableHeader = [$this->trans('commands.router.debug.messages.name'), $this->trans('commands.router.debug.messages.path')];
     $tableRows = [];
     foreach ($routes as $route_name => $route) {
         $tableRows[] = [$route_name, $route->getPath()];
     }
     $io->table($tableHeader, $tableRows, 'compact');
 }