@@ -29,6 +29,9 @@ |
||
| 29 | 29 | return $output; |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | + /** |
|
| 33 | + * @param string $componentName |
|
| 34 | + */ |
|
| 32 | 35 | public function renderComponent(Twig_Environment $env, $context, $componentName, $data = [], $withContext = true, $ignoreMissing = false, $sandboxed = false) |
| 33 | 36 | { |
| 34 | 37 | $data = $this->getComponentData($data, $componentName); |
@@ -9,16 +9,16 @@ |
||
| 9 | 9 | |
| 10 | 10 | class TwigExtensionFlynt extends Twig_Extension { |
| 11 | 11 | |
| 12 | - public function getName() { |
|
| 13 | - return 'twig_extension_flynt'; |
|
| 14 | - } |
|
| 12 | + public function getName() { |
|
| 13 | + return 'twig_extension_flynt'; |
|
| 14 | + } |
|
| 15 | 15 | |
| 16 | - public function getFunctions() { |
|
| 17 | - return array( |
|
| 16 | + public function getFunctions() { |
|
| 17 | + return array( |
|
| 18 | 18 | new Twig_SimpleFunction('renderComponent', [$this, 'renderComponent'], array('needs_environment' => true, 'needs_context' => true, 'is_safe' => array('all'))), |
| 19 | 19 | new Twig_SimpleFunction('renderFlexibleContent', [$this, 'renderFlexibleContent'], array('needs_environment' => true, 'needs_context' => true, 'is_safe' => array('all'))), |
| 20 | - ); |
|
| 21 | - } |
|
| 20 | + ); |
|
| 21 | + } |
|
| 22 | 22 | |
| 23 | 23 | public function renderFlexibleContent(Twig_Environment $env, $context, $fields, $withContext = true, $ignoreMissing = false, $sandboxed = false) |
| 24 | 24 | { |