ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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
4include_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)
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 parent::__construct($a_parent_obj, $a_parent_cmd);
43
44 // get keys
45 include_once("./Services/Accessibility/classes/class.ilAccessKey.php");
46
48 $data = array();
49 foreach ($keys as $f => $k) {
50 $data[] = array("func_id" => $f, "access_key" => $k);
51 }
52 $this->setData($data);
53 $this->setTitle($lng->txt("acc_access_keys"));
54 $this->setLimit(9999);
55
56 $this->addColumn($this->lng->txt("acc_component"), "", "");
57 $this->addColumn($this->lng->txt("acc_function"), "", "");
58 $this->addColumn($this->lng->txt("acc_access_key"), "", "");
59
60 $this->setEnableHeader(true);
61 $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
62 $this->setRowTemplate("tpl.access_key_row.html", "Services/Accessibility");
63 $this->disable("footer");
64 $this->setEnableTitle(true);
65
66 // $this->addMultiCommand("", $lng->txt(""));
67 if ($ilAccess->checkAccess("write", "", $_GET["ref_id"])) {
68 $this->addCommandButton("saveAccessKeys", $lng->txt("save"));
69 }
70 }
71
75 protected function fillRow($a_set)
76 {
78
79 $this->tpl->setVariable("VAL_COMPONENT", ilAccessKey::getComponentNames($a_set["func_id"]));
80 $this->tpl->setVariable("VAL_FUNCTION", ilAccessKey::getFunctionName($a_set["func_id"]));
81 $this->tpl->setVariable("FUNC_ID", $a_set["func_id"]);
82 $this->tpl->setVariable("VAL_ACC_KEY", ilUtil::prepareFormOutput($a_set["access_key"]));
83 }
84}
$_GET["client_id"]
An exception for terminatinating execution or to throw for unit testing.
TableGUI class for access keys.
__construct($a_parent_obj, $a_parent_cmd)
Constructor.
fillRow($a_set)
Fill table row.
static getFunctionName($a_func_id)
Get Function Name.
static getKeys($lang_key="0", $a_ignore_default=false)
Get access keys for language.
static getComponentNames($a_func_id)
Get Component Names.
Class ilTable2GUI.
setEnableHeader($a_enableheader)
Set Enable Header.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
setData($a_data)
set table data @access public
setEnableTitle($a_enabletitle)
Set Enable Title.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
setLimit($a_limit=0, $a_default_limit=0)
set max.
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.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
disable($a_module_name)
diesables particular modules of table
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms @access public
global $ilCtrl
Definition: ilias.php:18
$keys
Definition: metadata.php:187
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$DIC
Definition: xapitoken.php:46