ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilUserActionAdminTableGUI.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
4 
5 include_once("./Services/Table/classes/class.ilTable2GUI.php");
6 
16 {
20  protected $ctrl;
21 
25  protected $tpl;
26 
30  protected $lng;
31 
32 
36  public function __construct($a_parent_obj, $a_parent_cmd, $a_data, $a_write_permission = false)
37  {
38  global $DIC;
39 
40  $this->ctrl = $DIC->ctrl();
41  $this->lng = $DIC->language();
42  $this->tpl = $DIC["tpl"];
43 
44  parent::__construct($a_parent_obj, $a_parent_cmd);
45 
46  $this->setData($a_data);
47  $this->setTitle($this->lng->txt(""));
48 
49  $this->addColumn($this->lng->txt("user_action"));
50  $this->addColumn($this->lng->txt("active"), "", "1");
51 
52  $this->setFormAction($this->ctrl->getFormAction($a_parent_obj));
53  $this->setRowTemplate("tpl.user_action_admin_row.html", "Services/User/Actions");
54 
55  //$this->addMultiCommand("", $this->lng->txt(""));
56  if ($a_write_permission) {
57  $this->addCommandButton("save", $this->lng->txt("save"));
58  }
59  }
60 
64  protected function fillRow($a_set)
65  {
66  if ($a_set["active"]) {
67  $this->tpl->touchBlock("checked");
68  }
69  $this->tpl->setVariable("VAL", $a_set["action_type_name"]);
70  $this->tpl->setVariable("ACTION_ID", $a_set["action_comp_id"] . ":" . $a_set["action_type_id"]);
71  }
72 }
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
global $DIC
Definition: saml.php:7
__construct($a_parent_obj, $a_parent_cmd, $a_data, $a_write_permission=false)
Constructor.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
Class ilTable2GUI.
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.
TableGUI class for user action administration.