Add static function for getting a sorted, translated list of event types

This commit is contained in:
jrenslin authored and Stefan Rohde-Enslin committed 2020-08-06 17:57:38 +02:00
1 parent 96c562efd3
commit d4557c8cbd
2 files changed
+20 -1

No files matched your search

+1 -1
Submodule l18n updated: d62d3eb5b7...8d4634f65f.
+19
View File
@@ -49,4 +49,23 @@ class MDEventsSet {
'38', // => Illustrated
];
/**
* 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 {
$output = [];
foreach (self::EVENT_IDS as $tID) {
$output[$tID] = $tlLoader->tl("eventtype_name", "eventname", $tID);
}
asort($eventTypes);
return $output;
}
}