Skip to content

Commit

Permalink
[TASK] Minor code cleanups and fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
hojalatheef committed Oct 31, 2024
1 parent 53d99ab commit 33c386b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
11 changes: 7 additions & 4 deletions Configuration/TCA/Overrides/tt_content.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,29 @@
die('Access denied.');
}

\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
use TYPO3\CMS\Extbase\Utility\ExtensionUtility;

ExtensionUtility::registerPlugin(
'Weather2',
'Currentweather',
'LLL:EXT:weather2/Resources/Private/Language/locallang_db.xlf:plugin.currentweather.title',
);

\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
ExtensionUtility::registerPlugin(
'Weather2',
'Weatheralert',
'LLL:EXT:weather2/Resources/Private/Language/locallang_db.xlf:plugin.weatheralert.title',
);

$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['weather2_currentweather'] = 'pi_flexform';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
ExtensionManagementUtility::addPiFlexFormValue(
'weather2_currentweather',
'FILE:EXT:weather2/Configuration/FlexForms/flexform_currentweather.xml',
);

$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['weather2_weatheralert'] = 'pi_flexform';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
ExtensionManagementUtility::addPiFlexFormValue(
'weather2_weatheralert',
'FILE:EXT:weather2/Configuration/FlexForms/flexform_weatheralert.xml',
);
4 changes: 2 additions & 2 deletions Configuration/TSconfig/ContentElementWizard.tsconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ mod.wizards.newContentElement.wizardItems.plugins {
weather2_current {
iconIdentifier = ext-weather2-table-currentweather
title = LLL:EXT:weather2/Resources/Private/Language/locallang_db.xlf:plugin.currentweather.title
description = LLL:EXT:weather2/Resources/Private/Language/locallang_db.xlf:plugin.currentweather.title
description = LLL:EXT:weather2/Resources/Private/Language/locallang_db.xlf:plugin.currentweather.descriptiom
tt_content_defValues {
CType = list
list_type = weather2_currentweather
Expand All @@ -12,7 +12,7 @@ mod.wizards.newContentElement.wizardItems.plugins {
weather2_alert {
iconIdentifier = ext-weather2-table-weatheralert
title = LLL:EXT:weather2/Resources/Private/Language/locallang_db.xlf:plugin.weatheralert.title
description = LLL:EXT:weather2/Resources/Private/Language/locallang_db.xlf:plugin.weatheralert.title
description = LLL:EXT:weather2/Resources/Private/Language/locallang_db.xlf:plugin.weatheralert.descriptiom
tt_content_defValues {
CType = list
list_type = weather2_weatheralert
Expand Down

0 comments on commit 33c386b

Please sign in to comment.