ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilPaymentCronNotification.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5include_once "Services/Cron/classes/class.ilCronJob.php";
6
13{
14 public function getId()
15 {
16 return "pay_notification";
17 }
18
19 public function getTitle()
20 {
21 global $lng;
22
23 return $lng->txt("payment_notification");
24 }
25
26 public function getDescription()
27 {
28 global $lng;
29
30 return $lng->txt("payment_notification_desc");
31 }
32
33 public function getDefaultScheduleType()
34 {
36 }
37
38 public function getDefaultScheduleValue()
39 {
40 return;
41 }
42
43 public function hasAutoActivation()
44 {
45 return false;
46 }
47
48 public function hasFlexibleSchedule()
49 {
50 return false;
51 }
52
53 public function hasCustomSettings()
54 {
55 return true;
56 }
57
58 public function run()
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
73 return $result;
74 }
75
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 }
89
90 public function saveCustomSettings(ilPropertyFormGUI $a_form)
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 }
105
106 public function activationWasToggled($a_currently_active)
107 {
108 global $ilSetting;
109
110 // propagate cron-job setting to object setting
111 $ilSetting->set('payment_notification', (bool)$a_currently_active);
112 }
113}
$result
Cron job result data container.
Cron job application base class.
const SCHEDULE_TYPE_DAILY
This class represents a number property in a property form.
hasFlexibleSchedule()
Can the schedule be configured?
hasAutoActivation()
Is to be activated on "installation".
addCustomSettingsToForm(ilPropertyFormGUI $a_form)
Add custom settings to form.
activationWasToggled($a_currently_active)
Cron job status was changed.
saveCustomSettings(ilPropertyFormGUI $a_form)
Save custom settings.
hasCustomSettings()
Has cron job any custom setting which can be edited?
This class represents a property form user interface.
addItem($a_item)
Add Item (Property, SectionHeader).
$_POST['username']
Definition: cron.php:12
global $lng
Definition: privfeed.php:40
global $ilSetting
Definition: privfeed.php:40