Adds a dynamic test route.
\Drupal\Core\Routing\RouteBuildEvent $event: The route building event.
public function dynamicRoutes(RouteBuildEvent $event) {
$collection = $event
->getRouteCollection();
$route = new Route('/router_test/test5', array(
'_content' => '\\Drupal\\router_test\\TestControllers::test5',
), array(
'_access' => 'TRUE',
));
$collection
->add('router_test_5', $route);
}