2020-08-06 17:32:29 +02:00
|
|
|
<?PHP
|
|
|
|
/**
|
|
|
|
* Contains a class for controlling the list of available events.
|
|
|
|
*
|
|
|
|
* @author Joshua Ramon Enslin <joshua@museum-digital.de>
|
|
|
|
*/
|
2020-08-07 00:12:49 +02:00
|
|
|
declare(strict_types = 1);
|
2020-08-06 17:32:29 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Class containing available units for events.
|
|
|
|
*/
|
2020-08-29 17:21:18 +02:00
|
|
|
final class MDEventsSet extends MDValueSet {
|
2020-08-06 17:32:29 +02:00
|
|
|
|
|
|
|
const EVENT_IDS = [
|
|
|
|
'1', // => Created
|
|
|
|
'2', // => Found
|
|
|
|
'3', // => Published
|
|
|
|
'4', // => Template creation
|
|
|
|
'5', // => Was depicted (Actor)
|
|
|
|
'6', // => Was used
|
|
|
|
'7', // => Written
|
|
|
|
'8', // => Collected
|
|
|
|
'9', // => Painted
|
|
|
|
'10', // => Image taken
|
|
|
|
'11', // => Received
|
|
|
|
'12', // => Printing plate produced
|
|
|
|
'13', // => Sent
|
|
|
|
'14', // => Issued
|
|
|
|
'15', // => Signed
|
|
|
|
'16', // => First description
|
|
|
|
'19', // => Drawn
|
|
|
|
'20', // => Copied (by hand)
|
|
|
|
'21', // => Lived
|
|
|
|
'22', // => [Relationship to location]
|
|
|
|
'23', // => [Relation to person or institution]
|
|
|
|
'24', // => [Relation to time]
|
|
|
|
'25', // => Commissioned
|
|
|
|
'26', // => Printed
|
|
|
|
'27', // => Recorded
|
|
|
|
'28', // => Sung
|
|
|
|
'29', // => Decor designed
|
|
|
|
'30', // => Form designed
|
|
|
|
'31', // => Modelled
|
|
|
|
'32', // => Autographed/Signed
|
|
|
|
'33', // => Mentioned
|
|
|
|
'34', // => Buried
|
|
|
|
'35', // => Intellectual creation
|
|
|
|
'36', // => Was depicted
|
|
|
|
'37', // => Painted on
|
|
|
|
'38', // => Illustrated
|
|
|
|
];
|
|
|
|
|
2020-08-12 15:51:16 +02:00
|
|
|
const EVENTS_PRODUCTION = ['1','7', '9','10','19','20','26','38'];
|
2020-08-28 23:40:18 +02:00
|
|
|
// Array enthält solche Ereignisse, die nach der Herstellung passiert sein müssen
|
|
|
|
const EVENTS_POST_PRODUCTION = ['2','3','6','8','11','13','14','15','32','34','37'];
|
|
|
|
// Array enthält solche Ereignisse, die vor der Herstellung passiert sein müssen
|
|
|
|
const EVENTS_PRE_PRODUCTION = ['4','12','25','29','30','31','35'];
|
|
|
|
// Array enthält solche Ereignisse, die sich auf Objekte beziehen, die nicht hergestellt wurden
|
|
|
|
const EVENTS_NO_PRODUCTION = ['21'];
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Constants for event types without places, times, actors
|
|
|
|
*/
|
|
|
|
const EVENTS_NO_TIME = [5, 22, 23, 36];
|
|
|
|
const EVENTS_NO_ACTOR = [21, 22, 24, 36];
|
|
|
|
const EVENTS_NO_PLACE = [5, 23, 24];
|
2020-08-12 15:51:16 +02:00
|
|
|
|
2020-08-06 17:57:38 +02:00
|
|
|
/**
|
|
|
|
* Gets a list of the entries in a translated version.
|
|
|
|
*
|
|
|
|
* @param MDTlLoader $tlLoader Translation loader.
|
|
|
|
*
|
|
|
|
* @return array<string>
|
|
|
|
*/
|
|
|
|
public static function getSortedList(MDTlLoader $tlLoader):array {
|
2020-08-06 18:42:38 +02:00
|
|
|
return parent::getTlSortedList($tlLoader, self::EVENT_IDS, "eventtype_name", "eventname");
|
2020-08-06 17:57:38 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2020-08-06 17:32:29 +02:00
|
|
|
}
|