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

Public Member Functions

 getPossibleSubelements ()
 
getIdentifierIds ()
 
getIdentifier ($a_identifier_id)
 
addIdentifier ()
 
getLanguageIds ()
 
getLanguage ($a_language_id)
 
addLanguage ()
 
getDescriptionIds ()
 
getDescription ($a_description_id)
 
addDescription ()
 
getKeywordIds ()
 
getKeyword ($a_keyword_id)
 
addKeyword ()
 
 setStructure ($a_structure)
 
 getStructure ()
 
 setTitle ($a_title)
 
 getTitle ()
 
 setTitleLanguage (&$lng_obj)
 
getTitleLanguage ()
 
 getTitleLanguageCode ()
 
 setCoverage ($a_coverage)
 
 getCoverage ()
 
 setCoverageLanguage (&$lng_obj)
 
getCoverageLanguage ()
 
 getCoverageLanguageCode ()
 
 save ()
 
 update ()
 
 delete ()
 
 __getFields ()
 
 read ()
 
 toXML (&$writer)
 
 getPossibleSubelements ()
 
getIdentifierIds ()
 
getIdentifier ($a_identifier_id)
 
addIdentifier ()
 
getLanguageIds ()
 
getLanguage ($a_language_id)
 
addLanguage ()
 
getDescriptionIds ()
 
getDescription ($a_description_id)
 
addDescription ()
 
getKeywordIds ()
 
getKeyword ($a_keyword_id)
 
addKeyword ()
 
 setStructure ($a_structure)
 
 getStructure ()
 
 setTitle ($a_title)
 
 getTitle ()
 
 setTitleLanguage (&$lng_obj)
 
getTitleLanguage ()
 
 getTitleLanguageCode ()
 
 setCoverage ($a_coverage)
 
 getCoverage ()
 
 setCoverageLanguage (&$lng_obj)
 
getCoverageLanguage ()
 
 getCoverageLanguageCode ()
 
 save ()
 
 update ()
 
 delete ()
 
 __getFields ()
 
 read ()
 
 toXML (&$writer)
 
 _getId ($a_rbac_id, $a_obj_id)
 
 getPossibleSubelements ()
 
getIdentifierIds ()
 
getIdentifier ($a_identifier_id)
 
addIdentifier ()
 
getLanguageIds ()
 
getLanguage ($a_language_id)
 
addLanguage ()
 
getDescriptionIds ()
 
getDescription ($a_description_id)
 
addDescription ()
 
getKeywordIds ()
 
getKeyword ($a_keyword_id)
 
addKeyword ()
 
 setStructure ($a_structure)
 
 getStructure ()
 
 setTitle ($a_title)
 
 getTitle ()
 
 setTitleLanguage (&$lng_obj)
 
getTitleLanguage ()
 
 getTitleLanguageCode ()
 
 setCoverage ($a_coverage)
 
 getCoverage ()
 
 setCoverageLanguage (&$lng_obj)
 
getCoverageLanguage ()
 
 getCoverageLanguageCode ()
 
 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 _getId ($a_rbac_id, $a_obj_id)
 
static _getId ($a_rbac_id, $a_obj_id)
 

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 34 of file class.ilMDGeneral.php.

Member Function Documentation

◆ __getFields() [1/3]

ilMDGeneral::__getFields ( )

Definition at line 308 of file class.ilMDGeneral.php.

References getCoverage(), getCoverageLanguageCode(), ilMDBase\getObjId(), ilMDBase\getObjType(), ilMDBase\getRBACId(), getStructure(), getTitle(), getTitleLanguageCode(), and ilUtil\prepareDBString().

309  {
310  return array('rbac_id' => $this->getRBACId(),
311  'obj_id' => $this->getObjId(),
312  'obj_type' => ilUtil::prepareDBString($this->getObjType()),
313  'general_structure' => ilUtil::prepareDBString($this->getStructure()),
314  'title' => ilUtil::prepareDBString($this->getTitle()),
315  'title_language' => ilUtil::prepareDBString($this->getTitleLanguageCode()),
316  'coverage' => ilUtil::prepareDBString($this->getCoverage()),
317  'coverage_language' => ilUtil::prepareDBString($this->getCoverageLanguageCode()));
318  }
static prepareDBString($a_str)
prepare a string for db writing (insert/update)
+ Here is the call graph for this function:

◆ __getFields() [2/3]

ilMDGeneral::__getFields ( )

Definition at line 314 of file class.ilMDGeneral.php.

References getCoverage(), getCoverageLanguageCode(), ilMDBase\getObjId(), ilMDBase\getObjType(), ilMDBase\getRBACId(), getStructure(), getTitle(), and getTitleLanguageCode().

315  {
316  return array('rbac_id' => array('integer',$this->getRBACId()),
317  'obj_id' => array('integer',$this->getObjId()),
318  'obj_type' => array('text',$this->getObjType()),
319  'general_structure' => array('text',$this->getStructure()),
320  'title' => array('text',$this->getTitle()),
321  'title_language' => array('text',$this->getTitleLanguageCode()),
322  'coverage' => array('text',$this->getCoverage()),
323  'coverage_language' => array('text',$this->getCoverageLanguageCode()));
324  }
+ Here is the call graph for this function:

◆ __getFields() [3/3]

ilMDGeneral::__getFields ( )

Definition at line 315 of file class.ilMDGeneral.php.

References getCoverage(), getCoverageLanguageCode(), ilMDBase\getObjId(), ilMDBase\getObjType(), ilMDBase\getRBACId(), getStructure(), getTitle(), and getTitleLanguageCode().

Referenced by save().

316  {
317  return array('rbac_id' => array('integer',$this->getRBACId()),
318  'obj_id' => array('integer',$this->getObjId()),
319  'obj_type' => array('text',$this->getObjType()),
320  'general_structure' => array('text',$this->getStructure()),
321  'title' => array('text',$this->getTitle()),
322  'title_language' => array('text',$this->getTitleLanguageCode()),
323  'coverage' => array('text',$this->getCoverage()),
324  'coverage_language' => array('text',$this->getCoverageLanguageCode()));
325  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _getId() [1/3]

ilMDGeneral::_getId (   $a_rbac_id,
  $a_obj_id 
)

Definition at line 391 of file class.ilMDGeneral.php.

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

392  {
393  global $ilDB;
394 
395  $query = "SELECT meta_general_id FROM il_meta_general " .
396  "WHERE rbac_id = " . $ilDB->quote($a_rbac_id) . " " .
397  "AND obj_id = " . $ilDB->quote($a_obj_id);
398 
399 
400  $res = $ilDB->query($query);
401  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
402  return $row->meta_general_id;
403  }
404  return false;
405  }
foreach($_POST as $key=> $value) $res
$query
$row
global $ilDB

◆ _getId() [2/3]

static ilMDGeneral::_getId (   $a_rbac_id,
  $a_obj_id 
)
static

Definition at line 451 of file class.ilMDGeneral.php.

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

452  {
453  global $DIC;
454 
455  $ilDB = $DIC['ilDB'];
456 
457  $query = "SELECT meta_general_id FROM il_meta_general " .
458  "WHERE rbac_id = " . $ilDB->quote($a_rbac_id, 'integer') . " " .
459  "AND obj_id = " . $ilDB->quote($a_obj_id, 'integer');
460 
461 
462  $res = $ilDB->query($query);
463  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
464  return $row->meta_general_id;
465  }
466  return false;
467  }
global $DIC
Definition: saml.php:7
foreach($_POST as $key=> $value) $res
$query
$row
global $ilDB

