ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilMailMemberSessionRoles Class Reference

Class ilMailMemberSessionRoles. More...

+ Inheritance diagram for ilMailMemberSessionRoles:
+ Collaboration diagram for ilMailMemberSessionRoles:

Public Member Functions

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

ilMailMemberSessionRoles::__construct ( )

ilMailMemberSessionRoles constructor.

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

References $DIC.

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

Member Function Documentation

◆ getMailRoles()

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

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

References ilObject\_lookupTitle().

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 addresses are not supported in general since title of object might be empty
55  $mailbox = $this->lng->txt('il_sess_participant') . ' <#' . $role_title . '>';
56 
57  switch (substr($role_title, 0, 12)) {
58  case 'il_sess_part':
59  $sorted_role_ids[1]['default_checked'] = true;
60  $sorted_role_ids[1]['role_id'] = $role_id;
61  $sorted_role_ids[1]['mailbox'] = $mailbox;
62  $sorted_role_ids[1]['form_option_title'] = $this->lng->txt('send_mail_participants');
63  break;
64 
65  }
66  }
67  ksort($sorted_role_ids, SORT_NUMERIC);
68 
69  return $sorted_role_ids;
70  }
static _lookupTitle($a_id)
lookup object title
+ Here is the call graph for this function:

◆ getRadioOptionTitle()

ilMailMemberSessionRoles::getRadioOptionTitle ( )
Returns
string

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

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

Field Documentation

◆ $lng

ilMailMemberSessionRoles::$lng
protected

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

◆ $rbacreview

ilMailMemberSessionRoles::$rbacreview
protected

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


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