5 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
6 include_once(
"./Services/Taxonomy/exceptions/class.ilTaxonomyException.php");
24 function __construct($a_taxonomy_id, $a_multi =
true, $a_title =
"", $a_postvar =
"",
25 $a_include_please_select =
true)
29 $lng->loadLanguageModule(
"tax");
31 $this->include_please_select = $a_include_please_select;
35 $a_title = $lng->txt(
"tax_taxonomy");
40 $a_postvar =
"tax_node_assign";
46 if ((
int) $a_taxonomy_id == 0)
48 throw new ilTaxonomyExceptions(
"No taxonomy ID passed to ilTaxAssignInputGUI.");
61 $this->taxononmy_id = $a_val;
71 return $this->taxononmy_id;
81 throw new ilTaxonomyExceptions(
"setOptions: Not supported for ilTaxAssignInputGUI.");
93 if ($this->include_please_select)
95 $options = array(
"" => $lng->txt(
"please_select"));
98 include_once(
"./Services/Taxonomy/classes/class.ilTaxonomyTree.php");
101 $nodes = $tax_tree->getSubtree($tax_tree->getNodeData($tax_tree->readRootId()));
102 foreach ($nodes as
$n)
104 if ($n[
"type"] ==
"taxn")
106 $options[$n[
"child"]] = str_repeat(
" ", ($n[
"depth"] - 2) * 2).$n[
"title"];
119 function saveInput($a_component_id, $a_item_type, $a_item_id)
121 include_once(
"./Services/Taxonomy/classes/class.ilTaxNodeAssignment.php");
123 $tax_node_ass->deleteAssignmentsOfItem($a_item_id);
129 foreach ($post as $p)
148 include_once(
"./Services/Taxonomy/classes/class.ilTaxNodeAssignment.php");
150 $ass = $tax_node_ass->getAssignmentsOfItem($a_item_id);
155 $nodes[] = $a[
"node_id"];