| @@ 47-63 (lines=17) @@ | ||
| 44 | * @param TemplateCompiler $compiler |
|
| 45 | * @return string |
|
| 46 | */ |
|
| 47 | public function compile( |
|
| 48 | $argumentsName, |
|
| 49 | $closureName, |
|
| 50 | &$initializationPhpCode, |
|
| 51 | ViewHelperNode $node, |
|
| 52 | TemplateCompiler $compiler |
|
| 53 | ) { |
|
| 54 | list ($initialization, $execution) = ViewHelperCompiler::getInstance()->compileWithCallToStaticMethod( |
|
| 55 | $this, |
|
| 56 | $argumentsName, |
|
| 57 | $closureName, |
|
| 58 | ViewHelperCompiler::RENDER_STATIC, |
|
| 59 | static::class |
|
| 60 | ); |
|
| 61 | $initializationPhpCode .= $initialization; |
|
| 62 | return $execution; |
|
| 63 | } |
|
| 64 | ||
| 65 | /** |
|
| 66 | * Helper which is mostly needed when calling renderStatic() from within |
|
| @@ 25-39 (lines=15) @@ | ||
| 22 | * @param TemplateCompiler $compiler |
|
| 23 | * @return string |
|
| 24 | */ |
|
| 25 | public function compile( |
|
| 26 | $argumentsName, |
|
| 27 | $closureName, |
|
| 28 | &$initializationPhpCode, |
|
| 29 | ViewHelperNode $node, |
|
| 30 | TemplateCompiler $compiler |
|
| 31 | ) { |
|
| 32 | list ($initialization, $execution) = ViewHelperCompiler::getInstance()->compileWithCallToStaticMethod( |
|
| 33 | $this, |
|
| 34 | $argumentsName, |
|
| 35 | $closureName |
|
| 36 | ); |
|
| 37 | $initializationPhpCode .= $initialization; |
|
| 38 | return $execution; |
|
| 39 | } |
|
| 40 | } |
|
| 41 | ||