[TASK] Reduce ObjectManager usages within ConfigurationManager
[Packages/TYPO3.CMS.git] / typo3 / sysext / seo / ext_localconf.php
1 <?php
2
3 defined('TYPO3') or die();
4
5 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['TYPO3\CMS\Frontend\Page\PageGenerator']['generateMetaTags']['metatag'] =
6 \TYPO3\CMS\Seo\MetaTag\MetaTagGenerator::class . '->generate';
7 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['TYPO3\CMS\Frontend\Page\PageGenerator']['generateMetaTags']['canonical'] =
8 \TYPO3\CMS\Seo\Canonical\CanonicalGenerator::class . '->generate';
9
10 $metaTagManagerRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\MetaTag\MetaTagManagerRegistry::class);
11 $metaTagManagerRegistry->registerManager(
12 'opengraph',
13 \TYPO3\CMS\Seo\MetaTag\OpenGraphMetaTagManager::class
14 );
15 $metaTagManagerRegistry->registerManager(
16 'twitter',
17 \TYPO3\CMS\Seo\MetaTag\TwitterCardMetaTagManager::class
18 );
19 unset($metaTagManagerRegistry);
20
21 // Add module configuration
22 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptSetup(trim('
23 config.pageTitleProviders {
24 seo {
25 provider = TYPO3\CMS\Seo\PageTitle\SeoTitlePageTitleProvider
26 before = record
27 }
28 }
29 '));
30
31 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(trim('
32 mod.web_info.fieldDefinitions {
33 seo {
34 label = LLL:EXT:seo/Resources/Private/Language/locallang_webinfo.xlf:seo
35 fields = title,slug,seo_title,description,no_index,no_follow,canonical_link,sitemap_changefreq,sitemap_priority
36 }
37 social_media {
38 label = LLL:EXT:seo/Resources/Private/Language/locallang_webinfo.xlf:social_media
39 fields = title,og_title,og_description,twitter_title,twitter_description
40 }
41 }
42 '));