Esempio n. 1
0
 public function save(Default_Model_ResourceGroup $resource)
 {
     $data = array('name' => $resource->getName(), 'order' => $resource->getOrder(), 'iconClass' => $resource->getIconClass(), 'deleted' => '0');
     if (null === ($id = $resource->getId())) {
         $this->getDbTable()->insert($data);
         $id = $this->getDbTable()->lastInsertId();
     } else {
         $this->getDbTable()->update($data, array('id = ?' => $id));
     }
     return $id;
 }