Total Complexity | 3 |
Total Lines | 21 |
Duplicated Lines | 0 % |
Coverage | 57.14% |
Changes | 0 |
1 | <?php |
||
5 | class UtilitaExtension extends \Twig_Extension |
||
6 | { |
||
7 | public $container; |
||
8 | /** |
||
9 | * {@inheritdoc} |
||
10 | */ |
||
11 | public function getFunctions() |
||
12 | { |
||
13 | return array( |
||
14 | new \Twig_SimpleFunction('json_decode', array($this, 'jsonDecode', 'is_safe' => array('html'))), |
||
15 | new \Twig_SimpleFunction('parameter', array($this, 'getParameter', 'is_safe' => array('html'))), |
||
16 | ); |
||
17 | } |
||
18 | |||
19 | 7 | public function jsonDecode($string) |
|
22 | } |
||
23 | 10 | public function getParameter($parameter) |
|
26 | } |
||
27 | } |
||
28 |