Add functions for listing event actor names, time names, place names
This commit is contained in:
2
l18n
2
l18n
Submodule l18n updated: eea900820d...8a2501a62c
@@ -95,4 +95,46 @@ final class MDEventsSet extends MDValueSet {
|
|||||||
return parent::getTlSortedList($tlLoader, self::EVENT_IDS, "eventtype_name", "eventname");
|
return parent::getTlSortedList($tlLoader, self::EVENT_IDS, "eventtype_name", "eventname");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets a list of the entries in a translated version (actor focus).
|
||||||
|
*
|
||||||
|
* @param MDTlLoader $tlLoader Translation loader.
|
||||||
|
*
|
||||||
|
* @return array<string>
|
||||||
|
*/
|
||||||
|
public static function getSortedListActors(MDTlLoader $tlLoader):array {
|
||||||
|
$output = parent::getTlSortedList($tlLoader, self::EVENT_IDS, "eventtype_persinst", "event_persinst");
|
||||||
|
foreach (self::EVENTS_NO_ACTOR as $id) unset($output[$id]);
|
||||||
|
return $output;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets a list of the entries in a translated version (place focus).
|
||||||
|
*
|
||||||
|
* @param MDTlLoader $tlLoader Translation loader.
|
||||||
|
*
|
||||||
|
* @return array<string>
|
||||||
|
*/
|
||||||
|
public static function getSortedListPlaces(MDTlLoader $tlLoader):array {
|
||||||
|
$output = parent::getTlSortedList($tlLoader, self::EVENT_IDS, "eventtype_place", "event_place");
|
||||||
|
foreach (self::EVENTS_NO_PLACE as $id) unset($output[$id]);
|
||||||
|
return $output;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets a list of the entries in a translated version.
|
||||||
|
*
|
||||||
|
* @param MDTlLoader $tlLoader Translation loader.
|
||||||
|
*
|
||||||
|
* @return array<string>
|
||||||
|
*/
|
||||||
|
public static function getSortedListTimes(MDTlLoader $tlLoader):array {
|
||||||
|
$output = parent::getTlSortedList($tlLoader, self::EVENT_IDS, "eventtype_time", "event_time");
|
||||||
|
foreach (self::EVENTS_NO_TIME as $id) unset($output[$id]);
|
||||||
|
return $output;
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user