ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilMDTypicalAgeRange Class Reference
+ Inheritance diagram for ilMDTypicalAgeRange:
+ Collaboration diagram for ilMDTypicalAgeRange:

Public Member Functions

 setTypicalAgeRange ($a_typical_age_range)
 
 getTypicalAgeRange ()
 
 setTypicalAgeRangeLanguage (&$lng_obj)
 
getTypicalAgeRangeLanguage ()
 
 getTypicalAgeRangeLanguageCode ()
 
 setTypicalAgeRangeMinimum ($a_min)
 
 getTypicalAgeRangeMinimum ()
 
 setTypicalAgeRangeMaximum ($a_max)
 
 getTypicalAgeRangeMaximum ()
 
 save ()
 
 update ()
 
 delete ()
 
 __getFields ()
 
 read ()
 
 toXML (&$writer)
 
 __parseTypicalAgeRange ()
 
 setTypicalAgeRange ($a_typical_age_range)
 
 getTypicalAgeRange ()
 
 setTypicalAgeRangeLanguage (&$lng_obj)
 
getTypicalAgeRangeLanguage ()
 
 getTypicalAgeRangeLanguageCode ()
 
 save ()
 
 update ()
 
 delete ()
 
 __getFields ()
 
 read ()
 
 toXML (&$writer)
 
 _getIds ($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
 
 setTypicalAgeRange ($a_typical_age_range)
 
 getTypicalAgeRange ()
 
 setTypicalAgeRangeLanguage (&$lng_obj)
 
getTypicalAgeRangeLanguage ()
 
 getTypicalAgeRangeLanguageCode ()
 
 setTypicalAgeRangeMinimum ($a_min)
 
 getTypicalAgeRangeMinimum ()
 
 setTypicalAgeRangeMaximum ($a_max)
 
 getTypicalAgeRangeMaximum ()
 
 save ()
 
 update ()
 
 delete ()
 
 __getFields ()
 
 read ()
 
 toXML (&$writer)
 
 __parseTypicalAgeRange ()
 
- Public Member Functions inherited from ilMDBase
 __construct ( $a_rbac_id=0, $a_obj_id=0, $a_type=0)
 
 setRBACId ($a_id)
 
 getRBACId ()
 
 setObjId ($a_id)
 
 getObjId ()
 
 setObjType ($a_type)
 
 getObjType ()
 
 setMetaId ($a_meta_id, $a_read_data=true)
 
 getMetaId ()
 
 setParentType ($a_parent_type)
 
 getParentType ()
 
 setParentId ($a_id)
 
 getParentId ()
 
 setExportMode ($a_export_mode=true)
 
 getExportMode ()
 
 validate ()
 
 update ()
 
 save ()
 
 delete ()
 
 toXML (&$writer)
 
 __construct ( $a_rbac_id=0, $a_obj_id=0, $a_type=0)
 
 setRBACId ($a_id)
 
 getRBACId ()
 
 setObjId ($a_id)
 
 getObjId ()
 
 setObjType ($a_type)
 
 getObjType ()
 
 setMetaId ($a_meta_id, $a_read_data=true)
 
 getMetaId ()
 
 setParentType ($a_parent_type)
 
 getParentType ()
 
 setParentId ($a_id)
 
 getParentId ()
 
 validate ()
 
 update ()
 
 save ()
 
 delete ()
 
 toXML (&$writer)
 
 __construct ( $a_rbac_id=0, $a_obj_id=0, $a_type=0)
 
 setRBACId ($a_id)
 
 getRBACId ()
 
 setObjId ($a_id)
 
 getObjId ()
 
 setObjType ($a_type)
 
 getObjType ()
 
 setMetaId ($a_meta_id, $a_read_data=true)
 
 getMetaId ()
 
 setParentType ($a_parent_type)
 
 getParentType ()
 
 setParentId ($a_id)
 
 getParentId ()
 
 setExportMode ($a_export_mode=true)
 
 getExportMode ()
 
 validate ()
 
 update ()
 
 save ()
 
 delete ()
 
 toXML (&$writer)
 

Static Public Member Functions

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)
 

Additional Inherited Members

- Data Fields inherited from ilMDBase
 $rbac_id
 
 $obj_id
 
 $obj_type
 
 $export_mode = false
 
- Protected Attributes inherited from ilMDBase
 $log
 

Detailed Description

