ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilTaxSelectInputGUI.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5include_once("./Services/UIComponent/Explorer2/classes/class.ilExplorerSelectInputGUI.php");
6include_once("./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
7
18{
25 function __construct($a_taxonomy_id, $a_postvar, $a_multi = false)
26 {
27 global $lng, $ilCtrl;
28
29 $lng->loadLanguageModule("tax");
30 $this->multi_nodes = $a_multi;
31 include_once("./Services/Taxonomy/classes/class.ilTaxonomyExplorerGUI.php");
32 $ilCtrl->setParameterByClass("ilformpropertydispatchgui", "postvar", $a_postvar);
33 $this->explorer_gui = new ilTaxonomyExplorerGUI(array("ilformpropertydispatchgui", "iltaxselectinputgui"), $this->getExplHandleCmd(), $a_taxonomy_id, "", "",
34 "tax_expl_".$a_postvar);
35 $this->explorer_gui->setSelectMode($a_postvar."_sel", $this->multi_nodes);
36 $this->explorer_gui->setSkipRootNode(true);
37
38 parent::__construct(ilObject::_lookupTitle($a_taxonomy_id), $a_postvar, $this->explorer_gui, $this->multi_nodes);
39 $this->setType("tax_select");
40
41 if ((int) $a_taxonomy_id == 0)
42 {
43 throw new ilTaxonomyExceptions("No taxonomy ID passed to ilTaxSelectInputGUI.");
44 }
45
46 $this->setTaxonomyId((int) $a_taxonomy_id);
47 $this->tax = new ilObjTaxonomy($this->getTaxonomyId());
48 }
49
55 function setTaxonomyId($a_val)
56 {
57 $this->taxononmy_id = $a_val;
58 }
59
65 function getTaxonomyId()
66 {
67 return $this->taxononmy_id;
68 }
69
76 function getTitleForNodeId($a_id)
77 {
78 include_once("./Services/Taxonomy/classes/class.ilTaxonomyNode.php");
79 return ilTaxonomyNode::_lookupTitle($a_id);
80 }
81}
Select explorer tree nodes input GUI.
getExplHandleCmd()
Get explorer handle command function.
setType($a_type)
Set Type.
static _lookupTitle($a_id)
lookup object title
Select taxonomy nodes input GUI.
getTitleForNodeId($a_id)
Get title for node id (needs to be overwritten, if explorer is not a tree eplorer.
__construct($a_taxonomy_id, $a_postvar, $a_multi=false)
Constructor.
setTaxonomyId($a_val)
Set taxonomy id.
Taxonomy explorer GUI class.
static _lookupTitle($a_obj_id)
Lookup Title.
global $ilCtrl
Definition: ilias.php:18
global $lng
Definition: privfeed.php:40