Explorar o código

Add twig filter to display date in time ago string - refs BT#14381

Angel Fernando Quiroz Campos %!s(int64=6) %!d(string=hai) anos
pai
achega
15f99ccdd5
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      main/inc/lib/template.lib.php

+ 4 - 0
main/inc/lib/template.lib.php

@@ -175,6 +175,10 @@ class Template
                 'name' => 'get_template',
                 'callable' => 'Template::findTemplateFilePath',
             ],
+            [
+                'name' => 'date_to_time_ago',
+                'callable' => 'Display::dateToStringAgoAndLongDate'
+            ],
         ];
 
         foreach ($filters as $filter) {