Exemplo n.º 1
0
 public function update(Route $route)
 {
     $content = $route->getContent();
     $route->setTypeId($content->getId());
     $route->setType($this->routeContentResolver->getType($content));
     $route->setName(sprintf('dynamic_route_%s', $route->getId()));
 }
Exemplo n.º 2
0
 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();
     }
 }