31 include_once
'class.ilMDBase.php';
38 $this->taxon = $a_taxon;
46 if (is_object($lng_obj)) {
47 $this->taxon_language = $lng_obj;
52 return is_object($this->taxon_language) ? $this->taxon_language :
false;
56 return is_object($this->taxon_language) ? $this->taxon_language->getLanguageCode() :
false;
60 $this->taxon_id = $a_taxon_id;
64 return $this->taxon_id;
73 $fields[
'meta_taxon_id'] =
array(
'integer',$next_id = $ilDB->nextId(
'il_meta_taxon'));
75 if ($this->db->insert(
'il_meta_taxon', $fields)) {
87 if ($this->db->update(
98 public function delete()
103 $query =
"DELETE FROM il_meta_taxon " .
104 "WHERE meta_taxon_id = " . $ilDB->quote($this->
getMetaId(),
'integer');
130 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
133 $query =
"SELECT * FROM il_meta_taxon " .
134 "WHERE meta_taxon_id = " . $ilDB->quote($this->
getMetaId(),
'integer');
158 $random = new \ilRandom();
165 $this->
getTaxonId() : (
"ID" . $random->int())),
172 public static function _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
176 $query =
"SELECT meta_taxon_id FROM il_meta_taxon " .
177 "WHERE rbac_id = " . $ilDB->quote($a_rbac_id,
'integer') .
" " .
178 "AND obj_id = " . $ilDB->quote($a_obj_id,
'integer') .
" " .
179 "AND parent_id = " . $ilDB->quote($a_parent_id,
'integer') .
" " .
180 "AND parent_type = " . $ilDB->quote($a_parent_type,
'text');
185 $ids[] =
$row->meta_taxon_id;
187 return $ids ? $ids :
array();
setTaxonLanguage(&$lng_obj)
setMetaId($a_meta_id, $a_read_data=true)
foreach($_POST as $key=> $value) $res
Create styles array
The data for the language used.
static _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
setParentType($a_parent_type)