Skip to content

Commit

Permalink
[TASK] Update configuration for v13
Browse files Browse the repository at this point in the history
  • Loading branch information
peterkraume committed Mar 15, 2024
1 parent 541c45a commit 7522eb4
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 15 deletions.
13 changes: 7 additions & 6 deletions Configuration/Backend/AjaxRoutes.php
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
<?php

use YoastSeoForTypo3\YoastSeo\Controller\AjaxController;
return [
'yoast_preview' => [
'path' => 'yoast/preview',
'target' => \YoastSeoForTypo3\YoastSeo\Controller\AjaxController::class . '::previewAction'
'target' => AjaxController::class . '::previewAction'
],
'yoast_save_scores' => [
'path' => 'yoast/savescores',
'target' => \YoastSeoForTypo3\YoastSeo\Controller\AjaxController::class . '::saveScoresAction'
'target' => AjaxController::class . '::saveScoresAction'
],
'yoast_prominent_words' => [
'path' => 'yoast/prominentwords',
'target' => \YoastSeoForTypo3\YoastSeo\Controller\AjaxController::class . '::promimentWordsAction'
'target' => AjaxController::class . '::promimentWordsAction'
],
'yoast_internal_linking_suggestions' => [
'path' => 'yoast/internallinkingsuggestions',
'target' => \YoastSeoForTypo3\YoastSeo\Controller\AjaxController::class . '::internalLinkingSuggestionsAction'
'target' => AjaxController::class . '::internalLinkingSuggestionsAction'
],
'yoast_crawler_determine_pages' => [
'path' => 'yoast/crawlerdeterminepages',
'target' => \YoastSeoForTypo3\YoastSeo\Controller\AjaxController::class . '::crawlerDeterminePages',
'target' => AjaxController::class . '::crawlerDeterminePages',
],
'yoast_crawler_index_pages' => [
'path' => 'yoast/crawlerindexpages',
'target' => \YoastSeoForTypo3\YoastSeo\Controller\AjaxController::class . '::crawlerIndexPages'
'target' => AjaxController::class . '::crawlerIndexPages'
]
];
3 changes: 2 additions & 1 deletion Configuration/RequestMiddlewares.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?php

use YoastSeoForTypo3\YoastSeo\Middleware\PageRequestMiddleware;
return [
'frontend' => [
'yoast-seo-page-request' => [
'target' => \YoastSeoForTypo3\YoastSeo\Middleware\PageRequestMiddleware::class,
'target' => PageRequestMiddleware::class,
'before' => [
'typo3/cms-frontend/tsfe'
],
Expand Down
9 changes: 6 additions & 3 deletions Configuration/TCA/Overrides/pages.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
<?php
use TYPO3\CMS\Core\Utility\GeneralUtility;
use YoastSeoForTypo3\YoastSeo\Service\TcaService;
use YoastSeoForTypo3\YoastSeo\Utility\YoastUtility;
$llPrefix = 'LLL:EXT:yoast_seo/Resources/Private/Language/BackendModule.xlf:';

\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\YoastSeoForTypo3\YoastSeo\Service\TcaService::class)
GeneralUtility::makeInstance(TcaService::class)
->addYoastFields(
'pages',
\YoastSeoForTypo3\YoastSeo\Utility\YoastUtility::getAllowedDoktypes(null, true)
YoastUtility::getAllowedDoktypes(null, true)
);

// Remove description from metatags tab
$GLOBALS['TCA']['pages']['palettes']['metatags']['showitem'] =
preg_replace('/description(.*,|.*$)/', '', $GLOBALS['TCA']['pages']['palettes']['metatags']['showitem']);
preg_replace('/description(.*,|.*$)/', '', (string) $GLOBALS['TCA']['pages']['palettes']['metatags']['showitem']);
5 changes: 3 additions & 2 deletions Configuration/TCA/Overrides/tt_content.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?php

use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
$llPrefix = 'LLL:EXT:yoast_seo/Resources/Private/Language/BackendModule.xlf:';

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns(
ExtensionManagementUtility::addTCAcolumns(
'tt_content',
[
'tx_yoastseo_linking_suggestions' => [
Expand All @@ -23,6 +24,6 @@
str_replace(
'bodytext;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:bodytext_formlabel,',
'bodytext;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:bodytext_formlabel,tx_yoastseo_linking_suggestions,',
$GLOBALS['TCA']['tt_content']['types'][$type]['showitem']
(string) $GLOBALS['TCA']['tt_content']['types'][$type]['showitem']
);
}
2 changes: 1 addition & 1 deletion Configuration/TCA/tx_yoastseo_prominent_word.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'required',
'required' => true,
]
],
'table' => [
Expand Down
3 changes: 1 addition & 2 deletions Configuration/TCA/tx_yoastseo_related_focuskeyword.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
'label' => 'keyword',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'cruser_id' => 'cruser_id',
'languageField' => 'sys_language_uid',
'transOrigPointerField' => 'l10n_parent',
'transOrigDiffSourceField' => 'l10n_diffsource',
Expand Down Expand Up @@ -40,7 +39,7 @@
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'required',
'required' => true,
]
],
'synonyms' => [
Expand Down

0 comments on commit 7522eb4

Please sign in to comment.