3 declare(strict_types=1);
57 $this->setting = $DIC->settings();
62 public function send(
int $userId = 0): ?bool
69 case self::TYPE_ADMISSION_MEMBER:
72 if (!
$ilSetting->get(
'mail_grp_member_notification')) {
91 $this->
getMail()->appendInstallationSignature(
true);
97 case self::TYPE_DISMISS_MEMBER:
100 if (!
$ilSetting->get(
'mail_grp_member_notification')) {
115 $this->
getMail()->appendInstallationSignature(
true);
120 case self::TYPE_SUBSCRIBE_MEMBER:
138 $this->
getMail()->appendInstallationSignature(
true);
144 case self::TYPE_NOTIFICATION_REGISTRATION_REQUEST:
171 $this->
getMail()->appendInstallationSignature(
true);
176 case self::TYPE_REFUSED_SUBSCRIPTION_MEMBER:
190 $this->
getMail()->appendInstallationSignature(
true);
196 case self::TYPE_ACCEPTED_SUBSCRIPTION_MEMBER:
213 $this->
getMail()->appendInstallationSignature(
true);
219 case self::TYPE_ENTER_NOTIFICATION:
225 if (!($userObject instanceof \
ilObjUser)) {
226 throw new ilException(sprintf(
'User with ID "%s" does not exist.', $userId));
235 $userObject->getFullname(),
244 $userObject->getFullname(),
252 $this->
getMail()->appendInstallationSignature(
true);
258 case self::TYPE_REGISTER_NOTIFICATION:
264 if (!($userObject instanceof \ilObjUser)) {
265 throw new ilException(sprintf(
'User with ID "%s" does not exist.', $userId));
274 $userObject->getFullname(),
283 $userObject->getFullname(),
291 $this->
getMail()->appendInstallationSignature(
true);
297 case self::TYPE_UNREGISTER_NOTIFICATION:
303 if (!($userObject instanceof \ilObjUser)) {
304 throw new ilException(sprintf(
'User with ID "%s" does not exist.', $userId));
313 $userObject->getFullname(),
322 $userObject->getFullname(),
330 $this->
getMail()->appendInstallationSignature(
true);
341 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
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const TYPE_SUBSCRIBE_MEMBER
const TYPE_BLOCKED_MEMBER
const TYPE_UNSUBSCRIBE_MEMBER
userToString(int $a_usr_id)
getAdditionalInformation()
Base class for course/group mail notifications.
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