From 2459fc3ffc81ca0af0bf5dd3352cc6eb09f54702 Mon Sep 17 00:00:00 2001 From: David Bruchmann Date: Fri, 29 Mar 2024 21:05:41 +0700 Subject: [PATCH] [TASK] fix several minor issues in TCA and flexfom. (#747) * fix #746 * fix #745 * fix #744 * fix #743 --- Classes/Service/ValidationService.php | 1 - .../FlexForms/plugin_flexform.phpt | 18 +++++++----------- .../TCA/Overrides/tt_content.phpt | 8 ++++---- .../Extbase/Configuration/TCA/tableName.phpt | 18 +++++++----------- .../CodeTemplates/Extbase/extEmconf.phpt | 1 - .../test_extension/ext_emconf.php | 1 - 6 files changed, 18 insertions(+), 29 deletions(-) diff --git a/Classes/Service/ValidationService.php b/Classes/Service/ValidationService.php index d741885d2..d0be1136d 100644 --- a/Classes/Service/ValidationService.php +++ b/Classes/Service/ValidationService.php @@ -333,7 +333,6 @@ class ValidationService implements SingletonInterface 'fe_group', 'hidden', 'deleted', - 'cruser_id', 'crdate', 'tstamp', 'sys_language', diff --git a/Resources/Private/CodeTemplates/Extbase/Configuration/FlexForms/plugin_flexform.phpt b/Resources/Private/CodeTemplates/Extbase/Configuration/FlexForms/plugin_flexform.phpt index f296f90c1..b8562246c 100644 --- a/Resources/Private/CodeTemplates/Extbase/Configuration/FlexForms/plugin_flexform.phpt +++ b/Resources/Private/CodeTemplates/Extbase/Configuration/FlexForms/plugin_flexform.phpt @@ -6,20 +6,16 @@ - - Plugin Options - + Plugin Options array - - - - input - 50 - trim - - + + + input + 50 + trim + diff --git a/Resources/Private/CodeTemplates/Extbase/Configuration/TCA/Overrides/tt_content.phpt b/Resources/Private/CodeTemplates/Extbase/Configuration/TCA/Overrides/tt_content.phpt index 63eb5054a..01648c26e 100644 --- a/Resources/Private/CodeTemplates/Extbase/Configuration/TCA/Overrides/tt_content.phpt +++ b/Resources/Private/CodeTemplates/Extbase/Configuration/TCA/Overrides/tt_content.phpt @@ -20,10 +20,10 @@ if (!is_array($GLOBALS['TCA']['tt_content']['types']['{extension.extensionKey}_{ 'tt_content', 'CType', [ - '{plugin.name -> k:format.quoteString()}', - '{extension.extensionKey}_{plugin.key}', - '{extension.extensionKey}-plugin-{plugin.key}', - '{extension.extensionKey}' + 'label' => '{plugin.name -> k:format.quoteString()}', + 'value' => '{extension.extensionKey}_{plugin.key}', + 'icon' => '{extension.extensionKey}-plugin-{plugin.key}', + 'group' => '{extension.extensionKey}' ] ); diff --git a/Resources/Private/CodeTemplates/Extbase/Configuration/TCA/tableName.phpt b/Resources/Private/CodeTemplates/Extbase/Configuration/TCA/tableName.phpt index b06bd7d4d..d718609f5 100644 --- a/Resources/Private/CodeTemplates/Extbase/Configuration/TCA/tableName.phpt +++ b/Resources/Private/CodeTemplates/Extbase/Configuration/TCA/tableName.phpt @@ -4,8 +4,7 @@ return [ 'title' => 'LLL:EXT:{extension.extensionKey}/Resources/Private/Language/locallang_db.xlf:{domainObject.databaseTableName}', 'label' => '{domainObject.listModuleValueLabel}', 'tstamp' => 'tstamp', - 'crdate' => 'crdate', - 'cruser_id' => 'cruser_id', + 'crdate' => 'crdate', 'sortby' => 'sorting', 'versioningWS' => true, 'languageField' => 'sys_language_uid', @@ -42,7 +41,7 @@ return [ 'renderType' => 'selectSingle', 'default' => 0, 'items' => [ - ['', 0], + ['label' => '', 'value' => 0], ], 'foreign_table' => '{domainObject.databaseTableName}', 'foreign_table_where' => 'AND #{domainObject.databaseTableName}.#pid=###CURRENT_PID### AND #{domainObject.databaseTableName}.#sys_language_uid IN (-1,0)', @@ -61,8 +60,7 @@ return [ 'renderType' => 'checkboxToggle', 'items' => [ [ - 0 => '', - 1 => '', + 'label' => '', 'invertStateDisplay' => true ] ], @@ -72,9 +70,8 @@ return [ 'exclude' => true, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime', 'config' => [ - 'type' => 'input', - 'renderType' => 'inputDateTime', - 'eval' => 'datetime,int', + 'type' => 'datetime', + 'format' => 'datetime', 'default' => 0, 'behaviour' => [ 'allowLanguageSynchronization' => true @@ -85,9 +82,8 @@ return [ 'exclude' => true, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime', 'config' => [ - 'type' => 'input', - 'renderType' => 'inputDateTime', - 'eval' => 'datetime,int', + 'type' => 'datetime', + 'format' => 'datetime', 'default' => 0, 'range' => [ 'upper' => mktime(0, 0, 0, 1, 1, 2038) diff --git a/Resources/Private/CodeTemplates/Extbase/extEmconf.phpt b/Resources/Private/CodeTemplates/Extbase/extEmconf.phpt index 0c1139875..9f0844a2b 100644 --- a/Resources/Private/CodeTemplates/Extbase/extEmconf.phpt +++ b/Resources/Private/CodeTemplates/Extbase/extEmconf.phpt @@ -8,7 +8,6 @@ $EM_CONF[$_EXTKEY] = [ 'author' => ', {person.name}', 'author_email' => ', {person.email}', 'state' => '{extension.readableState}', - 'clearCacheOnLoad' => 0, 'version' => '{extension.version}', 'constraints' => [ 'depends' => [ diff --git a/Tests/Fixtures/TestExtensions/test_extension/ext_emconf.php b/Tests/Fixtures/TestExtensions/test_extension/ext_emconf.php index bdb53dd5d..c936a140d 100644 --- a/Tests/Fixtures/TestExtensions/test_extension/ext_emconf.php +++ b/Tests/Fixtures/TestExtensions/test_extension/ext_emconf.php @@ -7,7 +7,6 @@ 'author' => 'John Doe', 'author_email' => 'mail@typo3.com', 'state' => 'alpha', - 'clearCacheOnLoad' => 0, 'version' => '1.0.0', 'constraints' => [ 'depends' => [