Initial commit - Typo3 11.5.41
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
defined('TYPO3_MODE') or defined('TYPO3') or die;
|
||||
|
||||
$typo3Version = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Information\Typo3Version::class)->getMajorVersion();
|
||||
|
||||
// Override news icon
|
||||
$GLOBALS['TCA']['pages']['columns']['module']['config']['items'][] = $typo3Version < 12 ? [
|
||||
0 => 'LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address',
|
||||
1 => 'tt_address',
|
||||
2 => 'apps-pagetree-folder-contains-tt-address',
|
||||
] : [
|
||||
'label' => 'LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address',
|
||||
'value' => 'tt_address',
|
||||
'icon' => 'apps-pagetree-folder-contains-tt-address',
|
||||
];
|
||||
|
||||
$GLOBALS['TCA']['pages']['ctrl']['typeicon_classes']['contains-tt-address'] = 'apps-pagetree-folder-contains-tt-address';
|
||||
$GLOBALS['TCA']['pages']['ctrl']['typeicon_classes']['contains-tt_address'] = 'apps-pagetree-folder-contains-tt-address';
|
||||
$GLOBALS['TCA']['pages']['ctrl']['typeicon_classes']['contains-ttaddress'] = 'apps-pagetree-folder-contains-tt-address';
|
||||
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::registerPageTSConfigFile(
|
||||
'tt_address',
|
||||
'Configuration/TSconfig/AllowedNewTables.typoscript',
|
||||
'EXT:tt_address :: Restrict pages to tt_address records'
|
||||
);
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('reactions')) {
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
|
||||
'sys_reaction',
|
||||
'table_name',
|
||||
[
|
||||
'label' => 'LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address',
|
||||
'value' => 'tt_address',
|
||||
'icon' => 'EXT:tt_address/Resources/Public/Icons/tt_address.svg',
|
||||
]
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
defined('TYPO3_MODE') or defined('TYPO3') or die;
|
||||
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile('tt_address', 'Configuration/TypoScript/', 'Addresses (Extbase/Fluid)');
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
defined('TYPO3_MODE') or defined('TYPO3') or die;
|
||||
|
||||
call_user_func(static function () {
|
||||
// Enable language synchronisation for the category field
|
||||
$GLOBALS['TCA']['tt_address']['columns']['categories']['config']['behaviour']['allowLanguageSynchronization'] = true;
|
||||
|
||||
$versionInformation = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Information\Typo3Version::class);
|
||||
if ($versionInformation->getMajorVersion() > 11) {
|
||||
unset($GLOBALS['TCA']['tt_address']['ctrl']['cruser_id']);
|
||||
$GLOBALS['TCA']['tt_address']['columns']['birthday']['config'] = [
|
||||
'type' => 'datetime',
|
||||
];
|
||||
$GLOBALS['TCA']['tt_address']['columns']['starttime']['config'] = [
|
||||
'type' => 'datetime',
|
||||
];
|
||||
$GLOBALS['TCA']['tt_address']['columns']['endtime']['config'] = [
|
||||
'type' => 'datetime',
|
||||
];
|
||||
$GLOBALS['TCA']['tt_address']['columns']['crdate']['config'] = [
|
||||
'type' => 'datetime',
|
||||
];
|
||||
$GLOBALS['TCA']['tt_address']['columns']['tstamp']['config'] = [
|
||||
'type' => 'datetime',
|
||||
];
|
||||
$GLOBALS['TCA']['tt_address']['columns']['email']['config'] = [
|
||||
'type' => 'email',
|
||||
];
|
||||
$GLOBALS['TCA']['tt_address']['columns']['www']['config'] = [
|
||||
'type' => 'link',
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true,
|
||||
],
|
||||
];
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
defined('TYPO3_MODE') or defined('TYPO3') or die;
|
||||
|
||||
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
|
||||
'tt_address',
|
||||
'ListView',
|
||||
'LLL:EXT:tt_address/Resources/Private/Language/db/locallang.xlf:extbase_title'
|
||||
);
|
||||
|
||||
$pluginSignature = 'ttaddress_listview';
|
||||
|
||||
$GLOBALS['TCA']['tt_content']['types']['list']['previewRenderer'][$pluginSignature] = \FriendsOfTYPO3\TtAddress\FormEngine\TtAddressPreviewRenderer::class;
|
||||
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist'][$pluginSignature] = 'select_key,pages,recursive';
|
||||
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist'][$pluginSignature] = 'pi_flexform';
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($pluginSignature, 'FILE:EXT:tt_address/Configuration/FlexForms/List.xml');
|
||||
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToInsertRecords('tt_address');
|
||||
Reference in New Issue
Block a user