Add controlled list of entry types
This commit is contained in:
2
l18n
2
l18n
Submodule l18n updated: 6bcdd794ca...7a97fb5961
47
src/MDEntryTypesSet.php
Normal file
47
src/MDEntryTypesSet.php
Normal 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");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Reference in New Issue
Block a user