31 include_once
'class.ilMDBase.php';
38 $this->typical_age_range = $a_typical_age_range;
42 return $this->typical_age_range;
46 if (is_object($lng_obj)) {
47 $this->typical_age_range_language = $lng_obj;
52 return is_object($this->typical_age_range_language) ? $this->typical_age_range_language :
false;
56 return is_object($this->typical_age_range_language) ? $this->typical_age_range_language->getLanguageCode() :
false;
61 $this->typical_age_range_minimum = $a_min;
65 return $this->typical_age_range_minimum;
69 $this->typical_age_range_maximum = $a_max;
73 return $this->typical_age_range_maximum;
84 $fields[
'meta_tar_id'] = array(
'integer',$next_id =
$ilDB->nextId(
'il_meta_tar'));
86 if ($this->db->insert(
'il_meta_tar', $fields)) {
101 if ($this->db->update(
103 $this->__getFields(),
104 array(
"meta_tar_id" => array(
'integer',$this->
getMetaId()))
112 public function delete()
116 $ilDB = $DIC[
'ilDB'];
119 $query =
"DELETE FROM il_meta_tar " .
120 "WHERE meta_tar_id = " .
$ilDB->quote($this->
getMetaId(),
'integer');
130 return array(
'rbac_id' => array(
'integer',$this->
getRBACId()),
131 'obj_id' => array(
'integer',$this->
getObjId()),
132 'obj_type' => array(
'text',$this->
getObjType()),
134 'parent_id' => array(
'integer',$this->
getParentId()),
145 $ilDB = $DIC[
'ilDB'];
147 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
150 $query =
"SELECT * FROM il_meta_tar " .
151 "WHERE meta_tar_id = " .
$ilDB->quote($this->
getMetaId(),
'integer');
187 public static function _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
191 $ilDB = $DIC[
'ilDB'];
193 $query =
"SELECT meta_tar_id FROM il_meta_tar " .
194 "WHERE rbac_id = " .
$ilDB->quote($a_rbac_id,
'integer') .
" " .
195 "AND obj_id = " .
$ilDB->quote($a_obj_id,
'integer') .
" " .
196 "AND parent_id = " .
$ilDB->quote($a_parent_id,
'integer') .
" " .
197 "AND parent_type = " .
$ilDB->quote($a_parent_type,
'text');
201 $ids[] =
$row->meta_tar_id;
203 return $ids ? $ids : array();
210 if (!$matches[2]
and !$matches[3]) {
211 $min = $max = $matches[1];
212 } elseif ($matches[2]
and !$matches[3]) {
setTypicalAgeRangeMaximum($a_max)
getTypicalAgeRangeMinimum()
& getTypicalAgeRangeLanguage()
static _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
setMetaId($a_meta_id, $a_read_data=true)
foreach($_POST as $key=> $value) $res
setTypicalAgeRange($a_typical_age_range)
setTypicalAgeRangeMinimum($a_min)
setParentType($a_parent_type)
getTypicalAgeRangeMaximum()
setTypicalAgeRangeLanguage(&$lng_obj)
getTypicalAgeRangeLanguageCode()