public function indexAction() { parent::indexAction(); $this->viewmodel = new ViewModel(); $this->layout()->iponumber = ""; if ($this->zfcUserAuthentication()->hasIdentity()) { $iponumber = $this->zfcUserAuthentication()->getIdentity()->getOrganisation()->getIpoNumber(); if ($iponumber != null && strlen($iponumber) > 0) { $this->layout()->iponumber = "(" . $iponumber . ")"; } } // initialisation de la session si utilisateur connecté $session = new Container('zone'); if ($session->zoneshortname == null) { if ($this->zfcUserAuthentication()->hasIdentity()) { $session->zoneshortname = $this->zfcUserAuthentication()->getIdentity()->getOrganisation()->getShortname(); } } //session de la vue courante : day and 24/6 $viewSession = $session->view; if ($viewSession !== null) { $this->viewmodel->setVariable('view', $viewSession); } $daySession = $session->day; if ($daySession !== null) { $this->viewmodel->setVariable('day', $daySession); } $config = $this->getServiceLocator()->get('config'); $this->layout()->lang = $config['lang']; }
public function indexAction() { parent::indexAction(); $this->layout()->iponumber = ""; if ($this->zfcUserAuthentication()->hasIdentity()) { $iponumber = $this->zfcUserAuthentication()->getIdentity()->getOrganisation()->getIpoNumber(); if ($iponumber != null && strlen($iponumber) > 0) { $this->layout()->iponumber = "(" . $iponumber . ")"; } } // initialisation de la session si utilisateur connecté $session = new Container('zone'); if ($session->zoneshortname == null) { if ($this->zfcUserAuthentication()->hasIdentity()) { $session->zoneshortname = $this->zfcUserAuthentication()->getIdentity()->getOrganisation()->getShortname(); } } $config = $this->getServiceLocator()->get('config'); $this->layout()->lang = $config['lang']; }