ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilMDMetaMetadata Class Reference
+ Inheritance diagram for ilMDMetaMetadata:
+ Collaboration diagram for ilMDMetaMetadata:

Public Member Functions

 getPossibleSubelements ()
 
getIdentifierIds ()
 
getIdentifier ($a_identifier_id)
 
addIdentifier ()
 
getContributeIds ()
 
getContribute ($a_contribute_id)
 
addContribute ()
 
 setMetaDataScheme ($a_val)
 
 getMetaDataScheme ()
 
 setLanguage (&$lng_obj)
 
getLanguage ()
 
 getLanguageCode ()
 
 save ()
 
 update ()
 
 delete ()
 
 __getFields ()
 
 read ()
 
 toXML (&$writer)
 
getIdentifierIds ()
 
getIdentifier ($a_identifier_id)
 
addIdentifier ()
 
getContributeIds ()
 
getContribute ($a_contribute_id)
 
addContribute ()
 
 setMetaDataScheme ($a_val)
 
 getMetaDataScheme ()
 
 setLanguage (&$lng_obj)
 
getLanguage ()
 
 getLanguageCode ()
 
 save ()
 
 update ()
 
 delete ()
 
 __getFields ()
 
 read ()
 
 toXML (&$writer)
 
 _getId ($a_rbac_id, $a_obj_id)
 
- 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)
 

Static Public Member Functions

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 33 of file class.ilMDMetaMetadata.php.

Member Function Documentation

◆ __getFields() [1/2]

ilMDMetaMetadata::__getFields ( )

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

188 {
189 return array('rbac_id' => array('integer',$this->getRBACId()),
190 'obj_id' => array('integer',$this->getObjId()),
191 'obj_type' => array('text',$this->getObjType()),
192 'meta_data_scheme' => array('text',$this->getMetaDataScheme()),
193 'language' => array('text',$this->getLanguageCode()));
194 }

References getLanguageCode(), getMetaDataScheme(), ilMDBase\getObjId(), ilMDBase\getObjType(), and ilMDBase\getRBACId().

Referenced by save().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __getFields() [2/2]

ilMDMetaMetadata::__getFields ( )

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

181 {
182 return array('rbac_id' => $this->getRBACId(),
183 'obj_id' => $this->getObjId(),
184 'obj_type' => ilUtil::prepareDBString($this->getObjType()),
185 'meta_data_scheme' => ilUtil::prepareDBString($this->getMetaDataScheme()),
186 'language' => ilUtil::prepareDBString($this->getLanguageCode()));
187 }
static prepareDBString($a_str)
prepare a string for db writing (insert/update)

References getLanguageCode(), getMetaDataScheme(), ilMDBase\getObjId(), ilMDBase\getObjType(), ilMDBase\getRBACId(), and ilUtil\prepareDBString().

+ Here is the call graph for this function:

◆ _getId() [1/2]

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

Definition at line 264 of file class.ilMDMetaMetadata.php.

265 {
266 global $ilDB;
267
268 $query = "SELECT meta_meta_data_id FROM il_meta_meta_data " .
269 "WHERE rbac_id = " . $ilDB->quote($a_rbac_id, 'integer') . " " .
270 "AND obj_id = " . $ilDB->quote($a_obj_id, 'integer');
271
272 $res = $ilDB->query($query);
273 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
274 return $row->meta_meta_data_id;
275 }
276 return false;
277 }
$query
foreach($_POST as $key=> $value) $res
global $ilDB

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

Referenced by ilMD\getMetaMetadata().

+ Here is the caller graph for this function:

◆ _getId() [2/2]

ilMDMetaMetadata::_getId (   $a_rbac_id,
  $a_obj_id 
)

Definition at line 245 of file class.ilMDMetaMetadata.php.

246 {
247 global $ilDB;
248
249 $query = "SELECT meta_meta_data_id FROM il_meta_meta_data " .
250 "WHERE rbac_id = " . $ilDB->quote($a_rbac_id) . " " .
251 "AND obj_id = " . $ilDB->quote($a_obj_id);
252
253 $res = $ilDB->query($query);
254 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
255 return $row->meta_meta_data_id;
256 }
257 return false;
258 }

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

◆ addContribute() [1/2]

& ilMDMetaMetadata::addContribute ( )