◆ _getId() [3/3]

static ilMDGeneral::_getId (   $a_rbac_id,
  $a_obj_id 
)
static

Definition at line 452 of file class.ilMDGeneral.php.

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

Referenced by ilMD\getGeneral().

453  {
454  global $DIC;
455 
456  $ilDB = $DIC['ilDB'];
457 
458  $query = "SELECT meta_general_id FROM il_meta_general " .
459  "WHERE rbac_id = " . $ilDB->quote($a_rbac_id, 'integer') . " " .
460  "AND obj_id = " . $ilDB->quote($a_obj_id, 'integer');
461 
462 
463  $res = $ilDB->query($query);
464  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
465  return $row->meta_general_id;
466  }
467  return false;
468  }
global $DIC
Definition: saml.php:7
foreach($_POST as $key=> $value) $res
$query
$row
global $ilDB
+ Here is the caller graph for this function:

◆ addDescription() [1/3]

& ilMDGeneral::addDescription ( )

Definition at line 123 of file class.ilMDGeneral.php.

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

124  {
125  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMDDescription.php';
126 
127  $des = new ilMDDescription($this->getRBACId(), $this->getObjId(), $this->getObjType());
128  $des->setParentId($this->getMetaId());
129  $des->setParentType('meta_general');
130 
131  return $des;
132  }
+ Here is the call graph for this function:

◆ addDescription() [2/3]

& ilMDGeneral::addDescription ( )

Definition at line 123 of file class.ilMDGeneral.php.

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

124  {
125  include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDDescription.php';
126 
127  $des = new ilMDDescription($this->getRBACId(), $this->getObjId(), $this->getObjType());
128  $des->setParentId($this->getMetaId());
129  $des->setParentType('meta_general');
130 
131  return $des;
132  }
+ Here is the call graph for this function:

◆ addDescription() [3/3]

& ilMDGeneral::addDescription ( )

Definition at line 123 of file class.ilMDGeneral.php.

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

124  {
125  include_once 'Services/MetaData/classes/class.ilMDDescription.php';
126 
127  $des = new ilMDDescription($this->getRBACId(), $this->getObjId(), $this->getObjType());
128  $des->setParentId($this->getMetaId());
129  $des->setParentType('meta_general');
130 
131  return $des;
132  }
+ Here is the call graph for this function:

◆ addIdentifier() [1/3]

& ilMDGeneral::addIdentifier ( )

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

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

67  {
68  include_once 'Services/MetaData/classes/class.ilMDIdentifier.php';
69 
70  $ide = new ilMDIdentifier($this->getRBACId(), $this->getObjId(), $this->getObjType());
71  $ide->setParentId($this->getMetaId());
72  $ide->setParentType('meta_general');
73 
74  return $ide;
75  }
+ Here is the call graph for this function:

◆ addIdentifier() [2/3]

& ilMDGeneral::addIdentifier ( )

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

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

67  {
68  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMDIdentifier.php';
69 
70  $ide = new ilMDIdentifier($this->getRBACId(), $this->getObjId(), $this->getObjType());
71  $ide->setParentId($this->getMetaId());
72  $ide->setParentType('meta_general');
73 
74  return $ide;
75  }
+ Here is the call graph for this function:

◆ addIdentifier() [3/3]

& ilMDGeneral::addIdentifier ( )

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

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

67  {
68  include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDIdentifier.php';
69 
70  $ide = new ilMDIdentifier($this->getRBACId(), $this->getObjId(), $this->getObjType());
71  $ide->setParentId($this->getMetaId());
72  $ide->setParentType('meta_general');
73 
74  return $ide;
75  }
+ Here is the call graph for this function:

◆ addKeyword() [1/3]

& ilMDGeneral::addKeyword ( )

Definition at line 151 of file class.ilMDGeneral.php.

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

152  {
153  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMDKeyword.php';
154 
155  $key = new ilMDKeyword($this->getRBACId(), $this->getObjId(), $this->getObjType());
156  $key->setParentId($this->getMetaId());
157  $key->setParentType('meta_general');
158 
159  return $key;
160  }
$key
Definition: croninfo.php:18
+ Here is the call graph for this function:

◆ addKeyword() [2/3]

& ilMDGeneral::addKeyword ( )

Definition at line 151 of file class.ilMDGeneral.php.

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

152  {
153  include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDKeyword.php';
154 
155  $key = new ilMDKeyword($this->getRBACId(), $this->getObjId(), $this->getObjType());
156  $key->setParentId($this->getMetaId());
157  $key->setParentType('meta_general');
158 
159  return $key;
160  }
$key
Definition: croninfo.php:18
+ Here is the call graph for this function:

◆ addKeyword() [3/3]

& ilMDGeneral::addKeyword ( )

Definition at line 151 of file class.ilMDGeneral.php.

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

Referenced by ilMDKeyword\updateKeywords().

152  {
153  include_once 'Services/MetaData/classes/class.ilMDKeyword.php';
154 
155  $key = new ilMDKeyword($this->getRBACId(), $this->getObjId(), $this->getObjType());
156  $key->setParentId($this->getMetaId());
157  $key->setParentType('meta_general');
158 
159  return $key;
160  }
$key
Definition: croninfo.php:18
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addLanguage() [1/3]

& ilMDGeneral::addLanguage ( )

Definition at line 94 of file class.ilMDGeneral.php.

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

95  {
96  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMDLanguage.php';
97 
98  $lan = new ilMDLanguage($this->getRBACId(), $this->getObjId(), $this->getObjType());
99  $lan->setParentId($this->getMetaId());
100  $lan->setParentType('meta_general');
101 
102  return $lan;
103  }
+ Here is the call graph for this function:

◆ addLanguage() [2/3]

& ilMDGeneral::addLanguage ( )

Definition at line 94 of file class.ilMDGeneral.php.

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

95  {
96  include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDLanguage.php';
97 
98  $lan = new ilMDLanguage($this->getRBACId(), $this->getObjId(), $this->getObjType());
99  $lan->setParentId($this->getMetaId());
100  $lan->setParentType('meta_general');
101 
102  return $lan;
103  }
+ Here is the call graph for this function:

◆ addLanguage() [3/3]

& ilMDGeneral::addLanguage ( )

Definition at line 94 of file class.ilMDGeneral.php.

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

95  {
96  include_once 'Services/MetaData/classes/class.ilMDLanguage.php';
97 
98  $lan = new ilMDLanguage($this->getRBACId(), $this->getObjId(), $this->getObjType());
99  $lan->setParentId($this->getMetaId());
100  $lan->setParentType('meta_general');
101 
102  return $lan;
103  }
+ Here is the call graph for this function:

◆ delete() [1/3]

ilMDGeneral::delete ( )

Definition at line 263 of file class.ilMDGeneral.php.

References $id, $ilDB, $key, $query, getDescription(), getDescriptionIds(), getIdentifier(), getIdentifierIds(), getKeyword(), getKeywordIds(), getLanguage(), getLanguageIds(), and ilMDBase\getMetaId().

