| Conditions | 3 |
| Paths | 3 |
| Total Lines | 20 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 15 |
| CRAP Score | 3.0021 |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | 2 | public function compile(\Twig_Compiler $compiler) |
|
| 23 | { |
||
| 24 | 2 | $compiler->addDebugInfo($this); |
|
| 25 | |||
| 26 | 2 | $body = $this->getNode('body'); |
|
| 27 | |||
| 28 | 2 | if ($body instanceof \Twig_Node_Expression_Constant) { |
|
| 29 | $body = new \Twig_Node_Expression_Constant(trim($body->getAttribute('value')), $body->getLine()); |
||
| 30 | 2 | } elseif ($body instanceof \Twig_Node_Text) { |
|
| 31 | 2 | $body = new \Twig_Node_Expression_Constant(trim($body->getAttribute('data')), $body->getLine()); |
|
| 32 | 2 | } |
|
| 33 | |||
| 34 | 2 | $compiler->write('echo $this->env->getExtension(\'ivoaz_content_editable\')->render(') |
|
| 35 | 2 | ->subcompile($body) |
|
| 36 | 2 | ->raw(',') |
|
| 37 | 2 | ->repr($this->getAttribute('name')) |
|
| 38 | 2 | ->raw(',') |
|
| 39 | 2 | ->repr($this->getAttribute('options')) |
|
| 40 | 2 | ->raw(');'); |
|
| 41 | 2 | } |
|
| 42 | } |
||
| 43 |