31include_once
'class.ilMDBase.php';
38 include_once
'Services/MetaData/classes/class.ilMDTaxon.php';
44 include_once
'Services/MetaData/classes/class.ilMDTaxon.php';
50 $tax->setMetaId($a_taxon_id);
56 include_once
'Services/MetaData/classes/class.ilMDTaxon.php';
60 $tax->setParentType(
'meta_taxon_path');
68 $this->source = $a_source;
76 if (is_object($lng_obj)) {
77 $this->source_language = $lng_obj;
82 return is_object($this->source_language) ? $this->source_language :
false;
86 return is_object($this->source_language) ? $this->source_language->getLanguageCode() :
false;
97 $fields[
'meta_taxon_path_id'] = array(
'integer',$next_id =
$ilDB->nextId(
'il_meta_taxon_path'));
99 if ($this->db->insert(
'il_meta_taxon_path', $fields)) {
113 if ($this->db->update(
114 'il_meta_taxon_path',
115 $this->__getFields(),
116 array(
"meta_taxon_path_id" => array(
'integer',$this->
getMetaId()))
124 public function delete()
131 $query =
"DELETE FROM il_meta_taxon_path " .
132 "WHERE meta_taxon_path_id = " .
$ilDB->quote($this->
getMetaId(),
'integer');
148 return array(
'rbac_id' => array(
'integer',$this->
getRBACId()),
149 'obj_id' => array(
'integer',$this->
getObjId()),
150 'obj_type' => array(
'text',$this->
getObjType()),
152 'parent_id' => array(
'integer',$this->
getParentId()),
153 'source' => array(
'text',$this->
getSource()),
163 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
166 $query =
"SELECT * FROM il_meta_taxon_path " .
167 "WHERE meta_taxon_path_id = " .
$ilDB->quote($this->
getMetaId(),
'integer');
190 $writer->xmlStartTag(
'TaxonPath');
202 foreach ($taxs as $id) {
204 $tax->toXML($writer);
207 include_once
'Services/MetaData/classes/class.ilMDTaxon.php';
209 $tax->toXML($writer);
212 $writer->xmlEndTag(
'TaxonPath');
218 public static function _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
224 $query =
"SELECT meta_taxon_path_id FROM il_meta_taxon_path " .
225 "WHERE rbac_id = " .
$ilDB->quote($a_rbac_id,
'integer') .
" " .
226 "AND obj_id = " .
$ilDB->quote($a_obj_id,
'integer') .
" " .
227 "AND parent_id = " .
$ilDB->quote($a_parent_id,
'integer') .
" " .
228 "AND parent_type = " .
$ilDB->quote($a_parent_type,
'text');
232 $ids[] = $row->meta_taxon_path_id;
234 return $ids ? $ids : array();
An exception for terminatinating execution or to throw for unit testing.
setMetaId($a_meta_id, $a_read_data=true)
setParentType($a_parent_type)
setSourceLanguage(&$lng_obj)
static _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
static _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
foreach($_POST as $key=> $value) $res