19 declare(strict_types=1);
34 $this->
lng = $DIC[
'lng'];
35 $this->rbacreview = $DIC[
'rbacreview'];
41 return $this->
lng->txt(
'mail_roles');
46 $role_ids = $this->rbacreview->getLocalRoles($ref_id);
49 $sorted_role_ids = [];
52 foreach ($role_ids as $role_id) {
56 switch (substr($role_title, 0, 8)) {
58 $sorted_role_ids[2][
'role_id'] = $role_id;
59 $sorted_role_ids[2][
'mailbox'] = $mailbox;
60 $sorted_role_ids[2][
'form_option_title'] = $this->
lng->txt(
'send_mail_admins');
64 $sorted_role_ids[1][
'role_id'] = $role_id;
65 $sorted_role_ids[1][
'mailbox'] = $mailbox;
66 $sorted_role_ids[1][
'form_option_title'] = $this->
lng->txt(
'send_mail_tutors');
70 $sorted_role_ids[0][
'role_id'] = $role_id;
71 $sorted_role_ids[0][
'mailbox'] = $mailbox;
72 $sorted_role_ids[0][
'form_option_title'] = $this->
lng->txt(
'send_mail_members');
76 $sorted_role_ids[$counter][
'role_id'] = $role_id;
77 $sorted_role_ids[$counter][
'mailbox'] = $mailbox;
78 $sorted_role_ids[$counter][
'form_option_title'] = $role_title;
84 ksort($sorted_role_ids, SORT_NUMERIC);
86 return $sorted_role_ids;
getMailRoles(int $ref_id)
getMailboxRoleAddress(int $role_id)
Class ilMailMemberCourseRoles.
static _lookupTitle(int $obj_id)
Class ilAbstractMailMemberRoles.