Add fields for GND IDs in event actors

phpcs-errors:1644 phpunit-status:successful
This commit is contained in:
Joshua Ramon Enslin 2019-11-12 17:11:59 +01:00 committed by Stefan Rohde-Enslin
parent 1b3ba80df6
commit bf985ae192

View File

@ -916,7 +916,7 @@ for ($i = 1; $i <= 2; $i++) {
"allowedValues" => ["y", "n"], "allowedValues" => ["y", "n"],
"dependsOn" => ["related_place{$i}"], "dependsOn" => ["related_place{$i}"],
"remark" => '', "remark" => '',
"name_human_readable" => $event['where'] . " [{$csvxml_overview['certainty']}]", "name_human_readable" => "{$event['where']} [{$csvxml_overview['certainty']}]",
"explica" => "", "explica" => "",
], ],
]); ]);
@ -940,7 +940,15 @@ for ($i = 1; $i <= 2; $i++) {
"allowedValues" => ["y", "n"], "allowedValues" => ["y", "n"],
"dependsOn" => ["related_actor{$i}"], "dependsOn" => ["related_actor{$i}"],
"remark" => '', "remark" => '',
"name_human_readable" => $event['who'] . " [{$csvxml_overview['certainty']}]", "name_human_readable" => "{$event['who']} [{$csvxml_overview['certainty']}]",
"explica" => "",
],
"related_actor_gnd{$i}" => [
"required" => false,
"allowedValues" => [],
"dependsOn" => ["related_actor{$i}", "related_actor_sure{$i}"],
"remark" => '',
"name_human_readable" => "{$event['who']} ({$event['gnd']})",
"explica" => "", "explica" => "",
], ],
]); ]);
@ -1186,13 +1194,14 @@ function getSimpleAvailableFieldEntry(string $nameTL = "", string $explica = "",
function generateGenericFullEvent(array $event, array $csvxml_overview, string $typeName, string $type, int $number):array { function generateGenericFullEvent(array $event, array $csvxml_overview, string $typeName, string $type, int $number):array {
return [ return [
"{$type}_when{$number}" => getSimpleAvailableFieldEntry($typeName . ": " . $event['when'], "", ["{$type}_when_sure{$number}"]), "{$type}_when{$number}" => getSimpleAvailableFieldEntry("{$typeName}: {$event['when']}", "", ["{$type}_when_sure{$number}"]),
"{$type}_when_sure{$number}" => getSimpleAvailableFieldEntry($typeName . ": " . $event['when'] . " [{$csvxml_overview['certainty']}]", "", ["{$type}_when{$number}"], ["y", "n"]), "{$type}_when_sure{$number}" => getSimpleAvailableFieldEntry("{$typeName}: {$event['when']} [{$csvxml_overview['certainty']}]", "", ["{$type}_when{$number}"], ["y", "n"]),
"{$type}_who{$number}" => getSimpleAvailableFieldEntry($typeName . ": " . $event['who'], "", ["{$type}_who_sure{$number}"]), "{$type}_who{$number}" => getSimpleAvailableFieldEntry("{$typeName}: {$event['who']}", "", ["{$type}_who_sure{$number}"]),
"{$type}_who_sure{$number}" => getSimpleAvailableFieldEntry($typeName . ": " . $event['who'] . " [{$csvxml_overview['certainty']}]", "", ["{$type}_who{$number}"], ["y", "n"]), "{$type}_who_sure{$number}" => getSimpleAvailableFieldEntry("{$typeName}: {$event['who']} [{$csvxml_overview['certainty']}]", "", ["{$type}_who{$number}"], ["y", "n"]),
"{$type}_where{$number}" => getSimpleAvailableFieldEntry($typeName . ": " . $event['where'], "", ["{$type}_where_sure{$number}"]), "{$type}_who_gnd{$number}" => getSimpleAvailableFieldEntry("{$typeName}: {$event['who']} ({$event['gnd']})", "", ["{$type}_who_sure{$number}", "{$type}_who{$number}"]),
"{$type}_where_sure{$number}" => getSimpleAvailableFieldEntry($typeName . ": " . $event['where'] . " [{$csvxml_overview['certainty']}]", "", ["{$type}_where{$number}"], ["y", "n"]), "{$type}_where{$number}" => getSimpleAvailableFieldEntry("{$typeName}: {$event['where']}", "", ["{$type}_where_sure{$number}"]),
"{$type}_annotation{$number}" => getSimpleAvailableFieldEntry($typeName . ": " . $event['classic_annotation_intro'], ""), "{$type}_where_sure{$number}" => getSimpleAvailableFieldEntry("{$typeName}: {$event['where']} [{$csvxml_overview['certainty']}]", "", ["{$type}_where{$number}"], ["y", "n"]),
"{$type}_annotation{$number}" => getSimpleAvailableFieldEntry("{$typeName}: {$event['classic_annotation_intro']}", ""),
]; ];
} }