[FEATURE] Add uppercamelcase and lowercamelcase to stdWrap.case 31/39131/4
authorFrans Saris <franssaris@gmail.com>
Fri, 1 May 2015 06:25:00 +0000 (08:25 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sat, 2 May 2015 16:26:26 +0000 (18:26 +0200)
Resolves: #66697
Releases: master
Change-Id: I29b2ebbea58d4dd461a4d130b774303489365a53
Reviewed-on: http://review.typo3.org/39131
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/core/Documentation/Changelog/master/Feature-66697-AddUppercamelcaseAndLowercamelcaseToStdWrap.case.rst [new file with mode: 0644]
typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php

diff --git a/typo3/sysext/core/Documentation/Changelog/master/Feature-66697-AddUppercamelcaseAndLowercamelcaseToStdWrap.case.rst b/typo3/sysext/core/Documentation/Changelog/master/Feature-66697-AddUppercamelcaseAndLowercamelcaseToStdWrap.case.rst
new file mode 100644 (file)
index 0000000..bb53679
--- /dev/null
@@ -0,0 +1,33 @@
+=======================================================================
+Feature: #66697 - Add uppercamelcase and lowercamelcase to stdWrap.case
+=======================================================================
+
+Description
+===========
+
+To make it possible to change a value for underscored to "upperCamelCase" or "lowerCamelCase" the options `uppercamelcase` and `lowercamelcase` are added to `stdWrap.case`.
+
+.. code-block:: typoscript
+
+       tt_content = CASE
+       tt_content {
+               key {
+                       field = CType
+               }
+
+               my_custom_ctype =< lib.userContent
+               my_custom_ctype {
+                       file = EXT:site_base/Resources/Private/Templates/SomeOtherTemplate.html
+                       settings {
+                               extraParam = 1
+                       }
+               }
+
+               default =< lib.userContent
+               default {
+                       file = TEXT
+                       file.field = CType
+                       file.stdWrap.case = uppercamelcase
+                       file.wrap = EXT:site_base/Resources/Private/Templates/|.html
+               }
+       }
\ No newline at end of file
index 2543352..ae5f621 100644 (file)
@@ -7009,6 +7009,12 @@ class ContentObjectRenderer {
                        case 'lcfirst':
                                $theValue = $GLOBALS['TSFE']->csConvObj->convCaseFirst($GLOBALS['TSFE']->renderCharset, $theValue, 'toLower');
                                break;
+                       case 'uppercamelcase':
+                               $theValue = GeneralUtility::underscoredToUpperCamelCase($theValue);
+                               break;
+                       case 'lowercamelcase':
+                               $theValue = GeneralUtility::underscoredToLowerCamelCase($theValue);
+                               break;
                }
                return $theValue;
        }