/** * update record * * @param App_Tag_Dm $dm * @return multitype:|Ambigous <boolean, number, rowCount> */ public function update($id, App_SysTag_Tree_Dm $dm) { if (true !== ($r = $dm->beforeUpdate())) { return $r; } return $this->loadDao()->update($id, $dm->getData()); }
public function createNewTypeAction() { $type = $this->getInput("type", "post"); $json = json_encode($this->getInput("data", "post")); $dm = new App_SysTag_Tree_Dm(); $dm->setJson($json)->setDescription("base version")->setType($type); $r = $this->_getSysTagTreeDs()->add($dm); print_r($r); die; }