ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilOrgUnitDefaultPermissionTableGUI.php
Go to the documentation of this file.
1 <?php
20 
26 {
27  protected string $context_string;
29 
33  public function __construct(object $a_parent_obj, string $a_parent_cmd, ilOrgUnitPermission $ilOrgUnitPermission)
34  {
35  parent::__construct($a_parent_obj, $a_parent_cmd);
37  if ($this->ilOrgUnitPermission->getId() !== 0) {
38  $this->context_string = $this->ilOrgUnitPermission->getContext()->getContext();
39  }
40  $this->dic()->language()->loadLanguageModule('orgu');
41 
42  $this->setId('objpositionperm_' . $this->type);
43 
44  $this->dic()
45  ->ui()
46  ->mainTemplate()
47  ->addJavaScript('./Services/AccessControl/js/ilPermSelect.js');
48 
49  $this->setTitle(
50  $this->dic()->language()->txt('orgu_permission_settings_'
51  . $this->context_string)
52  );
53  $this->setEnableHeader(true);
54  $this->disable('sort');
55  $this->setFormAction($this->dic()->ctrl()->getFormAction($a_parent_obj, $a_parent_cmd));
56  $this->disable('numinfo');
57  $this->setRowTemplate("tpl.obj_role_template_perm_row.html", "Modules/OrgUnit");
58  $this->setShowRowsSelector(false);
59  $this->setDisableFilterHiding(true);
61  $this->setOpenFormTag(false);
62  $this->setCloseFormTag(false);
63  }
64 
65  public function start(): void
66  {
67  $this->setEnableHeader(false);
68  $this->setOpenFormTag(true);
69  $this->setNoEntriesText('');
70  $this->setData(array());
71  $this->addMultiCommand(BaseCommands::CMD_UPDATE, $this->lng->txt('save'));
72  }
73 
74  public function end(): void
75  {
76  $this->setCloseFormTag(true);
77  $this->addCommandButton(BaseCommands::CMD_UPDATE, $this->lng->txt('save'));
78  }
79 
80  public function fillRow(array $a_set): void
81  {
82  $this->tpl->setVariable('OBJ_TYPE', $this->context_string);
83  $this->tpl->setVariable('PERM_PERM_ID', $a_set['operation_id']);
84  if ($this->ilOrgUnitPermission->isOperationIdSelected((int) $a_set['operation_id'])) {
85  $this->tpl->setVariable('PERM_CHECKED', "checked=checked");
86  }
87  // $this->tpl->setVariable('PERM_DISABLED', "disabled=disabled");
88  $this->tpl->setVariable('DESC_TYPE', $this->context_string);
89  $this->tpl->setVariable('DESC_PERM_ID', $a_set['operation_id']);
90  $this->tpl->setVariable('TXT_PERMISSION', $this->dic()->language()->txt('orgu_op_'
91  . $a_set['operation_string']));
92  }
93 
94  public function collectData(): void
95  {
96  }
97 
98  private function dic(): \ILIAS\DI\Container
99  {
100  return $GLOBALS['DIC'];
101  }
102 }
setNoEntriesText(string $a_text)
setData(array $a_data)
__construct(object $a_parent_obj, string $a_parent_cmd, ilOrgUnitPermission $ilOrgUnitPermission)
ilOrgUnitDefaultPermissionTableGUI constructor.
setFormAction(string $a_form_action, bool $a_multipart=false)
addCommandButton(string $a_cmd, string $a_text, string $a_onclick='', string $a_id="", string $a_class="")
Class ChatMainBarProvider .
setCloseFormTag(bool $a_val)
setDisableFilterHiding(bool $a_val=true)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setId(string $a_val)
setShowRowsSelector(bool $a_value)
Toggle rows-per-page selector.
isOperationIdSelected(int $operation_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class HTTPServicesTest.
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
__construct(Container $dic, ilPlugin $plugin)
disable(string $a_module_name)
setOpenFormTag(bool $a_val)
addMultiCommand(string $a_cmd, string $a_text)
setEnableHeader(bool $a_enableheader)