19 declare(strict_types=1);
42 $subs[
'Identifier'] =
'meta_identifier';
43 $subs[
'Contribute'] =
'meta_contribute';
60 if (!$a_identifier_id) {
64 $ide->setMetaId($a_identifier_id);
73 $ide->setParentType(
'meta_meta_data');
88 if (!$a_contribute_id) {
92 $con->setMetaId($a_contribute_id);
101 $con->setParentType(
'meta_meta_data');
110 $this->meta_data_scheme = $a_val;
131 return is_object($this->
language) ? $this->
language->getLanguageCode() :
'';
137 $fields[
'meta_meta_data_id'] = array(
'integer', $next_id = $this->db->nextId(
'il_meta_meta_data'));
139 if ($this->db->insert(
'il_meta_meta_data', $fields)) {
155 return (
bool) $this->db->update(
158 array(
"meta_meta_data_id" => array(
'integer', $this->
getMetaId()))
162 public function delete():
bool 165 $query =
"DELETE FROM il_meta_meta_data " .
166 "WHERE meta_meta_data_id = " . $this->db->quote($this->
getMetaId(),
'integer');
167 $res = $this->db->manipulate($query);
192 'rbac_id' => array(
'integer', $this->
getRBACId()),
193 'obj_id' => array(
'integer', $this->
getObjId()),
194 'obj_type' => array(
'text', $this->
getObjType()),
203 $query =
"SELECT * FROM il_meta_meta_data " .
204 "WHERE meta_meta_data_id = " . $this->db->quote($this->
getMetaId(),
'integer');
206 $res = $this->db->query($query);
209 $this->
setObjId((
int) $row->obj_id);
235 foreach ($identifiers as
$id) {
237 $ide->toXML($writer);
239 if (!count($identifiers)) {
241 $ide->toXML($writer);
246 foreach ($contributes as $id) {
248 $con->toXML($writer);
250 if (!count($contributes)) {
252 $con->toXML($writer);
259 public static function _getId(
int $a_rbac_id,
int $a_obj_id):
int 263 $ilDB = $DIC->database();
265 $query =
"SELECT meta_meta_data_id FROM il_meta_meta_data " .
266 "WHERE rbac_id = " .
$ilDB->quote($a_rbac_id,
'integer') .
" " .
267 "AND obj_id = " .
$ilDB->quote($a_obj_id,
'integer');
271 return (
int) $row->meta_meta_data_id;
288 'il_meta_meta_schema',
290 'meta_meta_schema_id' => [
'integer', $next_id = $this->db->nextId(
'il_meta_meta_schema')],
291 'rbac_id' => [
'integer', $this->
getRBACId()],
292 'obj_id' => [
'integer', $this->
getObjId()],
294 'parent_type' => [
'text',
'meta_general'],
295 'parent_id' => [
'integer', $this->
getMetaId()],
296 'meta_data_schema' => [
'text',
'LOMv1.0'],
299 $this->schema_id = $next_id;
308 $query =
"DELETE FROM il_meta_meta_schema WHERE parent_type = 'meta_meta_data' 309 AND parent_id = " . $this->db->quote($this->
getMetaId(),
'integer');
310 $res = $this->db->manipulate($query);
318 $query =
"SELECT * FROM il_meta_meta_schema WHERE meta_meta_schema_id = " .
319 $this->db->quote($this->
getMetaId(),
'integer');
321 $res = $this->db->query($query);
322 if ($row = $this->db->fetchAssoc(
$res)) {
340 $query =
"SELECT meta_meta_schema_id FROM il_meta_meta_schema WHERE parent_type = 'meta_meta_data' 341 AND parent_id = " . $this->db->quote($parent_id,
'integer') .
342 " ORDER BY meta_meta_schema_id";
344 $res = $this->db->query($query);
345 if ($row = $this->db->fetchAssoc(
$res)) {
346 $this->schema_id = (
int) $row[
'meta_meta_schema_id'];
353 public function setMetaId(
int $a_meta_id,
bool $a_read_data =
true): void
356 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)
xmlEndTag(string $tag)
Writes an endtag.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
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.
language()
description: > Example for rendring a language glyph.
setObjType(string $a_type)