Use MDAllowedValueSets for getting values of allowed values

phpcs-errors:226 phpunit-status:successful
This commit is contained in:
2020-08-10 20:13:16 +02:00
committed by Stefan Rohde-Enslin
parent f75ecb08a4
commit df3e1580cf
7 changed files with 10 additions and 95 deletions

View File

@ -104,7 +104,7 @@ $availableFields = [
],
"object_other_title_kind_of" => [
"required" => false,
"allowedValues" => array_values($titelart),
"allowedValues" => array_values(MDTitleTypesSet::TITLE_TYPES),
"dependsOn" => ['object_other_title'],
"remark" => 'This field has to be used togehter with <i>object_other_title</i>',
"name_human_readable" => $searchvar[0][0] . ', in: ',
@ -423,7 +423,7 @@ $availableFields = [
],
"inclusion_kind_of" => [
"required" => false,
"allowedValues" => array_values($zugangsart),
"allowedValues" => array_values(MDEntryTypesSet::ENTRY_TYPES),
"remark" => '',
"name_human_readable" => "{$searchvar[19][0]}, {$object_add['as']}",
"explica" => "",
@ -1124,7 +1124,7 @@ for ($i = 1; $i <= 5 * $fieldNoMultiplicator; $i++) {
],
"image_rights{$i}" => [
"required" => false,
"allowedValues" => array_keys($availableLicenses),
"allowedValues" => array_keys(MDLicensesSet::AVAILABLE_LICENSES),
"dependsOn" => [
"image_name{$i}", "image_owner{$i}", "image_visible{$i}", "image_main{$i}"
],
@ -1242,7 +1242,7 @@ for ($i = 1; $i <= 5 * $fieldNoMultiplicator; $i++) {
],
"resource_rights{$i}" => [
"required" => false,
"allowedValues" => array_keys($availableLicenses),
"allowedValues" => array_keys(MDLicensesSet::AVAILABLE_LICENSES),
"dependsOn" => [
"resource_media_type{$i}", "resource_fileformat{$i}", "resource_location{$i}", "resource_name{$i}", "resource_owner{$i}", "resource_visible{$i}",
],