ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilBookingPrefAutoBooking.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2019 ILIAS open source, Extended GPL, see docs/LICENSE */
4
11{
15 public function __construct()
16 {
17 global $DIC;
18
19 $this->service = $DIC->bookingManager()->internal();
20 }
21
26 public function run()
27 {
29
30 $pref_repo = $service->repo()->getPreferencesRepo();
31 $book_repo = $service->repo()->getPreferenceBasedBookingRepo();
32
33 // for all pools with an overdue preference based booking
34 foreach ($book_repo->getPoolsWithOverdueBooking() as $pool_id) {
35 $pool = new ilObjBookingPool($pool_id, false);
36 $manager = $service->domain()->preferences($pool);
37
38 // get preferences and do the booking
39 $preferences = $pref_repo->getPreferences($pool_id);
40 $manager->storeBookings($preferences);
41 }
42 }
43}
An exception for terminatinating execution or to throw for unit testing.
Automatic booking of overdue pools using booking by preference.
Class ilObjBookingPool.
$service
Definition: result.php:17
$DIC
Definition: xapitoken.php:46