ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilMailMemberSessionRoles Class Reference

Class ilMailMemberSessionRoles. More...

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

Public Member Functions

 __construct ()
 
 getRadioOptionTitle ()
 
 getMailRoles (int $ref_id)
 
- Public Member Functions inherited from ilAbstractMailMemberRoles
 getMailRoles (int $ref_id)
 
 getRadioOptionTitle ()
 
 getMailboxRoleAddress (int $role_id)
 

Protected Attributes

ilLanguage $lng
 
ilRbacReview $rbacreview
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilMailMemberSessionRoles::__construct ( )

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

31 {
32 global $DIC;
33
34 $this->lng = $DIC['lng'];
35 $this->rbacreview = $DIC['rbacreview'];
36 }
global $DIC
Definition: shib_login.php:26

References $DIC, and ILIAS\Repository\lng().

+ Here is the call graph for this function:

Member Function Documentation

◆ getMailRoles()

ilMailMemberSessionRoles::getMailRoles ( int  $ref_id)
Returns
array{role_id: int, mailbox: string, form_option_title: string, default_checked?: bool}[]

Reimplemented from ilAbstractMailMemberRoles.

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

44 : array
45 {
46 $role_ids = $this->rbacreview->getLocalRoles($ref_id);
47
48 $sorted_role_ids = [];
49
50 foreach ($role_ids as $role_id) {
51 $role_title = ilObject::_lookupTitle($role_id);
52 // mailbox addresses are not supported in general since title of object might be empty
53 $mailbox = $this->lng->txt('il_sess_participant') . ' <#' . $role_title . '>';
54
55 $role_prefix = substr($role_title, 0, 12);
56 if ($role_prefix === 'il_sess_part') {
57 $sorted_role_ids[1]['default_checked'] = true;
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_participants');
61 }
62 }
63 ksort($sorted_role_ids, SORT_NUMERIC);
64
65 return $sorted_role_ids;
66 }
static _lookupTitle(int $obj_id)
$ref_id
Definition: ltiauth.php:66

References $ref_id, ilObject\_lookupTitle(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ getRadioOptionTitle()

ilMailMemberSessionRoles::getRadioOptionTitle ( )

Reimplemented from ilAbstractMailMemberRoles.

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

39 : string
40 {
41 return $this->lng->txt('mail_roles');
42 }

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

Field Documentation

◆ $lng

ilLanguage ilMailMemberSessionRoles::$lng
protected

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

◆ $rbacreview

ilRbacReview ilMailMemberSessionRoles::$rbacreview
protected

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


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