ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
ILIAS\BookingManager\Objects\ObjectEvent Class Reference
+ Collaboration diagram for ILIAS\BookingManager\Objects\ObjectEvent:

Public Member Functions

 handleDeletion (array $booking_pool_ref_ids)
 

Detailed Description

Definition at line 27 of file ObjectEvent.php.

Member Function Documentation

◆ handleDeletion()

ILIAS\BookingManager\Objects\ObjectEvent::handleDeletion ( array  $booking_pool_ref_ids)

Definition at line 29 of file ObjectEvent.php.

29 : void
30 {
31 foreach (array_unique($booking_pool_ref_ids) as $booking_pool_ref_id) {
32 if (!is_numeric($booking_pool_ref_id)) {
33 continue;
34 }
35 $booking_pool_ref_id = (int) $booking_pool_ref_id;
36
37 if (!ilObject::_exists($booking_pool_ref_id, true, 'book')) {
38 continue;
39 }
40
41 $booking_pool = new ilObjBookingPool($booking_pool_ref_id, true);
42
43 foreach (ilBookingObject::getList($booking_pool->getId()) as $booking_object) {
44 $booking_object_id = $booking_object['booking_object_id'] ?? null;
45 if ($booking_object_id === null) {
46 continue;
47 }
48
49 (new ilBookingObject($booking_object_id))->deleteReservationsAndCalEntries($booking_object_id);
50 }
51 }
52 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getList(int $a_pool_id, ?string $a_title=null)
Get list of booking objects.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _exists(int $id, bool $reference=false, ?string $type=null)
checks if an object exists in object_data

References ilObject\_exists(), ilBookingObject\getList(), and ILIAS\Repository\int().

+ Here is the call graph for this function:

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