[TASK] Sync CMS Fluid with Flow Fluid 1.1 (part1)
[Packages/TYPO3.CMS.git] / typo3 / sysext / fluid / Classes / ViewHelpers / ElseViewHelper.php
1 <?php
2 namespace TYPO3\CMS\Fluid\ViewHelpers;
3
4 /* *
5 * This script is backported from the TYPO3 Flow package "TYPO3.Fluid". *
6 * *
7 * It is free software; you can redistribute it and/or modify it under *
8 * the terms of the GNU Lesser General Public License, either version 3 *
9 * of the License, or (at your option) any later version. *
10 * *
11 * The TYPO3 project - inspiring people to share! *
12 * */
13
14 /**
15 * Else-Branch of a condition. Only has an effect inside of "If". See the If-ViewHelper for documentation.
16 *
17 * = Examples =
18 *
19 * <code title="Output content if condition is not met">
20 * <f:if condition="{someCondition}">
21 * <f:else>
22 * condition was not true
23 * </f:else>
24 * </f:if>
25 * </code>
26 * <output>
27 * Everything inside the "else" tag is displayed if the condition evaluates to FALSE.
28 * Otherwise nothing is outputted in this example.
29 * </output>
30 *
31 * @see TYPO3\CMS\Fluid\ViewHelpers\IfViewHelper
32 * @api
33 */
34 class ElseViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper {
35
36 /**
37 * @return string the rendered string
38 * @api
39 */
40 public function render() {
41 return $this->renderChildren();
42 }
43 }
44
45 ?>