19 declare(strict_types=1);
56 $this->setting = $DIC->settings();
61 public function send(
int $userId = 0): ?bool
68 case self::TYPE_ADMISSION_MEMBER:
71 if (!
$ilSetting->get(
'mail_grp_member_notification')) {
90 $this->
getMail()->appendInstallationSignature(
true);
96 case self::TYPE_DISMISS_MEMBER:
99 if (!
$ilSetting->get(
'mail_grp_member_notification')) {
114 $this->
getMail()->appendInstallationSignature(
true);
119 case self::TYPE_SUBSCRIBE_MEMBER:
137 $this->
getMail()->appendInstallationSignature(
true);
143 case self::TYPE_NOTIFICATION_REGISTRATION_REQUEST:
170 $this->
getMail()->appendInstallationSignature(
true);
175 case self::TYPE_REFUSED_SUBSCRIPTION_MEMBER:
189 $this->
getMail()->appendInstallationSignature(
true);
195 case self::TYPE_ACCEPTED_SUBSCRIPTION_MEMBER:
212 $this->
getMail()->appendInstallationSignature(
true);
218 case self::TYPE_ENTER_NOTIFICATION:
224 if (!($userObject instanceof \
ilObjUser)) {
225 throw new ilException(sprintf(
'User with ID "%s" does not exist.', $userId));
234 $userObject->getFullname(),
243 $userObject->getFullname(),
251 $this->
getMail()->appendInstallationSignature(
true);
257 case self::TYPE_REGISTER_NOTIFICATION:
263 if (!($userObject instanceof \ilObjUser)) {
264 throw new ilException(sprintf(
'User with ID "%s" does not exist.', $userId));
273 $userObject->getFullname(),
282 $userObject->getFullname(),
290 $this->
getMail()->appendInstallationSignature(
true);
296 case self::TYPE_UNREGISTER_NOTIFICATION:
302 if (!($userObject instanceof \ilObjUser)) {
303 throw new ilException(sprintf(
'User with ID "%s" does not exist.', $userId));
312 $userObject->getFullname(),
321 $userObject->getFullname(),
329 $this->
getMail()->appendInstallationSignature(
true);
340 parent::initLanguage($a_usr_id);
const TYPE_UNREGISTER_NOTIFICATION
appendBody(string $a_body)
const TYPE_NOTIFICATION_REGISTRATION_REQUEST
sendMail(array $a_rcp, bool $a_parse_recipients=true)
const TYPE_DISMISS_MEMBER
const TYPE_SUBSCRIBE_MEMBER
const TYPE_BLOCKED_MEMBER
const TYPE_UNSUBSCRIBE_MEMBER
userToString(int $a_usr_id)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getAdditionalInformation()
static getSalutation(int $a_usr_id, ?ilLanguage $a_language=null)
initLanguage(int $a_usr_id)
const TYPE_NOTIFICATION_REGISTRATION
const TYPE_REGISTER_NOTIFICATION
const TYPE_ADMISSION_MEMBER
getLanguageText(string $a_keyword)
const TYPE_ENTER_NOTIFICATION
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
const TYPE_REFUSED_SUBSCRIPTION_MEMBER
getObjectTitle(bool $a_shorten=false)
createPermanentLink(array $a_params=[], string $a_append='')
const TYPE_ACCEPTED_SUBSCRIPTION_MEMBER
__construct(Container $dic, ilPlugin $plugin)
const TYPE_UNBLOCKED_MEMBER
setSubject(string $a_subject)
const TYPE_NOTIFICATION_UNSUBSCRIBE