/** * The method that is executed when the user performs a 'edit' action on an entity. * * @return RedirectResponse|Response */ protected function editAction() { $adminResponse = parent::editAction(); if ($adminResponse instanceof RedirectResponse) { $url = $this->generateUrl($this->getAdminRouteName(), $this->getUrlParameters('list')); $adminResponse->setTargetUrl($url); } return $adminResponse; }