Add controlled list of entry types

This commit is contained in:
Joshua Ramon Enslin 2020-08-07 17:36:10 +02:00 committed by Stefan Rohde-Enslin
parent 1e4f56b987
commit 388f843144
2 changed files with 48 additions and 1 deletions

2
l18n

@ -1 +1 @@
Subproject commit 6bcdd794ca934d73a2730c74056dd1e14ea64835
Subproject commit 7a97fb5961d17e0bf4e6186a79e248fa62680350

47
src/MDEntryTypesSet.php Normal file
View File

@ -0,0 +1,47 @@
<?PHP
/**
* Contains a class for controlling the list of available marking types.
*
* @author Joshua Ramon Enslin <joshua@museum-digital.de>
*/
declare(strict_types = 1);
/**
* Class containing available marking types.
*/
class MDEntryTypesSet extends MDValueSet {
const ENTRY_TYPES = [
'0', //
'1', // Schenkung
'2', // Kauf
'3', // Grabung
'4', // Notbergung
'5', // Erbschaft / Nachlass
'6', // Stiftung
'7', // Enteignung
'8', // Ursprungsbestand
'9', // Leihgabe
'10', // Tausch
'11', // Eigenproduktion
'12', // Material Strain (Törzsanyag)
'14', // Vorlass
'15', // Fund
'16', // Dauerleihgabe
'98', // Ungeklärt
'99', // Anderer rechtmäßiger Zugang
];
/**
* Gets a sorted list of the entries in a translated version.
*
* @param MDTlLoader $tlLoader Translation loader.
*
* @return array<string>
*/
public static function getSortedList(MDTlLoader $tlLoader):array {
return parent::getTlSortedList($tlLoader, self::ENTRY_TYPES, "entry_types", "entry_types");
}
}