ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilMailCronNotification Class Reference

Mail notifications. More...

+ 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 $initDone = 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

Mail notifications.

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

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

Member Function Documentation

◆ activationWasToggled()

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

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

References ilSetting\set().

149  : void
150  {
151  $setting->set('mail_notification', (string) ((int) $a_currently_active));
152  }
set(string $a_key, string $a_val)
+ Here is the call graph for this function:

◆ addCustomSettingsToForm()

ilMailCronNotification::addCustomSettingsToForm ( ilPropertyFormGUI  $a_form)

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

139  : void
140  {
141  throw new RuntimeException('Not implemented');
142  }

◆ getCustomConfigurationInput()

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

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

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

108  : \ILIAS\UI\Component\Input\Container\Form\FormInput {
109  $status = $ui_factory
110  ->input()
111  ->field()
112  ->checkbox($this->lng->txt('cron_mail_notification_message'))
113  ->withByline($this->lng->txt('cron_mail_notification_message_info'))
114  ->withValue((bool) $this->settings->get('mail_notification_message', '0'))
115  ->withDedicatedName('mail_notification_message');
116 
117  return $status;
118  }
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 74 of file class.ilMailCronNotification.php.

75  {
76  return JobScheduleType::DAILY;
77  }

◆ getDefaultScheduleValue()

ilMailCronNotification::getDefaultScheduleValue ( )

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

References null.

79  : ?int
80  {
81  return null;
82  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null

◆ getDescription()

ilMailCronNotification::getDescription ( )

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

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

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

◆ getId()

ilMailCronNotification::getId ( )

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

50  : string
51  {
52  return 'mail_notification';
53  }

◆ getTitle()

ilMailCronNotification::getTitle ( )

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

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

55  : string
56  {
57  $this->init();
58 
59  return $this->lng->txt('cron_mail_notification');
60  }
+ Here is the call graph for this function:

◆ hasAutoActivation()

ilMailCronNotification::hasAutoActivation ( )

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

84  : bool
85  {
86  return false;
87  }

◆ hasCustomSettings()

ilMailCronNotification::hasCustomSettings ( )

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

94  : bool
95  {
96  return true;
97  }

◆ hasFlexibleSchedule()

ilMailCronNotification::hasFlexibleSchedule ( )

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

89  : bool
90  {
91  return false;
92  }

◆ init()

ilMailCronNotification::init ( )
protected

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

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

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

37  : void
38  {
39  global $DIC;
40 
41  if (!$this->initDone) {
42  $this->settings = $DIC->settings();
43  $this->lng = $DIC->language();
44  $this->http = $DIC->http();
45 
46  $this->initDone = true;
47  }
48  }
static http()
Fetches the global http state from ILIAS.
global $DIC
Definition: shib_login.php:22
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ run()

ilMailCronNotification::run ( )

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

129  : JobResult
130  {
131  $msn = new ilMailSummaryNotification();
132  $msn->send();
133 
134  $result = new JobResult();
135  $result->setStatus(JobResult::STATUS_OK);
136  return $result;
137  }

◆ saveCustomConfiguration()

ilMailCronNotification::saveCustomConfiguration ( mixed  $form_data)

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

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

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

◆ saveCustomSettings()

ilMailCronNotification::saveCustomSettings ( ilPropertyFormGUI  $a_form)

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

144  : bool
145  {
146  throw new RuntimeException('Not implemented');
147  }

◆ usesLegacyForms()

ilMailCronNotification::usesLegacyForms ( )

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

99  : bool
100  {
101  return false;
102  }

Field Documentation

◆ $http

GlobalHttpState ilMailCronNotification::$http
private

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

◆ $initDone

bool ilMailCronNotification::$initDone = false
protected

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

◆ $lng

ilLanguage ilMailCronNotification::$lng
protected

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

◆ $settings

ilSetting ilMailCronNotification::$settings
protected

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


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