19declare(strict_types=1);
42 $this->
settings = $domain->settings();
43 $this->
access = $domain->access();
53 bool $a_changed =
false
67 $recipients = explode(
",", $recipients);
78 $sub_obj_id =
$context->getSubObjId();
83 if (($sub_obj_id === 0 && $obj_type !==
"blp") || in_array($obj_type, array(
"pg",
"wpg"),
true)) {
85 $type_lv =
"obj_" . $obj_type;
89 if ($obj_type ===
"wpg") {
90 $type_lv =
"obj_wiki";
92 if ($obj_type ===
"pg") {
95 if ($obj_type ===
"blp") {
97 $type_lv =
"obj_blog";
99 if ($obj_type ===
"pfpg") {
101 $type_lv =
"portfolio";
103 if ($obj_type ===
"dcl") {
105 $type_lv =
"obj_dcl";
108 foreach ($recipients as $r) {
112 foreach ($ref_ids as
$ref_id) {
114 if ($sub_obj_id === 0 && $obj_type !==
"blog") {
115 $link = \ilLink::_getLink(
$ref_id);
116 } elseif ($obj_type ===
"wpg") {
124 } elseif ($obj_type ===
"pg") {
125 $link = ILIAS_HTTP_PATH .
'/goto.php?client_id=' .
CLIENT_ID .
"&target=pg_" . $sub_obj_id .
"_" .
$ref_id;
129 if ($obj_type ===
"blp") {
132 if ($obj_type ===
"pfpg") {
133 $link = ILIAS_HTTP_PATH .
'/goto.php?client_id=' .
CLIENT_ID .
"&target=prtf_" . $rep_obj_id;
138 $ulng->loadLanguageModule(
'note');
141 $subject = sprintf($ulng->txt(
'note_comment_notification_subjectc'), $obj_title .
" (" . $ulng->txt($type_lv) .
")");
143 $subject = sprintf($ulng->txt(
'note_comment_notification_subject'), $obj_title .
" (" . $ulng->txt($type_lv) .
")");
152 $message .= $ulng->txt(
'note_comment_notification_link') .
": " . $link .
"\n\n";
155 $message .= $ulng->txt(
'note_comment_notification_reason') .
"\n\n";
158 $mail_obj->appendInstallationSignature(
true);
179 foreach ($observer as $item) {
186 call_user_func_array($item,
$param);
sendNotifications(Note $note, bool $a_changed=false)
Sends all comments to a list of accounts configured in the global administration.
InternalDomainService $domain
InternalRepoService $repo
notifyObserver(array $observer, string $action, Note $note)
Notify observers on update/create.
InternalDataService $data
__construct(InternalDataService $data, InternalRepoService $repo, InternalDomainService $domain)
static _getLanguageOfUser(int $a_usr_id)
Get language object of user.
static _getStaticLink(?int $a_ref_id, string $a_type='', bool $a_fallback_goto=true, string $append="")
static _lookupFullname(int $a_user_id)
static _lookupId(string|array $a_user_str)
static _lookupLogin(int $a_user_id)
static _getAllReferences(int $id)
get all reference ids for object ID
static _lookupTitle(int $obj_id)
get(string $a_keyword, ?string $a_default_value=null)
get setting
static getNamePresentation( $a_user_id, bool $a_user_image=false, bool $a_profile_link=false, string $a_profile_back_link='', bool $a_force_first_lastname=false, bool $a_omit_login=false, bool $a_sortable=true, bool $a_return_data_array=false, $a_ctrl_path=null)
Default behaviour is:
static lookupTitle(int $a_page_id, string $lang="-")
static makeUrlTitle(string $a_par)
checkAccessOfUser(int $a_user_id, string $a_permission, string $a_cmd, int $a_ref_id, string $a_type="", ?int $a_obj_id=null, ?int $a_tree_id=null)
check access for an object (provide $a_type and $a_obj_id if available for better performance)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...