[TASK] Mark GridContainer form elements as deprecated 51/56351/2
authorRalf Zimmermann <ralf.zimmermann@tritum.de>
Sun, 18 Mar 2018 11:46:59 +0000 (12:46 +0100)
committerJan Helke <typo3@helke.de>
Sun, 18 Mar 2018 12:13:13 +0000 (13:13 +0100)
The form element GridContainer is useless, buggy
and will be removed in v10.

Resolves: #84222
Releases: master
Change-Id: I559155a6fc9c994ba306729d3a2afad867d5dcaa
Reviewed-on: https://review.typo3.org/56351
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Jan Helke <typo3@helke.de>
Tested-by: Jan Helke <typo3@helke.de>
typo3/sysext/core/Documentation/Changelog/master/Deprecation-84222-ExtForm-GridContainer.rst [new file with mode: 0644]
typo3/sysext/form/Classes/Domain/Model/FormElements/GridContainer.php

diff --git a/typo3/sysext/core/Documentation/Changelog/master/Deprecation-84222-ExtForm-GridContainer.rst b/typo3/sysext/core/Documentation/Changelog/master/Deprecation-84222-ExtForm-GridContainer.rst
new file mode 100644 (file)
index 0000000..29374f7
--- /dev/null
@@ -0,0 +1,88 @@
+.. include:: ../../Includes.txt
+
+========================================================
+Deprecation: #84222- Usage of GridContainer form element
+========================================================
+
+See :issue:`84222`
+
+Description
+===========
+
+The form element `GridContainer` is useless, buggy and will be removed in v10.
+
+
+Impact
+======
+
+Usage of the form element `GridContainer` will trigger a deprecation warning:
+
+
+Affected installations
+======================
+
+All instances who make usage of the form element `GridContainer`.
+
+
+Migration
+=========
+
+Remove the `GridContainer` form elements from your form definition and use `GridRow` child elements only.
+
+Change
+
+.. code-block:: yaml
+
+    type: Form
+    identifier: test
+    label: test
+    prototypeName: standard
+    renderables:
+      -
+        type: Page
+        identifier: page-1
+        label: Step
+        renderables:
+          -
+            type: GridContainer
+            identifier: gridcontainer-1
+            label: 'Grid: Container'
+            renderables:
+              -
+                type: GridRow
+                identifier: gridrow-1
+                label: 'Grid: Row'
+                renderables:
+                  -
+                    defaultValue: ''
+                    type: Text
+                    identifier: text-1
+                    label: Text
+
+to
+
+.. code-block:: yaml
+
+    type: Form
+    identifier: test
+    label: test
+    prototypeName: standard
+    renderables:
+      -
+        type: Page
+        identifier: page-1
+        label: Step
+        renderables:
+          -
+            type: GridRow
+            identifier: gridrow-1
+            label: 'Grid: Row'
+            renderables:
+              -
+                defaultValue: ''
+                type: Text
+                identifier: text-1
+                label: Text
+
+
+.. index:: Frontend, ext:form, NotScanned
index 75172df..4e639d1 100644 (file)
@@ -27,6 +27,19 @@ use TYPO3\CMS\Form\Domain\Exception\TypeDefinitionNotValidException;
  */
 class GridContainer extends Section implements GridContainerInterface
 {
+    /**
+     * Initializes the Form Element
+     *
+     * @internal
+     */
+    public function initializeFormElement()
+    {
+        trigger_error(
+            '"GridContainer" form elements has been deprecated in v9 and will be removed in v10. Use "GridRow" form elements instead.',
+            E_USER_DEPRECATED
+        );
+        parent::initializeFormElement();
+    }
 
     /**
      * Register this element at the parent form, if there is a connection to the parent form.