Definition at line 33 of file class.ilMDTypicalAgeRange.php.

Member Function Documentation

◆ __getFields() [1/3]

ilMDTypicalAgeRange::__getFields ( )

Definition at line 106 of file class.ilMDTypicalAgeRange.php.

References ilMDBase\getObjId(), ilMDBase\getObjType(), ilMDBase\getParentId(), ilMDBase\getParentType(), ilMDBase\getRBACId(), getTypicalAgeRange(), getTypicalAgeRangeLanguageCode(), and ilUtil\prepareDBString().

107  {
108  return array('rbac_id' => $this->getRBACId(),
109  'obj_id' => $this->getObjId(),
110  'obj_type' => ilUtil::prepareDBString($this->getObjType()),
111  'parent_type' => $this->getParentType(),
112  'parent_id' => $this->getParentId(),
113  'typical_age_range' => ilUtil::prepareDBString($this->getTypicalAgeRange()),
114  'typical_age_range_language' => ilUtil::prepareDBString($this->getTypicalAgeRangeLanguageCode()));
115  }
static prepareDBString($a_str)
prepare a string for db writing (insert/update)
+ Here is the call graph for this function:

◆ __getFields() [2/3]

ilMDTypicalAgeRange::__getFields ( )

Definition at line 128 of file class.ilMDTypicalAgeRange.php.

References ilMDBase\getObjId(), ilMDBase\getObjType(), ilMDBase\getParentId(), ilMDBase\getParentType(), ilMDBase\getRBACId(), getTypicalAgeRange(), getTypicalAgeRangeLanguageCode(), getTypicalAgeRangeMaximum(), and getTypicalAgeRangeMinimum().

129  {
130  return array('rbac_id' => array('integer',$this->getRBACId()),
131  'obj_id' => array('integer',$this->getObjId()),
132  'obj_type' => array('text',$this->getObjType()),
133  'parent_type' => array('text',$this->getParentType()),
134  'parent_id' => array('integer',$this->getParentId()),
135  'typical_age_range' => array('text',$this->getTypicalAgeRange()),
136  'tar_language' => array('text',$this->getTypicalAgeRangeLanguageCode()),
137  'tar_min' => array('text',$this->getTypicalAgeRangeMinimum()),
138  'tar_max' => array('text',$this->getTypicalAgeRangeMaximum()));
139  }
+ Here is the call graph for this function:

◆ __getFields() [3/3]

ilMDTypicalAgeRange::__getFields ( )

Definition at line 128 of file class.ilMDTypicalAgeRange.php.

References ilMDBase\getObjId(), ilMDBase\getObjType(), ilMDBase\getParentId(), ilMDBase\getParentType(), ilMDBase\getRBACId(), getTypicalAgeRange(), getTypicalAgeRangeLanguageCode(), getTypicalAgeRangeMaximum(), and getTypicalAgeRangeMinimum().

Referenced by save().

