ILIAS  release_8 Revision v8.23
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 ()
 
 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
 __construct (int $id=0, bool $reference=true)
 
 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 $desc)
 
 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

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
 
- 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
 
int $id
 
bool $referenced
 
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 = ""
 
bool $offline = false
 
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 41 of file class.ilObjBookingPool.php.

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), and setScheduleType().

44  {
45  global $DIC;
46 
47  $this->db = $DIC->database();
48  $this->type = "book";
49  $this->setScheduleType(self::TYPE_FIX_SCHEDULE);
50  parent::__construct($a_id, $a_call_by_reference);
51  }
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ _lookupOnline()

static ilObjBookingPool::_lookupOnline ( int  $a_obj_id)
static

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

References $DIC, and $ilDB.

Referenced by ilObjBookingPoolListGUI\getProperties().

333  : bool
334  {
335  global $DIC;
336 
337  $ilDB = $DIC->database();
338 
339  $set = $ilDB->query("SELECT pool_offline" .
340  " FROM booking_settings" .
341  " WHERE booking_pool_id = " . $ilDB->quote($a_obj_id, "integer"));
342  $row = $ilDB->fetchAssoc($set);
343  return !$row["pool_offline"];
344  }
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 210 of file class.ilObjBookingPool.php.

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

210  : ?ilObject
211  {
212  $new_obj = parent::cloneObject($target_id, $copy_id, $omit_tree);
213 
214  if ($new_obj !== null) {
215  //copy online status if object is not the root copy object
216  $cp_options = ilCopyWizardOptions::_getInstance($copy_id);
217 
218  if (!$cp_options->isRootNode($this->getRefId())) {
219  $new_obj->setOffline($this->isOffline());
220  }
221 
222  $new_obj->setScheduleType($this->getScheduleType());
223  $new_obj->setPublicLog($this->hasPublicLog());
224  $new_obj->setOverallLimit($this->getOverallLimit());
225  $new_obj->setReminderStatus($this->getReminderStatus());
226  $new_obj->setReminderDay($this->getReminderDay());
227  $new_obj->setPreferenceNumber($this->getPreferenceNumber());
228  $new_obj->setPreferenceDeadline($this->getPreferenceDeadline());
229 
230  $smap = null;
231  if ($this->getScheduleType() === self::TYPE_FIX_SCHEDULE) {
232  // schedules
233  foreach (ilBookingSchedule::getList($this->getId()) as $item) {
234  $schedule = new ilBookingSchedule($item["booking_schedule_id"]);
235  $smap[$item["booking_schedule_id"]] = $schedule->doClone($new_obj->getId());
236  }
237  }
238 
239  // objects
240  foreach (ilBookingObject::getList($this->getId()) as $item) {
241  $bobj = new ilBookingObject($item["booking_object_id"]);
242  $bobj->doClone($new_obj->getId(), $smap);
243  }
244 
245  $new_obj->update();
246 
247  return $new_obj;
248  }
249  return null;
250  }
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 getList(int $a_pool_id)
Get list of booking objects for given pool.
$target_id
Definition: goto.php:52
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 71 of file class.ilObjBookingPool.php.

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

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

◆ delete()

ilObjBookingPool::delete ( )

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

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

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

◆ getAdvancedMDFields()

static ilObjBookingPool::getAdvancedMDFields ( int  $a_ref_id)
static

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

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

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

380  : array {
381  $fields = array();
382 
383  $recs = ilAdvancedMDRecord::_getSelectedRecordsByObject("book", $a_ref_id, "bobj");
384 
385  foreach ($recs as $record_obj) {
386  foreach (ilAdvancedMDFieldDefinition::getInstancesByRecordId($record_obj->getRecordId()) as $def) {
387  $field_id = $def->getFieldId();
388  $fields[$field_id] = array(
389  "id" => $field_id,
390  "title" => $def->getTitle(),
391  "type" => $def->getType()
392  );
393  }
394  }
395 
396  return $fields;
397  }
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 56 of file class.ilObjBookingPool.php.

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

