1<?php 2/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */ 3 4require_once "./Services/Object/classes/class.ilObject.php"; 5 6/** 7* Class ilObjMediaObjectsSettings 8* 9* @author Alex Killing <alex.killing@gmx.de> 10* @version $Id$ 11* 12* @ingroup ServicesMediaObjects 13*/ 14class ilObjMediaObjectsSettings extends ilObject 15{ 16 /** 17 * @var ilDB 18 */ 19 protected $db; 20 21 22 /** 23 * Constructor 24 * @access public 25 * @param integer reference_id or object_id 26 * @param boolean treat the id as reference_id (true) or object_id (false) 27 */ 28 public function __construct($a_id = 0, $a_call_by_reference = true) 29 { 30 global $DIC; 31 32 $this->db = $DIC->database(); 33 $this->type = "mobs"; 34 parent::__construct($a_id, $a_call_by_reference); 35 } 36 37 /** 38 * update object data 39 * 40 * @access public 41 * @return boolean 42 */ 43 public function update() 44 { 45 $ilDB = $this->db; 46 47 if (!parent::update()) { 48 return false; 49 } 50 51 return true; 52 } 53 54 /** 55 * read 56 */ 57 public function read() 58 { 59 $ilDB = $this->db; 60 61 parent::read(); 62 } 63 64 65 66 67 68 /** 69 * delete object and all related data 70 * 71 * @access public 72 * @return boolean true if all object data were removed; false if only a references were removed 73 */ 74 public function delete() 75 { 76 // always call parent delete function first!! 77 if (!parent::delete()) { 78 return false; 79 } 80 81 //put here your module specific stuff 82 83 return true; 84 } 85} 86