ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
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 ()
 
 hasFlexibleSchedule ()
 
 run ()
 
- Public Member Functions inherited from ilCronJob
 setDateTimeProvider (?Closure $date_time_provider)
 
 isDue (?DateTimeImmutable $last_run, ?CronJobScheduleType $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 (?CronJobScheduleType $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
CronJobScheduleType $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 27 of file class.ilBookingPrefBookCron.php.

Constructor & Destructor Documentation

◆ __construct()

ilBookingPrefBookCron::__construct ( )

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

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

32  {
33  global $DIC;
34 
35  $this->lng = $DIC->language();
36  }
global $DIC
Definition: shib_login.php:25
+ Here is the call graph for this function:

Member Function Documentation

◆ getDefaultScheduleType()

ilBookingPrefBookCron::getDefaultScheduleType ( )

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

62  {
63  return CronJobScheduleType::SCHEDULE_TYPE_DAILY;
64  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ getDefaultScheduleValue()

ilBookingPrefBookCron::getDefaultScheduleValue ( )

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

66  : ?int
67  {
68  return null;
69  }

◆ getDescription()

ilBookingPrefBookCron::getDescription ( )

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

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

52  : string
53  {
54  $lng = $this->lng;
55 
56  $lng->loadLanguageModule("book");
57 
58  return $lng->txt("book_pref_book_cron_info");
59  }
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...
loadLanguageModule(string $a_module)
Load language module.
+ Here is the call graph for this function:

◆ getId()

ilBookingPrefBookCron::getId ( )

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

38  : string
39  {
40  return "book_pref_book";
41  }

◆ getTitle()

ilBookingPrefBookCron::getTitle ( )

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

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

43  : string
44  {
45  $lng = $this->lng;
46 
47  $lng->loadLanguageModule("book");
48 
49  return $lng->txt("book_pref_book_cron");
50  }
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...
loadLanguageModule(string $a_module)
Load language module.
+ Here is the call graph for this function:

◆ hasAutoActivation()

ilBookingPrefBookCron::hasAutoActivation ( )

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

71  : bool
72  {
73  return true;
74  }

◆ hasFlexibleSchedule()

ilBookingPrefBookCron::hasFlexibleSchedule ( )

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

76  : bool
77  {
78  return true;
79  }

◆ run()

ilBookingPrefBookCron::run ( )

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

References ilCronJobResult\STATUS_NO_ACTION, and ilCronJobResult\STATUS_OK.

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

Field Documentation

◆ $lng

ilLanguage ilBookingPrefBookCron::$lng
protected

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

Referenced by getDescription(), and getTitle().


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