ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilBookingPrefAutoBooking.php
Go to the documentation of this file.
1<?php
2
24{
25 protected \ILIAS\BookingManager\InternalService $service;
26
27 public function __construct()
28 {
29 global $DIC;
30 $this->service = $DIC->bookingManager()->internal();
31 }
32
36 public function run(): void
37 {
39
40 $pref_repo = $service->repo()->preferences();
41 $book_repo = $service->repo()->preferenceBasedBooking();
42
43 // for all pools with an overdue preference based booking
44 foreach ($book_repo->getPoolsWithOverdueBooking() as $pool_id) {
45 $pool = new ilObjBookingPool($pool_id, false);
46 $manager = $service->domain()->preferences($pool);
47
48 // get preferences and do the booking
49 $preferences = $pref_repo->getPreferences($pool_id);
50 $manager->storeBookings($preferences);
51 }
52 }
53}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ILIAS BookingManager InternalService $service
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: shib_login.php:26