Commit 5b440ee3 authored by Thomas Löffler's avatar Thomas Löffler

[TASK] Moves TCA configuration into the right place

parent 7f117713
Pipeline #1779 passed with stages
in 2 minutes and 7 seconds
<?php
/**
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
$extensionKey = 'ter';
return [
'ctrl' => [
'label' => 'extensionuid',
'label_userFunc' => 'EXT:ter/class.tx_ter_tcaLabel.php:tx_ter_tcaLabel->getExtensionKey',
'default_sortby' => 'ORDER BY extensionuid',
'title' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensiondetails',
'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($extensionKey) . 'tx_ter_extensiondetails.gif',
'dynamicConfigFile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($extensionKey) . 'tca.php',
'dividers2tabs' => true,
],
'interface' => [
'showRecordFieldList' => '',
],
'columns' => [
'extensionuid' => [
'label' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensiondetails.extensionuid',
'config' => [
'type' => 'input',
'size' => '15',
'max' => '11',
],
],
'uploadcomment' => [
'label' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensiondetails.uploadcomment',
'config' => [
'type' => 'text',
'cols' => '40',
'rows' => '3',
],
],
'lastuploadbyusername' => [
'label' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensiondetails.lastuploadbyusername',
'config' => [
'type' => 'input',
'size' => '40',
'max' => '30',
'eval' => 'trim',
],
],
'lastuploaddate' => [
'label' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensiondetails.lastuploaddate',
'config' => [
'type' => 'input',
'size' => '15',
'max' => '11',
],
],
'datasize' => [
'label' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensiondetails.datasize',
'config' => [
'type' => 'input',
'size' => '15',
'max' => '11',
],
],
'datasizecompressed' => [
'label' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensiondetails.datasizecompressed',
'config' => [
'type' => 'input',
'size' => '15',
'max' => '11',
],
],
'files' => [
'label' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensiondetails.files',
'config' => [
'type' => 'text',
'cols' => '40',
'rows' => '3',
],
],
'codelines' => [
'label' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensiondetails.codelines',
'config' => [
'type' => 'input',
'size' => '15',
'max' => '11',
],
],
'codebytes' => [
'label' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensiondetails.codebytes',
'config' => [
'type' => 'input',
'size' => '15',
'max' => '11',
],
],
'techinfo' => [
'label' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensiondetails.techinfo',
'config' => [
'type' => 'text',
'cols' => '40',
'rows' => '3',
],
],
'composerinfo' => [
'label' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensiondetails.composerinfo',
'config' => [
'type' => 'text',
'cols' => '40',
'rows' => '3',
],
],
'shy' => [
'label' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensiondetails.shy',
'config' => [
'type' => 'check',
'default' => '0',
],
],
'dependencies' => [
'label' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensiondetails.dependencies',
'config' => [
'type' => 'text',
'cols' => '40',
'rows' => '3',
],
],
'createdirs' => [
'label' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensiondetails.createdirs',
'config' => [
'type' => 'text',
'cols' => '40',
'rows' => '3',
],
],
'priority' => [
'label' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensiondetails.priority',
'config' => [
'type' => 'input',
'size' => '15',
'max' => '10',
],
],
'modules' => [
'label' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensiondetails.modules',
'config' => [
'type' => 'input',
'size' => '40',
'eval' => 'trim',
],
],
'uploadfolder' => [
'label' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensiondetails.uploadfolder',
'config' => [
'type' => 'check',
'default' => '0',
],
],
'modifytables' => [
'label' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensiondetails.modifytables',
'config' => [
'type' => 'input',
'size' => '40',
'eval' => 'trim',
],
],
'clearcacheonload' => [
'label' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensiondetails.clearcacheonload',
'config' => [
'type' => 'check',
'default' => '0',
],
],
'locktype' => [
'label' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensiondetails.locktype',
'config' => [
'type' => 'input',
'size' => '5',
'max' => '1',
],
],
'authorname' => [
'label' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensiondetails.authorname',
'config' => [
'type' => 'input',
'size' => '40',
'eval' => 'trim',
],
],
'authoremail' => [
'label' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensiondetails.authoremail',
'config' => [
'type' => 'input',
'size' => '40',
'eval' => 'trim',
],
],
'authorcompany' => [
'label' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensiondetails.authorcompany',
'config' => [
'type' => 'input',
'size' => '40',
'eval' => 'trim',
],
],
'codingguidelinescompliance' => [
'label' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensiondetails.codingguidelinescompliance',
'config' => [
'type' => 'input',
'size' => '15',
'max' => '10',
'eval' => 'trim',
],
],
'codingguidelinescompliancenote' => [
'label' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensiondetails.codingguidelinescompliancenote',
'config' => [
'type' => 'input',
'size' => '40',
'eval' => 'trim',
],
],
'loadorder' => [
'label' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensiondetails.loadorder',
'config' => [
'type' => 'input',
'size' => '40',
'eval' => 'trim',
],
],
],
'types' => [
'1' => ['showitem' => 'extensionuid,uploadcomment,lastuploadbyusername,lastuploaddate,datasize,datasizecompressed,files,codelines,codebytes,techinfo,shy,dependencies,createdirs,priority,modules,uploadfolder,modifytables,clearcacheonload,locktype,authorname,authoremail,authorcompany,codingguidelinescompliance,codingguidelinescompliancenote,loadorder'],
]
];
<?php
/**
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
$extensionKey = 'ter';
return [
'ctrl' => [
'label' => 'extensionkey',
'default_sortby' => 'ORDER BY extensionkey',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'title' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensionkeys',
'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($extensionKey) . 'tx_ter_extensionkeys.gif',
'dynamicConfigFile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($extensionKey) . 'tca.php',
'dividers2tabs' => true,
],
'interface' => [
'showRecordFieldList' => 'extensionkey',
],
'columns' => [
'title' => [
'label' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensionkeys.title',
'config' => [
'type' => 'input',
'size' => '40',
'max' => '250',
'eval' => 'trim,required',
],
],
'description' => [
'label' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensionkeys.description',
'config' => [
'type' => 'text',
'cols' => '40',
'rows' => '5',
],
],
'extensionkey' => [
'label' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensionkeys.extensionkey',
'config' => [
'type' => 'input',
'size' => '40',
'max' => '30',
'eval' => 'trim,unique,required',
],
],
'ownerusername' => [
'label' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensionkeys.ownerusername',
'config' => [
'type' => 'input',
'size' => '40',
'max' => '30',
'eval' => 'trim',
],
],
'maxstoresize' => [
'label' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensionkeys.maxstoresize',
'config' => [
'type' => 'input',
'size' => '10',
'max' => '10',
'eval' => 'int',
],
],
'downloadcounter' => [
'label' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensions.downloadcounter',
'config' => [
'type' => 'input',
'size' => '5',
'max' => '11',
],
],
],
'types' => [
'1' => ['showitem' => 'title,description,extensionkey,ownerusername,maxstoresize,downloadcounter'],
]
];
<?php
/**
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
$extensionKey = 'ter';
return [
'ctrl' => [
'label' => 'extensionkey',
'default_sortby' => 'ORDER BY extensionkey',
'title' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensionmembers',
'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($extensionKey) . 'tx_ter_extensionmembers.gif',
'dynamicConfigFile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($extensionKey) . 'tca.php',
'dividers2tabs' => true,
],
'interface' => [
'showRecordFieldList' => 'extensionkey,username',
],
'columns' => [
'extensionkey' => [
'label' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensionmembers.extensionkey',
'config' => [
'type' => 'input',
'size' => '40',
'max' => '30',
'eval' => 'trim',
],
],
'username' => [
'label' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensionmembers.username',
'config' => [
'type' => 'input',
'size' => '40',
'max' => '30',
'eval' => 'trim',
],
],
],
'types' => [
'1' => ['showitem' => 'extensionkey,username'],
]
];
<?php
/**
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
$extensionKey = 'ter';
return [
'ctrl' => [
'label' => 'extensionkey',
'default_sortby' => 'ORDER BY extensionuid',
'crdate' => 'crdate',
'tstamp' => 'tstamp',
'delete' => 'deleted',
'title' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensionqueue',
'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($extensionKey) . 'tx_ter_extensionqueue.gif',
'dynamicConfigFile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($extensionKey) . 'tca.php',
'dividers2tabs' => true,
],
'interface' => [
'showRecordFieldList' => 'hidden, extensionkey, extensionuid, imported_to_fe',
],
'columns' => [
'hidden' => [
'exclude' => 1,
'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.hidden',
'config' => [
'type' => 'check',
],
],
'extensionkey' => [
'label' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensionqueue.extensionkey',
'config' => [
'type' => 'input',
'size' => '20',
'max' => '40',
],
],
'extensionuid' => [
'label' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensionqueue.extensionuid',
'config' => [
'type' => 'input',
'size' => '15',
'max' => '11',
],
],
'imported_to_fe' => [
'label' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensionqueue.imported_into_fe',
'config' => [
'type' => 'checkbox'
],
],
],
'types' => [
'1' => ['showitem' => 'extensionuid,extensionkey,imported_into_fe'],
]
];
<?php
/**
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
$extensionKey = 'ter';
return [
'ctrl' => [
'label' => 'extensionkey',
'default_sortby' => 'ORDER BY extensionkey',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'title' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensions',
'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($extensionKey) . 'tx_ter_extensions.gif',
'dynamicConfigFile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($extensionKey) . 'tca.php',
'dividers2tabs' => true,
],
'interface' => [
'showRecordFieldList' => '',
],
'columns' => [
'extensionkey' => [
'label' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensions.extensionkey',
'config' => [
'type' => 'input',
'size' => '40',
'max' => '30',
'eval' => 'trim',
],
],
'version' => [
'label' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensions.version',
'config' => [
'type' => 'input',
'size' => '40',
'max' => '50',
'eval' => 'trim',
],
],
'title' => [
'label' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensions.title',
'config' => [
'type' => 'input',
'size' => '40',
'max' => '50',
'eval' => 'trim',
],
],
'description' => [
'label' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensions.description',
'config' => [
'type' => 'text',
'cols' => '40',
'rows' => '3',
],
],
'state' => [
'label' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensions.state',
'config' => [
'type' => 'input',
'size' => '40',
'max' => '15',
'eval' => 'trim',
],
],
'reviewstate' => [
'label' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensions.reviewstate',
'config' => [
'type' => 'input',
'size' => '5',
'max' => '5',
],
],
'category' => [
'label' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensions.category',
'config' => [
'type' => 'input',
'size' => '40',
'max' => '30',
'eval' => 'trim',
],
],
'downloadcounter' => [
'label' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensions.downloadcounter',
'config' => [
'type' => 'input',
'size' => '5',
'max' => '5',
],
],
'ismanualincluded' => [
'label' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensions.ismanualincluded',
'config' => [
'type' => 'check',
'default' => '0',
],
],
't3xfilemd5' => [
'label' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensions.t3xfilemd5',
'config' => [
'type' => 'input',
'size' => '32',
'max' => '32',
'eval' => 'trim',
],
],
],
'types' => [
'1' => ['showitem' => 'extensionkey,version,title,description,state,reviewstate,category,downloadcounter,ismanualincluded,t3xfilemd5'],
]
];
......@@ -3,84 +3,11 @@ if (!defined('TYPO3_MODE')) {
die ('Access denied.');
}
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
// Add tables to TCA
$TCA['tx_ter_extensionkeys'] = [
'ctrl' => [
'label' => 'extensionkey',
'default_sortby' => 'ORDER BY extensionkey',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'title' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensionkeys',
'iconfile' => ExtensionManagementUtility::extRelPath($_EXTKEY) . 'tx_ter_extensionkeys.gif',
'dynamicConfigFile' => ExtensionManagementUtility::extPath($_EXTKEY) . 'tca.php',
'dividers2tabs' => TRUE,
]
];
$TCA['tx_ter_extensionmembers'] = [
'ctrl' => [
'label' => 'extensionkey',
'default_sortby' => 'ORDER BY extensionkey',
'title' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensionmembers',
'iconfile' => ExtensionManagementUtility::extRelPath($_EXTKEY) . 'tx_ter_extensionmembers.gif',
'dynamicConfigFile' => ExtensionManagementUtility::extPath($_EXTKEY) . 'tca.php',
'dividers2tabs' => TRUE,
]
];
$TCA['tx_ter_extensions'] = [
'ctrl' => [
'label' => 'extensionkey',
'default_sortby' => 'ORDER BY extensionkey',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'title' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensions',
'iconfile' => ExtensionManagementUtility::extRelPath($_EXTKEY) . 'tx_ter_extensions.gif',
'dynamicConfigFile' => ExtensionManagementUtility::extPath($_EXTKEY) . 'tca.php',
'dividers2tabs' => TRUE,
]
];
$TCA['tx_ter_extensiondetails'] = [
'ctrl' => [
'label' => 'extensionuid',
'label_userFunc' => 'EXT:ter/class.tx_ter_tcaLabel.php:tx_ter_tcaLabel->getExtensionKey',
'default_sortby' => 'ORDER BY extensionuid',
'title' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensiondetails',
'iconfile' => ExtensionManagementUtility::extRelPath($_EXTKEY) . 'tx_ter_extensiondetails.gif',
'dynamicConfigFile' => ExtensionManagementUtility::extPath($_EXTKEY) . 'tca.php',
'dividers2tabs' => TRUE,
]
];
$TCA['tx_ter_extensionqueue'] = [
'ctrl' => [
'label' => 'extensionkey',
'default_sortby' => 'ORDER BY extensionuid',
'crdate' => 'crdate',
'tstamp' => 'tstamp',
'delete' => 'deleted',
'title' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensionqueue',
'iconfile' => ExtensionManagementUtility::extRelPath($_EXTKEY) . 'tx_ter_extensionqueue.gif',
'dynamicConfigFile' => ExtensionManagementUtility::extPath($_EXTKEY) . 'tca.php',
'dividers2tabs' => TRUE,
]
];
// Remove the old "CODE", "Layout" and the "recursive" fields
$TCA['tt_content']['types']['list']['subtypes_excludelist'][$_EXTKEY . '_pi1'] = 'layout,select_key,pages,recursive';
// Add plugin and datasets
ExtensionManagementUtility::addPlugin(['TER SOAP Server', $_EXTKEY . '_pi1']);
ExtensionManagementUtility::allowTableOnStandardPages('tx_ter_extensionkeys');
ExtensionManagementUtility::allowTableOnStandardPages('tx_ter_extensionmembers');
ExtensionManagementUtility::allowTableOnStandardPages('tx_ter_extensions');
ExtensionManagementUtility::allowTableOnStandardPages('tx_ter_extensiondetails');
ExtensionManagementUtility::allowTableOnStandardPages('tx_ter_extensionqueue');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(['TER SOAP Server', $_EXTKEY . '_pi1']);
// Add static configuration files
ExtensionManagementUtility::addStaticFile($_EXTKEY, 'resources/static/', 'TER Server');
?>
\ No newline at end of file
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'resources/static/', 'TER Server');
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment