|
@@ -3,30 +3,34 @@
|
|
|
|
|
|
namespace Chamilo\CoreBundle\Twig\Extension;
|
|
|
|
|
|
+use Twig\Extension\AbstractExtension;
|
|
|
+use Twig\TwigFilter;
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* Class ChamiloExtension.
|
|
|
*
|
|
|
* @package Chamilo\CoreBundle\Twig\Extension
|
|
|
*/
|
|
|
-class ChamiloExtension extends \Twig_Extension
|
|
|
+class ChamiloExtension extends AbstractExtension
|
|
|
{
|
|
|
/**
|
|
|
* @return array
|
|
|
*/
|
|
|
- public function getFilters()
|
|
|
+ public function getFilters(): array
|
|
|
{
|
|
|
return [
|
|
|
- new \Twig_SimpleFilter('var_dump', 'var_dump'),
|
|
|
- new \Twig_SimpleFilter('icon', 'Template::get_icon_path'),
|
|
|
- new \Twig_SimpleFilter('get_lang', 'get_lang'),
|
|
|
- new \Twig_SimpleFilter('get_plugin_lang', 'get_plugin_lang'),
|
|
|
- new \Twig_SimpleFilter('icon', 'Template::get_icon_path'),
|
|
|
- new \Twig_SimpleFilter('img', 'Template::get_image'),
|
|
|
- new \Twig_SimpleFilter('api_get_local_time', 'api_get_local_time'),
|
|
|
- new \Twig_SimpleFilter('format_date', 'Template::format_date'),
|
|
|
- new \Twig_SimpleFilter('date_to_time_ago', 'Display::dateToStringAgoAndLongDate'),
|
|
|
- new \Twig_SimpleFilter('api_get_configuration_value', 'api_get_configuration_value'),
|
|
|
- new \Twig_SimpleFilter('format_user_full_name', 'UserManager::formatUserFullName'),
|
|
|
+ new TwigFilter('var_dump', 'var_dump'),
|
|
|
+ new TwigFilter('icon', 'Display::get_icon_path'),
|
|
|
+ new TwigFilter('get_lang', 'get_lang'),
|
|
|
+ new TwigFilter('get_plugin_lang', 'get_plugin_lang'),
|
|
|
+ new TwigFilter('icon', 'Display::get_icon_path'),
|
|
|
+ new TwigFilter('img', 'Display::get_image'),
|
|
|
+ new TwigFilter('api_get_local_time', 'api_get_local_time'),
|
|
|
+ new TwigFilter('format_date', 'api_format_date'),
|
|
|
+ new TwigFilter('date_to_time_ago', 'Display::dateToStringAgoAndLongDate'),
|
|
|
+ new TwigFilter('api_get_configuration_value', 'api_get_configuration_value'),
|
|
|
+ new TwigFilter('format_user_full_name', 'UserManager::formatUserFullName'),
|
|
|
];
|
|
|
}
|
|
|
|