Last active
October 26, 2020 14:30
-
-
Save kitzberger/a8304be3acf8994e84d1b7960e46c2a2 to your computer and use it in GitHub Desktop.
TYPO3 PageTs Hack for gridelement backend layouts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/typo3/sysext/backend/Classes/Form/FormDataProvider/PageTsConfigMerged.php 2020-10-26 14:41:48.000000000 +0100 | |
+++ b/typo3/sysext/backend/Classes/Form/FormDataProvider/PageTsConfigMerged.php 2020-10-26 14:56:45.000000000 +0100 | |
@@ -53,6 +53,21 @@ | |
if (!empty($typeSpecificConfiguration[$type . '.']) && is_array($typeSpecificConfiguration[$type . '.'])) { | |
ArrayUtility::mergeRecursiveWithOverrule($newFieldConfiguration, $typeSpecificConfiguration[$type . '.']); | |
} | |
+ // hack for gridelements begins | |
+ if ($type === 'gridelements_pi1') { | |
+ if (!empty($fullFieldConfiguration['types.']['gridelements_pi1.']) && | |
+ is_array($fullFieldConfiguration['types.']['gridelements_pi1.']) && | |
+ !empty($fullFieldConfiguration['types.']['gridelements_pi1.']['types.']) && | |
+ is_array($fullFieldConfiguration['types.']['gridelements_pi1.']['types.'])) | |
+ { | |
+ $subtype = $result['databaseRow']['tx_gridelements_backend_layout']; | |
+ $subtypeSpecificConfiguration = $fullFieldConfiguration['types.']['gridelements_pi1.']['types.']; | |
+ if (!empty($subtypeSpecificConfiguration[$subtype . '.']) && is_array($subtypeSpecificConfiguration[$subtype . '.'])) { | |
+ ArrayUtility::mergeRecursiveWithOverrule($newFieldConfiguration, $subtypeSpecificConfiguration[$subtype . '.']); | |
+ } | |
+ } | |
+ } | |
+ // hack for gridelements ends | |
} | |
$mergedTsConfig['TCEFORM.'][$table . '.'][$fieldNameWithDot] = $newFieldConfiguration; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This allows to provide PageTs overrides per grid type: