ILIAS  trunk Revision v12.0_alpha-16-g3e876e53c80
ILIAS\Mail\Cron\ScheduledMailsCron Class Reference
+ Inheritance diagram for ILIAS\Mail\Cron\ScheduledMailsCron:
+ Collaboration diagram for ILIAS\Mail\Cron\ScheduledMailsCron:

Public Member Functions

 getId ()
 
 getTitle ()
 
 getDescription ()
 
 hasAutoActivation ()
 Is to be activated on "installation", does only work for ILIAS core cron jobs. More...
 
 hasFlexibleSchedule ()
 
 getDefaultScheduleType ()
 
 getDefaultScheduleValue ()
 
- Public Member Functions inherited from ILIAS\Cron\CronJob
 setDateTimeProvider (?\Closure $date_time_provider)
 
 isDue (?\DateTimeImmutable $last_run, ?JobScheduleType $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 (?JobScheduleType $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 ()
 
 usesLegacyForms ()
 
 getCustomConfigurationInput (\ILIAS\UI\Factory $ui_factory, \ILIAS\Refinery\Factory $factory, \ilLanguage $lng)
 
 addCustomSettingsToForm (\ilPropertyFormGUI $a_form)
 
 saveCustomConfiguration (mixed $form_data)
 
 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 ()
 

Private Member Functions

 init ()
 

Private Attributes

readonly ilLanguage $lng
 
readonly ilObjUser $user
 
bool $init_done = false
 
readonly ilMail $mail
 
readonly ilFormatMail $umail
 
OutboxRepository $outbox_repository
 

Additional Inherited Members

- Protected Attributes inherited from ILIAS\Cron\CronJob
JobScheduleType $schedule_type = null
 
int $schedule_value = null
 
Closure $date_time_provider = null
 

Detailed Description

Definition at line 46 of file ScheduledMailsCron.php.

Member Function Documentation

◆ getDefaultScheduleType()

ILIAS\Mail\Cron\ScheduledMailsCron::getDefaultScheduleType ( )

Reimplemented from ILIAS\Cron\CronJob.

Definition at line 104 of file ScheduledMailsCron.php.

105 {
106 return JobScheduleType::DAILY;
107 }

◆ getDefaultScheduleValue()

ILIAS\Mail\Cron\ScheduledMailsCron::getDefaultScheduleValue ( )

Reimplemented from ILIAS\Cron\CronJob.

Definition at line 109 of file ScheduledMailsCron.php.

109 : ?int
110 {
111 return 1;
112 }

◆ getDescription()

ILIAS\Mail\Cron\ScheduledMailsCron::getDescription ( )

Reimplemented from ILIAS\Cron\CronJob.

Definition at line 87 of file ScheduledMailsCron.php.

87 : string
88 {
89 $this->init();
90
91 return $this->lng->txt('mail_cron_scheduled_mails_desc');
92 }

References ILIAS\Mail\Cron\ScheduledMailsCron\init(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ getId()

ILIAS\Mail\Cron\ScheduledMailsCron::getId ( )

Reimplemented from ILIAS\Cron\CronJob.

Definition at line 75 of file ScheduledMailsCron.php.

75 : string
76 {
77 return 'mail_scheduled_mails';
78 }

◆ getTitle()

ILIAS\Mail\Cron\ScheduledMailsCron::getTitle ( )

Reimplemented from ILIAS\Cron\CronJob.

Definition at line 80 of file ScheduledMailsCron.php.

80 : string
81 {
82 $this->init();
83
84 return $this->lng->txt('mail_cron_scheduled_mails');
85 }

References ILIAS\Mail\Cron\ScheduledMailsCron\init(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ hasAutoActivation()

ILIAS\Mail\Cron\ScheduledMailsCron::hasAutoActivation ( )

Is to be activated on "installation", does only work for ILIAS core cron jobs.

Reimplemented from ILIAS\Cron\CronJob.

Definition at line 94 of file ScheduledMailsCron.php.

94 : bool
95 {
96 return true;
97 }

◆ hasFlexibleSchedule()

ILIAS\Mail\Cron\ScheduledMailsCron::hasFlexibleSchedule ( )

Reimplemented from ILIAS\Cron\CronJob.

Definition at line 99 of file ScheduledMailsCron.php.

99 : bool
100 {
101 return true;
102 }

◆ init()

ILIAS\Mail\Cron\ScheduledMailsCron::init ( )
private

Definition at line 55 of file ScheduledMailsCron.php.

55 : void
56 {
57 global $DIC;
58
59 if (!$this->init_done) {
60 $this->lng = $DIC->language();
61 $this->user = $DIC->user();
62 $this->mail = new ilMail($this->user->getId());
63 $this->umail = new ilFormatMail($this->user->getId());
64
65 $this->lng->loadLanguageModule('mail');
66 $this->init_done = true;
67 $this->outbox_repository = new OutboxDatabaseRepository(
68 $DIC->database(),
69 (new DataFactory())->clock(),
70 $this->mail
71 );
72 }
73 }
global $DIC
Definition: shib_login.php:26

References $DIC, ILIAS\Repository\lng(), and ILIAS\Repository\user().

Referenced by ILIAS\Mail\Cron\ScheduledMailsCron\getDescription(), and ILIAS\Mail\Cron\ScheduledMailsCron\getTitle().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $init_done

bool ILIAS\Mail\Cron\ScheduledMailsCron::$init_done = false
private

Definition at line 50 of file ScheduledMailsCron.php.

◆ $lng

readonly ilLanguage ILIAS\Mail\Cron\ScheduledMailsCron::$lng
private

Definition at line 48 of file ScheduledMailsCron.php.

◆ $mail

readonly ilMail ILIAS\Mail\Cron\ScheduledMailsCron::$mail
private

Definition at line 51 of file ScheduledMailsCron.php.

◆ $outbox_repository

OutboxRepository ILIAS\Mail\Cron\ScheduledMailsCron::$outbox_repository
private

Definition at line 53 of file ScheduledMailsCron.php.

◆ $umail

readonly ilFormatMail ILIAS\Mail\Cron\ScheduledMailsCron::$umail
private

Definition at line 52 of file ScheduledMailsCron.php.

◆ $user

readonly ilObjUser ILIAS\Mail\Cron\ScheduledMailsCron::$user
private

Definition at line 49 of file ScheduledMailsCron.php.


The documentation for this class was generated from the following file: