31 include_once
'class.ilMDBase.php';
38 include_once
'Services/MetaData/classes/class.ilMDIdentifier_.php';
44 include_once
'Services/MetaData/classes/class.ilMDIdentifier_.php';
46 if (!$a_identifier__id) {
50 $ide->setMetaId($a_identifier__id);
56 include_once
'Services/MetaData/classes/class.ilMDIdentifier_.php';
60 $ide->setParentType(
'meta_relation');
67 include_once
'Services/MetaData/classes/class.ilMDDescription.php';
73 include_once
'Services/MetaData/classes/class.ilMDDescription.php';
75 if (!$a_description_id) {
79 $des->setMetaId($a_description_id);
85 include_once
'Services/MetaData/classes/class.ilMDDescription.php';
89 $des->setParentType(
'meta_relation');
104 case 'IsReferencedBy':
109 $this->kind = $a_kind;
127 $fields[
'meta_relation_id'] =
array(
'integer',$next_id = $ilDB->nextId(
'il_meta_relation'));
129 if ($this->db->insert(
'il_meta_relation', $fields)) {
141 if ($this->db->update(
143 $this->__getFields(),
152 public function delete()
157 $query =
"DELETE FROM il_meta_relation " .
158 "WHERE meta_relation_id = " . $ilDB->quote($this->
getMetaId(),
'integer');
189 $query =
"SELECT * FROM il_meta_relation " .
190 "WHERE meta_relation_id = " . $ilDB->quote($this->
getMetaId(),
'integer');
210 $writer->xmlStartTag(
'Relation',
array(
'Kind' => $this->
getKind()
213 $writer->xmlStartTag(
'Resource');
217 foreach ($ides as
$id) {
219 $ide->toXML($writer);
222 include_once
'Services/MetaData/classes/class.ilMDIdentifier_.php';
224 $ide->toXML($writer);
229 foreach ($dess as $id) {
231 $des->toXML($writer);
234 include_once
'Services/MetaData/classes/class.ilMDDescription.php';
236 $des->toXML($writer);
239 $writer->xmlEndTag(
'Resource');
240 $writer->xmlEndTag(
'Relation');
246 public static function _getIds($a_rbac_id, $a_obj_id)
250 $query =
"SELECT meta_relation_id FROM il_meta_relation " .
251 "WHERE rbac_id = " . $ilDB->quote($a_rbac_id,
'integer') .
" " .
252 "AND obj_id = " . $ilDB->quote($a_obj_id,
'integer');
256 $ids[] =
$row->meta_relation_id;
258 return $ids ? $ids :
array();
static _getIds($a_rbac_id, $a_obj_id)
& getIdentifier_($a_identifier__id)
if(!array_key_exists('StateId', $_REQUEST)) $id
setMetaId($a_meta_id, $a_read_data=true)
foreach($_POST as $key=> $value) $res
Create styles array
The data for the language used.
static _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
& getDescription($a_description_id)