[FEATURE] Fallback/default case for SwitchViewhelper 58/26058/2
authorJan Kiesewetter <jan@t3easy.de>
Sun, 27 Oct 2013 10:22:44 +0000 (11:22 +0100)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Mon, 10 Feb 2014 21:31:47 +0000 (22:31 +0100)
commit3f6b1cd06425dbfb4c686d382ec1e77eb05bc842
treed828617918894559d38f643eaa15298aaa9ef340
parentdda0354d615ed247cae4108cbf638c6c5308f29c
[FEATURE] Fallback/default case for SwitchViewhelper

In order to provide the full functionality known from the
switch/case PHP function, a default case possibility is
introduced. Use it like:
<f:switch expression="{person.gender}">
  <f:case value="female">Mrs.</f:case>
  <f:case value="male">Mr.</f:case>
  <f:case default="TRUE">Mrs. or Mr.</f:case>
</f:switch>

Change-Id: Ib9468cdabd66fb8b484cb4d07520d5b529548dd1
Resolves: #49371
Documentation: #54283
Releases: 6.2
Reviewed-on: https://review.typo3.org/26058
Reviewed-by: Benjamin Kott
Tested-by: Benjamin Kott
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
typo3/sysext/fluid/Classes/ViewHelpers/CaseViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/SwitchViewHelper.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/CaseViewHelperTest.php