2 namespace TYPO3\CMS\Fluid\ViewHelpers;
36 public function render($value = null, $default =
false)
38 return static::renderStatic(
44 $this->renderingContext
58 $value = $arguments[
'value'];
59 $default = $arguments[
'default'];
62 throw new Exception(
'The case View helper can only be used within a switch View helper', 1368112037);
64 if (is_null($value) && $default ===
false) {
65 throw new Exception(
'The case View helper must have either value or default argument', 1382867521);
68 $currentState = array_pop($stateStack);
70 if ($currentState[
'break'] ===
true) {
75 if ($default ===
true || $currentState[
'expression'] == $value) {
76 $currentState[
'break'] =
true;
77 $stateStack[] = $currentState;