ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilMailCronNotification Class Reference

Mail notifications. More...

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

Public Member Functions

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

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
- Protected Member Functions inherited from ilCronJob
 checkSchedule ($a_ts_last_run, $a_schedule_type, $a_schedule_value)

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

ilMailCronNotification::activationWasToggled (   $a_currently_active)

Cron job status was changed.

Parameters
bool$a_currently_active

Reimplemented from ilCronJob.

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

References $ilSetting.

{
global $ilSetting;
// propagate cron-job setting to object setting
$ilSetting->set('mail_notification', (bool)$a_currently_active);
}
ilMailCronNotification::addCustomSettingsToForm ( ilPropertyFormGUI  $a_form)

Add custom settings to form.

Parameters
ilPropertyFormGUI$a_form

Reimplemented from ilCronJob.

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

References $ilSetting, $lng, ilPropertyFormGUI\addItem(), and ilFormPropertyGUI\setInfo().

{
global $lng, $ilSetting;
$cb = new ilCheckboxInputGUI($lng->txt("cron_mail_notification_message"), "mail_notification_message");
$cb->setInfo($lng->txt("cron_mail_notification_message_info"));
$cb->setChecked($ilSetting->get("mail_notification_message"));
$a_form->addItem($cb);
}

+ Here is the call graph for this function:

ilMailCronNotification::getDefaultScheduleType ( )

Get schedule type.

Returns
int

Reimplemented from ilCronJob.

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

References ilCronJob\SCHEDULE_TYPE_DAILY.

ilMailCronNotification::getDefaultScheduleValue ( )

Get schedule value.

Returns
int|array

Reimplemented from ilCronJob.

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

{
return;
}
ilMailCronNotification::getDescription ( )

Get description.

Returns
string

Reimplemented from ilCronJob.

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

References $lng.

{
global $lng;
return $lng->txt("cron_mail_notification_desc");
}
ilMailCronNotification::getId ( )

Get id.

Returns
string

Reimplemented from ilCronJob.

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

{
return "mail_notification";
}
ilMailCronNotification::getTitle ( )

Get title.

Returns
string

Reimplemented from ilCronJob.

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

References $lng.

{
global $lng;
return $lng->txt("cron_mail_notification");
}
ilMailCronNotification::hasAutoActivation ( )

Is to be activated on "installation".

Returns
boolean

Reimplemented from ilCronJob.

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

{
return false;
}
ilMailCronNotification::hasCustomSettings ( )

Has cron job any custom setting which can be edited?

Returns
boolean

Reimplemented from ilCronJob.

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

{
return true;
}
ilMailCronNotification::hasFlexibleSchedule ( )

Can the schedule be configured?

Returns
boolean

Reimplemented from ilCronJob.

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

{
return false;
}
ilMailCronNotification::run ( )

Run job.

Returns
ilCronJobResult

Reimplemented from ilCronJob.

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

References $result, and ilCronJobResult\STATUS_OK.

{
require_once 'Services/Mail/classes/class.ilMailSummaryNotification.php';
$msn->send();
return $result;
}
ilMailCronNotification::saveCustomSettings ( ilPropertyFormGUI  $a_form)

Save custom settings.

Parameters
ilPropertyFormGUI$a_form
Returns
boolean

Reimplemented from ilCronJob.

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

References $_POST, and $ilSetting.

{
global $ilSetting;
$ilSetting->set('mail_notification_message', $_POST['mail_notification_message'] ? 1 : 0);
return true;
}

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