/** * initializes the tree * * stores all rows from table range_tree in array $tree_data * @access public */ function init(){ parent::init(); $this->view->params[0] = $this->range_id; $rs = $this->view->get_query("view:LIT_GET_LIST_BY_RANGE"); while ($rs->next_record()){ $list_ids[] = $rs->f("list_id"); $this->tree_data[$rs->f("list_id")] = array("user_id" => $rs->f("user_id"), "format" => ($rs->f("format")) ? $rs->f("format") : $this->format_default, "chdate" => $rs->f("chdate"), "fullname" => $rs->f("fullname"), "username" => $rs->f("username"), "visibility" => $rs->f("visibility"), ); $this->storeItem($rs->f("list_id"), "root", $rs->f("name"), $rs->f("priority")); } if (is_array($list_ids)){ $this->view->params[0] = $list_ids; $rs = $this->view->get_query("view:LIT_GET_LIST_CONTENT"); while ($rs->next_record()){ $this->tree_data[$rs->f("list_element_id")] = array("user_id" => $rs->f("user_id"), "note" => $rs->f("note"), "chdate" => $rs->f("chdate"), "catalog_id" => $rs->f("catalog_id"), "username" => $rs->f("username"), "fullname" => $rs->f("fullname") ); $this->storeItem($rs->f("list_element_id"), $rs->f("list_id"), $rs->f("short_name"), $rs->f("priority")); } } }
/** * initializes the tree * * stores all folders in array $tree_data * @access public */ function init() { parent::init(); $p = 0; $top_folders['allgemein'] = array($this->range_id,'FOLDER_GET_DATA_BY_RANGE'); $top_folders['top'] = array(md5($this->range_id . 'top_folder'),'FOLDER_GET_DATA_BY_RANGE'); if ($this->entity_type == 'sem') { $top_folders['termin'] = array($this->range_id,'FOLDER_GET_DATA_BY_THEMA'); $top_folders['gruppe'] = array($this->range_id,'FOLDER_GET_DATA_BY_GRUPPE'); } foreach ($top_folders as $type => $folder){ $this->view->params[0] = $folder[0]; $db = $this->view->get_query("view:" . $folder[1]); while ($db->next_record()){ $this->storeItem($db->f('range_id'), 'root' , 'virtual' , $p++); $this->tree_data[$db->f("range_id")]["permission"] = $this->default_perm; $this->tree_data[$db->f("folder_id")]["entries"] = 0; $this->tree_data[$db->f("folder_id")]["permission"] = $db->f('permission'); $this->storeItem($db->f("folder_id"), $db->f('range_id'), $db->f('name'), $p++); if($type == 'gruppe') $this->group_folders[$db->f("folder_id")] = array(); $this->initSubfolders($db->f("folder_id")); } } if (is_array($this->tree_childs['root'])){ $this->tree_childs['root'] = array_unique($this->tree_childs['root']); } }
/** * initializes the tree * store rows from evaluation tables in array $tree_data * @access public */ function init() { /* create the evaluation -------------------> */ $this->eval = new Evaluation($this->evalID, NULL, $this->load_mode); $this->root_name = $this->eval->getTitle(); $this->root_content = $this->eval->getText(); /* create the tree structure ---------------> */ parent::init(); foreach ($this->eval->getChildren() as $group) { $this->recursiveInit($group); $this->tree_data[$group->getObjectID()]["text"] = $group->getText(); $this->tree_data[$group->getObjectID()]["object"] = $group; $this->storeItem($group->getObjectID(), "root", $group->getTitle(), $group->getPosition()); } /* <---------------------------------------- */ }