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

Public Member Functions

getTaxonIds ()
 
getTaxon ($a_taxon_id)
 
addTaxon ()
 
 setSource ($a_source)
 
 getSource ()
 
 setSourceLanguage (&$lng_obj)
 
getSourceLanguage ()
 
 getSourceLanguageCode ()
 
 save ()
 
 update ()
 
 delete ()
 
 __getFields ()
 
 read ()
 
 toXML (&$writer)
 
getTaxonIds ()
 
getTaxon ($a_taxon_id)
 
addTaxon ()
 
 setSource ($a_source)
 
 getSource ()
 
 setSourceLanguage (&$lng_obj)
 
getSourceLanguage ()
 
 getSourceLanguageCode ()
 
 save ()
 
 update ()
 
 delete ()
 
 __getFields ()
 
 read ()
 
 toXML (&$writer)
 
 _getIds ($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
 
getTaxonIds ()
 
getTaxon ($a_taxon_id)
 
addTaxon ()
 
 setSource ($a_source)
 
 getSource ()
 
 setSourceLanguage (&$lng_obj)
 
getSourceLanguage ()
 
 getSourceLanguageCode ()
 
 save ()
 
 update ()
 
 delete ()
 
 __getFields ()
 
 read ()
 
 toXML (&$writer)
 
- 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.ilMDTaxonPath.php.

Member Function Documentation

◆ __getFields() [1/3]

ilMDTaxonPath::__getFields ( )

Definition at line 142 of file class.ilMDTaxonPath.php.

References ilMDBase\getObjId(), ilMDBase\getObjType(), ilMDBase\getParentId(), ilMDBase\getParentType(), ilMDBase\getRBACId(), getSource(), getSourceLanguageCode(), and ilUtil\prepareDBString().

143  {
144  return array('rbac_id' => $this->getRBACId(),
145  'obj_id' => $this->getObjId(),
146  'obj_type' => ilUtil::prepareDBString($this->getObjType()),
147  'parent_type' => $this->getParentType(),
148  'parent_id' => $this->getParentId(),
149  'source' => ilUtil::prepareDBString($this->getSource()),
150  'source_language' => ilUtil::prepareDBString($this->getSourceLanguageCode()));
151  }
static prepareDBString($a_str)
prepare a string for db writing (insert/update)
+ Here is the call graph for this function:

◆ __getFields() [2/3]

ilMDTaxonPath::__getFields ( )

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

References ilMDBase\getObjId(), ilMDBase\getObjType(), ilMDBase\getParentId(), ilMDBase\getParentType(), ilMDBase\getRBACId(), getSource(), and getSourceLanguageCode().

147  {
148  return array('rbac_id' => array('integer',$this->getRBACId()),
149  'obj_id' => array('integer',$this->getObjId()),
150  'obj_type' => array('text',$this->getObjType()),
151  'parent_type' => array('text',$this->getParentType()),
152  'parent_id' => array('integer',$this->getParentId()),
153  'source' => array('text',$this->getSource()),
154  'source_language' => array('text',$this->getSourceLanguageCode()));
155  }
+ Here is the call graph for this function:

◆ __getFields() [3/3]

ilMDTaxonPath::__getFields ( )

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

References ilMDBase\getObjId(), ilMDBase\getObjType(), ilMDBase\getParentId(), ilMDBase\getParentType(), ilMDBase\getRBACId(), getSource(), and getSourceLanguageCode().

Referenced by save().

147  {
148  return array('rbac_id' => array('integer',$this->getRBACId()),
149  'obj_id' => array('integer',$this->getObjId()),
150  'obj_type' => array('text',$this->getObjType()),
151  'parent_type' => array('text',$this->getParentType()),
152  'parent_id' => array('integer',$this->getParentId()),
153  'source' => array('text',$this->getSource()),
154  'source_language' => array('text',$this->getSourceLanguageCode()));
155  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _getIds() [1/3]

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

Definition at line 200 of file class.ilMDTaxonPath.php.

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

201  {
202  global $ilDB;
203 
204  $query = "SELECT meta_taxon_path_id FROM il_meta_taxon_path " .
205  "WHERE rbac_id = " . $ilDB->quote($a_rbac_id) . " " .
206  "AND obj_id = " . $ilDB->quote($a_obj_id) . " " .
207  "AND parent_id = " . $ilDB->quote($a_parent_id) . " " .
208  "AND parent_type = " . $ilDB->quote($a_parent_type);
209 
210  $res = $ilDB->query($query);
211  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
212  $ids[] = $row->meta_taxon_path_id;
213  }
214  return $ids ? $ids : array();
215  }
foreach($_POST as $key=> $value) $res
$query
$row
global $ilDB

◆ _getIds() [2/3]

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

Definition at line 218 of file class.ilMDTaxonPath.php.

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

219  {
220  global $DIC;
221 
222  $ilDB = $DIC['ilDB'];
223 
224  $query = "SELECT meta_taxon_path_id FROM il_meta_taxon_path " .
225  "WHERE rbac_id = " . $ilDB->quote($a_rbac_id, 'integer') . " " .
226  "AND obj_id = " . $ilDB->quote($a_obj_id, 'integer') . " " .
227  "AND parent_id = " . $ilDB->quote($a_parent_id, 'integer') . " " .
228  "AND parent_type = " . $ilDB->quote($a_parent_type, 'text');
229 
230  $res = $ilDB->query($query);
231  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
232  $ids[] = $row->meta_taxon_path_id;
233  }
234  return $ids ? $ids : array();
235  }
global $DIC
Definition: saml.php:7
foreach($_POST as $key=> $value) $res
$query
$row
global $ilDB

