27 protected \ilDBInterface
$db;
42 if (isset(self::$pool_loaded[$pool_id]) && self::$pool_loaded[$pool_id]) {
47 'SELECT s.booking_schedule_id,s.title,' .
48 'MAX(o.schedule_id) AS object_has_schedule' .
49 ' FROM booking_schedule s' .
50 ' LEFT JOIN booking_object o ON (s.booking_schedule_id = o.schedule_id)' .
51 ' WHERE s.pool_id = ' . $db->quote($pool_id,
'integer') .
52 ' GROUP BY s.booking_schedule_id,s.title' .
56 self::$pool_schedules[$pool_id] = [];
58 while ($row = $db->fetchAssoc($set)) {
59 if (!$row[
'object_has_schedule']) {
60 $row[
'is_used'] =
false;
62 $row[
'is_used'] =
true;
64 self::$raw_data[$row[
"booking_schedule_id"]] = $row;
65 self::$pool_schedules[$pool_id][] = $row;
68 self::$pool_loaded[$pool_id] =
true;
75 return self::$pool_schedules[$pool_id] ?? [];
82 return count(self::$pool_schedules[$pool_id] ?? []) > 0;
89 $list[$data[
"booking_schedule_id"]] = $data[
"title"];
98 $schedules[$data[
"booking_schedule_id"]] =
$data;
getScheduleData(int $pool_id)
getScheduleList(int $pool_id)
Repo class for schedules.
getScheduleDataForPool(int $pool_id)
query(string $query)
Run a (read-only) Query on the database.
hasSchedules(int $pool_id)
static array $pool_loaded
__construct(\ilDBInterface $db)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
loadDataOfPool(int $pool_id)
static array $pool_schedules