ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilAccessPermissionsStatusTableGUI.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
27{
28 protected \ILIAS\UI\Renderer $renderer;
29 protected \ILIAS\UI\Factory $ui_factory;
33 public function __construct(object $a_parent_obj, string $a_parent_cmd)
34 {
35 global $DIC;
36 parent::__construct($a_parent_obj, $a_parent_cmd);
37
38 $this->renderer = $DIC->ui()->renderer();
39 $this->ui_factory = $DIC->ui()->factory();
40
41 $this->setId('accessperm' . $this->parent_obj->user->getId());
42 $this->setEnableHeader(true);
43 $this->disable('sort');
44 $this->disable('numinfo');
45 $this->setLimit(100);
46 $this->setRowTemplate("tpl.access_permissions_status_row.html", "components/ILIAS/AccessControl");
47
48 $this->addColumn($this->lng->txt("status"), "status", "5%");
49 $this->addColumn($this->lng->txt("operation"), "operation", "45%");
50 $this->addColumn($this->lng->txt("info_from_role"), "role_ownership");
51 }
52
56 protected function fillRow(array $a_set): void
57 {
58 global $DIC;
59
60 $lng = $DIC['lng'];
61
62 if ($a_set["img"] == ilObjectPermissionStatusGUI::IMG_OK) {
63 $img_path = ilUtil::getImagePath("standard/icon_ok.svg");
64 $img_info = $lng->txt("info_assigned");
65 } else {
66 $img_path = ilUtil::getImagePath("standard/icon_not_ok.svg");
67 $img_info = $lng->txt("info_not_assigned");
68 }
69 $this->tpl->setVariable("ICON", $this->renderer->render(
70 $this->ui_factory->symbol()->icon()->custom($img_path, $img_info)
71 ));
72 $this->tpl->setVariable("IMG_INFO", $img_info);
73
74 $this->tpl->setVariable("TXT_OPERATION", $a_set["operation"]);
75
76 foreach ($a_set["role_ownership"] as $role_ownership) {
77 $this->tpl->setCurrentBlock("role_ownership");
78 $this->tpl->setVariable("TXT_ROLE_OWNERSHIP", $role_ownership);
79 $this->tpl->parseCurrentBlock();
80 }
81 }
82}
renderer()
Table for Acces Permissons in Permission > Permission of User.
__construct(object $a_parent_obj, string $a_parent_cmd)
Constructor.
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setLimit(int $a_limit=0, int $a_default_limit=0)
set max.
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)
setEnableHeader(bool $a_enableheader)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setId(string $a_val)
ilLanguage $lng
disable(string $a_module_name)
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26