◆ _getIds() [3/3]

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

Definition at line 218 of file class.ilMDTaxonPath.php.

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

Referenced by ilMDClassification\getTaxonPathIds().

219  {
220  global $DIC;
221 
222  $ilDB = $DIC['ilDB'];
223 
224  $query = "SELECT meta_taxon_path_id FROM il_meta_taxon_path " .
225  "WHERE rbac_id = " . $ilDB->quote($a_rbac_id, 'integer') . " " .
226  "AND obj_id = " . $ilDB->quote($a_obj_id, 'integer') . " " .
227  "AND parent_id = " . $ilDB->quote($a_parent_id, 'integer') . " " .
228  "AND parent_type = " . $ilDB->quote($a_parent_type, 'text');
229 
230  $res = $ilDB->query($query);
231  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
232  $ids[] = $row->meta_taxon_path_id;
233  }
234  return $ids ? $ids : array();
235  }
global $DIC
Definition: saml.php:7
foreach($_POST as $key=> $value) $res
$query
$row
global $ilDB
+ Here is the caller graph for this function:

◆ addTaxon() [1/3]

& ilMDTaxonPath::addTaxon ( )

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

References ilMDBase\getMetaId(), ilMDBase\getObjId(), ilMDBase\getObjType(), and ilMDBase\getRBACId().

55  {
56  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMDTaxon.php';
57 
58  $tax = new ilMDTaxon($this->getRBACId(), $this->getObjId(), $this->getObjType());
59  $tax->setParentId($this->getMetaId());
60  $tax->setParentType('meta_taxon_path');
61 
62  return $tax;
63  }
+ Here is the call graph for this function:

◆ addTaxon() [2/3]

& ilMDTaxonPath::addTaxon ( )

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

References ilMDBase\getMetaId(), ilMDBase\getObjId(), ilMDBase\getObjType(), and ilMDBase\getRBACId().

55  {
56  include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDTaxon.php';
57 
58  $tax = new ilMDTaxon($this->getRBACId(), $this->getObjId(), $this->getObjType());
59  $tax->setParentId($this->getMetaId());
60  $tax->setParentType('meta_taxon_path');
61 
62  return $tax;
63  }
+ Here is the call graph for this function:

◆ addTaxon() [3/3]

& ilMDTaxonPath::addTaxon ( )

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

References ilMDBase\getMetaId(), ilMDBase\getObjId(), ilMDBase\getObjType(), and ilMDBase\getRBACId().

