[TASK] Streamline TS registration for sysexts
[Packages/TYPO3.CMS.git] / typo3 / sysext / felogin / ext_localconf.php
1 <?php
2 defined('TYPO3_MODE') or die();
3
4 // add plugin controller
5 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScript('TYPO3.CMS.Felogin', 'setup', '
6 # Setting "felogin" plugin TypoScript
7 plugin.tx_felogin_pi1 = USER_INT
8 plugin.tx_felogin_pi1.userFunc = TYPO3\\CMS\\Felogin\\Controller\\FrontendLoginController->main
9 ');
10
11 // Add a default TypoScript for the CType "login" (also replaces history login functionality)
12 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScript('TYPO3.CMS.Felogin', 'setup', '
13 # Setting "felogin" plugin TypoScript
14 tt_content.login = COA
15 tt_content.login {
16 10 =< lib.stdheader
17 20 >
18 20 =< plugin.tx_felogin_pi1
19 }
20 ', 'defaultContentRendering');
21
22 // add login to new content element wizard
23 if (TYPO3_MODE === 'BE') {
24 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('
25 mod.wizards.newContentElement.wizardItems.forms {
26 elements.login {
27 icon = gfx/c_wiz/login_form.gif
28 title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:forms_login_title
29 description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:forms_login_description
30 tt_content_defValues {
31 CType = login
32 }
33 }
34 show :=addToList(login)
35 }
36 ');
37 }
38
39 // Page module hook
40 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['tt_content_drawItem']['felogin'] = \TYPO3\CMS\Felogin\Hooks\CmsLayout::class;