ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilRepDependenciesTableGUI.php
Go to the documentation of this file.
1<?php
2
23{
25
29 public function __construct(array $a_deps)
30 {
32 global $DIC;
33
34 $this->ctrl = $DIC->ctrl();
35 $this->lng = $DIC->language();
36 $this->access = $DIC->access();
37 $lng = $DIC->language();
38
39 parent::__construct(null, "");
41
42 $this->setTitle($lng->txt("rep_dependencies"));
43 $this->setLimit(9999);
44
45 $this->addColumn($this->lng->txt("rep_object_to_delete"));
46 $this->addColumn($this->lng->txt("rep_dependent_object"));
47 $this->addColumn($this->lng->txt("rep_dependency"));
48
49 $this->setEnableHeader(true);
50 //$this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
51 $this->setRowTemplate(
52 "tpl.rep_dep_row.html",
53 "components/ILIAS/Repository/Trash"
54 );
55 $this->disable("footer");
56 $this->setEnableTitle(true);
57
58 $deps = [];
59 foreach ($a_deps as $id => $d) {
60 foreach ($d as $id2 => $ms) {
61 foreach ($ms as $m) {
62 $deps[] = ["dep_obj" => $id2, "del_obj" => $id, "message" => $m];
63 }
64 }
65 }
66 $this->setData($deps);
67 }
68
72 protected function fillRow(array $a_set): void
73 {
75 $this->tpl->setVariable(
76 "TXT_DEP_OBJ",
77 $lng->txt("obj_" . ilObject::_lookupType($a_set["dep_obj"])) . ": " . ilObject::_lookupTitle($a_set["dep_obj"])
78 );
79 $this->tpl->setVariable(
80 "TXT_DEL_OBJ",
81 $lng->txt("obj_" . ilObject::_lookupType($a_set["del_obj"])) . ": " . ilObject::_lookupTitle($a_set["del_obj"])
82 );
83 $this->tpl->setVariable("TXT_MESS", $a_set["message"]);
84 }
85}
loadLanguageModule(string $a_module)
Load language module.
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 _lookupType(int $id, bool $reference=false)
static _lookupTitle(int $obj_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
fillRow(array $a_set)
Fill table row.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(?object $a_parent_obj, string $a_parent_cmd="", string $a_template_context="")
setLimit(int $a_limit=0, int $a_default_limit=0)
set max.
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
setEnableTitle(bool $a_enabletitle)
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)
setEnableHeader(bool $a_enableheader)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setData(array $a_data)
Set table data.
ilLanguage $lng
disable(string $a_module_name)
Interface ilAccessHandler This interface combines all available interfaces which can be called via gl...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26