|
ILIAS
release_6 Revision v6.24-5-g0c8bfefb3b8
|
Booking definition. More...
Collaboration diagram for ilBookingEntry:Public Member Functions | |
| __construct ($a_booking_id=0) | |
| Constructor. More... | |
| getId () | |
| Get id. More... | |
| setBookingGroup ($a_id) | |
| getBookingGroup () | |
| setObjId ($a_id) | |
| Set obj id. More... | |
| getObjId () | |
| get obj id More... | |
| setDeadlineHours ($a_hours) | |
| set deadline hours More... | |
| getDeadlineHours () | |
| get deadline hours More... | |
| setNumberOfBookings ($a_num) | |
| set number of bookings More... | |
| getNumberOfBookings () | |
| get number of bookings More... | |
| setTargetObjIds ($a_obj_id) | |
| set target object id More... | |
| getTargetObjIds () | |
| get target object id More... | |
| isTargetObjectVisible ($a_ref_id) | |
| Check if target ref id is visible. More... | |
| save () | |
| Save a new booking entry. More... | |
| update () | |
| Update an existing booking entry. More... | |
| delete () | |
| Delete. More... | |
| isOwner ($a_user_id=null) | |
| check if current (or given) user is entry owner More... | |
| getCurrentNumberOfBookings ($a_entry_id) | |
| get current number of bookings More... | |
| getCurrentBookings ($a_entry_id) | |
| get current bookings More... | |
| hasBooked ($a_entry_id, $a_user_id=null) | |
| get current number of bookings More... | |
| isBookedOut ($a_entry_id, $a_check_current_user=false) | |
| get current number of bookings More... | |
| isAppointmentBookableForUser ($a_app_id, $a_user_id) | |
| Check if a calendar appointment is bookable for a specific user. More... | |
| book ($a_entry_id, $a_user_id=false) | |
| book calendar entry for user More... | |
| cancelBooking ($a_entry_id, $a_user_id=false) | |
| cancel calendar booking for user More... | |
| deleteBooking ($a_entry_id, $a_user_id) | |
| Delete booking @global type $ilDB. More... | |
Static Public Member Functions | |
| static | resetGroup ($a_group_id) |
| Reset booking group (in case of deletion) @global type $ilDB. More... | |
| static | lookupBookingsOfUser ($a_app_ids, $a_usr_id, ilDateTime $start=null) |
| Lookup bookings if user. More... | |
| static | removeObsoleteEntries () |
| Remove unused booking entries. More... | |
| static | getInstanceByCalendarEntryId ($a_id) |
| Get instance by calendar entry. More... | |
| static | isBookable (array $a_obj_ids, $a_target_obj_id=null) |
| Which objects are bookable? More... | |
| static | lookupBookableUsersForObject ($a_obj_id, $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 ($a_obj_id, $a_usr_id) |
| Check if object has assigned consultation hour appointments. More... | |
| static | lookupBookingMessage ($a_entry_id, $a_usr_id) |
| static | writeBookingMessage ($a_entry_id, $a_usr_id, $a_message) |
| Write booking message. More... | |
| static | lookupBookingsForAppointment ($a_app_id) |
| Lookup booked users for appointment @global type $ilDB. More... | |
| static | lookupBookingsForObject ($a_obj_id, $a_usr_id) |
| Lookup booking for an object and user. More... | |
| static | lookupManagedBookingsForObject ($a_obj_id, $a_usr_id) |
| Lookup bookings for own and managed consultation hours of an object. More... | |
Protected Member Functions | |
| setId ($a_id) | |
| Set id. More... | |
| read () | |
| Read settings from db. More... | |
Protected Attributes | |
| $db | |
| $user | |
Private Attributes | |
| $id = 0 | |
| $obj_id = 0 | |
| $deadline = 0 | |
| $num_bookings = 1 | |
| $target_obj_ids = array() | |
| $booking_group = 0 | |
| ilBookingEntry::__construct | ( | $a_booking_id = 0 | ) |
Constructor.
Definition at line 37 of file class.ilBookingEntry.php.
References $DIC, getId(), read(), setId(), and user().
Here is the call graph for this function:| ilBookingEntry::book | ( | $a_entry_id, | |
$a_user_id = false |
|||
| ) |
book calendar entry for user
| int | $a_entry_id | |
| int | $a_user_id |
Definition at line 771 of file class.ilBookingEntry.php.
References $db, $ilDB, $ilUser, $user, hasBooked(), and ilCalendarMailNotification\TYPE_BOOKING_CONFIRMATION.
Here is the call graph for this function:| ilBookingEntry::cancelBooking | ( | $a_entry_id, | |
$a_user_id = false |
|||
| ) |
cancel calendar booking for user
| int | $a_entry_id | |
| int | $a_user_id |
Definition at line 800 of file class.ilBookingEntry.php.
References $db, $ilDB, $ilUser, $user, ilDateTime\_before(), deleteBooking(), hasBooked(), IL_CAL_UNIX, and ilCalendarMailNotification\TYPE_BOOKING_CANCELLATION.
Here is the call graph for this function:| ilBookingEntry::delete | ( | ) |
| ilBookingEntry::deleteBooking | ( | $a_entry_id, | |
| $a_user_id | |||
| ) |
Delete booking @global type $ilDB.
| type | $a_entry_id | |
| type | $a_user_id |
Definition at line 832 of file class.ilBookingEntry.php.
References $db, $ilDB, and $query.
Referenced by cancelBooking().
Here is the caller graph for this function:| ilBookingEntry::getBookingGroup | ( | ) |
Definition at line 115 of file class.ilBookingEntry.php.
References $booking_group.
Referenced by isAppointmentBookableForUser(), save(), and update().
Here is the caller graph for this function:| ilBookingEntry::getCurrentBookings | ( | $a_entry_id | ) |
get current bookings
| int | $a_entry_id |
Definition at line 560 of file class.ilBookingEntry.php.
| ilBookingEntry::getCurrentNumberOfBookings | ( | $a_entry_id | ) |
get current number of bookings
| int | $a_entry_id |
Definition at line 545 of file class.ilBookingEntry.php.
Referenced by isAppointmentBookableForUser(), and isBookedOut().
Here is the caller graph for this function:| ilBookingEntry::getDeadlineHours | ( | ) |
get deadline hours
Definition at line 153 of file class.ilBookingEntry.php.
References $deadline.
Referenced by isAppointmentBookableForUser(), isBookedOut(), save(), and update().
Here is the caller graph for this function:| ilBookingEntry::getId | ( | ) |
Get id.
Definition at line 105 of file class.ilBookingEntry.php.
References $id.
Referenced by __construct(), delete(), ilConsultationHourUtils\findCalendarAppointmentsForBooking(), read(), save(), and update().
Here is the caller graph for this function:
|
static |
Get instance by calendar entry.
| int | $id |
Definition at line 376 of file class.ilBookingEntry.php.
Referenced by ilConsultationHoursGUI\assignUsersToAppointment(), ilConsultationHoursGUI\assignUsersToGroup(), ilConsultationHoursGUI\delete(), and ilConsultationHoursGUI\rewriteBookingIdsForAppointments().
Here is the caller graph for this function:| ilBookingEntry::getNumberOfBookings | ( | ) |
get number of bookings
Definition at line 172 of file class.ilBookingEntry.php.
References $num_bookings.
Referenced by isAppointmentBookableForUser(), isBookedOut(), save(), and update().
Here is the caller graph for this function:| ilBookingEntry::getObjId | ( | ) |
get obj id
Definition at line 134 of file class.ilBookingEntry.php.
References $obj_id.
Referenced by isAppointmentBookableForUser(), isOwner(), save(), and update().
Here is the caller graph for this function:| ilBookingEntry::getTargetObjIds | ( | ) |
get target object id
Definition at line 191 of file class.ilBookingEntry.php.
References $target_obj_ids.
Referenced by isTargetObjectVisible().
Here is the caller graph for this function:| ilBookingEntry::hasBooked | ( | $a_entry_id, | |
$a_user_id = null |
|||
| ) |
get current number of bookings
| int | $a_entry_id | |
| int | $a_user_id |
Definition at line 659 of file class.ilBookingEntry.php.
References $db, $ilDB, $ilUser, $query, and $user.
Referenced by book(), cancelBooking(), and isBookedOut().
Here is the caller graph for this function:
|
static |
Check if object has assigned consultation hour appointments.
| type | $a_obj_id | |
| type | $a_usr_id |
Definition at line 477 of file class.ilBookingEntry.php.
References $DIC, $ilDB, $query, $res, and ilDBConstants\FETCHMODE_OBJECT.
Referenced by ilExportFieldsInfo\getSelectableFieldsInfo(), and ilMemberExportGUI\initSettingsForm().
Here is the caller graph for this function:| ilBookingEntry::isAppointmentBookableForUser | ( | $a_app_id, | |
| $a_user_id | |||
| ) |
Check if a calendar appointment is bookable for a specific user.
| type | $a_cal_entry_id | |
| type | $a_user_id |
Definition at line 717 of file class.ilBookingEntry.php.
References ilDateTime\_after(), ilConsultationHourAppointments\getAppointmentIdsByGroup(), getBookingGroup(), getCurrentNumberOfBookings(), getDeadlineHours(), getNumberOfBookings(), getObjId(), IL_CAL_HOUR, IL_CAL_UNIX, lookupBookingsOfUser(), and ilConsultationHourGroups\lookupMaxBookings().
Here is the call graph for this function:
|
static |
Which objects are bookable?
| array | $a_obj_ids | |
| int | $a_target_obj_id |
Definition at line 393 of file class.ilBookingEntry.php.
References $DIC, $ilDB, $query, $res, and ilDBConstants\FETCHMODE_OBJECT.
| ilBookingEntry::isBookedOut | ( | $a_entry_id, | |
$a_check_current_user = false |
|||
| ) |
get current number of bookings
| int | $a_entry_id | (calendar entry) |
| bool | $a_check_current_user |
Definition at line 683 of file class.ilBookingEntry.php.
References $deadline, $ilUser, $user, getCurrentNumberOfBookings(), getDeadlineHours(), getNumberOfBookings(), hasBooked(), and IL_CAL_UNIX.
Here is the call graph for this function:| ilBookingEntry::isOwner | ( | $a_user_id = null | ) |
check if current (or given) user is entry owner
| int | $a_user_id |
Definition at line 335 of file class.ilBookingEntry.php.
References $ilUser, $user, and getObjId().
Here is the call graph for this function:| ilBookingEntry::isTargetObjectVisible | ( | $a_ref_id | ) |
Check if target ref id is visible.
| type | $a_ref_id |
Definition at line 200 of file class.ilBookingEntry.php.
References $obj_id, ilObject\_lookupObjId(), and getTargetObjIds().
Here is the call graph for this function:
|
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.
| type | $a_obj_ids | |
| type | $a_user_ids |
Definition at line 425 of file class.ilBookingEntry.php.
References $DIC, $ilDB, $query, $res, ilDBConstants\FETCHMODE_OBJECT, and ilCalendarCategory\TYPE_CH.
Referenced by ilConsultationHourUtils\getConsultationHourLinksForRepositoryObject(), ilCalendarBlockGUI\getHTML(), and ilCalendarCategories\readAllConsultationHoursCalendarOfContainer().
Here is the caller graph for this function:
|
static |
Definition at line 501 of file class.ilBookingEntry.php.
References $DIC, $ilDB, $query, $res, and ilDBConstants\FETCHMODE_OBJECT.
Referenced by ilConsultationHourBookingTableGUI\parse().
Here is the caller graph for this function:
|
static |
Lookup booked users for appointment @global type $ilDB.
| type | $a_app_id |
Definition at line 579 of file class.ilBookingEntry.php.
References $DIC, $ilDB, $query, and $res.
Referenced by ilConsultationHoursGUI\confirmDelete(), and ilConsultationHourBookingTableGUI\parse().
Here is the caller graph for this function:
|
static |
Lookup booking for an object and user.
| type | $a_obj_id | |
| type | $a_usr_id |
Definition at line 602 of file class.ilBookingEntry.php.
References $DIC, $ilDB, $query, $res, ilDBConstants\FETCHMODE_OBJECT, IL_CAL_DATETIME, IL_CAL_UNIX, and ilTimeZone\UTC.
Referenced by lookupManagedBookingsForObject().
Here is the caller graph for this function:
|
static |
Lookup bookings if user.
| type | $a_app_ids | |
| type | $a_usr_id |
Definition at line 72 of file class.ilBookingEntry.php.
References $DIC, $ilDB, $query, $res, and ilDBConstants\FETCHMODE_OBJECT.
Referenced by ilConsultationHoursGUI\assignUsersToAppointment(), ilConsultationHoursGUI\assignUsersToGroup(), and isAppointmentBookableForUser().
Here is the caller graph for this function:
|
static |
Lookup bookings for own and managed consultation hours of an object.
| type | $a_obj_id | |
| type | $a_usr_id |
Definition at line 636 of file class.ilBookingEntry.php.
References ilObjUser\_lookupFullname(), lookupBookingsForObject(), and ilConsultationHourUtils\lookupManagedUsers().
Referenced by ilCourseParticipantsTableGUI\parse(), ilGroupParticipantsTableGUI\parse(), and ilMemberExport\write().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Read settings from db.
Definition at line 300 of file class.ilBookingEntry.php.
References $db, $ilDB, $query, $res, ilDBConstants\FETCHMODE_ASSOC, ilDBConstants\FETCHMODE_OBJECT, getId(), setBookingGroup(), setDeadlineHours(), setNumberOfBookings(), and setObjId().
Referenced by __construct().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Remove unused booking entries.
Definition at line 352 of file class.ilBookingEntry.php.
References $DIC, $ilDB, and ilCalendarCategory\TYPE_CH.
Referenced by ilConsultationHoursGUI\delete(), and ilConsultationHoursGUI\updateMulti().
Here is the caller graph for this function:
|
static |
Reset booking group (in case of deletion) @global type $ilDB.
| type | $a_group_id |
Definition at line 55 of file class.ilBookingEntry.php.
References $DIC, $ilDB, and $query.
Referenced by ilConsultationHourGroup\delete().
Here is the caller graph for this function:| ilBookingEntry::save | ( | ) |
Save a new booking entry.
Definition at line 215 of file class.ilBookingEntry.php.
References $db, $ilDB, $obj_id, $query, getBookingGroup(), getDeadlineHours(), getId(), getNumberOfBookings(), getObjId(), and setId().
Here is the call graph for this function:| ilBookingEntry::setBookingGroup | ( | $a_id | ) |
Definition at line 110 of file class.ilBookingEntry.php.
Referenced by read().
Here is the caller graph for this function:| ilBookingEntry::setDeadlineHours | ( | $a_hours | ) |
set deadline hours
| int | $a_hours |
Definition at line 144 of file class.ilBookingEntry.php.
Referenced by read().
Here is the caller graph for this function:
|
protected |
Set id.
| int | $a_id |
Definition at line 96 of file class.ilBookingEntry.php.
Referenced by __construct(), and save().
Here is the caller graph for this function:| ilBookingEntry::setNumberOfBookings | ( | $a_num | ) |
set number of bookings
| int | $a_num |
Definition at line 163 of file class.ilBookingEntry.php.
Referenced by read().
Here is the caller graph for this function:| ilBookingEntry::setObjId | ( | $a_id | ) |
Set obj id.
| int | $a_id |
Definition at line 125 of file class.ilBookingEntry.php.
Referenced by read().
Here is the caller graph for this function:| ilBookingEntry::setTargetObjIds | ( | $a_obj_id | ) |
set target object id
| int | $a_obj_id |
Definition at line 182 of file class.ilBookingEntry.php.
| ilBookingEntry::update | ( | ) |
Update an existing booking entry.
Definition at line 245 of file class.ilBookingEntry.php.
References $db, $ilDB, $obj_id, $query, getBookingGroup(), getDeadlineHours(), getId(), getNumberOfBookings(), and getObjId().
Here is the call graph for this function:
|
static |
Write booking message.
| type | $a_entry_id | |
| type | $a_usr_id | |
| type | $a_message |
Definition at line 523 of file class.ilBookingEntry.php.
References $DIC, $GLOBALS, $ilDB, and $query.
Referenced by ilCalendarAppointmentGUI\bookconfirmed().
Here is the caller graph for this function:
|
private |
Definition at line 31 of file class.ilBookingEntry.php.
Referenced by getBookingGroup().
|
protected |
Definition at line 18 of file class.ilBookingEntry.php.
Referenced by book(), cancelBooking(), delete(), deleteBooking(), getCurrentBookings(), getCurrentNumberOfBookings(), hasBooked(), read(), save(), and update().
|
private |
Definition at line 28 of file class.ilBookingEntry.php.
Referenced by getDeadlineHours(), and isBookedOut().
|
private |
Definition at line 25 of file class.ilBookingEntry.php.
Referenced by getId().
|
private |
Definition at line 29 of file class.ilBookingEntry.php.
Referenced by getNumberOfBookings().
|
private |
Definition at line 26 of file class.ilBookingEntry.php.
Referenced by getObjId(), isTargetObjectVisible(), save(), and update().
|
private |
Definition at line 30 of file class.ilBookingEntry.php.
Referenced by getTargetObjIds().
|
protected |
Definition at line 23 of file class.ilBookingEntry.php.
Referenced by book(), cancelBooking(), hasBooked(), isBookedOut(), and isOwner().