ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 
4 include_once("./Services/Table/classes/class.ilTable2GUI.php");
5 
15 {
19  protected $ctrl;
20 
24  protected $access;
25 
26 
30  public function __construct($a_parent_obj, $a_parent_cmd, $a_type)
31  {
32  global $DIC;
33 
34  $this->ctrl = $DIC->ctrl();
35  $this->lng = $DIC->language();
36  $this->access = $DIC->access();
37  $ilCtrl = $DIC->ctrl();
38  $lng = $DIC->language();
39  $ilAccess = $DIC->access();
40  $lng = $DIC->language();
41 
42  $this->setId("admsettemp" . $a_type);
43 
44  parent::__construct($a_parent_obj, $a_parent_cmd);
45 
46  include_once("./Services/Administration/classes/class.ilSettingsTemplate.php");
48  $this->setTitle($lng->txt("adm_settings_templates") . " - " .
49  $lng->txt("obj_" . $a_type));
50 
51  $this->addColumn("", "", "1", true);
52  $this->addColumn($this->lng->txt("title"), "title");
53  $this->addColumn($this->lng->txt("description"));
54  $this->addColumn($this->lng->txt("actions"));
55 
56  $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
57  $this->setRowTemplate(
58  "tpl.settings_template_row.html",
59  "Services/Administration"
60  );
61 
62  $this->addMultiCommand("confirmSettingsTemplateDeletion", $lng->txt("delete"));
63  //$this->addCommandButton("", $lng->txt(""));
64  }
65 
69  protected function fillRow($a_set)
70  {
71  $lng = $this->lng;
73 
74  $ilCtrl->setParameter($this->parent_obj, "templ_id", $a_set["id"]);
75  $this->tpl->setVariable("VAL_ID", $a_set["id"]);
76  // begin-patch lok
77  $this->tpl->setVariable("VAL_TITLE", ilSettingsTemplate::translate($a_set["title"]));
78  $this->tpl->setVariable("VAL_DESCRIPTION", ilSettingsTemplate::translate($a_set["description"]));
79  // end-patch lok
80  $this->tpl->setVariable("TXT_EDIT", $lng->txt("edit"));
81  $this->tpl->setVariable(
82  "HREF_EDIT",
83  $ilCtrl->getLinkTarget($this->parent_obj, "editSettingsTemplate")
84  );
85  $ilCtrl->setParameter($this->parent_obj, "templ_id", "");
86  }
87 }
static getAllSettingsTemplates($a_type, $a_include_auto_generated=false)
Get all settings templates of type.
global $DIC
Definition: saml.php:7
setId($a_val)
Set id.
global $ilCtrl
Definition: ilias.php:18
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
$a_type
Definition: workflow.php:92
Class ilTable2GUI.
static translate($a_title_desc)
addMultiCommand($a_cmd, $a_text)
Add Command button.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
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.
__construct($a_parent_obj, $a_parent_cmd, $a_type)
Constructor.