ext_tables.php 1.62 KB
Newer Older
1
<?php
Markus Sommer's avatar
Markus Sommer committed
2 3
if (!defined('TYPO3_MODE')) {
    die('Access denied.');
flyguide's avatar
flyguide committed
4
}
5

6 7 8 9 10 11 12 13
call_user_func(function () {
    $models = [
        'extension',
        'tag',
        'version',
        'relation',
        'author',
    ];
14

15
    // Add entities and value objects
16
    foreach ($models as $modelName => $modelConfiguration) {
Markus Sommer's avatar
Markus Sommer committed
17
        // Add help text to the Backend form
18 19
        \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr(
            'tx_terfe2_domain_model_' . $modelName,
20
            'EXT:ter_fe2/Resources/Private/Language/locallang_csh_tx_terfe2_domain_model_' . $modelName . '.xlf'
21
        );
22

Markus Sommer's avatar
Markus Sommer committed
23
        // Allow datasets on standard pages
24 25 26 27 28
        \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages(
            'tx_terfe2_domain_model_' . $modelName
        );
    }
    $extIdent = strtolower(\TYPO3\CMS\Core\Utility\GeneralUtility::underscoredToUpperCamelCase('ter_fe2')) . '_pi1';
29
    // Add plugin to new content element wizard
30
    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('
flyguide's avatar
flyguide committed
31
	mod.wizards.newContentElement.wizardItems.special {\n
32 33
		elements.' . $extIdent . ' {\n
			icon        = ' . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('ter_fe2') . 'Resources/Public/Images/Wizard.gif\n
34 35
			title       = LLL:EXT:ter_fe2/Resources/Private/Language/locallang_db.xlf:newContentElement.wizardItem.title\n
			description = LLL:EXT:ter_fe2/Resources/Private/Language/locallang_db.xlf:newContentElement.wizardItem.description\n\n
flyguide's avatar
flyguide committed
36 37
			tt_content_defValues {\n
				CType = list\n
38
				list_type = ' . $extIdent . '\n
flyguide's avatar
flyguide committed
39 40
			}\n
		}\n\n
41
		show := addToList(' . $extIdent . ')\n
flyguide's avatar
flyguide committed
42
	}
43 44
');
});