[TASK] Improve TranslateViewHelper compiling 19/54119/9
authorClaus Due <claus@namelesscoder.net>
Mon, 11 Sep 2017 15:03:37 +0000 (17:03 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Thu, 1 Mar 2018 22:54:49 +0000 (23:54 +0100)
commit852ad1d9ad6f3bac4c977d2466d1875f9e632e01
tree16dd911dbd27c2d8aedd9d98a439539c63e2eac2
parent17c4580cec21a9dca51566cdfd153fecc214c55d
[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>
typo3/sysext/fluid/Classes/ViewHelpers/TranslateViewHelper.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Fixtures/TranslateViewHelperFixtureForEmptyString.php