Add fields for objects' translation records

phpcs-errors:243 phpunit-status:successful
This commit is contained in:
Joshua Ramon Enslin 2020-06-25 16:48:00 +02:00 committed by Stefan Rohde-Enslin
parent 61854030ff
commit 18962df768

View File

@ -690,6 +690,7 @@ $availableFields = [
], ],
$overview['links'] => [], $overview['links'] => [],
$overview['links'] . ": " . $basis['single_object'] => [], $overview['links'] . ": " . $basis['single_object'] => [],
"translations" => [],
$basis['literature'] => [], $basis['literature'] => [],
$basis['objectgroup'] => [], $basis['objectgroup'] => [],
$overview['tags'] => [], $overview['tags'] => [],
@ -786,6 +787,62 @@ for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) {
} }
for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) {
$availableFields["translations"] = array_merge($availableFields["translations"],
[
"obj_trans_language{$i}" => [
"required" => false,
"allowedValues" => [],
"dependsOn" => ["obj_trans_language{$i}", "obj_trans_object_type{$i}", "obj_trans_object_title{$i}", "obj_trans_object_description{$i}"],
"remark" => '',
"name_human_readable" => "Translation language",
"explica" => "",
],
"obj_trans_object_type{$i}" => [
"required" => false,
"allowedValues" => [],
"dependsOn" => ["obj_trans_language{$i}", "obj_trans_object_type{$i}", "obj_trans_object_title{$i}", "obj_trans_object_description{$i}"],
"remark" => '',
"name_human_readable" => $object_basis['object_type'],
"explica" => $object_basis['oart_explica'],
],
"obj_trans_object_title{$i}" => [
"required" => false,
"allowedValues" => [],
"dependsOn" => ["obj_trans_language{$i}", "obj_trans_object_type{$i}", "obj_trans_object_title{$i}", "obj_trans_object_description{$i}"],
"remark" => '',
"name_human_readable" => $object_basis['object_name'],
"explica" => $object_basis['oname_explica'],
],
"obj_trans_object_description{$i}" => [
"required" => false,
"allowedValues" => [],
"dependsOn" => ["obj_trans_language{$i}", "obj_trans_object_type{$i}", "obj_trans_object_title{$i}", "obj_trans_object_description{$i}"],
"remark" => '',
"name_human_readable" => $object_basis['description'],
"explica" => $object_basis['obesch_explica'],
],
"obj_trans_object_material_technique{$i}" => [
"required" => false,
"allowedValues" => [],
"dependsOn" => ["obj_trans_language{$i}", "obj_trans_object_type{$i}", "obj_trans_object_title{$i}", "obj_trans_object_description{$i}"],
"remark" => '',
"name_human_readable" => $object_basis['mattech'],
"explica" => $object_basis['mattech_explica'],
],
"obj_trans_object_dimensions{$i}" => [
"required" => false,
"allowedValues" => [],
"dependsOn" => ["obj_trans_language{$i}", "obj_trans_object_type{$i}", "obj_trans_object_title{$i}", "obj_trans_object_description{$i}"],
"remark" => '',
"name_human_readable" => $object_basis['measurements'],
"explica" => $object_basis['ausmass_explica'],
],
]);
}
for ($i = 1; $i <= 5 * $fieldNoMultiplicator; $i++) { for ($i = 1; $i <= 5 * $fieldNoMultiplicator; $i++) {
$availableFields[$basis['literature']] = array_merge($availableFields[$basis['literature']], $availableFields[$basis['literature']] = array_merge($availableFields[$basis['literature']],