3 declare(strict_types=1);
41 $this->obj_id = $a_new_obj_id;
49 $this->obj_id = $a_obj_id;
56 public function save(): bool
58 foreach ($this->values_records as $values_record) {
59 $values_record->write();
71 public function handlerBeginTag($a_xml_parser,
string $a_name, array $a_attribs): void
74 case 'AdvancedMetaData':
76 foreach ($this->values_records as $values_record) {
78 $values_record->getADTGroup();
80 foreach ($values_record->getDefinitions() as $def) {
81 $this->values[$def->getImportId()] = $def;
101 case 'AdvancedMetaData':
105 $value = trim($this->cdata);
106 if (is_object($this->current_value) && $value) {
107 $this->current_value->importValueFromXML($value);
122 if ($a_data !=
"\n") {
124 $a_data = preg_replace(
"/\t+/",
" ", $a_data);
126 $this->cdata .= $a_data;
135 if (isset($this->values[$a_import_id])) {
136 $this->current_value = $this->values[$a_import_id];
138 $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.
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.
Interface definition for sax subset parsers.
__construct(int $a_new_obj_id=0)