diff --git a/Classes/Controller/FeedController.php b/Classes/Controller/FeedController.php index b6410b9..9bae393 100755 --- a/Classes/Controller/FeedController.php +++ b/Classes/Controller/FeedController.php @@ -16,6 +16,7 @@ use TYPO3\CMS\Core\Core\Environment; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; +use Psr\Http\Message\ResponseInterface; /** * RSS display that will fetch the content of a RSS Feed and display it onto the Frontend. @@ -68,7 +69,7 @@ public function showAction() $this->view->assign('title', $feed->get_title()); $this->view->assign('items', $feed->get_items(0, (int)$this->settings['numberOfItems'])); $this->view->assign('settings', $this->settings); - $cObj = $this->configurationManager->getContentObject(); + $cObj = $this->request->getAttribute('currentContentObject'); $this->view->assign('data', $cObj->data); $result = $this->view->render(); @@ -79,7 +80,7 @@ public function showAction() } } - return $result; + return $this->htmlResponse($result); } /** @@ -106,7 +107,7 @@ protected function canFetchResultFromCache() $result = FALSE; if ($this->getPluginType() === self::PLUGIN_TYPE_USER_INT && $this->getCacheInstance()->has($this->getCacheIdentifier()) - && !GeneralUtility::_GET('no_cache') + && !($this->request->getQueryParams()['no_cache'] ?? null) ) { $result = TRUE; } diff --git a/Configuration/FlexForm/feed.xml b/Configuration/FlexForm/feed.xml index 2bc7d89..ef937b1 100644 --- a/Configuration/FlexForm/feed.xml +++ b/Configuration/FlexForm/feed.xml @@ -39,7 +39,6 @@ select Fab\RssDisplay\Backend\FlexformHelper->populateTemplatesList selectSingle - diff --git a/Configuration/Services.yaml b/Configuration/Services.yaml new file mode 100644 index 0000000..f32e8dc --- /dev/null +++ b/Configuration/Services.yaml @@ -0,0 +1,12 @@ +services: + # general settings + _defaults: + autowire: true + autoconfigure: true + public: false + + Fab\RssDisplay\: + resource: '../Classes/*' + + Fab\RssDisplay\Controller\FeedController: + public: true \ No newline at end of file diff --git a/Configuration/Configuration/TCA/Overrides/tt_content.php b/Configuration/TCA/Overrides/tt_content.php similarity index 94% rename from Configuration/Configuration/TCA/Overrides/tt_content.php rename to Configuration/TCA/Overrides/tt_content.php index 95942b8..6c8c381 100644 --- a/Configuration/Configuration/TCA/Overrides/tt_content.php +++ b/Configuration/TCA/Overrides/tt_content.php @@ -1,12 +1,13 @@ 'Ecodev', 'constraints' => [ 'depends' => [ - 'typo3' => '10.4.0-11.5.99', + 'typo3' => '10.4.0-13.4.99', ], ], ]; diff --git a/ext_localconf.php b/ext_localconf.php index 24d6226..e5c2820 100644 --- a/ext_localconf.php +++ b/ext_localconf.php @@ -1,5 +1,10 @@ 'show'], - $pluginType === 'USER_INT' ? [\Fab\RssDisplay\Controller\FeedController::class => 'show'] : [], + [FeedController::class => 'show'], + $pluginType === 'USER_INT' ? [FeedController::class => 'show'] : [], \TYPO3\CMS\Extbase\Utility\ExtensionUtility::PLUGIN_TYPE_PLUGIN ); diff --git a/ext_tables.php b/ext_tables.php index 9615237..04f9081 100644 --- a/ext_tables.php +++ b/ext_tables.php @@ -1,5 +1,6 @@ getMajorVersion() < 12) { + $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms']['db_new_content_el']['wizardItemsHook'][\Fab\RssDisplay\Backend\Wizard::class] = \Fab\RssDisplay\Backend\Wizard::class; +} + call_user_func(function () { /**