Public Member Functions | |
| ilLMMenuEditor () | |
| setObjId ($a_obj_id) | |
| getObjId () | |
| setEntryId ($a_id) | |
| getEntryId () | |
| setLinkType ($a_link_type) | |
| getLinkType () | |
| setTitle ($a_title) | |
| getTitle () | |
| setTarget ($a_target) | |
| getTarget () | |
| setLinkRefId ($a_link_ref_id) | |
| getLinkRefId () | |
| create () | |
| getMenuEntries ($a_only_active=false) | |
| delete ($a_id) | |
| delete menu entry | |
| update () | |
| update menu entry | |
| readEntry ($a_id) | |
| updateActiveStatus ($a_entries) | |
| update active status of all menu entries of lm | |
Definition at line 31 of file class.ilLMMenuEditor.php.
| ilLMMenuEditor::create | ( | ) |
Definition at line 102 of file class.ilLMMenuEditor.php.
References $q, getLinkRefId(), getLinkType(), getObjId(), getTarget(), and getTitle().
{
$q = "INSERT INTO lm_menu (lm_id,link_type,title,target,link_ref_id) ".
"VALUES ".
"(".
$this->db->quote($this->getObjId()).",".
$this->db->quote($this->getLinkType()).",".
$this->db->quote($this->getTitle()).",".
$this->db->quote($this->getTarget()).",".
$this->db->quote($this->getLinkRefId()).")";
$r = $this->db->query($q);
return true;
}
Here is the call graph for this function:| ilLMMenuEditor::delete | ( | $ | a_id | ) |
| ilLMMenuEditor::getEntryId | ( | ) |
Definition at line 57 of file class.ilLMMenuEditor.php.
{
return $this->entry_id;
}
| ilLMMenuEditor::getLinkRefId | ( | ) |
Definition at line 97 of file class.ilLMMenuEditor.php.
Referenced by create().
{
return $this->link_ref_id;
}
Here is the caller graph for this function:| ilLMMenuEditor::getLinkType | ( | ) |
Definition at line 67 of file class.ilLMMenuEditor.php.
Referenced by create().
{
return $this->link_type;
}
Here is the caller graph for this function:| ilLMMenuEditor::getMenuEntries | ( | $ | a_only_active = false |
) |
Definition at line 117 of file class.ilLMMenuEditor.php.
References $entries, $q, and $row.
{
$entries = array();
if ($a_only_active === true)
{
$and = " AND active = 'y'";
}
$q = "SELECT * FROM lm_menu ".
"WHERE lm_id = ".$this->lm_id.
$and;
$r = $this->db->query($q);
while($row = $r->fetchRow(DB_FETCHMODE_OBJECT))
{
$entries[] = array('id' => $row->id,
'title' => $row->title,
'link' => $row->target,
'type' => $row->link_type,
'ref_id' => $row->link_ref_id,
'active' => $row->active
);
}
return $entries;
}
| ilLMMenuEditor::getObjId | ( | ) |
Definition at line 47 of file class.ilLMMenuEditor.php.
Referenced by create().
{
return $this->lm_id;
}
Here is the caller graph for this function:| ilLMMenuEditor::getTarget | ( | ) |
Definition at line 87 of file class.ilLMMenuEditor.php.
Referenced by create().
{
return $this->target;
}
Here is the caller graph for this function:| ilLMMenuEditor::getTitle | ( | ) |
Definition at line 77 of file class.ilLMMenuEditor.php.
Referenced by create().
{
return $this->title;
}
Here is the caller graph for this function:| ilLMMenuEditor::ilLMMenuEditor | ( | ) |
Definition at line 33 of file class.ilLMMenuEditor.php.
{
global $ilDB;
$this->db =& $ilDB;
$this->link_type = "extern";
$this->link_ref_id = null;
}
| ilLMMenuEditor::readEntry | ( | $ | a_id | ) |
Definition at line 180 of file class.ilLMMenuEditor.php.
References $q, $row, setLinkRefId(), setLinkType(), setTarget(), and setTitle().
{
if (!$a_id)
{
return false;
}
$q = "SELECT * FROM lm_menu WHERE id = ".$this->db->quote($a_id);
$r = $this->db->query($q);
$row = $this->db->getRow($q,DB_FETCHMODE_OBJECT);
$this->setTitle($row->title);
$this->setTarget($row->target);
$this->setLinkType($row->link_type);
$this->setLinkRefId($row->link_ref_id);
$this->setEntryid($a_id);
}
Here is the call graph for this function:| ilLMMenuEditor::setEntryId | ( | $ | a_id | ) |
Definition at line 52 of file class.ilLMMenuEditor.php.
{
$this->entry_id = $a_id;
}
| ilLMMenuEditor::setLinkRefId | ( | $ | a_link_ref_id | ) |
Definition at line 92 of file class.ilLMMenuEditor.php.
Referenced by readEntry().
{
$this->link_ref_id = $a_link_ref_id;
}
Here is the caller graph for this function:| ilLMMenuEditor::setLinkType | ( | $ | a_link_type | ) |
Definition at line 62 of file class.ilLMMenuEditor.php.
Referenced by readEntry().
{
$this->link_type = $a_link_type;
}
Here is the caller graph for this function:| ilLMMenuEditor::setObjId | ( | $ | a_obj_id | ) |
Definition at line 42 of file class.ilLMMenuEditor.php.
{
$this->lm_id = $a_obj_id;
}
| ilLMMenuEditor::setTarget | ( | $ | a_target | ) |
Definition at line 82 of file class.ilLMMenuEditor.php.
Referenced by readEntry().
{
$this->target = $a_target;
}
Here is the caller graph for this function:| ilLMMenuEditor::setTitle | ( | $ | a_title | ) |
Definition at line 72 of file class.ilLMMenuEditor.php.
Referenced by readEntry().
{
$this->title = $a_title;
}
Here is the caller graph for this function:| ilLMMenuEditor::update | ( | ) |
| ilLMMenuEditor::updateActiveStatus | ( | $ | a_entries | ) |
update active status of all menu entries of lm
| array | entry ids |
Definition at line 204 of file class.ilLMMenuEditor.php.
References $q.
1.7.1