ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilObjBookingPool Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilObjBookingPool:
+ Collaboration diagram for ilObjBookingPool:

Public Member Functions

 __construct (int $a_id=0, bool $a_call_by_reference=true)
 
 create ()
 
 update ()
 
 read ()
 
 delete ()
 
 cloneObject (int $target_id, int $copy_id=0, bool $omit_tree=false)
 
 setOffline (bool $a_value=true)
 
 isOffline ()
 
 setMessages (bool $a_value=true)
 
 usesMessages ()
 
 setPublicLog (bool $a_value=true)
 Toggle public log property. More...
 
 hasPublicLog ()
 
 setScheduleType (int $a_value)
 
 getScheduleType ()
 
 setReminderStatus (int $a_val)
 
 getReminderStatus ()
 
 setReminderDay (int $a_val)
 
 getReminderDay ()
 
 setPreferenceNumber (int $a_val)
 
 getPreferenceNumber ()
 
 setPreferenceDeadline (int $a_val)
 
 getPreferenceDeadline ()
 
 setOverallLimit (?int $a_value=null)
 Set overall / global booking limit. More...
 
 getOverallLimit ()
 
 setReservationFilterPeriod (?int $a_value=null)
 Set reservation filter period default. More...
 
 getReservationFilterPeriod ()
 
- Public Member Functions inherited from ilObject
 getObjectProperties ()
 
 flushObjectProperties ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 processAutoRating ()
 
 read ()
 
 getId ()
 
 setId (int $id)
 
 setRefId (int $ref_id)
 
 getRefId ()
 
 getType ()
 
 setType (string $type)
 
 getPresentationTitle ()
 get presentation title Normally same as title Overwritten for sessions More...
 
 getTitle ()
 
 getUntranslatedTitle ()
 Get untranslated object title WebDAV needs to access the untranslated title of an object. More...
 
 setTitle (string $title)
 
 getDescription ()
 
 setDescription (string $description)
 
 getLongDescription ()
 get object long description (stored in object_description) More...
 
 getImportId ()
 
 setImportId (string $import_id)
 
 setOfflineStatus (bool $status)
 
 getOfflineStatus ()
 
 supportsOfflineHandling ()
 
 getOwner ()
 
 getOwnerName ()
 get full name of object owner More...
 
 setOwner (int $usr_id)
 
 getCreateDate ()
 Get create date in YYYY-MM-DD HH-MM-SS format. More...
 
 getLastUpdateDate ()
 Get last update date in YYYY-MM-DD HH-MM-SS format. More...
 
 create ()
 note: title, description and type should be set when this function is called More...
 
 update ()
 
 MDUpdateListener (string $element)
 Metadata update listener. More...
 
 createMetaData ()
 
 updateMetaData ()
 
 deleteMetaData ()
 
 updateOwner ()
 update owner of object in db More...
 
 putInTree (int $parent_ref_id)
 maybe this method should be in tree object!? More...
 
 setPermissions (int $parent_ref_id)
 
 setParentRolePermissions (int $parent_ref_id)
 Initialize the permissions of parent roles (local roles of categories, global roles...) This method is overwritten in e.g. More...
 
 createReference ()
 creates reference for object More...
 
 countReferences ()
 
 delete ()
 delete object or referenced object (in the case of a referenced object, object data is only deleted if last reference is deleted) This function removes an object entirely from system!! More...
 
 initDefaultRoles ()
 init default roles settings Purpose of this function is to create a local role folder and local roles, that are needed depending on the object type. More...
 
 applyDidacticTemplate (int $tpl_id)
 
 getXMLZip ()
 
 getHTMLDirectory ()
 
 appendCopyInfo (int $target_id, int $copy_id)
 Prepend Copy info if object with same name exists in that container. More...
 
 cloneDependencies (int $target_id, int $copy_id)
 Clone object dependencies. More...
 
 cloneMetaData (ilObject $target_obj)
 Copy meta data. More...
 
 selfOrParentWithRatingEnabled ()
 
 getPossibleSubObjects (bool $filter=true)
 get all possible sub objects of this type the object can decide which types of sub objects are possible jut in time overwrite if the decision distinguish from standard model More...
 

