19 declare(strict_types=1);
54 $this->recipientIds =
array_map(
'intval', $recipientIds);
57 public function send(): void
63 $recipientLanguage->loadLanguageModule(
'buddysystem');
67 $personalProfileLink = $recipientLanguage->txt(
'buddy_noti_cr_profile_not_published');
73 $this->sender->getFirstname() .
', ' .
74 $this->sender->getLastname() .
' ' .
75 $this->sender->getLogin()
83 $this->sender->getId(),
92 $this->sender->getId(),
103 'APPROVE_REQUEST_TXT' => $recipientLanguage->txt(
'buddy_notification_contact_request_link'),
105 'IGNORE_REQUEST_TXT' => $recipientLanguage->txt(
'buddy_notification_contact_request_ignore'),
107 'PERSONAL_PROFILE_LINK' => $personalProfileLink,
109 $notification->setTitleVar(
'buddy_notification_contact_request', [],
'buddysystem');
110 $notification->setShortDescriptionVar(
'buddy_notification_contact_request_short', $bodyParams,
'buddysystem');
111 $notification->setLongDescriptionVar(
'buddy_notification_contact_request_long', $bodyParams,
'buddysystem');
112 $notification->setLinks($links);
113 $notification->setValidForSeconds(ilNotificationConfig::TTL_LONG);
114 $notification->setVisibleForSeconds(ilNotificationConfig::DEFAULT_TTS);
115 $notification->setIconPath(
'assets/images/standard/icon_usr.svg');
118 ContactNotificationProvider::NOTIFICATION_TYPE,
119 self::CONTACT_REQUEST_KEY .
'_' . $this->sender->getId(),
122 $notification->notifyByUsers([$user->getId()]);
129 if (is_numeric($portfolioId) && $portfolioId > 0) {
134 $this->sender->getPref(
'public_profile') ===
'y' ||
135 $this->sender->getPref(
'public_profile') ===
'g'
description of a localized parameter this information is used locate translations while processing no...
hasPublicProfile(int $recipientUsrId)
static getDefaultPortfolio(int $a_user_id)
__construct(protected ilObjUser $sender, protected ilSetting $settings)
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='ilpublicuserprofilegui')
Default behaviour is:
static getSalutation(int $a_usr_id, ?ilLanguage $a_language=null)
static _getStaticLink(?int $a_ref_id, string $a_type='', bool $a_fallback_goto=true, string $append="")
setRecipientIds(array $recipientIds)
static _getLanguage(string $a_lang_key='')
Get language object.
Access handler for portfolio NOTE: This file needs to stay in the classes directory, WAC will be confused otherwise.
const CONTACT_REQUEST_KEY
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...