Referenced by create(), and update().

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

◆ getOverallLimit()

ilObjBookingPool::getOverallLimit ( )

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

References $overall_limit.

Referenced by cloneObject(), and getDBFields().

354  : ?int
355  {
356  return $this->overall_limit;
357  }
+ Here is the caller graph for this function:

◆ getPoolsWithReminders()

static ilObjBookingPool::getPoolsWithReminders ( )
static

Get pools with reminders.

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

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

Referenced by ilBookCronNotification\sendNotifications().

131  : array
132  {
133  global $DIC;
134 
135  $db = $DIC->database();
136  $pools = [];
137  $set = $db->queryF(
138  "SELECT * FROM booking_settings " .
139  " WHERE reminder_status = %s " .
140  " AND reminder_day > %s " .
141  " AND pool_offline = %s ",
142  array("integer","integer","integer"),
143  array(1,0,0)
144  );
145  while ($rec = $db->fetchAssoc($set)) {
146  $pools[] = $rec;
147  }
148  return $pools;
149  }
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 328 of file class.ilObjBookingPool.php.

References $pref_deadline.

Referenced by cloneObject(), and getDBFields().

328  : int
329  {
330  return $this->pref_deadline;
331  }
+ Here is the caller graph for this function:

◆ getPreferenceNumber()

ilObjBookingPool::getPreferenceNumber ( )

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

References $preference_nr.

Referenced by cloneObject(), and getDBFields().

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

◆ getReminderDay()

ilObjBookingPool::getReminderDay ( )

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

References $reminder_day.

Referenced by cloneObject(), and getDBFields().

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

◆ getReminderStatus()

ilObjBookingPool::getReminderStatus ( )

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

References $reminder_status.

Referenced by cloneObject(), and getDBFields().

292  : int
293  {
294  return $this->reminder_status;
295  }
+ Here is the caller graph for this function:

◆ getReservationFilterPeriod()

ilObjBookingPool::getReservationFilterPeriod ( )

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

References $reservation_period.

Referenced by getDBFields().

368  : ?int
369  {
371  }
+ Here is the caller graph for this function:

◆ getScheduleType()

ilObjBookingPool::getScheduleType ( )

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

References $schedule_type.

Referenced by cloneObject(), and getDBFields().

282  : int
283  {
284  return $this->schedule_type;
285  }
+ Here is the caller graph for this function:

◆ hasPublicLog()

ilObjBookingPool::hasPublicLog ( )

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

References $public_log.

Referenced by cloneObject(), and getDBFields().

272  : bool
273  {
274  return $this->public_log;
275  }
+ Here is the caller graph for this function:

◆ isOffline()

ilObjBookingPool::isOffline ( )

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

References $offline.

Referenced by cloneObject(), and getDBFields().

258  : bool
259  {
260  return $this->offline;
261  }
+ Here is the caller graph for this function:

◆ read()

ilObjBookingPool::read ( )

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

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

105  : void
106  {
107  $ilDB = $this->db;
108 
109  parent::read();
110 
111  // put here object specific stuff
112  if ($this->getId()) {
113  $set = $ilDB->query('SELECT * FROM booking_settings' .
114  ' WHERE booking_pool_id = ' . $ilDB->quote($this->getId(), 'integer'));
115  $row = $ilDB->fetchAssoc($set);
116  $this->setOffline($row['pool_offline']);
117  $this->setPublicLog($row['public_log']);
118  $this->setScheduleType($row['schedule_type']);
119  $this->setOverallLimit($row['ovlimit']);
120  $this->setReminderStatus($row['reminder_status']);
121  $this->setReminderDay($row['reminder_day']);
122  $this->setReservationFilterPeriod($row['rsv_filter_period']);
123  $this->setPreferenceNumber($row['preference_nr']);
124  $this->setPreferenceDeadline($row['pref_deadline']);
125  }
126  }
setOverallLimit(?int $a_value=null)
Set overall / global booking limit.
setPublicLog(bool $a_value=true)
Toggle public log property.
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:

