19 declare(strict_types=1);
33 public function init(): void
49 $parts = explode(
":", $a_id);
64 foreach ($raw as $item) {
65 $sub_items[$item[
"sub_type"]][] = $item[
"sub_id"];
70 foreach ($sub_items as $sub_type => $sub_ids) {
71 foreach (array_unique($sub_ids) as $sub_id) {
73 $defs = $values_record->getDefinitions();
74 $values_record->read();
75 foreach ($values_record->getADTGroup()->getElements() as $element_id => $element) {
76 if (!$element->isNull()) {
77 $def = $defs[$element_id];
78 $items[$rec_id][] = array(
79 'id' => $def->getImportId(),
80 'sub_type' => $sub_type,
82 'value' => $def->getValueForXML($element)
90 $local_recs = array();
92 if ($rec_obj->getParentObject()) {
94 $rec_obj->toXML($xml);
95 $xml = $xml->xmlDumpMem(
false);
97 $local_recs[$rec_obj->getRecordId()] = base64_encode($xml);
101 if (
sizeof($items)) {
104 foreach ($items as $record_id => $record_items) {
105 $xml->xmlStartTag(
'AdvancedMetaData');
107 $is_local = array_key_exists($record_id, $local_recs);
112 if (!array_key_exists($record_id, self::$local_recs_done)) {
115 array(
'local_id' => $record_id),
116 $local_recs[$record_id]
119 self::$local_recs_done[] = $record_id;
123 foreach ($record_items as $item) {
126 'sub_type' => $item[
'sub_type'],
127 'sub_id' => $item[
'sub_id']
131 $att[
'local_rec_id'] = $record_id;
141 $xml->xmlEndTag(
'AdvancedMetaData');
144 return $xml->xmlDumpMem(
false);
153 "namespace" =>
"http://www.ilias.de/Services/AdvancedMetaData/advmd/4_4",
154 "xsd_file" =>
"ilias_advmd_4_4.xsd",
155 "uses_dataset" =>
true,
if($clientAssertionType !='urn:ietf:params:oauth:client-assertion-type:jwt-bearer'|| $grantType !='client_credentials') $parts
static findByObjectId(int $a_obj_id)
Find all entries for object (regardless of sub-type/sub-id)