tx_anctestextension_domain_model_nctestobj.php 13.6 KB
<?php
return [
    'ctrl' => [
        'title'	=> 'LLL:EXT:anctestextension/Resources/Private/Language/locallang_db.xlf:tx_anctestextension_domain_model_nctestobj',
        'label' => 'nc_test_string',
        'tstamp' => 'tstamp',
        'crdate' => 'crdate',
        'cruser_id' => 'cruser_id',
		'versioningWS' => true,
        'languageField' => 'sys_language_uid',
        'transOrigPointerField' => 'l10n_parent',
        'transOrigDiffSourceField' => 'l10n_diffsource',
		'delete' => 'deleted',
		'enablecolumns' => [
            'disabled' => 'hidden',
            'starttime' => 'starttime',
            'endtime' => 'endtime',
        ],
		'searchFields' => 'nc_test_string,nc_test_text,nc_test_rich_text,nc_test_password,nc_test_intenger,nc_test_floating_point,nc_test_boolean,nc_test_date,nc_test_date_time,nc_test_date_timestamp,nc_test_time,nc_test_time_sec,nc_test_selectlist,nc_test_file,nc_test_image,nc_test_string_required',
        'iconfile' => 'EXT:anctestextension/Resources/Public/Icons/tx_anctestextension_domain_model_nctestobj.gif'
    ],
    'interface' => [
		'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, nc_test_string, nc_test_text, nc_test_rich_text, nc_test_password, nc_test_intenger, nc_test_floating_point, nc_test_boolean, nc_test_date, nc_test_date_time, nc_test_date_timestamp, nc_test_time, nc_test_time_sec, nc_test_selectlist, nc_test_file, nc_test_image, nc_test_string_required',
    ],
    'types' => [
		'1' => ['showitem' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, nc_test_string, nc_test_text, nc_test_rich_text, nc_test_password, nc_test_intenger, nc_test_floating_point, nc_test_boolean, nc_test_date, nc_test_date_time, nc_test_date_timestamp, nc_test_time, nc_test_time_sec, nc_test_selectlist, nc_test_file, nc_test_image, nc_test_string_required, --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access, starttime, endtime'],
    ],
    'columns' => [
		'sys_language_uid' => [
			'exclude' => true,
			'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.language',
			'config' => [
				'type' => 'select',
				'renderType' => 'selectSingle',
				'special' => 'languages',
				'items' => [
					[
						'LLL:EXT:lang/locallang_general.xlf:LGL.allLanguages',
						-1,
						'flags-multiple'
					]
				],
				'default' => 0,
			],
        ],
        'l10n_parent' => [
            'displayCond' => 'FIELD:sys_language_uid:>:0',
            'exclude' => true,
            'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.l18n_parent',
            'config' => [
                'type' => 'select',
                'renderType' => 'selectSingle',
                'items' => [
                    ['', 0],
                ],
                'foreign_table' => 'tx_anctestextension_domain_model_nctestobj',
                'foreign_table_where' => 'AND tx_anctestextension_domain_model_nctestobj.pid=###CURRENT_PID### AND tx_anctestextension_domain_model_nctestobj.sys_language_uid IN (-1,0)',
            ],
        ],
        'l10n_diffsource' => [
            'config' => [
                'type' => 'passthrough',
            ],
        ],
		't3ver_label' => [
            'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.versionLabel',
            'config' => [
                'type' => 'input',
                'size' => 30,
                'max' => 255,
            ],
        ],
		'hidden' => [
            'exclude' => true,
            'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.hidden',
            'config' => [
                'type' => 'check',
                'items' => [
                    '1' => [
                        '0' => 'LLL:EXT:lang/locallang_core.xlf:labels.enabled'
                    ]
                ],
            ],
        ],
		'starttime' => [
            'exclude' => true,
            'l10n_mode' => 'mergeIfNotBlank',
            'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.starttime',
            'config' => [
                'type' => 'input',
                'size' => 13,
                'eval' => 'datetime',
                'default' => 0,
            ]
        ],
        'endtime' => [
            'exclude' => true,
            'l10n_mode' => 'mergeIfNotBlank',
            'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.endtime',
            'config' => [
                'type' => 'input',
                'size' => 13,
                'eval' => 'datetime',
                'default' => 0,
                'range' => [
                    'upper' => mktime(0, 0, 0, 1, 1, 2038)
                ]
            ],
        ],
        'nc_test_string' => [
	        'exclude' => true,
	        'label' => 'LLL:EXT:anctestextension/Resources/Private/Language/locallang_db.xlf:tx_anctestextension_domain_model_nctestobj.nc_test_string',
	        'config' => [
			    'type' => 'input',
			    'size' => 30,
			    'eval' => 'trim'
			],
	    ],
	    'nc_test_text' => [
	        'exclude' => true,
	        'label' => 'LLL:EXT:anctestextension/Resources/Private/Language/locallang_db.xlf:tx_anctestextension_domain_model_nctestobj.nc_test_text',
	        'config' => [
			    'type' => 'text',
			    'cols' => 40,
			    'rows' => 15,
			    'eval' => 'trim'
			]
	    ],
	    'nc_test_rich_text' => [
	        'exclude' => true,
	        'label' => 'LLL:EXT:anctestextension/Resources/Private/Language/locallang_db.xlf:tx_anctestextension_domain_model_nctestobj.nc_test_rich_text',
	        'config' => [
			    'type' => 'text',
			    'cols' => 40,
			    'rows' => 15,
			    'eval' => 'trim',
			],
	        'defaultExtras' => 'richtext:rte_transform[mode=ts_css]'
	    ],
	    'nc_test_password' => [
	        'exclude' => true,
	        'label' => 'LLL:EXT:anctestextension/Resources/Private/Language/locallang_db.xlf:tx_anctestextension_domain_model_nctestobj.nc_test_password',
	        'config' => [
			    'type' => 'input',
			    'size' => 30,
			    'eval' => 'nospace,password'
			]
	    ],
	    'nc_test_intenger' => [
	        'exclude' => true,
	        'label' => 'LLL:EXT:anctestextension/Resources/Private/Language/locallang_db.xlf:tx_anctestextension_domain_model_nctestobj.nc_test_intenger',
	        'config' => [
			    'type' => 'input',
			    'size' => 4,
			    'eval' => 'int'
			]
	    ],
	    'nc_test_floating_point' => [
	        'exclude' => true,
	        'label' => 'LLL:EXT:anctestextension/Resources/Private/Language/locallang_db.xlf:tx_anctestextension_domain_model_nctestobj.nc_test_floating_point',
	        'config' => [
			    'type' => 'input',
			    'size' => 30,
			    'eval' => 'double2'
			]
	    ],
	    'nc_test_boolean' => [
	        'exclude' => true,
	        'label' => 'LLL:EXT:anctestextension/Resources/Private/Language/locallang_db.xlf:tx_anctestextension_domain_model_nctestobj.nc_test_boolean',
	        'config' => [
			    'type' => 'check',
			    'items' => [
			        '1' => [
			            '0' => 'LLL:EXT:lang/locallang_core.xlf:labels.enabled'
			        ]
			    ],
			    'default' => 0
			]
	    ],
	    'nc_test_date' => [
	        'exclude' => true,
	        'label' => 'LLL:EXT:anctestextension/Resources/Private/Language/locallang_db.xlf:tx_anctestextension_domain_model_nctestobj.nc_test_date',
	        'config' => [
			    'dbType' => 'date',
			    'type' => 'input',
			    'size' => 7,
			    'eval' => 'date',
			    'default' => '0000-00-00'
			],
	    ],
	    'nc_test_date_time' => [
	        'exclude' => true,
	        'label' => 'LLL:EXT:anctestextension/Resources/Private/Language/locallang_db.xlf:tx_anctestextension_domain_model_nctestobj.nc_test_date_time',
	        'config' => [
			    'dbType' => 'datetime',
			    'type' => 'input',
			    'size' => 12,
			    'eval' => 'datetime',
			    'default' => '0000-00-00 00:00:00'
			],
	    ],
	    'nc_test_date_timestamp' => [
	        'exclude' => true,
	        'label' => 'LLL:EXT:anctestextension/Resources/Private/Language/locallang_db.xlf:tx_anctestextension_domain_model_nctestobj.nc_test_date_timestamp',
	        'config' => [
			    'type' => 'input',
			    'size' => 7,
			    'eval' => 'date',
			    'default' => time()
			],
	    ],
	    'nc_test_time' => [
	        'exclude' => true,
	        'label' => 'LLL:EXT:anctestextension/Resources/Private/Language/locallang_db.xlf:tx_anctestextension_domain_model_nctestobj.nc_test_time',
	        'config' => [
			    'type' => 'input',
			    'size' => 4,
			    'eval' => 'time',
			    'default' => time()
			]
	    ],
	    'nc_test_time_sec' => [
	        'exclude' => true,
	        'label' => 'LLL:EXT:anctestextension/Resources/Private/Language/locallang_db.xlf:tx_anctestextension_domain_model_nctestobj.nc_test_time_sec',
	        'config' => [
			    'type' => 'input',
			    'size' => 6,
			    'eval' => 'timesec',
			    'default' => time()
			]
	    ],
	    'nc_test_selectlist' => [
	        'exclude' => true,
	        'label' => 'LLL:EXT:anctestextension/Resources/Private/Language/locallang_db.xlf:tx_anctestextension_domain_model_nctestobj.nc_test_selectlist',
	        'config' => [
			    'type' => 'select',
			    'renderType' => 'selectSingle',
			    'items' => [
			        ['-- Label --', 0],
			    ],
			    'size' => 1,
			    'maxitems' => 1,
			    'eval' => ''
			],
	    ],
	    'nc_test_file' => [
	        'exclude' => true,
	        'label' => 'LLL:EXT:anctestextension/Resources/Private/Language/locallang_db.xlf:tx_anctestextension_domain_model_nctestobj.nc_test_file',
	        'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
				'nc_test_file',
				[
					'appearance' => [
						'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:media.addFileReference'
					],
					'foreign_types' => [
						'0' => [
							'showitem' => '
							--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
							--palette--;;filePalette'
						],
						\TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => [
							'showitem' => '
							--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
							--palette--;;filePalette'
						],
						\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
							'showitem' => '
							--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
							--palette--;;filePalette'
						],
						\TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => [
							'showitem' => '
							--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
							--palette--;;filePalette'
						],
						\TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => [
							'showitem' => '
							--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
							--palette--;;filePalette'
						],
						\TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => [
							'showitem' => '
							--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
							--palette--;;filePalette'
						]
					],
					'maxitems' => 1
				]
			),
	    ],
	    'nc_test_image' => [
	        'exclude' => true,
	        'label' => 'LLL:EXT:anctestextension/Resources/Private/Language/locallang_db.xlf:tx_anctestextension_domain_model_nctestobj.nc_test_image',
	        'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
			    'nc_test_image',
			    [
			        'appearance' => [
			            'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference'
			        ],
			        'foreign_types' => [
			            '0' => [
			                'showitem' => '
			                --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
			                --palette--;;filePalette'
			            ],
			            \TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => [
			                'showitem' => '
			                --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
			                --palette--;;filePalette'
			            ],
			            \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
			                'showitem' => '
			                --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
			                --palette--;;filePalette'
			            ],
			            \TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => [
			                'showitem' => '
			                --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
			                --palette--;;filePalette'
			            ],
			            \TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => [
			                'showitem' => '
			                --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
			                --palette--;;filePalette'
			            ],
			            \TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => [
			                'showitem' => '
			                --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
			                --palette--;;filePalette'
			            ]
			        ],
			        'maxitems' => 1
			    ],
			    $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
			),
	    ],
	    'nc_test_string_required' => [
	        'exclude' => true,
	        'label' => 'LLL:EXT:anctestextension/Resources/Private/Language/locallang_db.xlf:tx_anctestextension_domain_model_nctestobj.nc_test_string_required',
	        'config' => [
			    'type' => 'input',
			    'size' => 30,
			    'eval' => 'trim,required'
			],
	    ],
    ],
];