Add MDPlacetypesSet for controlling place types
This commit is contained in:
parent
5ed9b68559
commit
5abbecfad7
2
l18n
2
l18n
|
@ -1 +1 @@
|
|||
Subproject commit 3ba5f740e6da9d45eefcb10a4981178dd35631a8
|
||||
Subproject commit 4b2c9ffee40ae15164b282177faabde441271821
|
37
src/MDPlacetypesSet.php
Normal file
37
src/MDPlacetypesSet.php
Normal 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");
|
||||
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user