diff --git a/Classes/ViewHelpers/Form/ParseConfigurationViewHelper.php b/Classes/ViewHelpers/Form/ParseConfigurationViewHelper.php new file mode 100644 index 0000000..2a9b516 --- /dev/null +++ b/Classes/ViewHelpers/Form/ParseConfigurationViewHelper.php @@ -0,0 +1,42 @@ +registerArgument('configurationString', 'string', 'Config string', true); + + } + + /** + * @return string + */ + public static function renderStatic( + array $arguments, + \Closure $renderChildrenClosure, + RenderingContextInterface $renderingContext + ) { + + $templateVariableContainer = $renderingContext->getVariableProvider(); + + if ($templateVariableContainer->exists('configuration')) { + $templateVariableContainer->remove('configuration'); + } + $templateVariableContainer->add('configuration', \Slub\SlubForms\Helper\ArrayHelper::configToArray($arguments['configurationString'])); + + return $renderChildrenClosure(); + + } + + +} \ No newline at end of file diff --git a/Resources/Private/Partials/Forms/Captcha.html b/Resources/Private/Partials/Forms/Captcha.html index d8bc3b9..1192a02 100644 --- a/Resources/Private/Partials/Forms/Captcha.html +++ b/Resources/Private/Partials/Forms/Captcha.html @@ -1,3 +1,4 @@ +{namespace sf=Slub\SlubForms\ViewHelpers}