]> git.immae.eu Git - github/wallabag/wallabag.git/blame - src/Wallabag/CoreBundle/Twig/WallabagExtension.php
Portuguese (Brazilian) translation
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Twig / WallabagExtension.php
CommitLineData
72fcaf8a
NL
1<?php
2
3namespace Wallabag\CoreBundle\Twig;
4
5class WallabagExtension extends \Twig_Extension
6{
7 public function getFilters()
8 {
4094ea47
JB
9 return [
10 new \Twig_SimpleFilter('removeWww', [$this, 'removeWww']),
11 ];
72fcaf8a
NL
12 }
13
14 public function removeWww($url)
15 {
cfb28c9d 16 return preg_replace('/^www\./i', '', $url);
72fcaf8a
NL
17 }
18
19 public function getName()
20 {
21 return 'wallabag_extension';
22 }
23}