[TASK] Improve TranslateViewHelper compiling
This patch improves the TranslateViewHelper by letting it be compiled to a single line of null-coalescing code in the Fluidtemplate. Since the ViewHelper is one of the most frequently used, saving method calls and condition checks here gives a nice result. Removes the need to load the VH class if all templates are compiled, further saving some calls and checks. Change-Id: Ifd3b051305d3cb631d3e8413bac40b4766136aef Resolves: #82454 Releases: master Reviewed-on: https://review.typo3.org/54119 Tested-by:TYPO3com <no-reply@typo3.com> Reviewed-by:
Mathias Schreiber <mathias.schreiber@typo3.com> Tested-by:
Mathias Schreiber <mathias.schreiber@typo3.com> Reviewed-by:
Christian Kuhn <lolli@schwarzbu.ch> Tested-by:
Christian Kuhn <lolli@schwarzbu.ch>
Showing
- typo3/sysext/fluid/Classes/ViewHelpers/TranslateViewHelper.php 48 additions, 28 deletions.../sysext/fluid/Classes/ViewHelpers/TranslateViewHelper.php
- typo3/sysext/fluid/Tests/Unit/ViewHelpers/Fixtures/TranslateViewHelperFixtureForEmptyString.php 1 addition, 1 deletion...ers/Fixtures/TranslateViewHelperFixtureForEmptyString.php