Definition at line 92 of file class.ilMDMetaMetadata.php.

93 {
94 include_once 'Services/MetaData/classes/class.ilMDContribute.php';
95
96 $con = new ilMDContribute($this->getRBACId(), $this->getObjId(), $this->getObjType());
97 $con->setParentId($this->getMetaId());
98 $con->setParentType('meta_meta_data');
99
100 return $con;
101 }

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

+ Here is the call graph for this function:

◆ addContribute() [2/2]

& ilMDMetaMetadata::addContribute ( )

Definition at line 83 of file class.ilMDMetaMetadata.php.

84 {
85 include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDContribute.php';
86
87 $con = new ilMDContribute($this->getRBACId(), $this->getObjId(), $this->getObjType());
88 $con->setParentId($this->getMetaId());
89 $con->setParentType('meta_meta_data');
90
91 return $con;
92 }

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

+ Here is the call graph for this function:

◆ addIdentifier() [1/2]

& ilMDMetaMetadata::addIdentifier ( )

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

64 {
65 include_once 'Services/MetaData/classes/class.ilMDIdentifier.php';
66
67 $ide = new ilMDIdentifier($this->getRBACId(), $this->getObjId(), $this->getObjType());
68 $ide->setParentId($this->getMetaId());
69 $ide->setParentType('meta_meta_data');
70
71 return $ide;
72 }

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

+ Here is the call graph for this function:

◆ addIdentifier() [2/2]

& ilMDMetaMetadata::addIdentifier ( )

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

55 {
56 include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDIdentifier.php';
57
58 $ide = new ilMDIdentifier($this->getRBACId(), $this->getObjId(), $this->getObjType());
59 $ide->setParentId($this->getMetaId());
60 $ide->setParentType('meta_meta_data');
61
62 return $ide;
63 }

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

+ Here is the call graph for this function:

◆ delete() [1/2]

ilMDMetaMetadata::delete ( )

Reimplemented from ilMDBase.

Definition at line 161 of file class.ilMDMetaMetadata.php.

162 {
163 global $ilDB;
164
165 if ($this->getMetaId()) {
166 $query = "DELETE FROM il_meta_meta_data " .
167 "WHERE meta_meta_data_id = " . $ilDB->quote($this->getMetaId(), 'integer');
168 $res = $ilDB->manipulate($query);
169
170
171 foreach ($this->getIdentifierIds() as $id) {
172 $ide = $this->getIdentifier($id);
173 $ide->delete();
174 }
175
176 foreach ($this->getContributeIds() as $id) {
177 $con = $this->getContribute($id);
178 $con->delete();
179 }
180 return true;
181 }
182
183 return false;
184 }
& getContribute($a_contribute_id)
& getIdentifier($a_identifier_id)
if(!array_key_exists('StateId', $_REQUEST)) $id

References $id, $ilDB, $query, $res, getContribute(), getContributeIds(), getIdentifier(), getIdentifierIds(), and ilMDBase\getMetaId().

+ Here is the call graph for this function:

◆ delete() [2/2]

ilMDMetaMetadata::delete ( )

Reimplemented from ilMDBase.

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

154 {
155 global $ilDB;
156
157 if ($this->getMetaId()) {
158 $query = "DELETE FROM il_meta_meta_data " .
159 "WHERE meta_meta_data_id = " . $ilDB->quote($this->getMetaId());
160
161 $this->db->query($query);
162
163
164 foreach ($this->getIdentifierIds() as $id) {
165 $ide = $this->getIdentifier($id);
166 $ide->delete();
167 }
168
169 foreach ($this->getContributeIds() as $id) {
170 $con = $this->getContribute($id);
171 $con->delete();
172 }
173 return true;
174 }
175
176 return false;
177 }

References $id, $ilDB, $query, getContribute(), getContributeIds(), getIdentifier(), getIdentifierIds(), and ilMDBase\getMetaId().

+ Here is the call graph for this function:

◆ getContribute() [1/2]

& ilMDMetaMetadata::getContribute (   $a_contribute_id)

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

81 {
82 include_once 'Services/MetaData/classes/class.ilMDContribute.php';
83
84 if (!$a_contribute_id) {
85 return false;
86 }
87 $con = new ilMDContribute();
88 $con->setMetaId($a_contribute_id);
89
90 return $con;
91 }

