private function generateWithLocale(GeneratorInterface $generator, $routeable, $locale) { if ($generator instanceof LocaleGenerator) { return $generator->generate($routeable, $locale); } return $generator->generate($routeable); }
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(); }