ILIAS
release_8 Revision v8.19
|
Forum notifications. More...
Public Member Functions | |
__construct (ilDBInterface $database=null, ilForumNotificationCache $notificationCache=null, ilLanguage $lng=null, ilSetting $settings=null, \ILIAS\Refinery\Factory $refinery=null, ilCronManager $cronManager=null) | |
getId () | |
getTitle () | |
getDescription () | |
getDefaultScheduleType () | |
getDefaultScheduleValue () | |
hasAutoActivation () | |
hasFlexibleSchedule () | |
hasCustomSettings () | |
keepAlive () | |
run () | |
sendCronForumNotification (ilDBStatement $res, int $notification_type) | |
existsProviderObject (int $provider_id, int $notification_type) | |
addToExternalSettingsForm (int $a_form_id, array &$a_fields, bool $a_is_active) | |
activationWasToggled (ilDBInterface $db, ilSetting $setting, bool $a_currently_active) | |
addCustomSettingsToForm (ilPropertyFormGUI $a_form) | |
saveCustomSettings (ilPropertyFormGUI $a_form) | |
![]() | |
setDateTimeProvider (?Closure $date_time_provider) | |
isDue (?DateTimeImmutable $last_run, ?int $schedule_type, ?int $schedule_value, bool $is_manually_executed=false) | |
getScheduleType () | |
Get current schedule type (if flexible) More... | |
getScheduleValue () | |
Get current schedule value (if flexible) More... | |
setSchedule (?int $a_type, ?int $a_value) | |
Update current schedule (if flexible) More... | |
getAllScheduleTypes () | |
Get all available schedule types. More... | |
getScheduleTypesWithValues () | |
getValidScheduleTypes () | |
Returns a collection of all valid schedule types for a specific job. More... | |
isManuallyExecutable () | |
hasCustomSettings () | |
addCustomSettingsToForm (ilPropertyFormGUI $a_form) | |
saveCustomSettings (ilPropertyFormGUI $a_form) | |
addToExternalSettingsForm (int $a_form_id, array &$a_fields, bool $a_is_active) | |
activationWasToggled (ilDBInterface $db, ilSetting $setting, bool $a_currently_active) | |
Important: This method is (also) called from the setup process, where the constructor of an ilCronJob ist NOT executed. More... | |
getId () | |
getTitle () | |
getDescription () | |
hasAutoActivation () | |
Is to be activated on "installation", does only work for ILIAS core cron jobs. More... | |
hasFlexibleSchedule () | |
getDefaultScheduleType () | |
getDefaultScheduleValue () | |
run () | |
Protected Member Functions | |
getRefIdsByObjId (int $a_obj_id) | |
getFirstAccessibleRefIdBUserAndObjId (int $a_user_id, int $a_obj_id) | |
Private Member Functions | |
addProviderObject (int $provider_id, array $row, int $notification_type) | |
resetProviderCache () | |
sendNotificationForNewPosts (string $threshold_date) | |
sendNotificationForUpdatedPosts (string $threshold_date) | |
sendNotificationForCensoredPosts (string $threshold_date) | |
sendNotificationForUncensoredPosts (string $threshold_date) | |
sendNotificationForDeletedThreads () | |
sendNotificationForDeletedPosts () | |
sendNotification (ilDBStatement $res, string $actionName, int $notificationType) | |
sendDeleteNotifications (ilDBStatement $res, string $action, string $actionDescription, int $notificationType) | |
createForumPostSql (string $condition) | |
createSelectOfDeletionNotificationsSql () | |
Private Attributes | |
const | KEEP_ALIVE_CHUNK_SIZE = 25 |
const | DEFAULT_MAX_NOTIFICATION_AGE_IN_DAYS = 30 |
ilLanguage | $lng |
ilSetting | $settings |
ilLogger | $logger |
ilTree | $tree |
int | $num_sent_messages = 0 |
ilDBInterface | $ilDB |
ilForumNotificationCache | $notificationCache |
ILIAS Refinery Factory | $refinery |
ilCronManager | $cronManager |
Static Private Attributes | |
static array | $providerObject = [] |
static array | $deleted_ids_cache = [] |
static array | $ref_ids_by_obj_id = [] |
static array | $accessible_ref_ids_by_user = [] |
static array | $container_by_frm_ref_id = [] |
Additional Inherited Members | |
![]() | |
const | SCHEDULE_TYPE_DAILY = 1 |
This will be replaced with an ENUM in ILIAS 9 More... | |
const | SCHEDULE_TYPE_IN_MINUTES = 2 |
This will be replaced with an ENUM in ILIAS 9 More... | |
const | SCHEDULE_TYPE_IN_HOURS = 3 |
This will be replaced with an ENUM in ILIAS 9 More... | |
const | SCHEDULE_TYPE_IN_DAYS = 4 |
This will be replaced with an ENUM in ILIAS 9 More... | |
const | SCHEDULE_TYPE_WEEKLY = 5 |
This will be replaced with an ENUM in ILIAS 9 More... | |
const | SCHEDULE_TYPE_MONTHLY = 6 |
This will be replaced with an ENUM in ILIAS 9 More... | |
const | SCHEDULE_TYPE_QUARTERLY = 7 |
This will be replaced with an ENUM in ILIAS 9 More... | |
const | SCHEDULE_TYPE_YEARLY = 8 |
This will be replaced with an ENUM in ILIAS 9 More... | |
![]() | |
int | $schedule_type = null |
int | $schedule_value = null |
Closure | $date_time_provider = null |
Forum notifications.
Definition at line 26 of file class.ilForumCronNotification.php.
ilForumCronNotification::__construct | ( | ilDBInterface | $database = null , |
ilForumNotificationCache | $notificationCache = null , |
||
ilLanguage | $lng = null , |
||
ilSetting | $settings = null , |
||
\ILIAS\Refinery\Factory | $refinery = null , |
||
ilCronManager | $cronManager = null |
||
) |
Definition at line 52 of file class.ilForumCronNotification.php.
References $DIC, ILIAS\Repository\lng(), ILIAS\Repository\refinery(), and ILIAS\Repository\settings().
ilForumCronNotification::activationWasToggled | ( | ilDBInterface | $db, |
ilSetting | $setting, | ||
bool | $a_currently_active | ||
) |
Definition at line 376 of file class.ilForumCronNotification.php.
References ilSetting\set().
ilForumCronNotification::addCustomSettingsToForm | ( | ilPropertyFormGUI | $a_form | ) |
Definition at line 387 of file class.ilForumCronNotification.php.
References ilPropertyFormGUI\addItem(), ILIAS\Repository\lng(), ilNumberInputGUI\setSize(), and ILIAS\Repository\settings().
|
private |
array<string,string|int|float|null> | $row |
Definition at line 353 of file class.ilForumCronNotification.php.
Referenced by sendCronForumNotification().
ilForumCronNotification::addToExternalSettingsForm | ( | int | $a_form_id, |
array & | $a_fields, | ||
bool | $a_is_active | ||
) |
Definition at line 365 of file class.ilForumCronNotification.php.
References ilAdministrationSettingsFormHandler\FORM_FORUM, and ILIAS\Repository\lng().
|
private |
Definition at line 605 of file class.ilForumCronNotification.php.
Referenced by sendNotificationForCensoredPosts(), sendNotificationForNewPosts(), sendNotificationForUncensoredPosts(), and sendNotificationForUpdatedPosts().
|
private |
Definition at line 624 of file class.ilForumCronNotification.php.
Referenced by sendNotificationForDeletedPosts(), and sendNotificationForDeletedThreads().
ilForumCronNotification::existsProviderObject | ( | int | $provider_id, |
int | $notification_type | ||
) |
Definition at line 345 of file class.ilForumCronNotification.php.
Referenced by sendCronForumNotification().
ilForumCronNotification::getDefaultScheduleType | ( | ) |
Definition at line 85 of file class.ilForumCronNotification.php.
ilForumCronNotification::getDefaultScheduleValue | ( | ) |
Definition at line 90 of file class.ilForumCronNotification.php.
ilForumCronNotification::getDescription | ( | ) |
Definition at line 80 of file class.ilForumCronNotification.php.
References ILIAS\Repository\lng().
|
protected |
Definition at line 205 of file class.ilForumCronNotification.php.
References $DIC, $ref_id, and getRefIdsByObjId().
Referenced by sendCronForumNotification().
ilForumCronNotification::getId | ( | ) |
Definition at line 70 of file class.ilForumCronNotification.php.
Referenced by keepAlive().
|
protected |
Definition at line 196 of file class.ilForumCronNotification.php.
References ilObject\_getAllReferences().
Referenced by getFirstAccessibleRefIdBUserAndObjId().
ilForumCronNotification::getTitle | ( | ) |
Definition at line 75 of file class.ilForumCronNotification.php.
References ILIAS\Repository\lng().
ilForumCronNotification::hasAutoActivation | ( | ) |
Definition at line 95 of file class.ilForumCronNotification.php.
ilForumCronNotification::hasCustomSettings | ( | ) |
Definition at line 105 of file class.ilForumCronNotification.php.
ilForumCronNotification::hasFlexibleSchedule | ( | ) |
Definition at line 100 of file class.ilForumCronNotification.php.
ilForumCronNotification::keepAlive | ( | ) |
Definition at line 110 of file class.ilForumCronNotification.php.
References getId(), and ILIAS\Repository\logger().
Referenced by sendCronForumNotification(), sendDeleteNotifications(), and sendNotification().
|
private |
Definition at line 360 of file class.ilForumCronNotification.php.
Referenced by sendCronForumNotification().
ilForumCronNotification::run | ( | ) |
Definition at line 117 of file class.ilForumCronNotification.php.
References $DIC, ILIAS\Repository\lng(), ILIAS\Repository\logger(), sendNotificationForCensoredPosts(), sendNotificationForDeletedPosts(), sendNotificationForDeletedThreads(), sendNotificationForNewPosts(), sendNotificationForUncensoredPosts(), sendNotificationForUpdatedPosts(), ILIAS\Repository\settings(), ilCronJobResult\STATUS_NO_ACTION, and ilCronJobResult\STATUS_OK.
ilForumCronNotification::saveCustomSettings | ( | ilPropertyFormGUI | $a_form | ) |
Definition at line 411 of file class.ilForumCronNotification.php.
References ilPropertyFormGUI\getInput(), ILIAS\Repository\refinery(), and ILIAS\Repository\settings().
ilForumCronNotification::sendCronForumNotification | ( | ilDBStatement | $res, |
int | $notification_type | ||
) |
Definition at line 228 of file class.ilForumCronNotification.php.
References $container, $DIC, $i, $provider, $ref_id, addProviderObject(), ANONYMOUS_USER_ID, existsProviderObject(), ilDBInterface\fetchAssoc(), getFirstAccessibleRefIdBUserAndObjId(), ilObjectFactory\getInstanceByRefId(), ILIAS\Repository\int(), keepAlive(), ILIAS\Repository\logger(), ilForumAuthorInformationCache\preloadUserObjects(), resetProviderCache(), ilForumMailNotification\TYPE_POST_DELETED, and ilForumMailNotification\TYPE_THREAD_DELETED.
Referenced by sendDeleteNotifications(), and sendNotification().
|
private |
Definition at line 578 of file class.ilForumCronNotification.php.
References keepAlive(), ILIAS\Repository\logger(), sendCronForumNotification(), and ilDBConstants\T_INTEGER.
Referenced by sendNotificationForDeletedPosts(), and sendNotificationForDeletedThreads().
|
private |
Definition at line 566 of file class.ilForumCronNotification.php.
References keepAlive(), ILIAS\Repository\logger(), and sendCronForumNotification().
Referenced by sendNotificationForCensoredPosts(), sendNotificationForNewPosts(), sendNotificationForUncensoredPosts(), and sendNotificationForUpdatedPosts().
|
private |
Definition at line 480 of file class.ilForumCronNotification.php.
References $res, ilForumNotificationEvents\CENSORED, createForumPostSql(), sendNotification(), ilDBConstants\T_INTEGER, ilDBConstants\T_TIMESTAMP, and ilForumMailNotification\TYPE_POST_CENSORED.
Referenced by run().
|
private |
Definition at line 550 of file class.ilForumCronNotification.php.
References $res, createSelectOfDeletionNotificationsSql(), ilForumNotificationEvents\POST_DELETED, sendDeleteNotifications(), ilDBConstants\T_INTEGER, and ilForumMailNotification\TYPE_POST_DELETED.
Referenced by run().
|
private |
Definition at line 534 of file class.ilForumCronNotification.php.
References $res, createSelectOfDeletionNotificationsSql(), sendDeleteNotifications(), ilDBConstants\T_INTEGER, ilForumNotificationEvents\THREAD_DELETED, and ilForumMailNotification\TYPE_THREAD_DELETED.
Referenced by run().
|
private |
Definition at line 429 of file class.ilForumCronNotification.php.
References $res, createForumPostSql(), sendNotification(), ilDBConstants\T_INTEGER, ilDBConstants\T_TIMESTAMP, and ilForumMailNotification\TYPE_POST_NEW.
Referenced by run().
|
private |
Definition at line 507 of file class.ilForumCronNotification.php.
References $res, createForumPostSql(), sendNotification(), ilDBConstants\T_INTEGER, ilDBConstants\T_TIMESTAMP, ilForumMailNotification\TYPE_POST_UNCENSORED, and ilForumNotificationEvents\UNCENSORED.
Referenced by run().
|
private |
Definition at line 453 of file class.ilForumCronNotification.php.
References $res, createForumPostSql(), sendNotification(), ilDBConstants\T_INTEGER, ilDBConstants\T_TIMESTAMP, ilForumMailNotification\TYPE_POST_UPDATED, and ilForumNotificationEvents\UPDATED.
Referenced by run().
|
staticprivate |
Definition at line 38 of file class.ilForumCronNotification.php.
|
staticprivate |
Definition at line 40 of file class.ilForumCronNotification.php.
|
private |
Definition at line 50 of file class.ilForumCronNotification.php.
|
staticprivate |
Definition at line 34 of file class.ilForumCronNotification.php.
|
private |
Definition at line 47 of file class.ilForumCronNotification.php.
|
private |
Definition at line 42 of file class.ilForumCronNotification.php.
|
private |
Definition at line 44 of file class.ilForumCronNotification.php.
|
private |
Definition at line 48 of file class.ilForumCronNotification.php.
|
private |
Definition at line 46 of file class.ilForumCronNotification.php.
|
staticprivate |
Definition at line 32 of file class.ilForumCronNotification.php.
|
staticprivate |
Definition at line 36 of file class.ilForumCronNotification.php.
|
private |
Definition at line 49 of file class.ilForumCronNotification.php.
|
private |
Definition at line 43 of file class.ilForumCronNotification.php.
|
private |
Definition at line 45 of file class.ilForumCronNotification.php.
|
private |
Definition at line 29 of file class.ilForumCronNotification.php.
|
private |
Definition at line 28 of file class.ilForumCronNotification.php.