ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilAccessKeyTableGUI.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 {
16 
20  function __construct($a_parent_obj, $a_parent_cmd)
21  {
22  global $ilCtrl, $lng, $ilAccess, $lng;
23 
24  parent::__construct($a_parent_obj, $a_parent_cmd);
25 
26  // get keys
27  include_once("./Services/Accessibility/classes/class.ilAccessKey.php");
28 
29  $keys = ilAccessKey::getKeys();
30  $data = array();
31  foreach ($keys as $f => $k)
32  {
33  $data[] = array("func_id" => $f, "access_key" => $k);
34  }
35  $this->setData($data);
36  $this->setTitle($lng->txt("acc_access_keys"));
37  $this->setLimit(9999);
38 
39  $this->addColumn($this->lng->txt("acc_component"), "", "");
40  $this->addColumn($this->lng->txt("acc_function"), "", "");
41  $this->addColumn($this->lng->txt("acc_access_key"), "", "");
42 
43  $this->setEnableHeader(true);
44  $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
45  $this->setRowTemplate("tpl.access_key_row.html", "Services/Accessibility");
46  $this->disable("footer");
47  $this->setEnableTitle(true);
48 
49 // $this->addMultiCommand("", $lng->txt(""));
50  if ($ilAccess->checkAccess("write", "", $_GET["ref_id"]))
51  {
52  $this->addCommandButton("saveAccessKeys", $lng->txt("save"));
53  }
54  }
55 
59  protected function fillRow($a_set)
60  {
61  global $lng;
62 
63  $this->tpl->setVariable("VAL_COMPONENT", ilAccessKey::getComponentNames($a_set["func_id"]));
64  $this->tpl->setVariable("VAL_FUNCTION", ilAccessKey::getFunctionName($a_set["func_id"]));
65  $this->tpl->setVariable("FUNC_ID", $a_set["func_id"]);
66  $this->tpl->setVariable("VAL_ACC_KEY", ilUtil::prepareFormOutput($a_set["access_key"]));
67  }
68 
69 }
70 ?>
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
$_GET["client_id"]
static getKeys($lang_key="0", $a_ignore_default=false)
Get access keys for language.
TableGUI class for access keys.
global $ilCtrl
Definition: ilias.php:18
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
Class ilTable2GUI.
static getComponentNames($a_func_id)
Get Component Names.
fillRow($a_set)
Fill table row.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
Create styles array
The data for the language used.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
disable($a_module_name)
diesables particular modules of table
__construct($a_parent_obj, $a_parent_cmd)
Constructor.
static getFunctionName($a_func_id)
Get Function Name.
global $lng
Definition: privfeed.php:17
setEnableHeader($a_enableheader)
Set Enable Header.
setEnableTitle($a_enabletitle)
Set Enable Title.
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.
setLimit($a_limit=0, $a_default_limit=0)