ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilCalendarScheduleFilterBookingPool.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
27{
28 protected int $user_id;
30
31 public function __construct(int $a_user_id)
32 {
33 $this->user_id = $a_user_id;
35 }
36
40 public function filterCategories(array $a_cats): array
41 {
42 return $a_cats;
43 }
44
48 public function modifyEvent(ilCalendarEntry $a_event): ?ilCalendarEntry
49 {
51
52 if ($category) {
59 $end = $a_event->getEnd()->get(IL_CAL_UNIX);
60 $new_end = new ilDateTime($end + 1, IL_CAL_UNIX);
61
62 $a_event->setEnd($new_end);
63 }
64
65 return $a_event;
66 }
67
71 public function addCustomEvents(ilDate $start, ilDate $end, array $a_categories): array
72 {
73 return [];
74 }
75
80 protected function isBookingPoolCategory(int $a_cat_id): ?ilCalendarCategory
81 {
83
84 $cat_type = $category->getType();
85
86 if ($cat_type === ilCalendarCategory::TYPE_BOOK) {
87 return $category;
88 }
89 return null;
90 }
91}
const IL_CAL_UNIX
class for calendar categories
static _getInstance($a_usr_id=0)
get singleton instance
Stores calendar categories.
static getInstanceByCategoryId(int $a_cat_id)
Model for a calendar entry.
setEnd(?ilDateTime $a_end)
getEnd()
Get end of period.
Calendar schedule filter for booking pool reservations.
modifyEvent(ilCalendarEntry $a_event)
@inheritDoc
addCustomEvents(ilDate $start, ilDate $end, array $a_categories)
@inheritDoc
@classDescription Date and time handling
Class for single dates.
Calendar schedule filter interface.