31 include_once
'class.ilMDBase.php';
38 include_once
'Services/Migration/DBUpdate_426/classes/class.ilMDIdentifier_.php';
44 include_once
'Services/Migration/DBUpdate_426/classes/class.ilMDIdentifier_.php';
46 if (!$a_identifier__id) {
50 $ide->setMetaId($a_identifier__id);
56 include_once
'Services/Migration/DBUpdate_426/classes/class.ilMDIdentifier_.php';
60 $ide->setParentType(
'meta_relation');
67 include_once
'Services/Migration/DBUpdate_426/classes/class.ilMDDescription.php';
73 include_once
'Services/Migration/DBUpdate_426/classes/class.ilMDDescription.php';
75 if (!$a_description_id) {
79 $des->setMetaId($a_description_id);
85 include_once
'Services/Migration/DBUpdate_426/classes/class.ilMDDescription.php';
89 $des->setParentType(
'meta_relation');
104 case 'IsReferencedBy':
109 $this->kind = $a_kind;
124 if ($this->db->autoExecute(
126 $this->__getFields(),
129 $this->
setMetaId($this->db->getLastInsertId());
141 if ($this->db->autoExecute(
143 $this->__getFields(),
145 "meta_relation_id = " . $ilDB->quote($this->
getMetaId())
153 public function delete()
158 $query =
"DELETE FROM il_meta_relation " .
159 "WHERE meta_relation_id = " . $ilDB->quote($this->
getMetaId());
191 $query =
"SELECT * FROM il_meta_relation " .
192 "WHERE meta_relation_id = " . $ilDB->quote($this->
getMetaId());
212 $writer->xmlStartTag(
'Relation',
array(
'Kind' => $this->
getKind()));
213 $writer->xmlStartTag(
'Resource');
218 $ide->toXML($writer);
223 $des->toXML($writer);
225 $writer->xmlEndTag(
'Resource');
226 $writer->xmlEndTag(
'Relation');
232 public function _getIds($a_rbac_id, $a_obj_id)
236 $query =
"SELECT meta_relation_id FROM il_meta_relation " .
237 "WHERE rbac_id = " . $ilDB->quote($a_rbac_id) .
" " .
238 "AND obj_id = " . $ilDB->quote($a_obj_id);
242 $ids[] =
$row->meta_relation_id;
244 return $ids ? $ids :
array();
& getIdentifier_($a_identifier__id)
if(!array_key_exists('StateId', $_REQUEST)) $id
const MDB2_AUTOQUERY_UPDATE
setMetaId($a_meta_id, $a_read_data=true)
foreach($_POST as $key=> $value) $res
_getIds($a_rbac_id, $a_obj_id)
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
Create styles array
The data for the language used.
static prepareDBString($a_str)
prepare a string for db writing (insert/update)
const MDB2_AUTOQUERY_INSERT
static _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
& getDescription($a_description_id)