ILIAS
trunk Revision v11.0_alpha-2638-g80c1d007f79
|
Booking definition. More...
Public Member Functions | |
__construct (int $a_booking_id=0) | |
Constructor. More... | |
getId () | |
setObjId (int $a_id) | |
getObjId () | |
setDeadlineHours (int $a_hours) | |
getDeadlineHours () | |
setNumberOfBookings (int $a_num) | |
getNumberOfBookings () | |
setTargetObjIds (?array $a_obj_id) | |
getTargetObjIds () | |
isTargetObjectVisible (int $a_ref_id) | |
Check if target ref id is visible. More... | |
save () | |
update () | |
delete () | |
isOwner (?int $a_user_id=null) | |
check if current (or given) user is entry owner More... | |
getCurrentNumberOfBookings (int $a_entry_id) | |
get current number of bookings More... | |
getCurrentBookings (int $a_entry_id) | |
get current bookings More... | |
hasBooked (int $a_entry_id, ?int $a_user_id=null) | |
get current number of bookings More... | |
isBookedOut (int $a_entry_id, bool $a_check_current_user=false) | |
get current number of bookings More... | |
isAppointmentBookableForUser (int $a_app_id, int $a_user_id) | |
Check if a calendar appointment is bookable for a specific user. More... | |
book (int $a_entry_id, ?int $a_user_id=null) | |
book calendar entry for user More... | |
cancelBooking (int $a_entry_id, ?int $a_user_id=null) | |
cancel calendar booking for user More... | |
deleteBooking (int $a_entry_id, int $a_user_id) | |
Delete booking. More... | |
Static Public Member Functions | |
static | lookupBookingsOfUser (array $a_app_ids, int $a_usr_id, ?ilDateTime $start=null) |
Lookup bookings of user. More... | |
static | removeObsoleteEntries () |
Remove unused booking entries. More... | |
static | getInstanceByCalendarEntryId (int $a_id) |
Get instance by calendar entry. More... | |
static | isBookable (array $a_obj_ids, ?int $a_target_obj_id=null) |
Which objects are bookable? More... | |
static | lookupBookableUsersForObject (array $a_obj_id, array $a_user_ids) |
Consultation hours are offered if 1) consultation hour owner is admin or tutor and no object assignment 2) object is assigned to consultation hour. More... | |
static | hasObjectBookingEntries (int $a_obj_id, int $a_usr_id) |
Check if object has assigned consultation hour appointments. More... | |
static | lookupBookingMessage (int $a_entry_id, int $a_usr_id) |
static | writeBookingMessage (int $a_entry_id, int $a_usr_id, string $a_message) |
Write booking message. More... | |
static | lookupBookingsForAppointment (int $a_app_id) |
Lookup booked users for appointment. More... | |
static | lookupBookingsForObject (int $a_obj_id, int $a_usr_id) |
Lookup booking for an object and user. More... | |
static | lookupManagedBookingsForObject (int $a_obj_id, int $a_usr_id) |
Lookup bookings for own and managed consultation hours of an object. More... | |
Protected Member Functions | |
setId (int $a_id) | |
read () | |
Protected Attributes | |
ilDBInterface | $db |
ilObjUser | $user |
Private Attributes | |
int | $id = 0 |
int | $obj_id = 0 |
int | $deadline = 0 |
int | $num_bookings = 1 |
array | $target_obj_ids = [] |
Booking definition.
Definition at line 25 of file class.ilBookingEntry.php.
ilBookingEntry::__construct | ( | int | $a_booking_id = 0 | ) |
Constructor.
Definition at line 40 of file class.ilBookingEntry.php.
References $DIC, getId(), read(), setId(), and ILIAS\Repository\user().
ilBookingEntry::book | ( | int | $a_entry_id, |
?int | $a_user_id = null |
||
) |
book calendar entry for user
Definition at line 608 of file class.ilBookingEntry.php.
References hasBooked(), and ILIAS\Repository\user().
ilBookingEntry::cancelBooking | ( | int | $a_entry_id, |
?int | $a_user_id = null |
||
) |
cancel calendar booking for user
Definition at line 625 of file class.ilBookingEntry.php.
References ilDateTime\_before(), deleteBooking(), hasBooked(), IL_CAL_UNIX, ilCalendarMailNotification\TYPE_BOOKING_CANCELLATION, and ILIAS\Repository\user().
ilBookingEntry::delete | ( | ) |
Definition at line 198 of file class.ilBookingEntry.php.
References getId().
ilBookingEntry::deleteBooking | ( | int | $a_entry_id, |
int | $a_user_id | ||
) |
Delete booking.
Definition at line 649 of file class.ilBookingEntry.php.
Referenced by cancelBooking().
ilBookingEntry::getCurrentBookings | ( | int | $a_entry_id | ) |
get current bookings
int | $a_entry_id |
Definition at line 449 of file class.ilBookingEntry.php.
References $res, and ILIAS\Repository\int().
Referenced by ilConsultationHoursGUI\deleteAppointments(), and ilConsultationHoursGUI\sendMailToSelectedUsers().
ilBookingEntry::getCurrentNumberOfBookings | ( | int | $a_entry_id | ) |
get current number of bookings
Definition at line 433 of file class.ilBookingEntry.php.
Referenced by ilConsultationHoursGUI\assignUsersToAppointment(), isAppointmentBookableForUser(), and isBookedOut().
ilBookingEntry::getDeadlineHours | ( | ) |
Definition at line 103 of file class.ilBookingEntry.php.
References $deadline.
Referenced by ilConsultationHoursGUI\edit(), isAppointmentBookableForUser(), isBookedOut(), save(), and update().
ilBookingEntry::getId | ( | ) |
Definition at line 82 of file class.ilBookingEntry.php.
References $id.
Referenced by __construct(), ilConsultationHoursGUI\createAppointments(), delete(), ilConsultationHourUtils\findCalendarAppointmentsForBooking(), read(), ilConsultationHoursGUI\rewriteBookingIdsForAppointments(), save(), and update().
|
static |
Get instance by calendar entry.
int | $id |
Definition at line 281 of file class.ilBookingEntry.php.
References null.
Referenced by ilConsultationHoursGUI\assignUsersToAppointment(), ilConsultationHoursGUI\deleteAppointments(), and ilConsultationHoursGUI\rewriteBookingIdsForAppointments().
ilBookingEntry::getNumberOfBookings | ( | ) |
Definition at line 113 of file class.ilBookingEntry.php.
References $num_bookings.
Referenced by ilConsultationHoursGUI\assignUsersToAppointment(), ilConsultationHoursGUI\edit(), isAppointmentBookableForUser(), isBookedOut(), ILIAS\Calendar\ConsultationHours\BookingDataProvider\isFiltered(), save(), and update().
ilBookingEntry::getObjId | ( | ) |
Definition at line 93 of file class.ilBookingEntry.php.
References $obj_id.
Referenced by isBookedOut(), isOwner(), save(), and update().
ilBookingEntry::getTargetObjIds | ( | ) |
Definition at line 129 of file class.ilBookingEntry.php.
References $target_obj_ids.
Referenced by ilConsultationHoursGUI\edit(), and isTargetObjectVisible().
ilBookingEntry::hasBooked | ( | int | $a_entry_id, |
?int | $a_user_id = null |
||
) |
get current number of bookings
Definition at line 535 of file class.ilBookingEntry.php.
References ILIAS\Repository\user().
Referenced by book(), cancelBooking(), and isBookedOut().
|
static |
Check if object has assigned consultation hour appointments.
Definition at line 375 of file class.ilBookingEntry.php.
References $DIC, $ilDB, $res, ilDBConstants\FETCHMODE_OBJECT, and ilDBConstants\T_INTEGER.
Referenced by ilExportFieldsInfo\getSelectableFieldsInfo(), and ilMemberExportGUI\initSettingsForm().
ilBookingEntry::isAppointmentBookableForUser | ( | int | $a_app_id, |
int | $a_user_id | ||
) |
Check if a calendar appointment is bookable for a specific user.
Definition at line 583 of file class.ilBookingEntry.php.
References ilDateTime\_after(), ANONYMOUS_USER_ID, getCurrentNumberOfBookings(), getDeadlineHours(), getNumberOfBookings(), IL_CAL_HOUR, and IL_CAL_UNIX.
|
static |
Which objects are bookable?
int[] | $a_obj_ids | |
int | null | $a_target_obj_id |
Definition at line 297 of file class.ilBookingEntry.php.
References $DIC, $ilDB, $res, ilDBConstants\FETCHMODE_OBJECT, and ILIAS\Repository\int().
ilBookingEntry::isBookedOut | ( | int | $a_entry_id, |
bool | $a_check_current_user = false |
||
) |
get current number of bookings
Definition at line 555 of file class.ilBookingEntry.php.
References getCurrentNumberOfBookings(), getDeadlineHours(), getNumberOfBookings(), getObjId(), hasBooked(), IL_CAL_UNIX, and ILIAS\Repository\user().
ilBookingEntry::isOwner | ( | ?int | $a_user_id = null | ) |
check if current (or given) user is entry owner
int | null | $a_user_id |
Definition at line 237 of file class.ilBookingEntry.php.
References getObjId(), and ILIAS\Repository\user().
ilBookingEntry::isTargetObjectVisible | ( | int | $a_ref_id | ) |
Check if target ref id is visible.
Definition at line 137 of file class.ilBookingEntry.php.
References ilObject\_lookupObjId(), and getTargetObjIds().
|
static |
Consultation hours are offered if 1) consultation hour owner is admin or tutor and no object assignment 2) object is assigned to consultation hour.
int[] | $a_obj_ids |
int[] | $a_user_ids |
Definition at line 328 of file class.ilBookingEntry.php.
References $DIC, $ilDB, $res, ilDBConstants\FETCHMODE_OBJECT, ILIAS\Repository\int(), and ilCalendarCategory\TYPE_CH.
Referenced by ilConsultationHourUtils\getConsultationHourLinksForRepositoryObject(), ilCalendarBlockGUI\getHTML(), and ilCalendarCategories\readAllConsultationHoursCalendarOfContainer().
|
static |
Definition at line 398 of file class.ilBookingEntry.php.
References $DIC, $ilDB, $res, and ilDBConstants\FETCHMODE_OBJECT.
Referenced by ilAppointmentPresentationConsultationHoursGUI\collectPropertiesAndActions(), ilConsultationHourBookingTableGUI\parse(), ILIAS\Calendar\ConsultationHours\BookingDataProvider\read(), and ilCalendarMailNotification\send().
|
static |
Lookup booked users for appointment.
int | $a_app_id |
Definition at line 465 of file class.ilBookingEntry.php.
References $DIC, $ilDB, $res, and ILIAS\Repository\int().
Referenced by ilConsultationHourBookingTableGUI\parse().
|
static |
Lookup booking for an object and user.
int | $a_obj_id | |
int | $a_usr_id |
Definition at line 486 of file class.ilBookingEntry.php.
References $DIC, $ilDB, $res, ilDBConstants\FETCHMODE_OBJECT, IL_CAL_DATETIME, IL_CAL_UNIX, ILIAS\Repository\int(), ilDBConstants\T_INTEGER, and ilTimeZone\UTC.
|
static |
Lookup bookings of user.
int[] | |
int | |
?ilDateTime |
Definition at line 59 of file class.ilBookingEntry.php.
References $DIC, $ilDB, $res, ilDBConstants\FETCHMODE_OBJECT, and ILIAS\Repository\int().
Referenced by ilConsultationHoursGUI\assignUsersToAppointment().
|
static |
Lookup bookings for own and managed consultation hours of an object.
Definition at line 517 of file class.ilBookingEntry.php.
References ilObjUser\_lookupFullname(), and ilConsultationHourUtils\lookupManagedUsers().
Referenced by ilGroupParticipantsTableGUI\parse(), ilCourseParticipantsTableGUI\parse(), and ilMemberExport\write().
|
protected |
Definition at line 208 of file class.ilBookingEntry.php.
References $res, ilDBConstants\FETCHMODE_ASSOC, ilDBConstants\FETCHMODE_OBJECT, getId(), ILIAS\Repository\int(), setDeadlineHours(), setNumberOfBookings(), and setObjId().
Referenced by __construct().
|
static |
Remove unused booking entries.
Definition at line 251 of file class.ilBookingEntry.php.
References $DIC, $ilDB, $q, and ilCalendarCategory\TYPE_CH.
Referenced by ilConsultationHoursGUI\deleteAppointments(), and ilConsultationHoursGUI\updateMulti().
ilBookingEntry::save | ( | ) |
Definition at line 148 of file class.ilBookingEntry.php.
References getDeadlineHours(), getId(), getNumberOfBookings(), getObjId(), and setId().
Referenced by ilConsultationHoursGUI\createNewBookingEntry(), and ilConsultationHoursGUI\saveSequence().
ilBookingEntry::setDeadlineHours | ( | int | $a_hours | ) |
Definition at line 98 of file class.ilBookingEntry.php.
Referenced by ilConsultationHoursGUI\createNewBookingEntry(), read(), and ilConsultationHoursGUI\saveSequence().
|
protected |
Definition at line 77 of file class.ilBookingEntry.php.
Referenced by __construct(), and save().
ilBookingEntry::setNumberOfBookings | ( | int | $a_num | ) |
Definition at line 108 of file class.ilBookingEntry.php.
Referenced by ilConsultationHoursGUI\createNewBookingEntry(), read(), and ilConsultationHoursGUI\saveSequence().
ilBookingEntry::setObjId | ( | int | $a_id | ) |
Definition at line 88 of file class.ilBookingEntry.php.
Referenced by ilConsultationHoursGUI\createNewBookingEntry(), read(), and ilConsultationHoursGUI\saveSequence().
ilBookingEntry::setTargetObjIds | ( | ?array | $a_obj_id | ) |
int[]|null | $a_obj_id |
Definition at line 121 of file class.ilBookingEntry.php.
Referenced by ilConsultationHoursGUI\createNewBookingEntry(), and ilConsultationHoursGUI\saveSequence().
ilBookingEntry::update | ( | ) |
Definition at line 170 of file class.ilBookingEntry.php.
References getDeadlineHours(), getId(), getNumberOfBookings(), and getObjId().
|
static |
Write booking message.
Definition at line 417 of file class.ilBookingEntry.php.
Referenced by ilConsultationHourUtils\bookAppointment().
|
protected |
Definition at line 27 of file class.ilBookingEntry.php.
|
private |
Definition at line 33 of file class.ilBookingEntry.php.
Referenced by getDeadlineHours().
|
private |
Definition at line 30 of file class.ilBookingEntry.php.
Referenced by getId().
|
private |
Definition at line 34 of file class.ilBookingEntry.php.
Referenced by getNumberOfBookings().
|
private |
Definition at line 31 of file class.ilBookingEntry.php.
Referenced by getObjId().
|
private |
Definition at line 35 of file class.ilBookingEntry.php.
Referenced by getTargetObjIds().
|
protected |
Definition at line 28 of file class.ilBookingEntry.php.