ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilAccessPermissionsStatusTableGUI.php
Go to the documentation of this file.
1<?php
2include_once('./Services/Table/classes/class.ilTable2GUI.php');
3
14{
18 public function __construct($a_parent_obj, $a_parent_cmd)
19 {
20 global $DIC;
21
22 $lng = $DIC['lng'];
23
24 parent::__construct($a_parent_obj, $a_parent_cmd);
25
26 $this->setId('accessperm' . $this->parent_obj->user->getId());
27 $this->setEnableHeader(true);
28 $this->disable('sort');
29 $this->disable('numinfo');
30 $this->setLimit(100);
31 $this->setRowTemplate("tpl.access_permissions_status_row.html", "Services/AccessControl");
32
33 $this->addColumn("", "status", "5%");
34 $this->addColumn($lng->txt("operation"), "operation", "45%");
35 $this->addColumn($lng->txt("info_from_role"), "role_ownership");
36 }
37
41 protected function fillRow($a_set)
42 {
43 global $DIC;
44
45 $lng = $DIC['lng'];
46
47 if ($a_set["img"] == ilObjectPermissionStatusGUI::IMG_OK) {
48 $img_path = ilUtil::getImagePath("icon_ok.svg");
49 $img_info = $lng->txt("info_assigned");
50 } else {
51 $img_path = ilUtil::getImagePath("icon_not_ok.svg");
52 $img_info = $lng->txt("info_not_assigned");
53 }
54 $this->tpl->setVariable("IMG_PATH", $img_path);
55 $this->tpl->setVariable("IMG_INFO", $img_info);
56
57 $this->tpl->setVariable("TXT_OPERATION", $a_set["operation"]);
58
59 foreach ($a_set["role_ownership"] as $role_ownership) {
60 $this->tpl->setCurrentBlock("role_ownership");
61 $this->tpl->setVariable("TXT_ROLE_OWNERSHIP", $role_ownership);
62 $this->tpl->parseCurrentBlock();
63 }
64 }
65}
An exception for terminatinating execution or to throw for unit testing.
Table for Acces Permissons in Permission > Permission of User.
__construct($a_parent_obj, $a_parent_cmd)
Constructor.
Class ilTable2GUI.
setEnableHeader($a_enableheader)
Set Enable Header.
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.
setId($a_val)
Set id.
disable($a_module_name)
diesables particular modules of table
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
global $DIC
Definition: saml.php:7