Skip to content
This repository was archived by the owner on May 4, 2021. It is now read-only.

Commit 7e3ef55

Browse files
committed
[TASK] Merge closed beta into typo3 git master
commit 9186175adca97cee277d2425a0190a8ca12f2380 Merge: c0a5853 14ba032 Author: Jo Hasenau <[email protected]> Date: Mon Dec 10 16:06:13 2018 +0000 Merge branch '19-complete-docs-before-releasing-9-0-0' into 'master' Resolve "Complete docs before releasing 9.0.0" Closes #19 See merge request cybercraft.jh/gridelements!19 commit 14ba0320e82b20fe7fe67654b7d5a859a7785a1e Author: cybercraft <[email protected]> Date: Mon Dec 10 17:03:26 2018 +0100 [TASK] Insert chapter for new feature DataProcessing Change-Id: I4dcaca00e279e72b057b1124a610853c68074d9a commit c0a5853067cb1167a61cca8b45b98f6ee1f031b9 Author: cybercraft <[email protected]> Date: Mon Dec 10 16:17:39 2018 +0100 [BUGFIX] Include list navigation renderer in XCLASS to get correct pagination Change-Id: I31a4cd2341523e089a0a51bfbadda8cd4a134bf0 Resolves: #86836 Release: master, 8-0 commit d12431b2e36933fb1836d3b0a3e08650ad42a43a Merge: 88eaec5 63fc3df Author: cybercraft <[email protected]> Date: Mon Dec 10 12:07:17 2018 +0100 Merge branch 'master' of gitlab.com:cybercraft.jh/gridelements commit 88eaec5141dc74c0f6de105e254bdf9c18c3fab3 Merge: 4b56ea6 3570ead Author: cybercraft <[email protected]> Date: Mon Dec 10 12:06:34 2018 +0100 Merge branch 'master' of git://git.typo3.org/TYPO3CMS/Extensions/gridelements commit 63fc3df08d33757ec3a5b5a0cc121546ae7fa3bd Author: cybercraft <[email protected]> Date: Sun Dec 9 19:25:14 2018 +0100 [TASK] Use official coding style Change-Id: I03b6e3a0a291827b6fb493113269e8b27cdba6b9 commit 4b56ea6420e4259ae60c8c115f232f8b30a2069f Author: cybercraft <[email protected]> Date: Sun Dec 9 18:48:36 2018 +0100 [BUGFIX] Make sure children only expand when the whole rootline is Change-Id: I665b18bc5c52da69ee60a9479f1d308789126a5f commit d98d7617afd51176ade00bdf0c17e4fa1b1bf77e Merge: f61c864 ebe4229 Author: Jo Hasenau <[email protected]> Date: Sun Dec 9 17:47:41 2018 +0000 Merge branch '18-remove-deprecated-methods-and-properties-according-to-the-extension-scanner' into 'master' Resolve "Remove deprecated methods and properties according to the extension scanner" Closes #18 See merge request cybercraft.jh/gridelements!15 commit ebe422911553b517cf14db3dbfd6e9e837dd7410 Author: Jo Hasenau <[email protected]> Date: Sun Dec 9 17:47:41 2018 +0000 Resolve "Remove deprecated methods and properties according to the extension scanner" commit f61c8641349beef83a43a11c442736cb85f5ce9e Merge: 5a5fc2b 8366f12 Author: Jo Hasenau <[email protected]> Date: Sun Dec 9 16:23:12 2018 +0000 Merge branch '15-refactoring-adjust-the-list-module-xclass-to-match-the-current-state-of-the-cms-9-list-module' into 'master' Resolve "Refactoring: Adjust the list module XCLASS to match the current state of the CMS 9 list module" Closes #15 See merge request cybercraft.jh/gridelements!14 commit 8366f1206817b46c9b5e7f2ed36b65f6b99b2e1c Author: cybercraft <[email protected]> Date: Sun Dec 9 14:11:46 2018 +0100 [TASK] Match XCLASS with v9 DatabeRecordList changes Change-Id: Iab1f2c2ea1064d4b5c979edcbdd2f5fe6bb9f7ba commit 5a5fc2b346ab47a8b9e5cb7731ce7236ca4db4c4 Author: cybercraft <[email protected]> Date: Mon Dec 3 23:38:59 2018 +0100 [TASK] First bunch of deprecation replacements according to extension scan Change-Id: Ib83b1245853f59cf4f58fe0194b5ac1092d3eb94 commit 591307dc0e63d633f65e610d1336bc83e30fc556 Author: cybercraft <[email protected]> Date: Mon Dec 3 21:39:08 2018 +0100 [TASK] Use official coding standard Change-Id: I689a9cac89df762769cc2b2c3eca66a4e2ea099d commit 42e0fd5c3318a5787374165d7f12752a31274316 Merge: 6a40631 29752d4 Author: Jo Hasenau <[email protected]> Date: Mon Dec 3 20:34:44 2018 +0000 Merge branch '14-feature-provide-dataprocessor-s-to-render-children-directly-within-a-fluidtemplate-without-having-to-invoke-a-user-object' into 'master' Resolve "Feature: Provide dataProcessor(s) to render children directly within a FLUIDTEMPLATE without having to invoke a USER object" Closes #14 See merge request cybercraft.jh/gridelements!12 commit 29752d49f8512d0bffc873499495b185997cb129 Author: cybercraft <[email protected]> Date: Mon Dec 3 20:43:12 2018 +0100 [TASK] Adjust FLUID files to match default FSC behaviour Change-Id: Iaeffc2f297ccb318c10ef14efbeb9df4e8065f19 commit ccd8cfdfacfc5648f99db53f66147f69c053345a Author: cybercraft <[email protected]> Date: Mon Dec 3 11:24:27 2018 +0100 [BUGFIX] Resolve flexforms for Gridelements only to avoid problems w other plugins Change-Id: I92432c909fa33b21ce065fc38dfe2dea7273ef4f commit 6a40631b635a11037674ece0489a8d0bd8d9647f Merge: a7a00d2 9a8577e Author: Jo Hasenau <[email protected]> Date: Mon Dec 3 10:30:05 2018 +0000 Merge branch '17-flexform-settings-are-empty-in-extbase-controller' into 'master' Resolve "Flexform settings are empty in extbase controller" Closes #17 See merge request cybercraft.jh/gridelements!13 commit 9a8577edf6ffa1ced06d547b2ce4cc8f9a4b931a Author: cybercraft <[email protected]> Date: Mon Dec 3 11:24:27 2018 +0100 [BUGFIX] Resolve flexforms for Gridelements only to avoid problems w other plugins Change-Id: I92432c909fa33b21ce065fc38dfe2dea7273ef4f commit 537906a2f8f95b9fc2e4c89253b2f7d6218dd287 Author: cybercraft <[email protected]> Date: Sun Dec 2 21:28:14 2018 +0100 [TASK] Automatically respect columns if respectRows is set Change-Id: I76b086b297145fc0bb3739a4dee5c7df9eaa2e7e commit 03201aad5f699f54f530bdcf4954c6040964d5c0 Author: cybercraft <[email protected]> Date: Sun Dec 2 21:22:32 2018 +0100 [CLEANUP] Remove dummy setup and debug utilities Change-Id: I84467e77622f6f52d32e0a9b41b473bf837faffc commit 89bd6d933be73acc007055b32affc1cd43cfb322 Author: cybercraft <[email protected]> Date: Sun Dec 2 21:17:04 2018 +0100 [TASK] Enable respectRows, respectColumns and resolveBackendLayouts Change-Id: I773375b7935cd7d6adc48c63f8baeb097b868077 commit 84561031f3eb86b6d6e8337ee7b45a8551f2c7e8 Author: Jo Hasenau <[email protected]> Date: Sun Dec 2 16:23:23 2018 +0000 Update Gridelements.php commit fce56f989c2a24d589a5233ef80161e4691ceb91 Author: Jo Hasenau <[email protected]> Date: Sun Dec 2 16:22:49 2018 +0000 Update Gridelements.php commit de4ae17462732c137303dc55934d502d42443612 Merge: b064c38 81db913 Author: cybercraft <[email protected]> Date: Sun Dec 2 17:21:51 2018 +0100 Merge remote-tracking branch 'gitlab/14-feature-provide-dataprocessor-s-to-render-children-directly-within-a-fluidtemplate-without-having-to-invoke-a-user-object' into 14-feature-provide-dataprocessor-s-to-render-children-directly-within-a-fluidtemplate-without-having-to-invoke-a-user-object commit b064c385a26888d47904d4a3da545f2836a6d6e7 Author: cybercraft <[email protected]> Date: Sun Dec 2 17:14:39 2018 +0100 [FEATURE] Add new FE rendering method making use of dataProcessing Change-Id: Ib4a49dad699efce2c4175d0749dffaa989429926 ToDo: make resolveBackendLayout, respectColumns and respectRows work commit 81db913ed1c6f8d02a9d12561dccc2477e6a1976 Author: cybercraft <[email protected]> Date: Sun Dec 2 17:14:39 2018 +0100 [FEATURE] Add new FE rendering method making use of dataProcessing Change-Id: Ib4a49dad699efce2c4175d0749dffaa989429926 ToDo: make resolveBackendLayout, respectColumns and respectRows work commit a7a00d2b60cc260d251a61c5c101b5f7d0b99a1f Author: cybercraft <[email protected]> Date: Thu Nov 29 21:14:47 2018 +0100 [BUGFIX] Use official method to check explicit allowed/deny settings Change-Id: Ifa6170130aa7f01583703f6df968746be6484467 commit 582e03bbc78dfcf6117e998408b1ce90e750aba8 Author: cybercraft <[email protected]> Date: Thu Nov 29 20:56:24 2018 +0100 [BUGFIX] Make sure class gets 0 appended if value is empty Change-Id: I5883a3f35d3a8ce090deec16d51c803d0a87242a commit 7fba7a94cef47dd1241fa892dad1f630c3474300 Author: cybercraft <[email protected]> Date: Thu Nov 29 20:43:47 2018 +0100 [BUGFIX] Check if there was a nextThree item with that uid before unsetting Change-Id: I3aa4688dab89fb1e72cc796e7d4acad46b2c43bf commit 233996e40079c53caab4a4631a85e4e95e7cda41 Author: cybercraft <[email protected]> Date: Thu Nov 29 20:27:16 2018 +0100 [BUGFIX] only set variable value, if thé CType show it's a Gridelement Change-Id: Ia33e4299ada32e89a1d3c8a570755db5a8a0023c commit 96c8d738bd6aefe6aec871e0add82d08f297504a Merge: 87ba3bf e2cbfd2 Author: Jo Hasenau <[email protected]> Date: Thu Nov 29 19:23:26 2018 +0000 Merge branch '4-refactor-flexform-handling' into 'master' Resolve "Refactor Flexform handling" Closes #4 See merge request cybercraft.jh/gridelements!11 commit e2cbfd20c9fc787879de26b609adcb669f4d8059 Author: cybercraft <[email protected]> Date: Thu Nov 29 16:06:24 2018 +0100 [TASK] Unset cObjData as well Change-Id: I88538164274d1fe74678a8c7df30d1e49eab42ac commit f5f9aa2847f8faa479cc1d91a806e164bb479f7f Author: cybercraft <[email protected]> Date: Thu Nov 29 16:00:38 2018 +0100 [BUGFIX] Assign first parameter too before assigning child data array Change-Id: I81cc05341f5ff176083703e8a840cfb8c6b12c9c commit cb3d4e7cf8c35c44391f48e0006fb4b02d8bd969 Author: cybercraft <[email protected]> Date: Thu Nov 29 15:58:21 2018 +0100 [TASK] Process flexform values of children directly after fetching them Change-Id: Ibbb5ff6b4f35ce9ece7e9b7cc2d7c1b137befd21 commit 87ba3bf425997499a0aac4d23e9c9374b6540cc8 Merge: a239809 e9df607 Author: Jo Hasenau <[email protected]> Date: Thu Nov 29 14:11:43 2018 +0000 Merge branch '16-space-befor-space-after-info-also-available-by-ce-s-in-grids' into 'master' Resolve "space-befor/space-after info also available by ce's in grids" Closes #16 See merge request cybercraft.jh/gridelements!10 commit e9df6077ff53093b766f474f68caab5b7c49003f Author: cybercraft <[email protected]> Date: Thu Nov 29 15:10:38 2018 +0100 [TASK] Consider new info fields for draw footer values Change-Id: I18318788553a7b5cb672048e214294129f7c861b commit a2398094482f0552d923428303c0193b61ac8eba Merge: b1ee077 57b9573 Author: Jo Hasenau <[email protected]> Date: Thu Nov 29 13:54:30 2018 +0000 Merge branch 'fix-call-to-viewOnClick' into 'master' [BUGFIX] Change default value in BackendUtility::viewOnClick call from string to null. See merge request cybercraft.jh/gridelements!8 commit b1ee077fa331d10e812bf6f884421701445c0cec Merge: d221875 9f70401 Author: Jo Hasenau <[email protected]> Date: Thu Nov 29 13:52:45 2018 +0000 Merge branch '13-make-ce-restrictions-work-in-the-page-module-outside-grid-containers' into 'master' Resolve "Make CE restrictions work in the page module outside grid containers" Closes #13 See merge request cybercraft.jh/gridelements!9 commit 9f7040110807141d64c197a1aa84efdd0448da17 Author: cybercraft <[email protected]> Date: Thu Nov 29 14:51:12 2018 +0100 [TASK] Use data-url instead of href to assign allowed/disallowed information Change-Id: Ib91a6044a073792412568de8684390ec0606f6df commit 57b9573b21d4f67c16f04e22211728486e71ca42 Author: Hausformat Entwickler <[email protected]> Date: Thu Nov 29 09:35:50 2018 +0000 [BUGFIX] Change default value in BackendUtility::viewOnClick call from string to null. commit d2218757f1c37a16c8bd836535d667b6407169d1 Author: cybercraft <[email protected]> Date: Thu Nov 22 10:19:57 2018 +0100 [TASK] Code cleanup and fix of namespace typo Change-Id: I76c490a4d647e02a4c76a385dc4234fc7234dbe4 commit 4c39319672b198bd091a04cf9c2a1a39cf5ad37e Author: cybercraft <[email protected]> Date: Sun Nov 18 18:59:47 2018 +0100 [TASK] Code cleanup Change-Id: I6eb8520c0fab708759f64447c630749acbdf6006 commit e474fe7d9c546cc2a02dc37fb736eb4f1969eb45 Author: cybercraft <[email protected]> Date: Sun Nov 18 18:33:30 2018 +0100 [TASK] Remove deprecated method in favor of buildUriFromRoute Change-Id: Ida53e97bc8f191659fab115cc5f08a5a7ffa5fa7 commit 1859ff63acd2009fd6a6538ea84cafda776ba1da Merge: 25ac933 4c1f03f Author: Jo Hasenau <[email protected]> Date: Sun Nov 18 17:22:15 2018 +0000 Merge branch '8-drag-in-wizard-error' into 'master' Resolve "Drag in Wizard Error" Closes #8 See merge request cybercraft.jh/gridelements!7 commit 4c1f03f9b476be0e224df052ab9127e8ba1830c1 Author: Jo Hasenau <[email protected]> Date: Sun Nov 18 17:22:15 2018 +0000 Resolve "Drag in Wizard Error" commit 25ac933a024a66f63f3cd55583597666568af463 Merge: 64b5b9c 71fe889 Author: Jo Hasenau <[email protected]> Date: Sun Nov 18 16:27:22 2018 +0000 Merge branch '11-copy-paste-after-child-elements-ends-up-with-wrong-sorting' into 'master' Resolve "Copy & Paste after child elements ends up with wrong sorting" Closes #11 See merge request cybercraft.jh/gridelements!6 commit 71fe889793a711c83af3a64ec8f76b945d09b2e9 Author: cybercraft <[email protected]> Date: Sun Nov 18 17:24:58 2018 +0100 [BUGFIX] Remove identifier class to get paste information from real CE Change-Id: Ifaa2469c14d3aa236d7d82d0da8e3303ff4e701e commit 64b5b9c244193a76e7115c1309e9a0843390d227 Merge: 9515757 01fa336 Author: Jo Hasenau <[email protected]> Date: Sun Nov 18 14:59:48 2018 +0000 Merge branch '12-typoscript-backendlayout-config-allowed-tx_gridelements_backend_layout-is-ignored' into 'master' Resolve "Typoscript BackendLayout config - allowed.tx_gridelements_backend_layout is ignored" Closes #12 See merge request cybercraft.jh/gridelements!5 commit 01fa336267a3530995eb114649fce988699e38aa Author: Jo Hasenau <[email protected]> Date: Sun Nov 18 14:59:48 2018 +0000 Resolve "Typoscript BackendLayout config - allowed.tx_gridelements_backend_layout is ignored" commit 95157579c4c042374084957a395730453a39975e Merge: 313cfe9 ff8d307 Author: Jo Hasenau <[email protected]> Date: Sun Nov 18 13:39:18 2018 +0000 Merge branch '9-dropzone-in-backend' into 'master' [TASK] Change icon type from "document new" to "add" Closes #9 See merge request cybercraft.jh/gridelements!4 commit ff8d307 Author: cybercraft <[email protected]> Date: Sun Nov 18 14:36:09 2018 +0100 [TASK] Change icon type from "document new" to "add" Change-Id: I560c97d342542865d089a6c504748c393a427e64 commit 313cfe9 Author: cybercraft <[email protected]> Date: Thu Nov 8 00:05:49 2018 +0100 [TASK] Reenable frontend editing Change-Id: Ic047471629f7774208bc0b9bab016218e8b06dd2 commit 0b7e25d Author: cybercraft <[email protected]> Date: Sat Oct 27 23:00:53 2018 +0200 [TASK] Reactivate Drag & Drop and paste icons Change-Id: Ice82df781a463f543466f091c3c1b798f7a29b88 commit 2859bd7 Author: cybercraft <[email protected]> Date: Sat Oct 27 20:13:15 2018 +0200 [BUGFIX] Remove superfluous identifier from AjaxDataHandler Change-Id: Idc1aa77e81a9ec943045dbefb24be8c0a4001c7a Resolves: #86682 Releases: master commit f3ab4d2 Author: cybercraft <[email protected]> Date: Sat Oct 27 19:51:45 2018 +0200 [TASK] Push current state of DEV-server to Gitlab EAP Change-Id: I1a9a8e780d20af9ca59c3ab9b6180d6edb7fae2d Change-Id: I7233bad1ec61c7627ded49789ded597b930183c3 Reviewed-on: https://review.typo3.org/59076 Reviewed-by: Jo Hasenau <[email protected]> Tested-by: Jo Hasenau <[email protected]>
1 parent 3570ead commit 7e3ef55