264  {
265  global $ilDB;
266 
267  if (!$this->getMetaId()) {
268  return false;
269  }
270  // Identifier
271  foreach ($this->getIdentifierIds() as $id) {
272  $ide = $this->getIdentifier($id);
273  $ide->delete();
274  }
275 
276  // Language
277  foreach ($this->getLanguageIds() as $id) {
278  $lan = $this->getLanguage($id);
279  $lan->delete();
280  }
281 
282  // Description
283  foreach ($this->getDescriptionIds() as $id) {
284  $des = $this->getDescription($id);
285  $des->delete();
286  }
287 
288  // Keyword
289  foreach ($this->getKeywordIds() as $id) {
290  $key = $this->getKeyword($id);
291  $key->delete();
292  }
293 
294  if ($this->getMetaId()) {
295  $query = "DELETE FROM il_meta_general " .
296  "WHERE meta_general_id = " . $ilDB->quote($this->getMetaId());
297 
298  $this->db->query($query);
299 
300  return true;
301  }
302 
303 
304  return false;
305  }
& getLanguage($a_language_id)
& getKeyword($a_keyword_id)
if(!array_key_exists('StateId', $_REQUEST)) $id
& getIdentifier($a_identifier_id)
$query
& getDescription($a_description_id)
global $ilDB
$key
Definition: croninfo.php:18
+ Here is the call graph for this function:

◆ delete() [2/3]

ilMDGeneral::delete ( )

Definition at line 269 of file class.ilMDGeneral.php.

References $DIC, $id, $ilDB, $key, $query, $res, getDescription(), getDescriptionIds(), getIdentifier(), getIdentifierIds(), getKeyword(), getKeywordIds(), getLanguage(), getLanguageIds(), and ilMDBase\getMetaId().

270  {
271  global $DIC;
272 
273  $ilDB = $DIC['ilDB'];
274 
275  if (!$this->getMetaId()) {
276  return false;
277  }
278  // Identifier
279  foreach ($this->getIdentifierIds() as $id) {
280  $ide = $this->getIdentifier($id);
281  $ide->delete();
282  }
283 
284  // Language
285  foreach ($this->getLanguageIds() as $id) {
286  $lan = $this->getLanguage($id);
287  $lan->delete();
288  }
289 
290  // Description
291  foreach ($this->getDescriptionIds() as $id) {
292  $des = $this->getDescription($id);
293  $des->delete();
294  }
295 
296  // Keyword
297  foreach ($this->getKeywordIds() as $id) {
298  $key = $this->getKeyword($id);
299  $key->delete();
300  }
301 
302  if ($this->getMetaId()) {
303  $query = "DELETE FROM il_meta_general " .
304  "WHERE meta_general_id = " . $ilDB->quote($this->getMetaId(), 'integer');
305  $res = $ilDB->manipulate($query);
306  return true;
307  }
308 
309 
310  return false;
311  }
& getLanguage($a_language_id)
& getKeyword($a_keyword_id)
global $DIC
Definition: saml.php:7
if(!array_key_exists('StateId', $_REQUEST)) $id
foreach($_POST as $key=> $value) $res
& getIdentifier($a_identifier_id)
$query
& getDescription($a_description_id)
global $ilDB
$key
Definition: croninfo.php:18
+ Here is the call graph for this function:

◆ delete() [3/3]

ilMDGeneral::delete ( )

Definition at line 270 of file class.ilMDGeneral.php.

References $DIC, $id, $ilDB, $key, $query, $res, getDescription(), getDescriptionIds(), getIdentifier(), getIdentifierIds(), getKeyword(), getKeywordIds(), getLanguage(), getLanguageIds(), and ilMDBase\getMetaId().

271  {
272  global $DIC;
273 
274  $ilDB = $DIC['ilDB'];
275 
276  if (!$this->getMetaId()) {
277  return false;
278  }
279  // Identifier
280  foreach ($this->getIdentifierIds() as $id) {
281  $ide = $this->getIdentifier($id);
282  $ide->delete();
283  }
284 
285  // Language
286  foreach ($this->getLanguageIds() as $id) {
287  $lan = $this->getLanguage($id);
288  $lan->delete();
289  }
290 
291  // Description
292  foreach ($this->getDescriptionIds() as $id) {
293  $des = $this->getDescription($id);
294  $des->delete();
295  }
296 
297  // Keyword
298  foreach ($this->getKeywordIds() as $id) {
299  $key = $this->getKeyword($id);
300  $key->delete();
301  }
302 
303  if ($this->getMetaId()) {
304  $query = "DELETE FROM il_meta_general " .
305  "WHERE meta_general_id = " . $ilDB->quote($this->getMetaId(), 'integer');
306  $res = $ilDB->manipulate($query);
307  return true;
308  }
309 
310 
311  return false;
312  }
& getLanguage($a_language_id)
& getKeyword($a_keyword_id)
global $DIC
Definition: saml.php:7
if(!array_key_exists('StateId', $_REQUEST)) $id
foreach($_POST as $key=> $value) $res
& getIdentifier($a_identifier_id)
$query
& getDescription($a_description_id)
global $ilDB
$key
Definition: croninfo.php:18
+ Here is the call graph for this function:

◆ getCoverage() [1/3]

ilMDGeneral::getCoverage ( )

Definition at line 211 of file class.ilMDGeneral.php.

Referenced by __getFields(), and toXML().

212  {
213  return $this->coverage;
214  }
+ Here is the caller graph for this function:

◆ getCoverage() [2/3]

ilMDGeneral::getCoverage ( )

Definition at line 211 of file class.ilMDGeneral.php.

212  {
213  return $this->coverage;
214  }

◆ getCoverage() [3/3]

ilMDGeneral::getCoverage ( )

Definition at line 211 of file class.ilMDGeneral.php.

212  {
213  return $this->coverage;
214  }

◆ getCoverageLanguage() [1/3]

& ilMDGeneral::getCoverageLanguage ( )

Definition at line 222 of file class.ilMDGeneral.php.

223  {
224  return is_object($this->coverage_language) ? $this->coverage_language : false;
225  }

◆ getCoverageLanguage() [2/3]

& ilMDGeneral::getCoverageLanguage ( )

Definition at line 222 of file class.ilMDGeneral.php.

223  {
224  return is_object($this->coverage_language) ? $this->coverage_language : false;
225  }

◆ getCoverageLanguage() [3/3]

& ilMDGeneral::getCoverageLanguage ( )

Definition at line 222 of file class.ilMDGeneral.php.

223  {
224  return is_object($this->coverage_language) ? $this->coverage_language : false;
225  }

◆ getCoverageLanguageCode() [1/3]

ilMDGeneral::getCoverageLanguageCode ( )

Definition at line 226 of file class.ilMDGeneral.php.

227  {
228  return is_object($this->coverage_language) ? $this->coverage_language->getLanguageCode() : false;
229  }

◆ getCoverageLanguageCode() [2/3]

ilMDGeneral::getCoverageLanguageCode ( )

Definition at line 226 of file class.ilMDGeneral.php.

Referenced by __getFields(), and toXML().

227  {
228  return is_object($this->coverage_language) ? $this->coverage_language->getLanguageCode() : false;
229  }
+ Here is the caller graph for this function:

◆ getCoverageLanguageCode() [3/3]

ilMDGeneral::getCoverageLanguageCode ( )

