Add functions for listing event actor names, time names, place names
This commit is contained in:
parent
1dedb86d5b
commit
1108398437
2
l18n
2
l18n
@ -1 +1 @@
|
||||
Subproject commit eea900820d19567f28d87bae7afda04e8cfde7b8
|
||||
Subproject commit 8a2501a62c581a86dd4e08191376974ae3a6d3bc
|
@ -95,4 +95,46 @@ final class MDEventsSet extends MDValueSet {
|
||||
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;
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user