Static Public Member Functions

static getPoolsWithReminders ()
 Get pools with reminders. More...
 
static writeLastReminderTimestamp (int $a_obj_id, int $a_ts)
 
static _lookupOnline (int $a_obj_id)
 
static getAdvancedMDFields (int $a_ref_id)
 
- Static Public Member Functions inherited from ilObject
static _lookupObjIdByImportId (string $import_id)
 Get (latest) object id for an import id. More...
 
static _lookupImportId (int $obj_id)
 
static _lookupOwnerName (int $owner_id)
 Lookup owner name for owner id. More...
 
static _getIdForImportId (string $import_id)
 
static _getAllReferences (int $id)
 get all reference ids for object ID More...
 
static _lookupTitle (int $obj_id)
 
static lookupOfflineStatus (int $obj_id)
 Lookup offline status using objectDataCache. More...
 
static _lookupOwner (int $obj_id)
 Lookup owner user ID for object ID. More...
 
static _getIdsForTitle (string $title, string $type='', bool $partial_match=false)
 
static _lookupDescription (int $obj_id)
 
static _lookupLastUpdate (int $obj_id, bool $formatted=false)
 
static _getLastUpdateOfObjects (array $obj_ids)
 
static _lookupObjId (int $ref_id)
 
static _setDeletedDate (int $ref_id, int $deleted_by)
 
static setDeletedDates (array $ref_ids, int $user_id)
 
static _resetDeletedDate (int $ref_id)
 
static _lookupDeletedDate (int $ref_id)
 
static _writeTitle (int $obj_id, string $title)
 write title to db (static) More...
 
static _writeDescription (int $obj_id, string $desc)
 write description to db (static) More...
 
static _writeImportId (int $obj_id, string $import_id)
 write import id to db (static) More...
 
static _lookupType (int $id, bool $reference=false)
 
static _isInTrash (int $ref_id)
 
static _hasUntrashedReference (int $obj_id)
 checks whether an object has at least one reference that is not in trash More...
 
static _lookupObjectId (int $ref_id)
 
static _getObjectsDataForType (string $type, bool $omit_trash=false)
 get all objects of a certain type More...
 
static _exists (int $id, bool $reference=false, ?string $type=null)
 checks if an object exists in object_data More...
 
static _getObjectsByType (string $obj_type="", int $owner=null)
 
static _prepareCloneSelection (array $ref_ids, string $new_type, bool $show_path=true)
 Prepare copy wizard object selection. More...
 
static _getIcon (int $obj_id=0, string $size="big", string $type="", bool $offline=false)
 Get icon for repository item. More...
 
static collectDeletionDependencies (array &$deps, int $ref_id, int $obj_id, string $type, int $depth=0)
 Collect deletion dependencies. More...
 
static getDeletionDependencies (int $obj_id)
 Get deletion dependencies. More...
 
static getLongDescriptions (array $obj_ids)
 
static getAllOwnedRepositoryObjects (int $user_id)
 
static fixMissingTitles ($type, array &$obj_title_map)
 Try to fix missing object titles. More...
 
static _lookupCreationDate (int $obj_id)
 
static _getObjectTypeIdByTitle (string $type, \ilDBInterface $ilDB=null)
 

Data Fields

const TYPE_FIX_SCHEDULE = 1
 
const TYPE_NO_SCHEDULE = 2
 
const TYPE_NO_SCHEDULE_PREFERENCES = 3
 
- Data Fields inherited from ilObject
const TITLE_LENGTH = 255
 
const DESC_LENGTH = 128
 
const LONG_DESC_LENGTH = 4000
 
const TABLE_OBJECT_DATA = "object_data"
 
array $objectList
 
string $untranslatedTitle
 

Protected Member Functions

 getDBFields ()
 Parse properties for sql statements. More...
 
