ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
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, "");
40  $lng->loadLanguageModule("rep");
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  "Services/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  {
74  $lng = $this->lng;
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 }
setData(array $a_data)
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...
setEnableTitle(bool $a_enabletitle)
loadLanguageModule(string $a_module)
Load language module.
ilLanguage $lng
global $DIC
Definition: feed.php:28
static _lookupTitle(int $obj_id)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
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.
__construct(Container $dic, ilPlugin $plugin)
setLimit(int $a_limit=0, int $a_default_limit=0)
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)
disable(string $a_module_name)
__construct(?object $a_parent_obj, string $a_parent_cmd="", string $a_template_context="")
static _lookupType(int $id, bool $reference=false)
setEnableHeader(bool $a_enableheader)
for($i=6; $i< 13; $i++) for($i=1; $i< 13; $i++) $d
Definition: date.php:296