58 $this->obj_id = $a_obj_id;
59 $this->field_id = $a_field_id;
74 if(isset(self::$instances[$a_obj_id][$a_field_id]))
76 return self::$instances[$a_obj_id][$a_field_id];
78 return self::$instances[$a_obj_id][$a_field_id] =
new ilAdvancedMDValue($a_field_id,$a_obj_id);
101 $this->obj_id = $a_obj_id;
113 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDFieldDefinition.php');
115 $xml_writer->xmlElement(
'Value',
130 $this->value = $a_value;
165 $this->disabled = (bool) $a_status;
174 public function delete()
178 $query =
"DELETE FROM adv_md_values ".
179 "WHERE obj_id = ".$this->db->quote($this->obj_id ,
'integer').
" ".
180 "AND field_id = ".$this->db->quote($this->field_id ,
'integer');
196 $query =
"INSERT INTO adv_md_values (obj_id,field_id,value,disabled) ".
198 $this->db->quote($this->obj_id ,
'integer').
", ".
199 $this->db->quote($this->field_id ,
'integer').
", ".
200 $this->db->quote($this->
getValue() ,
'text').
", ".
201 $ilDB->quote($this->
isDisabled(),
'integer').
" ".
215 if(!$this->obj_id or !$this->field_id)
220 $query =
"SELECT * FROM adv_md_values ".
221 "WHERE obj_id = ".$this->db->quote($this->obj_id ,
'integer').
" ".
222 "AND field_id = ".$this->db->quote($this->field_id ,
'integer').
" ";