Public Member Functions | |
ilMDEntity ($a_rbac_id=0, $a_obj_id=0, $a_obj_type= '') | |
setEntity ($a_entity) | |
getEntity () | |
save () | |
update () | |
delete () | |
__getFields () | |
read () | |
toXML (&$writer) | |
_getIds ($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type) | |
ilMDEntity ($a_rbac_id=0, $a_obj_id=0, $a_obj_type= '') | |
setEntity ($a_entity) | |
getEntity () | |
save () | |
update () | |
delete () | |
__getFields () | |
read () | |
toXML (&$writer) | |
_getIds ($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type) |
Definition at line 34 of file class.ilMDEntity.php.
ilMDEntity::__getFields | ( | ) |
Definition at line 96 of file class.ilMDEntity.php.
References getEntity(), ilMDBase::getObjId(), ilMDBase::getObjType(), ilMDBase::getParentId(), ilMDBase::getParentType(), and ilMDBase::getRBACId().
{ return array('rbac_id' => $this->getRBACId(), 'obj_id' => $this->getObjId(), 'obj_type' => $this->getObjType(), 'parent_type' => $this->getParentType(), 'parent_id' => $this->getParentId(), 'entity' => $this->getEntity()); }
ilMDEntity::__getFields | ( | ) |
Definition at line 96 of file class.ilMDEntity.php.
References getEntity(), ilMDBase::getObjId(), ilMDBase::getObjType(), ilMDBase::getParentId(), ilMDBase::getParentType(), ilMDBase::getRBACId(), and ilUtil::prepareDBString().
{ return array('rbac_id' => $this->getRBACId(), 'obj_id' => $this->getObjId(), 'obj_type' => ilUtil::prepareDBString($this->getObjType()), 'parent_type' => $this->getParentType(), 'parent_id' => $this->getParentId(), 'entity' => ilUtil::prepareDBString($this->getEntity())); }
ilMDEntity::_getIds | ( | $ | a_rbac_id, | |
$ | a_obj_id, | |||
$ | a_parent_id, | |||
$ | a_parent_type | |||
) |
Definition at line 139 of file class.ilMDEntity.php.
References $query, $res, and $row.
{ global $ilDB; $query = "SELECT meta_entity_id FROM il_meta_entity ". "WHERE rbac_id = '".$a_rbac_id."' ". "AND obj_id = '".$a_obj_id."' ". "AND parent_id = '".$a_parent_id."' ". "AND parent_type = '".$a_parent_type."' ". "ORDER BY meta_entity_id "; $res = $ilDB->query($query); while($row = $res->fetchRow(DB_FETCHMODE_OBJECT)) { $ids[] = $row->meta_entity_id; } return $ids ? $ids : array(); }
ilMDEntity::_getIds | ( | $ | a_rbac_id, | |
$ | a_obj_id, | |||
$ | a_parent_id, | |||
$ | a_parent_type | |||
) |
Definition at line 139 of file class.ilMDEntity.php.
References $query, $res, and $row.
{ global $ilDB; $query = "SELECT meta_entity_id FROM il_meta_entity ". "WHERE rbac_id = '".$a_rbac_id."' ". "AND obj_id = '".$a_obj_id."' ". "AND parent_id = '".$a_parent_id."' ". "AND parent_type = '".$a_parent_type."' "; $res = $ilDB->query($query); while($row = $res->fetchRow(DB_FETCHMODE_OBJECT)) { $ids[] = $row->meta_entity_id; } return $ids ? $ids : array(); }
ilMDEntity::delete | ( | ) |
Reimplemented from ilMDBase.
Definition at line 81 of file class.ilMDEntity.php.
References $query, and ilMDBase::getMetaId().
{ if($this->getMetaId()) { $query = "DELETE FROM il_meta_entity ". "WHERE meta_entity_id = '".$this->getMetaId()."'"; $this->db->query($query); return true; } return false; }
ilMDEntity::delete | ( | ) |
Reimplemented from ilMDBase.
Definition at line 81 of file class.ilMDEntity.php.
References $query, and ilMDBase::getMetaId().
{ if($this->getMetaId()) { $query = "DELETE FROM il_meta_entity ". "WHERE meta_entity_id = '".$this->getMetaId()."'"; $this->db->query($query); return true; } return false; }
ilMDEntity::getEntity | ( | ) |
Definition at line 48 of file class.ilMDEntity.php.
{
return $this->entity;
}
ilMDEntity::getEntity | ( | ) |
Definition at line 48 of file class.ilMDEntity.php.
Referenced by __getFields(), and toXML().
{
return $this->entity;
}
ilMDEntity::ilMDEntity | ( | $ | a_rbac_id = 0 , |
|
$ | a_obj_id = 0 , |
|||
$ | a_obj_type = '' | |||
) |
Definition at line 36 of file class.ilMDEntity.php.
References ilMDBase::ilMDBase().
{ parent::ilMDBase($a_rbac_id, $a_obj_id, $a_obj_type); }
ilMDEntity::ilMDEntity | ( | $ | a_rbac_id = 0 , |
|
$ | a_obj_id = 0 , |
|||
$ | a_obj_type = '' | |||
) |
Definition at line 36 of file class.ilMDEntity.php.
References ilMDBase::ilMDBase().
{ parent::ilMDBase($a_rbac_id, $a_obj_id, $a_obj_type); }
ilMDEntity::read | ( | ) |
Definition at line 106 of file class.ilMDEntity.php.
References $query, $res, $row, ilMDBase::getMetaId(), setEntity(), ilMDBase::setObjId(), ilMDBase::setObjType(), ilMDBase::setParentId(), ilMDBase::setParentType(), ilMDBase::setRBACId(), and ilUtil::stripSlashes().
{ if($this->getMetaId()) { $query = "SELECT * FROM il_meta_entity ". "WHERE meta_entity_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->setParentId($row->parent_id); $this->setParentType($row->parent_type); $this->setEntity(ilUtil::stripSlashes($row->entity)); } } return true; }
ilMDEntity::read | ( | ) |
Definition at line 106 of file class.ilMDEntity.php.
References $query, $res, $row, ilMDBase::getMetaId(), setEntity(), ilMDBase::setObjId(), ilMDBase::setObjType(), ilMDBase::setParentId(), ilMDBase::setParentType(), and ilMDBase::setRBACId().
{ if($this->getMetaId()) { $query = "SELECT * FROM il_meta_entity ". "WHERE meta_entity_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->setParentId($row->parent_id); $this->setParentType($row->parent_type); $this->setEntity($row->entity); } } return true; }
ilMDEntity::save | ( | ) |
Reimplemented from ilMDBase.
Definition at line 53 of file class.ilMDEntity.php.
References ilMDBase::getMetaId(), and ilMDBase::setMetaId().
{ if($this->db->autoExecute('il_meta_entity', $this->__getFields(), DB_AUTOQUERY_INSERT)) { $this->setMetaId($this->db->getLastInsertId()); return $this->getMetaId(); } return false; }
ilMDEntity::save | ( | ) |
Reimplemented from ilMDBase.
Definition at line 53 of file class.ilMDEntity.php.
References ilMDBase::getMetaId(), and ilMDBase::setMetaId().
{ if($this->db->autoExecute('il_meta_entity', $this->__getFields(), DB_AUTOQUERY_INSERT)) { $this->setMetaId($this->db->getLastInsertId()); return $this->getMetaId(); } return false; }
ilMDEntity::setEntity | ( | $ | a_entity | ) |
Definition at line 44 of file class.ilMDEntity.php.
Referenced by read().
{ $this->entity = $a_entity; }
ilMDEntity::setEntity | ( | $ | a_entity | ) |
Definition at line 44 of file class.ilMDEntity.php.
{ $this->entity = $a_entity; }
ilMDEntity::toXML | ( | &$ | writer | ) |
Reimplemented from ilMDBase.
Definition at line 132 of file class.ilMDEntity.php.
References getEntity().
{ $writer->xmlElement('Entity',null,$this->getEntity()); }
ilMDEntity::toXML | ( | &$ | writer | ) |
Reimplemented from ilMDBase.
Definition at line 132 of file class.ilMDEntity.php.
References getEntity().
{ $writer->xmlElement('Entity',null,$this->getEntity()); }
ilMDEntity::update | ( | ) |
Reimplemented from ilMDBase.
Definition at line 66 of file class.ilMDEntity.php.
References ilMDBase::getMetaId().
{ if($this->getMetaId()) { if($this->db->autoExecute('il_meta_entity', $this->__getFields(), DB_AUTOQUERY_UPDATE, "meta_entity_id = '".$this->getMetaId()."'")) { return true; } } return false; }
ilMDEntity::update | ( | ) |
Reimplemented from ilMDBase.
Definition at line 66 of file class.ilMDEntity.php.
References ilMDBase::getMetaId().
{ if($this->getMetaId()) { if($this->db->autoExecute('il_meta_entity', $this->__getFields(), DB_AUTOQUERY_UPDATE, "meta_entity_id = '".$this->getMetaId()."'")) { return true; } } return false; }