Conditions | 2 |
Paths | 2 |
Total Lines | 17 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
52 | public function render($value, $object, $primary, \Twig_Environment $twig) |
||
53 | { |
||
54 | /** dont use twig if no template is provided */ |
||
55 | if (null === $this->getOption('template')) { |
||
56 | return $this->getOption('prefix').$value; |
||
57 | } |
||
58 | |||
59 | return $this->renderTemplate( |
||
60 | $twig, |
||
61 | $this->getOption('template'), |
||
62 | [ |
||
63 | 'value' => $value, |
||
64 | 'object' => $object, |
||
65 | 'primary' => $primary, |
||
66 | ] |
||
67 | ); |
||
68 | } |
||
69 | } |
||
70 |