checkResource($metadata->getResource()); $type = $metadata->getDataType(); switch ($type) { case DataType::TABULAR_TYPE_VALUE: /** * In a tabular, the children name are */ $value = null; foreach ($metadata->getChildrenObject() as $childrenObject) { $childrenValue = $this->data[$childrenObject::getName()]; if ($childrenValue !== null) { $value[$childrenObject::getPersistentName()] = $childrenValue; } } if ($value !== null) { return $value; } break; default: /** * In a form, the name is send, not the {@link Metadata::getPersistentName()} * but with the name */ $value = $this->data[$metadata::getName()] ?? null; if ($value !== null) { return $value; } } return $default; } public function isHierarchicalTextBased(): bool { /** * It's a list of field that is not hiearchical */ return false; } }