mirror of
https://github.com/werkraum-media/thuecat.git
synced 2024-12-04 19:16:13 +01:00
88 lines
2.8 KiB
PHP
88 lines
2.8 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use WerkraumMedia\ThueCat\Extension;
|
|
|
|
defined('TYPO3') or die();
|
|
|
|
return (static function (string $extensionKey, string $tableName) {
|
|
$languagePath = Extension::getLanguagePath() . 'locallang_tca.xlf:' . $tableName;
|
|
|
|
return [
|
|
'ctrl' => [
|
|
'label' => 'title',
|
|
'iconfile' => Extension::getIconPath() . $tableName . '.svg',
|
|
'default_sortby' => 'title',
|
|
'tstamp' => 'tstamp',
|
|
'crdate' => 'crdate',
|
|
'title' => $languagePath,
|
|
'enablecolumns' => [
|
|
'disabled' => 'disable',
|
|
],
|
|
'searchFields' => 'title',
|
|
],
|
|
'columns' => [
|
|
'title' => [
|
|
'label' => $languagePath . '.title',
|
|
'config' => [
|
|
'type' => 'input',
|
|
'size' => 20,
|
|
'max' => 255,
|
|
'readOnly' => true,
|
|
],
|
|
],
|
|
'description' => [
|
|
'label' => $languagePath . '.description',
|
|
'config' => [
|
|
'type' => 'text',
|
|
'readOnly' => true,
|
|
],
|
|
],
|
|
'remote_id' => [
|
|
'label' => $languagePath . '.remote_id',
|
|
'config' => [
|
|
'type' => 'input',
|
|
'readOnly' => true,
|
|
],
|
|
],
|
|
'town' => [
|
|
'label' => $languagePath . '.town',
|
|
'config' => [
|
|
'type' => 'select',
|
|
'renderType' => 'selectSingle',
|
|
'foreign_table' => 'tx_thuecat_town',
|
|
'default' => '0',
|
|
'items' => [
|
|
[
|
|
'label' => $languagePath . '.town.unkown',
|
|
'value' => 0,
|
|
],
|
|
],
|
|
'readOnly' => true,
|
|
],
|
|
],
|
|
'managed_by' => [
|
|
'label' => $languagePath . '.managed_by',
|
|
'config' => [
|
|
'type' => 'select',
|
|
'renderType' => 'selectSingle',
|
|
'foreign_table' => 'tx_thuecat_organisation',
|
|
'default' => '0',
|
|
'items' => [
|
|
[
|
|
'label' => $languagePath . '.managed_by.unkown',
|
|
'value' => 0,
|
|
],
|
|
],
|
|
'readOnly' => true,
|
|
],
|
|
],
|
|
],
|
|
'types' => [
|
|
'0' => [
|
|
'showitem' => 'title, description, remote_id, town, managed_by',
|
|
],
|
|
],
|
|
];
|
|
})(Extension::EXTENSION_KEY, 'tx_thuecat_tourist_information');
|