Centralize getSortedList in parent class
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
/**
|
||||
* Class containing available units for events.
|
||||
*/
|
||||
class MDEventsSet {
|
||||
class MDEventsSet extends MDValueSet {
|
||||
|
||||
const EVENT_IDS = [
|
||||
'1', // => Created
|
||||
@ -57,14 +57,7 @@ class MDEventsSet {
|
||||
* @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;
|
||||
return parent::getSortedList($tlLoader, self::EVENT_IDS, "eventtype_name", "eventname");
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user