2021-02-01 14:14:05 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
defined('TYPO3') or die();
|
|
|
|
|
|
|
|
return (static function (string $extensionKey, string $tableName) {
|
|
|
|
$languagePath = \WerkraumMedia\ThueCat\Extension::getLanguagePath() . 'locallang_tca.xlf:' . $tableName;
|
|
|
|
$flexFormConfigurationPath = 'FILE:EXT:' . \WerkraumMedia\ThueCat\Extension::EXTENSION_KEY . '/Configuration/FlexForm/';
|
|
|
|
|
|
|
|
return [
|
|
|
|
'ctrl' => [
|
|
|
|
'label' => 'title',
|
2021-02-17 15:52:34 +01:00
|
|
|
'iconfile' => \WerkraumMedia\ThueCat\Extension::getIconPath() . $tableName . '.svg',
|
2021-05-31 13:32:58 +02:00
|
|
|
'type' => 'type',
|
2021-02-01 14:14:05 +01:00
|
|
|
'default_sortby' => 'title',
|
|
|
|
'tstamp' => 'tstamp',
|
|
|
|
'crdate' => 'crdate',
|
|
|
|
'cruser_id' => 'cruser_id',
|
|
|
|
'title' => $languagePath,
|
|
|
|
'enablecolumns' => [
|
|
|
|
'disabled' => 'disable',
|
|
|
|
],
|
|
|
|
'searchFields' => 'title',
|
2021-06-01 09:44:14 +02:00
|
|
|
'rootLevel' => -1,
|
2021-02-01 14:14:05 +01:00
|
|
|
],
|
|
|
|
'columns' => [
|
|
|
|
'title' => [
|
|
|
|
'label' => $languagePath . '.title',
|
|
|
|
'config' => [
|
|
|
|
'type' => 'input',
|
|
|
|
'max' => 255,
|
|
|
|
'eval' => 'required,trim,unique',
|
|
|
|
],
|
|
|
|
],
|
|
|
|
'type' => [
|
|
|
|
'label' => $languagePath . '.type',
|
|
|
|
'config' => [
|
|
|
|
'type' => 'select',
|
|
|
|
'renderType' => 'selectSingle',
|
|
|
|
'items' => [
|
|
|
|
[
|
|
|
|
$languagePath . '.type.static',
|
|
|
|
'static',
|
|
|
|
],
|
2021-05-31 13:32:58 +02:00
|
|
|
[
|
|
|
|
$languagePath . '.type.syncScope',
|
|
|
|
'syncScope',
|
|
|
|
],
|
2021-02-01 14:14:05 +01:00
|
|
|
],
|
|
|
|
],
|
|
|
|
],
|
|
|
|
'configuration' => [
|
|
|
|
'label' => $languagePath . '.configuration',
|
|
|
|
'config' => [
|
|
|
|
'type' => 'flex',
|
|
|
|
'ds_pointerField' => 'type',
|
|
|
|
'ds' => [
|
|
|
|
'default' => $flexFormConfigurationPath . 'ImportConfiguration/Static.xml',
|
|
|
|
'static' => $flexFormConfigurationPath . 'ImportConfiguration/Static.xml',
|
2021-05-31 13:32:58 +02:00
|
|
|
'syncScope' => $flexFormConfigurationPath . 'ImportConfiguration/SyncScope.xml',
|
2021-02-01 14:14:05 +01:00
|
|
|
],
|
|
|
|
],
|
|
|
|
],
|
|
|
|
'tstamp' => [
|
|
|
|
'config' => [
|
|
|
|
'type' => 'input',
|
|
|
|
'renderType' => 'inputDateTime',
|
|
|
|
'eval' => 'datetime',
|
|
|
|
'readOnly' => true,
|
|
|
|
],
|
|
|
|
],
|
|
|
|
],
|
|
|
|
'types' => [
|
|
|
|
'0' => [
|
|
|
|
'showitem' => 'title, type, configuration',
|
|
|
|
],
|
|
|
|
],
|
|
|
|
];
|
|
|
|
})(\WerkraumMedia\ThueCat\Extension::EXTENSION_KEY, 'tx_thuecat_import_configuration');
|