ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilBookingPrefBookCron Class Reference

Cron for booking pools. More...

+ Inheritance diagram for ilBookingPrefBookCron:
+ Collaboration diagram for ilBookingPrefBookCron:

Public Member Functions

 __construct ()
 
 getId ()
 
 getTitle ()
 
 getDescription ()
 
 getDefaultScheduleType ()
 
 getDefaultScheduleValue ()
 
 hasAutoActivation ()
 Is to be activated on "installation", does only work for ILIAS core cron jobs. More...
 
 hasFlexibleSchedule ()
 
 run ()
 
- 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 Attributes

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

Detailed Description

Cron for booking pools.

  • Automatic booking for overdue pools with booking by preferences
Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

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

Constructor & Destructor Documentation

◆ __construct()

ilBookingPrefBookCron::__construct ( )

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

34 {
35 global $DIC;
36
37 $this->lng = $DIC->language();
38 }
global $DIC
Definition: shib_login.php:26

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

+ Here is the call graph for this function:

Member Function Documentation

◆ getDefaultScheduleType()

ilBookingPrefBookCron::getDefaultScheduleType ( )

Reimplemented from ILIAS\Cron\CronJob.

Definition at line 63 of file class.ilBookingPrefBookCron.php.

64 {
65 return JobScheduleType::DAILY;
66 }

◆ getDefaultScheduleValue()

ilBookingPrefBookCron::getDefaultScheduleValue ( )

Reimplemented from ILIAS\Cron\CronJob.

Definition at line 68 of file class.ilBookingPrefBookCron.php.

68 : ?int
69 {
70 return null;
71 }

◆ getDescription()

ilBookingPrefBookCron::getDescription ( )

Reimplemented from ILIAS\Cron\CronJob.

Definition at line 54 of file class.ilBookingPrefBookCron.php.

54 : string
55 {
57
58 $lng->loadLanguageModule("book");
59
60 return $lng->txt("book_pref_book_cron_info");
61 }
loadLanguageModule(string $a_module)
Load language module.
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...

References $lng, ilLanguage\loadLanguageModule(), and ilLanguage\txt().

+ Here is the call graph for this function:

◆ getId()

ilBookingPrefBookCron::getId ( )

Reimplemented from ILIAS\Cron\CronJob.

Definition at line 40 of file class.ilBookingPrefBookCron.php.

40 : string
41 {
42 return "book_pref_book";
43 }

◆ getTitle()

ilBookingPrefBookCron::getTitle ( )

Reimplemented from ILIAS\Cron\CronJob.

Definition at line 45 of file class.ilBookingPrefBookCron.php.

45 : string
46 {
48
49 $lng->loadLanguageModule("book");
50
51 return $lng->txt("book_pref_book_cron");
52 }

References $lng, ilLanguage\loadLanguageModule(), and ilLanguage\txt().

+ Here is the call graph for this function:

◆ hasAutoActivation()

ilBookingPrefBookCron::hasAutoActivation ( )

Is to be activated on "installation", does only work for ILIAS core cron jobs.

Reimplemented from ILIAS\Cron\CronJob.

Definition at line 73 of file class.ilBookingPrefBookCron.php.

73 : bool
74 {
75 return true;
76 }

◆ hasFlexibleSchedule()

ilBookingPrefBookCron::hasFlexibleSchedule ( )

Reimplemented from ILIAS\Cron\CronJob.

Definition at line 78 of file class.ilBookingPrefBookCron.php.

78 : bool
79 {
80 return true;
81 }

◆ run()

ilBookingPrefBookCron::run ( )

Reimplemented from ILIAS\Cron\CronJob.

Definition at line 83 of file class.ilBookingPrefBookCron.php.

83 : JobResult
84 {
85 $cron_status = JobResult::STATUS_NO_ACTION;
86 $message = "";
87
88 $auto_book = new ilBookingPrefAutoBooking();
89 $auto_book->run();
90
91 $cron_status = JobResult::STATUS_OK;
92
93 $cron_result = new JobResult();
94 $cron_result->setStatus($cron_status);
95
96 return $cron_result;
97 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$message
Definition: xapiexit.php:31

References $message.

Field Documentation

◆ $lng

ilLanguage ilBookingPrefBookCron::$lng
protected

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

Referenced by getDescription(), and getTitle().


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