ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
All Data Structures Namespaces Files Functions Variables Modules Pages
ilPaymentCronNotification Class Reference

Payment notifications. More...

+ Inheritance diagram for ilPaymentCronNotification:
+ Collaboration diagram for ilPaymentCronNotification:

Public Member Functions

 getId ()
 
 getTitle ()
 
 getDescription ()
 
 getDefaultScheduleType ()
 
 getDefaultScheduleValue ()
 
 hasAutoActivation ()
 
 hasFlexibleSchedule ()
 
 hasCustomSettings ()
 
 run ()
 
 addCustomSettingsToForm (ilPropertyFormGUI $a_form)
 
 saveCustomSettings (ilPropertyFormGUI $a_form)
 
 activationWasToggled ($a_currently_active)
 
- 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...
 

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

Payment notifications.

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

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

Member Function Documentation

◆ activationWasToggled()

ilPaymentCronNotification::activationWasToggled (   $a_currently_active)

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

References $ilSetting.

107  {
108  global $ilSetting;
109 
110  // propagate cron-job setting to object setting
111  $ilSetting->set('payment_notification', (bool)$a_currently_active);
112  }
global $ilSetting
Definition: privfeed.php:40

◆ addCustomSettingsToForm()

ilPaymentCronNotification::addCustomSettingsToForm ( ilPropertyFormGUI  $a_form)

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

References $ilSetting, $lng, ilPropertyFormGUI\addItem(), and ilNumberInputGUI\setSize().

77  {
78  global $lng, $ilSetting;
79 
80  $num_days = new ilNumberInputGUI($lng->txt('payment_notification_days'),'payment_notification_days');
81  $num_days->setSize(3);
82  $num_days->setMinValue(0);
83  $num_days->setMaxValue(120);
84  $num_days->setRequired(true);
85  $num_days->setValue($ilSetting->get('payment_notification_days'));
86  $num_days->setInfo($lng->txt('payment_notification_days_desc'));
87  $a_form->addItem($num_days);
88  }
addItem($a_item)
Add Item (Property, SectionHeader).
This class represents a number property in a property form.
setSize($a_size)
Set Size.
global $ilSetting
Definition: privfeed.php:40
global $lng
Definition: privfeed.php:40
+ Here is the call graph for this function:

◆ getDefaultScheduleType()

ilPaymentCronNotification::getDefaultScheduleType ( )

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

34  {
35  return self::SCHEDULE_TYPE_DAILY;
36  }

◆ getDefaultScheduleValue()

ilPaymentCronNotification::getDefaultScheduleValue ( )

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

39  {
40  return;
41  }

◆ getDescription()

ilPaymentCronNotification::getDescription ( )

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

References $lng.

27  {
28  global $lng;
29 
30  return $lng->txt("payment_notification_desc");
31  }
global $lng
Definition: privfeed.php:40

◆ getId()

ilPaymentCronNotification::getId ( )

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

15  {
16  return "pay_notification";
17  }

◆ getTitle()

ilPaymentCronNotification::getTitle ( )

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

References $lng.

20  {
21  global $lng;
22 
23  return $lng->txt("payment_notification");
24  }
global $lng
Definition: privfeed.php:40

◆ hasAutoActivation()

ilPaymentCronNotification::hasAutoActivation ( )

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

44  {
45  return false;
46  }

◆ hasCustomSettings()

ilPaymentCronNotification::hasCustomSettings ( )

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

54  {
55  return true;
56  }

◆ hasFlexibleSchedule()

ilPaymentCronNotification::hasFlexibleSchedule ( )

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

49  {
50  return false;
51  }

◆ run()

ilPaymentCronNotification::run ( )

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

References $result, ilUserDefinedInvoiceNumber\_isUDInvoiceNumberActive(), and ilCronJobResult\STATUS_OK.

59  {
60  require_once 'Services/Payment/classes/class.ilPaymentNotification.php';
61  $msn = new ilPaymentNotification();
62  $msn->send();
63 
64  include_once './Services/Payment/classes/class.ilUserDefinedInvoiceNumber.php';
66  {
67  $msn = new ilUserDefinedInvoiceNumber();
68  $msn->cronCheck();
69  }
70 
71  $result = new ilCronJobResult();
73  return $result;
74  }
$result
Cron job result data container.
+ Here is the call graph for this function:

◆ saveCustomSettings()

ilPaymentCronNotification::saveCustomSettings ( ilPropertyFormGUI  $a_form)

Definition at line 90 of file class.ilPaymentCronNotification.php.

References $_POST, and $ilSetting.

91  {
92  global $ilSetting;
93 
94  $ilSetting->set('payment_notification_days', $_POST['payment_notification_days']);
95 
96  // invoice_number_reset_period is not saved ?!
97  // see: ilObjSystemFolderGUI::saveCronJobsObject() [<= 4.3.x]
98 
99  // see also
100  // - ilObjPaymentSettings::generalSettingsObject()
101  // - ilObjPaymentSettings::saveInvoiceNumberObject()
102 
103  return true;
104  }
$_POST['username']
Definition: cron.php:12
global $ilSetting
Definition: privfeed.php:40

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