Display meta-fields in datatables (#1116)

This commit is contained in:
Kevin Papst
2019-09-19 20:28:31 +02:00
committed by GitHub
parent 24cbe3d281
commit 5aa422dde1
71 changed files with 1461 additions and 212 deletions

View File

@@ -16,6 +16,7 @@ use App\Utils\LocaleSettings;
use NumberFormatter;
use Symfony\Component\Intl\Countries;
use Symfony\Component\Intl\Currencies;
use Symfony\Component\Intl\Languages;
use Symfony\Component\Intl\Locales;
use Twig\Extension\AbstractExtension;
use Twig\TwigFilter;
@@ -67,6 +68,7 @@ class Extensions extends AbstractExtension
new TwigFilter('money', [$this, 'money']),
new TwigFilter('currency', [$this, 'currency']),
new TwigFilter('country', [$this, 'country']),
new TwigFilter('language', [$this, 'language']),
new TwigFilter('docu_link', [$this, 'documentationLink']),
];
}
@@ -162,6 +164,15 @@ class Extensions extends AbstractExtension
return Currencies::getSymbol($currency);
}
/**
* @param string $language
* @return string
*/
public function language($language)
{
return Languages::getName($language, $this->locale);
}
/**
* @param string $country
* @return string