| 1 | <?php |
||
| 7 | class UtilitaExtension extends \Twig_Extension |
||
| 8 | { |
||
| 9 | protected $loader; |
||
| 10 | protected $controller; |
||
| 11 | |||
| 12 | 17 | public function __construct(\Twig_LoaderInterface $loader) |
|
| 16 | |||
| 17 | public function setController($controller) |
||
| 21 | |||
| 22 | /** |
||
| 23 | * {@inheritdoc} |
||
| 24 | */ |
||
| 25 | 10 | public function getFunctions() |
|
| 26 | { |
||
| 27 | return array( |
||
| 28 | 10 | new \Twig_SimpleFunction('db2data', array($this, 'getDb2data', 'is_safe' => array('html'))), |
|
| 29 | 10 | ); |
|
| 30 | } |
||
| 31 | |||
| 32 | public function getDb2data($giorno) |
||
| 38 | } |
||
| 39 |