File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,8 @@ services:
40
40
$entityManager : ' @?doctrine.orm.entity_manager'
41
41
public : true
42
42
43
+ Codefog\HasteBundle\Twig\HasteExtension : ~
44
+
43
45
# StringParser
44
46
Codefog\HasteBundle\StringParser :
45
47
public : true
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ declare (strict_types=1 );
4
+
5
+ namespace Codefog \HasteBundle \Twig ;
6
+
7
+ use Codefog \HasteBundle \Formatter ;
8
+ use Twig \Extension \AbstractExtension ;
9
+ use Twig \TwigFunction ;
10
+
11
+ class HasteExtension extends AbstractExtension
12
+ {
13
+ public function __construct (private readonly Formatter $ formatter )
14
+ {
15
+ }
16
+
17
+ public function getFunctions (): array
18
+ {
19
+ return [
20
+ new TwigFunction ('dca_label ' , $ this ->formatter ->dcaLabel (...)),
21
+ new TwigFunction ('dca_value ' , $ this ->formatter ->dcaValue (...)),
22
+ ];
23
+ }
24
+ }
You can’t perform that action at this time.
0 commit comments