diff --git a/Classes/Domain/Model/Entry.php b/Classes/Domain/Model/Entry.php index 98221fd..873bbfc 100644 --- a/Classes/Domain/Model/Entry.php +++ b/Classes/Domain/Model/Entry.php @@ -16,8 +16,8 @@ class Entry extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity * media * * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> - * @Cascade remove */ + #[Cascade(['value' => 'remove'])] // remove protected $media = null; @@ -47,7 +47,7 @@ public function getTypeof() * @param int $typeof * @return void */ - public function setTypeof($typeof) + public function setTypeof($typeof): void { $this->typeof = $typeof; } diff --git a/Classes/Domain/Repository/EntryRepository.php b/Classes/Domain/Repository/EntryRepository.php index 7d7c6d1..0c90a84 100644 --- a/Classes/Domain/Repository/EntryRepository.php +++ b/Classes/Domain/Repository/EntryRepository.php @@ -1,10 +1,5 @@ 'LLL:EXT:ce_timeline/Resources/Private/Language/locallang.xlf:ce_title', + 'value' => 'ce_timeline', + 'icon' => 'ce-timeline-icon' ], 'header', 'after' ); // New palette textfields - $GLOBALS['TCA']['tt_content']['palettes']['textfields'] = array( + $GLOBALS['TCA']['tt_content']['palettes']['textfields'] = [ 'showitem' => 'header, header_layout, header_position, --linebreak--, bodytext','canNotCollapse' => 1 - ); + ]; // New palette main - $GLOBALS['TCA']['tt_content']['palettes']['main'] = array( + $GLOBALS['TCA']['tt_content']['palettes']['main'] = [ 'showitem' => 'timeline_entries, --palette--;;textfields','canNotCollapse' => 1 - ); + ]; $GLOBALS['TCA']['tt_content']['ctrl']['typeicon_classes']['ce_timeline'] = 'ce-timeline-icon'; $GLOBALS['TCA']['tt_content']['types']['ce_timeline'] = [ diff --git a/Configuration/TCA/tx_cetimeline_domain_model_entry.php b/Configuration/TCA/tx_cetimeline_domain_model_entry.php index 1ca9f14..99a9a10 100644 --- a/Configuration/TCA/tx_cetimeline_domain_model_entry.php +++ b/Configuration/TCA/tx_cetimeline_domain_model_entry.php @@ -8,7 +8,6 @@ 'sortby' => 'sorting', 'tstamp' => 'tstamp', 'crdate' => 'crdate', - 'cruser_id' => 'cruser_id', 'languageField' => 'sys_language_uid', 'transOrigPointerField' => 'l10n_parent', 'transOrigDiffSourceField' => 'l10n_diffsource', @@ -21,26 +20,55 @@ 'starttime' => 'starttime', 'endtime' => 'endtime' ], + 'hideTable' => true, 'iconfile' => 'EXT:ce_timeline/Resources/Public/Icons/content-timeline-record.svg', ], - 'interface' => [ - 'showRecordFieldList' => 'sys_language_uid, l10n_parent, header, header_layout, description, description_html, position, typeof, media, starttime, endtime', - ], 'types' => [ - '1' => ['showitem' => 'l10n_parent, l10n_diffsource, --palette--;;settings, --palette--;;titles, description, description_html, --div--;Galerie, --palette--;;dimensions,--palette--;;lightbox, --div--;Access, starttime, endtime'], + '1' => [ + 'showitem' => ' + l10n_parent, l10n_diffsource, + --palette--;;settings, + --palette--;;titles, + description, description_html, + + --div--;Galerie, + --palette--;;dimensions, + --palette--;;lightbox, + + --div--;Access, + starttime, endtime' + ], ], 'palettes' =>[ 'settings' =>[ - 'showitem' => 'position,typeof, hidden', + 'showitem' => ' + position, + typeof, + hidden', ], 'titles' =>[ - 'showitem' => 'header,header_layout', + 'showitem' => ' + header, + header_layout', ], 'dimensions' =>[ - 'showitem' => 'media, --linebreak--,textimage_layout,image_width, image_height,images_per_row, gallery_width', + 'showitem' => ' + media, + --linebreak--, + + textimage_layout, + image_width, + image_height, + --linebreak--, + + images_per_row, + gallery_width', ], 'lightbox' =>[ - 'showitem' => 'enable_lightbox,lightbox_width,lightbox_height', + 'showitem' => ' + enable_lightbox, + lightbox_width, + lightbox_height', ], ], 'columns' => [ @@ -48,29 +76,18 @@ 'exclude' => true, 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.language', 'config' => [ - 'type' => 'select', - 'renderType' => 'selectSingle', - 'special' => 'languages', - 'items' => [ - [ - 'LLL:EXT:lang/locallang_general.xlf:LGL.allLanguages', - -1, - 'flags-multiple' - ] - ], - 'default' => 0, + 'type' => 'language', ], ], 'l10n_parent' => [ 'displayCond' => 'FIELD:sys_language_uid:>:0', - 'exclude' => true, 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.l18n_parent', 'config' => [ 'type' => 'select', 'renderType' => 'selectSingle', 'default' => 0, 'items' => [ - ['', 0], + ['label' => '', 'value' => 0], ], 'foreign_table' => 'tx_cetimeline_domain_model_entry', 'foreign_table_where' => 'AND tx_cetimeline_domain_model_entry.pid=###CURRENT_PID### AND tx_cetimeline_domain_model_entry.sys_language_uid IN (-1,0)', @@ -88,7 +105,7 @@ 'type' => 'check', 'items' => [ '1' => [ - '0' => 'LLL:EXT:lang/locallang_core.xlf:labels.enabled' + 'label' => 'LLL:EXT:lang/locallang_core.xlf:labels.enabled' ] ], ], @@ -98,10 +115,8 @@ 'l10n_mode' => 'mergeIfNotBlank', 'label' => 'LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.starttime', 'config' => [ - 'type' => 'input', - 'renderType' => 'inputDateTime', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'datetime', 'default' => 0, ] ], @@ -110,10 +125,8 @@ 'l10n_mode' => 'mergeIfNotBlank', 'label' => 'LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.endtime', 'config' => [ - 'type' => 'input', - 'renderType' => 'inputDateTime', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'datetime', 'default' => 0, 'range' => [ 'upper' => mktime(0, 0, 0, 1, 1, 2038) @@ -143,7 +156,7 @@ 'type' => 'check', 'items' => [ '1' => [ - '0' => 'LLL:EXT:lang/locallang_core.xlf:labels.enabled' + 'label' => 'LLL:EXT:lang/locallang_core.xlf:labels.enabled' ] ], ], @@ -162,14 +175,14 @@ 'type' => 'select', 'renderType' => 'selectSingle', 'items' => [ - ['1', 1], - ['2', 2], - ['3', 3], - ['4', 4], - ['5', 5], - ['6', 6], - ['7', 7], - ['8', 8] + ['label' => '1', 'value' => 1], + ['label' => '2', 'value' => 2], + ['label' => '3', 'value' => 3], + ['label' => '4', 'value' => 4], + ['label' => '5', 'value' => 5], + ['label' => '6', 'value' => 6], + ['label' => '7', 'value' => 7], + ['label' => '8', 'value' => 8] ], 'default' => '1' ], @@ -188,8 +201,8 @@ 'type' => 'select', 'renderType' => 'selectSingle', 'items' => [ - ['33%', 33], - ['50%', 50] + ['label' => '33%', 'value' => 33], + ['label' => '50%', 'value' => 50] ], 'default' => '50' ], @@ -266,10 +279,10 @@ 'renderType' => 'selectSingle', 'default' => 0, 'items' => [ - ['LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.typeof.textblock', 0], - ['LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.typeof.timeentry', 1], - ['LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.typeof.textimage', 2], - ['LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.typeof.html', 3], + ['label' => 'LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.typeof.textblock', 'value' => 0], + ['label' => 'LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.typeof.timeentry', 'value' => 1], + ['label' => 'LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.typeof.textimage', 'value' => 2], + ['label' => 'LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.typeof.html', 'value' => 3], ], ] ], @@ -289,13 +302,13 @@ 'renderType' => 'selectSingle', 'default' => 0, 'items' => [ - ['LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.header_layout.default', 0], - ['LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.header_layout.h1', 1], - ['LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.header_layout.h2', 2], - ['LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.header_layout.h3', 3], - ['LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.header_layout.h4', 4], - ['LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.header_layout.h5', 5], - ['LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.header_layout.h6', 6] + ['label' => 'LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.header_layout.default', 'value' => 0], + ['label' => 'LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.header_layout.h1', 'value' => 1], + ['label' => 'LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.header_layout.h2', 'value' => 2], + ['label' => 'LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.header_layout.h3', 'value' => 3], + ['label' => 'LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.header_layout.h4', 'value' => 4], + ['label' => 'LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.header_layout.h5', 'value' => 5], + ['label' => 'LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.header_layout.h6', 'value' => 6] ], ] ], @@ -314,10 +327,10 @@ 'renderType' => 'selectSingle', 'default' => 0, 'items' => [ - ['LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.textimage_layout.top', 0], - ['LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.textimage_layout.bottom', 1], - ['LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.textimage_layout.left', 2], - ['LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.textimage_layout.right', 3] + ['label' => 'LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.textimage_layout.top', 'value' => 0], + ['label' => 'LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.textimage_layout.bottom', 'value' => 1], + ['label' => 'LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.textimage_layout.left', 'value' => 2], + ['label' => 'LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.textimage_layout.right', 'value' => 3] ], ] ], @@ -375,8 +388,8 @@ 'renderType' => 'selectSingle', 'default' => 0, 'items' => [ - ['LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.position.left', 0], - ['LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.position.right', 1], + ['label' => 'LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.position.left', 'value' => 0], + ['label' => 'LLL:EXT:ce_timeline/Resources/Private/Language/locallang_db.xlf:tx_cetimeline_domain_model_entry.position.right', 'value' => 1], ], ] ], diff --git a/composer.json b/composer.json index 628a041..ea12303 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,6 @@ { "name": "fullstackfreelancer/ce-timeline", "type": "typo3-cms-extension", - "version": "4.0.2", "description": "Enables a new content element of type Timeline", "homepage": "https://simonkoehler.com", "authors": [ @@ -25,7 +24,7 @@ }, "license": "GPL-3.0-or-later", "require": { - "typo3/cms-core": "^11.8 || ^12.0" + "typo3/cms-core": "^12.0" }, "keywords": [ "TYPO3", @@ -40,6 +39,9 @@ "chronologisch", "chronologic" ], + "replace": { + "simonkoehler/ce-timeline": "self.version" + }, "extra": { "typo3/cms": { "extension-key": "ce_timeline" diff --git a/ext_emconf.php b/ext_emconf.php deleted file mode 100644 index 0350892..0000000 --- a/ext_emconf.php +++ /dev/null @@ -1,25 +0,0 @@ - 'Timeline Content Element', - 'description' => 'Add a new content element of type "Timeline" for displaying histories of companies and more...', - 'category' => 'fe', - 'author' => 'Simon Köhler', - 'author_email' => 'info@simonkoehler.com', - 'author_company' => 'simonkoehler.com', - 'state' => 'stable', - 'uploadfolder' => '0', - 'clearCacheOnLoad' => 0, - 'version' => '4.0.2', - 'constraints' => - array ( - 'depends' => array ( - 'typo3' => '11.8.99-12.4.99' - ), - 'conflicts' => array ( - - ), - 'suggests' => array ( - - ), - ) -); diff --git a/ext_tables.php b/ext_tables.php deleted file mode 100644 index 361c05d..0000000 --- a/ext_tables.php +++ /dev/null @@ -1,11 +0,0 @@ -withPaths( + [ + getcwd() + ] + ) + // uncomment to reach your current PHP version + ->withPhpSets(php80: true) + ->withPhpVersion(PhpVersion::PHP_83) + ->withSets([ + Typo3SetList::CODE_QUALITY, + Typo3SetList::GENERAL, + Typo3LevelSetList::UP_TO_TYPO3_12, + ]) + # To have a better analysis from PHPStan, we teach it here some more things + ->withPHPStanConfigs([ + Typo3Option::PHPSTAN_FOR_RECTOR_PATH + ]) + ->withRules([ + AddVoidReturnTypeWhereNoReturnRector::class, + ConvertImplicitVariablesToExplicitGlobalsRector::class, + ]) + ->withConfiguredRule(ExtEmConfRector::class, [ + ExtEmConfRector::PHP_VERSION_CONSTRAINT => '8.3.0-8.4.99', + ExtEmConfRector::TYPO3_VERSION_CONSTRAINT => '12.4.0-12.4.99', + ExtEmConfRector::ADDITIONAL_VALUES_TO_BE_REMOVED => [] + ]) + ->withImportNames(importNames: false, importDocBlockNames: false, importShortClasses: false, removeUnusedImports: true) + # If you use withImportNames(), you should consider excluding some TYPO3 files. + ->withSkip([ + // @see https://github.com/sabbelasichon/typo3-rector/issues/2536 + __DIR__ . '/**/Configuration/ExtensionBuilder/*', + NameImportingPostRector::class => [ + 'ClassAliasMap.php', + ], + \Rector\Php74\Rector\Closure\ClosureToArrowFunctionRector::class, + ]) +;