129  {
130  return array('rbac_id' => array('integer',$this->getRBACId()),
131  'obj_id' => array('integer',$this->getObjId()),
132  'obj_type' => array('text',$this->getObjType()),
133  'parent_type' => array('text',$this->getParentType()),
134  'parent_id' => array('integer',$this->getParentId()),
135  'typical_age_range' => array('text',$this->getTypicalAgeRange()),
136  'tar_language' => array('text',$this->getTypicalAgeRangeLanguageCode()),
137  'tar_min' => array('text',$this->getTypicalAgeRangeMinimum()),
138  'tar_max' => array('text',$this->getTypicalAgeRangeMaximum()));
139  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __parseTypicalAgeRange() [1/2]

ilMDTypicalAgeRange::__parseTypicalAgeRange ( )

Definition at line 207 of file class.ilMDTypicalAgeRange.php.

References getTypicalAgeRange(), setTypicalAgeRangeMaximum(), and setTypicalAgeRangeMinimum().

Referenced by update().

208  {
209  if (preg_match("/\s*(\d*)\s*(-?)\s*(\d*)/", $this->getTypicalAgeRange(), $matches)) {
210  if (!$matches[2] and !$matches[3]) {
211  $min = $max = $matches[1];
212  } elseif ($matches[2] and !$matches[3]) {
213  $min = $matches[1];
214  $max = 99;
215  } else {
216  $min = $matches[1];
217  $max = $matches[3];
218  }
219  $this->setTypicalAgeRangeMaximum($max);
220  $this->setTypicalAgeRangeMinimum($min);
221 
222  return true;
223  }
224 
225  if (!$this->getTypicalAgeRange()) {
226  $this->setTypicalAgeRangeMinimum(-1);
227  $this->setTypicalAgeRangeMaximum(-1);
228  }
229  return true;
230  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __parseTypicalAgeRange() [2/2]

ilMDTypicalAgeRange::__parseTypicalAgeRange ( )

Definition at line 207 of file class.ilMDTypicalAgeRange.php.

References getTypicalAgeRange(), setTypicalAgeRangeMaximum(), and setTypicalAgeRangeMinimum().

208  {
209  if (preg_match("/\s*(\d*)\s*(-?)\s*(\d*)/", $this->getTypicalAgeRange(), $matches)) {
210  if (!$matches[2] and !$matches[3]) {
211  $min = $max = $matches[1];
212  } elseif ($matches[2] and !$matches[3]) {
213  $min = $matches[1];
214  $max = 99;
215  } else {
216  $min = $matches[1];
217  $max = $matches[3];
218  }
219  $this->setTypicalAgeRangeMaximum($max);
220  $this->setTypicalAgeRangeMinimum($min);
221 
222  return true;
223  }
224 
225  if (!$this->getTypicalAgeRange()) {
226  $this->setTypicalAgeRangeMinimum(-1);
227  $this->setTypicalAgeRangeMaximum(-1);
228  }
229  return true;
230  }
+ Here is the call graph for this function:

◆ _getIds() [1/3]

ilMDTypicalAgeRange::_getIds (   $a_rbac_id,
  $a_obj_id,
  $a_parent_id,
  $a_parent_type 
)

Definition at line 153 of file class.ilMDTypicalAgeRange.php.

References $ilDB, $query, $res, $row, and ilDBConstants\FETCHMODE_OBJECT.

154  {
155  global $ilDB;
156 
157  $query = "SELECT meta_typical_age_range_id FROM il_meta_typical_age_range " .
158  "WHERE rbac_id = " . $ilDB->quote($a_rbac_id) . " " .
159  "AND obj_id = " . $ilDB->quote($a_obj_id) . " " .
160  "AND parent_id = " . $ilDB->quote($a_parent_id) . " " .
161  "AND parent_type = " . $ilDB->quote($a_parent_type) . "";
162 
163  $res = $ilDB->query($query);
164  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
165  $ids[] = $row->meta_typical_age_range_id;
166  }
167  return $ids ? $ids : array();
168  }
foreach($_POST as $key=> $value) $res
$query
$row
global $ilDB

◆ _getIds() [2/3]

static ilMDTypicalAgeRange::_getIds (   $a_rbac_id,
  $a_obj_id,
  $a_parent_id,
  $a_parent_type 
)
static

Definition at line 187 of file class.ilMDTypicalAgeRange.php.

References $DIC, $ilDB, $query, $res, $row, and ilDBConstants\FETCHMODE_OBJECT.

Referenced by ilMDEducational\getTypicalAgeRangeIds().

188  {
189  global $DIC;
190 
191  $ilDB = $DIC['ilDB'];
192 
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');
198 
199  $res = $ilDB->query($query);
200  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
201  $ids[] = $row->meta_tar_id;
202  }
203  return $ids ? $ids : array();
204  }
global $DIC
Definition: saml.php:7
foreach($_POST as $key=> $value) $res
$query
$row
global $ilDB
+ Here is the caller graph for this function:

◆ _getIds() [3/3]

static ilMDTypicalAgeRange::_getIds (   $a_rbac_id,
  $a_obj_id,
  $a_parent_id,
  $a_parent_type 
)
static

Definition at line 187 of file class.ilMDTypicalAgeRange.php.

References $DIC, $ilDB, $query, $res, $row, and ilDBConstants\FETCHMODE_OBJECT.

188  {
189  global $DIC;
190 
191  $ilDB = $DIC['ilDB'];
192 
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');
198 
199  $res = $ilDB->query($query);
200  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
201  $ids[] = $row->meta_tar_id;
202  }
203  return $ids ? $ids : array();
204  }
global $DIC
Definition: saml.php:7
foreach($_POST as $key=> $value) $res
$query
$row
global $ilDB

◆ delete() [1/3]

