[BUGFIX] EXT:form - Wizard does not reopen checkboxgroups/ radiogroups
[Packages/TYPO3.CMS.git] / typo3 / sysext / form / Classes / Utility / TypoScriptToJsonConverter.php
index 7b36426..6e3b776 100644 (file)
@@ -46,6 +46,14 @@ class TypoScriptToJsonConverter {
                'TEXTLINE'
        );
 
+       /**
+        * @var array
+        */
+       protected $nameMapping = array(
+               'checkboxgroup' => 'CheckboxGroup',
+               'radiogroup' => 'RadioGroup',
+       );
+
        /**
         * @var array
         */
@@ -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);