ILIAS  release_7 Revision v7.30-3-g800a261c036
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...
 
 setPreferenceNumber ($a_val)
 Set preference number. More...
 
 getPreferenceNumber ()
 Get preference number. More...
 
 setPreferenceDeadline ($a_val)
 Set preference deadline. More...
 
 getPreferenceDeadline ()
 Get preference deadline. 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...
 
 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 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, $a_deleted_by)
 
static setDeletedDates ($a_ref_ids, $a_user_id)
 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 _getIcon ( $a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
 Get icon for repository item. 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
 
const TYPE_NO_SCHEDULE_PREFERENCES = 3
 
- 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
 
 $pref_deadline
 
 $preference_nr
 
- 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 11 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 41 of file class.ilObjBookingPool.php.

42 {
43 global $DIC;
44
45 $this->db = $DIC->database();
46 $this->type = "book";
47 $this->setScheduleType(self::TYPE_FIX_SCHEDULE);
48 parent::__construct($a_id, $a_call_by_reference);
49 }
setScheduleType($a_value)
Set schedule type.
global $DIC
Definition: goto.php:24
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), 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 401 of file class.ilObjBookingPool.php.

402 {
403 global $DIC;
404
405 $ilDB = $DIC->database();
406
407 $set = $ilDB->query("SELECT pool_offline" .
408 " FROM booking_settings" .
409 " WHERE booking_pool_id = " . $ilDB->quote($a_obj_id, "integer"));
410 $row = $ilDB->fetchAssoc($set);
411 return !(bool) $row["pool_offline"];
412 }
global $ilDB

References $DIC, and $ilDB.

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

221 {
222 $new_obj = parent::cloneObject($a_target_id, $a_copy_id, $a_omit_tree);
223
224 //copy online status if object is not the root copy object
225 $cp_options = ilCopyWizardOptions::_getInstance($a_copy_id);
226
227 if (!$cp_options->isRootNode($this->getRefId())) {
228 $new_obj->setOffline($this->isOffline());
229 }
230
231 $new_obj->setScheduleType($this->getScheduleType());
232 $new_obj->setPublicLog($this->hasPublicLog());
233 $new_obj->setOverallLimit($this->getOverallLimit());
234 $new_obj->setReminderStatus($this->getReminderStatus());
235 $new_obj->setReminderDay($this->getReminderDay());
236 $new_obj->setPreferenceNumber($this->getPreferenceNumber());
237 $new_obj->setPreferenceDeadline($this->getPreferenceDeadline());
238
239 $smap = null;
240 if ($this->getScheduleType() == self::TYPE_FIX_SCHEDULE) {
241 // schedules
242 foreach (ilBookingSchedule::getList($this->getId()) as $item) {
243 $schedule = new ilBookingSchedule($item["booking_schedule_id"]);
244 $smap[$item["booking_schedule_id"]] = $schedule->doClone($new_obj->getId());
245 }
246 }
247
248 // objects
249 foreach (ilBookingObject::getList($this->getId()) as $item) {
250 $bobj = new ilBookingObject($item["booking_object_id"]);
251 $bobj->doClone($new_obj->getId(), $smap);
252 }
253
254 $new_obj->update();
255
256 return $new_obj;
257 }
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.
getPreferenceNumber()
Get preference number.
getScheduleType()
Get schedule type.
isOffline()
Get offline property.
getPreferenceDeadline()
Get preference deadline.
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(), getPreferenceDeadline(), getPreferenceNumber(), 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 75 of file class.ilObjBookingPool.php.

76 {
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.

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

Reimplemented from ilObject.

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

184 {
186
187 $id = $this->getId();
188
189 // always call parent delete function first!!
190 if (!parent::delete()) {
191 return false;
192 }
193
194 // put here your module specific stuff
195
196 $ilDB->manipulate('DELETE FROM booking_settings' .
197 ' WHERE booking_pool_id = ' . $ilDB->quote($id, 'integer'));
198
199 $ilDB->manipulate('DELETE FROM booking_schedule' .
200 ' WHERE pool_id = ' . $ilDB->quote($id, 'integer'));
201
202 $objects = array();
203 $set = $ilDB->query('SELECT booking_object_id FROM booking_object' .
204 ' WHERE pool_id = ' . $ilDB->quote($id, 'integer'));
205 while ($row = $ilDB->fetchAssoc($set)) {
206 $objects[] = $row['booking_object_id'];
207 }
208
209 if (sizeof($objects)) {
210 $ilDB->manipulate('DELETE FROM booking_reservation' .
211 ' WHERE ' . $ilDB->in('object_id', $objects, '', 'integer'));
212 }
213
214 $ilDB->manipulate('DELETE FROM booking_object' .
215 ' WHERE pool_id = ' . $ilDB->quote($id, 'integer'));
216
217 return true;
218 }

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

+ Here is the call graph for this function:

◆ getAdvancedMDFields()

static ilObjBookingPool::getAdvancedMDFields (   $a_ref_id)
static

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

466 {
467 $fields = array();
468
469 $recs = ilAdvancedMDRecord::_getSelectedRecordsByObject("book", $a_ref_id, "bobj");
470
471 foreach ($recs as $record_obj) {
472 foreach (ilAdvancedMDFieldDefinition::getInstancesByRecordId($record_obj->getRecordId()) as $def) {
473 $fields[$def->getFieldId()] = array(
474 "id" => $def->getFieldId(),
475 "title" => $def->getTitle(),
476 "type" => $def->getType()
477 );
478 }
479 }
480
481 return $fields;
482 }
static getInstancesByRecordId($a_record_id, $a_only_searchable=false, string $language='')
Get definitions by record id.
static _getSelectedRecordsByObject($a_obj_type, $a_ref_id, $a_sub_type="")
Get selected records by object.

References 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 54 of file class.ilObjBookingPool.php.

55 {
56 $fields = array(
57 "schedule_type" => array("integer", $this->getScheduleType()),
58 "pool_offline" => array("integer", $this->isOffline()),
59 "public_log" => array("integer", $this->hasPublicLog()),
60 "ovlimit" => array("integer", $this->getOverallLimit()),
61 "reminder_status" => array("integer", $this->getReminderStatus()),
62 "reminder_day" => array("integer", $this->getReminderDay()),
63 "rsv_filter_period" => array("integer", $this->getReservationFilterPeriod()),
64 "preference_nr" => array("integer", (int) $this->getPreferenceNumber()),
65 "pref_deadline" => array("integer", (int) $this->getPreferenceDeadline())
66 );
67
68 return $fields;
69 }
getReservationFilterPeriod()
Get reservation filter period default.

References getOverallLimit(), getPreferenceDeadline(), getPreferenceNumber(), 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 432 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 141 of file class.ilObjBookingPool.php.

142 {
143 global $DIC;
144
145 $db = $DIC->database();
146 $pools = [];
147 $set = $db->queryF(
148 "SELECT * FROM booking_settings " .
149 " WHERE reminder_status = %s " .
150 " AND reminder_day > %s " .
151 " AND pool_offline = %s ",
152 array("integer","integer","integer"),
153 array(1,0,0)
154 );
155 while ($rec = $db->fetchAssoc($set)) {
156 $pools[] = $rec;
157 }
158 return $pools;
159 }

References ilObject\$db, and $DIC.

Referenced by ilBookCronNotification\sendNotifications().

+ Here is the caller graph for this function:

◆ getPreferenceDeadline()

ilObjBookingPool::getPreferenceDeadline ( )

Get preference deadline.

Returns
int preference deadline unix timestamp

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

References $pref_deadline.

Referenced by cloneObject(), and getDBFields().

+ Here is the caller graph for this function:

◆ getPreferenceNumber()

ilObjBookingPool::getPreferenceNumber ( )

Get preference number.

Returns
int number of preferences

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

References $preference_nr.

Referenced by cloneObject(), and getDBFields().

+ Here is the caller graph for this function:

◆ getReminderDay()

ilObjBookingPool::getReminderDay ( )

Get reminder day.

Returns
int reminder day

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

349 {
350 return $this->reminder_day;
351 }

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 328 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 455 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 308 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 290 of file class.ilObjBookingPool.php.

291 {
292 return (bool) $this->public_log;
293 }

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

273 {
274 return (bool) $this->offline;
275 }

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

114 {
116
117 parent::read();
118
119 // put here object specific stuff
120 if ($this->getId()) {
121 $set = $ilDB->query('SELECT * FROM booking_settings' .
122 ' WHERE booking_pool_id = ' . $ilDB->quote($this->getId(), 'integer'));
123 $row = $ilDB->fetchAssoc($set);
124 $this->setOffline($row['pool_offline']);
125 $this->setPublicLog($row['public_log']);
126 $this->setScheduleType($row['schedule_type']);
127 $this->setOverallLimit($row['ovlimit']);
128 $this->setReminderStatus($row['reminder_status']);
129 $this->setReminderDay($row['reminder_day']);
130 $this->setReservationFilterPeriod($row['rsv_filter_period']);
131 $this->setPreferenceNumber($row['preference_nr']);
132 $this->setPreferenceDeadline($row['pref_deadline']);
133 }
134 }
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.
setPreferenceNumber($a_val)
Set preference number.
setOverallLimit($a_value=null)
Set overall / global booking limit.
setPreferenceDeadline($a_val)
Set preference deadline.

References ilObject\$db, $ilDB, ilObject\getId(), setOffline(), setOverallLimit(), setPreferenceDeadline(), setPreferenceNumber(), 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 263 of file class.ilObjBookingPool.php.

264 {
265 $this->offline = (bool) $a_value;
266 }

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

420 {
421 if ($a_value !== null) {
422 $a_value = (int) $a_value;
423 }
424 $this->overall_limit = $a_value;
425 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setPreferenceDeadline()

ilObjBookingPool::setPreferenceDeadline (   $a_val)

Set preference deadline.

Parameters
int$a_valpreference deadline unix timestamp

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

379 {
380 $this->pref_deadline = $a_val;
381 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setPreferenceNumber()

ilObjBookingPool::setPreferenceNumber (   $a_val)

Set preference number.

Parameters
int$a_valnumber of preferences

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

359 {
360 $this->preference_nr = $a_val;
361 }

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

282 {
283 $this->public_log = (bool) $a_value;
284 }

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

339 {
340 $this->reminder_day = $a_val;
341 }

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

319 {
320 $this->reminder_status = $a_val;
321 }

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

443 {
444 if ($a_value !== null) {
445 $a_value = (int) $a_value;
446 }
447 $this->reservation_period = $a_value;
448 }

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

300 {
301 $this->schedule_type = (int) $a_value;
302 }

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

94 {
96
97 if (!parent::update()) {
98 return false;
99 }
100
101 // put here object specific stuff
102 if ($this->getId()) {
103 $ilDB->update(
104 "booking_settings",
105 $this->getDBFields(),
106 array("booking_pool_id" => array("integer", $this->getId()))
107 );
108 }
109
110 return true;
111 }

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

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

168 {
169 global $DIC;
170 $db = $DIC->database();
171 $db->update("booking_settings", array(
172 "last_remind_ts" => array("integer", $a_ts)
173 ), array( // where
174 "booking_pool_id" => array("integer", $a_obj_id)
175 ));
176 }

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

Referenced by isOffline().

◆ $overall_limit

ilObjBookingPool::$overall_limit
protected

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

Referenced by getOverallLimit().

◆ $pref_deadline

ilObjBookingPool::$pref_deadline
protected

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

Referenced by getPreferenceDeadline().

◆ $preference_nr

ilObjBookingPool::$preference_nr
protected

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

Referenced by getPreferenceNumber().

◆ $public_log

ilObjBookingPool::$public_log
protected

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

Referenced by hasPublicLog().

◆ $reminder_day

ilObjBookingPool::$reminder_day = 1
protected

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

Referenced by getReminderDay().

◆ $reminder_status

ilObjBookingPool::$reminder_status = 0
protected

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

Referenced by getReminderStatus().

◆ $reservation_period

ilObjBookingPool::$reservation_period
protected

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

Referenced by getReservationFilterPeriod().

◆ $schedule_type

ilObjBookingPool::$schedule_type
protected

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