19declare(strict_types=1);
54 public function send(): void
60 $recipient_language->loadLanguageModule(
'buddysystem');
64 $approve_url = ilLink::_getLink($this->sender->getId(),
'contact', [
'approve']);
65 $ignore_url = ilLink::_getLink($this->sender->getId(),
'contact', [
'ignore']);
67 $profile_url = $recipient_language->txt(
'buddy_noti_cr_profile_not_published');
73 $this->sender->getFirstname() .
', ' .
74 $this->sender->getLastname() .
' ' .
75 $this->sender->getLogin()
92 'APPROVE_REQUEST' => $approve_url,
93 'APPROVE_REQUEST_TXT' => $recipient_language->txt(
'buddy_notification_contact_request_link'),
94 'IGNORE_REQUEST' => $ignore_url,
95 'IGNORE_REQUEST_TXT' => $recipient_language->txt(
'buddy_notification_contact_request_ignore'),
97 'PERSONAL_PROFILE_LINK' => $profile_url,
99 $notification->setTitleVar(
'buddy_notification_contact_request', [],
'buddysystem');
100 $notification->setShortDescriptionVar(
'buddy_notification_contact_request_short', $body_params,
'buddysystem');
101 $notification->setLongDescriptionVar(
'buddy_notification_contact_request_long', $body_params,
'buddysystem');
102 $notification->setLinks($links);
103 $notification->setValidForSeconds(ilNotificationConfig::TTL_LONG);
104 $notification->setVisibleForSeconds(ilNotificationConfig::DEFAULT_TTS);
105 $notification->setIconPath(
'assets/images/standard/icon_usr.svg');
108 ContactNotificationProvider::NOTIFICATION_TYPE,
109 self::CONTACT_REQUEST_KEY .
'_' . $this->sender->getId(),
112 $notification->notifyByUsers([$user->getId()]);
119 if (is_numeric($portfolio_id) && $portfolio_id > 0) {
124 $this->sender->getPref(
'public_profile') ===
'y' ||
125 $this->sender->getPref(
'public_profile') ===
'g'
description of a localized parameter this information is used locate translations while processing no...
hasPublicProfile(int $recipientUsrId)
const string CONTACT_REQUEST_KEY
__construct(protected ilObjUser $sender, protected ilSetting $settings)
setRecipientIds(array $recipient_ids)
static _getLanguage(string $a_lang_key='')
Get language object.
static _getStaticLink(?int $a_ref_id, string $a_type='', bool $a_fallback_goto=true, string $append="")
static getSalutation(int $a_usr_id, ?ilLanguage $a_language=null)
static getDefaultPortfolio(int $a_user_id)
Access handler for portfolio NOTE: This file needs to stay in the classes directory,...
static getNamePresentation( $a_user_id, bool $a_user_image=false, bool $a_profile_link=false, string $a_profile_back_link='', bool $a_force_first_lastname=false, bool $a_omit_login=false, bool $a_sortable=true, bool $a_return_data_array=false, $a_ctrl_path=null)
Default behaviour is: