/** * delete session and all related data * * @access public * @return bool */ public function delete() { global $ilDB; global $ilAppEventHandler; if (!parent::delete()) { return false; } $query = "DELETE FROM event " . "WHERE obj_id = " . $this->db->quote($this->getId(), 'integer') . " "; $res = $ilDB->manipulate($query); include_once './Modules/Session/classes/class.ilSessionAppointment.php'; ilSessionAppointment::_deleteBySession($this->getId()); include_once './Modules/Session/classes/class.ilEventItems.php'; ilEventItems::_delete($this->getId()); include_once './Modules/Session/classes/class.ilEventParticipants.php'; ilEventParticipants::_deleteByEvent($this->getId()); foreach ($this->getFiles() as $file) { $file->delete(); } $ilAppEventHandler->raise('Modules/Session', 'delete', array('object' => $this, 'obj_id' => $this->getId(), 'appointments' => $this->prepareCalendarAppointments('delete'))); return true; }
function delete() { return ilEventItems::_delete($this->getEventId()); }