Add MDPlacetypesSet for controlling place types

This commit is contained in:
Joshua Ramon Enslin 2020-08-06 21:05:40 +02:00 committed by Stefan Rohde-Enslin
parent 5ed9b68559
commit 5abbecfad7
2 changed files with 38 additions and 1 deletions

2
l18n

@ -1 +1 @@
Subproject commit 3ba5f740e6da9d45eefcb10a4981178dd35631a8
Subproject commit 4b2c9ffee40ae15164b282177faabde441271821

37
src/MDPlacetypesSet.php Normal file
View File

@ -0,0 +1,37 @@
<?PHP
/**
* Contains a class for controlling the list of available place types.
*
* @author Joshua Ramon Enslin <joshua@museum-digital.de>
*/
/**
* Class containing available place types.
*/
class MDPlacetypesSet extends MDValueSet {
const PLACE_TYPE_IDS = [
'0', // => Administrativ
'1', // => Historisch
'2', // => Region - Landschaft - Naturpark
'3', // => Straße - Platz
'4', // => Bauwerk - Gebäude - Stadtpark - Kanal
'5', // => Berg - Gebirge
'6', // => Wald - Forst
'7', // => Fluss - See - Meer
'8', // => Insel - Atoll
];
/**
* 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 {
return parent::getTlSortedList($tlLoader, self::PLACE_TYPE_IDS, "placetypes", "tlPlacetypes");
}
}