public function updateRoute(Route $route)
 {
     if (!$route->getTypeId()) {
         $this->routeManager->update($route);
         $this->entityManager->flush();
     }
 }
 public function updateRoute(Route $route)
 {
     if (!$route->getTypeId()) {
         $content = $route->getContent();
         $route->setTypeId($content->getId());
         $route->setType($this->resolver->getType($content));
         $route->setName(sprintf('dynamic_route_%s', $route->getId()));
         $this->entityManager->flush();
     }
 }