ILIAS  trunk Revision v11.0_alpha-1769-g99a433fe2dc
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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.

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

31  {
32  global $DIC;
33 
34  $this->lng = $DIC['lng'];
35  $this->rbacreview = $DIC['rbacreview'];
36  }
global $DIC
Definition: shib_login.php:22
+ Here is the call graph for this function:

Member Function Documentation

◆ getMailRoles()

ilMailMemberSessionRoles::getMailRoles ( int  $ref_id)

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

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

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  }
$ref_id
Definition: ltiauth.php:65
static _lookupTitle(int $obj_id)
+ Here is the call graph for this function:

◆ getRadioOptionTitle()

ilMailMemberSessionRoles::getRadioOptionTitle ( )

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

References ILIAS\Repository\lng().

39  : string
40  {
41  return $this->lng->txt('mail_roles');
42  }
+ 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: