File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,15 +36,6 @@ parameters:
3636 - ' #Constant LF not found. #'
3737 - '#Cannot call method fetchAllAssociative\ (\ ) on Doctrine\\DBAL\\Driver\\ResultStatement\|int. #'
3838 - '#Cannot call method fetchAssociative\ (\ ) on Doctrine\\DBAL\\Driver\\ResultStatement\|int. #'
39- -
40- message : ' #Call to an undefined method TYPO3\\CMS\\Frontend\\ContentObject\\RecordsContentObject::setRequest\(\).#'
41- path : %currentWorkingDirectory%/Classes/DataProcessing/ContainerProcessor.php
42- -
43- message : ' #Class TYPO3\\CMS\\Frontend\\ContentObject\\RecordsContentObject constructor invoked with 0 parameters, 1 required.#'
44- path : %currentWorkingDirectory%/Classes/DataProcessing/ContainerProcessor.php
45- -
46- message : ' #Call to an undefined method TYPO3\\CMS\\Frontend\\ContentObject\\RecordsContentObject::setContentObjectRenderer\(\).#'
47- path : %currentWorkingDirectory%/Classes/DataProcessing/ContainerProcessor.php
4839 -
4940 message : ' #Call to protected method getTypoScriptFrontendController\(\) of class TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer.#'
50- path : %currentWorkingDirectory%/Classes/DataProcessing/ContainerProcessor.php
41+ path : %currentWorkingDirectory%/Classes/DataProcessing/ContainerProcessor.php
Original file line number Diff line number Diff line change @@ -42,6 +42,3 @@ parameters:
4242 message : ' #Property TYPO3\\TestingFramework\\Core\\Acceptance\\Helper\\AbstractPageTree::.*tester .*#'
4343 path : %currentWorkingDirectory%/Tests/Acceptance/Support/PageTree.php
4444 - ' #Constant LF not found. #'
45- -
46- message : ' #Class TYPO3\\CMS\\Frontend\\ContentObject\\RecordsContentObject constructor invoked with 0 parameters, 1 required.#'
47- path : %currentWorkingDirectory%/Classes/DataProcessing/ContainerProcessor.php
Original file line number Diff line number Diff line change @@ -23,9 +23,6 @@ parameters:
2323 -
2424 message : ' #Method TYPO3\\CMS\\Backend\\View\\PageLayoutView::__construct\(\).* invoked with 1 parameter, 0 required.#'
2525 path : %currentWorkingDirectory%/Classes/View/ContainerLayoutView.php
26- -
27- message : ' #Class TYPO3\\CMS\\Frontend\\ContentObject\\RecordsContentObject does not have a constructor and must be instantiated without any parameters.#'
28- path : %currentWorkingDirectory%/Classes/DataProcessing/ContainerProcessor.php
2926 -
3027 message : ' #Constant ORIGINAL_ROOT not found.#'
3128 path : %currentWorkingDirectory%/Tests
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ namespace B13 \Container \DataProcessing ;
6+
7+ /*
8+ * This file is part of TYPO3 CMS-based extension "container" by b13.
9+ *
10+ * It is free software; you can redistribute it and/or modify it under
11+ * the terms of the GNU General Public License, either version 2
12+ * of the License, or any later version.
13+ */
14+
15+ class ContainerDataProcessingFailedException extends \B13 \Container \Exception
16+ {
17+ }
Original file line number Diff line number Diff line change 2222use TYPO3 \CMS \Frontend \ContentObject \ContentDataProcessor ;
2323use TYPO3 \CMS \Frontend \ContentObject \ContentObjectRenderer ;
2424use TYPO3 \CMS \Frontend \ContentObject \DataProcessorInterface ;
25- use TYPO3 \CMS \Frontend \ContentObject \RecordsContentObject ;
2625
2726class ContainerProcessor implements DataProcessorInterface
2827{
@@ -103,18 +102,15 @@ protected function processColPos(
103102 ): array {
104103 $ children = $ container ->getChildrenByColPos ($ colPos );
105104
106- $ typo3Version = GeneralUtility::makeInstance (Typo3Version::class);
107- if ($ typo3Version ->getMajorVersion () < 12 ) {
108- $ contentRecordRenderer = new RecordsContentObject ($ cObj );
109- } else {
110- $ contentRecordRenderer = new RecordsContentObject ();
111- $ contentRecordRenderer ->setContentObjectRenderer ($ cObj );
112- $ contentRecordRenderer ->setRequest ($ this ->getRequest ());
105+ $ contentRecordRenderer = $ cObj ->getContentObject ('RECORDS ' );
106+ if ($ contentRecordRenderer === null ) {
107+ throw new ContainerDataProcessingFailedException ('RECORDS content object not available. ' , 1691483526 );
113108 }
109+
114110 $ conf = [
115111 'tables ' => 'tt_content ' ,
116112 ];
117- if ($ typo3Version ->getMajorVersion () < 11 ) {
113+ if (GeneralUtility:: makeInstance (Typo3Version::class) ->getMajorVersion () < 11 ) {
118114 /** @var LanguageAspect $languageAspect */
119115 $ languageAspect = $ GLOBALS ['TSFE ' ]->getContext ()->getAspect ('language ' );
120116 } else {
You can’t perform that action at this time.
0 commit comments