Referenced by delete(), and toXML().

+ Here is the caller graph for this function:

◆ getContribute() [2/2]

& ilMDMetaMetadata::getContribute (   $a_contribute_id)

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

72 {
73 include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDContribute.php';
74
75 if (!$a_contribute_id) {
76 return false;
77 }
78 $con = new ilMDContribute();
79 $con->setMetaId($a_contribute_id);
80
81 return $con;
82 }

◆ getContributeIds() [1/2]

& ilMDMetaMetadata::getContributeIds ( )

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

75 {
76 include_once 'Services/MetaData/classes/class.ilMDContribute.php';
77
78 return ilMDContribute::_getIds($this->getRBACId(), $this->getObjId(), $this->getMetaId(), 'meta_meta_data');
79 }
static _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)

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

Referenced by delete(), and toXML().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getContributeIds() [2/2]

& ilMDMetaMetadata::getContributeIds ( )

Definition at line 65 of file class.ilMDMetaMetadata.php.

66 {
67 include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDContribute.php';
68
69 return ilMDContribute::_getIds($this->getRBACId(), $this->getObjId(), $this->getMetaId(), 'meta_meta_data');
70 }

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

+ Here is the call graph for this function:

◆ getIdentifier() [1/2]

& ilMDMetaMetadata::getIdentifier (   $a_identifier_id)

Definition at line 51 of file class.ilMDMetaMetadata.php.

52 {
53 include_once 'Services/MetaData/classes/class.ilMDIdentifier.php';
54
55 if (!$a_identifier_id) {
56 return false;
57 }
58 $ide = new ilMDIdentifier();
59 $ide->setMetaId($a_identifier_id);
60
61 return $ide;
62 }

Referenced by delete(), and toXML().

+ Here is the caller graph for this function:

◆ getIdentifier() [2/2]

& ilMDMetaMetadata::getIdentifier (   $a_identifier_id)

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

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

◆ getIdentifierIds() [1/2]

& ilMDMetaMetadata::getIdentifierIds ( )

Definition at line 45 of file class.ilMDMetaMetadata.php.

46 {
47 include_once 'Services/MetaData/classes/class.ilMDIdentifier.php';
48
49 return ilMDIdentifier::_getIds($this->getRBACId(), $this->getObjId(), $this->getMetaId(), 'meta_meta_data');
50 }
static _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)

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

Referenced by delete(), and toXML().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getIdentifierIds() [2/2]

& ilMDMetaMetadata::getIdentifierIds ( )

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

37 {
38 include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDIdentifier.php';
39
40 return ilMDIdentifier::_getIds($this->getRBACId(), $this->getObjId(), $this->getMetaId(), 'meta_meta_data');
41 }

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

+ Here is the call graph for this function:

◆ getLanguage() [1/2]

& ilMDMetaMetadata::getLanguage ( )

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

122 {
123 return is_object($this->language) ? $this->language : false;
124 }

◆ getLanguage() [2/2]

& ilMDMetaMetadata::getLanguage ( )

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

113 {
114 return is_object($this->language) ? $this->language : false;
115 }

◆ getLanguageCode() [1/2]

ilMDMetaMetadata::getLanguageCode ( )

Definition at line 125 of file class.ilMDMetaMetadata.php.

126 {
127 return is_object($this->language) ? $this->language->getLanguageCode() : false;
128 }

Referenced by __getFields(), and toXML().

+ Here is the caller graph for this function:

◆ getLanguageCode() [2/2]

ilMDMetaMetadata::getLanguageCode ( )

Definition at line 116 of file class.ilMDMetaMetadata.php.

117 {
118 return is_object($this->language) ? $this->language->getLanguageCode() : false;
119 }

◆ getMetaDataScheme() [1/2]

ilMDMetaMetadata::getMetaDataScheme ( )

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

111 {
112 // Fixed attribute
113 return 'LOM v 1.0';
114 }

Referenced by __getFields(), and toXML().

+ Here is the caller graph for this function:

◆ getMetaDataScheme() [2/2]

ilMDMetaMetadata::getMetaDataScheme ( )

Definition at line 101 of file class.ilMDMetaMetadata.php.

102 {
103 // Fixed attribute
104 return 'LOM v 1.0';
105 }

◆ getPossibleSubelements()

