Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if (!defined ('TYPO3_MODE')) {
- die ('Access denied.');
- }
- $TCA['tx_myext_domain_model_space'] = array(
- 'ctrl' => $TCA['tx_myext_domain_model_space']['ctrl'],
- 'interface' => array(
- 'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, people, title, size, heat, type, rules',
- ),
- 'types' => array(
- '1' => array('showitem' => 'sys_language_uid;;;;1-1-1, l10n_parent, l10n_diffsource, hidden;;1, people, title, size, heat, type, rules,--div--;LLL:EXT:cms/locallang_ttc.xml:tabs.access,starttime, endtime'),
- ),
- 'palettes' => array(
- '1' => array('showitem' => ''),
- ),
- 'columns' => array(
- 'sys_language_uid' => array(
- 'exclude' => 1,
- 'label' => 'LLL:EXT:lang/locallang_general.xml: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.xml:LGL.allLanguages', -1),
- array('LLL:EXT:lang/locallang_general.xml:LGL.default_value', 0)
- ),
- ),
- ),
- 'l10n_parent' => array(
- 'displayCond' => 'FIELD:sys_language_uid:>:0',
- 'exclude' => 1,
- 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.l18n_parent',
- 'config' => array(
- 'type' => 'select',
- 'items' => array(
- array('', 0),
- ),
- 'foreign_table' => 'tx_myext_domain_model_space',
- 'foreign_table_where' => 'AND tx_myext_domain_model_space.pid=###CURRENT_PID### AND tx_myext_domain_model_space.sys_language_uid IN (-1,0)',
- ),
- ),
- 'l10n_diffsource' => array(
- 'config' => array(
- 'type' => 'passthrough',
- ),
- ),
- 't3ver_label' => array(
- 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.versionLabel',
- 'config' => array(
- 'type' => 'input',
- 'size' => 30,
- 'max' => 255,
- )
- ),
- 'hidden' => array(
- 'exclude' => 1,
- 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.hidden',
- 'config' => array(
- 'type' => 'check',
- ),
- ),
- 'starttime' => array(
- 'exclude' => 1,
- 'l10n_mode' => 'mergeIfNotBlank',
- 'label' => 'LLL:EXT:lang/locallang_general.xml: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.xml: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'))
- ),
- ),
- ),
- 'people' => array(
- 'exclude' => 0,
- 'label' => 'LLL:EXT:myext/Resources/Private/Language/locallang_db.xml:tx_myext_domain_model_space.people',
- 'config' => array(
- 'type' => 'input',
- 'size' => 4,
- 'eval' => 'int,required'
- ),
- ),
- 'title' => array(
- 'exclude' => 0,
- 'label' => 'LLL:EXT:myext/Resources/Private/Language/locallang_db.xml:tx_myext_domain_model_space.title',
- 'config' => array(
- 'type' => 'input',
- 'size' => 30,
- 'eval' => 'trim,required'
- ),
- ),
- 'size' => array(
- 'exclude' => 0,
- 'label' => 'LLL:EXT:myext/Resources/Private/Language/locallang_db.xml:tx_myext_domain_model_space.size',
- 'config' => array(
- 'type' => 'input',
- 'size' => 30,
- 'eval' => 'double2'
- ),
- ),
- 'heat' => array(
- 'exclude' => 0,
- 'label' => 'LLL:EXT:myext/Resources/Private/Language/locallang_db.xml:tx_myext_domain_model_space.heat',
- 'config' => array(
- 'type' => 'check',
- 'default' => 0
- ),
- ),
- 'type' => array(
- 'exclude' => 0,
- 'label' => 'LLL:EXT:myext/Resources/Private/Language/locallang_db.xml:tx_myext_domain_model_space.type',
- 'config' => array(
- 'type' => 'input',
- 'size' => 4,
- 'eval' => 'int'
- ),
- ),
- 'rules' => array(
- 'exclude' => 0,
- 'label' => 'LLL:EXT:myext/Resources/Private/Language/locallang_db.xml:tx_myext_domain_model_space.rules',
- 'config' => array(
- 'type' => 'inline',
- 'foreign_table' => 'tx_myext_domain_model_rule',
- 'foreign_field' => 'space',
- 'maxitems' => 9999,
- 'appearance' => array(
- 'collapseAll' => 0,
- 'levelLinksPosition' => 'top',
- 'showSynchronizationLink' => 1,
- 'showPossibleLocalizationRecords' => 1,
- 'showAllLocalizationLink' => 1
- ),
- ),
- ),
- 'form' => array(
- 'config' => array(
- 'type' => 'passthrough',
- ),
- )
- ),
- );
- t3lib_div::loadTCA('tx_myext_domain_model_space');
- if (!isset($TCA['tx_myext_domain_model_space']['ctrl']['type'])) {
- // no type field defined, so we define it here. This will only happen the first time the extension is installed!!
- $TCA['tx_myext_domain_model_space']['ctrl']['type'] = 'tx_extbase_type';
- $tempColumns = array();
- $tempColumns[$TCA['tx_myext_domain_model_space']['ctrl']['type']] = array(
- 'exclude' => 1,
- 'label' => 'LLL:EXT:myext/Resources/Private/Language/locallang_db.xml:tx_myext_domain_model_space.tx_extbase_type',
- 'config' => array(
- 'type' => 'select',
- 'items' => array(
- array('LLL:EXT:myext/Resources/Private/Language/locallang_db.xml:tx_myext_domain_model_space.tx_extbase_type.0','0'),
- ),
- 'size' => 1,
- 'maxitems' => 1,
- 'default' => 'tx_myext_Space'
- )
- );
- t3lib_extMgm::addTCAcolumns('tx_myext_domain_model_space', $tempColumns, 1);
- }
- $TCA['tx_myext_domain_model_space']['types']['tx_myext_Space']['showitem'] = $TCA['tx_myext_domain_model_space']['types']['1']['showitem'];
- $TCA['tx_myext_domain_model_space']['columns'][$TCA['tx_myext_domain_model_space']['ctrl']['type']]['config']['items'][] = array('LLL:EXT:myext/Resources/Private/Language/locallang_db.xml:tx_myext_domain_model_space','tx_myext_Space');
- t3lib_extMgm::addToAllTCAtypes('tx_myext_domain_model_space', $TCA['tx_myext_domain_model_space']['ctrl']['type'],'','after:hidden');
- require("Utility.php");
- ## EXTENSION BUILDER DEFAULTS END TOKEN - Everything BEFORE this line is overwritten with the defaults of the extension builder
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement