diff --git a/CHANGELOG.md b/CHANGELOG.md index 7747dbe1..100212f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ We will follow [Semantic Versioning](http://semver.org/). - Dropped support for PHP 7 - Removed `DbalService` which was used to support older `doctrine/dbal` versions for TYPO3 10 - Removed `ArrayPaginator` which was used to support TYPO3 10 +- Changed the structure of the overview filters for the `Overview` backend module + - Instead of registering it in the `EXTCONF` the filters are now registered through the `Services.yaml` + - Extra methods have been added to the `OverviewDataProviderInterface` as a replacement of the array configuration + - DataProviders are now initialized with a new `DataProviderRequest` DTO object ### Added - Support for TYPO3 13 diff --git a/Classes/Controller/AbstractBackendController.php b/Classes/Controller/AbstractBackendController.php index 2d2dfd62..9799f72b 100644 --- a/Classes/Controller/AbstractBackendController.php +++ b/Classes/Controller/AbstractBackendController.php @@ -22,7 +22,7 @@ abstract class AbstractBackendController extends ActionController /** * @param array $data */ - protected function returnResponse(array $data = [], ModuleTemplate $moduleTemplate = null): ResponseInterface + protected function returnResponse(string $template, array $data = [], ModuleTemplate $moduleTemplate = null): ResponseInterface { $data['layout'] = GeneralUtility::makeInstance(Typo3Version::class) ->getMajorVersion() < 13 ? 'Default' : 'Module'; @@ -39,7 +39,7 @@ protected function returnResponse(array $data = [], ModuleTemplate $moduleTempla $moduleTemplate->getDocHeaderComponent()->setMetaInformation($this->getPageInformation()); $moduleTemplate->assignMultiple($data); - return $moduleTemplate->renderResponse(); + return $moduleTemplate->renderResponse($template); } protected function getModuleTemplate(): ModuleTemplate diff --git a/Classes/Controller/CrawlerController.php b/Classes/Controller/CrawlerController.php index 4016e0ff..47afcff2 100644 --- a/Classes/Controller/CrawlerController.php +++ b/Classes/Controller/CrawlerController.php @@ -23,7 +23,7 @@ public function __construct( public function indexAction(): ResponseInterface { $this->addYoastJavascriptConfig(); - return $this->returnResponse(['sites' => $this->siteFinder->getAllSites()]); + return $this->returnResponse('Crawler/Index', ['sites' => $this->siteFinder->getAllSites()]); } public function resetProgressAction(int $site, int $language):? ResponseInterface diff --git a/Classes/Controller/DashboardController.php b/Classes/Controller/DashboardController.php index c1b3b732..535a9b09 100644 --- a/Classes/Controller/DashboardController.php +++ b/Classes/Controller/DashboardController.php @@ -10,6 +10,6 @@ class DashboardController extends AbstractBackendController { public function indexAction(): ResponseInterface { - return $this->returnResponse(); + return $this->returnResponse('Dashboard/Index'); } } diff --git a/Classes/Controller/OverviewController.php b/Classes/Controller/OverviewController.php index 035e6c11..62ef6239 100644 --- a/Classes/Controller/OverviewController.php +++ b/Classes/Controller/OverviewController.php @@ -34,7 +34,7 @@ public function listAction(int $currentPage = 1): ResponseInterface $overviewData = $this->getOverviewData($currentPage) + ['action' => 'list']; $moduleTemplate = $this->getModuleTemplate(); if (!isset($overviewData['pageInformation'])) { - return $this->returnResponse($overviewData, $moduleTemplate); + return $this->returnResponse('Overview/List', $overviewData, $moduleTemplate); } $moduleTemplate->getDocHeaderComponent()->setMetaInformation($overviewData['pageInformation']); @@ -47,7 +47,7 @@ public function listAction(int $currentPage = 1): ResponseInterface $moduleTemplate->getDocHeaderComponent()->getMenuRegistry()->addMenu($languageMenu); } - return $this->returnResponse($overviewData, $moduleTemplate); + return $this->returnResponse('Overview/List', $overviewData, $moduleTemplate); } /** diff --git a/Configuration/TCA/tx_yoastseo_related_focuskeyword.php b/Configuration/TCA/tx_yoastseo_related_focuskeyword.php index 4b2da38a..00f0b264 100644 --- a/Configuration/TCA/tx_yoastseo_related_focuskeyword.php +++ b/Configuration/TCA/tx_yoastseo_related_focuskeyword.php @@ -1,8 +1,11 @@ [ 'title' => $llPrefix . 'tx_yoastseo_related_focuskeyword.title', 'label' => 'keyword', @@ -25,16 +28,6 @@ ], ], 'columns' => [ - 'sys_language_uid' => $GLOBALS['TCA']['tt_content']['columns']['sys_language_uid'], - 'l10n_parent' => array_replace_recursive($GLOBALS['TCA']['tt_content']['columns']['l18n_parent'], [ - 'config' => [ - 'foreign_table' => 'tx_yoastseo_related_focuskeyword', - 'foreign_table_where' => 'AND tx_yoastseo_related_focuskeyword.pid=###CURRENT_PID### AND tx_yoastseo_related_focuskeyword.sys_language_uid IN (-1,0)', - ] - ]), - 'l10n_source' => $GLOBALS['TCA']['tt_content']['columns']['l10n_source'], - 'l10n_diffsource' => $GLOBALS['TCA']['tt_content']['columns']['l18n_diffsource'], - 'hidden' => $GLOBALS['TCA']['tt_content']['columns']['hidden'], 'keyword' => [ 'exclude' => 1, 'l10n_mode' => 'prefixLangTitle', @@ -92,3 +85,23 @@ ] ], ]; + +if (GeneralUtility::makeInstance(Typo3Version::class)->getMajorVersion() < 13) { + $focusKeywordTca['columns'] = array_merge( + $focusKeywordTca['columns'], + [ + 'sys_language_uid' => $GLOBALS['TCA']['tt_content']['columns']['sys_language_uid'], + 'l10n_parent' => array_replace_recursive($GLOBALS['TCA']['tt_content']['columns']['l18n_parent'], [ + 'config' => [ + 'foreign_table' => 'tx_yoastseo_related_focuskeyword', + 'foreign_table_where' => 'AND tx_yoastseo_related_focuskeyword.pid=###CURRENT_PID### AND tx_yoastseo_related_focuskeyword.sys_language_uid IN (-1,0)', + ] + ]), + 'l10n_source' => $GLOBALS['TCA']['tt_content']['columns']['l10n_source'], + 'l10n_diffsource' => $GLOBALS['TCA']['tt_content']['columns']['l18n_diffsource'], + 'hidden' => $GLOBALS['TCA']['tt_content']['columns']['hidden'], + ] + ); +} + +return $focusKeywordTca; diff --git a/Configuration/page.tsconfig b/Configuration/page.tsconfig new file mode 100644 index 00000000..15795645 --- /dev/null +++ b/Configuration/page.tsconfig @@ -0,0 +1,3 @@ +templates.yoast-seo-for-typo3/yoast_seo { + 10 = yoast-seo-for-typo3/yoast_seo:Resources/Private +} diff --git a/Resources/Private/Templates/Dashboard/Legacy.html b/Resources/Private/Templates/Dashboard/Legacy.html deleted file mode 100644 index ceb644c5..00000000 --- a/Resources/Private/Templates/Dashboard/Legacy.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - diff --git a/Resources/Private/Templates/Overview/Legacy.html b/Resources/Private/Templates/Overview/Legacy.html deleted file mode 100644 index 5a20495e..00000000 --- a/Resources/Private/Templates/Overview/Legacy.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/Resources/Private/Templates/Widget/OrphanedContentWidget.html b/Resources/Private/Templates/Widget/OrphanedContentWidget.html index d72a07a5..c49bd742 100644 --- a/Resources/Private/Templates/Widget/OrphanedContentWidget.html +++ b/Resources/Private/Templates/Widget/OrphanedContentWidget.html @@ -7,7 +7,7 @@
- +
diff --git a/Resources/Private/Templates/Widget/PageWithoutMetaDescriptionWidget.html b/Resources/Private/Templates/Widget/PageWithoutMetaDescriptionWidget.html index d72a07a5..c49bd742 100644 --- a/Resources/Private/Templates/Widget/PageWithoutMetaDescriptionWidget.html +++ b/Resources/Private/Templates/Widget/PageWithoutMetaDescriptionWidget.html @@ -7,7 +7,7 @@
-
+