Definition at line 34 of file class.ilMDGeneral.php.
ilMDGeneral::__getFields | ( | ) |
Definition at line 323 of file class.ilMDGeneral.php.
References getCoverage(), getCoverageLanguageCode(), ilMDBase::getObjId(), ilMDBase::getObjType(), ilMDBase::getRBACId(), getStructure(), getTitle(), getTitleLanguageCode(), and ilUtil::prepareDBString().
{ return array('rbac_id' => $this->getRBACId(), 'obj_id' => $this->getObjId(), 'obj_type' => ilUtil::prepareDBString($this->getObjType()), 'general_structure' => $this->getStructure(), 'title' => $this->getTitle(), 'title_language' => $this->getTitleLanguageCode(), 'coverage' => $this->getCoverage(), 'coverage_language' => $this->getCoverageLanguageCode()); }
ilMDGeneral::__getFields | ( | ) |
Definition at line 323 of file class.ilMDGeneral.php.
References getCoverage(), getCoverageLanguageCode(), ilMDBase::getObjId(), ilMDBase::getObjType(), ilMDBase::getRBACId(), getStructure(), getTitle(), getTitleLanguageCode(), and ilUtil::prepareDBString().
{ return array('rbac_id' => $this->getRBACId(), 'obj_id' => $this->getObjId(), 'obj_type' => ilUtil::prepareDBString($this->getObjType()), 'general_structure' => ilUtil::prepareDBString($this->getStructure()), 'title' => ilUtil::prepareDBString($this->getTitle()), 'title_language' => ilUtil::prepareDBString($this->getTitleLanguageCode()), 'coverage' => ilUtil::prepareDBString($this->getCoverage()), 'coverage_language' => ilUtil::prepareDBString($this->getCoverageLanguageCode())); }
ilMDGeneral::_getId | ( | $ | a_rbac_id, | |
$ | a_obj_id | |||
) |
Definition at line 457 of file class.ilMDGeneral.php.
References $query, $res, and $row.
Referenced by ilMD::getGeneral().
{ global $ilDB; $query = "SELECT meta_general_id FROM il_meta_general ". "WHERE rbac_id = '".$a_rbac_id."' ". "AND obj_id = '".$a_obj_id."' "; $res = $ilDB->query($query); while($row = $res->fetchRow(DB_FETCHMODE_OBJECT)) { return $row->meta_general_id; } return false; }
ilMDGeneral::_getId | ( | $ | a_rbac_id, | |
$ | a_obj_id | |||
) |
Definition at line 411 of file class.ilMDGeneral.php.
& ilMDGeneral::addDescription | ( | ) |
Definition at line 133 of file class.ilMDGeneral.php.
References ilMDBase::getMetaId(), ilMDBase::getObjId(), ilMDBase::getObjType(), and ilMDBase::getRBACId().
{ include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDDescription.php'; $des =& new ilMDDescription($this->getRBACId(),$this->getObjId(),$this->getObjType()); $des->setParentId($this->getMetaId()); $des->setParentType('meta_general'); return $des; }
& ilMDGeneral::addDescription | ( | ) |
Definition at line 133 of file class.ilMDGeneral.php.
References ilMDBase::getMetaId(), ilMDBase::getObjId(), ilMDBase::getObjType(), and ilMDBase::getRBACId().
{ include_once 'Services/MetaData/classes/class.ilMDDescription.php'; $des =& new ilMDDescription($this->getRBACId(),$this->getObjId(),$this->getObjType()); $des->setParentId($this->getMetaId()); $des->setParentType('meta_general'); return $des; }
& ilMDGeneral::addIdentifier | ( | ) |
Definition at line 73 of file class.ilMDGeneral.php.
References ilMDBase::getMetaId(), ilMDBase::getObjId(), ilMDBase::getObjType(), and ilMDBase::getRBACId().
{ include_once 'Services/MetaData/classes/class.ilMDIdentifier.php'; $ide =& new ilMDIdentifier($this->getRBACId(),$this->getObjId(),$this->getObjType()); $ide->setParentId($this->getMetaId()); $ide->setParentType('meta_general'); return $ide; }
& ilMDGeneral::addIdentifier | ( | ) |
Definition at line 73 of file class.ilMDGeneral.php.
References ilMDBase::getMetaId(), ilMDBase::getObjId(), ilMDBase::getObjType(), and ilMDBase::getRBACId().
{ include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDIdentifier.php'; $ide =& new ilMDIdentifier($this->getRBACId(),$this->getObjId(),$this->getObjType()); $ide->setParentId($this->getMetaId()); $ide->setParentType('meta_general'); return $ide; }
& ilMDGeneral::addKeyword | ( | ) |
Definition at line 162 of file class.ilMDGeneral.php.
References $key, ilMDBase::getMetaId(), ilMDBase::getObjId(), ilMDBase::getObjType(), and ilMDBase::getRBACId().
{ include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDKeyword.php'; $key =& new ilMDKeyword($this->getRBACId(),$this->getObjId(),$this->getObjType()); $key->setParentId($this->getMetaId()); $key->setParentType('meta_general'); return $key; }
& ilMDGeneral::addKeyword | ( | ) |
Definition at line 162 of file class.ilMDGeneral.php.
References $key, ilMDBase::getMetaId(), ilMDBase::getObjId(), ilMDBase::getObjType(), and ilMDBase::getRBACId().
{ include_once 'Services/MetaData/classes/class.ilMDKeyword.php'; $key =& new ilMDKeyword($this->getRBACId(),$this->getObjId(),$this->getObjType()); $key->setParentId($this->getMetaId()); $key->setParentType('meta_general'); return $key; }
& ilMDGeneral::addLanguage | ( | ) |
Definition at line 103 of file class.ilMDGeneral.php.
References ilMDBase::getMetaId(), ilMDBase::getObjId(), ilMDBase::getObjType(), and ilMDBase::getRBACId().
{ include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDLanguage.php'; $lan =& new ilMDLanguage($this->getRBACId(),$this->getObjId(),$this->getObjType()); $lan->setParentId($this->getMetaId()); $lan->setParentType('meta_general'); return $lan; }
& ilMDGeneral::addLanguage | ( | ) |
Definition at line 103 of file class.ilMDGeneral.php.
References ilMDBase::getMetaId(), ilMDBase::getObjId(), ilMDBase::getObjType(), and ilMDBase::getRBACId().
{ include_once 'Services/MetaData/classes/class.ilMDLanguage.php'; $lan =& new ilMDLanguage($this->getRBACId(),$this->getObjId(),$this->getObjType()); $lan->setParentId($this->getMetaId()); $lan->setParentType('meta_general'); return $lan; }
ilMDGeneral::delete | ( | ) |
Reimplemented from ilMDBase.
Definition at line 274 of file class.ilMDGeneral.php.
References $id, $key, $query, getDescription(), getDescriptionIds(), getIdentifier(), getIdentifierIds(), getKeyword(), getKeywordIds(), getLanguage(), getLanguageIds(), and ilMDBase::getMetaId().
{ if(!$this->getMetaId()) { return false; } // Identifier foreach($this->getIdentifierIds() as $id) { $ide = $this->getIdentifier($id); $ide->delete(); } // Language foreach($this->getLanguageIds() as $id) { $lan = $this->getLanguage($id); $lan->delete(); } // Description foreach($this->getDescriptionIds() as $id) { $des = $this->getDescription($id); $des->delete(); } // Keyword foreach($this->getKeywordIds() as $id) { $key = $this->getKeyword($id); $key->delete(); } if($this->getMetaId()) { $query = "DELETE FROM il_meta_general ". "WHERE meta_general_id = '".$this->getMetaId()."'"; $this->db->query($query); return true; } return false; }
ilMDGeneral::delete | ( | ) |
Reimplemented from ilMDBase.
Definition at line 274 of file class.ilMDGeneral.php.
References $id, $key, $query, getDescription(), getDescriptionIds(), getIdentifier(), getIdentifierIds(), getKeyword(), getKeywordIds(), getLanguage(), getLanguageIds(), and ilMDBase::getMetaId().
{ if(!$this->getMetaId()) { return false; } // Identifier foreach($this->getIdentifierIds() as $id) { $ide = $this->getIdentifier($id); $ide->delete(); } // Language foreach($this->getLanguageIds() as $id) { $lan = $this->getLanguage($id); $lan->delete(); } // Description foreach($this->getDescriptionIds() as $id) { $des = $this->getDescription($id); $des->delete(); } // Keyword foreach($this->getKeywordIds() as $id) { $key = $this->getKeyword($id); $key->delete(); } if($this->getMetaId()) { $query = "DELETE FROM il_meta_general ". "WHERE meta_general_id = '".$this->getMetaId()."'"; $this->db->query($query); return true; } return false; }
ilMDGeneral::getCoverage | ( | ) |
Definition at line 224 of file class.ilMDGeneral.php.
Referenced by __getFields(), and toXML().
{
return $this->coverage;
}
ilMDGeneral::getCoverage | ( | ) |
Definition at line 224 of file class.ilMDGeneral.php.
{
return $this->coverage;
}
& ilMDGeneral::getCoverageLanguage | ( | ) |
Definition at line 236 of file class.ilMDGeneral.php.
{ return is_object($this->coverage_language) ? $this->coverage_language : false; }
& ilMDGeneral::getCoverageLanguage | ( | ) |
Definition at line 236 of file class.ilMDGeneral.php.
{ return is_object($this->coverage_language) ? $this->coverage_language : false; }
ilMDGeneral::getCoverageLanguageCode | ( | ) |
Definition at line 240 of file class.ilMDGeneral.php.
{ return is_object($this->coverage_language) ? $this->coverage_language->getLanguageCode() : false; }
ilMDGeneral::getCoverageLanguageCode | ( | ) |
Definition at line 240 of file class.ilMDGeneral.php.
Referenced by __getFields(), and toXML().
{ return is_object($this->coverage_language) ? $this->coverage_language->getLanguageCode() : false; }
& ilMDGeneral::getDescription | ( | $ | a_description_id | ) |
Definition at line 119 of file class.ilMDGeneral.php.
{ include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDDescription.php'; if(!$a_description_id) { return false; } $des =& new ilMDDescription(); $des->setMetaId($a_description_id); return $des; }
& ilMDGeneral::getDescription | ( | $ | a_description_id | ) |
Definition at line 119 of file class.ilMDGeneral.php.
Referenced by delete(), and toXML().
{ include_once 'Services/MetaData/classes/class.ilMDDescription.php'; if(!$a_description_id) { return false; } $des =& new ilMDDescription(); $des->setMetaId($a_description_id); return $des; }
& ilMDGeneral::getDescriptionIds | ( | ) |
Definition at line 113 of file class.ilMDGeneral.php.
References ilMDDescription::_getIds(), ilMDBase::getMetaId(), ilMDBase::getObjId(), and ilMDBase::getRBACId().
Referenced by delete(), and toXML().
{ include_once 'Services/MetaData/classes/class.ilMDDescription.php'; return ilMDDescription::_getIds($this->getRBACId(),$this->getObjId(),$this->getMetaId(),'meta_general'); }
& ilMDGeneral::getDescriptionIds | ( | ) |
Definition at line 113 of file class.ilMDGeneral.php.
References ilMDDescription::_getIds(), ilMDBase::getMetaId(), ilMDBase::getObjId(), and ilMDBase::getRBACId().
{ include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDDescription.php'; return ilMDDescription::_getIds($this->getRBACId(),$this->getObjId(),$this->getMetaId(),'meta_general'); }
& ilMDGeneral::getIdentifier | ( | $ | a_identifier_id | ) |
Definition at line 60 of file class.ilMDGeneral.php.
{ include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDIdentifier.php'; if(!$a_identifier_id) { return false; } $ide =& new ilMDIdentifier(); $ide->setMetaId($a_identifier_id); return $ide; }
& ilMDGeneral::getIdentifier | ( | $ | a_identifier_id | ) |
Definition at line 60 of file class.ilMDGeneral.php.
Referenced by delete(), and toXML().
{ include_once 'Services/MetaData/classes/class.ilMDIdentifier.php'; if(!$a_identifier_id) { return false; } $ide =& new ilMDIdentifier(); $ide->setMetaId($a_identifier_id); return $ide; }
& ilMDGeneral::getIdentifierIds | ( | ) |
Definition at line 54 of file class.ilMDGeneral.php.
References ilMDIdentifier::_getIds(), ilMDBase::getMetaId(), ilMDBase::getObjId(), and ilMDBase::getRBACId().
{ include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDIdentifier.php'; return ilMDIdentifier::_getIds($this->getRBACId(),$this->getObjId(),$this->getMetaId(),'meta_general'); }
& ilMDGeneral::getIdentifierIds | ( | ) |
Definition at line 54 of file class.ilMDGeneral.php.
References ilMDIdentifier::_getIds(), ilMDBase::getMetaId(), ilMDBase::getObjId(), and ilMDBase::getRBACId().
Referenced by delete(), and toXML().
{ include_once 'Services/MetaData/classes/class.ilMDIdentifier.php'; return ilMDIdentifier::_getIds($this->getRBACId(),$this->getObjId(),$this->getMetaId(),'meta_general'); }
& ilMDGeneral::getKeyword | ( | $ | a_keyword_id | ) |
Definition at line 149 of file class.ilMDGeneral.php.
References $key.
{ include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDKeyword.php'; if(!$a_keyword_id) { return false; } $key =& new ilMDKeyword(); $key->setMetaId($a_keyword_id); return $key; }
& ilMDGeneral::getKeyword | ( | $ | a_keyword_id | ) |
Definition at line 149 of file class.ilMDGeneral.php.
References $key.
Referenced by delete(), and toXML().
{ include_once 'Services/MetaData/classes/class.ilMDKeyword.php'; if(!$a_keyword_id) { return false; } $key =& new ilMDKeyword(); $key->setMetaId($a_keyword_id); return $key; }
& ilMDGeneral::getKeywordIds | ( | ) |
Definition at line 143 of file class.ilMDGeneral.php.
References ilMDKeyword::_getIds(), ilMDBase::getMetaId(), ilMDBase::getObjId(), and ilMDBase::getRBACId().
{ include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDKeyword.php'; return ilMDKeyword::_getIds($this->getRBACId(),$this->getObjId(),$this->getMetaId(),'meta_general'); }
& ilMDGeneral::getKeywordIds | ( | ) |
Definition at line 143 of file class.ilMDGeneral.php.
References ilMDKeyword::_getIds(), ilMDBase::getMetaId(), ilMDBase::getObjId(), and ilMDBase::getRBACId().
Referenced by delete(), and toXML().
{ include_once 'Services/MetaData/classes/class.ilMDKeyword.php'; return ilMDKeyword::_getIds($this->getRBACId(),$this->getObjId(),$this->getMetaId(),'meta_general'); }
& ilMDGeneral::getLanguage | ( | $ | a_language_id | ) |
Definition at line 89 of file class.ilMDGeneral.php.
{ include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDLanguage.php'; if(!$a_language_id) { return false; } $lan =& new ilMDLanguage(); $lan->setMetaId($a_language_id); return $lan; }
& ilMDGeneral::getLanguage | ( | $ | a_language_id | ) |
Definition at line 89 of file class.ilMDGeneral.php.
Referenced by delete(), and toXML().
{ include_once 'Services/MetaData/classes/class.ilMDLanguage.php'; if(!$a_language_id) { return false; } $lan =& new ilMDLanguage(); $lan->setMetaId($a_language_id); return $lan; }
& ilMDGeneral::getLanguageIds | ( | ) |
Definition at line 83 of file class.ilMDGeneral.php.
References ilMDLanguage::_getIds(), ilMDBase::getMetaId(), ilMDBase::getObjId(), and ilMDBase::getRBACId().
{ include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDLanguage.php'; return ilMDLanguage::_getIds($this->getRBACId(),$this->getObjId(),$this->getMetaId(),'meta_general'); }
& ilMDGeneral::getLanguageIds | ( | ) |
Definition at line 83 of file class.ilMDGeneral.php.
References ilMDLanguage::_getIds(), ilMDBase::getMetaId(), ilMDBase::getObjId(), and ilMDBase::getRBACId().
Referenced by delete(), and toXML().
{ include_once 'Services/MetaData/classes/class.ilMDLanguage.php'; return ilMDLanguage::_getIds($this->getRBACId(),$this->getObjId(),$this->getMetaId(),'meta_general'); }
ilMDGeneral::getPossibleSubelements | ( | ) |
Definition at line 42 of file class.ilMDGeneral.php.
{ $subs['Identifier'] = 'meta_identifier'; $subs['Language'] = 'meta_language'; $subs['Description'] = 'meta_description'; $subs['Keyword'] = 'meta_keyword'; return $subs; }
ilMDGeneral::getPossibleSubelements | ( | ) |
Definition at line 42 of file class.ilMDGeneral.php.
{ $subs['Keyword'] = 'meta_keyword'; $subs['Language'] = 'meta_language'; $subs['Identifier'] = 'meta_identifier'; $subs['Description'] = 'meta_description'; return $subs; }
ilMDGeneral::getStructure | ( | ) |
Definition at line 192 of file class.ilMDGeneral.php.
Referenced by __getFields(), and toXML().
{
return $this->structure;
}
ilMDGeneral::getStructure | ( | ) |
Definition at line 192 of file class.ilMDGeneral.php.
{
return $this->structure;
}
ilMDGeneral::getTitle | ( | ) |
Definition at line 200 of file class.ilMDGeneral.php.
Referenced by __getFields(), and toXML().
{
return $this->title;
}
ilMDGeneral::getTitle | ( | ) |
Definition at line 200 of file class.ilMDGeneral.php.
{
return $this->title;
}
& ilMDGeneral::getTitleLanguage | ( | ) |
Definition at line 211 of file class.ilMDGeneral.php.
{ return is_object($this->title_language) ? $this->title_language : false; }
& ilMDGeneral::getTitleLanguage | ( | ) |
Definition at line 211 of file class.ilMDGeneral.php.
{ return is_object($this->title_language) ? $this->title_language : false; }
ilMDGeneral::getTitleLanguageCode | ( | ) |
Definition at line 215 of file class.ilMDGeneral.php.
Referenced by __getFields(), and toXML().
{ return is_object($this->title_language) ? $this->title_language->getLanguageCode() : false; }
ilMDGeneral::getTitleLanguageCode | ( | ) |
Definition at line 215 of file class.ilMDGeneral.php.
{ return is_object($this->title_language) ? $this->title_language->getLanguageCode() : false; }
ilMDGeneral::ilMDGeneral | ( | $ | a_rbac_id = 0 , |
|
$ | a_obj_id = 0 , |
|||
$ | a_obj_type = '' | |||
) |
Definition at line 36 of file class.ilMDGeneral.php.
References ilMDBase::ilMDBase().
{ parent::ilMDBase($a_rbac_id, $a_obj_id, $a_obj_type); }
ilMDGeneral::ilMDGeneral | ( | $ | a_rbac_id = 0 , |
|
$ | a_obj_id = 0 , |
|||
$ | a_obj_type = '' | |||
) |
Definition at line 36 of file class.ilMDGeneral.php.
References ilMDBase::ilMDBase().
{ parent::ilMDBase($a_rbac_id, $a_obj_id, $a_obj_type); }
ilMDGeneral::read | ( | ) |
Definition at line 335 of file class.ilMDGeneral.php.
References $query, $res, $row, ilMDBase::getMetaId(), setCoverage(), setCoverageLanguage(), ilMDBase::setObjId(), ilMDBase::setObjType(), ilMDBase::setRBACId(), setStructure(), setTitle(), setTitleLanguage(), and ilUtil::stripSlashes().
{ include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDLanguageItem.php'; if($this->getMetaId()) { $query = "SELECT * FROM il_meta_general ". "WHERE meta_general_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->setStructure(ilUtil::stripSlashes($row->general_structure)); $this->setTitle(ilUtil::stripSlashes($row->title)); $this->setTitleLanguage(new ilMDLanguageItem($row->title_language)); $this->setCoverage(ilUtil::stripSlashes($row->coverage)); $this->setCoverageLanguage(new ilMDLanguageItem($row->coverage_language)); } } return true; }
ilMDGeneral::read | ( | ) |
Definition at line 335 of file class.ilMDGeneral.php.
References $query, $res, $row, ilMDBase::getMetaId(), setCoverage(), setCoverageLanguage(), ilMDBase::setObjId(), ilMDBase::setObjType(), ilMDBase::setRBACId(), setStructure(), setTitle(), and setTitleLanguage().
{ include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php'; if($this->getMetaId()) { $query = "SELECT * FROM il_meta_general ". "WHERE meta_general_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->setStructure($row->general_structure); $this->setTitle($row->title); $this->setTitleLanguage(new ilMDLanguageItem($row->title_language)); $this->setCoverage($row->coverage); $this->setCoverageLanguage(new ilMDLanguageItem($row->coverage_language)); } } return true; }
ilMDGeneral::save | ( | ) |
Reimplemented from ilMDBase.
Definition at line 246 of file class.ilMDGeneral.php.
References ilMDBase::getMetaId(), and ilMDBase::setMetaId().
{ if($this->db->autoExecute('il_meta_general', $this->__getFields(), DB_AUTOQUERY_INSERT)) { $this->setMetaId($this->db->getLastInsertId()); return $this->getMetaId(); } return false; }
ilMDGeneral::save | ( | ) |
Reimplemented from ilMDBase.
Definition at line 246 of file class.ilMDGeneral.php.
References ilMDBase::getMetaId(), and ilMDBase::setMetaId().
{ if($this->db->autoExecute('il_meta_general', $this->__getFields(), DB_AUTOQUERY_INSERT)) { $this->setMetaId($this->db->getLastInsertId()); return $this->getMetaId(); } return false; }
ilMDGeneral::setCoverage | ( | $ | a_coverage | ) |
Definition at line 220 of file class.ilMDGeneral.php.
{ $this->coverage = $a_coverage; }
ilMDGeneral::setCoverage | ( | $ | a_coverage | ) |
Definition at line 220 of file class.ilMDGeneral.php.
Referenced by read().
{ $this->coverage = $a_coverage; }
ilMDGeneral::setCoverageLanguage | ( | &$ | lng_obj | ) |
Definition at line 229 of file class.ilMDGeneral.php.
Referenced by read().
{
if(is_object($lng_obj))
{
$this->coverage_language = $lng_obj;
}
}
ilMDGeneral::setCoverageLanguage | ( | &$ | lng_obj | ) |
Definition at line 229 of file class.ilMDGeneral.php.
{
if(is_object($lng_obj))
{
$this->coverage_language =& $lng_obj;
}
}
ilMDGeneral::setStructure | ( | $ | a_structure | ) |
Definition at line 176 of file class.ilMDGeneral.php.
Referenced by read().
{ switch($a_structure) { case 'Atomic': case 'Collection': case 'Networked': case 'Hierarchical': case 'Linear': $this->structure = $a_structure; return true; default: return false; } }
ilMDGeneral::setStructure | ( | $ | a_structure | ) |
Definition at line 176 of file class.ilMDGeneral.php.
{ switch($a_structure) { case 'Atomic': case 'Collection': case 'Networked': case 'Hierarchical': case 'Linear': $this->structure = $a_structure; return true; default: return false; } }
ilMDGeneral::setTitle | ( | $ | a_title | ) |
Definition at line 196 of file class.ilMDGeneral.php.
{ $this->title = $a_title; }
ilMDGeneral::setTitle | ( | $ | a_title | ) |
Definition at line 196 of file class.ilMDGeneral.php.
Referenced by read().
{ $this->title = $a_title; }
ilMDGeneral::setTitleLanguage | ( | &$ | lng_obj | ) |
Definition at line 204 of file class.ilMDGeneral.php.
Referenced by read().
{
if(is_object($lng_obj))
{
$this->title_language = $lng_obj;
}
}
ilMDGeneral::setTitleLanguage | ( | &$ | lng_obj | ) |
Definition at line 204 of file class.ilMDGeneral.php.
{
if(is_object($lng_obj))
{
$this->title_language = $lng_obj;
}
}
ilMDGeneral::toXML | ( | &$ | writer | ) |
Reimplemented from ilMDBase.
Definition at line 365 of file class.ilMDGeneral.php.
References $id, $key, $keywords, getCoverage(), getCoverageLanguageCode(), getDescription(), getDescriptionIds(), ilMDBase::getExportMode(), getIdentifier(), getIdentifierIds(), getKeyword(), getKeywordIds(), getLanguage(), getLanguageIds(), ilMDBase::getObjId(), ilMDBase::getRBACId(), getStructure(), getTitle(), and getTitleLanguageCode().
{ $writer->xmlStartTag('General',array('Structure' => $this->getStructure() ? $this->getStructure() : 'Atomic')); // Identifier $first = true; $identifiers = array(); $identifiers = $this->getIdentifierIds(); foreach($identifiers as $id) { $ide =& $this->getIdentifier($id); $ide->setExportMode($this->getExportMode()); $ide->toXML($writer); $first = false; } if(!count($identifiers)) { include_once 'Services/MetaData/classes/class.ilMDIdentifier.php'; $ide = new ilMDIdentifier($this->getRBACId(),$this->getObjId()); $ide->setExportMode(true); $ide->toXML($writer,true); } // Title $writer->xmlElement('Title',array('Language' => $this->getTitleLanguageCode() ? $this->getTitleLanguageCode() : 'en'), $this->getTitle()); // Language $languages = $this->getLanguageIds(); foreach($languages as $id) { $lan =& $this->getLanguage($id); $lan->toXML($writer); } if(!count($languages)) { // Default include_once 'Services/MetaData/classes/class.ilMDLanguage.php'; $lan = new ilMDLanguage($this->getRBACId(),$this->getObjId()); $lan->toXML($writer); } // Description $descriptions = $this->getDescriptionIds(); foreach($descriptions as $id) { $des =& $this->getDescription($id); $des->toXML($writer); } if(!count($descriptions)) { // Default include_once 'Services/MetaData/classes/class.ilMDDescription.php'; $des = new ilMDDescription($this->getRBACId(),$this->getObjId()); $des->toXML($writer); } // Keyword $keywords = $this->getKeywordIds(); foreach($keywords as $id) { $key =& $this->getKeyword($id); $key->toXML($writer); } if(!count($keywords)) { // Default include_once 'Services/MetaData/classes/class.ilMDKeyword.php'; $key = new ilMDKeyword($this->getRBACId(),$this->getObjId()); $key->toXML($writer); } // Copverage if(strlen($this->getCoverage())) { $writer->xmlElement('Coverage',array('Language' => $this->getCoverageLanguageCode() ? $this->getCoverageLanguageCode() : 'en'), $this->getCoverage()); } $writer->xmlEndTag('General'); }
ilMDGeneral::toXML | ( | &$ | writer | ) |
Reimplemented from ilMDBase.
Definition at line 365 of file class.ilMDGeneral.php.
References $id, $key, getCoverage(), getCoverageLanguageCode(), getDescription(), getDescriptionIds(), getIdentifier(), getIdentifierIds(), getKeyword(), getKeywordIds(), getLanguage(), getLanguageIds(), getStructure(), getTitle(), and getTitleLanguageCode().
{ $writer->xmlStartTag('General',array('Structure' => $this->getStructure())); // Identifier foreach($this->getIdentifierIds() as $id) { $ide =& $this->getIdentifier($id); $ide->toXML($writer); } // TItle $writer->xmlElement('Title',array('Language' => $this->getTitleLanguageCode()),$this->getTitle()); // Language foreach($this->getLanguageIds() as $id) { $lan =& $this->getLanguage($id); $lan->toXML($writer); } // Description foreach($this->getDescriptionIds() as $id) { $des =& $this->getDescription($id); $des->toXML($writer); } // Keyword foreach($this->getKeywordIds() as $id) { $key =& $this->getKeyword($id); $key->toXML($writer); } // Copverage if(strlen($this->getCoverage())) { $writer->xmlElement('Coverage',array('Language' => $this->getCoverageLanguageCode()),$this->getCoverage()); } $writer->xmlEndTag('General'); }
ilMDGeneral::update | ( | ) |
Reimplemented from ilMDBase.
Definition at line 259 of file class.ilMDGeneral.php.
References ilMDBase::getMetaId().
{ if($this->getMetaId()) { if($this->db->autoExecute('il_meta_general', $this->__getFields(), DB_AUTOQUERY_UPDATE, "meta_general_id = '".$this->getMetaId()."'")) { return true; } } return false; }
ilMDGeneral::update | ( | ) |
Reimplemented from ilMDBase.
Definition at line 259 of file class.ilMDGeneral.php.
References ilMDBase::getMetaId().
{ if($this->getMetaId()) { if($this->db->autoExecute('il_meta_general', $this->__getFields(), DB_AUTOQUERY_UPDATE, "meta_general_id = '".$this->getMetaId()."'")) { return true; } } return false; }