Definition at line 226 of file class.ilMDGeneral.php.

227  {
228  return is_object($this->coverage_language) ? $this->coverage_language->getLanguageCode() : false;
229  }

◆ getDescription() [1/3]

& ilMDGeneral::getDescription (   $a_description_id)

Definition at line 110 of file class.ilMDGeneral.php.

111  {
112  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMDDescription.php';
113 
114 
115  if (!$a_description_id) {
116  return false;
117  }
118  $des = new ilMDDescription();
119  $des->setMetaId($a_description_id);
120 
121  return $des;
122  }

◆ getDescription() [2/3]

& ilMDGeneral::getDescription (   $a_description_id)

Definition at line 110 of file class.ilMDGeneral.php.

111  {
112  include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDDescription.php';
113 
114 
115  if (!$a_description_id) {
116  return false;
117  }
118  $des = new ilMDDescription();
119  $des->setMetaId($a_description_id);
120 
121  return $des;
122  }

◆ getDescription() [3/3]

& ilMDGeneral::getDescription (   $a_description_id)

Definition at line 110 of file class.ilMDGeneral.php.

Referenced by delete(), and toXML().

111  {
112  include_once 'Services/MetaData/classes/class.ilMDDescription.php';
113 
114 
115  if (!$a_description_id) {
116  return false;
117  }
118  $des = new ilMDDescription();
119  $des->setMetaId($a_description_id);
120 
121  return $des;
122  }
+ Here is the caller graph for this function:

◆ getDescriptionIds() [1/3]

& ilMDGeneral::getDescriptionIds ( )

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

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

Referenced by delete(), and toXML().

105  {
106  include_once 'Services/MetaData/classes/class.ilMDDescription.php';
107 
108  return ilMDDescription::_getIds($this->getRBACId(), $this->getObjId(), $this->getMetaId(), 'meta_general');
109  }
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:

◆ getDescriptionIds() [2/3]

& ilMDGeneral::getDescriptionIds ( )

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

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

105  {
106  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMDDescription.php';
107 
108  return ilMDDescription::_getIds($this->getRBACId(), $this->getObjId(), $this->getMetaId(), 'meta_general');
109  }
static _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
+ Here is the call graph for this function:

◆ getDescriptionIds() [3/3]

& ilMDGeneral::getDescriptionIds ( )

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

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

105  {
106  include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDDescription.php';
107 
108  return ilMDDescription::_getIds($this->getRBACId(), $this->getObjId(), $this->getMetaId(), 'meta_general');
109  }
static _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
+ Here is the call graph for this function:

◆ getIdentifier() [1/3]

& ilMDGeneral::getIdentifier (   $a_identifier_id)

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

55  {
56  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMDIdentifier.php';
57 
58  if (!$a_identifier_id) {
59  return false;
60  }
61  $ide = new ilMDIdentifier();
62  $ide->setMetaId($a_identifier_id);
63 
64  return $ide;
65  }

◆ getIdentifier() [2/3]

& ilMDGeneral::getIdentifier (   $a_identifier_id)

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

55  {
56  include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDIdentifier.php';
57 
58  if (!$a_identifier_id) {
59  return false;
60  }
61  $ide = new ilMDIdentifier();
62  $ide->setMetaId($a_identifier_id);
63 
64  return $ide;
65  }

◆ getIdentifier() [3/3]

& ilMDGeneral::getIdentifier (   $a_identifier_id)

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

Referenced by delete(), and toXML().

55  {
56  include_once 'Services/MetaData/classes/class.ilMDIdentifier.php';
57 
58  if (!$a_identifier_id) {
59  return false;
60  }
61  $ide = new ilMDIdentifier();
62  $ide->setMetaId($a_identifier_id);
63 
64  return $ide;
65  }
+ Here is the caller graph for this function:

◆ getIdentifierIds() [1/3]

& ilMDGeneral::getIdentifierIds ( )

Definition at line 48 of file class.ilMDGeneral.php.

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

49  {
50  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMDIdentifier.php';
51 
52  return ilMDIdentifier::_getIds($this->getRBACId(), $this->getObjId(), $this->getMetaId(), 'meta_general');
53  }
static _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
+ Here is the call graph for this function:

◆ getIdentifierIds() [2/3]

& ilMDGeneral::getIdentifierIds ( )

Definition at line 48 of file class.ilMDGeneral.php.

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

49  {
50  include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDIdentifier.php';
51 
52  return ilMDIdentifier::_getIds($this->getRBACId(), $this->getObjId(), $this->getMetaId(), 'meta_general');
53  }
static _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
+ Here is the call graph for this function:

◆ getIdentifierIds() [3/3]

& ilMDGeneral::getIdentifierIds ( )

Definition at line 48 of file class.ilMDGeneral.php.

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

Referenced by delete(), and toXML().

49  {
50  include_once 'Services/MetaData/classes/class.ilMDIdentifier.php';
51 
52  return ilMDIdentifier::_getIds($this->getRBACId(), $this->getObjId(), $this->getMetaId(), 'meta_general');
53  }
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:

◆ getKeyword() [1/3]

& ilMDGeneral::getKeyword (   $a_keyword_id)

Definition at line 139 of file class.ilMDGeneral.php.

References $key.

140  {
141  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMDKeyword.php';
142 
143  if (!$a_keyword_id) {
144  return false;
145  }
146  $key = new ilMDKeyword();
147  $key->setMetaId($a_keyword_id);
148 
149  return $key;
150  }
$key
Definition: croninfo.php:18

◆ getKeyword() [2/3]

& ilMDGeneral::getKeyword (   $a_keyword_id)

Definition at line 139 of file class.ilMDGeneral.php.

References $key.

140  {
141  include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDKeyword.php';
142 
143  if (!$a_keyword_id) {
144  return false;
145  }
146  $key = new ilMDKeyword();
147  $key->setMetaId($a_keyword_id);
148 
149  return $key;
150  }
$key
Definition: croninfo.php:18

◆ getKeyword() [3/3]

& ilMDGeneral::getKeyword (   $a_keyword_id)

Definition at line 139 of file class.ilMDGeneral.php.

References $key.

Referenced by delete(), toXML(), and ilMDKeyword\updateKeywords().

140  {
141  include_once 'Services/MetaData/classes/class.ilMDKeyword.php';
142 
143  if (!$a_keyword_id) {
144  return false;
145  }
146  $key = new ilMDKeyword();
147  $key->setMetaId($a_keyword_id);
148 
149  return $key;
150  }
$key
Definition: croninfo.php:18
+ Here is the caller graph for this function:

◆ getKeywordIds() [1/3]

& ilMDGeneral::getKeywordIds ( )

Definition at line 133 of file class.ilMDGeneral.php.

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

134  {
135  include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDKeyword.php';
136 
137  return ilMDKeyword::_getIds($this->getRBACId(), $this->getObjId(), $this->getMetaId(), 'meta_general');
138  }
static _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
+ Here is the call graph for this function:

◆ getKeywordIds() [2/3]

& ilMDGeneral::getKeywordIds ( )

Definition at line 133 of file class.ilMDGeneral.php.

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

134  {
135  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMDKeyword.php';
136 
137  return ilMDKeyword::_getIds($this->getRBACId(), $this->getObjId(), $this->getMetaId(), 'meta_general');
138  }
static _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
+ Here is the call graph for this function:

