Public Member Functions | Protected Attributes

ilLDAPRoleAssignmentTableGUI Class Reference

Inheritance diagram for ilLDAPRoleAssignmentTableGUI:
Collaboration diagram for ilLDAPRoleAssignmentTableGUI:

Public Member Functions

 __construct ($a_parent_obj, $a_parent_cmd= '')
 constructor
 fillRow ($a_set)
 Fill row.
 parse ($rule_objs)
 Parse.

Protected Attributes

 $lng
 $ctrl

Detailed Description

Author:
Stefan Meyer <smeyer@databay.de>
Version:
$Id$

Definition at line 35 of file class.ilLDAPRoleAssignmentTableGUI.php.


Constructor & Destructor Documentation

ilLDAPRoleAssignmentTableGUI::__construct ( a_parent_obj,
a_parent_cmd = '' 
)

constructor

public

Parameters:
 

Reimplemented from ilTable2GUI.

Definition at line 47 of file class.ilLDAPRoleAssignmentTableGUI.php.

References $ilCtrl, $lng, ilTable2GUI::addColumn(), ilTable2GUI::setDefaultOrderDirection(), ilTable2GUI::setDefaultOrderField(), ilTable2GUI::setFormAction(), and ilTable2GUI::setRowTemplate().

        {
                global $lng,$ilCtrl;
                
                $this->lng = $lng;
                $this->ctrl = $ilCtrl;
                
                parent::__construct($a_parent_obj,$a_parent_cmd);
                $this->addColumn('','f',1);
                $this->addColumn($this->lng->txt('ldap_rule_type'),'type',"30%");
                $this->addColumn($this->lng->txt('ldap_ilias_role'),'role',"20%");
                $this->addColumn($this->lng->txt('ldap_rule_condition'),'condition',"50%");
                
                $this->setFormAction($this->ctrl->getFormAction($a_parent_obj));
                $this->setRowTemplate("tpl.show_role_assignment_row.html","Services/LDAP");
                $this->setDefaultOrderField('type');
                $this->setDefaultOrderDirection("desc");
        }

Here is the call graph for this function:


Member Function Documentation

ilLDAPRoleAssignmentTableGUI::fillRow ( a_set  ) 

Fill row.

public

Parameters:
array row data

Reimplemented from ilTable2GUI.

Definition at line 73 of file class.ilLDAPRoleAssignmentTableGUI.php.

References ilTable2GUI::getParentObject().

        {
                $this->tpl->setVariable('VAL_ID',$a_set['id']);
                $this->tpl->setVariable('VAL_TYPE',$a_set['type']);
                $this->tpl->setVariable('VAL_CONDITION',$a_set['condition']);
                $this->tpl->setVariable('VAL_ROLE',$a_set['role']);
                $this->tpl->setVariable('TXT_EDIT',$this->lng->txt('edit'));
                
                $this->ctrl->setParameter($this->getParentObject(),'rule_id',$a_set['id']);
                $this->tpl->setVariable('EDIT_LINK',$this->ctrl->getLinkTarget($this->getParentObject(),'editRoleAssignment'));
        }

Here is the call graph for this function:

ilLDAPRoleAssignmentTableGUI::parse ( rule_objs  ) 

Parse.

public

Parameters:
array array of LDAPRoleAssignmentRule

Definition at line 92 of file class.ilLDAPRoleAssignmentTableGUI.php.

References ilObject::_lookupTitle(), ilTable2GUI::setData(), and ilLDAPRoleAssignmentRule::TYPE_GROUP.

        {
                foreach($rule_objs as $rule)
                {
                        $tmp_arr['id'] = $rule->getRuleId();
                        $tmp_arr['type'] = $rule->getType() == ilLDAPRoleAssignmentRule::TYPE_GROUP ?
                                $this->lng->txt('ldap_role_by_group') :
                                $this->lng->txt('ldap_role_by_attribute'); 
                        $tmp_arr['condition'] = $rule->conditionToString();
                        $tmp_arr['role'] = ilObject::_lookupTitle($rule->getRoleId());
                        
                        $records_arr[] = $tmp_arr;
                }
                
                $this->setData($records_arr ? $records_arr : array());
        }

Here is the call graph for this function:


Field Documentation

ilLDAPRoleAssignmentTableGUI::$ctrl [protected]

Definition at line 38 of file class.ilLDAPRoleAssignmentTableGUI.php.

ilLDAPRoleAssignmentTableGUI::$lng [protected]

Definition at line 37 of file class.ilLDAPRoleAssignmentTableGUI.php.

Referenced by __construct().


The documentation for this class was generated from the following file: