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

Calendar schedule filter for booking pool reservations. More...

+ Inheritance diagram for ilCalendarScheduleFilterBookingPool:
+ Collaboration diagram for ilCalendarScheduleFilterBookingPool:

Public Member Functions

 __construct (int $a_user_id)
 
 filterCategories (array $a_cats)
 @inheritDoc More...
 
 modifyEvent (ilCalendarEntry $a_event)
 @inheritDoc More...
 
 addCustomEvents (ilDate $start, ilDate $end, array $a_categories)
 @inheritDoc More...
 
 filterCategories (array $a_cats)
 
 modifyEvent (ilCalendarEntry $a_event)
 Modifies event properties. More...
 
 addCustomEvents (ilDate $start, ilDate $end, array $a_categories)
 Add (return) an array of custom ilCalendarEntry's. More...
 

Protected Member Functions

 isBookingPoolCategory (int $a_cat_id)
 

Protected Attributes

int $user_id
 
ilCalendarCategories $cats
 

Detailed Description

Calendar schedule filter for booking pool reservations.

Author
Jesús López lopez.nosp@m.@lei.nosp@m.fos.c.nosp@m.om

Definition at line 26 of file ilCalendarScheduleFilterBookingPool.php.

Constructor & Destructor Documentation

◆ __construct()

ilCalendarScheduleFilterBookingPool::__construct ( int  $a_user_id)

Definition at line 31 of file ilCalendarScheduleFilterBookingPool.php.

32 {
33 $this->user_id = $a_user_id;
35 }
static _getInstance($a_usr_id=0)
get singleton instance

References ilCalendarCategories\_getInstance().

+ Here is the call graph for this function:

Member Function Documentation

◆ addCustomEvents()

ilCalendarScheduleFilterBookingPool::addCustomEvents ( ilDate  $start,
ilDate  $end,
array  $a_categories 
)

@inheritDoc

Implements ilCalendarScheduleFilter.

Definition at line 71 of file ilCalendarScheduleFilterBookingPool.php.

71 : array
72 {
73 return [];
74 }

◆ filterCategories()

ilCalendarScheduleFilterBookingPool::filterCategories ( array  $a_cats)

@inheritDoc

Implements ilCalendarScheduleFilter.

Definition at line 40 of file ilCalendarScheduleFilterBookingPool.php.

40 : array
41 {
42 return $a_cats;
43 }

◆ isBookingPoolCategory()

ilCalendarScheduleFilterBookingPool::isBookingPoolCategory ( int  $a_cat_id)
protected
Parameters
$a_cat_id
Returns
null|ilCalendarCategory

Definition at line 80 of file ilCalendarScheduleFilterBookingPool.php.

81 {
83
84 $cat_type = $category->getType();
85
86 if ($cat_type === ilCalendarCategory::TYPE_BOOK) {
87 return $category;
88 }
89 return null;
90 }
Stores calendar categories.
static getInstanceByCategoryId(int $a_cat_id)

References ilCalendarCategory\getInstanceByCategoryId(), and ilCalendarCategory\TYPE_BOOK.

Referenced by modifyEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ modifyEvent()

ilCalendarScheduleFilterBookingPool::modifyEvent ( ilCalendarEntry  $a_event)

@inheritDoc

booking pool reservations are stored in the database with ending time excluded. Keeping it 1 second under the entered end date. e.g. Event from 10:00 to 11:00 is stored 10:00 to 10:59 using timestamps. incrementing 1 second avoid titles/zip folders using this -1 second representation.

Implements ilCalendarScheduleFilter.

Definition at line 48 of file ilCalendarScheduleFilterBookingPool.php.

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 }
const IL_CAL_UNIX
Model for a calendar entry.
setEnd(?ilDateTime $a_end)
getEnd()
Get end of period.
@classDescription Date and time handling

References ilCalendarCategoryAssignments\_lookupCategory(), ilCalendarEntry\getEnd(), ilCalendarEntry\getEntryId(), IL_CAL_UNIX, isBookingPoolCategory(), and ilCalendarEntry\setEnd().

+ Here is the call graph for this function:

Field Documentation

◆ $cats

ilCalendarCategories ilCalendarScheduleFilterBookingPool::$cats
protected

Definition at line 29 of file ilCalendarScheduleFilterBookingPool.php.

◆ $user_id

int ilCalendarScheduleFilterBookingPool::$user_id
protected

Definition at line 28 of file ilCalendarScheduleFilterBookingPool.php.


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