3 declare(strict_types=1);
    25     protected const PROCESS_CLASS = \ilBookingProcessWithScheduleGUI::class;
    27     protected \ilCtrlInterface 
$ctrl;
    46         string $seed_str = 
"",
    51         $this->
ctrl = $DIC->ctrl();
    59         $this->seed = ($this->seed_str !== 
"")
    63         $this->object_manager = $DIC->bookingManager()->internal()
    64             ->domain()->objects($pool_id);
    69         $navigation = new \ilCalendarHeaderNavigationGUI(
    75         $navigation->getHTML();
    98             $this->getWeekGridEntries($this->obj_ids),
   105         return $week_widget->render();
   108     protected function getWeekGridEntries(
   111         $week_grid_entries = [];
   113         foreach ($object_ids as $object_id) {
   114             $obj = new \ilBookingObject($object_id);
   115             $schedule = new \ilBookingSchedule($obj->getScheduleId());
   116             $map = array(
'mo', 
'tu', 
'we', 
'th', 
'fr', 
'sa', 
'su');
   117             $definition = $schedule->getDefinition();
   118             $av_from = ($schedule->getAvailabilityFrom() && !$schedule->getAvailabilityFrom()->isNull())
   119                 ? $schedule->getAvailabilityFrom()->get(
IL_CAL_DATE)
   121             $av_to = ($schedule->getAvailabilityTo() && !$schedule->getAvailabilityTo()->isNull())
   125             $has_open_slot = 
false;
   131                 if ($av_from || $av_to) {
   134                     if ($av_from && $av_from > $today) {
   138                     if ($av_to && $av_to < $today) {
   144                 if (isset($definition[$map[$date_info[
'isoday'] - 1]])) {
   145                     foreach ($definition[$map[$date_info[
'isoday'] - 1]] as $slot) {
   146                         $slot = explode(
'-', $slot);
   147                         $slots[] = array(
'from' => str_replace(
':', 
'', $slot[0]),
   148                                          'to' => str_replace(
':', 
'', $slot[1])
   153                 foreach ($slots as $slot) {
   155                         (
int) substr($slot[
'from'], 0, 2),
   156                         (
int) substr($slot[
'from'], 2, 2),
   163                         (
int) substr($slot[
'to'], 0, 2),
   164                         (
int) substr($slot[
'to'], 2, 2),
   181                     if (!array_sum($nr_available)) {
   186                     if ($schedule->getDeadline() >= 0) {
   188                         if ($slot_from < (time() + $schedule->getDeadline() * 60 * 60)) {
   191                     } elseif ($slot_to < time()) {
   196                     $from_a = explode(
' ', $from);
   197                     $from = array_pop($from_a);
   199                     $to_a = explode(
' ', $to);
   200                     $to = array_pop($to_a);
   202                     $this->
ctrl->setParameterByClass(self::PROCESS_CLASS, 
"slot", $slot_from . 
"_" . $slot_to);
   203                     $this->
ctrl->setParameterByClass(self::PROCESS_CLASS, 
"object_id", $obj->getId());
   204                     $this->
ctrl->setParameterByClass(self::PROCESS_CLASS, 
"seed", $this->seed_str);
   205                     $link = $this->
ctrl->getLinkTargetByClass(self::PROCESS_CLASS, 
"showNumberForm", 
"", 
true);
   206                     $this->
ctrl->setParameterByClass(self::PROCESS_CLASS, 
"slot", null);
   207                     $this->
ctrl->setParameterByClass(self::PROCESS_CLASS, 
"object_id", null);
   215                         array_sum($nr_available),
   216                         $this->object_manager->getColorNrForObject($obj->getId())
   226         return $week_grid_entries;
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ilObjUser $user=null,)
 
static _buildWeekDayList(ilDate $a_day, int $a_weekstart)
build week day list  public 
 
static getAvailableObject(array $a_ids, int $a_from, int $a_to, bool $a_return_single=true, bool $a_return_counter=false)
Check if any of given objects are bookable. 
 
__construct(object $parent_gui, string $parent_cmd, array $obj_ids, int $pool_id, string $seed_str="", int $week_start=\ilCalendarSettings::WEEK_START_MONDAY)
 
ILIAS BookingManager Objects ObjectsManager $object_manager