thuecat/Configuration/TCA/tx_thuecat_tourist_information.php

84 lines
2.7 KiB
PHP
Raw Normal View History

<?php
defined('TYPO3') or die();
return (static function (string $extensionKey, string $tableName) {
$languagePath = \WerkraumMedia\ThueCat\Extension::getLanguagePath() . 'locallang_tca.xlf:' . $tableName;
return [
'ctrl' => [
'label' => 'title',
2021-02-17 15:52:34 +01:00
'iconfile' => \WerkraumMedia\ThueCat\Extension::getIconPath() . $tableName . '.svg',
'default_sortby' => 'title',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'cruser_id' => 'cruser_id',
'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',
'items' => [
[
$languagePath . '.town.unkown',
0,
],
],
'readOnly' => true,
],
],
'managed_by' => [
'label' => $languagePath . '.managed_by',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'foreign_table' => 'tx_thuecat_organisation',
'items' => [
[
$languagePath . '.managed_by.unkown',
0,
],
],
'readOnly' => true,
],
],
],
'types' => [
'0' => [
'showitem' => 'title, description, remote_id, town, managed_by',
],
],
];
})(\WerkraumMedia\ThueCat\Extension::EXTENSION_KEY, 'tx_thuecat_tourist_information');