[BUGFIX] Fix typo in UserElement.php
[Packages/TYPO3.CMS.git] / typo3 / sysext / backend / Classes / Form / Element / UserElement.php
index c6d99d1..7b0e439 100644 (file)
@@ -28,19 +28,26 @@ class UserElement extends AbstractFormElement
      */
     public function render()
     {
+        $resultArray = $this->initializeResultArray();
+
         $parameterArray = $this->data['parameterArray'];
         $parameterArray['table'] = $this->data['tableName'];
         $parameterArray['field'] = $this->data['fieldName'];
         $parameterArray['row'] = $this->data['databaseRow'];
         $parameterArray['parameters'] = isset($parameterArray['fieldConf']['config']['parameters'])
             ? $parameterArray['fieldConf']['config']['parameters']
-            : array();
-        $resultArray = $this->initializeResultArray();
-        $resultArray['html'] = GeneralUtility::callUserFunction(
+            : [];
+        $html = GeneralUtility::callUserFunction(
             $parameterArray['fieldConf']['config']['userFunc'],
             $parameterArray,
             $this
         );
+        if (!isset($parameterArray['fieldConf']['config']['noTableWrapping'])
+            || (bool)$parameterArray['fieldConf']['config']['noTableWrapping'] === false
+        ) {
+            $html = '<div class="formengine-field-item t3js-formengine-field-item">' . $html . '</div>';
+        }
+        $resultArray['html'] = $html;
         return $resultArray;
     }
 }