Actions
Bug #73197
closedf:switch does not work. Wrong namespace
Start date:
2016-02-09
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
8
PHP Version:
5.6
Tags:
Complexity:
Is Regression:
No
Sprint Focus:
Description
Hello,
I have following Fluid-Partial, but it only renders the defaultCase:
{namespace core = TYPO3\CMS\Core\ViewHelpers} <f:switch expression="{severity}"> <f:case value="0"><core:icon identifier="status-dialog-information" /></f:case> <f:case value="1"><core:icon identifier="status-dialog-notification" /></f:case> <f:case value="2"><core:icon identifier="status-dialog-warning" /></f:case> <f:case value="3"><core:icon identifier="status-dialog-error" /></f:case> <f:case value="-1"><core:icon identifier="status-dialog-ok" /></f:case> <f:defaultCase>nothing</f:defaultCase> </f:switch>
Following Method checks against \TYPO3Fluid\Fluid\ViewHelpers\CaseViewHelper, but Node is of Type \TYPO3\CMS\Fluid\ViewHelpers\CaseViewHelper
protected function isCaseNode(NodeInterface $node) { return ($node instanceof ViewHelperNode && $node->getViewHelperClassName() === CaseViewHelper::class); }
Stefan
Actions