]> git.immae.eu Git - github/wallabag/wallabag.git/blob - src/Wallabag/CoreBundle/Twig/WallabagExtension.php
Fix number of entries in tag/list
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Twig / WallabagExtension.php
1 <?php
2
3 namespace Wallabag\CoreBundle\Twig;
4
5 class WallabagExtension extends \Twig_Extension
6 {
7 public function getFilters()
8 {
9 return [
10 new \Twig_SimpleFilter('removeWww', [$this, 'removeWww']),
11 ];
12 }
13
14 public function removeWww($url)
15 {
16 return preg_replace('/^www\./i', '', $url);
17 }
18
19 public function getName()
20 {
21 return 'wallabag_extension';
22 }
23 }