Add static function for getting a sorted, translated list of event types
This commit is contained in:
parent
96c562efd3
commit
d4557c8cbd
2
l18n
2
l18n
|
@ -1 +1 @@
|
|||
Subproject commit d62d3eb5b774740b6ceeec45a13eccf6be5fae60
|
||||
Subproject commit 8d4634f65fe004899fd054001cc1d10d62d5c0d6
|
|
@ -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;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user