[TASK] Prevent remaining DocumentTemplate->getPageRenderer() calls 86/42486/2
authorNicole Cordes <typo3@cordes.co>
Mon, 10 Aug 2015 17:56:28 +0000 (19:56 +0200)
committerGeorg Ringer <georg.ringer@gmail.com>
Mon, 10 Aug 2015 18:15:13 +0000 (20:15 +0200)
This is a follow up to https://review.typo3.org/41131/ to prevent
remaining calls to a deprecated function inside the core itself.

Resolves: #68912
Releases: master
Change-Id: I6caad3a0bd3500ba64602373eb12a47a287e60a3
Reviewed-on: http://review.typo3.org/42486
Reviewed-by: Frank Nägler <frank.naegler@typo3.org>
Tested-by: Frank Nägler <frank.naegler@typo3.org>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
typo3/sysext/recordlist/Classes/Browser/ElementBrowser.php
typo3/sysext/recordlist/Classes/RecordList.php

index d75a296..06b022b 100755 (executable)
@@ -266,7 +266,7 @@ class ElementBrowser {
        */
        public function __construct() {
                $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
-               $this->pageRenderer = $GLOBALS['TBE_TEMPLATE']->getPageRenderer();
+               $this->pageRenderer = GeneralUtility::makeInstance(PageRenderer::class);
                $this->pageRenderer->loadJquery();
                $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Recordlist/FieldSelectBox');
        }
index e4c6d2e..a5e31b5 100644 (file)
@@ -190,7 +190,7 @@ class RecordList {
         */
        public function __construct() {
                $this->getLanguageService()->includeLLFile('EXT:lang/locallang_mod_web_list.xlf');
-               $this->pageRenderer = $GLOBALS['TBE_TEMPLATE']->getPageRenderer();
+               $this->pageRenderer = GeneralUtility::makeInstance(PageRenderer::class);
                $this->pageRenderer->loadJquery();
                $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Recordlist/FieldSelectBox');
        }