Add static function for getting a sorted, translated list of event types
This commit is contained in:
2
l18n
2
l18n
Submodule l18n updated: d62d3eb5b7...8d4634f65f
@@ -49,4 +49,23 @@ class MDEventsSet {
|
|||||||
'38', // => Illustrated
|
'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;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user