ilMDTypicalAgeRange::delete ( )

Definition at line 90 of file class.ilMDTypicalAgeRange.php.

References $ilDB, $query, and ilMDBase\getMetaId().

91  {
92  global $ilDB;
93 
94  if ($this->getMetaId()) {
95  $query = "DELETE FROM il_meta_typical_age_range " .
96  "WHERE meta_typical_age_range_id = " . $ilDB->quote($this->getMetaId());
97 
98  $this->db->query($query);
99 
100  return true;
101  }
102  return false;
103  }
$query
global $ilDB
+ Here is the call graph for this function:

◆ delete() [2/3]

ilMDTypicalAgeRange::delete ( )

Definition at line 112 of file class.ilMDTypicalAgeRange.php.

References $DIC, $ilDB, $query, $res, and ilMDBase\getMetaId().

113  {
114  global $DIC;
115 
116  $ilDB = $DIC['ilDB'];
117 
118  if ($this->getMetaId()) {
119  $query = "DELETE FROM il_meta_tar " .
120  "WHERE meta_tar_id = " . $ilDB->quote($this->getMetaId(), 'integer');
121  $res = $ilDB->manipulate($query);
122  return true;
123  }
124  return false;
125  }
global $DIC
Definition: saml.php:7
foreach($_POST as $key=> $value) $res
$query
global $ilDB
+ Here is the call graph for this function:

◆ delete() [3/3]

ilMDTypicalAgeRange::delete ( )

Definition at line 112 of file class.ilMDTypicalAgeRange.php.

References $DIC, $ilDB, $query, $res, and ilMDBase\getMetaId().

113  {
114  global $DIC;
115 
116  $ilDB = $DIC['ilDB'];
117 
118  if ($this->getMetaId()) {
119  $query = "DELETE FROM il_meta_tar " .
120  "WHERE meta_tar_id = " . $ilDB->quote($this->getMetaId(), 'integer');
121  $res = $ilDB->manipulate($query);
122  return true;
123  }
124  return false;
125  }
global $DIC
Definition: saml.php:7
foreach($_POST as $key=> $value) $res
$query
global $ilDB
+ Here is the call graph for this function:

◆ getTypicalAgeRange() [1/3]

ilMDTypicalAgeRange::getTypicalAgeRange ( )

Definition at line 40 of file class.ilMDTypicalAgeRange.php.

41  {
42  return $this->typical_age_range;
43  }

◆ getTypicalAgeRange() [2/3]

ilMDTypicalAgeRange::getTypicalAgeRange ( )

Definition at line 40 of file class.ilMDTypicalAgeRange.php.

Referenced by __getFields(), __parseTypicalAgeRange(), and toXML().

41  {
42  return $this->typical_age_range;
43  }
+ Here is the caller graph for this function:

◆ getTypicalAgeRange() [3/3]

ilMDTypicalAgeRange::getTypicalAgeRange ( )

Definition at line 40 of file class.ilMDTypicalAgeRange.php.

41  {
42  return $this->typical_age_range;
43  }

◆ getTypicalAgeRangeLanguage() [1/3]

& ilMDTypicalAgeRange::getTypicalAgeRangeLanguage ( )

Definition at line 50 of file class.ilMDTypicalAgeRange.php.

51  {
52  return is_object($this->typical_age_range_language) ? $this->typical_age_range_language : false;
53  }

◆ getTypicalAgeRangeLanguage() [2/3]

& ilMDTypicalAgeRange::getTypicalAgeRangeLanguage ( )

Definition at line 50 of file class.ilMDTypicalAgeRange.php.

51  {
52  return is_object($this->typical_age_range_language) ? $this->typical_age_range_language : false;
53  }

◆ getTypicalAgeRangeLanguage() [3/3]

& ilMDTypicalAgeRange::getTypicalAgeRangeLanguage ( )

Definition at line 50 of file class.ilMDTypicalAgeRange.php.

51  {
52  return is_object($this->typical_age_range_language) ? $this->typical_age_range_language : false;
53  }

◆ getTypicalAgeRangeLanguageCode() [1/3]

ilMDTypicalAgeRange::getTypicalAgeRangeLanguageCode ( )

Definition at line 54 of file class.ilMDTypicalAgeRange.php.

55  {
56  return is_object($this->typical_age_range_language) ? $this->typical_age_range_language->getLanguageCode() : false;
57  }

