19declare(strict_types=1);
52 public function __construct(
object $a_parent_gui,
string $a_parent_cmd)
56 $this->rbacreview =
$DIC->rbac()->review();
57 $this->tree =
$DIC->repositoryTree();
58 $this->system =
$DIC->rbac()->system();
60 $this->
setId(
'rolf_role_tbl');
62 $this->
lng->loadLanguageModule(
'rbac');
63 $this->
lng->loadLanguageModule(
'search');
66 protected function fillRow(array $a_set): void
68 if ($a_set[
'type'] ==
'role') {
70 $this->
ctrl->setParameterByClass(
77 $this->
ctrl->setParameterByClass(
"ilobjrolegui",
"obj_id", $a_set[
"obj_id"]);
78 $link = $this->
ctrl->getLinkTargetByClass(
"ilobjrolegui",
"perm");
79 $this->
ctrl->setParameterByClass(
"ilobjrolegui",
"rolf_ref_id",
"");
81 $this->
ctrl->setParameterByClass(
"ilobjroletemplategui",
"obj_id", $a_set[
"obj_id"]);
82 $link = $this->
ctrl->getLinkTargetByClass(
"ilobjroletemplategui",
"perm");
85 switch ($a_set[
'rtype']) {
87 $this->tpl->setVariable(
'ROLE_TYPE', $this->
lng->txt(
'rbac_auto_global'));
90 $this->tpl->setVariable(
'ROLE_TYPE', $this->
lng->txt(
'rbac_ud_global'));
93 $this->tpl->setVariable(
'ROLE_TYPE', $this->
lng->txt(
'rbac_auto_local'));
96 $this->tpl->setVariable(
'ROLE_TYPE', $this->
lng->txt(
'rbac_ud_local'));
99 $this->tpl->setVariable(
'ROLE_TYPE', $this->
lng->txt(
'rbac_auto_rolt'));
102 $this->tpl->setVariable(
'ROLE_TYPE', $this->
lng->txt(
'rbac_ud_rolt'));
108 $this->tpl->setVariable(
'VAL_ID', $a_set[
'obj_id']);
111 if ($this->system->checkAccess(
'write', $this->parent_obj->getRefId())) {
112 $this->tpl->setVariable(
'VAL_TITLE_LINKED', $a_set[
'title']);
113 $this->tpl->setVariable(
'VAL_LINK', $link);
115 $this->tpl->setVariable(
'VAL_TITLE', $a_set[
'title']);
117 if (strlen($a_set[
'description'])) {
118 $this->tpl->setVariable(
'VAL_DESC', $a_set[
'description']);
121 $ref = $a_set[
'parent'];
123 $this->tpl->setVariable(
'CONTEXT', $this->
lng->txt(
'rbac_context_global'));
125 $this->tpl->setVariable(
132 if ($this->system->checkAccess(
'write', $this->role_folder_id)) {
134 $this->tpl->setVariable(
'COPY_TEXT', $this->
lng->txt(
'rbac_copy_role_copy'));
137 $this->tpl->setVariable(
158 $this->
addColumn($this->
lng->txt(
'search_title_description'),
'title',
'30%');
159 $this->
addColumn($this->
lng->txt(
'type'),
'rtype',
'20%');
160 $this->
addColumn($this->
lng->txt(
'context'),
'',
'40%');
161 $this->
addColumn($this->
lng->txt(
'actions'),
'',
'10%');
164 if (
$GLOBALS[
'DIC'][
'rbacsystem']->checkAccess(
176 $this->
addColumn($this->
lng->txt(
'search_title_description'),
'title',
'30%');
177 $this->
addColumn($this->
lng->txt(
'type'),
'rtype',
'20%');
178 $this->
addColumn($this->
lng->txt(
'context'),
'',
'50%');
179 $this->
setTitle($this->
lng->txt(
'rbac_select_roles'));
185 $this->
setRowTemplate(
'tpl.role_row.html',
'components/ILIAS/AccessControl');
192 if ($this->type === self::TYPE_VIEW) {
204 $this->type = $a_type;
240 $roles->setOptions($action);
242 $roles->readFromSession();
244 if (!$roles->getValue()) {
253 $title->readFromSession();
268 if ($this->
getType() == self::TYPE_VIEW) {
278 foreach ($this->rbacreview->getRolesByFilter($type_filter, 0,
'') as $role) {
282 $this->tree->isDeleted($role[
'parent']) ||
283 !$this->tree->isInTree($role[
'parent'])
289 if (strlen($filter_orig)) {
290 if (stristr(
$title, $filter_orig) ==
false) {
295 $rows[
$counter][
'title_orig'] = $role[
'title'];
297 $rows[
$counter][
'description'] = $role[
'description'];
298 $rows[
$counter][
'obj_id'] = $role[
'obj_id'];
299 $rows[
$counter][
'parent'] = $role[
'parent'];
300 $rows[
$counter][
'type'] = $role[
'type'];
302 $auto = substr($role[
'title'], 0, 3) ==
'il_';
305 if ($role[
'type'] ==
'rolt') {
331 $this->role_title_filter = $a_filter;
static _getTranslation(string $a_role_title)
class ilRbacReview Contains Review functions of core Rbac.
const FILTER_NOT_INTERNAL
class ilRbacSystem system function like checkAccess, addActiveRole ... Supporting system functions ar...
TableGUI for the presentation og roles and role templates.
__construct(object $a_parent_gui, string $a_parent_cmd)
string $role_title_filter
fillRow(array $a_set)
Standard Version of Fill Row.
setRoleTitleFilter(string $a_filter)
parse(int $role_folder_id)
Parse role list.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setShowRowsSelector(bool $a_value)
Toggle rows-per-page selector.
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
addCommandButton(string $a_cmd, string $a_text, string $a_onclick='', string $a_id="", string $a_class="")
addFilterItem(ilTableFilterItem $a_input_item, bool $a_optional=false)
addMultiCommand(string $a_cmd, string $a_text)
setFormAction(string $a_form_action, bool $a_multipart=false)
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
setDefaultOrderField(string $a_defaultorderfield)
setSelectAllCheckbox(string $a_select_all_checkbox, bool $a_select_all_on_top=false)
setDisableFilterHiding(bool $a_val=true)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setDefaultOrderDirection(string $a_defaultorderdirection)
setData(array $a_data)
Set table data.
disable(string $a_module_name)
setMaxCount(int $a_max_count)
set max.
This class represents a text property in a property form.
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
filter(string $filter_id, $class_path, string $cmd, bool $activated=true, bool $expanded=true)