- Protected Member Functions inherited from ilObject
 doMDUpdateListener (string $a_element)
 
 beforeMDUpdateListener (string $a_element)
 
 doCreateMetaData ()
 
 beforeCreateMetaData ()
 
 doUpdateMetaData ()
 
 beforeUpdateMetaData ()
 
 doDeleteMetaData ()
 
 beforeDeleteMetaData ()
 
 handleAutoRating ()
 
 hasAutoRating ()
 

Protected Attributes

ILIAS BookingManager InternalDomainService $domain
 
bool $offline = true
 
bool $public_log = false
 
int $schedule_type = 0
 
int $overall_limit = null
 
int $reservation_period = null
 
int $reminder_status = 0
 
int $reminder_day = 1
 
int $pref_deadline = 0
 
int $preference_nr = 0
 
bool $messages = false
 
- Protected Attributes inherited from ilObject
ilLogger $obj_log
 
ILIAS $ilias
 
ilObjectDefinition $obj_definition
 
ilDBInterface $db
 
ilLogger $log
 
ilErrorHandling $error
 
ilTree $tree
 
ilAppEventHandler $app_event_handler
 
ilRbacAdmin $rbac_admin
 
ilRbacReview $rbac_review
 
ilObjUser $user
 
ilLanguage $lng
 
bool $call_by_reference
 
int $max_title = self::TITLE_LENGTH
 
int $max_desc = self::DESC_LENGTH
 
bool $add_dots = true
 
int $ref_id = null
 
string $type = ""
 
string $title = ""
 
string $desc = ""
 
string $long_desc = ""
 
int $owner = 0
 
string $create_date = ""
 
string $last_update = ""
 
string $import_id = ""
 
bool $register = false
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Class ilObjBookingPool

Author
Jörg Lützenkirchen luetz.nosp@m.enki.nosp@m.rchen.nosp@m.@lei.nosp@m.fos.c.nosp@m.om

Definition at line 24 of file class.ilObjBookingPool.php.

Constructor & Destructor Documentation

◆ __construct()

ilObjBookingPool::__construct ( int  $a_id = 0,
bool  $a_call_by_reference = true 
)

Definition at line 43 of file class.ilObjBookingPool.php.

References $DIC, ILIAS\MetaData\Repository\Validation\Data\__construct(), and setScheduleType().

46  {
47  global $DIC;
48 
49  $this->db = $DIC->database();
50  $this->type = "book";
51  $this->setScheduleType(self::TYPE_FIX_SCHEDULE);
52  parent::__construct($a_id, $a_call_by_reference);
53  $this->domain = $DIC->bookingManager()->internal()->domain();
54  }
global $DIC
Definition: feed.php:28
__construct(VocabulariesInterface $vocabularies)
+ Here is the call graph for this function:

Member Function Documentation

◆ _lookupOnline()

static ilObjBookingPool::_lookupOnline ( int  $a_obj_id)
static

Definition at line 352 of file class.ilObjBookingPool.php.

References $DIC, and $ilDB.

Referenced by ilObjBookingPoolListGUI\getProperties().

352  : bool
353  {
354  global $DIC;
355 
356  $ilDB = $DIC->database();
357 
358  $set = $ilDB->query("SELECT pool_offline" .
359  " FROM booking_settings" .
360  " WHERE booking_pool_id = " . $ilDB->quote($a_obj_id, "integer"));
361  $row = $ilDB->fetchAssoc($set);
362  return !$row["pool_offline"];
363  }
global $DIC
Definition: feed.php:28
+ Here is the caller graph for this function:

◆ cloneObject()

ilObjBookingPool::cloneObject ( int  $target_id,
int  $copy_id = 0,
bool  $omit_tree = false 
)

Definition at line 215 of file class.ilObjBookingPool.php.

References ilObject\$title, ilCopyWizardOptions\_getInstance(), ilObject\getId(), ilBookingObject\getList(), getOverallLimit(), getPreferenceDeadline(), getPreferenceNumber(), getReminderDay(), getReminderStatus(), getScheduleType(), hasPublicLog(), isOffline(), and usesMessages().