◆ getTypicalAgeRangeLanguageCode() [2/3]

ilMDTypicalAgeRange::getTypicalAgeRangeLanguageCode ( )

Definition at line 54 of file class.ilMDTypicalAgeRange.php.

Referenced by __getFields(), and toXML().

55  {
56  return is_object($this->typical_age_range_language) ? $this->typical_age_range_language->getLanguageCode() : false;
57  }
+ Here is the caller graph for this function:

◆ getTypicalAgeRangeLanguageCode() [3/3]

ilMDTypicalAgeRange::getTypicalAgeRangeLanguageCode ( )

Definition at line 54 of file class.ilMDTypicalAgeRange.php.

55  {
56  return is_object($this->typical_age_range_language) ? $this->typical_age_range_language->getLanguageCode() : false;
57  }

◆ getTypicalAgeRangeMaximum() [1/2]

ilMDTypicalAgeRange::getTypicalAgeRangeMaximum ( )

Definition at line 71 of file class.ilMDTypicalAgeRange.php.

Referenced by __getFields().

72  {
73  return $this->typical_age_range_maximum;
74  }
+ Here is the caller graph for this function:

◆ getTypicalAgeRangeMaximum() [2/2]

ilMDTypicalAgeRange::getTypicalAgeRangeMaximum ( )

Definition at line 71 of file class.ilMDTypicalAgeRange.php.

72  {
73  return $this->typical_age_range_maximum;
74  }

◆ getTypicalAgeRangeMinimum() [1/2]

ilMDTypicalAgeRange::getTypicalAgeRangeMinimum ( )

Definition at line 63 of file class.ilMDTypicalAgeRange.php.

64  {
65  return $this->typical_age_range_minimum;
66  }

◆ getTypicalAgeRangeMinimum() [2/2]

ilMDTypicalAgeRange::getTypicalAgeRangeMinimum ( )

Definition at line 63 of file class.ilMDTypicalAgeRange.php.

Referenced by __getFields().

64  {
65  return $this->typical_age_range_minimum;
66  }
+ Here is the caller graph for this function:

◆ read() [1/3]

ilMDTypicalAgeRange::read ( )

Definition at line 117 of file class.ilMDTypicalAgeRange.php.

References $ilDB, $query, $res, $row, ilDBConstants\FETCHMODE_OBJECT, ilMDBase\getMetaId(), ilMDBase\setObjId(), ilMDBase\setObjType(), ilMDBase\setParentId(), ilMDBase\setParentType(), ilMDBase\setRBACId(), setTypicalAgeRange(), setTypicalAgeRangeLanguage(), and ilUtil\stripSlashes().

118  {
119  global $ilDB;
120 
121  include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDLanguageItem.php';
122 
123  if ($this->getMetaId()) {
124  $query = "SELECT * FROM il_meta_typical_age_range " .
125  "WHERE meta_typical_age_range_id = " . $ilDB->quote($this->getMetaId());
126 
127  $res = $this->db->query($query);
128  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
129  $this->setRBACId($row->rbac_id);
130  $this->setObjId($row->obj_id);
131  $this->setObjType($row->obj_type);
132  $this->setParentId($row->parent_id);
133  $this->setParentType($row->parent_type);
134  $this->setTypicalAgeRange(ilUtil::stripSlashes($row->typical_age_range));
135  $this->setTypicalAgeRangeLanguage(new ilMDLanguageItem($row->typical_age_range_language));
136  }
137  }
138  return true;
139  }
setObjType($a_type)
foreach($_POST as $key=> $value) $res
setObjId($a_id)
setRBACId($a_id)
setTypicalAgeRange($a_typical_age_range)
$query
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
setParentId($a_id)
$row
global $ilDB
setParentType($a_parent_type)
+ Here is the call graph for this function:

◆ read() [2/3]

ilMDTypicalAgeRange::read ( )

Definition at line 141 of file class.ilMDTypicalAgeRange.php.

References $DIC, $ilDB, $query, $res, $row, ilDBConstants\FETCHMODE_OBJECT, ilMDBase\getMetaId(), ilMDBase\setObjId(), ilMDBase\setObjType(), ilMDBase\setParentId(), ilMDBase\setParentType(), ilMDBase\setRBACId(), setTypicalAgeRange(), setTypicalAgeRangeLanguage(), setTypicalAgeRangeMaximum(), and setTypicalAgeRangeMinimum().

