58        $this->db = 
$DIC->database();
 
   59        $this->
error = $DIC[
"ilErr"];
 
   61        if ($a_tree_id == 0) {
 
   62            $a_tree_id = 
$GLOBALS[
'DIC'][
'ilUser']->getId();
 
   65        $this->tree = 
new ilTree($a_tree_id);
 
   66        $this->tree->setTableNames(
'bookmark_tree', 
'bookmark_data');
 
   70        if (!empty($this->
id)) {
 
   84        $q = 
"SELECT * FROM bookmark_data WHERE obj_id = " .
 
   86        $bm_set = 
$ilDB->query($q);
 
   87        if (
$ilDB->numRows($bm_set) == 0) {
 
   88            $message = 
"ilBookmark::read(): Bookmark with id " . $this->
id . 
" not found!";
 
   91            $bm = 
$ilDB->fetchAssoc($bm_set);
 
   95            $this->
setParent($this->tree->getParentId($this->id));
 
  102    public function delete()
 
  106        if ($this->
getId() != 1) {
 
  107            $q = 
"DELETE FROM bookmark_data WHERE obj_id = " .
 
  109            $ilDB->manipulate($q);
 
  123            "INSERT INTO bookmark_data (obj_id, user_id, title,description, target, type) " .
 
  124                "VALUES (%s,%s,%s,%s,%s,%s)",
 
  125            $ilDB->quote($this->getId(), 
"integer"),
 
  127            $ilDB->quote($this->getTitle(), 
"text"),
 
  128            $ilDB->quote($this->getDescription(), 
"text"),
 
  129            $ilDB->quote($this->getTarget(), 
"text"),
 
  130            $ilDB->quote(
'bm', 
"text")
 
  133        $ilDB->manipulate($q);
 
  145            "UPDATE bookmark_data SET title=%s,description=%s,target=%s " .
 
  147            $ilDB->quote($this->getTitle(), 
"text"),
 
  148            $ilDB->quote($this->getDescription(), 
"text"),
 
  149            $ilDB->quote($this->getTarget(), 
"text"),
 
  150            $ilDB->quote($this->getId(), 
"integer")
 
  152        $ilDB->manipulate($q);
 
  178        $this->title = $a_str;
 
  192        $this->description = $a_str;
 
  207        $this->target = $a_target;
 
  218        $this->parent = $a_parent_id;
 
  236        $q = 
"SELECT * FROM bookmark_data WHERE obj_id = " .
 
  237            $ilDB->quote($a_id, 
"integer");
 
  238        $bm_set = 
$ilDB->query($q);
 
  239        if (
$ilDB->numRows($bm_set) == 0) {
 
  242            $bm = 
$ilDB->fetchAssoc($bm_set);
 
An exception for terminatinating execution or to throw for unit testing.
error($a_errmsg)
set error message @access public
Class Bookmarks Bookmark management.
setTarget($a_target)
set target @access public
read()
read bookmark folder data from db
__construct($a_bm_id=0, $a_tree_id=0)
Constructor @access public.
update()
Update bookmark item.
setTitle($a_str)
set title @access public
static _getTypeOfId($a_id)
get type of a given id
create()
Create new bookmark item.
setDescription($a_str)
set description @access public
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
catch(Exception $e) $message
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.