ilMDMetaMetadata::getPossibleSubelements ( )

Definition at line 35 of file class.ilMDMetaMetadata.php.

36 {
37 $subs['Identifier'] = 'meta_identifier';
38 $subs['Contribute'] = 'meta_contribute';
39
40 return $subs;
41 }

◆ read() [1/2]

ilMDMetaMetadata::read ( )

Definition at line 196 of file class.ilMDMetaMetadata.php.

197 {
198 global $ilDB;
199
200 include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php';
201
202
203 if ($this->getMetaId()) {
204 $query = "SELECT * FROM il_meta_meta_data " .
205 "WHERE meta_meta_data_id = " . $ilDB->quote($this->getMetaId(), 'integer');
206
207
208 $res = $this->db->query($query);
209 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
210 $this->setRBACId($row->rbac_id);
211 $this->setObjId($row->obj_id);
212 $this->setObjType($row->obj_type);
213 $this->setMetaDataScheme($row->meta_data_scheme);
214 $this->setLanguage(new ilMDLanguageItem($row->language));
215 }
216 return true;
217 }
218 return false;
219 }
setObjId($a_id)
setObjType($a_type)
setRBACId($a_id)

References $ilDB, $query, $res, $row, ilDBConstants\FETCHMODE_OBJECT, ilMDBase\getMetaId(), setLanguage(), setMetaDataScheme(), ilMDBase\setObjId(), ilMDBase\setObjType(), and ilMDBase\setRBACId().

+ Here is the call graph for this function:

◆ read() [2/2]

ilMDMetaMetadata::read ( )

Definition at line 189 of file class.ilMDMetaMetadata.php.

190 {
191 global $ilDB;
192
193 include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDLanguageItem.php';
194
195
196 if ($this->getMetaId()) {
197 $query = "SELECT * FROM il_meta_meta_data " .
198 "WHERE meta_meta_data_id = " . $ilDB->quote($this->getMetaId());
199
200
201 $res = $this->db->query($query);
202 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
203 $this->setRBACId($row->rbac_id);
204 $this->setObjId($row->obj_id);
205 $this->setObjType($row->obj_type);
206 $this->setMetaDataScheme(ilUtil::stripSlashes($row->meta_data_scheme));
207 $this->setLanguage(new ilMDLanguageItem($row->language));
208 }
209 return true;
210 }
211 return false;
212 }
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled

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

+ Here is the call graph for this function:

◆ save() [1/2]

ilMDMetaMetadata::save ( )

Reimplemented from ilMDBase.

Definition at line 131 of file class.ilMDMetaMetadata.php.

132 {
133 global $ilDB;
134
135 $fields = $this->__getFields();
136 $fields['meta_meta_data_id'] = array('integer',$next_id = $ilDB->nextId('il_meta_meta_data'));
137
138 if ($this->db->insert('il_meta_meta_data', $fields)) {
139 $this->setMetaId($next_id);
140 return $this->getMetaId();
141 }
142 return false;
143 }
setMetaId($a_meta_id, $a_read_data=true)

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

+ Here is the call graph for this function:

◆ save() [2/2]

ilMDMetaMetadata::save ( )

Reimplemented from ilMDBase.

Definition at line 122 of file class.ilMDMetaMetadata.php.

123 {
124 if ($this->db->autoExecute(
125 'il_meta_meta_data',
126 $this->__getFields(),
128 )) {
129 $this->setMetaId($this->db->getLastInsertId());
130
131 return $this->getMetaId();
132 }
133 return false;
134 }

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

+ Here is the call graph for this function:

◆ setLanguage() [1/2]

ilMDMetaMetadata::setLanguage ( $lng_obj)

Definition at line 115 of file class.ilMDMetaMetadata.php.

