23 include_once(
'Services/Table/classes/class.ilTable2GUI.php');
 
   49         public function __construct($a_parent_obj, $a_parent_cmd = 
'') {
 
   55                 $this->
addColumn($this->lng->txt(
'shib_rule_type'), 
'type', 
"20%");
 
   56                 $this->
addColumn($this->lng->txt(
'shib_ilias_role'), 
'role', 
"30%");
 
   57                 $this->
addColumn($this->lng->txt(
'shib_rule_condition'), 
'condition', 
"20%");
 
   58                 $this->
addColumn($this->lng->txt(
'shib_add_remove'), 
'add_remove', 
"30%");
 
   59                 $this->
setFormAction($this->ctrl->getFormAction($a_parent_obj));
 
   60                 $this->
setRowTemplate(
"tpl.show_role_assignment_row.html", 
"Services/AuthShibboleth");
 
   70                 $this->tpl->setVariable(
'VAL_ID', $a_set[
'id']);
 
   71                 $this->tpl->setVariable(
'VAL_TYPE', $a_set[
'type']);
 
   72                 $this->tpl->setVariable(
'VAL_CONDITION', $a_set[
'condition']);
 
   73                 $this->tpl->setVariable(
'VAL_ROLE', $a_set[
'role']);
 
   74                 $this->tpl->setVariable(
'TXT_EDIT', $this->lng->txt(
'edit'));
 
   77                         $this->tpl->setVariable(
'STATA_ALT', $this->lng->txt(
'yes'));
 
   80                         $this->tpl->setVariable(
'STATA_ALT', $this->lng->txt(
'no'));
 
   82                 if ($a_set[
'remove']) {
 
   84                         $this->tpl->setVariable(
'STATB_ALT', $this->lng->txt(
'yes'));
 
   87                         $this->tpl->setVariable(
'STATB_ALT', $this->lng->txt(
'no'));
 
   89                 $this->ctrl->setParameter($this->
getParentObject(), 
'rule_id', $a_set[
'id']);
 
   90                 $this->tpl->setVariable(
'EDIT_LINK', $this->ctrl->getLinkTarget($this->getParentObject(), 
'editRoleAssignment'));
 
   97         public function parse($rule_objs) {
 
   98                 foreach ($rule_objs as $rule) {
 
   99                         $tmp_arr[
'id'] = $rule->getRuleId();
 
  100                         $tmp_arr[
'type'] = $rule->isPluginActive() ? $this->lng->txt(
'shib_role_by_plugin') : $this->lng->txt(
'shib_role_by_attribute');
 
  101                         $tmp_arr[
'add'] = $rule->isAddOnUpdateEnabled();
 
  102                         $tmp_arr[
'remove'] = $rule->isRemoveOnUpdateEnabled();
 
  103                         $tmp_arr[
'condition'] = $rule->conditionToString();
 
  105                         $records_arr[] = $tmp_arr;
 
  107                 $this->
setData($records_arr ? $records_arr : array());