get_name(); if ($this->containsKey($field_name)) { if ($databox_field->is_multi()) { $values = $this->get($field_name)->getValue(); $tmp = []; foreach ($values as $value) { foreach (\caption_field::get_multi_values($value, $databox_field->get_separator()) as $v) { $tmp[] = $v; } } $values = array_unique($tmp); foreach ($values as $value) { $value = $unicode->substituteCtrlCharacters($value, ' '); $value = $unicode->toUTF8($value); if ($databox_field->get_type() == 'date') { $value = $unicode->parseDate($value); } $metas[] = [ 'meta_struct_id' => $databox_field->get_id(), 'value' => $value, 'meta_id' => null ]; } } else { $values = $this->get($field_name)->getValue(); $value = array_shift($values); $value = $unicode->substituteCtrlCharacters($value, ' '); $value = $unicode->toUTF8($value); if ($databox_field->get_type() == 'date') { $value = $unicode->parseDate($value); } $metas[] = [ 'meta_struct_id' => $databox_field->get_id(), 'value' => $value, 'meta_id' => null ]; } } } return $metas; } }