From 3d4b453ee63b493612270521d622ccea4cb09d71 Mon Sep 17 00:00:00 2001 From: Joshua Ramon Enslin Date: Tue, 1 Sep 2020 23:32:10 +0200 Subject: [PATCH] Add source type set (MDSourceTypeSet) --- l18n | 2 +- src/MDSourceTypeSet.php | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 src/MDSourceTypeSet.php diff --git a/l18n b/l18n index 9fb2ee2..6d52ec1 160000 --- a/l18n +++ b/l18n @@ -1 +1 @@ -Subproject commit 9fb2ee21ac93cd883f326601b7e78eecad700582 +Subproject commit 6d52ec1208b27211957290d23c1b5432ce032f16 diff --git a/src/MDSourceTypeSet.php b/src/MDSourceTypeSet.php new file mode 100644 index 0000000..f98cc2e --- /dev/null +++ b/src/MDSourceTypeSet.php @@ -0,0 +1,36 @@ + + */ +declare(strict_types = 1); + +/** + * Class containing static functions for getting available licenses on md. + */ +final class MDSourceTypeSet extends MDValueSet { + + const SOURCE_TYPES = [ + 'article', + 'inbook', + 'book', + 'phdthesis', + 'electronical', + 'misc', + ]; + + /** + * 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::SOURCE_TYPES, "source_type_set", "source_type_set"); + + } + +}