23 include_once(
'Services/Table/classes/class.ilTable2GUI.php');
49 public function __construct($a_parent_obj, $a_parent_cmd =
'')
56 parent::__construct($a_parent_obj, $a_parent_cmd);
58 $this->
addColumn($this->lng->txt(
'shib_rule_type'),
'type',
"20%");
59 $this->
addColumn($this->lng->txt(
'shib_ilias_role'),
'role',
"30%");
60 $this->
addColumn($this->lng->txt(
'shib_rule_condition'),
'condition',
"20%");
61 $this->
addColumn($this->lng->txt(
'shib_add_remove'),
'add_remove',
"30%");
62 $this->
setFormAction($this->ctrl->getFormAction($a_parent_obj));
63 $this->
setRowTemplate(
"tpl.show_role_assignment_row.html",
"Services/AuthShibboleth");
74 $this->tpl->setVariable(
'VAL_ID', $a_set[
'id']);
75 $this->tpl->setVariable(
'VAL_TYPE', $a_set[
'type']);
76 $this->tpl->setVariable(
'VAL_CONDITION', $a_set[
'condition']);
77 $this->tpl->setVariable(
'VAL_ROLE', $a_set[
'role']);
78 $this->tpl->setVariable(
'TXT_EDIT', $this->lng->txt(
'edit'));
81 $this->tpl->setVariable(
'STATA_ALT', $this->lng->txt(
'yes'));
84 $this->tpl->setVariable(
'STATA_ALT', $this->lng->txt(
'no'));
86 if ($a_set[
'remove']) {
88 $this->tpl->setVariable(
'STATB_ALT', $this->lng->txt(
'yes'));
91 $this->tpl->setVariable(
'STATB_ALT', $this->lng->txt(
'no'));
93 $this->ctrl->setParameter($this->
getParentObject(),
'rule_id', $a_set[
'id']);
94 $this->tpl->setVariable(
'EDIT_LINK', $this->ctrl->getLinkTarget($this->getParentObject(),
'editRoleAssignment'));
103 foreach ($rule_objs as
$rule) {
104 $tmp_arr[
'id'] = $rule->getRuleId();
105 $tmp_arr[
'type'] = $rule->isPluginActive() ? $this->lng->txt(
'shib_role_by_plugin') : $this->lng->txt(
'shib_role_by_attribute');
106 $tmp_arr[
'add'] = $rule->isAddOnUpdateEnabled();
107 $tmp_arr[
'remove'] = $rule->isRemoveOnUpdateEnabled();
108 $tmp_arr[
'condition'] = $rule->conditionToString();
110 $records_arr[] = $tmp_arr;
112 $this->
setData($records_arr ? $records_arr : array());
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
__construct($a_parent_obj, $a_parent_cmd='')
constructor
static _lookupTitle($a_id)
lookup object title
getParentObject()
Get parent object.
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
setRowTemplate($a_template, $a_template_dir="")
Set row template.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
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.