Improve type-safety, error reporting

phpcs-errors:221 phpunit-status:successful phpstan-errors:548
This commit is contained in:
Joshua Ramon Enslin 2020-10-31 01:53:40 +01:00 committed by Stefan Rohde-Enslin
parent 733241be47
commit 5b71f800c2
Signed by: jrenslin
GPG Key ID: 46016F84501B70AE
3 changed files with 116 additions and 112 deletions

View File

@ -490,7 +490,7 @@ final class CsvxmlAvailableFields {
"explica" => "", "explica" => "",
], ],
], ],
$basis['administration'] => [ $tlLoader->tl("basis", "basis", 'administration') => [
"inclusion_when" => [ "inclusion_when" => [
"required" => false, "required" => false,
"allowedValues" => '', "allowedValues" => '',
@ -640,7 +640,7 @@ final class CsvxmlAvailableFields {
"explica" => $object_add['rest_inhalt'], "explica" => $object_add['rest_inhalt'],
], ],
], ],
$basis['abode'] => [ $tlLoader->tl("basis", "basis", 'abode') => [
"abode_actual" => [ "abode_actual" => [
"required" => false, "required" => false,
"allowedValues" => '', "allowedValues" => '',
@ -698,7 +698,7 @@ final class CsvxmlAvailableFields {
"explica" => $object_add['alei_inhalt'], "explica" => $object_add['alei_inhalt'],
], ],
], ],
$basis['rights'] => [ $tlLoader->tl("basis", "basis", 'rights') => [
"rights_object" => [ "rights_object" => [
"required" => false, "required" => false,
"allowedValues" => '', "allowedValues" => '',
@ -735,7 +735,7 @@ final class CsvxmlAvailableFields {
"explica" => "", "explica" => "",
], ],
], ],
$basis['remarks'] => [ $tlLoader->tl("basis", "basis", 'remarks') => [
"remarks_short" => [ "remarks_short" => [
"required" => false, "required" => false,
"allowedValues" => '', "allowedValues" => '',
@ -766,49 +766,49 @@ final class CsvxmlAvailableFields {
], ],
], ],
$overview['links'] => [], $overview['links'] => [],
$overview['links'] . ": " . $basis['single_object'] => [], $overview['links'] . ": " . $tlLoader->tl("basis", "basis", 'single_object') => [],
"translations" => [], "translations" => [],
$basis['literature'] => [], $tlLoader->tl("basis", "basis", 'literature') => [],
$basis['objectgroup'] => [], $tlLoader->tl("basis", "basis", 'objectgroup') => [],
$overview['tags'] => [], $overview['tags'] => [],
$eventname[22] => [], $eventname[22] => [],
$eventname[23] => [], $eventname[23] => [],
$eventname[24] => [], $eventname[24] => [],
$overview['images'] => [], $overview['images'] => [],
$basis['resource'] => [], $tlLoader->tl("basis", "basis", 'resource') => [],
$basis['event'] . ": " . $eventname[1] => [], $tlLoader->tl("basis", "basis", 'event') . ": " . $eventname[1] => [],
$basis['event'] . ": " . $eventname[2] => [], $tlLoader->tl("basis", "basis", 'event') . ": " . $eventname[2] => [],
$basis['event'] . ": " . $eventname[3] => [], $tlLoader->tl("basis", "basis", 'event') . ": " . $eventname[3] => [],
$basis['event'] . ": " . $eventname[4] => [], $tlLoader->tl("basis", "basis", 'event') . ": " . $eventname[4] => [],
$basis['event'] . ": " . $eventname[5] => [], $tlLoader->tl("basis", "basis", 'event') . ": " . $eventname[5] => [],
$basis['event'] . ": " . $eventname[36] => [], $tlLoader->tl("basis", "basis", 'event') . ": " . $eventname[36] => [],
$basis['event'] . ": " . $eventname[6] => [], $tlLoader->tl("basis", "basis", 'event') . ": " . $eventname[6] => [],
$basis['event'] . ": " . $eventname[7] => [], $tlLoader->tl("basis", "basis", 'event') . ": " . $eventname[7] => [],
$basis['event'] . ": " . $eventname[8] => [], $tlLoader->tl("basis", "basis", 'event') . ": " . $eventname[8] => [],
$basis['event'] . ": " . $eventname[9] => [], $tlLoader->tl("basis", "basis", 'event') . ": " . $eventname[9] => [],
$basis['event'] . ": " . $eventname[10] => [], $tlLoader->tl("basis", "basis", 'event') . ": " . $eventname[10] => [],
$basis['event'] . ": " . $eventname[11] => [], $tlLoader->tl("basis", "basis", 'event') . ": " . $eventname[11] => [],
$basis['event'] . ": " . $eventname[12] => [], $tlLoader->tl("basis", "basis", 'event') . ": " . $eventname[12] => [],
$basis['event'] . ": " . $eventname[13] => [], $tlLoader->tl("basis", "basis", 'event') . ": " . $eventname[13] => [],
$basis['event'] . ": " . $eventname[14] => [], $tlLoader->tl("basis", "basis", 'event') . ": " . $eventname[14] => [],
$basis['event'] . ": " . $eventname[15] => [], $tlLoader->tl("basis", "basis", 'event') . ": " . $eventname[15] => [],
$basis['event'] . ": " . $eventname[16] => [], $tlLoader->tl("basis", "basis", 'event') . ": " . $eventname[16] => [],
$basis['event'] . ": " . $eventname[19] => [], $tlLoader->tl("basis", "basis", 'event') . ": " . $eventname[19] => [],
$basis['event'] . ": " . $eventname[20] => [], $tlLoader->tl("basis", "basis", 'event') . ": " . $eventname[20] => [],
$basis['event'] . ": " . $eventname[21] => [], $tlLoader->tl("basis", "basis", 'event') . ": " . $eventname[21] => [],
$basis['event'] . ": " . $eventname[25] => [], $tlLoader->tl("basis", "basis", 'event') . ": " . $eventname[25] => [],
$basis['event'] . ": " . $eventname[26] => [], $tlLoader->tl("basis", "basis", 'event') . ": " . $eventname[26] => [],
$basis['event'] . ": " . $eventname[27] => [], $tlLoader->tl("basis", "basis", 'event') . ": " . $eventname[27] => [],
$basis['event'] . ": " . $eventname[28] => [], $tlLoader->tl("basis", "basis", 'event') . ": " . $eventname[28] => [],
$basis['event'] . ": " . $eventname[29] => [], $tlLoader->tl("basis", "basis", 'event') . ": " . $eventname[29] => [],
$basis['event'] . ": " . $eventname[30] => [], $tlLoader->tl("basis", "basis", 'event') . ": " . $eventname[30] => [],
$basis['event'] . ": " . $eventname[31] => [], $tlLoader->tl("basis", "basis", 'event') . ": " . $eventname[31] => [],
$basis['event'] . ": " . $eventname[32] => [], $tlLoader->tl("basis", "basis", 'event') . ": " . $eventname[32] => [],
$basis['event'] . ": " . $eventname[33] => [], $tlLoader->tl("basis", "basis", 'event') . ": " . $eventname[33] => [],
$basis['event'] . ": " . $eventname[34] => [], $tlLoader->tl("basis", "basis", 'event') . ": " . $eventname[34] => [],
$basis['event'] . ": " . $eventname[35] => [], $tlLoader->tl("basis", "basis", 'event') . ": " . $eventname[35] => [],
$basis['event'] . ": " . $eventname[37] => [], $tlLoader->tl("basis", "basis", 'event') . ": " . $eventname[37] => [],
$basis['event'] . ": " . $eventname[38] => [], $tlLoader->tl("basis", "basis", 'event') . ": " . $eventname[38] => [],
]; ];
/* /*
@ -841,7 +841,7 @@ final class CsvxmlAvailableFields {
for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) { for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) {
$availableFields[$overview['links'] . ": " . $basis['single_object']] = array_merge($availableFields[$overview['links'] . ": " . $basis['single_object']], $availableFields[$overview['links'] . ": " . $tlLoader->tl("basis", "basis", 'single_object')] = array_merge($availableFields[$overview['links'] . ": " . $tlLoader->tl("basis", "basis", 'single_object')],
[ [
"linked_obj_invno{$i}" => [ "linked_obj_invno{$i}" => [
"required" => false, "required" => false,
@ -921,7 +921,7 @@ final class CsvxmlAvailableFields {
for ($i = 1; $i <= 5 * $fieldNoMultiplicator; $i++) { for ($i = 1; $i <= 5 * $fieldNoMultiplicator; $i++) {
$availableFields[$basis['literature']] = array_merge($availableFields[$basis['literature']], $availableFields[$tlLoader->tl("basis", "basis", 'literature')] = array_merge($availableFields[$tlLoader->tl("basis", "basis", 'literature')],
[ [
"literature_author{$i}" => [ "literature_author{$i}" => [
"required" => false, "required" => false,
@ -1032,7 +1032,7 @@ final class CsvxmlAvailableFields {
for ($i = 1; $i <= 5 * $fieldNoMultiplicator; $i++) { for ($i = 1; $i <= 5 * $fieldNoMultiplicator; $i++) {
$availableFields[$basis['objectgroup']] = array_merge($availableFields[$basis['objectgroup']], $availableFields[$tlLoader->tl("basis", "basis", 'objectgroup')] = array_merge($availableFields[$tlLoader->tl("basis", "basis", 'objectgroup')],
[ [
"object_group_name{$i}" => [ "object_group_name{$i}" => [
"required" => false, "required" => false,
@ -1215,7 +1215,7 @@ final class CsvxmlAvailableFields {
"image_name{$i}", "image_owner{$i}", "image_rights{$i}", "image_main{$i}" "image_name{$i}", "image_owner{$i}", "image_rights{$i}", "image_main{$i}"
], ],
"remark" => '', "remark" => '',
"name_human_readable" => "{$basis['image']}: {$objekt['visibility']}", "name_human_readable" => $tlLoader->tl("basis", "basis", 'image') . ": {$objekt['visibility']}",
"explica" => "", "explica" => "",
], ],
"image_main{$i}" => [ "image_main{$i}" => [
@ -1244,7 +1244,7 @@ final class CsvxmlAvailableFields {
for ($i = 1; $i <= 5 * $fieldNoMultiplicator; $i++) { for ($i = 1; $i <= 5 * $fieldNoMultiplicator; $i++) {
$availableFields[$basis['resource']] = array_merge($availableFields[$basis['resource']], $availableFields[$tlLoader->tl("basis", "basis", 'resource')] = array_merge($availableFields[$tlLoader->tl("basis", "basis", 'resource')],
[ [
"resource_media_type{$i}" => [ "resource_media_type{$i}" => [
"required" => false, "required" => false,
@ -1253,7 +1253,7 @@ final class CsvxmlAvailableFields {
"resource_fileformat{$i}", "resource_location{$i}", "resource_name{$i}", "resource_owner{$i}", "resource_rights{$i}", "resource_visible{$i}", "resource_fileformat{$i}", "resource_location{$i}", "resource_name{$i}", "resource_owner{$i}", "resource_rights{$i}", "resource_visible{$i}",
], ],
"remark" => 'Allowed values: image, text, video, audio', "remark" => 'Allowed values: image, text, video, audio',
"name_human_readable" => $basis['resource'] . ', ' . $tlSources['type'], "name_human_readable" => $tlLoader->tl("basis", "basis", 'resource') . ', ' . $tlSources['type'],
"explica" => "", "explica" => "",
], ],
"resource_fileformat{$i}" => [ "resource_fileformat{$i}" => [
@ -1333,7 +1333,7 @@ final class CsvxmlAvailableFields {
"resource_media_type{$i}", "resource_fileformat{$i}", "resource_location{$i}", "resource_name{$i}", "resource_owner{$i}", "resource_rights{$i}", "resource_media_type{$i}", "resource_fileformat{$i}", "resource_location{$i}", "resource_name{$i}", "resource_owner{$i}", "resource_rights{$i}",
], ],
"remark" => 'Should the resource be publicly visible? Allowed values are either y and n', "remark" => 'Should the resource be publicly visible? Allowed values are either y and n',
"name_human_readable" => "{$basis['resource']}: {$objekt['visibility']}", "name_human_readable" => $tlLoader->tl("basis", "basis", 'resource') . ": {$objekt['visibility']}",
"explica" => "", "explica" => "",
], ],
]); ]);
@ -1341,36 +1341,36 @@ final class CsvxmlAvailableFields {
} }
for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) { for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) {
$availableFields[$basis['event'] . ': ' . $eventname[1]] = array_merge( $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[1]] = array_merge(
$availableFields[$basis['event'] . ': ' . $eventname[1]], $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[1]],
$this->_generateGenericFullEvent($event, $tlLoader, $eventname[1], "production", $i) $this->_generateGenericFullEvent($event, $tlLoader, $eventname[1], "production", $i)
); );
} }
for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) { for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) {
$availableFields[$basis['event'] . ': ' . $eventname[2]] = array_merge( $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[2]] = array_merge(
$availableFields[$basis['event'] . ': ' . $eventname[2]], $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[2]],
$this->_generateGenericFullEvent($event, $tlLoader, $eventname[2], "finding", $i) $this->_generateGenericFullEvent($event, $tlLoader, $eventname[2], "finding", $i)
); );
} }
for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) { for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) {
$availableFields[$basis['event'] . ': ' . $eventname[3]] = array_merge( $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[3]] = array_merge(
$availableFields[$basis['event'] . ': ' . $eventname[3]], $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[3]],
$this->_generateGenericFullEvent($event, $tlLoader, $eventname[3], "publication", $i) $this->_generateGenericFullEvent($event, $tlLoader, $eventname[3], "publication", $i)
); );
} }
for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) { for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) {
$availableFields[$basis['event'] . ': ' . $eventname[4]] = array_merge( $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[4]] = array_merge(
$availableFields[$basis['event'] . ': ' . $eventname[4]], $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[4]],
$this->_generateGenericFullEvent($event, $tlLoader, $eventname[4], "template_creation", $i) $this->_generateGenericFullEvent($event, $tlLoader, $eventname[4], "template_creation", $i)
); );
} }
for ($i = 1; $i <= 5 * $fieldNoMultiplicator; $i++) { for ($i = 1; $i <= 5 * $fieldNoMultiplicator; $i++) {
$availableFields[$basis['event'] . ': ' . $eventname[5]] = array_merge($availableFields[$basis['event'] . ': ' . $eventname[5]], $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[5]] = array_merge($availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[5]],
[ [
"was_depicted_who{$i}" => [ "was_depicted_who{$i}" => [
"required" => false, "required" => false,
@ -1394,7 +1394,7 @@ final class CsvxmlAvailableFields {
for ($i = 1; $i <= 5 * $fieldNoMultiplicator; $i++) { for ($i = 1; $i <= 5 * $fieldNoMultiplicator; $i++) {
$availableFields[$basis['event'] . ': ' . $eventname[36]] = array_merge($availableFields[$basis['event'] . ': ' . $eventname[36]], $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[36]] = array_merge($availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[36]],
[ [
"was_depicted_place{$i}" => [ "was_depicted_place{$i}" => [
"required" => false, "required" => false,
@ -1417,190 +1417,190 @@ final class CsvxmlAvailableFields {
} }
for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) { for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) {
$availableFields[$basis['event'] . ': ' . $eventname[6]] = array_merge( $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[6]] = array_merge(
$availableFields[$basis['event'] . ': ' . $eventname[6]], $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[6]],
$this->_generateGenericFullEvent($event, $tlLoader, $eventname[6], "was_used", $i) $this->_generateGenericFullEvent($event, $tlLoader, $eventname[6], "was_used", $i)
); );
} }
for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) { for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) {
$availableFields[$basis['event'] . ': ' . $eventname[7]] = array_merge( $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[7]] = array_merge(
$availableFields[$basis['event'] . ': ' . $eventname[7]], $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[7]],
$this->_generateGenericFullEvent($event, $tlLoader, $eventname[7], "written", $i) $this->_generateGenericFullEvent($event, $tlLoader, $eventname[7], "written", $i)
); );
} }
for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) { for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) {
$availableFields[$basis['event'] . ': ' . $eventname[8]] = array_merge( $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[8]] = array_merge(
$availableFields[$basis['event'] . ': ' . $eventname[8]], $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[8]],
$this->_generateGenericFullEvent($event, $tlLoader, $eventname[8], "collected", $i) $this->_generateGenericFullEvent($event, $tlLoader, $eventname[8], "collected", $i)
); );
} }
for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) { for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) {
$availableFields[$basis['event'] . ': ' . $eventname[9]] = array_merge( $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[9]] = array_merge(
$availableFields[$basis['event'] . ': ' . $eventname[9]], $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[9]],
$this->_generateGenericFullEvent($event, $tlLoader, $eventname[9], "painted", $i) $this->_generateGenericFullEvent($event, $tlLoader, $eventname[9], "painted", $i)
); );
} }
for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) { for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) {
$availableFields[$basis['event'] . ': ' . $eventname[10]] = array_merge( $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[10]] = array_merge(
$availableFields[$basis['event'] . ': ' . $eventname[10]], $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[10]],
$this->_generateGenericFullEvent($event, $tlLoader, $eventname[10], "taken", $i) $this->_generateGenericFullEvent($event, $tlLoader, $eventname[10], "taken", $i)
); );
} }
for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) { for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) {
$availableFields[$basis['event'] . ': ' . $eventname[11]] = array_merge( $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[11]] = array_merge(
$availableFields[$basis['event'] . ': ' . $eventname[11]], $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[11]],
$this->_generateGenericFullEvent($event, $tlLoader, $eventname[11], "received", $i) $this->_generateGenericFullEvent($event, $tlLoader, $eventname[11], "received", $i)
); );
} }
for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) { for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) {
$availableFields[$basis['event'] . ': ' . $eventname[12]] = array_merge( $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[12]] = array_merge(
$availableFields[$basis['event'] . ': ' . $eventname[12]], $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[12]],
$this->_generateGenericFullEvent($event, $tlLoader, $eventname[12], "printing_plate_produced", $i) $this->_generateGenericFullEvent($event, $tlLoader, $eventname[12], "printing_plate_produced", $i)
); );
} }
for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) { for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) {
$availableFields[$basis['event'] . ': ' . $eventname[13]] = array_merge( $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[13]] = array_merge(
$availableFields[$basis['event'] . ': ' . $eventname[13]], $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[13]],
$this->_generateGenericFullEvent($event, $tlLoader, $eventname[13], "sent", $i) $this->_generateGenericFullEvent($event, $tlLoader, $eventname[13], "sent", $i)
); );
} }
for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) { for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) {
$availableFields[$basis['event'] . ': ' . $eventname[14]] = array_merge( $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[14]] = array_merge(
$availableFields[$basis['event'] . ': ' . $eventname[14]], $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[14]],
$this->_generateGenericFullEvent($event, $tlLoader, $eventname[14], "issued", $i) $this->_generateGenericFullEvent($event, $tlLoader, $eventname[14], "issued", $i)
); );
} }
for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) { for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) {
$availableFields[$basis['event'] . ': ' . $eventname[15]] = array_merge( $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[15]] = array_merge(
$availableFields[$basis['event'] . ': ' . $eventname[15]], $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[15]],
$this->_generateGenericFullEvent($event, $tlLoader, $eventname[15], "signed", $i) $this->_generateGenericFullEvent($event, $tlLoader, $eventname[15], "signed", $i)
); );
} }
for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) { for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) {
$availableFields[$basis['event'] . ': ' . $eventname[16]] = array_merge( $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[16]] = array_merge(
$availableFields[$basis['event'] . ': ' . $eventname[16]], $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[16]],
$this->_generateGenericFullEvent($event, $tlLoader, $eventname[16], "type_described", $i) $this->_generateGenericFullEvent($event, $tlLoader, $eventname[16], "type_described", $i)
); );
} }
for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) { for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) {
$availableFields[$basis['event'] . ': ' . $eventname[19]] = array_merge( $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[19]] = array_merge(
$availableFields[$basis['event'] . ': ' . $eventname[19]], $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[19]],
$this->_generateGenericFullEvent($event, $tlLoader, $eventname[19], "drawn", $i) $this->_generateGenericFullEvent($event, $tlLoader, $eventname[19], "drawn", $i)
); );
} }
for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) { for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) {
$availableFields[$basis['event'] . ': ' . $eventname[20]] = array_merge( $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[20]] = array_merge(
$availableFields[$basis['event'] . ': ' . $eventname[20]], $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[20]],
$this->_generateGenericFullEvent($event, $tlLoader, $eventname[20], "copied", $i) $this->_generateGenericFullEvent($event, $tlLoader, $eventname[20], "copied", $i)
); );
} }
for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) { for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) {
$availableFields[$basis['event'] . ': ' . $eventname[25]] = array_merge( $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[25]] = array_merge(
$availableFields[$basis['event'] . ': ' . $eventname[25]], $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[25]],
$this->_generateGenericFullEvent($event, $tlLoader, $eventname[25], "commissioned", $i) $this->_generateGenericFullEvent($event, $tlLoader, $eventname[25], "commissioned", $i)
); );
} }
for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) { for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) {
$availableFields[$basis['event'] . ': ' . $eventname[26]] = array_merge( $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[26]] = array_merge(
$availableFields[$basis['event'] . ': ' . $eventname[26]], $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[26]],
$this->_generateGenericFullEvent($event, $tlLoader, $eventname[26], "printed", $i) $this->_generateGenericFullEvent($event, $tlLoader, $eventname[26], "printed", $i)
); );
} }
for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) { for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) {
$availableFields[$basis['event'] . ': ' . $eventname[27]] = array_merge( $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[27]] = array_merge(
$availableFields[$basis['event'] . ': ' . $eventname[27]], $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[27]],
$this->_generateGenericFullEvent($event, $tlLoader, $eventname[27], "spoken", $i) $this->_generateGenericFullEvent($event, $tlLoader, $eventname[27], "spoken", $i)
); );
} }
for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) { for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) {
$availableFields[$basis['event'] . ': ' . $eventname[28]] = array_merge( $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[28]] = array_merge(
$availableFields[$basis['event'] . ': ' . $eventname[28]], $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[28]],
$this->_generateGenericFullEvent($event, $tlLoader, $eventname[28], "sung", $i) $this->_generateGenericFullEvent($event, $tlLoader, $eventname[28], "sung", $i)
); );
} }
for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) { for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) {
$availableFields[$basis['event'] . ': ' . $eventname[29]] = array_merge( $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[29]] = array_merge(
$availableFields[$basis['event'] . ': ' . $eventname[29]], $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[29]],
$this->_generateGenericFullEvent($event, $tlLoader, $eventname[29], "decor_designed", $i) $this->_generateGenericFullEvent($event, $tlLoader, $eventname[29], "decor_designed", $i)
); );
} }
for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) { for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) {
$availableFields[$basis['event'] . ': ' . $eventname[30]] = array_merge( $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[30]] = array_merge(
$availableFields[$basis['event'] . ': ' . $eventname[30]], $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[30]],
$this->_generateGenericFullEvent($event, $tlLoader, $eventname[30], "form_designed", $i) $this->_generateGenericFullEvent($event, $tlLoader, $eventname[30], "form_designed", $i)
); );
} }
for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) { for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) {
$availableFields[$basis['event'] . ': ' . $eventname[31]] = array_merge( $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[31]] = array_merge(
$availableFields[$basis['event'] . ': ' . $eventname[31]], $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[31]],
$this->_generateGenericFullEvent($event, $tlLoader, $eventname[31], "modelled", $i) $this->_generateGenericFullEvent($event, $tlLoader, $eventname[31], "modelled", $i)
); );
} }
for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) { for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) {
$availableFields[$basis['event'] . ': ' . $eventname[32]] = array_merge( $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[32]] = array_merge(
$availableFields[$basis['event'] . ': ' . $eventname[32]], $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[32]],
$this->_generateGenericFullEvent($event, $tlLoader, $eventname[32], "signed_artwork", $i) $this->_generateGenericFullEvent($event, $tlLoader, $eventname[32], "signed_artwork", $i)
); );
} }
for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) { for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) {
$availableFields[$basis['event'] . ': ' . $eventname[33]] = array_merge( $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[33]] = array_merge(
$availableFields[$basis['event'] . ': ' . $eventname[33]], $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[33]],
$this->_generateGenericFullEvent($event, $tlLoader, $eventname[33], "was_mentioned", $i) $this->_generateGenericFullEvent($event, $tlLoader, $eventname[33], "was_mentioned", $i)
); );
} }
for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) { for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) {
$availableFields[$basis['event'] . ': ' . $eventname[34]] = array_merge( $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[34]] = array_merge(
$availableFields[$basis['event'] . ': ' . $eventname[34]], $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[34]],
$this->_generateGenericFullEvent($event, $tlLoader, $eventname[34], "buried", $i) $this->_generateGenericFullEvent($event, $tlLoader, $eventname[34], "buried", $i)
); );
} }
for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) { for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) {
$availableFields[$basis['event'] . ': ' . $eventname[35]] = array_merge( $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[35]] = array_merge(
$availableFields[$basis['event'] . ': ' . $eventname[35]], $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[35]],
$this->_generateGenericFullEvent($event, $tlLoader, $eventname[35], "intellectual_creation", $i) $this->_generateGenericFullEvent($event, $tlLoader, $eventname[35], "intellectual_creation", $i)
); );
} }
for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) { for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) {
$availableFields[$basis['event'] . ': ' . $eventname[37]] = array_merge( $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[37]] = array_merge(
$availableFields[$basis['event'] . ': ' . $eventname[37]], $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[37]],
$this->_generateGenericFullEvent($event, $tlLoader, $eventname[37], "painted_on", $i) $this->_generateGenericFullEvent($event, $tlLoader, $eventname[37], "painted_on", $i)
); );
} }
for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) { for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) {
$availableFields[$basis['event'] . ': ' . $eventname[38]] = array_merge( $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[38]] = array_merge(
$availableFields[$basis['event'] . ': ' . $eventname[38]], $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[38]],
$this->_generateGenericFullEvent($event, $tlLoader, $eventname[38], "illustrated", $i) $this->_generateGenericFullEvent($event, $tlLoader, $eventname[38], "illustrated", $i)
); );
} }
for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) { for ($i = 1; $i <= 2 * $fieldNoMultiplicator; $i++) {
$availableFields[$basis['event'] . ': ' . $eventname[21]] = array_merge($availableFields[$basis['event'] . ': ' . $eventname[21]], $availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[21]] = array_merge($availableFields[$tlLoader->tl("basis", "basis", 'event') . ': ' . $eventname[21]],
[ [
"has_lived_when{$i}" => [ "has_lived_when{$i}" => [
"required" => false, "required" => false,

View File

@ -2,6 +2,7 @@ parameters:
level: 8 level: 8
paths: paths:
- classes - classes
- conf
- functions - functions
- inc - inc
- public - public

View File

@ -29,7 +29,10 @@ if (!empty($_POST) and !empty($_POST['selectedFields'])) {
$selectionActive = true; $selectionActive = true;
$selectedFields = explode(",", trim($_POST['selectedFields'], ",")); $selectedFields = explode(",", trim($_POST['selectedFields'], ","));
} }
else $selectionActive = false; else {
$selectionActive = false;
$selectedFields = [];
}
$fieldsGetter = new CsvxmlAvailableFields($lang); $fieldsGetter = new CsvxmlAvailableFields($lang);
$availableFields = $fieldsGetter->getFields(); $availableFields = $fieldsGetter->getFields();