19 declare(strict_types=1);
35 $this->obj_id = $a_new_obj_id;
43 $this->obj_id = $a_obj_id;
50 public function save(): bool
52 foreach ($this->values_records as $values_record) {
53 $values_record->write();
65 public function handlerBeginTag($a_xml_parser,
string $a_name, array $a_attribs): void
68 case 'AdvancedMetaData':
70 foreach ($this->values_records as $values_record) {
72 $values_record->getADTGroup();
74 foreach ($values_record->getDefinitions() as $def) {
75 $this->values[$def->getImportId()] = $def;
95 case 'AdvancedMetaData':
99 $value = trim($this->cdata);
100 if (is_object($this->current_value) && $value) {
101 $this->current_value->importValueFromXML($value);
116 if ($a_data !=
"\n") {
118 $a_data = preg_replace(
"/\t+/",
" ", $a_data);
120 $this->cdata .= $a_data;
129 if (isset($this->values[$a_import_id])) {
130 $this->current_value = $this->values[$a_import_id];
132 $this->current_value =
null;
static getInstancesForObjectId(int $a_obj_id, ?string $a_obj_type=null, string $a_sub_type="-", int $a_sub_id=0)
initValue(string $a_import_id)
init new value object
AMD field abstract base class.
handlerBeginTag($a_xml_parser, string $a_name, array $a_attribs)
Start element handler public.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
setObjId(int $a_obj_id)
Set object id (id of new created object)
handlerCharacterData($a_xml_parser, string $a_data)
Character data handler public.
ilAdvancedMDFieldDefinition $current_value
save()
Save values public.
handlerEndTag($a_xml_parser, string $a_name)
End element handler public.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(int $a_new_obj_id=0)