ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
ilMailCronNotification Class Reference
+ Inheritance diagram for ilMailCronNotification:
+ Collaboration diagram for ilMailCronNotification:

Public Member Functions

 getId ()
 
 getTitle ()
 
 getDescription ()
 
 getDefaultScheduleType ()
 
 getDefaultScheduleValue ()
 
 hasAutoActivation ()
 
 hasFlexibleSchedule ()
 
 hasCustomSettings ()
 
 usesLegacyForms ()
 
 getCustomConfigurationInput (\ILIAS\UI\Factory $ui_factory, \ILIAS\Refinery\Factory $factory, ilLanguage $lng)
 
 saveCustomConfiguration (mixed $form_data)
 
 run ()
 
 addCustomSettingsToForm (ilPropertyFormGUI $a_form)
 
 saveCustomSettings (ilPropertyFormGUI $a_form)
 
 activationWasToggled (ilDBInterface $db, ilSetting $setting, bool $a_currently_active)
 
- 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 ()
 

Protected Member Functions

 init ()
 

Protected Attributes

ilLanguage $lng
 
ilSetting $settings
 
bool $init_done = false
 
- Protected Attributes inherited from ILIAS\Cron\CronJob
JobScheduleType $schedule_type = null
 
int $schedule_value = null
 
Closure $date_time_provider = null
 

Private Attributes

GlobalHttpState $http
 

Detailed Description

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

Member Function Documentation

◆ activationWasToggled()

ilMailCronNotification::activationWasToggled ( ilDBInterface  $db,
ilSetting  $setting,
bool  $a_currently_active 
)

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

References ilSetting\set().

145  : void
146  {
147  $setting->set('mail_notification', (string) ((int) $a_currently_active));
148  }
set(string $a_key, string $a_val)
+ Here is the call graph for this function:

◆ addCustomSettingsToForm()

ilMailCronNotification::addCustomSettingsToForm ( ilPropertyFormGUI  $a_form)

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

135  : void
136  {
137  throw new RuntimeException('Not implemented');
138  }

◆ getCustomConfigurationInput()

ilMailCronNotification::getCustomConfigurationInput ( \ILIAS\UI\Factory  $ui_factory,
\ILIAS\Refinery\Factory  $factory,
ilLanguage  $lng 
)

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

References ILIAS\Repository\lng(), ILIAS\Repository\settings(), and ILIAS\UI\Implementation\Component\Input\withValue().

104  : \ILIAS\UI\Component\Input\Container\Form\FormInput {
105  $status = $ui_factory
106  ->input()
107  ->field()
108  ->checkbox($this->lng->txt('cron_mail_notification_message'))
109  ->withByline($this->lng->txt('cron_mail_notification_message_info'))
110  ->withValue((bool) $this->settings->get('mail_notification_message', '0'))
111  ->withDedicatedName('mail_notification_message');
112 
113  return $status;
114  }
withValue($value)
Get an input like this with another value displayed on the client side.
Definition: Group.php:61
+ Here is the call graph for this function:

◆ getDefaultScheduleType()

ilMailCronNotification::getDefaultScheduleType ( )

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

71  {
72  return JobScheduleType::DAILY;
73  }

◆ getDefaultScheduleValue()

ilMailCronNotification::getDefaultScheduleValue ( )

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

References null.

75  : ?int
76  {
77  return null;
78  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null

◆ getDescription()

ilMailCronNotification::getDescription ( )

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

References init(), and ILIAS\Repository\lng().

58  : string
59  {
60  $this->init();
61 
62  $this->lng->loadLanguageModule('mail');
63 
64  return sprintf(
65  $this->lng->txt('cron_mail_notification_desc'),
66  $this->lng->txt('mail_allow_external')
67  );
68  }
+ Here is the call graph for this function:

◆ getId()

ilMailCronNotification::getId ( )

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

46  : string
47  {
48  return 'mail_notification';
49  }

◆ getTitle()

ilMailCronNotification::getTitle ( )

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

References init(), and ILIAS\Repository\lng().

51  : string
52  {
53  $this->init();
54 
55  return $this->lng->txt('cron_mail_notification');
56  }
+ Here is the call graph for this function:

◆ hasAutoActivation()

ilMailCronNotification::hasAutoActivation ( )

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

80  : bool
81  {
82  return false;
83  }

◆ hasCustomSettings()

ilMailCronNotification::hasCustomSettings ( )

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

90  : bool
91  {
92  return true;
93  }

◆ hasFlexibleSchedule()

ilMailCronNotification::hasFlexibleSchedule ( )

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

85  : bool
86  {
87  return false;
88  }

◆ init()

ilMailCronNotification::init ( )
protected

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

References $DIC, ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), and ILIAS\Repository\settings().

Referenced by getDescription(), getTitle(), and saveCustomConfiguration().

33  : void
34  {
35  global $DIC;
36 
37  if (!$this->init_done) {
38  $this->settings = $DIC->settings();
39  $this->lng = $DIC->language();
40  $this->http = $DIC->http();
41 
42  $this->init_done = true;
43  }
44  }
static http()
Fetches the global http state from ILIAS.
global $DIC
Definition: shib_login.php:26
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ run()

ilMailCronNotification::run ( )

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

125  : JobResult
126  {
127  $msn = new ilMailSummaryNotification();
128  $msn->send();
129 
130  $result = new JobResult();
131  $result->setStatus(JobResult::STATUS_OK);
132  return $result;
133  }

◆ saveCustomConfiguration()

ilMailCronNotification::saveCustomConfiguration ( mixed  $form_data)

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

References init(), and ILIAS\Repository\settings().

116  : void
117  {
118  $this->init();
119  $this->settings->set(
120  'mail_notification_message',
121  (string) ((int) $form_data)
122  );
123  }
+ Here is the call graph for this function:

◆ saveCustomSettings()

ilMailCronNotification::saveCustomSettings ( ilPropertyFormGUI  $a_form)

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

140  : bool
141  {
142  throw new RuntimeException('Not implemented');
143  }

◆ usesLegacyForms()

ilMailCronNotification::usesLegacyForms ( )

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

95  : bool
96  {
97  return false;
98  }

Field Documentation

◆ $http

GlobalHttpState ilMailCronNotification::$http
private

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

◆ $init_done

bool ilMailCronNotification::$init_done = false
protected

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

◆ $lng

ilLanguage ilMailCronNotification::$lng
protected

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

◆ $settings

ilSetting ilMailCronNotification::$settings
protected

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


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