public function moveBlock() { $id = intval($_POST['id']); $index = intval($_POST['index']); if ($id > 0) { $dao = new Dev_DAO_Tree(); $this->putAjax($dao->moveBlock($id, $index)); } }
public function delete($id) { $tree = new DAO_Tree(); $elem = new Entity_Tree(); $elem->init($tree->getOne($id)); $elem_id = $elem->getTypeId(); $q1 = $this->deleteFromTable($elem_id); $dao = new Dev_DAO_Tree(); $q2 = $dao->deleteTree($elem); return $q1 && $q2; }