Add MDCurrenciesSet for controlling currencies
This commit is contained in:
parent
5abbecfad7
commit
7f4c29eff9
2
l18n
2
l18n
|
@ -1 +1 @@
|
||||||
Subproject commit 4b2c9ffee40ae15164b282177faabde441271821
|
Subproject commit 38c989b971471a0b69fe486cedf1d35587640ce8
|
39
src/MDCurrenciesSet.php
Normal file
39
src/MDCurrenciesSet.php
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
<?PHP
|
||||||
|
/**
|
||||||
|
* Contains a class for controlling the list of available currencies.
|
||||||
|
*
|
||||||
|
* @author Joshua Ramon Enslin <joshua@museum-digital.de>
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class containing available currencies.
|
||||||
|
*/
|
||||||
|
class MDCurrenciesSet extends MDValueSet {
|
||||||
|
|
||||||
|
const CURRENCIES = [
|
||||||
|
'',
|
||||||
|
"de-DM",
|
||||||
|
"de-RM",
|
||||||
|
"es-Real",
|
||||||
|
"eu-EUR",
|
||||||
|
"id-IDR",
|
||||||
|
"hu-Ft",
|
||||||
|
'hu-Lari',
|
||||||
|
'hu-Pengő',
|
||||||
|
"pl-Złoty",
|
||||||
|
"us-USD",
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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 {
|
||||||
|
return parent::getTlSortedList($tlLoader, self::CURRENCIES, "currencies_set", "currencies_set");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -24,7 +24,8 @@ class MDValueSet {
|
||||||
|
|
||||||
$output = [];
|
$output = [];
|
||||||
foreach ($keyList as $tID) {
|
foreach ($keyList as $tID) {
|
||||||
$output[$tID] = $tlLoader->tl($tlFileName, $tlVarName, $tID);
|
if ($tID === "") $output[$tID] = "";
|
||||||
|
else $output[$tID] = $tlLoader->tl($tlFileName, $tlVarName, $tID);
|
||||||
}
|
}
|
||||||
|
|
||||||
asort($output);
|
asort($output);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user