Ejemplo n.º 1
0
 function getlibellesbyidcategorieAction()
 {
     $oMapper = new Application_Model_Mapper_RefItems();
     $oSelect = new Zend_Form_Element_Select(Form_AjoutProduit::LIBELLE);
     $oSelect->setMultiOptions($oMapper->getLibelleByIdCategorie($this->_getParam('idCategorie')))->setDecorators(array('ViewHelper'));
     $this->view->element = $oSelect->render();
 }
Ejemplo n.º 2
0
 public function formSave(array $aResults = array())
 {
     $oMapper = new Application_Model_Mapper_RefItems();
     $oLibelle = new Application_Model_Item();
     $oLibelle->setDescription($aResults[Form_AjoutItem::DESCRIPTION]);
     $oLibelle->setLibelle($aResults[Form_AjoutItem::LIBELLE]);
     $oLibelle->setIdCategorie($aResults[Form_AjoutItem::CATEGORIE]);
     if ($aResults[Form_AjoutItem::MESURE]) {
         $oLibelle->setIdMesure($aResults[Form_AjoutItem::MESURE]);
     }
     $oMapper->save($oLibelle);
 }