/** * {@inheritdoc} */ public function redirectTo($object) { if ($this->get('request')->get('btn_update_and_list')) { return $this->redirect($this->generateUrl('admin_sonata_clientoperations_v01tva_list', array('filter[client_id][value]' => $object->getId()))); } return parent::redirectTo($object); }
/** * @param object $object * @return \Symfony\Component\HttpFoundation\Response */ public function redirectTo($object) { if ($this->get('request')->get('btn_create_and_edit')) { $this->get('request')->query->set('btn_update_and_list', $this->get('request')->get('btn_create_and_edit')); } return parent::redirectTo($object); }
/** * {@inheritdoc} */ public function redirectTo($object) { if ($this->get('request')->get('btn_create_and_edit')) { $url = $this->admin->generateUrl('list'); return new RedirectResponse($url); } return parent::redirectTo($object); }
public function redirectTo($object) { $response = parent::redirectTo($object); if ($this->get('request')->get('save_and_print_note')) { $this->getRequest()->getSession()->set('post_save_action', 'print-note'); } if ($this->get('request')->get('save_and_print_invoice')) { $this->getRequest()->getSession()->set('post_save_action', 'print-invoice'); } if ($this->get('request')->get('btn_update_and_list') || $this->get('request')->get('btn_create_and_list') || $this->get('request')->get('btn_create_and_create')) { $this->getRequest()->getSession()->set('post_save_action', ''); } return $response; }