Public Member Functions | |
ilMDAnnotation ($a_rbac_id=0, $a_obj_id=0, $a_obj_type= '') | |
setEntity ($a_entity) | |
getEntity () | |
setDate ($a_date) | |
getDate () | |
setDescription ($a_desc) | |
getDescription () | |
setDescriptionLanguage ($lng_obj) | |
& | getDescriptionLanguage () |
getDescriptionLanguageCode () | |
save () | |
update () | |
delete () | |
__getFields () | |
read () | |
toXML (&$writer) | |
_getIds ($a_rbac_id, $a_obj_id) | |
ilMDAnnotation ($a_rbac_id=0, $a_obj_id=0, $a_obj_type= '') | |
setEntity ($a_entity) | |
getEntity () | |
setDate ($a_date) | |
getDate () | |
setDescription ($a_desc) | |
getDescription () | |
setDescriptionLanguage ($lng_obj) | |
& | getDescriptionLanguage () |
getDescriptionLanguageCode () | |
save () | |
update () | |
delete () | |
__getFields () | |
read () | |
toXML (&$writer) | |
_getIds ($a_rbac_id, $a_obj_id) |
Definition at line 33 of file class.ilMDAnnotation.php.
ilMDAnnotation::__getFields | ( | ) |
Definition at line 130 of file class.ilMDAnnotation.php.
References getDate(), getDescription(), getDescriptionLanguageCode(), getEntity(), ilMDBase::getObjId(), ilMDBase::getObjType(), and ilMDBase::getRBACId().
{ return array('rbac_id' => $this->getRBACId(), 'obj_id' => $this->getObjId(), 'obj_type' => $this->getObjType(), 'entity' => $this->getEntity(), 'date' => $this->getDate(), 'description' => $this->getDescription(), 'description_language' => $this->getDescriptionLanguageCode()); }
ilMDAnnotation::__getFields | ( | ) |
Definition at line 130 of file class.ilMDAnnotation.php.
References getDate(), getDescription(), getDescriptionLanguageCode(), getEntity(), ilMDBase::getObjId(), ilMDBase::getObjType(), ilMDBase::getRBACId(), and ilUtil::prepareDBString().
{ return array('rbac_id' => $this->getRBACId(), 'obj_id' => $this->getObjId(), 'obj_type' => ilUtil::prepareDBString($this->getObjType()), 'entity' => ilUtil::prepareDBString($this->getEntity()), 'date' => ilUtil::prepareDBString($this->getDate()), 'description' => ilUtil::prepareDBString($this->getDescription()), 'description_language' => ilUtil::prepareDBString($this->getDescriptionLanguageCode())); }
ilMDAnnotation::_getIds | ( | $ | a_rbac_id, | |
$ | a_obj_id | |||
) |
Definition at line 185 of file class.ilMDAnnotation.php.
References $query, $res, and $row.
Referenced by ilMD::getAnnotationIds().
{ global $ilDB; $query = "SELECT meta_annotation_id FROM il_meta_annotation ". "WHERE rbac_id = '".$a_rbac_id."' ". "AND obj_id = '".$a_obj_id."'"; $res = $ilDB->query($query); while($row = $res->fetchRow(DB_FETCHMODE_OBJECT)) { $ids[] = $row->meta_annotation_id; } return $ids ? $ids : array(); }
ilMDAnnotation::_getIds | ( | $ | a_rbac_id, | |
$ | a_obj_id | |||
) |
Definition at line 182 of file class.ilMDAnnotation.php.
ilMDAnnotation::delete | ( | ) |
Reimplemented from ilMDBase.
Definition at line 115 of file class.ilMDAnnotation.php.
References $query, and ilMDBase::getMetaId().
{ if($this->getMetaId()) { $query = "DELETE FROM il_meta_annotation ". "WHERE meta_annotation_id = '".$this->getMetaId()."'"; $this->db->query($query); return true; } return false; }
ilMDAnnotation::delete | ( | ) |
Reimplemented from ilMDBase.
Definition at line 115 of file class.ilMDAnnotation.php.
References $query, and ilMDBase::getMetaId().
{ if($this->getMetaId()) { $query = "DELETE FROM il_meta_annotation ". "WHERE meta_annotation_id = '".$this->getMetaId()."'"; $this->db->query($query); return true; } return false; }
ilMDAnnotation::getDate | ( | ) |
Definition at line 55 of file class.ilMDAnnotation.php.
{
return $this->date;
}
ilMDAnnotation::getDate | ( | ) |
Definition at line 55 of file class.ilMDAnnotation.php.
Referenced by __getFields(), and toXML().
{
return $this->date;
}
ilMDAnnotation::getDescription | ( | ) |
Definition at line 63 of file class.ilMDAnnotation.php.
Referenced by __getFields(), and toXML().
{
return $this->description;
}
ilMDAnnotation::getDescription | ( | ) |
Definition at line 63 of file class.ilMDAnnotation.php.
{
return $this->description;
}
& ilMDAnnotation::getDescriptionLanguage | ( | ) |
Definition at line 74 of file class.ilMDAnnotation.php.
{
return $this->description_language;
}
& ilMDAnnotation::getDescriptionLanguage | ( | ) |
Definition at line 74 of file class.ilMDAnnotation.php.
{
return $this->description_language;
}
ilMDAnnotation::getDescriptionLanguageCode | ( | ) |
Definition at line 78 of file class.ilMDAnnotation.php.
Referenced by __getFields(), and toXML().
{ if(is_object($this->description_language)) { return $this->description_language->getLanguageCode(); } return false; }
ilMDAnnotation::getDescriptionLanguageCode | ( | ) |
Definition at line 78 of file class.ilMDAnnotation.php.
{ if(is_object($this->description_language)) { return $this->description_language->getLanguageCode(); } return false; }
ilMDAnnotation::getEntity | ( | ) |
Definition at line 47 of file class.ilMDAnnotation.php.
Referenced by __getFields(), and toXML().
{
return $this->entity;
}
ilMDAnnotation::getEntity | ( | ) |
Definition at line 47 of file class.ilMDAnnotation.php.
{
return $this->entity;
}
ilMDAnnotation::ilMDAnnotation | ( | $ | a_rbac_id = 0 , |
|
$ | a_obj_id = 0 , |
|||
$ | a_obj_type = '' | |||
) |
Definition at line 35 of file class.ilMDAnnotation.php.
References ilMDBase::ilMDBase().
{ parent::ilMDBase($a_rbac_id, $a_obj_id, $a_obj_type); }
ilMDAnnotation::ilMDAnnotation | ( | $ | a_rbac_id = 0 , |
|
$ | a_obj_id = 0 , |
|||
$ | a_obj_type = '' | |||
) |
Definition at line 35 of file class.ilMDAnnotation.php.
References ilMDBase::ilMDBase().
{ parent::ilMDBase($a_rbac_id, $a_obj_id, $a_obj_type); }
ilMDAnnotation::read | ( | ) |
Definition at line 141 of file class.ilMDAnnotation.php.
References $query, $res, $row, ilMDBase::getMetaId(), setDate(), setDescription(), setEntity(), ilMDBase::setObjId(), ilMDBase::setObjType(), ilMDBase::setRBACId(), and ilUtil::stripSlashes().
{ include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDLanguageItem.php'; if($this->getMetaId()) { $query = "SELECT * FROM il_meta_annotation ". "WHERE meta_annotation_id = '".$this->getMetaId()."'"; $res = $this->db->query($query); while($row = $res->fetchRow(DB_FETCHMODE_OBJECT)) { $this->setRBACId($row->rbac_id); $this->setObjId($row->obj_id); $this->setObjType($row->obj_type); $this->setEntity(ilUtil::stripSlashes($row->entity)); $this->setDate(ilUtil::stripSlashes($row->date)); $this->setDescription(ilUtil::stripSlashes($row->description)); $this->description_language =& new ilMDLanguageItem($row->description_language); } } return true; }
ilMDAnnotation::read | ( | ) |
Definition at line 141 of file class.ilMDAnnotation.php.
References $query, $res, $row, ilMDBase::getMetaId(), setDate(), setDescription(), setEntity(), ilMDBase::setObjId(), ilMDBase::setObjType(), and ilMDBase::setRBACId().
{ include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php'; if($this->getMetaId()) { $query = "SELECT * FROM il_meta_annotation ". "WHERE meta_annotation_id = '".$this->getMetaId()."'"; $res = $this->db->query($query); while($row = $res->fetchRow(DB_FETCHMODE_OBJECT)) { $this->setRBACId($row->rbac_id); $this->setObjId($row->obj_id); $this->setObjType($row->obj_type); $this->setEntity($row->entity); $this->setDate($row->date); $this->setDescription($row->description); $this->description_language =& new ilMDLanguageItem($row->description_language); } } return true; }
ilMDAnnotation::save | ( | ) |
Reimplemented from ilMDBase.
Definition at line 87 of file class.ilMDAnnotation.php.
References ilMDBase::getMetaId(), and ilMDBase::setMetaId().
{ if($this->db->autoExecute('il_meta_annotation', $this->__getFields(), DB_AUTOQUERY_INSERT)) { $this->setMetaId($this->db->getLastInsertId()); return $this->getMetaId(); } return false; }
ilMDAnnotation::save | ( | ) |
Reimplemented from ilMDBase.
Definition at line 87 of file class.ilMDAnnotation.php.
References ilMDBase::getMetaId(), and ilMDBase::setMetaId().
{ if($this->db->autoExecute('il_meta_annotation', $this->__getFields(), DB_AUTOQUERY_INSERT)) { $this->setMetaId($this->db->getLastInsertId()); return $this->getMetaId(); } return false; }
ilMDAnnotation::setDate | ( | $ | a_date | ) |
Definition at line 51 of file class.ilMDAnnotation.php.
Referenced by read().
{ $this->date = $a_date; }
ilMDAnnotation::setDate | ( | $ | a_date | ) |
Definition at line 51 of file class.ilMDAnnotation.php.
{ $this->date = $a_date; }
ilMDAnnotation::setDescription | ( | $ | a_desc | ) |
Definition at line 59 of file class.ilMDAnnotation.php.
{ $this->description = $a_desc; }
ilMDAnnotation::setDescription | ( | $ | a_desc | ) |
Definition at line 59 of file class.ilMDAnnotation.php.
Referenced by read().
{ $this->description = $a_desc; }
ilMDAnnotation::setDescriptionLanguage | ( | $ | lng_obj | ) |
Definition at line 67 of file class.ilMDAnnotation.php.
{
if(is_object($lng_obj))
{
$this->description_language =& $lng_obj;
}
}
ilMDAnnotation::setDescriptionLanguage | ( | $ | lng_obj | ) |
Definition at line 67 of file class.ilMDAnnotation.php.
{
if(is_object($lng_obj))
{
$this->description_language =& $lng_obj;
}
}
ilMDAnnotation::setEntity | ( | $ | a_entity | ) |
Definition at line 43 of file class.ilMDAnnotation.php.
Referenced by read().
{ $this->entity = $a_entity; }
ilMDAnnotation::setEntity | ( | $ | a_entity | ) |
Definition at line 43 of file class.ilMDAnnotation.php.
{ $this->entity = $a_entity; }
ilMDAnnotation::toXML | ( | &$ | writer | ) |
Reimplemented from ilMDBase.
Definition at line 170 of file class.ilMDAnnotation.php.
References getDate(), getDescription(), getDescriptionLanguageCode(), and getEntity().
{ $writer->xmlStartTag('Annotation'); $writer->xmlElement('Entity',null,$this->getEntity()); $writer->xmlElement('Date',null,$this->getDate()); $writer->xmlElement('Description',array('Language' => $this->getDescriptionLanguageCode()),$this->getDescription()); $writer->xmlEndTag('Annotation'); }
ilMDAnnotation::toXML | ( | &$ | writer | ) |
Reimplemented from ilMDBase.
Definition at line 170 of file class.ilMDAnnotation.php.
References getDate(), getDescription(), getDescriptionLanguageCode(), and getEntity().
{ $writer->xmlStartTag('Annotation'); $writer->xmlElement('Entity',null,$this->getEntity()); $writer->xmlElement('Date',null,$this->getDate()); $writer->xmlElement('Description',array('Language' => $this->getDescriptionLanguageCode() ? $this->getDescriptionLanguageCode() : 'en'), $this->getDescription()); $writer->xmlEndTag('Annotation'); }
ilMDAnnotation::update | ( | ) |
Reimplemented from ilMDBase.
Definition at line 100 of file class.ilMDAnnotation.php.
References ilMDBase::getMetaId().
{ if($this->getMetaId()) { if($this->db->autoExecute('il_meta_annotation', $this->__getFields(), DB_AUTOQUERY_UPDATE, "meta_annotation_id = '".$this->getMetaId()."'")) { return true; } } return false; }
ilMDAnnotation::update | ( | ) |
Reimplemented from ilMDBase.
Definition at line 100 of file class.ilMDAnnotation.php.
References ilMDBase::getMetaId().
{ if($this->getMetaId()) { if($this->db->autoExecute('il_meta_annotation', $this->__getFields(), DB_AUTOQUERY_UPDATE, "meta_annotation_id = '".$this->getMetaId()."'")) { return true; } } return false; }