ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilMailMemberGroupRoles Class Reference

Class ilMailMemberCourseRoles. More...

+ Inheritance diagram for ilMailMemberGroupRoles:
+ Collaboration diagram for ilMailMemberGroupRoles:

Public Member Functions

 __construct ()
 ilMailMemberGroupRoles constructor. More...
 
 getRadioOptionTitle ()
 
 getMailRoles ($ref_id)
 
- Public Member Functions inherited from ilAbstractMailMemberRoles
 getMailRoles ($ref_id)
 
 getRadioOptionTitle ()
 
 getMailboxRoleAddress ($role_id)
 

Protected Attributes

 $lng
 
 $rbacreview
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilMailMemberGroupRoles::__construct ( )

ilMailMemberGroupRoles constructor.

Definition at line 25 of file class.ilMailMemberGroupRoles.php.

26 {
27 global $DIC;
28
29 $this->lng = $DIC['lng'];
30 $this->rbacreview = $DIC['rbacreview'];
31 }
$DIC
Definition: xapitoken.php:46

References $DIC.

Member Function Documentation

◆ getMailRoles()

ilMailMemberGroupRoles::getMailRoles (   $ref_id)
Parameters
$ref_id
Returns
array sorted_roles

Reimplemented from ilAbstractMailMemberRoles.

Definition at line 45 of file class.ilMailMemberGroupRoles.php.

46 {
47 $role_ids = $this->rbacreview->getLocalRoles($ref_id);
48
49 $sorted_role_ids = array();
50 $counter = 2;
51
52 foreach ($role_ids as $role_id) {
53 $role_title = ilObject::_lookupTitle($role_id);
54 $mailbox = $this->getMailboxRoleAddress($role_id);
55
56 switch (substr($role_title, 0, 8)) {
57 case 'il_grp_a':
58 $sorted_role_ids[1]['role_id'] = $role_id;
59 $sorted_role_ids[1]['mailbox'] = $mailbox;
60 $sorted_role_ids[1]['form_option_title'] = $this->lng->txt('send_mail_admins');
61 break;
62
63 case 'il_grp_m':
64 $sorted_role_ids[0]['role_id'] = $role_id;
65 $sorted_role_ids[0]['mailbox'] = $mailbox;
66 $sorted_role_ids[0]['form_option_title'] = $this->lng->txt('send_mail_members');
67 break;
68
69 default:
70 $sorted_role_ids[$counter]['role_id'] = $role_id;
71 $sorted_role_ids[$counter]['mailbox'] = $mailbox;
72 $sorted_role_ids[$counter]['form_option_title'] = $role_title;
73
74 $counter++;
75 break;
76 }
77 }
78 ksort($sorted_role_ids, SORT_NUMERIC);
79
80 return $sorted_role_ids;
81 }
static _lookupTitle($a_id)
lookup object title

References ilObject\_lookupTitle(), and ilAbstractMailMemberRoles\getMailboxRoleAddress().

+ Here is the call graph for this function:

◆ getRadioOptionTitle()

ilMailMemberGroupRoles::getRadioOptionTitle ( )
Returns
string

Reimplemented from ilAbstractMailMemberRoles.

Definition at line 36 of file class.ilMailMemberGroupRoles.php.

37 {
38 return $this->lng->txt('mail_grp_roles');
39 }

Field Documentation

◆ $lng

ilMailMemberGroupRoles::$lng
protected

Definition at line 15 of file class.ilMailMemberGroupRoles.php.

◆ $rbacreview

ilMailMemberGroupRoles::$rbacreview
protected

Definition at line 20 of file class.ilMailMemberGroupRoles.php.


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