116 {
117 if (is_object($lng_obj)) {
118 $this->language = $lng_obj;
119 }
120 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setLanguage() [2/2]

ilMDMetaMetadata::setLanguage ( $lng_obj)

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

107 {
108 if (is_object($lng_obj)) {
109 $this->language = $lng_obj;
110 }
111 }

◆ setMetaDataScheme() [1/2]

ilMDMetaMetadata::setMetaDataScheme (   $a_val)

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

107 {
108 $this->meta_data_scheme = $a_val;
109 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setMetaDataScheme() [2/2]

ilMDMetaMetadata::setMetaDataScheme (   $a_val)

Definition at line 97 of file class.ilMDMetaMetadata.php.

98 {
99 $this->meta_data_scheme = $a_val;
100 }

◆ toXML() [1/2]

ilMDMetaMetadata::toXML ( $writer)

Reimplemented from ilMDBase.

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

227 {
228 if ($this->getMetaDataScheme()) {
229 $attr['MetadataScheme'] = $this->getMetaDataScheme();
230 }
231 if ($this->getLanguageCode()) {
232 $attr['Language'] = $this->getLanguageCode();
233 }
234 $writer->xmlStartTag('Meta-Metadata', $attr ? $attr : null);
235
236 // ELEMENT IDENTIFIER
237 $identifiers = $this->getIdentifierIds();
238 foreach ($identifiers as $id) {
239 $ide =&$this->getIdentifier($id);
240 $ide->toXML($writer);
241 }
242 if (!count($identifiers)) {
243 include_once 'Services/Metadata/classes/class.ilMDIdentifier.php';
244 $ide = new ilMDIdentifier($this->getRBACId(), $this->getObjId());
245 $ide->toXML($writer);
246 }
247
248 // ELEMETN Contribute
249 $contributes = $this->getContributeIds();
250 foreach ($contributes as $id) {
251 $con =&$this->getContribute($id);
252 $con->toXML($writer);
253 }
254 if (!count($contributes)) {
255 include_once 'Services/MetaData/classes/class.ilMDContribute.php';
256 $con = new ilMDContribute($this->getRBACId(), $this->getObjId());
257 $con->toXML($writer);
258 }
259
260 $writer->xmlEndTag('Meta-Metadata');
261 }

References $id, getContribute(), getContributeIds(), getIdentifier(), getIdentifierIds(), getLanguageCode(), getMetaDataScheme(), ilMDBase\getObjId(), and ilMDBase\getRBACId().

+ Here is the call graph for this function:

◆ toXML() [2/2]

ilMDMetaMetadata::toXML ( $writer)

Reimplemented from ilMDBase.

Definition at line 219 of file class.ilMDMetaMetadata.php.

220 {
221 if ($this->getMigration/DBUpdate_426Scheme()) {
222 $attr['Metadata-Scheme'] = $this->getMigration/DBUpdate_426Scheme();
223 }
224 if ($this->getLanguageCode()) {
225 $attr['Language'] = $this->getLanguageCode();
226 }
227 $writer->xmlStartTag('Meta-Metadata', $attr ? $attr : null);
228
229 // ELEMENT IDENTIFIER
230 foreach ($this->getIdentifierIds() as $id) {
231 $ide =&$this->getIdentifier($id);
232 $ide->toXML($writer);
233 }
234
235 // ELEMETN Contribute
236 foreach ($this->getContributeIds() as $id) {
237 $con =&$this->getContribute($id);
238 $con->toXML($writer);
239 }
240
241 $writer->xmlEndTag('Meta-Metadata');
242 }

References $id, getContribute(), getContributeIds(), getIdentifier(), getIdentifierIds(), and getLanguageCode().

+ Here is the call graph for this function:

◆ update() [1/2]

ilMDMetaMetadata::update ( )

Reimplemented from ilMDBase.

Definition at line 145 of file class.ilMDMetaMetadata.php.

146 {
147 global $ilDB;
148
149 if ($this->getMetaId()) {
150 if ($this->db->update(
151 'il_meta_meta_data',
152 $this->__getFields(),
153 array("meta_meta_data_id" => array('integer',$this->getMetaId()))
154 )) {
155 return true;
156 }
157 }
158 return false;
159 }

References $ilDB, and ilMDBase\getMetaId().

+ Here is the call graph for this function:

◆ update() [2/2]

ilMDMetaMetadata::update ( )

Reimplemented from ilMDBase.

Definition at line 136 of file class.ilMDMetaMetadata.php.

137 {
138 global $ilDB;
139
140 if ($this->getMetaId()) {
141 if ($this->db->autoExecute(
142 'il_meta_meta_data',
143 $this->__getFields(),
145 "meta_meta_data_id = " . $ilDB->quote($this->getMetaId())
146 )) {
147 return true;
148 }
149 }
150 return false;
151 }

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

+ Here is the call graph for this function:

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