ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilHelpModuleTableGUI.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2012 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5include_once("./Services/Table/classes/class.ilTable2GUI.php");
6
16{
20 protected $ctrl;
21
25 protected $access;
26
30 protected $settings;
31
36
40 public function __construct($a_parent_obj, $a_parent_cmd, $a_has_write_permission = false)
41 {
42 global $DIC;
43
44 $this->ctrl = $DIC->ctrl();
45 $this->lng = $DIC->language();
46 $this->access = $DIC->access();
47 $this->settings = $DIC->settings();
48 $ilCtrl = $DIC->ctrl();
49 $lng = $DIC->language();
50 $ilAccess = $DIC->access();
51 $lng = $DIC->language();
52 $this->has_write_permission = $a_has_write_permission;
53
54 $this->setId("help_mods");
55
56 parent::__construct($a_parent_obj, $a_parent_cmd);
57 $this->getHelpModules();
58 $this->setTitle($lng->txt("help_modules"));
59
60 $this->addColumn("", "", "1");
61 $this->addColumn($this->lng->txt("title"));
62 $this->addColumn($this->lng->txt("help_imported_on"));
63 $this->addColumn($this->lng->txt("actions"));
64
65 $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
66 $this->setRowTemplate("tpl.help_module_row.html", "Services/Help");
67
68 if ($this->has_write_permission) {
69 $this->addMultiCommand("confirmHelpModulesDeletion", $lng->txt("delete"));
70 }
71 //$this->addCommandButton("", $lng->txt(""));
72 }
73
77 public function getHelpModules()
78 {
79 $this->setData($this->parent_obj->object->getHelpModules());
80 }
81
85 protected function fillRow($a_set)
86 {
90
91 $ilCtrl->setParameter($this->parent_obj, "hm_id", $a_set["id"]);
92 if ($this->has_write_permission) {
93 if ($a_set["id"] == $ilSetting->get("help_module")) {
94 $this->tpl->setCurrentBlock("cmd");
95 $this->tpl->setVariable(
96 "HREF_CMD",
97 $ilCtrl->getLinkTarget($this->parent_obj, "deactivateModule")
98 );
99 $this->tpl->setVariable("TXT_CMD", $lng->txt("deactivate"));
100 $this->tpl->parseCurrentBlock();
101 } else {
102 $this->tpl->setCurrentBlock("cmd");
103 $this->tpl->setVariable(
104 "HREF_CMD",
105 $ilCtrl->getLinkTarget($this->parent_obj, "activateModule")
106 );
107 $this->tpl->setVariable("TXT_CMD", $lng->txt("activate"));
108 $this->tpl->parseCurrentBlock();
109 }
110 }
111 $ilCtrl->setParameter($this->parent_obj, "hm_id", "");
112 $this->tpl->setVariable("TITLE", $a_set["title"]);
113 $this->tpl->setVariable(
114 "CREATION_DATE",
116 );
117 $this->tpl->setVariable("ID", $a_set["id"]);
118 }
119}
An exception for terminatinating execution or to throw for unit testing.
const IL_CAL_DATETIME
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date @access public.
@classDescription Date and time handling
TableGUI class for help modules.
fillRow($a_set)
Fill table row.
__construct($a_parent_obj, $a_parent_cmd, $a_has_write_permission=false)
Constructor.
Class ilTable2GUI.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
setData($a_data)
set table data @access public
setRowTemplate($a_template, $a_template_dir="")
Set row template.
addMultiCommand($a_cmd, $a_text)
Add Command button.
addColumn( $a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.
setId($a_val)
Set id.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
global $ilCtrl
Definition: ilias.php:18
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $ilSetting
Definition: privfeed.php:17
settings()
Definition: settings.php:2
$DIC
Definition: xapitoken.php:46