Conditions | 2 |
Paths | 2 |
Total Lines | 21 |
Code Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
16 | protected function addGetTemplate(\Twig_Compiler $compiler) |
||
17 | { |
||
18 | $args = $this->getNode('arguments'); |
||
19 | |||
20 | if (!$args->hasNode(0)) { |
||
21 | throw new \Twig_Error_Runtime(sprintf( |
||
22 | 'Function "%s" requires an object as its first argument', |
||
23 | $this->getAttribute('name') |
||
24 | )); |
||
25 | } |
||
26 | $objectArg = $args->getNode(0); |
||
27 | $compiler |
||
28 | ->write('$this->loadTemplate(') |
||
29 | ->write('$this->env->getExtension("Psi\Bundle\ObjectRender\Twig\ObjectRenderExtension")->locateFile(') |
||
30 | ->subcompile($objectArg) |
||
31 | ->raw('), ') |
||
32 | ->repr($this->getAttribute('name')) |
||
33 | ->raw(', ') |
||
34 | ->repr($this->getLine()) |
||
|
|||
35 | ->raw(')'); |
||
36 | } |
||
37 | |||
47 |
This method has been deprecated. The supplier of the class has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.