4 include_once
'./Services/Mail/classes/class.ilMailNotification.php';
47 public function send($userId =
'')
56 case self::TYPE_ADMISSION_MEMBER:
59 if (!
$ilSetting->get(
'mail_grp_member_notification',
false)) {
78 $this->
getMail()->appendInstallationSignature(
true);
84 case self::TYPE_DISMISS_MEMBER:
87 if (!
$ilSetting->get(
'mail_grp_member_notification',
false)) {
102 $this->
getMail()->appendInstallationSignature(
true);
110 case self::TYPE_SUBSCRIBE_MEMBER:
128 $this->
getMail()->appendInstallationSignature(
true);
135 case self::TYPE_NOTIFICATION_REGISTRATION_REQUEST:
162 $this->
getMail()->appendInstallationSignature(
true);
167 case self::TYPE_REFUSED_SUBSCRIPTION_MEMBER:
181 $this->
getMail()->appendInstallationSignature(
true);
187 case self::TYPE_ACCEPTED_SUBSCRIPTION_MEMBER:
204 $this->
getMail()->appendInstallationSignature(
true);
210 case self::TYPE_ENTER_NOTIFICATION:
211 if (
'' === $userId) {
216 if (!$userObject || !($userObject instanceof \
ilObjUser)) {
217 throw new ilException(sprintf(
'User with ID "%s" does not exist.', $userId));
226 $userObject->getFullname(),
235 $userObject->getFullname(),
243 $this->
getMail()->appendInstallationSignature(
true);
245 $this->
sendMail(array($rcp), array(
'system'));
249 case self::TYPE_REGISTER_NOTIFICATION:
250 if (
'' === $userId) {
255 if (!$userObject || !($userObject instanceof \ilObjUser)) {
256 throw new ilException(sprintf(
'User with ID "%s" does not exist.', $userId));
265 $userObject->getFullname(),
274 $userObject->getFullname(),
282 $this->
getMail()->appendInstallationSignature(
true);
284 $this->
sendMail(array($rcp), array(
'system'));
288 case self::TYPE_UNREGISTER_NOTIFICATION:
289 if (
'' === $userId) {
294 if (!$userObject || !($userObject instanceof \ilObjUser)) {
295 throw new ilException(sprintf(
'User with ID "%s" does not exist.', $userId));
304 $userObject->getFullname(),
313 $userObject->getFullname(),
321 $this->
getMail()->appendInstallationSignature(
true);
323 $this->
sendMail(array($rcp), array(
'system'));
337 parent::initLanguage($a_usr_id);
const TYPE_UNREGISTER_NOTIFICATION
getType()
Get notification type.
const TYPE_NOTIFICATION_REGISTRATION_REQUEST
const TYPE_DISMISS_MEMBER
initLanguage($a_usr_id)
Add language module crs.
getLanguageText($a_keyword)
const TYPE_SUBSCRIBE_MEMBER
const TYPE_BLOCKED_MEMBER
const TYPE_UNSUBSCRIBE_MEMBER
sendMail(array $a_rcp, $a_parse_recipients=true)
getAdditionalInformation()
Base class for course/group mail notifications.
getObjectTitle($a_shorten=false)
const TYPE_NOTIFICATION_REGISTRATION
const TYPE_REGISTER_NOTIFICATION
const TYPE_ADMISSION_MEMBER
send($userId='')
Send notifications.
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
const TYPE_ENTER_NOTIFICATION
getRecipients()
get array of recipients
const TYPE_REFUSED_SUBSCRIPTION_MEMBER
createPermanentLink($a_params=array(), $a_append='')
const TYPE_ACCEPTED_SUBSCRIPTION_MEMBER
__construct(Container $dic, ilPlugin $plugin)
const TYPE_UNBLOCKED_MEMBER
appendBody($a_body)
Append body text.
const TYPE_NOTIFICATION_UNSUBSCRIBE
static getSalutation($a_usr_id, ilLanguage $a_language=null)