142  {
143  global $DIC;
144 
145  $ilDB = $DIC['ilDB'];
146 
147  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMDLanguageItem.php';
148 
149  if ($this->getMetaId()) {
150  $query = "SELECT * FROM il_meta_tar " .
151  "WHERE meta_tar_id = " . $ilDB->quote($this->getMetaId(), 'integer');
152 
153  $res = $ilDB->query($query);
154  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
155  $this->setRBACId($row->rbac_id);
156  $this->setObjId($row->obj_id);
157  $this->setObjType($row->obj_type);
158  $this->setParentId($row->parent_id);
159  $this->setParentType($row->parent_type);
160  $this->setTypicalAgeRange($row->typical_age_range);
161  $this->setTypicalAgeRangeLanguage(new ilMDLanguageItem($row->tar_language));
162  $this->setTypicalAgeRangeMinimum($row->tar_min);
163  $this->setTypicalAgeRangeMaximum($row->tar_max);
164  }
165  }
166  return true;
167  }
setObjType($a_type)
global $DIC
Definition: saml.php:7
foreach($_POST as $key=> $value) $res
setObjId($a_id)
setRBACId($a_id)
setTypicalAgeRange($a_typical_age_range)
$query
setParentId($a_id)
$row
global $ilDB
setParentType($a_parent_type)
+ Here is the call graph for this function:

◆ read() [3/3]

ilMDTypicalAgeRange::read ( )

Definition at line 141 of file class.ilMDTypicalAgeRange.php.

References $DIC, $ilDB, $query, $res, $row, ilDBConstants\FETCHMODE_OBJECT, ilMDBase\getMetaId(), ilMDBase\setObjId(), ilMDBase\setObjType(), ilMDBase\setParentId(), ilMDBase\setParentType(), ilMDBase\setRBACId(), setTypicalAgeRange(), setTypicalAgeRangeLanguage(), setTypicalAgeRangeMaximum(), and setTypicalAgeRangeMinimum().

142  {
143  global $DIC;
144 
145  $ilDB = $DIC['ilDB'];
146 
147  include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php';
148 
149  if ($this->getMetaId()) {
150  $query = "SELECT * FROM il_meta_tar " .
151  "WHERE meta_tar_id = " . $ilDB->quote($this->getMetaId(), 'integer');
152 
153  $res = $ilDB->query($query);
154  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
155  $this->setRBACId($row->rbac_id);
156  $this->setObjId($row->obj_id);
157  $this->setObjType($row->obj_type);
158  $this->setParentId($row->parent_id);
159  $this->setParentType($row->parent_type);
160  $this->setTypicalAgeRange($row->typical_age_range);
161  $this->setTypicalAgeRangeLanguage(new ilMDLanguageItem($row->tar_language));
162  $this->setTypicalAgeRangeMinimum($row->tar_min);
163  $this->setTypicalAgeRangeMaximum($row->tar_max);
164  }
165  }
166  return true;
167  }
setObjType($a_type)
global $DIC
Definition: saml.php:7
foreach($_POST as $key=> $value) $res
setObjId($a_id)
setRBACId($a_id)
setTypicalAgeRange($a_typical_age_range)
$query
setParentId($a_id)
$row
global $ilDB
setParentType($a_parent_type)
+ Here is the call graph for this function:

◆ save() [1/3]

ilMDTypicalAgeRange::save ( )

Definition at line 59 of file class.ilMDTypicalAgeRange.php.

References ilDBConstants\AUTOQUERY_INSERT, ilMDBase\getMetaId(), and ilMDBase\setMetaId().

60  {
61  if ($this->db->autoExecute(
62  'il_meta_typical_age_range',
63  $this->__getFields(),
65  )) {
66  $this->setMetaId($this->db->getLastInsertId());
67 
68  return $this->getMetaId();
69  }
70  return false;
71  }
setMetaId($a_meta_id, $a_read_data=true)
+ Here is the call graph for this function:

◆ save() [2/3]

ilMDTypicalAgeRange::save ( )

Definition at line 77 of file class.ilMDTypicalAgeRange.php.

References $DIC, $ilDB, __getFields(), ilMDBase\getMetaId(), and ilMDBase\setMetaId().

78  {
79  global $DIC;
80 
81  $ilDB = $DIC['ilDB'];
82 
83  $fields = $this->__getFields();
84  $fields['meta_tar_id'] = array('integer',$next_id = $ilDB->nextId('il_meta_tar'));
85 
86  if ($this->db->insert('il_meta_tar', $fields)) {
87  $this->setMetaId($next_id);
88  return $this->getMetaId();
89  }
90  return false;
91  }
global $DIC
Definition: saml.php:7
setMetaId($a_meta_id, $a_read_data=true)
global $ilDB
+ Here is the call graph for this function:

◆ save() [3/3]

ilMDTypicalAgeRange::save ( )

Definition at line 77 of file class.ilMDTypicalAgeRange.php.

References $DIC, $ilDB, __getFields(), ilMDBase\getMetaId(), and ilMDBase\setMetaId().

78  {
79  global $DIC;
80 
81  $ilDB = $DIC['ilDB'];
82 
83  $fields = $this->__getFields();
84  $fields['meta_tar_id'] = array('integer',$next_id = $ilDB->nextId('il_meta_tar'));
85 
86  if ($this->db->insert('il_meta_tar', $fields)) {
87  $this->setMetaId($next_id);
88  return $this->getMetaId();
89  }
90  return false;
91  }
global $DIC
Definition: saml.php:7
setMetaId($a_meta_id, $a_read_data=true)
global $ilDB
+ Here is the call graph for this function:

◆ setTypicalAgeRange() [1/3]

ilMDTypicalAgeRange::setTypicalAgeRange (   $a_typical_age_range)

Definition at line 36 of file class.ilMDTypicalAgeRange.php.

Referenced by read().

37  {
38  $this->typical_age_range = $a_typical_age_range;
39  }
+ Here is the caller graph for this function:

◆ setTypicalAgeRange() [2/3]

ilMDTypicalAgeRange::setTypicalAgeRange (   $a_typical_age_range)

Definition at line 36 of file class.ilMDTypicalAgeRange.php.

37  {
38  $this->typical_age_range = $a_typical_age_range;
39  }

◆ setTypicalAgeRange() [3/3]

ilMDTypicalAgeRange::setTypicalAgeRange (   $a_typical_age_range)

Definition at line 36 of file class.ilMDTypicalAgeRange.php.

37  {
38  $this->typical_age_range = $a_typical_age_range;
39  }

◆ setTypicalAgeRangeLanguage() [1/3]

ilMDTypicalAgeRange::setTypicalAgeRangeLanguage ( $lng_obj)

Definition at line 44 of file class.ilMDTypicalAgeRange.php.

45  {
46  if (is_object($lng_obj)) {
47  $this->typical_age_range_language = $lng_obj;
48  }
49  }

◆ setTypicalAgeRangeLanguage() [2/3]

ilMDTypicalAgeRange::setTypicalAgeRangeLanguage ( $lng_obj)

Definition at line 44 of file class.ilMDTypicalAgeRange.php.

45  {
46  if (is_object($lng_obj)) {
47  $this->typical_age_range_language = $lng_obj;
48  }
49  }

◆ setTypicalAgeRangeLanguage() [3/3]

ilMDTypicalAgeRange::setTypicalAgeRangeLanguage ( $lng_obj)

Definition at line 44 of file class.ilMDTypicalAgeRange.php.

Referenced by read().

45  {
46  if (is_object($lng_obj)) {
47  $this->typical_age_range_language = $lng_obj;
48  }
49  }
+ Here is the caller graph for this function:

◆ setTypicalAgeRangeMaximum() [1/2]

ilMDTypicalAgeRange::setTypicalAgeRangeMaximum (   $a_max)

Definition at line 67 of file class.ilMDTypicalAgeRange.php.

68  {
69  $this->typical_age_range_maximum = $a_max;
70  }

◆ setTypicalAgeRangeMaximum() [2/2]

ilMDTypicalAgeRange::setTypicalAgeRangeMaximum (   $a_max)

Definition at line 67 of file class.ilMDTypicalAgeRange.php.

Referenced by __parseTypicalAgeRange(), and read().

68  {
69  $this->typical_age_range_maximum = $a_max;
70  }
+ Here is the caller graph for this function:

◆ setTypicalAgeRangeMinimum() [1/2]

ilMDTypicalAgeRange::setTypicalAgeRangeMinimum (   $a_min)

