31 include_once
'class.ilMDBase.php';
35 function ilMDTaxon($a_rbac_id = 0,$a_obj_id = 0,$a_obj_type =
'')
45 $this->taxon = $a_taxon;
53 if(is_object($lng_obj))
55 $this->taxon_language = $lng_obj;
60 return is_object($this->taxon_language) ? $this->taxon_language :
false;
64 return is_object($this->taxon_language) ? $this->taxon_language->getLanguageCode() :
false;
68 $this->taxon_id = $a_taxon_id;
72 return $this->taxon_id;
81 $fields[
'meta_taxon_id'] = array(
'integer',$next_id = $ilDB->nextId(
'il_meta_taxon'));
83 if($this->db->insert(
'il_meta_taxon',$fields))
97 if($this->db->update(
'il_meta_taxon',
99 array(
"meta_taxon_id" => array(
'integer',$this->
getMetaId()))))
113 $query =
"DELETE FROM il_meta_taxon ".
114 "WHERE meta_taxon_id = ".$ilDB->quote($this->
getMetaId() ,
'integer');
126 return array(
'rbac_id' => array(
'integer',$this->
getRBACId()),
127 'obj_id' => array(
'integer',$this->
getObjId()),
128 'obj_type' => array(
'text',$this->
getObjType()),
130 'parent_id' => array(
'integer',$this->
getParentId()),
131 'taxon' => array(
'text',$this->
getTaxon()),
133 'taxon_id' => array(
'text',$this->
getTaxonId()));
140 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
144 $query =
"SELECT * FROM il_meta_taxon ".
145 "WHERE meta_taxon_id = ".$ilDB->quote($this->
getMetaId() ,
'integer');
180 function _getIds($a_rbac_id,$a_obj_id,$a_parent_id,$a_parent_type)
184 $query =
"SELECT meta_taxon_id FROM il_meta_taxon ".
185 "WHERE rbac_id = ".$ilDB->quote($a_rbac_id ,
'integer').
" ".
186 "AND obj_id = ".$ilDB->quote($a_obj_id ,
'integer').
" ".
187 "AND parent_id = ".$ilDB->quote($a_parent_id ,
'integer').
" ".
188 "AND parent_type = ".$ilDB->quote($a_parent_type ,
'text');
194 $ids[] =
$row->meta_taxon_id;
196 return $ids ? $ids : array();