ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilTaxonomyListTableGUI.php
Go to the documentation of this file.
1<?php
2
24{
26 protected int $requested_tax_id;
27 protected int $assigned_object_id;
28
32 public function __construct($a_parent_obj, $a_parent_cmd, int $a_assigned_object_id, $a_info = null)
33 {
34 global $DIC;
35
36 $this->ctrl = $DIC->ctrl();
37 $this->lng = $DIC->language();
38 $this->access = $DIC->access();
39 $ilCtrl = $DIC->ctrl();
40 $lng = $DIC->language();
41
42 parent::__construct($a_parent_obj, $a_parent_cmd);
43 $this->assigned_object_id = $a_assigned_object_id;
44
45 $this->setData(ilObjTaxonomy::getUsageOfObject($this->assigned_object_id, true));
46 $this->setTitle($lng->txt("obj_taxf"));
47 $this->setDescription($a_info);
48
49 $this->addColumn($this->lng->txt("title"), "title");
50 $this->addColumn($this->lng->txt("description"));
51 $this->addColumn($this->lng->txt("actions"));
52
53 $this->setDefaultOrderField("title");
54 $this->setDefaultOrderDirection("asc");
55
56 $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
57 $this->setRowTemplate("tpl.taxonomy_list_row.html", "components/ILIAS/Taxonomy");
58
59 // @todo introduce request wrapper
60 $params = $DIC->http()->request()->getQueryParams();
61 $this->requested_tax_id = (int) ($params["tax_id"] ?? null);
62 }
63
67 protected function fillRow(array $a_set): void
68 {
70 $ilCtrl = $this->ctrl;
71
72 $ilCtrl->setParameter($this->parent_obj, "tax_id", $a_set["tax_id"]);
73
74 $this->tpl->setCurrentBlock("cmd");
75 $this->tpl->setVariable("HREF_CMD", $ilCtrl->getLinkTarget($this->parent_obj, "listNodes"));
76 $this->tpl->setVariable("CMD", $lng->txt("edit"));
77 $this->tpl->parseCurrentBlock();
78 $this->tpl->setCurrentBlock("cmd");
79 $this->tpl->setVariable("HREF_CMD", $ilCtrl->getLinkTarget($this->parent_obj, "confirmDeleteTaxonomy"));
80 $this->tpl->setVariable("CMD", $lng->txt("delete"));
81
82 $this->tpl->parseCurrentBlock();
83 $ilCtrl->setParameter($this->parent_obj, "tax_id", $this->requested_tax_id);
84
85 $this->tpl->setVariable("TITLE", $a_set["title"]);
86 $this->tpl->setVariable("DESCRIPTION", ilObject::_lookupDescription($a_set["tax_id"]));
87 }
88}
setParameter(object $a_gui_obj, string $a_parameter, $a_value)
@inheritDoc
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...
static getUsageOfObject(int $a_obj_id, bool $a_include_titles=false)
static _lookupDescription(int $obj_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
setDescription(string $a_val)
setFormAction(string $a_form_action, bool $a_multipart=false)
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
setDefaultOrderField(string $a_defaultorderfield)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setDefaultOrderDirection(string $a_defaultorderdirection)
setData(array $a_data)
Set table data.
ilLanguage $lng
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
fillRow(array $a_set)
@inheritDoc
__construct($a_parent_obj, $a_parent_cmd, int $a_assigned_object_id, $a_info=null)
Constructor.
Interface ilAccessHandler This interface combines all available interfaces which can be called via gl...
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
Definition: ltiregstart.php:31
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26