From 7bc28d5d304b799984f2f8dcf9046f06540bac20 Mon Sep 17 00:00:00 2001 From: Joshua Ramon Enslin Date: Sat, 5 Sep 2020 15:05:31 +0200 Subject: [PATCH] Add MDConservationReportTypeSet --- l18n | 2 +- src/MDConservationReportTypeSet.php | 35 +++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 src/MDConservationReportTypeSet.php diff --git a/l18n b/l18n index 6d52ec1..9d3453e 160000 --- a/l18n +++ b/l18n @@ -1 +1 @@ -Subproject commit 6d52ec1208b27211957290d23c1b5432ce032f16 +Subproject commit 9d3453e4c19a719b1b2a41ff080638f63decec0b diff --git a/src/MDConservationReportTypeSet.php b/src/MDConservationReportTypeSet.php new file mode 100644 index 0000000..f7524cd --- /dev/null +++ b/src/MDConservationReportTypeSet.php @@ -0,0 +1,35 @@ + + */ +declare(strict_types = 1); + +/** + * Class containing static functions for getting available conservation report types. + */ +final class MDConservationReportTypeSet extends MDValueSet { + + const REPORT_TYPES = [ + 'damage', + 'conservation', + 'condition', + 'restoration', + 'other', + ]; + + /** + * 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::REPORT_TYPES, "conservation_report_type_set", "conservation_report_type_set"); + + } + +}