Add MDSpaceTypesSet and MDSpaceAccessStatusSet

This commit is contained in:
Joshua Ramon Enslin 2022-09-27 01:10:11 +02:00
parent 4e4211cc02
commit 8a04c9d3e0
Signed by: jrenslin
GPG Key ID: 46016F84501B70AE
4 changed files with 74 additions and 3 deletions

2
l18n

@ -1 +1 @@
Subproject commit a57e56f0f1a07becf0463c038f8e28be0ccf7f1b Subproject commit a9499566d0ce2a4d80fd0525c979ca7237ba2314

View File

@ -1,13 +1,13 @@
<?PHP <?PHP
/** /**
* Contains a class of available licenses. * Contains a class of available source types.
* *
* @author Joshua Ramon Enslin <joshua@museum-digital.de> * @author Joshua Ramon Enslin <joshua@museum-digital.de>
*/ */
declare(strict_types = 1); declare(strict_types = 1);
/** /**
* Class containing static functions for getting available licenses on md. * Class containing static functions for getting available source types on md.
*/ */
final class MDSourceTypeSet extends MDValueSet { final class MDSourceTypeSet extends MDValueSet {

View File

@ -0,0 +1,31 @@
<?PHP
/**
* Contains a class of available space access status.
*
* @author Joshua Ramon Enslin <joshua@museum-digital.de>
*/
declare(strict_types = 1);
/**
* Class containing static functions for getting available space access status on md.
*/
final class MDSpaceAccessStatusSet extends MDValueSet {
const STATUS = [
'enter',
'leave',
];
/**
* 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::STATUS, "space_access_status", "space_access_status");
}
}

40
src/MDSpaceTypesSet.php Normal file
View File

@ -0,0 +1,40 @@
<?PHP
/**
* Contains a class of available space types.
*
* @author Joshua Ramon Enslin <joshua@museum-digital.de>
*/
declare(strict_types = 1);
/**
* Class containing static functions for getting available space types on md.
*/
final class MDSpaceTypesSet extends MDValueSet {
const TYPES = [
'building',
'floor',
'depot',
'utility_room',
'office',
'exhibition_room',
'hallway',
'display_cabinet',
'shelf',
'box',
'folder',
];
/**
* 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::STATUS, "space_types", "space_types");
}
}