File tree

61 files changed

+2526
-1491
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+2526
-1491
lines changed

Diff for: Classes/Backend/ItemsProcFuncs/AbstractItemsProcFunc.php

-3
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@
3131
* Class/Function which offers TCE main hook functions.
3232
*
3333
* @author Jo Hasenau <[email protected]>
34-
* @package TYPO3
35-
* @subpackage tx_gridelements
3634
*/
3735
abstract class AbstractItemsProcFunc implements SingletonInterface
3836
{
@@ -109,5 +107,4 @@ public function getBackendUser()
109107
{
110108
return $GLOBALS['BE_USER'];
111109
}
112-
113110
}

Diff for: Classes/Backend/ItemsProcFuncs/CTypeList.php

+17-9
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@
2828
* Class/Function which manipulates the item-array for table/field tt_content CType.
2929
*
3030
* @author Jo Hasenau <[email protected]>
31-
* @package TYPO3
32-
* @subpackage tx_gridelements
3331
*/
3432
class CTypeList extends AbstractItemsProcFunc
3533
{
@@ -48,16 +46,26 @@ public function itemsProcFunc(array &$params)
4846
{
4947
if ((int)$params['row']['pid'] > 0) {
5048
$colPos = is_array($params['row']['colPos']) ? $params['row']['colPos'][0] : $params['row']['colPos'];
51-
$this->checkForAllowedCTypes($params['items'], $params['row']['pid'], $colPos,
52-
$params['row']['tx_gridelements_container'], $params['row']['tx_gridelements_columns']);
49+
$this->checkForAllowedCTypes(
50+
$params['items'],
51+
$params['row']['pid'],
52+
$colPos,
53+
$params['row']['tx_gridelements_container'],
54+
$params['row']['tx_gridelements_columns']
55+
);
5356
} else {
5457
$this->init((int)$params['row']['pid']);
5558
// negative uid_pid values indicate that the element has been inserted after an existing element
5659
// so there is no pid to get the backendLayout for and we have to get that first
5760
$existingElement = BackendUtility::getRecordWSOL('tt_content', -((int)$params['row']['pid']), 'pid,CType,colPos,tx_gridelements_container,tx_gridelements_columns');
5861
if ((int)$existingElement['pid'] > 0) {
59-
$this->checkForAllowedCTypes($params['items'], $existingElement['pid'], $existingElement['colPos'],
60-
$existingElement['tx_gridelements_container'], $existingElement['tx_gridelements_columns']);
62+
$this->checkForAllowedCTypes(
63+
$params['items'],
64+
$existingElement['pid'],
65+
$existingElement['colPos'],
66+
$existingElement['tx_gridelements_container'],
67+
$existingElement['tx_gridelements_columns']
68+
);
6169
}
6270
}
6371
}
@@ -73,8 +81,8 @@ public function itemsProcFunc(array &$params)
7381
*/
7482
public function checkForAllowedCTypes(array &$items, $pageId, $pageColumn, $gridContainerId, $gridColumn)
7583
{
76-
$allowed = '';
77-
$disallowed = '';
84+
$allowed = [];
85+
$disallowed = [];
7886
if ((int)$pageColumn >= 0 || (int)$pageColumn === -2) {
7987
$column = $pageColumn ? $pageColumn : 0;
8088
$layout = $this->getSelectedBackendLayout($pageId);
@@ -88,7 +96,7 @@ public function checkForAllowedCTypes(array &$items, $pageId, $pageColumn, $grid
8896
if (is_array($layout['allowed']) && is_array($layout['allowed'][$column]) && !empty($layout['allowed'][$column]['CType'])) {
8997
$allowed = $layout['allowed'][$column]['CType'];
9098
}
91-
if (is_array($layout['disallowed']) && is_array($layout['disallowed'][$column]) && !empty($layout['disallowed'][$column]['CType'])){
99+
if (is_array($layout['disallowed']) && is_array($layout['disallowed'][$column]) && !empty($layout['disallowed'][$column]['CType'])) {
92100
$disallowed = $layout['disallowed'][$column]['CType'];
93101
}
94102
}

Diff for: Classes/Backend/ItemsProcFuncs/ColPosList.php

+21-9
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
* Class/Function which manipulates the item-array for table/field tt_content colPos.
2727
*
2828
* @author Jo Hasenau <[email protected]>
29-
* @package TYPO3
30-
* @subpackage tx_gridelements
3129
*/
3230
class ColPosList extends AbstractItemsProcFunc
3331
{
@@ -43,17 +41,31 @@ public function itemsProcFunc(array &$params)
4341
$contentType = is_array($params['row']['CType']) ? $params['row']['CType'][0] : $params['row']['CType'];
4442
$listType = is_array($params['row']['list_type']) ? $params['row']['list_type'][0] : $params['row']['list_type'];
4543
$gridType = is_array($params['row']['tx_gridelements_backend_layout']) ? $params['row']['tx_gridelements_backend_layout'][0] : $params['row']['tx_gridelements_backend_layout'];
46-
$params['items'] = $this->addColPosListLayoutItems($params['row']['pid'], $params['items'], $contentType,
47-
$listType, $gridType, $params['row']['tx_gridelements_container']);
44+
$params['items'] = $this->addColPosListLayoutItems(
45+
$params['row']['pid'],
46+
$params['items'],
47+
$contentType,
48+
$listType,
49+
$gridType,
50+
$params['row']['tx_gridelements_container']
51+
);
4852
} else {
4953
// negative uid_pid values indicate that the element has been inserted after an existing element
5054
// so there is no pid to get the backendLayout for and we have to get that first
51-
$existingElement = BackendUtility::getRecordWSOL('tt_content', -((int)$params['row']['pid']),
52-
'pid,CType,tx_gridelements_container');
55+
$existingElement = BackendUtility::getRecordWSOL(
56+
'tt_content',
57+
-((int)$params['row']['pid']),
58+
'pid,CType,tx_gridelements_container'
59+
);
5360
if ($existingElement['pid'] > 0) {
54-
$params['items'] = $this->addColPosListLayoutItems($existingElement['pid'], $params['items'],
55-
$existingElement['CType'], $existingElement['list_type'],
56-
$existingElement['tx_gridelements_backend_layout'], $existingElement['tx_gridelements_container']);
61+
$params['items'] = $this->addColPosListLayoutItems(
62+
$existingElement['pid'],
63+
$params['items'],
64+
$existingElement['CType'],
65+
$existingElement['list_type'],
66+
$existingElement['tx_gridelements_backend_layout'],
67+
$existingElement['tx_gridelements_container']
68+
);
5769
}
5870
}
5971
}

Diff for: Classes/Backend/ItemsProcFuncs/ListTypeList.php

+17-9
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@
2828
* Class/Function which manipulates the item-array for table/field tt_content CType.
2929
*
3030
* @author Jo Hasenau <[email protected]>
31-
* @package TYPO3
32-
* @subpackage tx_gridelements
3331
*/
3432
class ListTypeList extends AbstractItemsProcFunc
3533
{
@@ -48,16 +46,26 @@ public function itemsProcFunc(array &$params)
4846
{
4947
if ((int)$params['row']['pid'] > 0) {
5048
$colPos = is_array($params['row']['colPos']) ? $params['row']['colPos'][0] : $params['row']['colPos'];
51-
$this->checkForAllowedListTypes($params['items'], $params['row']['pid'], $colPos,
52-
$params['row']['tx_gridelements_container'], $params['row']['tx_gridelements_columns']);
49+
$this->checkForAllowedListTypes(
50+
$params['items'],
51+
$params['row']['pid'],
52+
$colPos,
53+
$params['row']['tx_gridelements_container'],
54+
$params['row']['tx_gridelements_columns']
55+
);
5356
} else {
5457
$this->init((int)$params['row']['pid']);
5558
// negative uid_pid values indicate that the element has been inserted after an existing element
5659
// so there is no pid to get the backendLayout for and we have to get that first
5760
$existingElement = BackendUtility::getRecordWSOL('tt_content', -((int)$params['row']['pid']), 'pid,list_type,colPos,tx_gridelements_container,tx_gridelements_columns');
5861
if ((int)$existingElement['pid'] > 0) {
59-
$this->checkForAllowedListTypes($params['items'], $existingElement['pid'], $existingElement['colPos'],
60-
$existingElement['tx_gridelements_container'], $existingElement['tx_gridelements_columns']);
62+
$this->checkForAllowedListTypes(
63+
$params['items'],
64+
$existingElement['pid'],
65+
$existingElement['colPos'],
66+
$existingElement['tx_gridelements_container'],
67+
$existingElement['tx_gridelements_columns']
68+
);
6169
}
6270
}
6371
}
@@ -73,8 +81,8 @@ public function itemsProcFunc(array &$params)
7381
*/
7482
public function checkForAllowedListTypes(array &$items, $pageId, $pageColumn, $gridContainerId, $gridColumn)
7583
{
76-
$allowed = '';
77-
$disallowed = '';
84+
$allowed = [];
85+
$disallowed = [];
7886
if ((int)$pageColumn >= 0 || (int)$pageColumn === -2) {
7987
$column = $pageColumn ? $pageColumn : 0;
8088
$layout = $this->getSelectedBackendLayout($pageId);
@@ -88,7 +96,7 @@ public function checkForAllowedListTypes(array &$items, $pageId, $pageColumn, $g
8896
if (is_array($layout['allowed']) && is_array($layout['allowed'][$column]) && !empty($layout['allowed'][$column]['list_type'])) {
8997
$allowed = $layout['allowed'][$column]['list_type'];
9098
}
91-
if (is_array($layout['disallowed']) && is_array($layout['disallowed'][$column]) && !empty($layout['disallowed'][$column]['list_type'])){
99+
if (is_array($layout['disallowed']) && is_array($layout['disallowed'][$column]) && !empty($layout['disallowed'][$column]['list_type'])) {
92100
$disallowed = $layout['disallowed'][$column]['list_type'];
93101
}
94102
}

Diff for: Classes/Backend/ItemsProcFuncs/SysLanguageUidList.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
* Class/Function which manipulates the item-array for table/field tt_content CType.
2727
*
2828
* @author Jo Hasenau <[email protected]>
29-
* @package TYPO3
30-
* @subpackage tx_gridelements
3129
*/
3230
class SysLanguageUidList extends AbstractItemsProcFunc
3331
{
@@ -61,6 +59,6 @@ public function checkForAllowedLanguages(array &$items, $gridContainerId)
6159
unset($items[$item]);
6260
}
6361
}
64-
};
62+
}
6563
}
6664
}

Diff for: Classes/Backend/LayoutSetup.php

+28-22
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@
3737
* Utilities for gridelements.
3838
*
3939
* @author Arno Dudek <[email protected]>
40-
* @package TYPO3
41-
* @subpackage tx_gridelements
4240
*/
4341
class LayoutSetup
4442
{
@@ -112,7 +110,7 @@ public function init($pageId, array $typoScriptSetup = [])
112110
protected function loadLayoutSetup($pageId)
113111
{
114112
// Load page TSconfig.
115-
if(\TYPO3_MODE === 'FE') {
113+
if (\TYPO3_MODE === 'FE') {
116114
$pageTSconfig = $GLOBALS['TSFE']->getPagesTSconfig();
117115
} else {
118116
$pageTSconfig = BackendUtility::getPagesTSconfig($pageId);
@@ -173,8 +171,10 @@ protected function loadLayoutSetup($pageId)
173171
? (int)$pageTSconfig['TCEFORM.']['pages.']['_STORAGE_PID']
174172
: 0;
175173
$pageTSconfigId = isset($pageTSconfig['TCEFORM.']['tt_content.']['tx_gridelements_backend_layout.']['PAGE_TSCONFIG_ID'])
176-
? implode(',', GeneralUtility::intExplode(',',
177-
$pageTSconfig['TCEFORM.']['tt_content.']['tx_gridelements_backend_layout.']['PAGE_TSCONFIG_ID']))
174+
? implode(',', GeneralUtility::intExplode(
175+
',',
176+
$pageTSconfig['TCEFORM.']['tt_content.']['tx_gridelements_backend_layout.']['PAGE_TSCONFIG_ID']
177+
))
178178
: 0;
179179

180180
// Load records.
@@ -189,15 +189,21 @@ protected function loadLayoutSetup($pageId)
189189
$queryBuilder->expr()->comparison($storagePid, '=', 0)
190190
),
191191
$queryBuilder->expr()->orX(
192-
$queryBuilder->expr()->eq('pid',
193-
$queryBuilder->createNamedParameter((int)$pageTSconfigId, \PDO::PARAM_INT)),
194-
$queryBuilder->expr()->eq('pid',
195-
$queryBuilder->createNamedParameter((int)$storagePid, \PDO::PARAM_INT))
192+
$queryBuilder->expr()->eq(
193+
'pid',
194+
$queryBuilder->createNamedParameter((int)$pageTSconfigId, \PDO::PARAM_INT)
195+
),
196+
$queryBuilder->expr()->eq(
197+
'pid',
198+
$queryBuilder->createNamedParameter((int)$storagePid, \PDO::PARAM_INT)
199+
)
196200
),
197201
$queryBuilder->expr()->andX(
198202
$queryBuilder->expr()->comparison($pageTSconfigId, '=', 0),
199-
$queryBuilder->expr()->eq('pid',
200-
$queryBuilder->createNamedParameter((int)$pageId, \PDO::PARAM_INT))
203+
$queryBuilder->expr()->eq(
204+
'pid',
205+
$queryBuilder->createNamedParameter((int)$pageId, \PDO::PARAM_INT)
206+
)
201207
)
202208
)
203209
)
@@ -237,7 +243,6 @@ protected function loadLayoutSetup($pageId)
237243
}
238244

239245
$gridLayoutRecords[$layoutId] = $item;
240-
241246
}
242247

243248
if ($overruleRecords === true) {
@@ -478,19 +483,21 @@ public function getLayoutSelectItems($colPos, $gridColPos = 0, $containerId = 0,
478483
* @param int $gridContainerId The ID of the current grid container
479484
* @param bool $doReturn
480485
*
481-
* @return null|array
486+
* @return array|null
482487
*/
483488
public function cacheCurrentParent($gridContainerId = 0, $doReturn = false)
484489
{
485490
if ($gridContainerId > 0) {
486491
if (empty($GLOBALS['tx_gridelements']['parentElement'][$gridContainerId])) {
487-
$GLOBALS['tx_gridelements']['parentElement'][$gridContainerId] = BackendUtility::getRecordWSOL('tt_content',
488-
$gridContainerId);
492+
$GLOBALS['tx_gridelements']['parentElement'][$gridContainerId] = BackendUtility::getRecordWSOL(
493+
'tt_content',
494+
$gridContainerId
495+
);
489496
}
490497
}
491498
if ($doReturn) {
492499
return $GLOBALS['tx_gridelements']['parentElement'][$gridContainerId];
493-
};
500+
}
494501

495502
return null;
496503
}
@@ -604,7 +611,6 @@ public function getLayoutWizardItems(
604611
'iconIdentifier' => $item['iconIdentifier'],
605612
'tll' => $item['top_level_layout'],
606613
];
607-
608614
}
609615

610616
return $wizardItems;
@@ -624,8 +630,10 @@ public function getFlexformConfiguration($layoutId)
624630
if ($layoutSetup['pi_flexform_ds_file']) {
625631
$flexformConfiguration = GeneralUtility::getUrl(GeneralUtility::getFileAbsFileName($layoutSetup['pi_flexform_ds_file']));
626632
} elseif (strpos($layoutSetup['pi_flexform_ds'], 'FILE:') === 0) {
627-
$flexformConfiguration = GeneralUtility::getUrl(GeneralUtility::getFileAbsFileName(substr($layoutSetup['pi_flexform_ds'],
628-
5)));
633+
$flexformConfiguration = GeneralUtility::getUrl(GeneralUtility::getFileAbsFileName(substr(
634+
$layoutSetup['pi_flexform_ds'],
635+
5
636+
)));
629637
} elseif ($layoutSetup['pi_flexform_ds']) {
630638
$flexformConfiguration = $layoutSetup['pi_flexform_ds'];
631639
} else {
@@ -638,7 +646,7 @@ public function getFlexformConfiguration($layoutId)
638646
/**
639647
* getter for restrictions
640648
*
641-
* @return DefaultRestrictionContainer restrictions
649+
* @return object|DefaultRestrictionContainer restrictions
642650
*/
643651
public function getRestrictions()
644652
{
@@ -678,7 +686,6 @@ public function getBackendUser()
678686
return $GLOBALS['BE_USER'];
679687
}
680688

681-
682689
/**
683690
* Gets the current real pid.
684691
*
@@ -688,5 +695,4 @@ public function getRealPid()
688695
{
689696
return $this->realPid;
690697
}
691-
692698
}

Diff for: Classes/Backend/TtContent.php

+14-10
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@
3131
* Class/Function which manipulates the item-array for table/field tt_content_tx_gridelements_columns.
3232
*
3333
* @author Jo Hasenau <[email protected]>
34-
* @package TYPO3
35-
* @subpackage tx_gridelements
3634
*/
3735
class TtContent
3836
{
@@ -166,8 +164,10 @@ public function lookForChildContainersRecursively($containerIds, array &$possibl
166164
->where(
167165
$queryBuilder->expr()->andX(
168166
$queryBuilder->expr()->eq('CType', $queryBuilder->createNamedParameter('gridelements_pi1')),
169-
$queryBuilder->expr()->in('tx_gridelements_container',
170-
$queryBuilder->createNamedParameter($containerIds, Connection::PARAM_INT_ARRAY))
167+
$queryBuilder->expr()->in(
168+
'tx_gridelements_container',
169+
$queryBuilder->createNamedParameter($containerIds, Connection::PARAM_INT_ARRAY)
170+
)
171171
)
172172
)
173173
->execute()
@@ -227,8 +227,10 @@ public function deleteDisallowedContainers(array &$params, $itemUidList = '')
227227
->select('uid', 'tx_gridelements_backend_layout')
228228
->from('tt_content')
229229
->where(
230-
$queryBuilder->expr()->in('uid',
231-
$queryBuilder->createNamedParameter($itemUidList, Connection::PARAM_INT_ARRAY))
230+
$queryBuilder->expr()->in(
231+
'uid',
232+
$queryBuilder->createNamedParameter($itemUidList, Connection::PARAM_INT_ARRAY)
233+
)
232234
)
233235
->execute();
234236
$containers = [];
@@ -290,10 +292,12 @@ public function deleteDisallowedContainers(array &$params, $itemUidList = '')
290292
public function layoutItemsProcFunc(array &$params)
291293
{
292294
$this->init($params['row']['pid']);
293-
$layoutSelectItems = $this->layoutSetup->getLayoutSelectItems(isset($params['row']['colPos'][0]) ? $params['row']['colPos'][0] : $params['row']['colPos'],
294-
$params['row']['tx_gridelements_columns'], $params['row']['tx_gridelements_container'], $this->layoutSetup->getRealPid());
295+
$layoutSelectItems = $this->layoutSetup->getLayoutSelectItems(
296+
isset($params['row']['colPos'][0]) ? $params['row']['colPos'][0] : $params['row']['colPos'],
297+
$params['row']['tx_gridelements_columns'],
298+
$params['row']['tx_gridelements_container'],
299+
$this->layoutSetup->getRealPid()
300+
);
295301
$params['items'] = ArrayUtility::keepItemsInArray($layoutSelectItems, $params['items'], true);
296302
}
297-
298-
299303
}

0 commit comments

Comments
 (0)