19 declare(strict_types=1);
54 self::TYPE_NOTIFICATION_REGISTRATION,
55 self::TYPE_NOTIFICATION_REGISTRATION_REQUEST,
56 self::TYPE_NOTIFICATION_UNSUBSCRIBE
65 public function __construct(
bool $a_is_personal_workspace =
false)
69 $this->
logger = $DIC->logger()->grp();
80 $this->mail = $this->mail->withContextParameters([
96 $this->force_sending_mail = $a_status;
104 $this->
logger->info(
'Membership mail disabled globally.');
109 $this->
getType() == self::TYPE_ADMISSION_MEMBER
113 $this->
logger->warning(
'Refid: ' . $this->
getRefId() .
' is not of type grp.');
116 if (!$obj->getAutoNotification()) {
117 if (!$this->force_sending_mail) {
118 $this->
logger->info(
'Sending welcome mail disabled locally.');
127 case self::TYPE_ADMISSION_MEMBER:
144 $this->
getMail()->appendInstallationSignature(
true);
150 case self::TYPE_DISMISS_MEMBER:
163 $this->
getMail()->appendInstallationSignature(
true);
169 case self::TYPE_NOTIFICATION_REGISTRATION:
196 $this->
getMail()->appendInstallationSignature(
true);
201 case self::TYPE_UNSUBSCRIBE_MEMBER:
214 $this->
getMail()->appendInstallationSignature(
true);
219 case self::TYPE_NOTIFICATION_UNSUBSCRIBE:
246 $this->
getMail()->appendInstallationSignature(
true);
252 case self::TYPE_SUBSCRIBE_MEMBER:
270 $this->
getMail()->appendInstallationSignature(
true);
277 case self::TYPE_NOTIFICATION_REGISTRATION_REQUEST:
304 $this->
getMail()->appendInstallationSignature(
true);
309 case self::TYPE_REFUSED_SUBSCRIPTION_MEMBER:
323 $this->
getMail()->appendInstallationSignature(
true);
329 case self::TYPE_ACCEPTED_SUBSCRIPTION_MEMBER:
346 $this->
getMail()->appendInstallationSignature(
true);
352 case self::TYPE_WAITING_LIST_MEMBER:
371 $this->
getMail()->appendInstallationSignature(
true);
377 case self::TYPE_STATUS_CHANGED:
398 $this->
getMail()->appendInstallationSignature(
true);
412 parent::initLanguage($a_usr_id);
424 if ($part->isAdmin($a_usr_id)) {
430 if ($part->isAdmin($a_usr_id)) {
433 if ($part->isNotificationEnabled($a_usr_id)) {
449 $this->force_sending_mail ||
450 $this->
settings->get(
'mail_grp_member_notification',
"1") ||
451 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 _lookupObjId(int $ref_id)
userToString(int $a_usr_id)
const TYPE_NOTIFICATION_REGISTRATION
getAdditionalInformation()
const EXTERNAL_MAIL_PREFIX
const TYPE_WAITING_LIST_MEMBER
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)
static _lookupContainerSetting(int $a_id, string $a_keyword, ?string $a_default_value=null)
const TYPE_ADMISSION_MEMBER
forceSendingMail(bool $a_status)
Force sending mail independent from global setting.