ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilMailMemberLearningSequenceRoles Class Reference
+ Inheritance diagram for ilMailMemberLearningSequenceRoles:
+ Collaboration diagram for ilMailMemberLearningSequenceRoles:

Public Member Functions

 __construct ()
 
 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()

ilMailMemberLearningSequenceRoles::__construct ( )

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

References $DIC.

21  {
22  global $DIC;
23 
24  $this->lng = $DIC->language();
25  $this->rbacreview = $DIC->rbac()->review();
26  }
global $DIC
Definition: saml.php:7

Member Function Documentation

◆ getMailRoles()

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

Definition at line 40 of file class.ilMailMemberLearningSequenceRoles.php.

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

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

◆ getRadioOptionTitle()

ilMailMemberLearningSequenceRoles::getRadioOptionTitle ( )
Returns
string

Definition at line 31 of file class.ilMailMemberLearningSequenceRoles.php.

32  {
33  return $this->lng->txt('mail_lso_roles');
34  }

Field Documentation

◆ $lng

ilMailMemberLearningSequenceRoles::$lng
protected

Definition at line 13 of file class.ilMailMemberLearningSequenceRoles.php.

◆ $rbacreview

ilMailMemberLearningSequenceRoles::$rbacreview
protected

Definition at line 18 of file class.ilMailMemberLearningSequenceRoles.php.


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