firefly-iii/app/Support/Twig/Translation.php
Scrutinizer Auto-Fixer 58859eb35a Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
2015-06-05 08:40:26 +00:00

42 lines
635 B
PHP

<?php
namespace FireflyIII\Support\Twig;
use Twig_Extension;
use Twig_SimpleFilter;
/**
* Class Budget
*
* @package FireflyIII\Support\Twig
*/
class Translation extends Twig_Extension
{
/**
* @return array
*/
public function getFilters()
{
$filters = [];
$filters[] = new Twig_SimpleFilter(
'_', function($name) {
return trans('firefly.' . $name);
}, ['is_safe' => ['html']]
);
return $filters;
}
/**
* {@inheritDoc}
*/
public function getName()
{
return 'FireflyIII\Support\Twig\Translation';
}
}