ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilObjBookingPool Class Reference

Class ilObjBookingPool. More...

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

Public Member Functions

 __construct ($a_id=0, $a_call_by_reference=true)
 Constructor. More...
 
 create ()
 create object More...
 
 update ()
 update object data More...
 
 read ()
 read object data from db into object More...
 
 delete ()
 delete object and all related data More...
 
 cloneObject ($a_target_id, $a_copy_id=0, $a_omit_tree=false)
 
 setOffline ($a_value=true)
 Toggle offline property. More...
 
 isOffline ()
 Get offline property. More...
 
 setPublicLog ($a_value=true)
 Toggle public log property. More...
 
 hasPublicLog ()
 Get public log property. More...
 
 setScheduleType ($a_value)
 Set schedule type. More...
 
 getScheduleType ()
 Get schedule type. More...
 
 setReminderStatus ($a_val)
 Set reminder status. More...
 
 getReminderStatus ()
 Get reminder status. More...
 
 setReminderDay ($a_val)
 Set reminder day. More...
 
 getReminderDay ()
 Get reminder day. More...
 
 setOverallLimit ($a_value=null)
 Set overall / global booking limit. More...
 
 getOverallLimit ()
 Get overall / global booking limit. More...
 
 setReservationFilterPeriod ($a_value=null)
 Set reservation filter period default. More...
 
 getReservationFilterPeriod ()
 Get reservation filter period default. More...
 
- Public Member Functions inherited from ilObject
 __construct ($a_id=0, $a_reference=true)
 Constructor @access public. More...
 
 withReferences ()
 determines wehter objects are referenced or not (got ref ids or not) More...
 
 read ()
 read object data from db into object More...
 
 getId ()
 get object id @access public More...
 
 setId ($a_id)
 set object id @access public More...
 
 setRefId ($a_id)
 set reference id @access public More...
 
 getRefId ()
 get reference id @access public More...
 
 getType ()
 get object type @access public More...
 
 setType ($a_type)
 set object type @access public More...
 
 getPresentationTitle ()
 get presentation title Normally same as title Overwritten for sessions More...
 
 getTitle ()
 get object title @access public More...
 
 getUntranslatedTitle ()
 get untranslated object title @access public More...
 
 setTitle ($a_title)
 set object title More...
 
 getDescription ()
 get object description More...
 
 setDescription ($a_desc)
 set object description More...
 
 getLongDescription ()
 get object long description (stored in object_description) More...
 
 getImportId ()
 get import id More...
 
 setImportId ($a_import_id)
 set import id More...
 
 setOfflineStatus ($a_status)
 Set offline status. More...
 
 getOfflineStatus ()
 Get offline status. More...
 
 supportsOfflineHandling ()
 Check whether object supports offline handling. More...
 
 getOwner ()
 get object owner More...
 
 getOwnerName ()
 
 setOwner ($a_owner)
 set object owner More...
 
 getCreateDate ()
 get create date @access public More...
 
 getLastUpdateDate ()
 get last update date @access public More...
 
 getDiskUsage ()
 Gets the disk usage of the object in bytes. More...
 
 create ()
 create More...
 
 update ()
 update object in db More...
 
 MDUpdateListener ($a_element)
 Meta data update listener. More...
 
 createMetaData ()
 create meta data entry More...
 
 updateMetaData ()
 update meta data entry More...
 
 deleteMetaData ()
 delete meta data entry More...
 
 updateOwner ()
 update owner of object in db More...
 
 putInTree ($a_parent_ref)
 maybe this method should be in tree object!? More...
 
 setPermissions ($a_parent_ref)
 set permissions of object More...
 
 setParentRolePermissions ($a_parent_ref)
 Initialize the permissions of parent roles (local roles of categories, global roles...) This method is overwritten in e.g courses, groups for building permission intersections with non_member templates. More...
 
 createReference ()
 creates reference for object More...
 
 countReferences ()
 count references of object 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 If you want to setup default local roles you MUST overwrite this method in derived object classes (see ilObjForum for an example) @access public More...
 
 applyDidacticTemplate ($a_tpl_id)
 Apply template. More...
 
 setRegisterMode ($a_bool)
 
 isUserRegistered ($a_user_id=0)
 
 requireRegistration ()
 
 getXMLZip ()
 
 getHTMLDirectory ()
 
 appendCopyInfo ($a_target_id, $a_copy_id)
 Prepend Copy info if object with same name exists in that container. More...
 
 cloneDependencies ($a_target_id, $a_copy_id)
 Clone object dependencies. More...
 
 cloneMetaData ($target_obj)
 Copy meta data. More...
 
 getPossibleSubObjects ($a_filter=true)
 get all possible subobjects of this type the object can decide which types of subobjects are possible jut in time overwrite if the decision distinguish from standard model More...
 

