/** * @param $data * @param string $action * @param string $template * @return \Symfony\Component\HttpFoundation\Response */ protected function _action($data, $action = 'create', $template = 'standard_layout') { if (($action == 'create' || $action == 'edit') && empty($_POST)) { $template = 'standard_layout_content'; } return parent::_action($data, $action, $template); }
/** * @param mixed $id * @return RedirectResponse|\Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response * @throws AccessDeniedException * @throws NotFoundHttpException */ public function deleteAction($id) { /** @var $action RedirectResponse */ $action = parent::deleteAction($id); if ($this->getRequest()->getMethod() == 'DELETE' && $this->isXmlHttpRequest()) { return $this->renderJson(array('result' => 'ok')); } return $action; }
public function configure() { parent::configure(); $this->jsSettingsJson(array('client' => array('nature_du_client' => $this->getClient()->getNatureDuClient()->getName(), 'pays_code' => $this->getClient()->getPaysPostal()->getCode(), 'country_eu' => ListCountries::getCountryEU()))); }
public function configure() { parent::configure(); $this->jsSettingsJson(array('url' => array('sortable' => $this->admin->generateUrl('sortable', array('filter' => array('client_id' => array('value' => $this->client_id))))), 'drag_text' => $this->admin->trans('Drag to re-order'))); }