215  : ?ilObject
216  {
217  $new_obj = parent::cloneObject($target_id, $copy_id, $omit_tree);
218 
219  $schedule_manager = $this->domain->schedules($this->getId());
220 
221  if ($new_obj !== null) {
222  //copy online status if object is not the root copy object
223  $cp_options = ilCopyWizardOptions::_getInstance($copy_id);
224 
225  if (!$cp_options->isRootNode($this->getRefId())) {
226  $new_obj->setOffline($this->isOffline());
227  }
228 
229  $new_obj->setScheduleType($this->getScheduleType());
230  $new_obj->setPublicLog($this->hasPublicLog());
231  $new_obj->setOverallLimit($this->getOverallLimit());
232  $new_obj->setReminderStatus($this->getReminderStatus());
233  $new_obj->setReminderDay($this->getReminderDay());
234  $new_obj->setPreferenceNumber($this->getPreferenceNumber());
235  $new_obj->setPreferenceDeadline($this->getPreferenceDeadline());
236  $new_obj->setMessages($this->usesMessages());
237 
238  $smap = null;
239  if ($this->getScheduleType() === self::TYPE_FIX_SCHEDULE) {
240  // schedules
241  foreach ($schedule_manager->getScheduleList() as $schedule_id => $title) {
242  $schedule = new ilBookingSchedule($schedule_id);
243  $smap[$schedule_id] = $schedule->doClone($new_obj->getId());
244  }
245  }
246 
247  // objects
248  foreach (ilBookingObject::getList($this->getId()) as $item) {
249  $bobj = new ilBookingObject($item["booking_object_id"]);
250  $bobj->doClone($new_obj->getId(), $smap);
251  }
252 
253  $new_obj->update();
254 
255  return $new_obj;
256  }
257  return null;
258  }
string $title
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _getInstance(int $a_copy_id)
static getList(int $a_pool_id, string $a_title=null)
Get list of booking objects.
+ Here is the call graph for this function:

◆ create()

ilObjBookingPool::create ( )

Definition at line 75 of file class.ilObjBookingPool.php.

References ilObject\$db, $ilDB, and getDBFields().

75  : int
76  {
77  $ilDB = $this->db;
78 
79  $new_id = parent::create();
80 
81  $fields = $this->getDBFields();
82  $fields["booking_pool_id"] = array("integer", $new_id);
83 
84  $ilDB->insert("booking_settings", $fields);
85 
86  return $new_id;
87  }
getDBFields()
Parse properties for sql statements.
ilDBInterface $db
+ Here is the call graph for this function:

◆ delete()

ilObjBookingPool::delete ( )

Definition at line 173 of file class.ilObjBookingPool.php.

References ilObject\$db, $id, $ilDB, ilObject\getId(), and ilObject\getRefId().

