32 string $a_postvar =
"",
33 bool $a_include_please_select =
true 37 $this->
lng = $DIC->language();
38 $lng = $DIC->language();
42 $this->include_please_select = $a_include_please_select;
45 $a_title =
$lng->
txt(
"tax_taxonomy");
48 if ($a_postvar ==
"") {
49 $a_postvar =
"tax_node_assign";
55 if ((
int) $a_taxonomy_id == 0) {
68 $this->taxononmy_id = $a_val;
98 if ($this->include_please_select) {
104 $nodes = $tax_tree->getSubTree($tax_tree->getNodeData($tax_tree->readRootId()));
105 foreach ($nodes as $n) {
106 if ($n[
"type"] ==
"taxn") {
107 $options[$n[
"child"]] = str_repeat(
" ", ($n[
"depth"] - 2) * 2) . $n[
"title"];
119 string $a_component_id,
126 $body = $this->request->getParsedBody();
131 } elseif (!is_array(
$post)) {
138 $current_ass = $tax_node_ass->getAssignmentsOfItem($a_item_id);
140 foreach ($current_ass as $ca) {
141 if (!in_array($ca[
"node_id"],
$post)) {
142 $tax_node_ass->deleteAssignment((
int) $ca[
"node_id"], $a_item_id);
144 $exising[] = (
int) $ca[
"node_id"];
148 foreach (
$post as $p) {
149 if (!in_array((
int) $p, $exising)) {
150 $tax_node_ass->addAssignment((
int) $p, $a_item_id);
160 string $a_component_id,
166 $ass = $tax_node_ass->getAssignmentsOfItem($a_item_id);
169 foreach ($ass as
$a) {
170 $nodes[] = $a[
"node_id"];
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
loadLanguageModule(string $a_module)
Load language module.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $dic, ilPlugin $plugin)
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...