コード例 #1
0
 /**
  * Constructor
  *
  * @param
  * @return
  */
 function __construct($a_parent_obj, $a_parent_cmd, $a_tax_id, $a_target_gui, $a_target_cmd, $a_id = "")
 {
     include_once "./Services/Taxonomy/classes/class.ilTaxonomyTree.php";
     $this->tax_tree = new ilTaxonomyTree($a_tax_id);
     if ($a_id != "") {
         $this->id = $a_id;
     } else {
         $this->id = "tax_expl_" . $this->tax_tree->getTreeId();
     }
     include_once "./Services/Taxonomy/classes/class.ilObjTaxonomy.php";
     if (ilObjTaxonomy::lookupSortingMode($a_tax_id) == ilObjTaxonomy::SORT_ALPHABETICAL) {
         $this->setOrderField("title");
     } else {
         $this->setOrderField("order_nr", true);
     }
     $this->setPreloadChilds(true);
     $this->target_gui = $a_target_gui;
     $this->target_cmd = $a_target_cmd;
     //$this->setOrderField("title");
     parent::__construct($this->id, $a_parent_obj, $a_parent_cmd, $this->tax_tree);
 }
コード例 #2
0
 /**
  * Constructor
  * @access	public
  * @param	string	scriptname
  * @param    int user_id
  */
 function __construct($a_target, $a_tax_tree, $a_gui_class = "ilobjtaxonomygui", $a_gui_cmd = "listItems")
 {
     global $lng;
     parent::__construct($a_target);
     include_once "./Services/Taxonomy/classes/class.ilObjTaxonomy.php";
     $sort_mode = ilObjTaxonomy::lookupSortingMode($a_tax_tree->getTreeId());
     $this->setPostSort(false);
     if ($sort_mode == ilObjTaxonomy::SORT_MANUAL) {
         $this->setPostSort(true);
     }
     //$this->setFilterMode(IL_FM_POSITIVE);
     //$this->addFilter("tax");
     $this->gui_class = $a_gui_class;
     $this->gui_cmd = $a_gui_cmd;
     $this->tree = $a_tax_tree;
     $this->root_id = $this->tree->readRootId();
     $this->setSessionExpandVariable("txexpand");
     $this->checkPermissions(false);
     //		$this->setOrderColumn("order_nr");
     //		$this->textwidth = 200;
     $this->force_open_path = array();
     $this->setRootNodeTitle($lng->txt("tax_taxonomy"));
 }