◆ getKeywordIds() [3/3]

& ilMDGeneral::getKeywordIds ( )

Definition at line 133 of file class.ilMDGeneral.php.

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

Referenced by delete(), toXML(), and ilMDKeyword\updateKeywords().

134  {
135  include_once 'Services/MetaData/classes/class.ilMDKeyword.php';
136 
137  return ilMDKeyword::_getIds($this->getRBACId(), $this->getObjId(), $this->getMetaId(), 'meta_general');
138  }
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:

◆ getLanguage() [1/3]

& ilMDGeneral::getLanguage (   $a_language_id)

Definition at line 82 of file class.ilMDGeneral.php.

83  {
84  include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDLanguage.php';
85 
86  if (!$a_language_id) {
87  return false;
88  }
89  $lan = new ilMDLanguage();
90  $lan->setMetaId($a_language_id);
91 
92  return $lan;
93  }

◆ getLanguage() [2/3]

& ilMDGeneral::getLanguage (   $a_language_id)

Definition at line 82 of file class.ilMDGeneral.php.

83  {
84  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMDLanguage.php';
85 
86  if (!$a_language_id) {
87  return false;
88  }
89  $lan = new ilMDLanguage();
90  $lan->setMetaId($a_language_id);
91 
92  return $lan;
93  }

◆ getLanguage() [3/3]

& ilMDGeneral::getLanguage (   $a_language_id)

Definition at line 82 of file class.ilMDGeneral.php.

Referenced by delete(), and toXML().

83  {
84  include_once 'Services/MetaData/classes/class.ilMDLanguage.php';
85 
86  if (!$a_language_id) {
87  return false;
88  }
89  $lan = new ilMDLanguage();
90  $lan->setMetaId($a_language_id);
91 
92  return $lan;
93  }
+ Here is the caller graph for this function:

◆ getLanguageIds() [1/3]

& ilMDGeneral::getLanguageIds ( )

Definition at line 76 of file class.ilMDGeneral.php.

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

77  {
78  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMDLanguage.php';
79 
80  return ilMDLanguage::_getIds($this->getRBACId(), $this->getObjId(), $this->getMetaId(), 'meta_general');
81  }
static _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
+ Here is the call graph for this function:

◆ getLanguageIds() [2/3]

& ilMDGeneral::getLanguageIds ( )

Definition at line 76 of file class.ilMDGeneral.php.

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

Referenced by delete(), and toXML().

77  {
78  include_once 'Services/MetaData/classes/class.ilMDLanguage.php';
79 
80  return ilMDLanguage::_getIds($this->getRBACId(), $this->getObjId(), $this->getMetaId(), 'meta_general');
81  }
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:

◆ getLanguageIds() [3/3]

& ilMDGeneral::getLanguageIds ( )

Definition at line 76 of file class.ilMDGeneral.php.

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

77  {
78  include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDLanguage.php';
79 
80  return ilMDLanguage::_getIds($this->getRBACId(), $this->getObjId(), $this->getMetaId(), 'meta_general');
81  }
static _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
+ Here is the call graph for this function:

◆ getPossibleSubelements() [1/3]

ilMDGeneral::getPossibleSubelements ( )

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

37  {
38  $subs['Keyword'] = 'meta_keyword';
39  $subs['Language'] = 'meta_language';
40  $subs['Identifier'] = 'meta_identifier';
41  $subs['Description'] = 'meta_description';
42 
43  return $subs;
44  }

◆ getPossibleSubelements() [2/3]

ilMDGeneral::getPossibleSubelements ( )

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

37  {
38  $subs['Identifier'] = 'meta_identifier';
39  $subs['Language'] = 'meta_language';
40  $subs['Description'] = 'meta_description';
41  $subs['Keyword'] = 'meta_keyword';
42 
43  return $subs;
44  }

◆ getPossibleSubelements() [3/3]

ilMDGeneral::getPossibleSubelements ( )

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

37  {
38  $subs['Keyword'] = 'meta_keyword';
39  $subs['Language'] = 'meta_language';
40  $subs['Identifier'] = 'meta_identifier';
41  $subs['Description'] = 'meta_description';
42 
43  return $subs;
44  }

◆ getStructure() [1/3]

ilMDGeneral::getStructure ( )

Definition at line 180 of file class.ilMDGeneral.php.

181  {
182  return $this->structure;
183  }

◆ getStructure() [2/3]

ilMDGeneral::getStructure ( )

Definition at line 180 of file class.ilMDGeneral.php.

181  {
182  return $this->structure;
183  }

◆ getStructure() [3/3]

ilMDGeneral::getStructure ( )

Definition at line 180 of file class.ilMDGeneral.php.

Referenced by __getFields(), and toXML().

181  {
182  return $this->structure;
183  }
+ Here is the caller graph for this function:

◆ getTitle() [1/3]

ilMDGeneral::getTitle ( )

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

References $title.

189  {
190  return $this->title;
191  }

◆ getTitle() [2/3]

ilMDGeneral::getTitle ( )

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

References $title.

189  {
190  return $this->title;
191  }

◆ getTitle() [3/3]

ilMDGeneral::getTitle ( )

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

References $title.

Referenced by __getFields(), and toXML().

189  {
190  return $this->title;
191  }
+ Here is the caller graph for this function:

◆ getTitleLanguage() [1/3]

& ilMDGeneral::getTitleLanguage ( )

Definition at line 198 of file class.ilMDGeneral.php.

199  {
200  return is_object($this->title_language) ? $this->title_language : false;
201  }

◆ getTitleLanguage() [2/3]

& ilMDGeneral::getTitleLanguage ( )

Definition at line 198 of file class.ilMDGeneral.php.

199  {
200  return is_object($this->title_language) ? $this->title_language : false;
201  }

◆ getTitleLanguage() [3/3]

& ilMDGeneral::getTitleLanguage ( )

Definition at line 198 of file class.ilMDGeneral.php.

199  {
200  return is_object($this->title_language) ? $this->title_language : false;
201  }

◆ getTitleLanguageCode() [1/3]

ilMDGeneral::getTitleLanguageCode ( )

Definition at line 202 of file class.ilMDGeneral.php.

Referenced by __getFields(), and toXML().

203  {
204  return is_object($this->title_language) ? $this->title_language->getLanguageCode() : false;
205  }
+ Here is the caller graph for this function:

◆ getTitleLanguageCode() [2/3]

ilMDGeneral::getTitleLanguageCode ( )

Definition at line 202 of file class.ilMDGeneral.php.

203  {
204  return is_object($this->title_language) ? $this->title_language->getLanguageCode() : false;
205  }

◆ getTitleLanguageCode() [3/3]

ilMDGeneral::getTitleLanguageCode ( )

Definition at line 202 of file class.ilMDGeneral.php.

203  {
204  return is_object($this->title_language) ? $this->title_language->getLanguageCode() : false;
205  }

◆ read() [1/3]

ilMDGeneral::read ( )

Definition at line 320 of file class.ilMDGeneral.php.

References $ilDB, $query, $res, $row, ilDBConstants\FETCHMODE_OBJECT, ilMDBase\getMetaId(), setCoverage(), setCoverageLanguage(), ilMDBase\setObjId(), ilMDBase\setObjType(), ilMDBase\setRBACId(), setStructure(), setTitle(), setTitleLanguage(), and ilUtil\stripSlashes().

