mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 09:02:12 +00:00
Handle view in redirections
This commit is contained in:
parent
fb0cb28363
commit
1dd10d0ac6
1 changed files with 3 additions and 3 deletions
|
|
@ -197,7 +197,7 @@ abstract class ResourceController extends Controller implements ResourceControll
|
||||||
$redirect = $this->getRequest()->attributes->get('_sylius.redirect');
|
$redirect = $this->getRequest()->attributes->get('_sylius.redirect');
|
||||||
$route = $redirect ? $redirect : $this->getResourceRoute();
|
$route = $redirect ? $redirect : $this->getResourceRoute();
|
||||||
|
|
||||||
return RouteRedirectView::create($route, array('id' => $resource->getId()));
|
return $this->handleView(RouteRedirectView::create($route, array('id' => $resource->getId())));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -210,7 +210,7 @@ abstract class ResourceController extends Controller implements ResourceControll
|
||||||
$redirect = $this->getRequest()->attributes->get('_sylius.redirect');
|
$redirect = $this->getRequest()->attributes->get('_sylius.redirect');
|
||||||
$route = $redirect ? $redirect : $this->getResourceCollectionRoute();
|
$route = $redirect ? $redirect : $this->getResourceCollectionRoute();
|
||||||
|
|
||||||
return RouteRedirectView::create($route);
|
return $this->handleView(RouteRedirectView::create($route));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getResourceRoute()
|
protected function getResourceRoute()
|
||||||
|
|
@ -230,7 +230,7 @@ abstract class ResourceController extends Controller implements ResourceControll
|
||||||
*/
|
*/
|
||||||
protected function getManager()
|
protected function getManager()
|
||||||
{
|
{
|
||||||
return $this->container->get($this->getServiceName('manager'));
|
return $this->get($this->getServiceName('manager'));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getServiceName($name)
|
protected function getServiceName($name)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue