ILIAS  release_8 Revision v8.24
ilBookingPrefBookCron Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. 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 ilCronJob
 setDateTimeProvider (?Closure $date_time_provider)
 
 isDue (?DateTimeImmutable $last_run, ?int $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 (?int $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 ()
 
 addCustomSettingsToForm (ilPropertyFormGUI $a_form)
 
 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 ilCronJob
int $schedule_type = null
 
int $schedule_value = null
 
Closure $date_time_provider = null
 

Additional Inherited Members

- Data Fields inherited from ilCronJob
const SCHEDULE_TYPE_DAILY = 1
 @depracated This will be replaced with an ENUM in ILIAS 9 More...
 
const SCHEDULE_TYPE_IN_MINUTES = 2
 @depracated This will be replaced with an ENUM in ILIAS 9 More...
 
const SCHEDULE_TYPE_IN_HOURS = 3
 @depracated This will be replaced with an ENUM in ILIAS 9 More...
 
const SCHEDULE_TYPE_IN_DAYS = 4
 @depracated This will be replaced with an ENUM in ILIAS 9 More...
 
const SCHEDULE_TYPE_WEEKLY = 5
 @depracated This will be replaced with an ENUM in ILIAS 9 More...
 
const SCHEDULE_TYPE_MONTHLY = 6
 @depracated This will be replaced with an ENUM in ILIAS 9 More...
 
const SCHEDULE_TYPE_QUARTERLY = 7
 @depracated This will be replaced with an ENUM in ILIAS 9 More...
 
const SCHEDULE_TYPE_YEARLY = 8
 @depracated This will be replaced with an ENUM in ILIAS 9 More...
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning 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 25 of file class.ilBookingPrefBookCron.php.

Constructor & Destructor Documentation

◆ __construct()

ilBookingPrefBookCron::__construct ( )

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

30 {
31 global $DIC;
32
33 $this->lng = $DIC->language();
34 }
global $DIC
Definition: feed.php:28

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

+ Here is the call graph for this function:

Member Function Documentation

◆ getDefaultScheduleType()

ilBookingPrefBookCron::getDefaultScheduleType ( )

Reimplemented from ilCronJob.

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

59 : int
60 {
62 }
const SCHEDULE_TYPE_DAILY
@depracated This will be replaced with an ENUM in ILIAS 9

References ilCronJob\SCHEDULE_TYPE_DAILY.

◆ getDefaultScheduleValue()

ilBookingPrefBookCron::getDefaultScheduleValue ( )

Reimplemented from ilCronJob.

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

64 : ?int
65 {
66 return null;
67 }

◆ getDescription()

ilBookingPrefBookCron::getDescription ( )

Reimplemented from ilCronJob.

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

50 : string
51 {
53
54 $lng->loadLanguageModule("book");
55
56 return $lng->txt("book_pref_book_cron_info");
57 }
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 ilCronJob.

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

36 : string
37 {
38 return "book_pref_book";
39 }

◆ getTitle()

ilBookingPrefBookCron::getTitle ( )

Reimplemented from ilCronJob.

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

41 : string
42 {
44
45 $lng->loadLanguageModule("book");
46
47 return $lng->txt("book_pref_book_cron");
48 }

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 ilCronJob.

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

69 : bool
70 {
71 return true;
72 }

◆ hasFlexibleSchedule()

ilBookingPrefBookCron::hasFlexibleSchedule ( )

Reimplemented from ilCronJob.

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

74 : bool
75 {
76 return true;
77 }

◆ run()

ilBookingPrefBookCron::run ( )

Reimplemented from ilCronJob.

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

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

References $message, ilCronJobResult\STATUS_NO_ACTION, and ilCronJobResult\STATUS_OK.

Field Documentation

◆ $lng

ilLanguage ilBookingPrefBookCron::$lng
protected

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

Referenced by getDescription(), and getTitle().


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