◆ setOffline()

ilObjBookingPool::setOffline ( bool  $a_value = true)

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

Referenced by read().

254  : void {
255  $this->offline = $a_value;
256  }
+ Here is the caller graph for this function:

◆ setOverallLimit()

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

Set overall / global booking limit.

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

Referenced by read().

349  : void
350  {
351  $this->overall_limit = $a_value;
352  }
+ Here is the caller graph for this function:

◆ setPreferenceDeadline()

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

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

Referenced by read().

320  : void
321  {
322  $this->pref_deadline = $a_val;
323  }
+ Here is the caller graph for this function:

◆ setPreferenceNumber()

ilObjBookingPool::setPreferenceNumber ( int  $a_val)

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

Referenced by read().

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

◆ setPublicLog()

ilObjBookingPool::setPublicLog ( bool  $a_value = true)

Toggle public log property.

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

Referenced by read().

268  : void {
269  $this->public_log = $a_value;
270  }
+ Here is the caller graph for this function:

◆ setReminderDay()

ilObjBookingPool::setReminderDay ( int  $a_val)

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

Referenced by read().

297  : void
298  {
299  $this->reminder_day = $a_val;
300  }
+ Here is the caller graph for this function:

◆ setReminderStatus()

ilObjBookingPool::setReminderStatus ( int  $a_val)

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

Referenced by read().

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

◆ setReservationFilterPeriod()

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

Set reservation filter period default.

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

Referenced by read().

364  : void {
365  $this->reservation_period = $a_value;
366  }
+ Here is the caller graph for this function:

◆ setScheduleType()

ilObjBookingPool::setScheduleType ( int  $a_value)

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

Referenced by __construct(), and read().

277  : void
278  {
279  $this->schedule_type = $a_value;
280  }
+ Here is the caller graph for this function:

◆ update()

ilObjBookingPool::update ( )

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

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

85  : bool
86  {
87  $ilDB = $this->db;
88 
89  if (!parent::update()) {
90  return false;
91  }
92 
93  // put here object specific stuff
94  if ($this->getId()) {
95  $ilDB->update(
96  "booking_settings",
97  $this->getDBFields(),
98  array("booking_pool_id" => array("integer", $this->getId()))
99  );
100  }
101 
102  return true;
103  }
getDBFields()
Parse properties for sql statements.
ilDBInterface $db
+ Here is the call 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 155 of file class.ilObjBookingPool.php.

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

Referenced by ilBookCronNotification\sendNotifications().

158  : void {
159  global $DIC;
160  $db = $DIC->database();
161  $db->update("booking_settings", array(
162  "last_remind_ts" => array("integer", $a_ts)
163  ), array( // where
164  "booking_pool_id" => array("integer", $a_obj_id)
165  ));
166  }
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

◆ $offline

bool ilObjBookingPool::$offline = true
protected

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

Referenced by isOffline().

◆ $overall_limit

int ilObjBookingPool::$overall_limit = null
protected

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

Referenced by getOverallLimit().

◆ $pref_deadline

int ilObjBookingPool::$pref_deadline = 0
protected

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

Referenced by getPreferenceDeadline().

◆ $preference_nr

int ilObjBookingPool::$preference_nr = 0
protected

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

Referenced by getPreferenceNumber().

◆ $public_log

bool ilObjBookingPool::$public_log = false
protected

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

Referenced by hasPublicLog().

◆ $reminder_day

int ilObjBookingPool::$reminder_day = 1
protected

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

Referenced by getReminderDay().

◆ $reminder_status

int ilObjBookingPool::$reminder_status = 0
protected

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

Referenced by getReminderStatus().

◆ $reservation_period

int ilObjBookingPool::$reservation_period = null
protected

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

Referenced by getReservationFilterPeriod().

◆ $schedule_type

int ilObjBookingPool::$schedule_type = 0
protected

Definition at line 32 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: