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()))); }
/** * @param $object * @param null $id * @param string $template * @return \Symfony\Component\HttpFoundation\Response */ protected function _action($object, $id = null, $template = 'standard_layout_client') { $client = null; if ($id) { $client = $this->getDoctrine()->getManager()->getRepository('ApplicationSonataClientBundle:Client')->find($id); } $this->jsSettingsJson(array('country_eu' => ListCountries::getCountryEU(), 'niveau_dobligation' => $this->admin->getNiveauDobligationIdListHelp())); return $this->render('ApplicationSonataClientBundle::' . $template . '.html.twig', array('client_id' => $id, 'current_client' => $client, 'active_tab' => 'client', 'content' => $object->getContent(), 'js_settings_json' => $this->_jsSettingsJson)); }