Static Public Member Functions

static getPoolsWithReminders ()
 Get poos with reminders. More...
 
static writeLastReminderTimestamp ($a_obj_id, $a_ts)
 Write last reminder timestamp. More...
 
static _lookupOnline ($a_obj_id)
 Check object status. More...
 
static getAdvancedMDFields ($a_ref_id)
 
- Static Public Member Functions inherited from ilObject
static _lookupObjIdByImportId ($a_import_id)
 
static _lookupImportId ($a_obj_id)
 
static _lookupOwnerName ($a_owner_id)
 lookup owner name for owner id More...
 
static _getIdForImportId ($a_import_id)
 get current object id for import id (static) More...
 
static _getAllReferences ($a_id)
 get all reference ids of object More...
 
static _lookupTitle ($a_id)
 lookup object title More...
 
static lookupOfflineStatus ($a_obj_id)
 Lookup offline status using objectDataCache. More...
 
static _lookupOwner ($a_id)
 lookup object owner More...
 
static _getIdsForTitle ($title, $type='', $partialmatch=false)
 
static _lookupDescription ($a_id)
 lookup object description More...
 
static _lookupLastUpdate ($a_id, $a_as_string=false)
 lookup last update More...
 
static _getLastUpdateOfObjects ($a_objs)
 Get last update for a set of media objects. More...
 
static _lookupObjId ($a_id)
 
static _setDeletedDate ($a_ref_id)
 only called in ilTree::saveSubTree More...
 
static setDeletedDates ($a_ref_ids)
 Set deleted date. More...
 
static _resetDeletedDate ($a_ref_id)
 only called in ilObjectGUI::insertSavedNodes More...
 
static _lookupDeletedDate ($a_ref_id)
 only called in ilObjectGUI::insertSavedNodes More...
 
static _writeTitle ($a_obj_id, $a_title)
 write title to db (static) More...
 
static _writeDescription ($a_obj_id, $a_desc)
 write description to db (static) More...
 
static _writeImportId ($a_obj_id, $a_import_id)
 write import id to db (static) More...
 
static _lookupType ($a_id, $a_reference=false)
 lookup object type More...
 
static _isInTrash ($a_ref_id)
 checks wether object is in trash More...
 
static _hasUntrashedReference ($a_obj_id)
 checks wether an object has at least one reference that is not in trash More...
 
static _lookupObjectId ($a_ref_id)
 lookup object id More...
 
static _getObjectsDataForType ($a_type, $a_omit_trash=false)
 get all objects of a certain type More...
 
static _exists ($a_id, $a_reference=false, $a_type=null)
 checks if an object exists in object_data@access public More...
 
static _getObjectsByType ($a_obj_type="", $a_owner="")
 Get objects by type. More...
 
static _prepareCloneSelection ($a_ref_ids, $new_type, $show_path=true)
 Prepare copy wizard object selection. More...
 
static collectDeletionDependencies (&$deps, $a_ref_id, $a_obj_id, $a_type, $a_depth=0)
 Collect deletion dependencies. More...
 
static getDeletionDependencies ($a_obj_id)
 Get deletion dependencies. More...
 
static getLongDescriptions (array $a_obj_ids)
 Get long description data. More...
 
static getAllOwnedRepositoryObjects ($a_user_id)
 Get all ids of objects user owns. More...
 
static fixMissingTitles ($a_type, array &$a_obj_title_map)
 Try to fix missing object titles. More...
 
static _lookupCreationDate ($a_id)
 Lookup creation date. More...
 
static hasAutoRating ($a_type, $a_ref_id)
 Check if auto rating is active for parent group/course. More...
 

Data Fields

const TYPE_FIX_SCHEDULE = 1
 
const TYPE_NO_SCHEDULE = 2
 
- Data Fields inherited from ilObject
const TITLE_LENGTH = 255
 max length of object title More...
 
const DESC_LENGTH = 128
 
 $lng
 
 $id
 
 $ref_id
 
 $type
 
 $title
 
 $untranslatedTitle
 
 $desc
 
 $long_desc
 
 $owner
 
 $create_date
 
 $last_update
 
 $import_id
 
 $register = false
 
 $referenced
 
 $objectList
 
 $max_title
 
 $max_desc
 
 $add_dots
 

Protected Member Functions

 getDBFields ()
 Parse properties for sql statements. More...
 

Protected Attributes

 $offline = true
 
 $public_log
 
 $schedule_type
 
 $overall_limit
 
 $reservation_period
 
 $reminder_status = 0
 
 $reminder_day = 1
 
- Protected Attributes inherited from ilObject
 $objDefinition
 
 $db
 
 $log
 
 $error
 
 $tree
 
 $app_event_handler
 
 $rbacadmin
 
 $rbacreview
 

Detailed Description

Class ilObjBookingPool.

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

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

Constructor & Destructor Documentation

◆ __construct()

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

Constructor.

Parameters
int$a_idreference_id or object_id
bool$a_call_by_referencetreat the id as reference_id (true) or object_id (false)

Reimplemented from ilObject.

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

33 {
34 global $DIC;
35
36 $this->db = $DIC->database();
37 $this->type = "book";
38 $this->setScheduleType(self::TYPE_FIX_SCHEDULE);
39 parent::__construct($a_id, $a_call_by_reference);
40 }
setScheduleType($a_value)
Set schedule type.
global $DIC
Definition: saml.php:7

References $DIC, and setScheduleType().

+ Here is the call graph for this function:

Member Function Documentation

◆ _lookupOnline()

static ilObjBookingPool::_lookupOnline (   $a_obj_id)
static

Check object status.

Parameters
int$a_obj_id
Returns
boolean

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

347 {
348 global $DIC;
349
350 $ilDB = $DIC->database();
351
352 $set = $ilDB->query("SELECT pool_offline" .
353 " FROM booking_settings" .
354 " WHERE booking_pool_id = " . $ilDB->quote($a_obj_id, "integer"));
355 $row = $ilDB->fetchAssoc($set);
356 return !(bool) $row["pool_offline"];
357 }
$row
global $ilDB

References $DIC, $ilDB, and $row.

Referenced by ilObjBookingPoolListGUI\getProperties().

+ Here is the caller graph for this function:

◆ cloneObject()

ilObjBookingPool::cloneObject (   $a_target_id,
  $a_copy_id = 0,
  $a_omit_tree = false 
)

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

208 {
209 $new_obj = parent::cloneObject($a_target_id, $a_copy_id, $a_omit_tree);
210
211 //copy online status if object is not the root copy object
212 $cp_options = ilCopyWizardOptions::_getInstance($a_copy_id);
213
214 if (!$cp_options->isRootNode($this->getRefId())) {
215 $new_obj->setOffline($this->isOffline());
216 }
217
218 $new_obj->setScheduleType($this->getScheduleType());
219 $new_obj->setPublicLog($this->hasPublicLog());
220 $new_obj->setOverallLimit($this->getOverallLimit());
221 $new_obj->setReminderStatus($this->getReminderStatus());
222 $new_obj->setReminderDay($this->getReminderDay());
223
224 $smap = null;
225 if ($this->getScheduleType() == self::TYPE_FIX_SCHEDULE) {
226 // schedules
227 include_once "Modules/BookingManager/classes/class.ilBookingSchedule.php";
228 foreach (ilBookingSchedule::getList($this->getId()) as $item) {
229 $schedule = new ilBookingSchedule($item["booking_schedule_id"]);
230 $smap[$item["booking_schedule_id"]] = $schedule->doClone($new_obj->getId());
231 }
232 }
233
234 // objects
235 include_once "Modules/BookingManager/classes/class.ilBookingObject.php";
236 foreach (ilBookingObject::getList($this->getId()) as $item) {
237 $bobj = new ilBookingObject($item["booking_object_id"]);
238 $bobj->doClone($new_obj->getId(), $smap);
239 }
240
241 $new_obj->update();
242
243 return $new_obj;
244 }
a bookable ressource
static getList($a_pool_id, $a_title=null)
Get list of booking objects for given type.
schedule for booking ressource
static getList($a_pool_id)
Get list of booking objects for given pool.
static _getInstance($a_copy_id)
Get instance of copy wizard options.
getReminderDay()
Get reminder day.
getScheduleType()
Get schedule type.
isOffline()
Get offline property.
hasPublicLog()
Get public log property.
getReminderStatus()
Get reminder status.
getOverallLimit()
Get overall / global booking limit.
getId()
get object id @access public

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

+ Here is the call graph for this function:

◆ create()

ilObjBookingPool::create ( )

create object

Returns
integer

Reimplemented from ilObject.

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

65 {
67
68 $new_id = parent::create();
69
70 $fields = $this->getDBFields();
71 $fields["booking_pool_id"] = array("integer", $new_id);
72
73 $ilDB->insert("booking_settings", $fields);
74
75 return $new_id;
76 }
getDBFields()
Parse properties for sql statements.

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

+ Here is the call graph for this function:

◆ delete()

ilObjBookingPool::delete ( )

delete object and all related data

Returns
boolean true if all object data were removed; false if only a references were removed

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

171 {
173
174 $id = $this->getId();
175
176 // always call parent delete function first!!
177 if (!parent::delete()) {
178 return false;
179 }
180
181 // put here your module specific stuff
182
183 $ilDB->manipulate('DELETE FROM booking_settings' .
184 ' WHERE booking_pool_id = ' . $ilDB->quote($id, 'integer'));
185
186 $ilDB->manipulate('DELETE FROM booking_schedule' .
187 ' WHERE pool_id = ' . $ilDB->quote($id, 'integer'));
188
189 $objects = array();
190 $set = $ilDB->query('SELECT booking_object_id FROM booking_object' .
191 ' WHERE pool_id = ' . $ilDB->quote($id, 'integer'));
192 while ($row = $ilDB->fetchAssoc($set)) {
193 $objects[] = $row['booking_object_id'];
194 }
195
196 if (sizeof($objects)) {
197 $ilDB->manipulate('DELETE FROM booking_reservation' .
198 ' WHERE ' . $ilDB->in('object_id', $objects, '', 'integer'));
199 }
200
201 $ilDB->manipulate('DELETE FROM booking_object' .
202 ' WHERE pool_id = ' . $ilDB->quote($id, 'integer'));
203
204 return true;
205 }

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

+ Here is the call graph for this function:

◆ getAdvancedMDFields()

static ilObjBookingPool::getAdvancedMDFields (   $a_ref_id)
static

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

411 {
412 $fields = array();
413
414 include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php');
415 $recs = ilAdvancedMDRecord::_getSelectedRecordsByObject("book", $a_ref_id, "bobj");
416
417 foreach ($recs as $record_obj) {
418 include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDFieldDefinition.php');
419 foreach (ilAdvancedMDFieldDefinition::getInstancesByRecordId($record_obj->getRecordId()) as $def) {
420 $fields[$def->getFieldId()] = array(
421 "id" => $def->getFieldId(),
422 "title" => $def->getTitle(),
423 "type" => $def->getType()
424 );
425 }
426 }
427
428 return $fields;
429 }
static getInstancesByRecordId($a_record_id, $a_only_searchable=false)
Get definitions by record id.
static _getSelectedRecordsByObject($a_obj_type, $a_ref_id, $a_sub_type="")
Get selected records by object.
$def
Definition: croninfo.php:21

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

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

+ 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 45 of file class.ilObjBookingPool.php.

46 {
47 $fields = array(
48 "schedule_type" => array("integer", $this->getScheduleType()),
49 "pool_offline" => array("integer", $this->isOffline()),
50 "public_log" => array("integer", $this->hasPublicLog()),
51 "ovlimit" => array("integer", $this->getOverallLimit()),
52 "reminder_status" => array("integer", $this->getReminderStatus()),
53 "reminder_day" => array("integer", $this->getReminderDay()),
54 "rsv_filter_period" => array("integer", $this->getReservationFilterPeriod())
55 );
56
57 return $fields;
58 }
getReservationFilterPeriod()
Get reservation filter period default.

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

Referenced by create(), and update().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getOverallLimit()

ilObjBookingPool::getOverallLimit ( )

Get overall / global booking limit.

Returns
int $a_value

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

References $overall_limit.

Referenced by cloneObject(), and getDBFields().

+ Here is the caller graph for this function:

◆ getPoolsWithReminders()

static ilObjBookingPool::getPoolsWithReminders ( )
static

Get poos with reminders.

Returns
array[]

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

129 {
130 global $DIC;
131
132 $db = $DIC->database();
133 $pools = [];
134 $set = $db->queryF(
135 "SELECT * FROM booking_settings " .
136 " WHERE reminder_status = %s " .
137 " AND reminder_day > %s " .
138 " AND pool_offline = %s ",
139 array("integer","integer","integer"),
140 array(1,0,0)
141 );
142 while ($rec = $db->fetchAssoc($set)) {
143 $pools[] = $rec;
144 }
145 return $pools;
146 }

References ilObject\$db, and $DIC.

Referenced by ilBookCronNotification\sendNotifications().

+ Here is the caller graph for this function:

◆ getReminderDay()

ilObjBookingPool::getReminderDay ( )

Get reminder day.

Returns
int reminder day

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

336 {
337 return $this->reminder_day;
338 }

References $reminder_day.

Referenced by cloneObject(), and getDBFields().

+ Here is the caller graph for this function:

◆ getReminderStatus()

ilObjBookingPool::getReminderStatus ( )

Get reminder status.

Returns
int reminder status

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

References $reminder_status.

Referenced by cloneObject(), and getDBFields().

+ Here is the caller graph for this function:

◆ getReservationFilterPeriod()

ilObjBookingPool::getReservationFilterPeriod ( )

Get reservation filter period default.

Returns
int

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

References $reservation_period.

Referenced by getDBFields().

+ Here is the caller graph for this function:

◆ getScheduleType()

ilObjBookingPool::getScheduleType ( )

Get schedule type.

Returns
int

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

References $schedule_type.

Referenced by cloneObject(), and getDBFields().

+ Here is the caller graph for this function:

◆ hasPublicLog()

ilObjBookingPool::hasPublicLog ( )

Get public log property.

Returns
bool

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

278 {
279 return (bool) $this->public_log;
280 }

References $public_log.

Referenced by cloneObject(), and getDBFields().

+ Here is the caller graph for this function:

◆ isOffline()

ilObjBookingPool::isOffline ( )

Get offline property.

Returns
bool

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

260 {
261 return (bool) $this->offline;
262 }

References $offline.

Referenced by cloneObject(), and getDBFields().

+ Here is the caller graph for this function:

◆ read()

ilObjBookingPool::read ( )

read object data from db into object

Parameters
boolean@access public

Reimplemented from ilObject.

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

103 {
105
106 parent::read();
107
108 // put here object specific stuff
109 if ($this->getId()) {
110 $set = $ilDB->query('SELECT * FROM booking_settings' .
111 ' WHERE booking_pool_id = ' . $ilDB->quote($this->getId(), 'integer'));
112 $row = $ilDB->fetchAssoc($set);
113 $this->setOffline($row['pool_offline']);
114 $this->setPublicLog($row['public_log']);
115 $this->setScheduleType($row['schedule_type']);
116 $this->setOverallLimit($row['ovlimit']);
117 $this->setReminderStatus($row['reminder_status']);
118 $this->setReminderDay($row['reminder_day']);
119 $this->setReservationFilterPeriod($row['rsv_filter_period']);
120 }
121 }
setOffline($a_value=true)
Toggle offline property.
setReservationFilterPeriod($a_value=null)
Set reservation filter period default.
setReminderStatus($a_val)
Set reminder status.
setReminderDay($a_val)
Set reminder day.
setPublicLog($a_value=true)
Toggle public log property.
setOverallLimit($a_value=null)
Set overall / global booking limit.

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

+ Here is the call graph for this function:

◆ setOffline()

ilObjBookingPool::setOffline (   $a_value = true)

Toggle offline property.

Parameters
bool$a_value

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

251 {
252 $this->offline = (bool) $a_value;
253 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setOverallLimit()

ilObjBookingPool::setOverallLimit (   $a_value = null)

Set overall / global booking limit.

Parameters
int$a_value

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

365 {
366 if ($a_value !== null) {
367 $a_value = (int) $a_value;
368 }
369 $this->overall_limit = $a_value;
370 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setPublicLog()

ilObjBookingPool::setPublicLog (   $a_value = true)

Toggle public log property.

Parameters
bool$a_value

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

269 {
270 $this->public_log = (bool) $a_value;
271 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setReminderDay()

ilObjBookingPool::setReminderDay (   $a_val)

Set reminder day.

Parameters
int$a_valreminder day

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

326 {
327 $this->reminder_day = $a_val;
328 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setReminderStatus()

ilObjBookingPool::setReminderStatus (   $a_val)

Set reminder status.

Parameters
int$a_valreminder status

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

306 {
307 $this->reminder_status = $a_val;
308 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setReservationFilterPeriod()

ilObjBookingPool::setReservationFilterPeriod (   $a_value = null)

Set reservation filter period default.

Parameters
int$a_value

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

388 {
389 if ($a_value !== null) {
390 $a_value = (int) $a_value;
391 }
392 $this->reservation_period = $a_value;
393 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setScheduleType()

ilObjBookingPool::setScheduleType (   $a_value)

Set schedule type.

Parameters
int$a_value

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

287 {
288 $this->schedule_type = (int) $a_value;
289 }

Referenced by __construct(), and read().

+ Here is the caller graph for this function:

◆ update()

ilObjBookingPool::update ( )

update object data

Returns
boolean

Reimplemented from ilObject.

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

83 {
85
86 if (!parent::update()) {
87 return false;
88 }
89
90 // put here object specific stuff
91 if ($this->getId()) {
92 $ilDB->update(
93 "booking_settings",
94 $this->getDBFields(),
95 array("booking_pool_id" => array("integer", $this->getId()))
96 );
97 }
98
99 return true;
100 }
update($pash, $contents, Config $config)

References ilObject\$db, $ilDB, getDBFields(), ilObject\getId(), and League\Flysystem\Adapter\Polyfill\update().

+ Here is the call graph for this function:

◆ writeLastReminderTimestamp()

static ilObjBookingPool::writeLastReminderTimestamp (   $a_obj_id,
  $a_ts 
)
static

Write last reminder timestamp.

Parameters
intpool id
inttimestamp

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

155 {
156 global $DIC;
157 $db = $DIC->database();
158 $db->update("booking_settings", array(
159 "last_remind_ts" => array("integer", $a_ts)
160 ), array( // where
161 "booking_pool_id" => array("integer", $a_obj_id)
162 ));
163 }

References ilObject\$db, and $DIC.

Referenced by ilBookCronNotification\sendNotifications().

+ Here is the caller graph for this function:

Field Documentation

◆ $offline

ilObjBookingPool::$offline = true
protected

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

Referenced by isOffline().

◆ $overall_limit

ilObjBookingPool::$overall_limit
protected

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

Referenced by getOverallLimit().

◆ $public_log

ilObjBookingPool::$public_log
protected

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

Referenced by hasPublicLog().

◆ $reminder_day

ilObjBookingPool::$reminder_day = 1
protected

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

Referenced by getReminderDay().

◆ $reminder_status

ilObjBookingPool::$reminder_status = 0
protected

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

Referenced by getReminderStatus().

◆ $reservation_period

ilObjBookingPool::$reservation_period
protected

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

Referenced by getReservationFilterPeriod().

◆ $schedule_type

ilObjBookingPool::$schedule_type
protected

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

Referenced by getScheduleType().

◆ TYPE_FIX_SCHEDULE

◆ TYPE_NO_SCHEDULE


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