321  {
322  global $ilDB;
323 
324  include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDLanguageItem.php';
325 
326  if ($this->getMetaId()) {
327  $query = "SELECT * FROM il_meta_general " .
328  "WHERE meta_general_id = " . $ilDB->quote($this->getMetaId());
329 
330  $res = $this->db->query($query);
331  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
332  $this->setRBACId($row->rbac_id);
333  $this->setObjId($row->obj_id);
334  $this->setObjType($row->obj_type);
335  $this->setStructure(ilUtil::stripSlashes($row->general_structure));
336  $this->setTitle(ilUtil::stripSlashes($row->title));
337  $this->setTitleLanguage(new ilMDLanguageItem($row->title_language));
338  $this->setCoverage(ilUtil::stripSlashes($row->coverage));
339  $this->setCoverageLanguage(new ilMDLanguageItem($row->coverage_language));
340  }
341  }
342  return true;
343  }
setCoverageLanguage(&$lng_obj)
setStructure($a_structure)
setObjType($a_type)
setTitle($a_title)
foreach($_POST as $key=> $value) $res
setObjId($a_id)
setRBACId($a_id)
setCoverage($a_coverage)
$query
setTitleLanguage(&$lng_obj)
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
$row
global $ilDB
+ Here is the call graph for this function:

◆ read() [2/3]

ilMDGeneral::read ( )

Definition at line 326 of file class.ilMDGeneral.php.

References $DIC, $ilDB, $query, $res, $row, ilDBConstants\FETCHMODE_OBJECT, ilMDBase\getMetaId(), setCoverage(), setCoverageLanguage(), ilMDBase\setObjId(), ilMDBase\setObjType(), ilMDBase\setRBACId(), setStructure(), setTitle(), and setTitleLanguage().

327  {
328  global $DIC;
329 
330  $ilDB = $DIC['ilDB'];
331 
332  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMDLanguageItem.php';
333 
334  if ($this->getMetaId()) {
335  $query = "SELECT * FROM il_meta_general " .
336  "WHERE meta_general_id = " . $ilDB->quote($this->getMetaId(), 'integer');
337 
338  $res = $this->db->query($query);
339  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
340  $this->setRBACId($row->rbac_id);
341  $this->setObjId($row->obj_id);
342  $this->setObjType($row->obj_type);
343  $this->setStructure($row->general_structure);
344  $this->setTitle($row->title);
345  $this->setTitleLanguage(new ilMDLanguageItem($row->title_language));
346  $this->setCoverage($row->coverage);
347  $this->setCoverageLanguage(new ilMDLanguageItem($row->coverage_language));
348  }
349  }
350  return true;
351  }
setCoverageLanguage(&$lng_obj)
setStructure($a_structure)
setObjType($a_type)
global $DIC
Definition: saml.php:7
setTitle($a_title)
foreach($_POST as $key=> $value) $res
setObjId($a_id)
setRBACId($a_id)
setCoverage($a_coverage)
$query
setTitleLanguage(&$lng_obj)
$row
global $ilDB
+ Here is the call graph for this function:

◆ read() [3/3]

ilMDGeneral::read ( )

Definition at line 327 of file class.ilMDGeneral.php.

References $DIC, $ilDB, $query, $res, $row, ilDBConstants\FETCHMODE_OBJECT, ilMDBase\getMetaId(), setCoverage(), setCoverageLanguage(), ilMDBase\setObjId(), ilMDBase\setObjType(), ilMDBase\setRBACId(), setStructure(), setTitle(), and setTitleLanguage().

328  {
329  global $DIC;
330 
331  $ilDB = $DIC['ilDB'];
332 
333  include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php';
334 
335  if ($this->getMetaId()) {
336  $query = "SELECT * FROM il_meta_general " .
337  "WHERE meta_general_id = " . $ilDB->quote($this->getMetaId(), 'integer');
338 
339  $res = $this->db->query($query);
340  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
341  $this->setRBACId($row->rbac_id);
342  $this->setObjId($row->obj_id);
343  $this->setObjType($row->obj_type);
344  $this->setStructure($row->general_structure);
345  $this->setTitle($row->title);
346  $this->setTitleLanguage(new ilMDLanguageItem($row->title_language));
347  $this->setCoverage($row->coverage);
348  $this->setCoverageLanguage(new ilMDLanguageItem($row->coverage_language));
349  }
350  }
351  return true;
352  }
setCoverageLanguage(&$lng_obj)
setStructure($a_structure)
setObjType($a_type)
global $DIC
Definition: saml.php:7
setTitle($a_title)
foreach($_POST as $key=> $value) $res
setObjId($a_id)
setRBACId($a_id)
setCoverage($a_coverage)
$query
setTitleLanguage(&$lng_obj)
$row
global $ilDB
+ Here is the call graph for this function:

◆ save() [1/3]

ilMDGeneral::save ( )

Definition at line 232 of file class.ilMDGeneral.php.

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

233  {
234  global $DIC;
235 
236  $ilDB = $DIC['ilDB'];
237 
238  $fields = $this->__getFields();
239  $fields['meta_general_id'] = array('integer',$next_id = $ilDB->nextId('il_meta_general'));
240 
241  //$this->log->debug("Insert General ".print_r($fields, true));
242  //ilUtil::printBacktrace(10);
243 
244  if ($this->db->insert('il_meta_general', $fields)) {
245  $this->setMetaId($next_id);
246  return $this->getMetaId();
247  }
248  return false;
249  }
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]

ilMDGeneral::save ( )

Definition at line 232 of file class.ilMDGeneral.php.

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

233  {
234  global $DIC;
235 
236  $ilDB = $DIC['ilDB'];
237 
238  $fields = $this->__getFields();
239  $fields['meta_general_id'] = array('integer',$next_id = $ilDB->nextId('il_meta_general'));
240 
241  $this->log->debug("Insert General " . print_r($fields, true));
242  $this->log->logStack(ilLogLevel::DEBUG);
243  //ilUtil::printBacktrace(10);
244 
245  if ($this->db->insert('il_meta_general', $fields)) {
246  $this->setMetaId($next_id);
247  return $this->getMetaId();
248  }
249  return false;
250  }
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]

ilMDGeneral::save ( )

Definition at line 232 of file class.ilMDGeneral.php.

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

233  {
234  if ($this->db->autoExecute(
235  'il_meta_general',
236  $this->__getFields(),
238  )) {
239  $this->setMetaId($this->db->getLastInsertId());
240 
241  return $this->getMetaId();
242  }
243  return false;
244  }
setMetaId($a_meta_id, $a_read_data=true)
+ Here is the call graph for this function:

◆ setCoverage() [1/3]

ilMDGeneral::setCoverage (   $a_coverage)

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

Referenced by read().

208  {
209  $this->coverage = $a_coverage;
210  }
+ Here is the caller graph for this function:

◆ setCoverage() [2/3]

ilMDGeneral::setCoverage (   $a_coverage)

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

208  {
209  $this->coverage = $a_coverage;
210  }

◆ setCoverage() [3/3]

ilMDGeneral::setCoverage (   $a_coverage)

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

208  {
209  $this->coverage = $a_coverage;
210  }

◆ setCoverageLanguage() [1/3]

ilMDGeneral::setCoverageLanguage ( $lng_obj)

Definition at line 216 of file class.ilMDGeneral.php.

Referenced by read().

217  {
218  if (is_object($lng_obj)) {
219  $this->coverage_language = $lng_obj;
220  }
221  }
+ Here is the caller graph for this function:

◆ setCoverageLanguage() [2/3]

ilMDGeneral::setCoverageLanguage ( $lng_obj)

Definition at line 216 of file class.ilMDGeneral.php.

217  {
218  if (is_object($lng_obj)) {
219  $this->coverage_language = $lng_obj;
220  }
221  }

◆ setCoverageLanguage() [3/3]

ilMDGeneral::setCoverageLanguage ( $lng_obj)

Definition at line 216 of file class.ilMDGeneral.php.

217  {
218  if (is_object($lng_obj)) {
219  $this->coverage_language = &$lng_obj;
220  }
221  }

◆ setStructure() [1/3]

ilMDGeneral::setStructure (   $a_structure)

Definition at line 165 of file class.ilMDGeneral.php.

166  {
167  switch ($a_structure) {
168  case 'Atomic':
169  case 'Collection':
170  case 'Networked':
171  case 'Hierarchical':
172  case 'Linear':
173  $this->structure = $a_structure;
174  return true;
175 
176  default:
177  return false;
178  }
179  }

◆ setStructure() [2/3]

ilMDGeneral::setStructure (   $a_structure)

Definition at line 165 of file class.ilMDGeneral.php.

Referenced by read().

166  {
167  switch ($a_structure) {
168  case 'Atomic':
169  case 'Collection':
170  case 'Networked':
171  case 'Hierarchical':
172  case 'Linear':
173  $this->structure = $a_structure;
174  return true;
175 
176  default:
177  return false;
178  }
179  }
+ Here is the caller graph for this function:

◆ setStructure() [3/3]

ilMDGeneral::setStructure (   $a_structure)

Definition at line 165 of file class.ilMDGeneral.php.

166  {
167  switch ($a_structure) {
168  case 'Atomic':
169  case 'Collection':
170  case 'Networked':
171  case 'Hierarchical':
172  case 'Linear':
173  $this->structure = $a_structure;
174  return true;
175 
176  default:
177  return false;
178  }
179  }

◆ setTitle() [1/3]

ilMDGeneral::setTitle (   $a_title)

Definition at line 184 of file class.ilMDGeneral.php.

185  {
186  $this->title = $a_title;
187  }

◆ setTitle() [2/3]

ilMDGeneral::setTitle (   $a_title)

Definition at line 184 of file class.ilMDGeneral.php.

185  {
186  $this->title = $a_title;
187  }

◆ setTitle() [3/3]

ilMDGeneral::setTitle (   $a_title)

Definition at line 184 of file class.ilMDGeneral.php.

Referenced by read().

185  {
186  $this->title = $a_title;
187  }
+ Here is the caller graph for this function:

◆ setTitleLanguage() [1/3]

ilMDGeneral::setTitleLanguage ( $lng_obj)

Definition at line 192 of file class.ilMDGeneral.php.

193  {
194  if (is_object($lng_obj)) {
195  $this->title_language = $lng_obj;
196  }
197  }

◆ setTitleLanguage() [2/3]

ilMDGeneral::setTitleLanguage ( $lng_obj)

Definition at line 192 of file class.ilMDGeneral.php.

193  {
194  if (is_object($lng_obj)) {
195  $this->title_language = $lng_obj;
196  }
197  }

◆ setTitleLanguage() [3/3]

ilMDGeneral::setTitleLanguage ( $lng_obj)

Definition at line 192 of file class.ilMDGeneral.php.

Referenced by read().

193  {
194  if (is_object($lng_obj)) {
195  $this->title_language = $lng_obj;
196  }
197  }
+ Here is the caller graph for this function:

◆ toXML() [1/3]

ilMDGeneral::toXML ( $writer)

Definition at line 350 of file class.ilMDGeneral.php.

References $id, $key, getCoverage(), getCoverageLanguageCode(), getDescription(), getDescriptionIds(), getIdentifier(), getIdentifierIds(), getKeyword(), getKeywordIds(), getLanguage(), getLanguageIds(), getStructure(), getTitle(), and getTitleLanguageCode().

351  {
352  $writer->xmlStartTag('General', array('Structure' => $this->getStructure()));
353 
354  // Identifier
355  foreach ($this->getIdentifierIds() as $id) {
356  $ide = &$this->getIdentifier($id);
357  $ide->toXML($writer);
358  }
359 
360  // TItle
361  $writer->xmlElement('Title', array('Language' => $this->getTitleLanguageCode()), $this->getTitle());
362 
363  // Language
364  foreach ($this->getLanguageIds() as $id) {
365  $lan = &$this->getLanguage($id);
366  $lan->toXML($writer);
367  }
368 
369  // Description
370  foreach ($this->getDescriptionIds() as $id) {
371  $des = &$this->getDescription($id);
372  $des->toXML($writer);
373  }
374 
375  // Keyword
376  foreach ($this->getKeywordIds() as $id) {
377  $key = &$this->getKeyword($id);
378  $key->toXML($writer);
379  }
380 
381  // Copverage
382  if (strlen($this->getCoverage())) {
383  $writer->xmlElement('Coverage', array('Language' => $this->getCoverageLanguageCode()), $this->getCoverage());
384  }
385  $writer->xmlEndTag('General');
386  }
& getLanguage($a_language_id)
& getKeyword($a_keyword_id)
if(!array_key_exists('StateId', $_REQUEST)) $id
& getIdentifier($a_identifier_id)
& getDescription($a_description_id)
$key
Definition: croninfo.php:18
+ Here is the call graph for this function:

◆ toXML() [2/3]

ilMDGeneral::toXML ( $writer)

Definition at line 358 of file class.ilMDGeneral.php.

References $id, $key, $languages, getCoverage(), getCoverageLanguageCode(), getDescription(), getDescriptionIds(), ilMDBase\getExportMode(), getIdentifier(), getIdentifierIds(), getKeyword(), getKeywordIds(), getLanguage(), getLanguageIds(), ilMDBase\getObjId(), ilMDBase\getObjType(), ilMDBase\getRBACId(), getStructure(), getTitle(), and getTitleLanguageCode().

359  {
360  $writer->xmlStartTag('General', array('Structure' => $this->getStructure() ?
361  $this->getStructure() :
362  'Atomic'));
363 
364 
365  // Identifier
366  $first = true;
367  $identifiers = array();
368  $identifiers = $this->getIdentifierIds();
369  foreach ($identifiers as $id) {
370  $ide = &$this->getIdentifier($id);
371  $ide->setExportMode($this->getExportMode());
372  $ide->toXML($writer);
373  $first = false;
374  }
375  if (!count($identifiers)) {
376  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMDIdentifier.php';
377  $ide = new ilMDIdentifier(
378  $this->getRBACId(),
379  $this->getObjId(),
380  $this->getObjType()
381  ); // added type, alex, 31 Oct 2007
382  $ide->setExportMode(true);
383  $ide->toXML($writer, true);
384  }
385 
386  // Title
387  $writer->xmlElement(
388  'Title',
389  array('Language' => $this->getTitleLanguageCode() ?
390  $this->getTitleLanguageCode() :
391  'en'),
392  $this->getTitle()
393  );
394 
395  // Language
396  $languages = $this->getLanguageIds();
397  foreach ($languages as $id) {
398  $lan = &$this->getLanguage($id);
399  $lan->toXML($writer);
400  }
401  if (!count($languages)) {
402  // Default
403  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMDLanguage.php';
404  $lan = new ilMDLanguage($this->getRBACId(), $this->getObjId());
405  $lan->toXML($writer);
406  }
407 
408  // Description
409  $descriptions = $this->getDescriptionIds();
410  foreach ($descriptions as $id) {
411  $des = &$this->getDescription($id);
412  $des->toXML($writer);
413  }
414  if (!count($descriptions)) {
415  // Default
416  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMDDescription.php';
417  $des = new ilMDDescription($this->getRBACId(), $this->getObjId());
418  $des->toXML($writer);
419  }
420 
421 
422  // Keyword
423  $keywords = $this->getKeywordIds();
424  foreach ($keywords as $id) {
425  $key = &$this->getKeyword($id);
426  $key->toXML($writer);
427  }
428  if (!count($keywords)) {
429  // Default
430  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMDKeyword.php';
431  $key = new ilMDKeyword($this->getRBACId(), $this->getObjId());
432  $key->toXML($writer);
433  }
434 
435  // Copverage
436  if (strlen($this->getCoverage())) {
437  $writer->xmlElement(
438  'Coverage',
439  array('Language' => $this->getCoverageLanguageCode() ?
440  $this->getCoverageLanguageCode() :
441  'en'),
442  $this->getCoverage()
443  );
444  }
445  $writer->xmlEndTag('General');
446  }
& getLanguage($a_language_id)
& getKeyword($a_keyword_id)
if(!array_key_exists('StateId', $_REQUEST)) $id
& getIdentifier($a_identifier_id)
& getDescription($a_description_id)
$languages
Definition: cssgen2.php:34
$key
Definition: croninfo.php:18
+ Here is the call graph for this function:

◆ toXML() [3/3]

ilMDGeneral::toXML ( $writer)

Definition at line 359 of file class.ilMDGeneral.php.

References $id, $key, $languages, getCoverage(), getCoverageLanguageCode(), getDescription(), getDescriptionIds(), ilMDBase\getExportMode(), getIdentifier(), getIdentifierIds(), getKeyword(), getKeywordIds(), getLanguage(), getLanguageIds(), ilMDBase\getObjId(), ilMDBase\getObjType(), ilMDBase\getRBACId(), getStructure(), getTitle(), and getTitleLanguageCode().

360  {
361  $writer->xmlStartTag('General', array('Structure' => $this->getStructure() ?
362  $this->getStructure() :
363  'Atomic'));
364 
365 
366  // Identifier
367  $first = true;
368  $identifiers = array();
369  $identifiers = $this->getIdentifierIds();
370  foreach ($identifiers as $id) {
371  $ide = &$this->getIdentifier($id);
372  $ide->setExportMode($this->getExportMode());
373  $ide->toXML($writer);
374  $first = false;
375  }
376  if (!count($identifiers)) {
377  include_once 'Services/MetaData/classes/class.ilMDIdentifier.php';
378  $ide = new ilMDIdentifier(
379  $this->getRBACId(),
380  $this->getObjId(),
381  $this->getObjType()
382  ); // added type, alex, 31 Oct 2007
383  $ide->setExportMode(true);
384  $ide->toXML($writer, true);
385  }
386 
387  // Title
388  $writer->xmlElement(
389  'Title',
390  array('Language' => $this->getTitleLanguageCode() ?
391  $this->getTitleLanguageCode() :
392  'en'),
393  $this->getTitle()
394  );
395 
396  // Language
397  $languages = $this->getLanguageIds();
398  foreach ($languages as $id) {
399  $lan = &$this->getLanguage($id);
400  $lan->toXML($writer);
401  }
402  if (!count($languages)) {
403  // Default
404  include_once 'Services/MetaData/classes/class.ilMDLanguage.php';
405  $lan = new ilMDLanguage($this->getRBACId(), $this->getObjId());
406  $lan->toXML($writer);
407  }
408 
409  // Description
410  $descriptions = $this->getDescriptionIds();
411  foreach ($descriptions as $id) {
412  $des = &$this->getDescription($id);
413  $des->toXML($writer);
414  }
415  if (!count($descriptions)) {
416  // Default
417  include_once 'Services/MetaData/classes/class.ilMDDescription.php';
418  $des = new ilMDDescription($this->getRBACId(), $this->getObjId());
419  $des->toXML($writer);
420  }
421 
422 
423  // Keyword
424  $keywords = $this->getKeywordIds();
425  foreach ($keywords as $id) {
426  $key = &$this->getKeyword($id);
427  $key->toXML($writer);
428  }
429  if (!count($keywords)) {
430  // Default
431  include_once 'Services/MetaData/classes/class.ilMDKeyword.php';
432  $key = new ilMDKeyword($this->getRBACId(), $this->getObjId());
433  $key->toXML($writer);
434  }
435 
436  // Copverage
437  if (strlen($this->getCoverage())) {
438  $writer->xmlElement(
439  'Coverage',
440  array('Language' => $this->getCoverageLanguageCode() ?
441  $this->getCoverageLanguageCode() :
442  'en'),
443  $this->getCoverage()
444  );
445  }
446  $writer->xmlEndTag('General');
447  }
& getLanguage($a_language_id)
& getKeyword($a_keyword_id)
if(!array_key_exists('StateId', $_REQUEST)) $id
& getIdentifier($a_identifier_id)
& getDescription($a_description_id)
$languages
Definition: cssgen2.php:34
$key
Definition: croninfo.php:18
+ Here is the call graph for this function:

◆ update() [1/3]

ilMDGeneral::update ( )

Definition at line 246 of file class.ilMDGeneral.php.

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

247  {
248  global $ilDB;
249 
250  if ($this->getMetaId()) {
251  if ($this->db->autoExecute(
252  'il_meta_general',
253  $this->__getFields(),
255  "meta_general_id = " . $ilDB->quote($this->getMetaId())
256  )) {
257  return true;
258  }
259  }
260  return false;
261  }
global $ilDB
+ Here is the call graph for this function:

◆ update() [2/3]

ilMDGeneral::update ( )

Definition at line 251 of file class.ilMDGeneral.php.

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

252  {
253  global $DIC;
254 
255  $ilDB = $DIC['ilDB'];
256 
257  if ($this->getMetaId()) {
258  if ($this->db->update(
259  'il_meta_general',
260  $this->__getFields(),
261  array("meta_general_id" => array('integer',$this->getMetaId()))
262  )) {
263  return true;
264  }
265  }
266  return false;
267  }
global $DIC
Definition: saml.php:7
global $ilDB
+ Here is the call graph for this function:

◆ update() [3/3]

ilMDGeneral::update ( )

Definition at line 252 of file class.ilMDGeneral.php.

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

253  {
254  global $DIC;
255 
256  $ilDB = $DIC['ilDB'];
257 
258  if ($this->getMetaId()) {
259  if ($this->db->update(
260  'il_meta_general',
261  $this->__getFields(),
262  array("meta_general_id" => array('integer',$this->getMetaId()))
263  )) {
264  return true;
265  }
266  }
267  return false;
268  }
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: