4require_once 
"./Services/Object/classes/class.ilObject.php";
 
   30    public function __construct($a_id = 0, $a_call_by_reference = 
true)
 
   34        $this->db = 
$DIC->database();
 
   37        parent::__construct($a_id, $a_call_by_reference);
 
   47            "pool_offline" => array(
"integer", $this->
isOffline()),
 
   64        $new_id = parent::create();
 
   67        $fields[
"booking_pool_id"] = array(
"integer", $new_id);
 
   69        $ilDB->insert(
"booking_settings", $fields);
 
   91                array(
"booking_pool_id" => array(
"integer", $this->
getId()))
 
  105        if ($this->
getId()) {
 
  106            $set = 
$ilDB->query(
'SELECT * FROM booking_settings' .
 
  107                ' WHERE booking_pool_id = ' . 
$ilDB->quote($this->getId(), 
'integer'));
 
  121    public function delete()
 
  128        if (!parent::delete()) {
 
  134        $ilDB->manipulate(
'DELETE FROM booking_settings' .
 
  135                ' WHERE booking_pool_id = ' . 
$ilDB->quote(
$id, 
'integer'));
 
  137        $ilDB->manipulate(
'DELETE FROM booking_schedule' .
 
  138                ' WHERE pool_id = ' . 
$ilDB->quote(
$id, 
'integer'));
 
  141        $set = 
$ilDB->query(
'SELECT booking_object_id FROM booking_object' .
 
  142            ' WHERE pool_id = ' . 
$ilDB->quote(
$id, 
'integer'));
 
  144            $objects[] = 
$row[
'booking_object_id'];
 
  147        if (
sizeof($objects)) {
 
  148            $ilDB->manipulate(
'DELETE FROM booking_reservation' .
 
  149                    ' WHERE ' . 
$ilDB->in(
'object_id', $objects, 
'', 
'integer'));
 
  152        $ilDB->manipulate(
'DELETE FROM booking_object' .
 
  153            ' WHERE pool_id = ' . 
$ilDB->quote(
$id, 
'integer'));
 
  158    public function cloneObject($a_target_id, $a_copy_id = 0, $a_omit_tree = 
false)
 
  160        $new_obj = parent::cloneObject($a_target_id, $a_copy_id, $a_omit_tree);
 
  165        if (!$cp_options->isRootNode($this->getRefId())) {
 
  166            $new_obj->setOffline($this->
isOffline());
 
  176            include_once 
"Modules/BookingManager/classes/class.ilBookingSchedule.php";
 
  179                $smap[$item[
"booking_schedule_id"]] = $schedule->doClone($new_obj->getId());
 
  184        include_once 
"Modules/BookingManager/classes/class.ilBookingObject.php";
 
  187            $bobj->doClone($new_obj->getId(), $smap);
 
  201        $this->offline = (bool) $a_value;
 
  219        $this->public_log = (bool) $a_value;
 
  237        $this->schedule_type = (int) $a_value;
 
  261        $set = 
$ilDB->query(
"SELECT pool_offline" .
 
  262            " FROM booking_settings" .
 
  263            " WHERE booking_pool_id = " . 
$ilDB->quote($a_obj_id, 
"integer"));
 
  265        return !(bool) 
$row[
"pool_offline"];
 
  275        if ($a_value !== 
null) {
 
  276            $a_value = (int) $a_value;
 
  278        $this->overall_limit = $a_value;
 
  298        if ($a_value !== 
null) {
 
  299            $a_value = (int) $a_value;
 
  301        $this->reservation_period = $a_value;
 
  323        include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php');
 
  326        foreach ($recs as $record_obj) {
 
  327            include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDFieldDefinition.php');
 
  329                $fields[
$def->getFieldId()] = array(
 
  330                    "id" => 
$def->getFieldId(),
 
  331                    "title" => 
$def->getTitle(),
 
  332                    "type" => 
$def->getType()
 
An exception for terminatinating execution or to throw for unit testing.
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.
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.
static getAdvancedMDFields($a_ref_id)
setOffline($a_value=true)
Toggle offline property.
setScheduleType($a_value)
Set schedule type.
__construct($a_id=0, $a_call_by_reference=true)
Constructor.
getDBFields()
Parse properties for sql statements.
setReservationFilterPeriod($a_value=null)
Set reservation filter period default.
getScheduleType()
Get schedule type.
read()
read object data from db into object
cloneObject($a_target_id, $a_copy_id=0, $a_omit_tree=false)
isOffline()
Get offline property.
update()
update object data
setPublicLog($a_value=true)
Toggle public log property.
hasPublicLog()
Get public log property.
static _lookupOnline($a_obj_id)
Check object status.
getOverallLimit()
Get overall / global booking limit.
setOverallLimit($a_value=null)
Set overall / global booking limit.
getReservationFilterPeriod()
Get reservation filter period default.
Class ilObject Basic functions for all objects.
getId()
get object id @access public
update($pash, $contents, Config $config)