ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilSettingsTemplateTableGUI.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4include_once("./Services/Table/classes/class.ilTable2GUI.php");
5
15{
19 protected $ctrl;
20
24 protected $access;
28 protected $dic;
32 protected $rbacsystem;
33
34
38 public function __construct($a_parent_obj, $a_parent_cmd, $a_type)
39 {
40 global $DIC;
41
42 $this->dic = $DIC;
43 $this->ctrl = $this->dic->ctrl();
44 $this->lng = $this->dic->language();
45 $this->access = $this->dic->access();
46 $this->rbacsystem = $this->dic->rbac()->system();
47 $ilCtrl = $this->dic->ctrl();
48 $lng = $this->dic->language();
49 $ilAccess = $this->dic->access();
50 $lng = $this->dic->language();
51
52 $this->setId("admsettemp" . $a_type);
53
54 parent::__construct($a_parent_obj, $a_parent_cmd);
55
56 include_once("./Services/Administration/classes/class.ilSettingsTemplate.php");
58 $this->setTitle($lng->txt("adm_settings_templates") . " - " .
59 $lng->txt("obj_" . $a_type));
60
61 $this->addColumn("", "", "1", true);
62 $this->addColumn($this->lng->txt("title"), "title");
63 $this->addColumn($this->lng->txt("description"));
64 $this->addColumn($this->lng->txt("actions"));
65
66 $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
67 $this->setRowTemplate(
68 "tpl.settings_template_row.html",
69 "Services/Administration"
70 );
71
72 if ($this->rbacsystem->checkAccess('write', $_GET['ref_id'])) {
73 $this->addMultiCommand("confirmSettingsTemplateDeletion", $lng->txt("delete"));
74 //$this->addCommandButton("", $lng->txt(""));
75 }
76 }
77
81 protected function fillRow($a_set)
82 {
84 $ilCtrl = $this->ctrl;
85
86 $ilCtrl->setParameter($this->parent_obj, "templ_id", $a_set["id"]);
87 $this->tpl->setVariable("VAL_ID", $a_set["id"]);
88 // begin-patch lok
89 $this->tpl->setVariable("VAL_TITLE", ilSettingsTemplate::translate($a_set["title"]));
90 $this->tpl->setVariable("VAL_DESCRIPTION", ilSettingsTemplate::translate($a_set["description"]));
91 if ($this->rbacsystem->checkAccess('write', $_GET['ref_id'])) {
92 // end-patch lok
93 $this->tpl->setVariable("TXT_EDIT", $lng->txt("edit"));
94 $this->tpl->setVariable(
95 "HREF_EDIT",
96 $ilCtrl->getLinkTarget($this->parent_obj, "editSettingsTemplate")
97 );
98 }
99 $ilCtrl->setParameter($this->parent_obj, "templ_id", "");
100 }
101}
$_GET["client_id"]
An exception for terminatinating execution or to throw for unit testing.
__construct($a_parent_obj, $a_parent_cmd, $a_type)
Constructor.
static getAllSettingsTemplates($a_type, $a_include_auto_generated=false)
Get all settings templates of type.
static translate($a_title_desc)
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 $DIC
Definition: goto.php:24
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc