Public Member Functions | |
ilMDFormat ($a_rbac_id=0, $a_obj_id=0, $a_obj_type= '') | |
setFormat ($a_format) | |
getFormat () | |
save () | |
update () | |
delete () | |
__getFields () | |
read () | |
toXML (&$writer) | |
_getIds ($a_rbac_id, $a_obj_id) | |
ilMDFormat ($a_rbac_id=0, $a_obj_id=0, $a_obj_type= '') | |
setFormat ($a_format) | |
getFormat () | |
save () | |
update () | |
delete () | |
__getFields () | |
read () | |
toXML (&$writer) | |
_getIds ($a_rbac_id, $a_obj_id) |
Definition at line 34 of file class.ilMDFormat.php.
ilMDFormat::__getFields | ( | ) |
Definition at line 96 of file class.ilMDFormat.php.
References getFormat(), ilMDBase::getObjId(), ilMDBase::getObjType(), and ilMDBase::getRBACId().
{ return array('rbac_id' => $this->getRBACId(), 'obj_id' => $this->getObjId(), 'obj_type' => $this->getObjType(), 'format' => $this->getFormat()); }
ilMDFormat::__getFields | ( | ) |
Definition at line 96 of file class.ilMDFormat.php.
References getFormat(), 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()), 'format' => ilUtil::prepareDBString($this->getFormat())); }
ilMDFormat::_getIds | ( | $ | a_rbac_id, | |
$ | a_obj_id | |||
) |
Definition at line 140 of file class.ilMDFormat.php.
References $query, $res, and $row.
Referenced by ilMDTechnical::getFormatIds().
{ global $ilDB; $query = "SELECT meta_format_id FROM il_meta_format ". "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_format_id; } return $ids ? $ids : array(); }
ilMDFormat::_getIds | ( | $ | a_rbac_id, | |
$ | a_obj_id | |||
) |
Definition at line 137 of file class.ilMDFormat.php.
ilMDFormat::delete | ( | ) |
Reimplemented from ilMDBase.
Definition at line 81 of file class.ilMDFormat.php.
References $query, and ilMDBase::getMetaId().
{ if($this->getMetaId()) { $query = "DELETE FROM il_meta_format ". "WHERE meta_format_id = '".$this->getMetaId()."'"; $this->db->query($query); return true; } return false; }
ilMDFormat::delete | ( | ) |
Reimplemented from ilMDBase.
Definition at line 81 of file class.ilMDFormat.php.
References $query, and ilMDBase::getMetaId().
{ if($this->getMetaId()) { $query = "DELETE FROM il_meta_format ". "WHERE meta_format_id = '".$this->getMetaId()."'"; $this->db->query($query); return true; } return false; }
ilMDFormat::getFormat | ( | ) |
Definition at line 48 of file class.ilMDFormat.php.
{
return $this->format;
}
ilMDFormat::getFormat | ( | ) |
Definition at line 48 of file class.ilMDFormat.php.
Referenced by __getFields(), and toXML().
{
return $this->format;
}
ilMDFormat::ilMDFormat | ( | $ | a_rbac_id = 0 , |
|
$ | a_obj_id = 0 , |
|||
$ | a_obj_type = '' | |||
) |
Definition at line 36 of file class.ilMDFormat.php.
References ilMDBase::ilMDBase().
{ parent::ilMDBase($a_rbac_id, $a_obj_id, $a_obj_type); }
ilMDFormat::ilMDFormat | ( | $ | a_rbac_id = 0 , |
|
$ | a_obj_id = 0 , |
|||
$ | a_obj_type = '' | |||
) |
Definition at line 36 of file class.ilMDFormat.php.
References ilMDBase::ilMDBase().
{ parent::ilMDBase($a_rbac_id, $a_obj_id, $a_obj_type); }
ilMDFormat::read | ( | ) |
Definition at line 104 of file class.ilMDFormat.php.
References $query, $res, $row, ilMDBase::getMetaId(), setFormat(), 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_format ". "WHERE meta_format_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->setFormat(ilUtil::stripSlashes($row->format)); } } return true; }
ilMDFormat::read | ( | ) |
Definition at line 104 of file class.ilMDFormat.php.
References $query, $res, $row, ilMDBase::getMetaId(), setFormat(), ilMDBase::setObjId(), ilMDBase::setObjType(), and ilMDBase::setRBACId().
{ include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php'; if($this->getMetaId()) { $query = "SELECT * FROM il_meta_format ". "WHERE meta_format_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->setFormat($row->format); } } return true; }
ilMDFormat::save | ( | ) |
Reimplemented from ilMDBase.
Definition at line 53 of file class.ilMDFormat.php.
References ilMDBase::getMetaId(), and ilMDBase::setMetaId().
{ if($this->db->autoExecute('il_meta_format', $this->__getFields(), DB_AUTOQUERY_INSERT)) { $this->setMetaId($this->db->getLastInsertId()); return $this->getMetaId(); } return false; }
ilMDFormat::save | ( | ) |
Reimplemented from ilMDBase.
Definition at line 53 of file class.ilMDFormat.php.
References ilMDBase::getMetaId(), and ilMDBase::setMetaId().
{ if($this->db->autoExecute('il_meta_format', $this->__getFields(), DB_AUTOQUERY_INSERT)) { $this->setMetaId($this->db->getLastInsertId()); return $this->getMetaId(); } return false; }
ilMDFormat::setFormat | ( | $ | a_format | ) |
Definition at line 44 of file class.ilMDFormat.php.
Referenced by read().
{ $this->format = $a_format; }
ilMDFormat::setFormat | ( | $ | a_format | ) |
Definition at line 44 of file class.ilMDFormat.php.
{ $this->format = $a_format; }
ilMDFormat::toXML | ( | &$ | writer | ) |
Reimplemented from ilMDBase.
Definition at line 130 of file class.ilMDFormat.php.
References getFormat().
{ $writer->xmlElement('Format',null,$this->getFormat()); }
ilMDFormat::toXML | ( | &$ | writer | ) |
Reimplemented from ilMDBase.
Definition at line 130 of file class.ilMDFormat.php.
References getFormat().
ilMDFormat::update | ( | ) |
Reimplemented from ilMDBase.
Definition at line 66 of file class.ilMDFormat.php.
References ilMDBase::getMetaId().
{ if($this->getMetaId()) { if($this->db->autoExecute('il_meta_format', $this->__getFields(), DB_AUTOQUERY_UPDATE, "meta_format_id = '".$this->getMetaId()."'")) { return true; } } return false; }
ilMDFormat::update | ( | ) |
Reimplemented from ilMDBase.
Definition at line 66 of file class.ilMDFormat.php.
References ilMDBase::getMetaId().
{ if($this->getMetaId()) { if($this->db->autoExecute('il_meta_format', $this->__getFields(), DB_AUTOQUERY_UPDATE, "meta_format_id = '".$this->getMetaId()."'")) { return true; } } return false; }