55  {
56  include_once 'Services/MetaData/classes/class.ilMDTaxon.php';
57 
58  $tax = new ilMDTaxon($this->getRBACId(), $this->getObjId(), $this->getObjType());
59  $tax->setParentId($this->getMetaId());
60  $tax->setParentType('meta_taxon_path');
61 
62  return $tax;
63  }
+ Here is the call graph for this function:

◆ delete() [1/3]

ilMDTaxonPath::delete ( )

Definition at line 121 of file class.ilMDTaxonPath.php.

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

122  {
123  global $ilDB;
124 
125  if ($this->getMetaId()) {
126  $query = "DELETE FROM il_meta_taxon_path " .
127  "WHERE meta_taxon_path_id = " . $ilDB->quote($this->getMetaId());
128 
129  $this->db->query($query);
130 
131  foreach ($this->getTaxonIds() as $id) {
132  $tax = $this->getTaxon($id);
133  $tax->delete();
134  }
135 
136  return true;
137  }
138  return false;
139  }
if(!array_key_exists('StateId', $_REQUEST)) $id
& getTaxon($a_taxon_id)
$query
global $ilDB
+ Here is the call graph for this function:

◆ delete() [2/3]

ilMDTaxonPath::delete ( )

Definition at line 124 of file class.ilMDTaxonPath.php.

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

125  {
126  global $DIC;
127 
128  $ilDB = $DIC['ilDB'];
129 
130  if ($this->getMetaId()) {
131  $query = "DELETE FROM il_meta_taxon_path " .
132  "WHERE meta_taxon_path_id = " . $ilDB->quote($this->getMetaId(), 'integer');
133  $res = $ilDB->manipulate($query);
134 
135  foreach ($this->getTaxonIds() as $id) {
136  $tax = $this->getTaxon($id);
137  $tax->delete();
138  }
139 
140  return true;
141  }
142  return false;
143  }
global $DIC
Definition: saml.php:7
if(!array_key_exists('StateId', $_REQUEST)) $id
& getTaxon($a_taxon_id)
foreach($_POST as $key=> $value) $res
$query
global $ilDB
+ Here is the call graph for this function:

◆ delete() [3/3]

ilMDTaxonPath::delete ( )

Definition at line 124 of file class.ilMDTaxonPath.php.

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

125  {
126  global $DIC;
127 
128  $ilDB = $DIC['ilDB'];
129 
130  if ($this->getMetaId()) {
131  $query = "DELETE FROM il_meta_taxon_path " .
132  "WHERE meta_taxon_path_id = " . $ilDB->quote($this->getMetaId(), 'integer');
133  $res = $ilDB->manipulate($query);
134 
135  foreach ($this->getTaxonIds() as $id) {
136  $tax = $this->getTaxon($id);
137  $tax->delete();
138  }
139 
140  return true;
141  }
142  return false;
143  }
global $DIC
Definition: saml.php:7
if(!array_key_exists('StateId', $_REQUEST)) $id
& getTaxon($a_taxon_id)
foreach($_POST as $key=> $value) $res
$query
global $ilDB
+ Here is the call graph for this function:

◆ getSource() [1/3]

ilMDTaxonPath::getSource ( )

Definition at line 70 of file class.ilMDTaxonPath.php.

References $source.

71  {
72  return $this->source;
73  }
$source
Definition: linkback.php:22

◆ getSource() [2/3]

ilMDTaxonPath::getSource ( )

Definition at line 70 of file class.ilMDTaxonPath.php.

References $source.

71  {
72  return $this->source;
73  }
$source
Definition: linkback.php:22

◆ getSource() [3/3]

ilMDTaxonPath::getSource ( )

Definition at line 70 of file class.ilMDTaxonPath.php.

References $source.

Referenced by __getFields(), and toXML().

71  {
72  return $this->source;
73  }
$source
Definition: linkback.php:22
+ Here is the caller graph for this function:

◆ getSourceLanguage() [1/3]

