ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilOrgUnitDefaultPermissionTableGUI.php
Go to the documentation of this file.
1<?php
2
9{
10
14 protected $context_string;
18 private $ilOrgUnitPermission = null;
19
20
28 public function __construct($a_parent_obj, $a_parent_cmd, ilOrgUnitPermission $ilOrgUnitPermission)
29 {
30 parent::__construct($a_parent_obj, $a_parent_cmd);
32 if ($this->ilOrgUnitPermission->getId() !== 0) {
33 $this->context_string = $this->ilOrgUnitPermission->getContext()->getContext();
34 }
35 $this->dic()->language()->loadLanguageModule('orgu');
36
37 $this->setId('objpositionperm_' . $this->type);
38
39 $this->dic()
40 ->ui()
41 ->mainTemplate()
42 ->addJavaScript('./Services/AccessControl/js/ilPermSelect.js');
43
44 $this->setTitle($this->dic()->language()->txt('orgu_permission_settings_'
45 . $this->context_string));
46 $this->setEnableHeader(true);
47 $this->disable('sort');
48 $this->setFormAction($this->dic()->ctrl()->getFormAction($a_parent_obj, $a_parent_cmd));
49 $this->disable('numinfo');
50 $this->setRowTemplate("tpl.obj_role_template_perm_row.html", "Modules/OrgUnit");
51 $this->setShowRowsSelector(false);
52 $this->setDisableFilterHiding(true);
54 $this->setOpenFormTag(false);
55 $this->setCloseFormTag(false);
56 }
57
58
59 public function start()
60 {
61 $this->setEnableHeader(false);
62 $this->setOpenFormTag(true);
63 $this->setNoEntriesText('');
64 $this->setData(array());
65 $this->addMultiCommand(ilOrgUnitDefaultPermissionGUI::CMD_UPDATE, $this->lng->txt('save'));
66 }
67
68
69 public function end()
70 {
71 $this->setCloseFormTag(true);
72 $this->addCommandButton(ilOrgUnitDefaultPermissionGUI::CMD_UPDATE, $this->lng->txt('save'));
73 }
74
75
81 public function fillRow($row)
82 {
83 $this->tpl->setVariable('OBJ_TYPE', $this->context_string);
84 $this->tpl->setVariable('PERM_PERM_ID', $row->getOperationId());
85 if ($this->ilOrgUnitPermission->isOperationIdSelected($row->getOperationId())) {
86 $this->tpl->setVariable('PERM_CHECKED', "checked=checked");
87 }
88 // $this->tpl->setVariable('PERM_DISABLED', "disabled=disabled");
89 $this->tpl->setVariable('DESC_TYPE', $this->context_string);
90 $this->tpl->setVariable('DESC_PERM_ID', $row->getOperationId());
91 $this->tpl->setVariable('TXT_PERMISSION', $this->dic()->language()->txt('orgu_op_'
92 . $row->getOperationString()));
93 }
94
95
96 public function collectData()
97 {
98 }
99
100
104 private function dic()
105 {
106 return $GLOBALS['DIC'];
107 }
108}
An exception for terminatinating execution or to throw for unit testing.
__construct($a_parent_obj, $a_parent_cmd, ilOrgUnitPermission $ilOrgUnitPermission)
ilOrgUnitDefaultPermissionTableGUI constructor.
Class ilOrgUnitPermissionGUI.
Class ilTable2GUI.
setEnableHeader($a_enableheader)
Set Enable Header.
setDisableFilterHiding($a_val=true)
Set disable filter hiding.
setCloseFormTag($a_val)
Set close form tag.
setShowRowsSelector($a_value)
Toggle rows-per-page selector.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
setNoEntriesText($a_text)
Set text for an empty table.
getFormAction()
Get Form action parameter.
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.
setId($a_val)
Set id.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
setOpenFormTag($a_val)
Set open form tag.
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
disable($a_module_name)
diesables particular modules of table
$GLOBALS['loaded']
Global hash that tracks already loaded includes.