3 declare(strict_types=1);
40 self::TYPE_NOTIFICATION_REGISTRATION,
41 self::TYPE_NOTIFICATION_REGISTRATION_REQUEST,
42 self::TYPE_NOTIFICATION_UNSUBSCRIBE
51 public function __construct(
bool $a_is_personal_workspace =
false)
55 $this->
logger = $DIC->logger()->grp();
66 $this->mail = $this->mail->withContextParameters([
82 $this->force_sending_mail = $a_status;
87 public function send(): bool
90 $this->
logger->info(
'Membership mail disabled globally.');
95 $this->
getType() == self::TYPE_ADMISSION_MEMBER
99 $this->
logger->warning(
'Refid: ' . $this->
getRefId() .
' is not of type grp.');
102 if (!$obj->getAutoNotification()) {
103 if (!$this->force_sending_mail) {
104 $this->
logger->info(
'Sending welcome mail disabled locally.');
113 case self::TYPE_ADMISSION_MEMBER:
130 $this->
getMail()->appendInstallationSignature(
true);
136 case self::TYPE_DISMISS_MEMBER:
149 $this->
getMail()->appendInstallationSignature(
true);
155 case self::TYPE_NOTIFICATION_REGISTRATION:
182 $this->
getMail()->appendInstallationSignature(
true);
187 case self::TYPE_UNSUBSCRIBE_MEMBER:
200 $this->
getMail()->appendInstallationSignature(
true);
205 case self::TYPE_NOTIFICATION_UNSUBSCRIBE:
232 $this->
getMail()->appendInstallationSignature(
true);
238 case self::TYPE_SUBSCRIBE_MEMBER:
256 $this->
getMail()->appendInstallationSignature(
true);
263 case self::TYPE_NOTIFICATION_REGISTRATION_REQUEST:
290 $this->
getMail()->appendInstallationSignature(
true);
295 case self::TYPE_REFUSED_SUBSCRIPTION_MEMBER:
309 $this->
getMail()->appendInstallationSignature(
true);
315 case self::TYPE_ACCEPTED_SUBSCRIPTION_MEMBER:
332 $this->
getMail()->appendInstallationSignature(
true);
338 case self::TYPE_WAITING_LIST_MEMBER:
357 $this->
getMail()->appendInstallationSignature(
true);
363 case self::TYPE_STATUS_CHANGED:
384 $this->
getMail()->appendInstallationSignature(
true);
398 parent::initLanguage($a_usr_id);
410 if ($part->isAdmin($a_usr_id)) {
416 if ($part->isAdmin($a_usr_id)) {
419 if ($part->isNotificationEnabled($a_usr_id)) {
435 $this->force_sending_mail ||
436 $this->
settings->get(
'mail_grp_member_notification',
"1") ||
437 in_array($a_type, $this->permanent_enabled_notifications);
initLanguage(int $a_usr_id)
const TYPE_NOTIFICATION_REGISTRATION_REQUEST
const TYPE_NOTIFICATION_UNSUBSCRIBE
appendBody(string $a_body)
const TYPE_ACCEPTED_SUBSCRIPTION_MEMBER
const TYPE_STATUS_CHANGED
sendMail(array $a_rcp, bool $a_parse_recipients=true)
const TYPE_SUBSCRIBE_MEMBER
const TYPE_DISMISS_MEMBER
const PROP_CONTEXT_SUBJECT_PREFIX
const TYPE_BLOCKED_MEMBER
isNotificationTypeEnabled(int $a_type)
get setting "mail_grp_member_notification" and excludes types which are not affected by this setting ...
const TYPE_UNBLOCKED_MEMBER
static _lookupContainerSetting(int $a_id, string $a_keyword, string $a_default_value=null)
static _lookupObjId(int $ref_id)
userToString(int $a_usr_id)
const TYPE_NOTIFICATION_REGISTRATION
getAdditionalInformation()
const EXTERNAL_MAIL_PREFIX
const TYPE_WAITING_LIST_MEMBER
Base class for course/group mail notifications.
createGroupStatus(int $a_usr_id)
__construct(bool $a_is_personal_workspace=false)
static getSalutation(int $a_usr_id, ?ilLanguage $a_language=null)
static getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
get an instance of an Ilias object by reference id
const TYPE_UNSUBSCRIBE_MEMBER
array $permanent_enabled_notifications
getLanguageText(string $a_keyword)
const TYPE_REFUSED_SUBSCRIPTION_MEMBER
getObjectTitle(bool $a_shorten=false)
static _getInstanceByObjId(int $a_obj_id)
Get singleton instance.
createPermanentLink(array $a_params=[], string $a_append='')
__construct(Container $dic, ilPlugin $plugin)
setSubject(string $a_subject)
const TYPE_ADMISSION_MEMBER
forceSendingMail(bool $a_status)
Force sending mail independent from global setting.