[BUGFIX] Add missing format.case capitalWords mode 34/53234/2
authorBenni Mack <benni@typo3.org>
Thu, 15 Jun 2017 14:26:37 +0000 (16:26 +0200)
committerBenni Mack <benni@typo3.org>
Fri, 16 Jun 2017 11:13:02 +0000 (13:13 +0200)
The mode "capitalWords" was just a todo statement that indicated a
missing implementation.
The implementation is now added.

Resolves: #81588
Releases: master, 8.7
Change-Id: I12b733da703de34568c6b79c083031f0333cdb92
Reviewed-on: https://review.typo3.org/53234
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/fluid/Classes/ViewHelpers/Format/CaseViewHelper.php

index eb8229c..4f845fc 100644 (file)
@@ -161,7 +161,8 @@ class CaseViewHelper extends AbstractViewHelper
                 $output = $firstChar . $remainder;
                 break;
             case self::CASE_CAPITAL_WORDS:
-                // @todo: Implement method once there is a proper solution with using the CharsetConverter
+                $output = mb_convert_case($value, MB_CASE_TITLE, 'utf-8');
+                break;
             default:
                 throw new InvalidVariableException('The case mode "' . $mode . '" supplied to Fluid\'s format.case ViewHelper is not supported.', 1358349150);
         }