/** * constructor * * do not use directly, call TreeAbstract::GetInstance("StudipDocumentTree") * @access private */ function StudipDocumentTree($args) { DbView::addView('core'); $this->range_id = $args['range_id']; $this->entity_type = $args['entity_type'] ?: get_object_type($this->range_id); if ($args['get_root_name']) { list($name,) = array_values(get_object_name($this->range_id, $this->entity_type)); } $this->root_name = $name; $this->must_have_perm = $this->entity_type == 'sem' ? 'tutor' : 'autor'; $modules = new Modules(); $this->permissions_activated = $modules->getStatus('documents_folder_permissions', $this->range_id, $this->entity_type); parent::TreeAbstract(); //calling the baseclass constructor $this->tree_data['root']['permission'] = $this->default_perm; }
/** * constructor * * do not use directly, call TreeAbstract::GetInstance("StudipLitList", $range_id) * @access private */ function StudipLitList($range_id) { DbView::addView('literatur'); if ($GLOBALS['LIT_LIST_FORMAT_TEMPLATE']){ $this->format_default = $GLOBALS['LIT_LIST_FORMAT_TEMPLATE']; } $this->range_id = $range_id; $this->range_type = get_object_type($range_id); if ($this->range_type == "user"){ $this->root_name = get_fullname($range_id); } else { $object_name = get_object_name($range_id, $this->range_type); $this->root_name = $object_name['type'] . ": " . $object_name['name']; } $this->cat_element = new StudipLitCatElement(); parent::TreeAbstract(); //calling the baseclass constructor }