From 8a04c9d3e0360b965fa0b54ee80164948a9e89e7 Mon Sep 17 00:00:00 2001 From: Joshua Ramon Enslin Date: Tue, 27 Sep 2022 01:10:11 +0200 Subject: [PATCH] Add MDSpaceTypesSet and MDSpaceAccessStatusSet --- l18n | 2 +- src/MDSourceTypeSet.php | 4 ++-- src/MDSpaceAccessStatusSet.php | 31 ++++++++++++++++++++++++++ src/MDSpaceTypesSet.php | 40 ++++++++++++++++++++++++++++++++++ 4 files changed, 74 insertions(+), 3 deletions(-) create mode 100644 src/MDSpaceAccessStatusSet.php create mode 100644 src/MDSpaceTypesSet.php diff --git a/l18n b/l18n index a57e56f..a949956 160000 --- a/l18n +++ b/l18n @@ -1 +1 @@ -Subproject commit a57e56f0f1a07becf0463c038f8e28be0ccf7f1b +Subproject commit a9499566d0ce2a4d80fd0525c979ca7237ba2314 diff --git a/src/MDSourceTypeSet.php b/src/MDSourceTypeSet.php index 166f2b5..3fe65dc 100644 --- a/src/MDSourceTypeSet.php +++ b/src/MDSourceTypeSet.php @@ -1,13 +1,13 @@ */ 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 { diff --git a/src/MDSpaceAccessStatusSet.php b/src/MDSpaceAccessStatusSet.php new file mode 100644 index 0000000..af41a2f --- /dev/null +++ b/src/MDSpaceAccessStatusSet.php @@ -0,0 +1,31 @@ + + */ +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 + */ + public static function getSortedList(MDTlLoader $tlLoader):array { + + return parent::getTlSortedList($tlLoader, self::STATUS, "space_access_status", "space_access_status"); + + } +} diff --git a/src/MDSpaceTypesSet.php b/src/MDSpaceTypesSet.php new file mode 100644 index 0000000..8926d32 --- /dev/null +++ b/src/MDSpaceTypesSet.php @@ -0,0 +1,40 @@ + + */ +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 + */ + public static function getSortedList(MDTlLoader $tlLoader):array { + + return parent::getTlSortedList($tlLoader, self::STATUS, "space_types", "space_types"); + + } +}