173  : bool
174  {
175  $ilDB = $this->db;
176 
177  $id = $this->getId();
178 
179  if ($this->referenced) {
180  $use_repo = new ilObjUseBookDBRepository($ilDB);
181  $use_repo->deleteEntriesOfBookRefId($this->getRefId());
182  }
183 
184  // always call parent delete function first!!
185  if (!parent::delete()) {
186  return false;
187  }
188 
189  // put here your module specific stuff
190 
191  $ilDB->manipulate('DELETE FROM booking_settings' .
192  ' WHERE booking_pool_id = ' . $ilDB->quote($id, 'integer'));
193 
194  $ilDB->manipulate('DELETE FROM booking_schedule' .
195  ' WHERE pool_id = ' . $ilDB->quote($id, 'integer'));
196 
197  $objects = array();
198  $set = $ilDB->query('SELECT booking_object_id FROM booking_object' .
199  ' WHERE pool_id = ' . $ilDB->quote($id, 'integer'));
200  while ($row = $ilDB->fetchAssoc($set)) {
201  $objects[] = $row['booking_object_id'];
202  }
203 
204  if (count($objects)) {
205  $ilDB->manipulate('DELETE FROM booking_reservation' .
206  ' WHERE ' . $ilDB->in('object_id', $objects, '', 'integer'));
207  }
208 
209  $ilDB->manipulate('DELETE FROM booking_object' .
210  ' WHERE pool_id = ' . $ilDB->quote($id, 'integer'));
211 
212  return true;
213  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilDBInterface $db
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
+ Here is the call graph for this function:

◆ getAdvancedMDFields()

static ilObjBookingPool::getAdvancedMDFields ( int  $a_ref_id)
static

Definition at line 397 of file class.ilObjBookingPool.php.

References ilAdvancedMDRecord\_getSelectedRecordsByObject(), and ilAdvancedMDFieldDefinition\getInstancesByRecordId().

Referenced by ilBookingObjectsTableGUI\__construct(), and ilBookingReservationsTableGUI\__construct().

399  : array {
400  $fields = array();
401 
402  $recs = ilAdvancedMDRecord::_getSelectedRecordsByObject("book", $a_ref_id, "bobj");
403 
404  foreach ($recs as $record_obj) {
405  foreach (ilAdvancedMDFieldDefinition::getInstancesByRecordId($record_obj->getRecordId()) as $def) {
406  $field_id = $def->getFieldId();
407  $fields[$field_id] = array(
408  "id" => $field_id,
409  "title" => $def->getTitle(),
410  "type" => $def->getType()
411  );
412  }
413  }
414 
415  return $fields;
416  }
static _getSelectedRecordsByObject(string $a_obj_type, int $a_id, string $a_sub_type="", bool $is_ref_id=true)
static getInstancesByRecordId( $a_record_id, $a_only_searchable=false, string $language='')
Get definitions by record id.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getDBFields()

ilObjBookingPool::getDBFields ( )
protected

Parse properties for sql statements.

Definition at line 59 of file class.ilObjBookingPool.php.

References getOverallLimit(), getPreferenceDeadline(), getPreferenceNumber(), getReminderDay(), getReminderStatus(), getReservationFilterPeriod(), getScheduleType(), hasPublicLog(), isOffline(), and usesMessages().

Referenced by create(), and update().

59  : array
60  {
61  return array(
62  "schedule_type" => array("integer", $this->getScheduleType()),
63  "pool_offline" => array("integer", $this->isOffline()),
64  "public_log" => array("integer", $this->hasPublicLog()),
65  "ovlimit" => array("integer", $this->getOverallLimit()),
66  "reminder_status" => array("integer", $this->getReminderStatus()),
67  "reminder_day" => array("integer", $this->getReminderDay()),
68  "rsv_filter_period" => array("integer", $this->getReservationFilterPeriod()),
69  "preference_nr" => array("integer", $this->getPreferenceNumber()),
70  "pref_deadline" => array("integer", $this->getPreferenceDeadline()),
71  "messages" => array("integer", $this->usesMessages())
72  );
73  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getOverallLimit()

ilObjBookingPool::getOverallLimit ( )

Definition at line 373 of file class.ilObjBookingPool.php.

References $overall_limit.

Referenced by cloneObject(), and getDBFields().

373  : ?int
374  {
375  return $this->overall_limit;
376  }
+ Here is the caller graph for this function:

◆ getPoolsWithReminders()

static ilObjBookingPool::getPoolsWithReminders ( )
static

Get pools with reminders.

Definition at line 136 of file class.ilObjBookingPool.php.

References ilObject\$db, $DIC, ilDBInterface\fetchAssoc(), and ilDBInterface\queryF().

Referenced by ilBookCronNotification\sendNotifications().

136  : array
137  {
138  global $DIC;
139 
140  $db = $DIC->database();
141  $pools = [];
142  $set = $db->queryF(
143  "SELECT * FROM booking_settings " .
144  " WHERE reminder_status = %s " .
145  " AND reminder_day > %s " .
146  " AND pool_offline = %s ",
147  array("integer","integer","integer"),
148  array(1,0,0)
149  );
150  while ($rec = $db->fetchAssoc($set)) {
151  $pools[] = $rec;
152  }
153  return $pools;
154  }
fetchAssoc(ilDBStatement $statement)
global $DIC
Definition: feed.php:28
ilDBInterface $db
queryF(string $query, array $types, array $values)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPreferenceDeadline()

ilObjBookingPool::getPreferenceDeadline ( )
Returns
int preference deadline unix timestamp

Definition at line 347 of file class.ilObjBookingPool.php.

References $pref_deadline.

Referenced by cloneObject(), and getDBFields().

347  : int
348  {
349  return $this->pref_deadline;
350  }
+ Here is the caller graph for this function:

◆ getPreferenceNumber()

ilObjBookingPool::getPreferenceNumber ( )

Definition at line 331 of file class.ilObjBookingPool.php.

References $preference_nr.

Referenced by cloneObject(), and getDBFields().

331  : int
332  {
333  return $this->preference_nr;
334  }
+ Here is the caller graph for this function:

◆ getReminderDay()

ilObjBookingPool::getReminderDay ( )

Definition at line 321 of file class.ilObjBookingPool.php.

References $reminder_day.

Referenced by cloneObject(), and getDBFields().

321  : int
322  {
323  return $this->reminder_day;
324  }
+ Here is the caller graph for this function:

◆ getReminderStatus()

ilObjBookingPool::getReminderStatus ( )

Definition at line 311 of file class.ilObjBookingPool.php.

References $reminder_status.

Referenced by cloneObject(), and getDBFields().

311  : int
312  {
313  return $this->reminder_status;
314  }
+ Here is the caller graph for this function:

◆ getReservationFilterPeriod()

ilObjBookingPool::getReservationFilterPeriod ( )

Definition at line 387 of file class.ilObjBookingPool.php.

References $reservation_period.

Referenced by getDBFields().

387  : ?int
388  {
390  }
+ Here is the caller graph for this function:

◆ getScheduleType()

ilObjBookingPool::getScheduleType ( )

Definition at line 301 of file class.ilObjBookingPool.php.

References $schedule_type.

Referenced by ilBookingReservationsTableGUI\__construct(), cloneObject(), getDBFields(), and ILIAS\BookingManager\BookingProcess\GUIService\getProcessClassForPool().

301  : int
302  {
303  return $this->schedule_type;
304  }
+ Here is the caller graph for this function:

◆ hasPublicLog()

ilObjBookingPool::hasPublicLog ( )

Definition at line 291 of file class.ilObjBookingPool.php.

References $public_log.

Referenced by cloneObject(), and getDBFields().

291  : bool
292  {
293  return $this->public_log;
294  }
+ Here is the caller graph for this function:

◆ isOffline()

ilObjBookingPool::isOffline ( )

Definition at line 266 of file class.ilObjBookingPool.php.

References $offline.

Referenced by cloneObject(), and getDBFields().

266  : bool
267  {
268  return $this->offline;
269  }
+ Here is the caller graph for this function:

◆ read()

ilObjBookingPool::read ( )

Definition at line 109 of file class.ilObjBookingPool.php.

References ilObject\$db, $ilDB, ilObject\getId(), setMessages(), setOffline(), setOverallLimit(), setPreferenceDeadline(), setPreferenceNumber(), setPublicLog(), setReminderDay(), setReminderStatus(), setReservationFilterPeriod(), and setScheduleType().

109  : void
110  {
111  $ilDB = $this->db;
112 
113  parent::read();
114 
115  // put here object specific stuff
116  if ($this->getId()) {
117  $set = $ilDB->query('SELECT * FROM booking_settings' .
118  ' WHERE booking_pool_id = ' . $ilDB->quote($this->getId(), 'integer'));
119  $row = $ilDB->fetchAssoc($set);
120  $this->setOffline($row['pool_offline']);
121  $this->setPublicLog($row['public_log']);
122  $this->setScheduleType($row['schedule_type']);
123  $this->setOverallLimit($row['ovlimit']);
124  $this->setReminderStatus($row['reminder_status']);
125  $this->setReminderDay($row['reminder_day']);
126  $this->setReservationFilterPeriod($row['rsv_filter_period']);
127  $this->setPreferenceNumber($row['preference_nr']);
128  $this->setPreferenceDeadline($row['pref_deadline']);
129  $this->setMessages((bool) ((int) ($row['messages'] ?? 0)));
130  }
131  }
setOverallLimit(?int $a_value=null)
Set overall / global booking limit.
setPublicLog(bool $a_value=true)
Toggle public log property.
setMessages(bool $a_value=true)
ilDBInterface $db
setReservationFilterPeriod(?int $a_value=null)
Set reservation filter period default.
setOffline(bool $a_value=true)
+ Here is the call graph for this function:

◆ setMessages()

ilObjBookingPool::setMessages ( bool  $a_value = true)

Definition at line 271 of file class.ilObjBookingPool.php.

Referenced by read().

273  : void {
274  $this->messages = $a_value;
275  }
+ Here is the caller graph for this function:

◆ setOffline()

ilObjBookingPool::setOffline ( bool  $a_value = true)

Definition at line 260 of file class.ilObjBookingPool.php.

Referenced by read().

262  : void {
263  $this->offline = $a_value;
264  }
+ Here is the caller graph for this function:

◆ setOverallLimit()

ilObjBookingPool::setOverallLimit ( ?int  $a_value = null)

Set overall / global booking limit.

Definition at line 368 of file class.ilObjBookingPool.php.

Referenced by read().

368  : void
369  {
370  $this->overall_limit = $a_value;
371  }
+ Here is the caller graph for this function:

◆ setPreferenceDeadline()

ilObjBookingPool::setPreferenceDeadline ( int  $a_val)
Parameters
int$a_valpreference deadline unix timestamp

Definition at line 339 of file class.ilObjBookingPool.php.

Referenced by read().

339  : void
340  {
341  $this->pref_deadline = $a_val;
342  }
+ Here is the caller graph for this function:

◆ setPreferenceNumber()

ilObjBookingPool::setPreferenceNumber ( int  $a_val)

Definition at line 326 of file class.ilObjBookingPool.php.

Referenced by read().

326  : void
327  {
328  $this->preference_nr = $a_val;
329  }
+ Here is the caller graph for this function:

◆ setPublicLog()

ilObjBookingPool::setPublicLog ( bool  $a_value = true)

Toggle public log property.

Definition at line 285 of file class.ilObjBookingPool.php.

Referenced by read().

287  : void {
288  $this->public_log = $a_value;
289  }
+ Here is the caller graph for this function:

◆ setReminderDay()

ilObjBookingPool::setReminderDay ( int  $a_val)

Definition at line 316 of file class.ilObjBookingPool.php.

Referenced by read().

316  : void
317  {
318  $this->reminder_day = $a_val;
319  }
+ Here is the caller graph for this function:

◆ setReminderStatus()

ilObjBookingPool::setReminderStatus ( int  $a_val)

Definition at line 306 of file class.ilObjBookingPool.php.

Referenced by read().

306  : void
307  {
308  $this->reminder_status = $a_val;
309  }
+ Here is the caller graph for this function:

◆ setReservationFilterPeriod()

ilObjBookingPool::setReservationFilterPeriod ( ?int  $a_value = null)

Set reservation filter period default.

Definition at line 381 of file class.ilObjBookingPool.php.

Referenced by read().

383  : void {
384  $this->reservation_period = $a_value;
385  }
+ Here is the caller graph for this function:

◆ setScheduleType()

ilObjBookingPool::setScheduleType ( int  $a_value)

Definition at line 296 of file class.ilObjBookingPool.php.

Referenced by __construct(), and read().

296  : void
297  {
298  $this->schedule_type = $a_value;
299  }
+ Here is the caller graph for this function:

◆ update()

ilObjBookingPool::update ( )

Definition at line 89 of file class.ilObjBookingPool.php.

References ilObject\$db, $ilDB, getDBFields(), and ilObject\getId().

89  : bool
90  {
91  $ilDB = $this->db;
92 
93  if (!parent::update()) {
94  return false;
95  }
96 
97  // put here object specific stuff
98  if ($this->getId()) {
99  $ilDB->update(
100  "booking_settings",
101  $this->getDBFields(),
102  array("booking_pool_id" => array("integer", $this->getId()))
103  );
104  }
105 
106  return true;
107  }
getDBFields()
Parse properties for sql statements.
ilDBInterface $db
+ Here is the call graph for this function:

◆ usesMessages()

ilObjBookingPool::usesMessages ( )

Definition at line 277 of file class.ilObjBookingPool.php.

References $messages.

Referenced by cloneObject(), and getDBFields().

277  : bool
278  {
279  return $this->messages;
280  }
+ Here is the caller graph for this function:

◆ writeLastReminderTimestamp()

static ilObjBookingPool::writeLastReminderTimestamp ( int  $a_obj_id,
int  $a_ts 
)
static
Parameters
int$a_obj_idpool id
int$a_tstimestamp

Definition at line 160 of file class.ilObjBookingPool.php.

References ilObject\$db, $DIC, and ilDBInterface\update().

Referenced by ilBookCronNotification\sendNotifications().

163  : void {
164  global $DIC;
165  $db = $DIC->database();
166  $db->update("booking_settings", array(
167  "last_remind_ts" => array("integer", $a_ts)
168  ), array( // where
169  "booking_pool_id" => array("integer", $a_obj_id)
170  ));
171  }
update(string $table_name, array $values, array $where)
$where MUST contain existing columns only.
global $DIC
Definition: feed.php:28
ilDBInterface $db
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $domain

ILIAS BookingManager InternalDomainService ilObjBookingPool::$domain
protected

Definition at line 29 of file class.ilObjBookingPool.php.

◆ $messages

bool ilObjBookingPool::$messages = false
protected

Definition at line 40 of file class.ilObjBookingPool.php.

Referenced by usesMessages().

◆ $offline

bool ilObjBookingPool::$offline = true
protected

Definition at line 31 of file class.ilObjBookingPool.php.

Referenced by isOffline().

◆ $overall_limit

int ilObjBookingPool::$overall_limit = null
protected

Definition at line 34 of file class.ilObjBookingPool.php.

Referenced by getOverallLimit().

◆ $pref_deadline

int ilObjBookingPool::$pref_deadline = 0
protected

Definition at line 38 of file class.ilObjBookingPool.php.

Referenced by getPreferenceDeadline().

◆ $preference_nr

int ilObjBookingPool::$preference_nr = 0
protected

Definition at line 39 of file class.ilObjBookingPool.php.

Referenced by getPreferenceNumber().

◆ $public_log

bool ilObjBookingPool::$public_log = false
protected

Definition at line 32 of file class.ilObjBookingPool.php.

Referenced by hasPublicLog().

◆ $reminder_day

int ilObjBookingPool::$reminder_day = 1
protected

Definition at line 37 of file class.ilObjBookingPool.php.

Referenced by getReminderDay().

◆ $reminder_status

int ilObjBookingPool::$reminder_status = 0
protected

Definition at line 36 of file class.ilObjBookingPool.php.

Referenced by getReminderStatus().

◆ $reservation_period

int ilObjBookingPool::$reservation_period = null
protected

Definition at line 35 of file class.ilObjBookingPool.php.

Referenced by getReservationFilterPeriod().

◆ $schedule_type

int ilObjBookingPool::$schedule_type = 0
protected

Definition at line 33 of file class.ilObjBookingPool.php.

Referenced by getScheduleType().

◆ TYPE_FIX_SCHEDULE

◆ TYPE_NO_SCHEDULE

◆ TYPE_NO_SCHEDULE_PREFERENCES


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