[BUGFIX] EXT:form - Wizard does not reopen checkboxgroups/ radiogroups 73/43773/3
authorRalf Zimmermann <ralf.zimmermann@tritum.de>
Sun, 4 Oct 2015 11:18:21 +0000 (13:18 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Thu, 8 Oct 2015 18:58:28 +0000 (20:58 +0200)
Bring back the class name mapping for camelcase json elements.

Resolves: #70212
Releases: master
Change-Id: Ibd6022383f19936dc92c764a696aa0204dea66ea
Reviewed-on: http://review.typo3.org/43773
Reviewed-by: Bjoern Jacob <bjoern.jacob@tritum.de>
Tested-by: Bjoern Jacob <bjoern.jacob@tritum.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/form/Classes/Utility/TypoScriptToJsonConverter.php

index 7b36426..6e3b776 100644 (file)
@@ -49,6 +49,14 @@ class TypoScriptToJsonConverter {
        /**
         * @var array
         */
+       protected $nameMapping = array(
+               'checkboxgroup' => 'CheckboxGroup',
+               'radiogroup' => 'RadioGroup',
+       );
+
+       /**
+        * @var array
+        */
        protected $validationRules;
 
        /**
@@ -74,6 +82,9 @@ class TypoScriptToJsonConverter {
         */
        public function createElement($class, array $arguments = array()) {
                $class = strtolower((string)$class);
+               if (!empty($this->nameMapping[$class])) {
+                       $class = $this->nameMapping[$class];
+               }
                $className = 'TYPO3\\CMS\\Form\\Domain\\Model\Json\\' . ucfirst($class) . 'JsonElement';
                $this->addValidationRules($arguments);