mirror of https://github.com/FriendsOfTYPO3/tea.git synced 2024-11-24 15:16:13 +01:00

[TASK] Import classes (#1299)

This commit is contained in:
Oliver Klee 2024-05-07 19:15:51 +02:00 committed by GitHub
parent cf899825d4
commit bbe8b96aff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 17 additions and 8 deletions

View file

@ -2,8 +2,10 @@
declare(strict_types=1); declare(strict_types=1);
use TTN\Tea\Domain\Model\Tea;
return [ return [
\TTN\Tea\Domain\Model\Tea::class => [ Tea::class => [
'properties' => [ 'properties' => [
'ownerUid' => ['fieldName' => 'owner'], 'ownerUid' => ['fieldName' => 'owner'],
], ],

View file

@ -1,9 +1,11 @@
<?php <?php
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
defined('TYPO3') || die('Access denied.'); defined('TYPO3') || die('Access denied.');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile('tea', 'Configuration/TypoScript', 'Tea'); ExtensionManagementUtility::addStaticFile('tea', 'Configuration/TypoScript', 'Tea');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile( ExtensionManagementUtility::addStaticFile(
'tea', 'tea',
'Configuration/TypoScript/Frontend/', 'Configuration/TypoScript/Frontend/',
'Tea frontend (optional)' 'Tea frontend (optional)'

View file

@ -1,11 +1,13 @@
<?php <?php
use TYPO3\CMS\Extbase\Utility\ExtensionUtility;
defined('TYPO3') || die(); defined('TYPO3') || die();
call_user_func( call_user_func(
static function (): void { static function (): void {
// This makes the plugin selectable in the BE. // This makes the plugin selectable in the BE.
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( ExtensionUtility::registerPlugin(
// extension name, matching the PHP namespaces (but without the vendor) // extension name, matching the PHP namespaces (but without the vendor)
'Tea', 'Tea',
// arbitrary, but unique plugin name (not visible in the BE) // arbitrary, but unique plugin name (not visible in the BE)
@ -16,14 +18,14 @@ call_user_func(
'EXT:tea/Resources/Public/Icons/Extension.svg' 'EXT:tea/Resources/Public/Icons/Extension.svg'
); );
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( ExtensionUtility::registerPlugin(
'Tea', 'Tea',
'TeaShow', 'TeaShow',
'LLL:EXT:tea/Resources/Private/Language/locallang.xlf:plugin.tea_show', 'LLL:EXT:tea/Resources/Private/Language/locallang.xlf:plugin.tea_show',
'EXT:tea/Resources/Public/Icons/Extension.svg' 'EXT:tea/Resources/Public/Icons/Extension.svg'
); );
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( ExtensionUtility::registerPlugin(
'Tea', 'Tea',
'TeaFrontEndEditor', 'TeaFrontEndEditor',
'LLL:EXT:tea/Resources/Private/Language/locallang.xlf:plugin.tea_frontend_editor', 'LLL:EXT:tea/Resources/Private/Language/locallang.xlf:plugin.tea_frontend_editor',

View file

@ -1,5 +1,8 @@
<?php <?php
use TYPO3\CMS\Core\Information\Typo3Version;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
$tca = [ $tca = [
'ctrl' => [ 'ctrl' => [
'title' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_tea', 'title' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_tea',
@ -206,7 +209,7 @@ $tca = [
], ],
]; ];
$typo3Version = new \TYPO3\CMS\Core\Information\Typo3Version(); $typo3Version = new Typo3Version();
if ($typo3Version->getMajorVersion() < 12) { if ($typo3Version->getMajorVersion() < 12) {
$tca = array_replace_recursive( $tca = array_replace_recursive(
$tca, $tca,
@ -233,7 +236,7 @@ if ($typo3Version->getMajorVersion() < 12) {
]; ];
$tca['columns']['image'] = [ $tca['columns']['image'] = [
'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_tea.image', 'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_tea.image',
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig( 'config' => ExtensionManagementUtility::getFileFieldTCAConfig(
'image', 'image',
[ [
'maxitems' => 1, 'maxitems' => 1,