Пример #1
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);
 }
Пример #2
0
 public function addAction()
 {
     $itemAdapter = new Application_Model_Item();
     $id = $itemAdapter->addOne('Example list item');
     $this->view->id = $id;
 }