示例#1
0
 private function generateWithLocale(GeneratorInterface $generator, $routeable, $locale)
 {
     if ($generator instanceof LocaleGenerator) {
         return $generator->generate($routeable, $locale);
     }
     return $generator->generate($routeable);
 }
示例#2
0
 protected function updateRoute(GeneratorInterface $generator, Routeable $routeable)
 {
     $staticPrefix = $generator->generate($routeable);
     $route = $routeable->getRoute();
     if ($route instanceof Route) {
         $route->setStaticPrefix($staticPrefix);
     } else {
         $this->routeManager->createRoute($routeable, $staticPrefix);
     }
     $this->em->flush();
     $this->routeManager->update($route);
     $this->em->flush();
 }