19 declare(strict_types=1);
41 $subs[
'Identifier'] =
'meta_identifier';
42 $subs[
'Contribute'] =
'meta_contribute';
59 if (!$a_identifier_id) {
63 $ide->setMetaId($a_identifier_id);
72 $ide->setParentType(
'meta_meta_data');
87 if (!$a_contribute_id) {
91 $con->setMetaId($a_contribute_id);
100 $con->setParentType(
'meta_meta_data');
109 $this->meta_data_scheme = $a_val;
130 return is_object($this->
language) ? $this->
language->getLanguageCode() :
'';
136 $fields[
'meta_meta_data_id'] = array(
'integer', $next_id = $this->db->nextId(
'il_meta_meta_data'));
138 if ($this->db->insert(
'il_meta_meta_data', $fields)) {
154 return (
bool) $this->db->update(
157 array(
"meta_meta_data_id" => array(
'integer', $this->
getMetaId()))
161 public function delete():
bool 164 $query =
"DELETE FROM il_meta_meta_data " .
165 "WHERE meta_meta_data_id = " . $this->db->quote($this->
getMetaId(),
'integer');
166 $res = $this->db->manipulate($query);
191 'rbac_id' => array(
'integer', $this->
getRBACId()),
192 'obj_id' => array(
'integer', $this->
getObjId()),
193 'obj_type' => array(
'text', $this->
getObjType()),
202 $query =
"SELECT * FROM il_meta_meta_data " .
203 "WHERE meta_meta_data_id = " . $this->db->quote($this->
getMetaId(),
'integer');
205 $res = $this->db->query($query);
208 $this->
setObjId((
int) $row->obj_id);
234 foreach ($identifiers as
$id) {
236 $ide->toXML($writer);
238 if (!count($identifiers)) {
240 $ide->toXML($writer);
245 foreach ($contributes as $id) {
247 $con->toXML($writer);
249 if (!count($contributes)) {
251 $con->toXML($writer);
258 public static function _getId(
int $a_rbac_id,
int $a_obj_id):
int 262 $ilDB = $DIC->database();
264 $query =
"SELECT meta_meta_data_id FROM il_meta_meta_data " .
265 "WHERE rbac_id = " .
$ilDB->quote($a_rbac_id,
'integer') .
" " .
266 "AND obj_id = " .
$ilDB->quote($a_obj_id,
'integer');
270 return (
int) $row->meta_meta_data_id;
287 'il_meta_meta_schema',
289 'meta_meta_schema_id' => [
'integer', $next_id = $this->db->nextId(
'il_meta_meta_schema')],
290 'rbac_id' => [
'integer', $this->
getRBACId()],
291 'obj_id' => [
'integer', $this->
getObjId()],
293 'parent_type' => [
'text',
'meta_general'],
294 'parent_id' => [
'integer', $this->
getMetaId()],
295 'meta_data_schema' => [
'text',
'LOMv1.0'],
298 $this->schema_id = $next_id;
307 $query =
"DELETE FROM il_meta_meta_schema WHERE parent_type = 'meta_meta_data' 308 AND parent_id = " . $this->db->quote($this->
getMetaId(),
'integer');
309 $res = $this->db->manipulate($query);
317 $query =
"SELECT * FROM il_meta_meta_schema WHERE meta_meta_schema_id = " .
318 $this->db->quote($this->
getMetaId(),
'integer');
320 $res = $this->db->query($query);
321 if ($row = $this->db->fetchAssoc(
$res)) {
339 $query =
"SELECT meta_meta_schema_id FROM il_meta_meta_schema WHERE parent_type = 'meta_meta_data' 340 AND parent_id = " . $this->db->quote($parent_id,
'integer') .
341 " ORDER BY meta_meta_schema_id";
343 $res = $this->db->query($query);
344 if ($row = $this->db->fetchAssoc(
$res)) {
345 $this->schema_id = (
int) $row[
'meta_meta_schema_id'];
352 public function setMetaId(
int $a_meta_id,
bool $a_read_data =
true): void
355 parent::setMetaId($a_meta_id, $a_read_data);
static _getIds(int $a_rbac_id, int $a_obj_id, int $a_parent_id, string $a_parent_type)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
xmlEndTag(string $tag)
Writes an endtag.
static _getIds(int $a_rbac_id, int $a_obj_id, int $a_parent_id, string $a_parent_type)
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
xmlStartTag(string $tag, ?array $attrs=null, bool $empty=false, bool $encode=true, bool $escape=true)
Writes a starttag.
setObjType(string $a_type)