& ilMDTaxonPath::getSourceLanguage ( )

Definition at line 80 of file class.ilMDTaxonPath.php.

81  {
82  return is_object($this->source_language) ? $this->source_language : false;
83  }

◆ getSourceLanguage() [2/3]

& ilMDTaxonPath::getSourceLanguage ( )

Definition at line 80 of file class.ilMDTaxonPath.php.

81  {
82  return is_object($this->source_language) ? $this->source_language : false;
83  }

◆ getSourceLanguage() [3/3]

& ilMDTaxonPath::getSourceLanguage ( )

Definition at line 80 of file class.ilMDTaxonPath.php.

81  {
82  return is_object($this->source_language) ? $this->source_language : false;
83  }

◆ getSourceLanguageCode() [1/3]

ilMDTaxonPath::getSourceLanguageCode ( )

Definition at line 84 of file class.ilMDTaxonPath.php.

Referenced by __getFields(), and toXML().

85  {
86  return is_object($this->source_language) ? $this->source_language->getLanguageCode() : false;
87  }
+ Here is the caller graph for this function:

◆ getSourceLanguageCode() [2/3]

ilMDTaxonPath::getSourceLanguageCode ( )

Definition at line 84 of file class.ilMDTaxonPath.php.

85  {
86  return is_object($this->source_language) ? $this->source_language->getLanguageCode() : false;
87  }

◆ getSourceLanguageCode() [3/3]

ilMDTaxonPath::getSourceLanguageCode ( )

Definition at line 84 of file class.ilMDTaxonPath.php.

85  {
86  return is_object($this->source_language) ? $this->source_language->getLanguageCode() : false;
87  }

◆ getTaxon() [1/3]

& ilMDTaxonPath::getTaxon (   $a_taxon_id)

Definition at line 42 of file class.ilMDTaxonPath.php.

43  {
44  include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDTaxon.php';
45 
46  if (!$a_taxon_id) {
47  return false;
48  }
49  $tax = new ilMDTaxon();
50  $tax->setMetaId($a_taxon_id);
51 
52  return $tax;
53  }

◆ getTaxon() [2/3]

& ilMDTaxonPath::getTaxon (   $a_taxon_id)

Definition at line 42 of file class.ilMDTaxonPath.php.

43  {
44  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMDTaxon.php';
45 
46  if (!$a_taxon_id) {
47  return false;
48  }
49  $tax = new ilMDTaxon();
50  $tax->setMetaId($a_taxon_id);
51 
52  return $tax;
53  }

◆ getTaxon() [3/3]

& ilMDTaxonPath::getTaxon (   $a_taxon_id)

Definition at line 42 of file class.ilMDTaxonPath.php.

Referenced by delete(), and toXML().

43  {
44  include_once 'Services/MetaData/classes/class.ilMDTaxon.php';
45 
46  if (!$a_taxon_id) {
47  return false;
48  }
49  $tax = new ilMDTaxon();
50  $tax->setMetaId($a_taxon_id);
51 
52  return $tax;
53  }
+ Here is the caller graph for this function:

◆ getTaxonIds() [1/3]

& ilMDTaxonPath::getTaxonIds ( )

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

References ilMDTaxon\_getIds(), ilMDBase\getMetaId(), ilMDBase\getObjId(), and ilMDBase\getRBACId().

37  {
38  include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDTaxon.php';
39 
40  return ilMDTaxon::_getIds($this->getRBACId(), $this->getObjId(), $this->getMetaId(), 'meta_taxon_path');
41  }
static _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
+ Here is the call graph for this function:

◆ getTaxonIds() [2/3]

& ilMDTaxonPath::getTaxonIds ( )

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

References ilMDTaxon\_getIds(), ilMDBase\getMetaId(), ilMDBase\getObjId(), and ilMDBase\getRBACId().

Referenced by delete(), and toXML().

37  {
38  include_once 'Services/MetaData/classes/class.ilMDTaxon.php';
39 
40  return ilMDTaxon::_getIds($this->getRBACId(), $this->getObjId(), $this->getMetaId(), 'meta_taxon_path');
41  }
static _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTaxonIds() [3/3]

& ilMDTaxonPath::getTaxonIds ( )

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

References ilMDTaxon\_getIds(), ilMDBase\getMetaId(), ilMDBase\getObjId(), and ilMDBase\getRBACId().

37  {
38  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMDTaxon.php';
39 
40  return ilMDTaxon::_getIds($this->getRBACId(), $this->getObjId(), $this->getMetaId(), 'meta_taxon_path');
41  }
static _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
+ Here is the call graph for this function:

◆ read() [1/3]

ilMDTaxonPath::read ( )

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

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

154  {
155  global $ilDB;
156 
157  include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDLanguageItem.php';
158 
159  if ($this->getMetaId()) {
160  $query = "SELECT * FROM il_meta_taxon_path " .
161  "WHERE meta_taxon_path_id = " . $ilDB->quote($this->getMetaId());
162 
163  $res = $this->db->query($query);
164  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
165  $this->setRBACId($row->rbac_id);
166  $this->setObjId($row->obj_id);
167  $this->setObjType($row->obj_type);
168  $this->setParentId($row->parent_id);
169  $this->setParentType($row->parent_type);
170  $this->setSource(ilUtil::stripSlashes($row->source));
171  $this->source_language = new ilMDLanguageItem($row->source_language);
172  }
173  }
174  return true;
175  }
setObjType($a_type)
foreach($_POST as $key=> $value) $res
setObjId($a_id)
setRBACId($a_id)
$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]

ilMDTaxonPath::read ( )

Definition at line 157 of file class.ilMDTaxonPath.php.

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

158  {
159  global $DIC;
160 
161  $ilDB = $DIC['ilDB'];
162 
163  include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php';
164 
165  if ($this->getMetaId()) {
166  $query = "SELECT * FROM il_meta_taxon_path " .
167  "WHERE meta_taxon_path_id = " . $ilDB->quote($this->getMetaId(), 'integer');
168 
169  $res = $ilDB->query($query);
170  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
171  $this->setRBACId($row->rbac_id);
172  $this->setObjId($row->obj_id);
173  $this->setObjType($row->obj_type);
174  $this->setParentId($row->parent_id);
175  $this->setParentType($row->parent_type);
176  $this->setSource($row->source);
177  $this->source_language = new ilMDLanguageItem($row->source_language);
178  }
179  }
180  return true;
181  }
setObjType($a_type)
global $DIC
Definition: saml.php:7
foreach($_POST as $key=> $value) $res
setObjId($a_id)
setRBACId($a_id)
$query
setParentId($a_id)
$row
global $ilDB
setParentType($a_parent_type)
+ Here is the call graph for this function:

◆ read() [3/3]

ilMDTaxonPath::read ( )

Definition at line 157 of file class.ilMDTaxonPath.php.

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

158  {
159  global $DIC;
160 
161  $ilDB = $DIC['ilDB'];
162 
163  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMDLanguageItem.php';
164 
165  if ($this->getMetaId()) {
166  $query = "SELECT * FROM il_meta_taxon_path " .
167  "WHERE meta_taxon_path_id = " . $ilDB->quote($this->getMetaId(), 'integer');
168 
169  $res = $ilDB->query($query);
170  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
171  $this->setRBACId($row->rbac_id);
172  $this->setObjId($row->obj_id);
173  $this->setObjType($row->obj_type);
174  $this->setParentId($row->parent_id);
175  $this->setParentType($row->parent_type);
176  $this->setSource($row->source);
177  $this->source_language = new ilMDLanguageItem($row->source_language);
178  }
179  }
180  return true;
181  }
setObjType($a_type)
global $DIC
Definition: saml.php:7
foreach($_POST as $key=> $value) $res
setObjId($a_id)
setRBACId($a_id)
$query
setParentId($a_id)
$row
global $ilDB
setParentType($a_parent_type)
+ Here is the call graph for this function:

◆ save() [1/3]

ilMDTaxonPath::save ( )

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

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

