Total Complexity | 3 |
Total Lines | 52 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
27 | class BeditaTwigExtension extends AbstractExtension |
||
28 | { |
||
29 | /** |
||
30 | * @inheritDoc |
||
31 | */ |
||
32 | public function getName(): string |
||
35 | } |
||
36 | |||
37 | /** |
||
38 | * @inheritDoc |
||
39 | */ |
||
40 | public function getFunctions(): array |
||
41 | { |
||
42 | return [ |
||
43 | new TwigFunction('config', [Configure::class, 'read']), |
||
44 | new TwigFunction('write_config', function ($key, $val): void { |
||
45 | // avoid unwanted return value display in templates |
||
46 | Configure::write($key, $val); |
||
47 | }), |
||
48 | ]; |
||
49 | } |
||
50 | |||
51 | /** |
||
52 | * @inheritDoc |
||
53 | */ |
||
54 | public function getFilters(): array |
||
79 | } |
||
80 | ), |
||
84 |