[FEATURE] Switch View Helper 55/21155/6
authorWouter Wolters <typo3@wouterwolters.nl>
Wed, 29 May 2013 17:06:33 +0000 (19:06 +0200)
committerFelix Kopp <felix-source@phorax.com>
Tue, 4 Jun 2013 21:17:08 +0000 (23:17 +0200)
commitfe22a97f6b371a3b491f65294703840cdf1a8ecf
treea10af906af2c130ed20dc717e30ec3e1905ea543
parent8311353fa1c68bde99b64111a058d77411c3f998
[FEATURE] Switch View Helper

Simple view helper that allows you to render content depending
on a given value or expression.
It bahaves similar to a basic switch statement in PHP.

Usage:

<f:switch expression="{person.gender}">
  <f:case value="male">Mr.</f:case>
  <f:case value="female">Mrs.</f:case>
</f:switch>

Change-Id: I44a7066dfa86785f795069e0f06391cb45fa373c
Resolves: #48653
Releases: 6.2
Reviewed-on: https://review.typo3.org/21155
Reviewed-by: Alexander Schnitzler
Tested-by: Alexander Schnitzler
Reviewed-by: Jigal van Hemert
Tested-by: Jigal van Hemert
Reviewed-by: Felix Kopp
Tested-by: Felix Kopp
typo3/sysext/fluid/Classes/ViewHelpers/CaseViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/SwitchViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/CaseViewHelperTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/SwitchViewHelperTest.php [new file with mode: 0644]