-
-
Save plue/e28b355445d63e8131f03f628f698eac to your computer and use it in GitHub Desktop.
TEMP TYPO3 Extension TCA Migration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// ext_tables.php | |
if (!defined('TYPO3_MODE')) { | |
die ('Access denied.'); | |
} | |
call_user_func(function() { | |
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( | |
'IVI.' . $_EXTKEY, | |
'Vierundzwanzigstage', | |
'Vierundzwanzig: Stage' | |
); | |
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr( | |
'tx_vierundzwanzigstage_domain_model_stage', | |
'EXT:vierundzwanzig_stage/Resources/Private/Language/locallang_csh_tx_vierundzwanzigstage_domain_model_stage.xlf' | |
); | |
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages( | |
'tx_vierundzwanzigstage_domain_model_stage' | |
); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Configuration/TCA/Overrides/sys_template.php | |
if (!defined('TYPO3_MODE')) { | |
die('Access denied.'); | |
} | |
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile( | |
'vierundzwanzig_stage', | |
'Configuration/TypoScript', | |
'Vierundzwanzig: Stage' | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Configuration/TCA/Overrides/tt_content.php | |
if (!defined('TYPO3_MODE')) { | |
die('Access denied.'); | |
} | |
$ll = 'LLL:EXT:vierundzwanzig_stage/Resources/Private/Language/locallang_db.xlf:'; | |
$GLOBALS['TCA']['tt_content']['columns'][$GLOBALS['TCA']['tt_content']['ctrl']['type']]['config']['items'][] = [ | |
0 => $ll . 'tt_content.tx_extbase_type.Tx_VierundzwanzigStage_Content', | |
1 => 'Tx_VierundzwanzigStage_Content', | |
]; | |
$temporaryColumns = [ | |
'stages' => [ | |
'exclude' => 0, | |
'label' => $ll . 'tx_vierundzwanzigstage_domain_model_content.stages', | |
'config' => [ | |
'type' => 'inline', | |
'foreign_table' => 'tx_vierundzwanzigstage_domain_model_stage', | |
'foreign_field' => 'content', | |
'maxitems' => 9999, | |
'appearance' => [ | |
'collapseAll' => 1, | |
'levelLinksPosition' => 'top', | |
'showSynchronizationLink' => 1, | |
'showPossibleLocalizationRecords' => 1, | |
'showAllLocalizationLink' => 1, | |
'useSortable' => 1, | |
], | |
], | |
], | |
]; | |
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns( | |
'tt_content', | |
$temporaryColumns | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Configuration/TCA/tx_vierundzwanzigstage_domain_model_stage.php | |
if (!defined('TYPO3_MODE')) { | |
die ('Access denied.'); | |
} | |
$ll = 'LLL:EXT:vierundzwanzig_stage/Resources/Private/Language/locallang_db.xlf:'; | |
return [ | |
'ctrl' => [ | |
'title' => $ll . 'tx_vierundzwanzigstage_domain_model_stage', | |
'label' => 'title', | |
'tstamp' => 'tstamp', | |
'crdate' => 'crdate', | |
'cruser_id' => 'cruser_id', | |
'dividers2tabs' => TRUE, | |
'sortby' => 'sorting', | |
'versioningWS' => TRUE, | |
'origUid' => 't3_origuid', | |
'languageField' => 'sys_language_uid', | |
'transOrigPointerField' => 'l10n_parent', | |
'transOrigDiffSourceField' => 'l10n_diffsource', | |
'delete' => 'deleted', | |
'enablecolumns' => array( | |
'disabled' => 'hidden', | |
'starttime' => 'starttime', | |
'endtime' => 'endtime', | |
), | |
'searchFields' => 'image,title,subtitle,linktitle,link,', | |
'iconfile' => 'EXT:vierundzwanzig_stage/Resources/Public/Icons/tx_vierundzwanzigstage_domain_model_stage.gif' | |
], | |
'types' => [ | |
0 => [ | |
'showitem' => 'sys_language_uid;;;;1-1-1, l10n_parent, l10n_diffsource, hidden;;1, image, title, subtitle, linktitle, link,--div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.access,starttime, endtime', | |
], | |
], | |
'interface' => array( | |
'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, image, title, subtitle, linktitle, link', | |
), | |
'palettes' => array( | |
'palette_access' => [ | |
'showitem' => 'hidden' | |
] | |
), | |
'columns' => array( | |
'sys_language_uid' => array( | |
'exclude' => 1, | |
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.language', | |
'config' => array( | |
'type' => 'select', | |
'foreign_table' => 'sys_language', | |
'foreign_table_where' => 'ORDER BY sys_language.title', | |
'items' => array( | |
array('LLL:EXT:lang/locallang_general.xlf:LGL.allLanguages', -1), | |
array('LLL:EXT:lang/locallang_general.xlf:LGL.default_value', 0) | |
), | |
), | |
), | |
'l10n_parent' => array( | |
'displayCond' => 'FIELD:sys_language_uid:>:0', | |
'exclude' => 1, | |
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.l18n_parent', | |
'config' => array( | |
'type' => 'select', | |
'items' => array( | |
array('', 0), | |
), | |
'foreign_table' => 'tx_vierundzwanzigstage_domain_model_stage', | |
'foreign_table_where' => 'AND tx_vierundzwanzigstage_domain_model_stage.pid=###CURRENT_PID### AND tx_vierundzwanzigstage_domain_model_stage.sys_language_uid IN (-1,0)', | |
), | |
), | |
'l10n_diffsource' => array( | |
'config' => array( | |
'type' => 'passthrough', | |
), | |
), | |
't3ver_label' => array( | |
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.versionLabel', | |
'config' => array( | |
'type' => 'input', | |
'size' => 30, | |
'max' => 255, | |
) | |
), | |
'hidden' => array( | |
'exclude' => 1, | |
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.hidden', | |
'config' => array( | |
'type' => 'check', | |
), | |
), | |
'starttime' => array( | |
'exclude' => 1, | |
'l10n_mode' => 'mergeIfNotBlank', | |
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.starttime', | |
'config' => array( | |
'type' => 'input', | |
'size' => 13, | |
'max' => 20, | |
'eval' => 'datetime', | |
'checkbox' => 0, | |
'default' => 0, | |
'range' => array( | |
'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y')) | |
), | |
), | |
), | |
'endtime' => array( | |
'exclude' => 1, | |
'l10n_mode' => 'mergeIfNotBlank', | |
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.endtime', | |
'config' => array( | |
'type' => 'input', | |
'size' => 13, | |
'max' => 20, | |
'eval' => 'datetime', | |
'checkbox' => 0, | |
'default' => 0, | |
'range' => array( | |
'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y')) | |
), | |
), | |
), | |
'image' => array( | |
'exclude' => 0, | |
'label' => 'LLL:EXT:vierundzwanzig_stage/Resources/Private/Language/locallang_db.xlf:tx_vierundzwanzigstage_domain_model_stage.image', | |
'config' => array( | |
'type' => 'group', | |
'internal_type' => 'file', | |
'uploadfolder' => 'uploads/tx_vierundzwanzigstage', | |
'show_thumbs' => 1, | |
'size' => 5, | |
'allowed' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], | |
'disallowed' => '', | |
), | |
), | |
'title' => array( | |
'exclude' => 0, | |
'label' => 'LLL:EXT:vierundzwanzig_stage/Resources/Private/Language/locallang_db.xlf:tx_vierundzwanzigstage_domain_model_stage.title', | |
'config' => array( | |
'type' => 'input', | |
'size' => 30, | |
'eval' => 'trim' | |
), | |
), | |
'subtitle' => array( | |
'exclude' => 0, | |
'label' => 'LLL:EXT:vierundzwanzig_stage/Resources/Private/Language/locallang_db.xlf:tx_vierundzwanzigstage_domain_model_stage.subtitle', | |
'config' => array( | |
'type' => 'input', | |
'size' => 30, | |
'eval' => 'trim' | |
), | |
), | |
'linktitle' => array( | |
'exclude' => 0, | |
'label' => 'LLL:EXT:vierundzwanzig_stage/Resources/Private/Language/locallang_db.xlf:tx_vierundzwanzigstage_domain_model_stage.linktitle', | |
'config' => array( | |
'type' => 'input', | |
'size' => 30, | |
'eval' => 'trim' | |
), | |
), | |
'link' => array( | |
'exclude' => 0, | |
'label' => 'LLL:EXT:vierundzwanzig_stage/Resources/Private/Language/locallang_db.xml:tx_vierundzwanzigstage_domain_model_stage.link', | |
'config' => array( | |
'type' => 'input', | |
'size' => 30, | |
'eval' => 'trim', | |
'wizards' => array( | |
'_PADDING' => 2, | |
'link' => array( | |
'type' => 'popup', | |
'title' => 'Link', | |
'icon' => 'link_popup.gif', | |
'script' => 'browse_links.php?mode=wizard', | |
'JSopenParams' => 'height=300,width=500,status=0,menubar=0,scrollbars=1' | |
) | |
) | |
), | |
), | |
'content' => array( | |
'config' => array( | |
'type' => 'passthrough', | |
), | |
), | |
), | |
]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment