19 declare(strict_types=1);
61 $this->obj_id = (
int) $row[
'obj_id'];
62 $this->ref_id = (
int) $row[
'ref_id'];
63 $this->closest_container = $row[
'closest_container'];
64 $this->obj_id = (
int) $row[
'obj_id'];
65 $this->ref_id = (
int) ($row[
'ref_id'] ?? 0);
66 $this->thread_id = (
int) ($row[
'thread_id'] ?? 0);
67 $this->thread_title = $row[
'thr_subject'];
68 $this->forum_id = (
int) ($row[
'pos_top_fk'] ?? 0);
69 $this->forum_title = $row[
'top_name'];
70 $this->post_id = (
int) ($row[
'pos_pk'] ?? 0);
71 $this->post_title = $row[
'pos_subject'];
72 $this->post_message = $row[
'pos_message'];
73 $this->post_date = $row[
'pos_date'];
74 $this->post_update = $row[
'pos_update'] ?? null;
75 $this->post_update_user_id = (
int) ($row[
'update_user'] ?? 0);
76 $this->post_censored = (bool) ($row[
'pos_cens'] ??
false);
77 $this->post_censored_date = $row[
'pos_cens_date'] ?? null;
78 $this->post_censored_comment = $row[
'pos_cens_com'] ?? null;
79 $this->pos_usr_alias = $row[
'pos_usr_alias'] ??
'';
80 $this->pos_display_user_id = (
int) ($row[
'pos_display_user_id'] ?? 0);
81 $this->pos_author_id = (
int) ($row[
'pos_author_id'] ?? 0);
82 $this->import_name = $row[
'import_name'] ??
'';
84 if ($notificationCache === null) {
89 if (isset($row[
'deleted_by'])) {
91 $this->deleted_by = $row[
'deleted_by'];
95 $this->deleted_by = $DIC->user()->getLogin();
101 protected function read(): void
110 $filesOfPost = $fileDataForum->getFilesOfPost();
112 foreach ($filesOfPost as $attachment) {
113 $this->attachments[] = $attachment[
'name'];
120 $this->cron_recipients[] = $user_id;
153 return $this->closest_container !== null;
193 return $this->post_update ??
'';
203 return $this->post_censored_date ??
'';
268 if ($this->post_user_name === null) {
283 if ($this->update_user_name === null) {
324 $cacheKey = $this->notificationCache->createKeyByValues([
325 $this->notification_type,
333 if (
false === $this->notificationCache->exists($cacheKey)) {
343 $this->notificationCache->store($cacheKey, $authorInformation);
346 return $this->notificationCache->fetch($cacheKey);
string $post_censored_comment
providesClosestContainer()
getPublicUserInformation(ilForumAuthorInformation $authorinfo)
addRecipient(int $user_id)
__construct(array $row, int $notification_type, ilForumNotificationCache $notificationCache=null)
Class ilForumCronNotificationDataProvider.
getLangKey()
Return lang key.
ilForumNotificationCache $notificationCache
string $post_censored_date
ilObject $closest_container
static isSendAttachmentsByMailEnabled()
getAuthorInformation(ilLanguage $lng, int $authorUsrId, int $displayUserId, string $usrAlias, string $importName)
setPosAuthorId(int $pos_author_id)
setPostUpdateUserId(int $post_update_user_id)
Class ilForumNotificationCache.
Interface ilForumNotificationMailData.
setNotificationType(int $notification_type)
getPostUserName(ilLanguage $user_lang)
This class handles all operations on files for the forum object.
getPostUpdateUserName(ilLanguage $user_lang)