Definition at line 59 of file class.ilMDTypicalAgeRange.php.

Referenced by __parseTypicalAgeRange(), and read().

60  {
61  $this->typical_age_range_minimum = $a_min;
62  }
+ Here is the caller graph for this function:

◆ setTypicalAgeRangeMinimum() [2/2]

ilMDTypicalAgeRange::setTypicalAgeRangeMinimum (   $a_min)

Definition at line 59 of file class.ilMDTypicalAgeRange.php.

60  {
61  $this->typical_age_range_minimum = $a_min;
62  }

◆ toXML() [1/3]

ilMDTypicalAgeRange::toXML ( $writer)

Definition at line 146 of file class.ilMDTypicalAgeRange.php.

References getTypicalAgeRange(), and getTypicalAgeRangeLanguageCode().

147  {
148  $writer->xmlElement('TypicalAgeRange', array('Language' => $this->getTypicalAgeRangeLanguageCode()), $this->getTypicalAgeRange());
149  }
+ Here is the call graph for this function:

◆ toXML() [2/3]

ilMDTypicalAgeRange::toXML ( $writer)

Definition at line 174 of file class.ilMDTypicalAgeRange.php.

References getTypicalAgeRange(), and getTypicalAgeRangeLanguageCode().

175  {
176  $writer->xmlElement(
177  'TypicalAgeRange',
178  array('Language' => $this->getTypicalAgeRangeLanguageCode()
180  : 'en'),
181  $this->getTypicalAgeRange()
182  );
183  }
+ Here is the call graph for this function:

◆ toXML() [3/3]

ilMDTypicalAgeRange::toXML ( $writer)

Definition at line 174 of file class.ilMDTypicalAgeRange.php.

References getTypicalAgeRange(), and getTypicalAgeRangeLanguageCode().

175  {
176  $writer->xmlElement(
177  'TypicalAgeRange',
178  array('Language' => $this->getTypicalAgeRangeLanguageCode()
180  : 'en'),
181  $this->getTypicalAgeRange()
182  );
183  }
+ Here is the call graph for this function:

◆ update() [1/3]

ilMDTypicalAgeRange::update ( )

Definition at line 73 of file class.ilMDTypicalAgeRange.php.

References $ilDB, ilDBConstants\AUTOQUERY_UPDATE, and ilMDBase\getMetaId().

74  {
75  global $ilDB;
76 
77  if ($this->getMetaId()) {
78  if ($this->db->autoExecute(
79  'il_meta_typical_age_range',
80  $this->__getFields(),
82  "meta_typical_age_range_id = " . $ilDB->quote($this->getMetaId())
83  )) {
84  return true;
85  }
86  }
87  return false;
88  }
global $ilDB
+ Here is the call graph for this function:

◆ update() [2/3]

ilMDTypicalAgeRange::update ( )

Definition at line 93 of file class.ilMDTypicalAgeRange.php.

References $DIC, $ilDB, __parseTypicalAgeRange(), and ilMDBase\getMetaId().

94  {
95  global $DIC;
96 
97  $ilDB = $DIC['ilDB'];
98 
99  $this->__parseTypicalAgeRange();
100  if ($this->getMetaId()) {
101  if ($this->db->update(
102  'il_meta_tar',
103  $this->__getFields(),
104  array("meta_tar_id" => array('integer',$this->getMetaId()))
105  )) {
106  return true;
107  }
108  }
109  return false;
110  }
global $DIC
Definition: saml.php:7
global $ilDB
+ Here is the call graph for this function:

◆ update() [3/3]

ilMDTypicalAgeRange::update ( )

Definition at line 93 of file class.ilMDTypicalAgeRange.php.

References $DIC, $ilDB, __parseTypicalAgeRange(), and ilMDBase\getMetaId().

94  {
95  global $DIC;
96 
97  $ilDB = $DIC['ilDB'];
98 
99  $this->__parseTypicalAgeRange();
100  if ($this->getMetaId()) {
101  if ($this->db->update(
102  'il_meta_tar',
103  $this->__getFields(),
104  array("meta_tar_id" => array('integer',$this->getMetaId()))
105  )) {
106  return true;
107  }
108  }
109  return false;
110  }
global $DIC
Definition: saml.php:7
global $ilDB
+ Here is the call graph for this function:

The documentation for this class was generated from the following file: