ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilMailCronNotification Class Reference

Mail notifications. More...

+ Inheritance diagram for ilMailCronNotification:
+ Collaboration diagram for ilMailCronNotification:

Public Member Functions

 getId ()
 Get id. More...
 
 getTitle ()
 Get title. More...
 
 getDescription ()
 Get description. More...
 
 getDefaultScheduleType ()
 Get schedule type. More...
 
 getDefaultScheduleValue ()
 Get schedule value. More...
 
 hasAutoActivation ()
 Is to be activated on "installation". More...
 
 hasFlexibleSchedule ()
 Can the schedule be configured? More...
 
 hasCustomSettings ()
 Has cron job any custom setting which can be edited? More...
 
 run ()
 Run job. More...
 
 addCustomSettingsToForm (ilPropertyFormGUI $a_form)
 Add custom settings to form. More...
 
 saveCustomSettings (ilPropertyFormGUI $a_form)
 Save custom settings. More...
 
 activationWasToggled ($a_currently_active)
 Cron job status was changed. More...
 
- Public Member Functions inherited from ilCronJob
 isActive ($a_ts_last_run, $a_schedule_type, $a_schedule_value, $a_manual=false)
 Is job currently active? More...
 
 getScheduleType ()
 Get current schedule type (if flexible) More...
 
 getScheduleValue ()
 Get current schedule value (if flexible) More...
 
 setSchedule ($a_type, $a_value)
 Update current schedule (if flexible) More...
 
 getValidScheduleTypes ()
 Get all available schedule types. More...
 
 getTitle ()
 Get title. More...
 
 getDescription ()
 Get description. More...
 
 isManuallyExecutable ()
 Defines whether or not a cron job can be started manually. More...
 
 hasCustomSettings ()
 Has cron job any custom setting which can be edited? More...
 
 addCustomSettingsToForm (ilPropertyFormGUI $a_form)
 Add custom settings to form. More...
 
 saveCustomSettings (ilPropertyFormGUI $a_form)
 Save custom settings. More...
 
 addToExternalSettingsForm ($a_form_id, array &$a_fields, $a_is_active)
 Add external settings to form. More...
 
 activationWasToggled ($a_currently_active)
 Cron job status was changed. More...
 
 getId ()
 Get id. More...
 
 hasAutoActivation ()
 Is to be activated on "installation". More...
 
 hasFlexibleSchedule ()
 Can the schedule be configured? More...
 
 getDefaultScheduleType ()
 Get schedule type. More...
 
 getDefaultScheduleValue ()
 Get schedule value. More...
 
 run ()
 Run job. More...
 

Protected Member Functions

 init ()
 
- Protected Member Functions inherited from ilCronJob
 checkSchedule ($a_ts_last_run, $a_schedule_type, $a_schedule_value)
 

Protected Attributes

 $lng
 
 $settings
 
 $initDone = false
 

Additional Inherited Members

- Data Fields inherited from ilCronJob
const SCHEDULE_TYPE_DAILY = 1
 
const SCHEDULE_TYPE_IN_MINUTES = 2
 
const SCHEDULE_TYPE_IN_HOURS = 3
 
const SCHEDULE_TYPE_IN_DAYS = 4
 
const SCHEDULE_TYPE_WEEKLY = 5
 
const SCHEDULE_TYPE_MONTHLY = 6
 
const SCHEDULE_TYPE_QUARTERLY = 7
 
const SCHEDULE_TYPE_YEARLY = 8
 

Detailed Description

Mail notifications.

Author
Nadia Ahmad nahma.nosp@m.d@da.nosp@m.tabay.nosp@m..de

Definition at line 12 of file class.ilMailCronNotification.php.

Member Function Documentation

◆ activationWasToggled()

ilMailCronNotification::activationWasToggled (   $a_currently_active)

Cron job status was changed.

Parameters
bool$a_currently_active

Reimplemented from ilCronJob.

Definition at line 113 of file class.ilMailCronNotification.php.

114 {
115 $this->init();
116 $this->settings->set('mail_notification', (bool) $a_currently_active);
117 }
settings()
Definition: settings.php:2

References init(), and settings().

+ Here is the call graph for this function:

◆ addCustomSettingsToForm()

ilMailCronNotification::addCustomSettingsToForm ( ilPropertyFormGUI  $a_form)

Add custom settings to form.

Parameters
ilPropertyFormGUI$a_form

Reimplemented from ilCronJob.

Definition at line 97 of file class.ilMailCronNotification.php.

98 {
99 $this->init();
100 $cb = new ilCheckboxInputGUI($this->lng->txt("cron_mail_notification_message"), "mail_notification_message");
101 $cb->setInfo($this->lng->txt("cron_mail_notification_message_info"));
102 $cb->setChecked($this->settings->get("mail_notification_message"));
103 $a_form->addItem($cb);
104 }
This class represents a checkbox property in a property form.
addItem($a_item)
Add Item (Property, SectionHeader).

References ilPropertyFormGUI\addItem(), init(), and settings().

+ Here is the call graph for this function:

◆ getDefaultScheduleType()

ilMailCronNotification::getDefaultScheduleType ( )

Get schedule type.

Returns
int

Reimplemented from ilCronJob.

Definition at line 61 of file class.ilMailCronNotification.php.

62 {
64 }
const SCHEDULE_TYPE_DAILY

References ilCronJob\SCHEDULE_TYPE_DAILY.

◆ getDefaultScheduleValue()

ilMailCronNotification::getDefaultScheduleValue ( )

Get schedule value.

Returns
int|array

Reimplemented from ilCronJob.

Definition at line 66 of file class.ilMailCronNotification.php.

67 {
68 return;
69 }

◆ getDescription()

ilMailCronNotification::getDescription ( )

Get description.

Returns
string

Reimplemented from ilCronJob.

Definition at line 55 of file class.ilMailCronNotification.php.

56 {
57 $this->init();
58 return $this->lng->txt("cron_mail_notification_desc");
59 }

References init().

+ Here is the call graph for this function:

◆ getId()

ilMailCronNotification::getId ( )

Get id.

Returns
string

Reimplemented from ilCronJob.

Definition at line 44 of file class.ilMailCronNotification.php.

45 {
46 return "mail_notification";
47 }

◆ getTitle()

ilMailCronNotification::getTitle ( )

Get title.

Returns
string

Reimplemented from ilCronJob.

Definition at line 49 of file class.ilMailCronNotification.php.

50 {
51 $this->init();
52 return $this->lng->txt("cron_mail_notification");
53 }

References init().

+ Here is the call graph for this function:

◆ hasAutoActivation()

ilMailCronNotification::hasAutoActivation ( )

Is to be activated on "installation".

Returns
boolean

Reimplemented from ilCronJob.

Definition at line 71 of file class.ilMailCronNotification.php.

72 {
73 return false;
74 }

◆ hasCustomSettings()

ilMailCronNotification::hasCustomSettings ( )

Has cron job any custom setting which can be edited?

Returns
boolean

Reimplemented from ilCronJob.

Definition at line 81 of file class.ilMailCronNotification.php.

82 {
83 return true;
84 }

◆ hasFlexibleSchedule()

ilMailCronNotification::hasFlexibleSchedule ( )

Can the schedule be configured?

Returns
boolean

Reimplemented from ilCronJob.

Definition at line 76 of file class.ilMailCronNotification.php.

77 {
78 return false;
79 }

◆ init()

ilMailCronNotification::init ( )
protected

Definition at line 32 of file class.ilMailCronNotification.php.

33 {
34 global $DIC;
35
36 if (!$this->initDone) {
37 $this->settings = $DIC->settings();
38 $this->lng = $DIC->language();
39
40 $this->initDone = true;
41 }
42 }
global $DIC
Definition: saml.php:7

References $DIC, and settings().

Referenced by activationWasToggled(), addCustomSettingsToForm(), getDescription(), getTitle(), and saveCustomSettings().

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

◆ run()

ilMailCronNotification::run ( )

Run job.

Returns
ilCronJobResult

Reimplemented from ilCronJob.

Definition at line 86 of file class.ilMailCronNotification.php.

87 {
88 require_once 'Services/Mail/classes/class.ilMailSummaryNotification.php';
89 $msn = new ilMailSummaryNotification();
90 $msn->send();
91
94 return $result;
95 }
$result
Cron job result data container.

References $result, and ilCronJobResult\STATUS_OK.

◆ saveCustomSettings()

ilMailCronNotification::saveCustomSettings ( ilPropertyFormGUI  $a_form)

Save custom settings.

Parameters
ilPropertyFormGUI$a_form
Returns
boolean

Reimplemented from ilCronJob.

Definition at line 106 of file class.ilMailCronNotification.php.

107 {
108 $this->init();
109 $this->settings->set('mail_notification_message', $_POST['mail_notification_message'] ? 1 : 0);
110 return true;
111 }
$_POST["username"]

References $_POST, init(), and settings().

+ Here is the call graph for this function:

Field Documentation

◆ $initDone

ilMailCronNotification::$initDone = false
protected

Definition at line 27 of file class.ilMailCronNotification.php.

◆ $lng

ilMailCronNotification::$lng
protected

Definition at line 17 of file class.ilMailCronNotification.php.

◆ $settings

ilMailCronNotification::$settings
protected

Definition at line 22 of file class.ilMailCronNotification.php.


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