91  {
92  global $DIC;
93 
94  $ilDB = $DIC['ilDB'];
95 
96  $fields = $this->__getFields();
97  $fields['meta_taxon_path_id'] = array('integer',$next_id = $ilDB->nextId('il_meta_taxon_path'));
98 
99  if ($this->db->insert('il_meta_taxon_path', $fields)) {
100  $this->setMetaId($next_id);
101  return $this->getMetaId();
102  }
103  return false;
104  }
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() [2/3]

ilMDTaxonPath::save ( )

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

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

91  {
92  if ($this->db->autoExecute(
93  'il_meta_taxon_path',
94  $this->__getFields(),
96  )) {
97  $this->setMetaId($this->db->getLastInsertId());
98 
99  return $this->getMetaId();
100  }
101  return false;
102  }
setMetaId($a_meta_id, $a_read_data=true)
+ Here is the call graph for this function:

◆ save() [3/3]

ilMDTaxonPath::save ( )

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

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

91  {
92  global $DIC;
93 
94  $ilDB = $DIC['ilDB'];
95 
96  $fields = $this->__getFields();
97  $fields['meta_taxon_path_id'] = array('integer',$next_id = $ilDB->nextId('il_meta_taxon_path'));
98 
99  if ($this->db->insert('il_meta_taxon_path', $fields)) {
100  $this->setMetaId($next_id);
101  return $this->getMetaId();
102  }
103  return false;
104  }
global $DIC
Definition: saml.php:7
setMetaId($a_meta_id, $a_read_data=true)
global $ilDB
+ Here is the call graph for this function:

◆ setSource() [1/3]

ilMDTaxonPath::setSource (   $a_source)

Definition at line 66 of file class.ilMDTaxonPath.php.

67  {
68  $this->source = $a_source;
69  }

◆ setSource() [2/3]

ilMDTaxonPath::setSource (   $a_source)

Definition at line 66 of file class.ilMDTaxonPath.php.

Referenced by read().

67  {
68  $this->source = $a_source;
69  }
+ Here is the caller graph for this function:

◆ setSource() [3/3]

ilMDTaxonPath::setSource (   $a_source)

Definition at line 66 of file class.ilMDTaxonPath.php.

67  {
68  $this->source = $a_source;
69  }

◆ setSourceLanguage() [1/3]

ilMDTaxonPath::setSourceLanguage ( $lng_obj)

Definition at line 74 of file class.ilMDTaxonPath.php.

75  {
76  if (is_object($lng_obj)) {
77  $this->source_language = $lng_obj;
78  }
79  }

◆ setSourceLanguage() [2/3]

ilMDTaxonPath::setSourceLanguage ( $lng_obj)

Definition at line 74 of file class.ilMDTaxonPath.php.

75  {
76  if (is_object($lng_obj)) {
77  $this->source_language = $lng_obj;
78  }
79  }

◆ setSourceLanguage() [3/3]

ilMDTaxonPath::setSourceLanguage ( $lng_obj)

Definition at line 74 of file class.ilMDTaxonPath.php.

75  {
76  if (is_object($lng_obj)) {
77  $this->source_language = $lng_obj;
78  }
79  }

◆ toXML() [1/3]

ilMDTaxonPath::toXML ( $writer)

Definition at line 182 of file class.ilMDTaxonPath.php.

References $id, getSource(), getSourceLanguageCode(), getTaxon(), and getTaxonIds().

183  {
184  $writer->xmlStartTag('TaxonPath');
185 
186  $writer->xmlElement('Source', array('Language' => $this->getSourceLanguageCode()), $this->getSource());
187 
188  // Taxon
189  foreach ($this->getTaxonIds() as $id) {
190  $tax = &$this->getTaxon($id);
191  $tax->toXML($writer);
192  }
193 
194  $writer->xmlEndTag('TaxonPath');
195  }
if(!array_key_exists('StateId', $_REQUEST)) $id
& getTaxon($a_taxon_id)
+ Here is the call graph for this function:

◆ toXML() [2/3]

ilMDTaxonPath::toXML ( $writer)

Definition at line 188 of file class.ilMDTaxonPath.php.

References $id, ilMDBase\getObjId(), ilMDBase\getRBACId(), getSource(), getSourceLanguageCode(), getTaxon(), and getTaxonIds().

189  {
190  $writer->xmlStartTag('TaxonPath');
191 
192  $writer->xmlElement(
193  'Source',
194  array('Language' => $this->getSourceLanguageCode()
195  ? $this->getSourceLanguageCode()
196  : 'en'),
197  $this->getSource()
198  );
199 
200  // Taxon
201  $taxs = $this->getTaxonIds();
202  foreach ($taxs as $id) {
203  $tax = &$this->getTaxon($id);
204  $tax->toXML($writer);
205  }
206  if (!count($taxs)) {
207  include_once 'Services/MetaData/classes/class.ilMDTaxon.php';
208  $tax = new ilMDTaxon($this->getRBACId(), $this->getObjId());
209  $tax->toXML($writer);
210  }
211 
212  $writer->xmlEndTag('TaxonPath');
213  }
if(!array_key_exists('StateId', $_REQUEST)) $id
& getTaxon($a_taxon_id)
+ Here is the call graph for this function:

◆ toXML() [3/3]

ilMDTaxonPath::toXML ( $writer)

Definition at line 188 of file class.ilMDTaxonPath.php.

References $id, ilMDBase\getObjId(), ilMDBase\getRBACId(), getSource(), getSourceLanguageCode(), getTaxon(), and getTaxonIds().

189  {
190  $writer->xmlStartTag('TaxonPath');
191 
192  $writer->xmlElement(
193  'Source',
194  array('Language' => $this->getSourceLanguageCode()
195  ? $this->getSourceLanguageCode()
196  : 'en'),
197  $this->getSource()
198  );
199 
200  // Taxon
201  $taxs = $this->getTaxonIds();
202  foreach ($taxs as $id) {
203  $tax = &$this->getTaxon($id);
204  $tax->toXML($writer);
205  }
206  if (!count($taxs)) {
207  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMDTaxon.php';
208  $tax = new ilMDTaxon($this->getRBACId(), $this->getObjId());
209  $tax->toXML($writer);
210  }
211 
212  $writer->xmlEndTag('TaxonPath');
213  }
if(!array_key_exists('StateId', $_REQUEST)) $id
& getTaxon($a_taxon_id)
+ Here is the call graph for this function:

◆ update() [1/3]

ilMDTaxonPath::update ( )

Definition at line 104 of file class.ilMDTaxonPath.php.

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

105  {
106  global $ilDB;
107 
108  if ($this->getMetaId()) {
109  if ($this->db->autoExecute(
110  'il_meta_taxon_path',
111  $this->__getFields(),
113  "meta_taxon_path_id = " . $ilDB->quote($this->getMetaId())
114  )) {
115  return true;
116  }
117  }
118  return false;
119  }
global $ilDB
+ Here is the call graph for this function:

◆ update() [2/3]

ilMDTaxonPath::update ( )

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

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

107  {
108  global $DIC;
109 
110  $ilDB = $DIC['ilDB'];
111 
112  if ($this->getMetaId()) {
113  if ($this->db->update(
114  'il_meta_taxon_path',
115  $this->__getFields(),
116  array("meta_taxon_path_id" => array('integer',$this->getMetaId()))
117  )) {
118  return true;
119  }
120  }
121  return false;
122  }
global $DIC
Definition: saml.php:7
global $ilDB
+ Here is the call graph for this function:

◆ update() [3/3]

ilMDTaxonPath::update ( )

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

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

107  {
108  global $DIC;
109 
110  $ilDB = $DIC['ilDB'];
111 
112  if ($this->getMetaId()) {
113  if ($this->db->update(
114  'il_meta_taxon_path',
115  $this->__getFields(),
116  array("meta_taxon_path_id" => array('integer',$this->getMetaId()))
117  )) {
118  return true;
119  }
120  }
121  return false;
122  }
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: