ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilObjectDataDeletionLog.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
3
13{
14 public static function add(ilObject $a_object)
15 {
16 global $DIC;
17
18 $ilDB = $DIC->database();
19
20 $ilDB->insert("object_data_del", array(
21 "obj_id" => array("integer", $a_object->getId()),
22 "type" => array("text", $a_object->getType()),
23 "title" => array("text", $a_object->getTitle()),
24 "description" => array("clob", $a_object->getLongDescription()),
25 "tstamp" => array("integer", time())
26 ));
27 }
28
29 public static function get($a_object_id)
30 {
31 global $DIC;
32
33 $ilDB = $DIC->database();
34
35 $set = $ilDB->query("SELECT * FROM object_data_del" .
36 " WHERE obj_id = " . $ilDB->quote($a_object_id, "integer"));
37 return $ilDB->fetchAssoc($set);
38 }
39}
An exception for terminatinating execution or to throw for unit testing.
static add(ilObject $a_object)
Class ilObject Basic functions for all objects.
getType()
get object type @access public
getLongDescription()
get object long description (stored in object_description)
getId()
get object id @access public
getTitle()
get object title @access public
global $DIC
Definition: goto.php:24
global $ilDB