[TYPO3-mvc] injectTagBuilder
Christian Opitz
christian.opitz at netzelf.de
Wed Jun 8 15:32:17 CEST 2011
Hi,
I developed an extension that connects formhandler and fluid [1], so
that it's possible to use fluid-views for formhandler. With this I
extended the form-viewHelpers with some enhancements like f.i. that
setting the complete form to readonly makes the form elements render
it's values instead of the inputs or that labels automatically get a
class 'error' when the corresponding element has errors.
I managed this by injecting a parser-interceptor[2] which injected a
custom tag builder[3] to the current node when it is inside a form and
instanceof Tx_Fluid_ViewHelpers_Form_AbstractFormFieldViewHelper. This
tag builder extends Tx_Fluid_Core_ViewHelper_TagBuilder, evaluates the
label attribute and removes it before calling parent::render() and
extracts the values when form is readonly.
Now I upgraded to 4.5 and nothing works anymore. First issue was that
Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode::getViewHelper was - I
guess - renamed to getUninitializedViewHelper(). No bigger problem to
solve that. But the second one I could not solve: There's no
Tx_Fluid_Core_ViewHelper_TagBasedViewHelper::injectTagBuilder() anymore?
The reason why I went the way with the interceptor was that I didn't
find a way to hook into existing view helpers without extending from
them - has something changed on this meanwhile?
Or could I have
Tx_Fluid_Core_ViewHelper_TagBasedViewHelper::injectTagBuilder() back
please?^^
[1] http://forge.typo3.org/projects/extension-formhandler_fluid
[2]
http://forge.typo3.org/projects/extension-formhandler_fluid/repository/changes/trunk/Classes/Core/Parser/Interceptor.php
[3]
http://forge.typo3.org/projects/extension-formhandler_fluid/repository/changes/trunk/Classes/Core/ViewHelper/FormTagBuilder.php
Regards,
Christian
More information about the TYPO3-project-typo3v4mvc
mailing list