Exemplo n.º 1
0
 public function updateCategory(PwEmotionCategoryDm $dm)
 {
     $resource = $dm->beforeUpdate();
     if ($resource instanceof PwError) {
         return $resource;
     }
     return $this->_getDao()->updateCategory($dm->categoryId, $dm->getData());
 }
Exemplo n.º 2
0
 public function doaddAction()
 {
     Wind::import('SRV:emotion.dm.PwEmotionCategoryDm');
     $dm = new PwEmotionCategoryDm();
     $dm->setCategoryMame($this->getInput('catname', 'post'))->setEmotionFolder($this->getInput('folder', 'post'))->setEmotionApps(array('bbs'))->setOrderId((int) $this->getInput('orderid', 'post'));
     $resource = $this->_getEmotionCategoryDs()->addCategory($dm);
     if ($resource instanceof PwError) {
         $this->showError($resource->getError());
     }
     $this->showMessage("MEDAL:success");
 }