view->headScript()->appendFile('/themes/default/scripts/dashboard.js', 'text/javascript'); $idClient = 0; // On veut tous les clients $ws = new WsScores(); $reponse = $ws->getListeClients($idClient); $listeClients = $reponse->result->item; $reponse = $ws->getListeDroits(); $wsdroits = $reponse->item; $this->view->assign('ListeClients', $listeClients); $this->view->assign('wsdroits', $wsdroits); } /** * Edition ou création d'un nouveau client */ public function clientAction() { $request = $this->getRequest(); $idClient = $request->getParam('idClient', 0); $titre = 'CREATION NOUVEAU CLIENT'; $submitValue = 'Créer le client'; if ($idClient!=0){ $ws = new WsScores(); $reponse = $ws->getListeClients($idClient); $InfosClient = $reponse->result->item; $titre = 'EDITION CLIENT'; $submitValue = 'Modifier le client'; } $reponse = $ws->getListeDroits(); $wsdroits = $reponse->item; $this->view->assign('idClient', $idClient); $this->view->assign('InfosClient', $InfosClient); $this->view->assign('titre', $titre); $this->view->assign('submitValue', $submitValue); $this->view->assign('wsdroits', $wsdroits); } /** * Enregistre les informations sur le client */ public function clientsaveAction() { } }