]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - inc/poche/Poche.class.php
I removed my previous commit. We have to create a new branch for that.
[github/wallabag/wallabag.git] / inc / poche / Poche.class.php
index e8c320249c01925302c293a405ada1f2771b06fa..09a9f5ff85276423a29b505312d2f1cec66ead8a 100755 (executable)
@@ -232,6 +232,14 @@ class Poche
 
         $this->tpl = new Twig_Environment($loaderChain, $twigParams);
         $this->tpl->addExtension(new Twig_Extensions_Extension_I18n());
+
+        # filter to display domain name of an url
+        $filter = new Twig_SimpleFilter('getDomain', 'Tools::getDomain');
+        $this->tpl->addFilter($filter);
+
+        # filter for reading time
+        $filter = new Twig_SimpleFilter('getReadingTime', 'Tools::getReadingTime');
+        $this->tpl->addFilter($filter);
     }
 
     public function createNewUser() {