getConnection() ->select('`id`, `parent_id`, `title`, `order`') ->from($table) ->fetchAll()); } /** * Creates new node in the table. * @param String $table table name * @param int $parent_id parent ID of the node * @param String $title title of the node */ public function createNode($table, $parent_id, $title) { $this->getConnection() ->insert($table, array("parent_id" => $parent_id, "title" => $title)) ->execute(); } /** * Renames given node in the table. * @param String $table table name * @param int $id ID of the node * @param String $title new title of the node */ public function renameNode($table, $id, $title) { $this->getConnection() ->update($table, array("title" => $title)) ->whe| ->execute(); } /** * Creates new node in the table. * @param String $table table name * @param array $ids array of ids to delete */ public function removeNodes($table, $ids) { $this->getConnection() ->delete($table) ->where("id in %l", $ids) ->execute(); } } ?>