2021-02-01 14:14:05 +01:00
|
|
|
<?php
|
|
|
|
|
2023-12-05 09:43:55 +01:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
use WerkraumMedia\ThueCat\Extension;
|
|
|
|
|
2021-02-01 14:14:05 +01:00
|
|
|
defined('TYPO3') or die();
|
|
|
|
|
|
|
|
return (static function (string $extensionKey, string $tableName) {
|
2023-12-05 09:43:55 +01:00
|
|
|
$languagePath = Extension::getLanguagePath() . 'locallang_tca.xlf:' . $tableName;
|
|
|
|
$flexFormConfigurationPath = 'FILE:EXT:' . Extension::EXTENSION_KEY . '/Configuration/FlexForm/';
|
2021-02-01 14:14:05 +01:00
|
|
|
|
|
|
|
return [
|
|
|
|
'ctrl' => [
|
2022-12-15 12:41:35 +01:00
|
|
|
'label' => 'type',
|
|
|
|
'label_alt' => 'remote_id, table_name, record_uid',
|
2021-02-01 14:14:05 +01:00
|
|
|
'label_alt_force' => true,
|
2023-12-05 09:43:55 +01:00
|
|
|
'iconfile' => Extension::getIconPath() . $tableName . '.svg',
|
2022-12-15 12:41:35 +01:00
|
|
|
'type' => 'type',
|
2021-02-15 16:04:21 +01:00
|
|
|
'default_sortby' => 'crdate',
|
2021-02-01 14:14:05 +01:00
|
|
|
'tstamp' => 'tstamp',
|
|
|
|
'crdate' => 'crdate',
|
|
|
|
'title' => $languagePath,
|
|
|
|
'enablecolumns' => [
|
|
|
|
'disabled' => 'disable',
|
|
|
|
],
|
|
|
|
'rootLevel' => 1,
|
|
|
|
'hideTable' => true,
|
|
|
|
],
|
|
|
|
'columns' => [
|
2022-12-15 12:41:35 +01:00
|
|
|
'type' => [
|
|
|
|
'label' => $languagePath . '.type',
|
|
|
|
'config' => [
|
|
|
|
'type' => 'select',
|
|
|
|
'renderType' => 'selectSingle',
|
|
|
|
'items' => [
|
|
|
|
[
|
2023-12-05 09:43:55 +01:00
|
|
|
'label' => $languagePath . '.type.savingEntity',
|
|
|
|
'value' => 'savingEntity',
|
2022-12-15 12:41:35 +01:00
|
|
|
],
|
|
|
|
[
|
2023-12-05 09:43:55 +01:00
|
|
|
'label' => $languagePath . '.type.mappingError',
|
|
|
|
'value' => 'mappingError',
|
2022-12-15 12:41:35 +01:00
|
|
|
],
|
|
|
|
],
|
|
|
|
],
|
|
|
|
],
|
|
|
|
'remote_id' => [
|
|
|
|
'label' => $languagePath . '.remote_id',
|
|
|
|
'config' => [
|
|
|
|
'type' => 'input',
|
|
|
|
'readOnly' => true,
|
|
|
|
],
|
|
|
|
],
|
2021-02-01 14:14:05 +01:00
|
|
|
'insertion' => [
|
|
|
|
'label' => $languagePath . '.insertion',
|
|
|
|
'config' => [
|
|
|
|
'type' => 'check',
|
|
|
|
'renderType' => 'checkboxLabeledToggle',
|
|
|
|
'items' => [
|
|
|
|
[
|
|
|
|
'labelChecked' => $languagePath . '.insertion.yes',
|
|
|
|
'labelUnchecked' => $languagePath . '.insertion.no',
|
|
|
|
],
|
|
|
|
],
|
|
|
|
'readOnly' => true,
|
|
|
|
],
|
|
|
|
],
|
|
|
|
'table_name' => [
|
|
|
|
'label' => $languagePath . '.table_name',
|
|
|
|
'config' => [
|
|
|
|
'type' => 'input',
|
|
|
|
'readOnly' => true,
|
|
|
|
],
|
|
|
|
],
|
|
|
|
'record_uid' => [
|
|
|
|
'label' => $languagePath . '.record_uid',
|
|
|
|
'config' => [
|
|
|
|
'type' => 'input',
|
|
|
|
'readOnly' => true,
|
|
|
|
],
|
|
|
|
],
|
|
|
|
'errors' => [
|
|
|
|
'label' => $languagePath . '.errors',
|
|
|
|
'config' => [
|
|
|
|
'type' => 'text',
|
|
|
|
'readOnly' => true,
|
|
|
|
],
|
|
|
|
],
|
|
|
|
'import_log' => [
|
|
|
|
'label' => $languagePath . '.import_log',
|
|
|
|
'config' => [
|
|
|
|
'type' => 'select',
|
|
|
|
'renderType' => 'selectSingle',
|
|
|
|
'foreign_table' => 'tx_thuecat_import_log',
|
|
|
|
'readOnly' => true,
|
|
|
|
],
|
|
|
|
],
|
|
|
|
'crdate' => [
|
|
|
|
'label' => $languagePath . '.crdate',
|
|
|
|
'config' => [
|
2023-12-05 09:43:55 +01:00
|
|
|
'type' => 'datetime',
|
|
|
|
'format' => 'datetime',
|
2021-02-01 14:14:05 +01:00
|
|
|
'readOnly' => true,
|
|
|
|
],
|
|
|
|
],
|
|
|
|
],
|
2022-12-15 12:41:35 +01:00
|
|
|
'palettes' => [
|
|
|
|
'always' => [
|
|
|
|
'label' => $languagePath . '.palette.always',
|
|
|
|
'showitem' => 'type, remote_id, import_log, crdate',
|
|
|
|
],
|
|
|
|
],
|
2021-02-01 14:14:05 +01:00
|
|
|
'types' => [
|
2022-12-15 12:41:35 +01:00
|
|
|
'savingEntity' => [
|
|
|
|
'showitem' => '--palette--;;always, table_name, record_uid, insertion, errors',
|
|
|
|
],
|
|
|
|
'mappingError' => [
|
|
|
|
'showitem' => '--palette--;;always, errors',
|
2021-02-01 14:14:05 +01:00
|
|
|
],
|
|
|
|
],
|
|
|
|
];
|
2023-12-05 09:43:55 +01:00
|
|
|
})(Extension::EXTENSION_KEY, 'tx_thuecat_import_log_entry');
|