Public Member Functions | |
| ilLPEventCollections ($a_obj_id) | |
| getObjId () | |
| getItems () | |
| isAssigned ($a_obj_id) | |
| add ($item_id) | |
| delete ($item_id) | |
| _deleteAll ($a_obj_id) | |
| _getItems ($a_obj_id) | |
| __read () | |
Data Fields | |
| $db = null | |
| $obj_id = null | |
| $items = array() | |
Definition at line 35 of file class.ilLPEventCollections.php.
| ilLPEventCollections::__read | ( | ) |
Definition at line 134 of file class.ilLPEventCollections.php.
References $res, and ilEvent::_exists().
Referenced by add(), delete(), and ilLPEventCollections().
{
include_once 'Modules/Course/classes/Event/class.ilEvent.php';
global $ilObjDataCache;
$query = "SELECT * FROM ut_lp_event_collections WHERE obj_id = ".$this->db->quote($this->obj_id)."";
$res = $this->db->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
if(!ilEvent::_exists($row->item_id))
{
$query = "DELETE FROM ut_lp_event_collections ".
"WHERE obj_id = '".$this->getObjId()."' ".
"AND item_id = '".$row->item_id."'";
$this->db->query($query);
continue;
}
$this->items[] = $row->item_id;
}
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilLPEventCollections::_deleteAll | ( | $ | a_obj_id | ) |
Definition at line 98 of file class.ilLPEventCollections.php.
{
global $ilDB;
$query = "DELETE FROM ut_lp_collections ".
"WHERE obj_id = '".$a_obj_id."'";
$ilDB->query($query);
return true;
}
| ilLPEventCollections::_getItems | ( | $ | a_obj_id | ) |
Definition at line 109 of file class.ilLPEventCollections.php.
References $items, $res, and ilEvent::_exists().
Referenced by ilPDFPresentation::__renderContainerRow(), ilLPListOfObjectsGUI::__renderContainerRow(), ilLPListOfProgressGUI::__showContainerList(), ilLPStatusCollection::_getCompleted(), ilLPStatusCollection::_getInProgress(), and ilLPStatusCollection::_getStatusInfo().
{
include_once 'Modules/Course/classes/Event/class.ilEvent.php';
global $ilObjDataCache;
global $ilDB;
$query = "SELECT * FROM ut_lp_event_collections WHERE obj_id = ".$ilDB->quote($a_obj_id)." ";
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
if(!ilEvent::_exists($row->item_id))
{
$query = "DELETE FROM ut_lp_event_collections ".
"WHERE obj_id = ".$ilDB->quote($a_obj_id)." ".
"AND item_id = ".$ilDB->quote($row->item_id)."";
$ilDB->query($query);
continue;
}
$items[] = $row->item_id;
}
return $items ? $items : array();
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilLPEventCollections::add | ( | $ | item_id | ) |
Definition at line 68 of file class.ilLPEventCollections.php.
References __read(), and isAssigned().
{
if($this->isAssigned($item_id))
{
return false;
}
$query = "INSERT INTO ut_lp_event_collections ".
"SET obj_id = '".$this->obj_id."', ".
"item_id = '".(int) $item_id."'";
$this->db->query($query);
$this->__read();
return true;
}
Here is the call graph for this function:| ilLPEventCollections::delete | ( | $ | item_id | ) |
Definition at line 85 of file class.ilLPEventCollections.php.
References __read().
{
$query = "DELETE FROM ut_lp_event_collections ".
"WHERE item_id = '".$item_id."' ".
"AND obj_id = '".$this->obj_id."'";
$this->db->query($query);
$this->__read();
return true;
}
Here is the call graph for this function:| ilLPEventCollections::getItems | ( | ) |
Definition at line 58 of file class.ilLPEventCollections.php.
{
return $this->items;
}
| ilLPEventCollections::getObjId | ( | ) |
Definition at line 53 of file class.ilLPEventCollections.php.
{
return (int) $this->obj_id;
}
| ilLPEventCollections::ilLPEventCollections | ( | $ | a_obj_id | ) |
Definition at line 42 of file class.ilLPEventCollections.php.
References __read().
{
global $ilObjDataCache,$ilDB;
$this->db =& $ilDB;
$this->obj_id = $a_obj_id;
$this->__read();
}
Here is the call graph for this function:| ilLPEventCollections::isAssigned | ( | $ | a_obj_id | ) |
Definition at line 63 of file class.ilLPEventCollections.php.
Referenced by add().
{
return (bool) in_array($a_obj_id,$this->items);
}
Here is the caller graph for this function:| ilLPEventCollections::$db = null |
Definition at line 37 of file class.ilLPEventCollections.php.
| ilLPEventCollections::$items = array() |
Definition at line 40 of file class.ilLPEventCollections.php.
Referenced by _getItems().
| ilLPEventCollections::$obj_id = null |
Definition at line 39 of file class.ilLPEventCollections.php.
1.7.1