Public Member Functions | |
| ilBookmark ($a_bm_id=0, $a_tree_id=0) | |
| Constructor public. | |
| read () | |
| read bookmark folder data from db | |
| delete () | |
| delete object data | |
| create () | |
| update () | |
| setId ($a_id) | |
| getId () | |
| setTitle ($a_str) | |
| set description public | |
| getTitle () | |
| setTarget ($a_target) | |
| set target public | |
| getTarget () | |
| setParent ($a_parent_id) | |
| getParent () | |
Data Fields | |
| $user_Id | |
| $ilias | |
| $tree | |
| $title | |
| $target | |
| $id | |
| $parent | |
Definition at line 33 of file class.ilBookmark.php.
| ilBookmark::create | ( | ) |
Definition at line 117 of file class.ilBookmark.php.
References $q, getId(), getParent(), getTitle(), and setId().
{
$q = "INSERT INTO bookmark_data (user_id, title, target, type) ".
"VALUES ('".$_SESSION["AccountId"]."','".$this->getTitle().
"','".$this->getTarget()."','bm')";
$this->ilias->db->query($q);
$this->setId($this->ilias->db->getLastInsertId());
$this->tree->insertNode($this->getId(), $this->getParent());
}
Here is the call graph for this function:| ilBookmark::delete | ( | ) |
| ilBookmark::getId | ( | ) |
Definition at line 148 of file class.ilBookmark.php.
Referenced by create(), and update().
{
return $this->id;
}
Here is the caller graph for this function:| ilBookmark::getParent | ( | ) |
Definition at line 189 of file class.ilBookmark.php.
Referenced by create().
{
return $this->parent;
}
Here is the caller graph for this function:| ilBookmark::getTarget | ( | ) |
Definition at line 179 of file class.ilBookmark.php.
{
return $this->target;
}
| ilBookmark::getTitle | ( | ) |
Definition at line 163 of file class.ilBookmark.php.
Referenced by create().
{
return $this->title;
}
Here is the caller graph for this function:| ilBookmark::ilBookmark | ( | $ | a_bm_id = 0, |
|
| $ | a_tree_id = 0 | |||
| ) |
Constructor public.
| integer | user_id (optional) |
Definition at line 60 of file class.ilBookmark.php.
References $_SESSION, $ilias, and read().
{
global $ilias;
// Initiate variables
$this->ilias =& $ilias;
if ($a_tree_id == 0)
{
$a_tree_id = $_SESSION["AccountId"];
}
$this->tree = new ilTree($a_tree_id);
$this->tree->setTableNames('bookmark_tree','bookmark_data');
$this->id = $a_bm_id;
if(!empty($this->id))
{
$this->read();
}
}
Here is the call graph for this function:| ilBookmark::read | ( | ) |
read bookmark folder data from db
Definition at line 87 of file class.ilBookmark.php.
References $ilias, $q, setParent(), setTarget(), and setTitle().
Referenced by ilBookmark().
{
global $ilias;
$q = "SELECT * FROM bookmark_data WHERE obj_id = '".$this->id."'";
$bm_set = $this->ilias->db->query($q);
if ($bm_set->numRows() == 0)
{
$message = "ilBookmark::read(): Bookmark with id ".$this->id." not found!";
$ilias->raiseError($message,$ilias->error_obj->WARNING);
}
else
{
$bm = $bm_set->fetchRow(DB_FETCHMODE_ASSOC);
$this->setTitle($bm["title"]);
$this->setTarget($bm["target"]);
$this->setParent($this->tree->getParentId($this->id));
}
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilBookmark::setId | ( | $ | a_id | ) |
Definition at line 143 of file class.ilBookmark.php.
Referenced by create().
{
$this->id = $a_id;
}
Here is the caller graph for this function:| ilBookmark::setParent | ( | $ | a_parent_id | ) |
Definition at line 184 of file class.ilBookmark.php.
Referenced by read().
{
$this->parent = $a_parent_id;
}
Here is the caller graph for this function:| ilBookmark::setTarget | ( | $ | a_target | ) |
set target public
| string |
Definition at line 173 of file class.ilBookmark.php.
Referenced by read().
{
$this->target = $a_target;
}
Here is the caller graph for this function:| ilBookmark::setTitle | ( | $ | a_str | ) |
set description public
| string |
Definition at line 158 of file class.ilBookmark.php.
Referenced by read().
{
$this->title = $a_str;
}
Here is the caller graph for this function:| ilBookmark::update | ( | ) |
| ilBookmark::$id |
Definition at line 52 of file class.ilBookmark.php.
| ilBookmark::$ilias |
Definition at line 47 of file class.ilBookmark.php.
Referenced by ilBookmark(), and read().
| ilBookmark::$parent |
Definition at line 53 of file class.ilBookmark.php.
| ilBookmark::$target |
Definition at line 51 of file class.ilBookmark.php.
| ilBookmark::$title |
Definition at line 50 of file class.ilBookmark.php.
| ilBookmark::$tree |
Definition at line 48 of file class.ilBookmark.php.
| ilBookmark::$user_Id |
Definition at line 40 of file class.ilBookmark.php.
1.7.1