[DOCS] Correct code-block directive
[Packages/TYPO3.CMS.git] / typo3 / sysext / felogin / ext_localconf.php
1 <?php
2 defined('TYPO3_MODE') or die();
3
4 // Add default TypoScript
5 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptConstants(
6 "@import 'EXT:felogin/Configuration/TypoScript/constants.typoscript'"
7 );
8 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptSetup(
9 "@import 'EXT:felogin/Configuration/TypoScript/setup.typoscript'"
10 );
11
12 // Add additional TypoScript & TsConfig depending on the value of the feature toggle "felogin.extbase"
13 $feloginExtbase = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Configuration\Features::class)
14 ->isFeatureEnabled('felogin.extbase');
15
16 if (!$feloginExtbase) {
17 // Add a default TypoScript for the CType "login" with PiBase Plugin
18 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptConstants(
19 "@import 'EXT:felogin/Configuration/TypoScript/PiBase/constants.typoscript'"
20 );
21 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptSetup(
22 "@import 'EXT:felogin/Configuration/TypoScript/PiBase/setup.typoscript'"
23 );
24
25 // Add login form to new content element wizard
26 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
27 "@import 'EXT:felogin/Configuration/TsConfig/Page/PiBase/Mod/Wizards/NewContentElement.tsconfig'"
28 );
29 } else {
30 \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
31 'Felogin',
32 'Login',
33 [
34 \TYPO3\CMS\FrontendLogin\Controller\LoginController::class => 'login, overview',
35 \TYPO3\CMS\FrontendLogin\Controller\PasswordRecoveryController::class => 'recovery,showChangePassword,changePassword'
36 ],
37 [
38 \TYPO3\CMS\FrontendLogin\Controller\LoginController::class => 'login, overview',
39 \TYPO3\CMS\FrontendLogin\Controller\PasswordRecoveryController::class => 'recovery,showChangePassword,changePassword'
40 ],
41 \TYPO3\CMS\Extbase\Utility\ExtensionUtility::PLUGIN_TYPE_CONTENT_ELEMENT
42 );
43
44 // Add login form to new content element wizard
45 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
46 "@import 'EXT:felogin/Configuration/TsConfig/Page/Mod/Wizards/NewContentElement.tsconfig'"
47 );
48 }
49
50 // Page module hook
51 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['tt_content_drawItem']['felogin'] = \TYPO3\CMS\FrontendLogin\Hooks\CmsLayout::class;
52
53 // Add migration wizards
54 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update'][\TYPO3\CMS\Felogin\Updates\MigrateFeloginPlugins::class]
55 = \TYPO3\CMS\Felogin\Updates\MigrateFeloginPlugins::class;
56 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update'][\TYPO3\CMS\FrontendLogin\Updates\MigrateFeloginPluginsCtype::class]
57 = \TYPO3\CMS\FrontendLogin\Updates\MigrateFeloginPluginsCtype::class;