24 include_once(
'Services/Table/classes/class.ilTable2GUI.php');
47 public function __construct($a_parent_obj, $a_parent_cmd =
'')
57 parent::__construct($a_parent_obj, $a_parent_cmd);
59 $this->
addColumn($this->lng->txt(
'ldap_rule_type'),
'type',
"20%");
60 $this->
addColumn($this->lng->txt(
'ldap_ilias_role'),
'role',
"30%");
61 $this->
addColumn($this->lng->txt(
'ldap_rule_condition'),
'condition',
"20%");
62 $this->
addColumn($this->lng->txt(
'ldap_add_remove'),
'',
'30%');
64 $this->
setFormAction($this->ctrl->getFormAction($a_parent_obj));
65 $this->
setRowTemplate(
"tpl.show_role_assignment_row.html",
"Services/LDAP");
79 $this->tpl->setVariable(
'VAL_ID', $a_set[
'id']);
80 $this->tpl->setVariable(
'VAL_TYPE', $a_set[
'type']);
81 $this->tpl->setVariable(
'VAL_CONDITION', $a_set[
'condition']);
82 $this->tpl->setVariable(
'VAL_ROLE', $a_set[
'role']);
83 $this->tpl->setVariable(
'TXT_EDIT', $this->lng->txt(
'edit'));
87 $this->tpl->setVariable(
'STATA_ALT', $this->lng->txt(
'yes'));
90 $this->tpl->setVariable(
'STATA_ALT', $this->lng->txt(
'no'));
92 if ($a_set[
'remove']) {
94 $this->tpl->setVariable(
'STATB_ALT', $this->lng->txt(
'yes'));
97 $this->tpl->setVariable(
'STATB_ALT', $this->lng->txt(
'no'));
101 $this->ctrl->setParameter($this->
getParentObject(),
'rule_id', $a_set[
'id']);
102 $this->tpl->setVariable(
'EDIT_LINK', $this->ctrl->getLinkTarget($this->getParentObject(),
'editRoleAssignment'));
114 foreach ($rule_objs as
$rule) {
115 $tmp_arr[
'id'] = $rule->getRuleId();
117 switch ($rule->getType()) {
119 $tmp_arr[
'type'] = $this->lng->txt(
'ldap_role_by_attribute');
122 $tmp_arr[
'type'] = $this->lng->txt(
'ldap_role_by_group');
125 $tmp_arr[
'type'] = $this->lng->txt(
'ldap_role_by_plugin');
130 $tmp_arr[
'condition'] = $rule->conditionToString();
131 $tmp_arr[
'add'] = $rule->isAddOnUpdateEnabled();
132 $tmp_arr[
'remove'] = $rule->isRemoveOnUpdateEnabled();
136 $records_arr[] = $tmp_arr;
139 $this->
setData($records_arr ? $records_arr : array());
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
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.
__construct($a_parent_obj, $a_parent_cmd='')
constructor
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.