25 $this->sender = $ilObjUser;
49 require_once
'Services/Mail/classes/class.ilMail.php';
54 require_once
'Services/Language/classes/class.ilLanguageFactory.php';
55 require_once
'Services/User/classes/class.ilUserUtil.php';
56 require_once
'Services/Link/classes/class.ilLink.php';
59 $rcp_lng->loadLanguageModule(
'buddysystem');
61 require_once
'Services/Notifications/classes/class.ilNotificationConfig.php';
63 $notification->setTitleVar(
'buddy_notification_contact_request',
array(),
'buddysystem');
66 'SALUTATION' => ilMail::getSalutation($user->getId(), $rcp_lng),
68 'APPROVE_REQUEST' =>
'<a href="' .
ilLink::_getStaticLink($this->sender->getId(),
'usr',
true,
'_contact_approved') .
'">' . $rcp_lng->txt(
'buddy_notification_contact_request_link_osd') .
'</a>',
69 'IGNORE_REQUEST' =>
'<a href="' .
ilLink::_getStaticLink($this->sender->getId(),
'usr',
true,
'_contact_ignored') .
'">' . $rcp_lng->txt(
'buddy_notification_contact_request_ignore_osd') .
'</a>',
72 $notification->setShortDescriptionVar(
'buddy_notification_contact_request_short', $bodyParams,
'buddysystem');
75 'SALUTATION' => ilMail::getSalutation($user->getId(), $rcp_lng),
78 'APPROVE_REQUEST_TXT' => $rcp_lng->txt(
'buddy_notification_contact_request_link'),
80 'IGNORE_REQUEST_TXT' => $rcp_lng->txt(
'buddy_notification_contact_request_ignore'),
83 $notification->setLongDescriptionVar(
'buddy_notification_contact_request_long', $bodyParams,
'buddysystem');
85 $notification->setAutoDisable(
false);
88 $notification->setIconPath(
'templates/default/images/icon_usr.svg');
89 $notification->setHandlerParam(
'mail.sender', ANONYMOUS_USER_ID);
90 $notification->notifyByUsers(
array($user->getId()));
static _getStaticLink($a_ref_id, $a_type='', $a_fallback_goto=true, $append="")
Get static link.
setRecipientIds(array $recipient_ids)
Describes a notification and provides methods for publishing this notification.
static _getLanguage($a_lang_key='')
Get langauge object.
static getNamePresentation($a_user_id, $a_user_image=false, $a_profile_link=false, $a_profile_back_link="", $a_force_first_lastname=false, $a_omit_login=false, $a_sortable=true, $a_return_data_array=false)
Default behaviour is:
Create styles array
The data for the language used.
__construct(ilObjUser $ilObjUser)