Skip to content

Commit

Permalink
[TASK] Use Configuration/user.tsconfig in v13
Browse files Browse the repository at this point in the history
ExtensionManagementUtility::addUserTSConfig() stays
for v12.
  • Loading branch information
bnf committed Oct 17, 2024
1 parent 72506e5 commit 8f3c9ba
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
3 changes: 3 additions & 0 deletions Configuration/user.tsconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Allow backend users to drag and drop the new page type:
# 137 = T3G\AgencyPack\Blog\Constants::DOKTYPE_BLOG_POST
options.pageTree.doktypesToShowInNewPageDragArea := addToList(137)
11 changes: 7 additions & 4 deletions ext_tables.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use T3G\AgencyPack\Blog\Constants;
use TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider;
use TYPO3\CMS\Core\Imaging\IconRegistry;
use TYPO3\CMS\Core\Information\Typo3Version;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility;

Expand Down Expand Up @@ -63,7 +64,9 @@
$iconRegistry->registerIcon($identifier, SvgIconProvider::class, ['source' => $path]);
}

// Allow backend users to drag and drop the new page type:
ExtensionManagementUtility::addUserTSConfig('
options.pageTree.doktypesToShowInNewPageDragArea := addToList(' . Constants::DOKTYPE_BLOG_POST . ')
');
// Replaced with Configuration/user.tsconfig in v13
if ((new Typo3Version())->getMajorVersion() < 13) {
ExtensionManagementUtility::addUserTSConfig('
options.pageTree.doktypesToShowInNewPageDragArea := addToList(' . Constants::DOKTYPE_BLOG_POST . ')
');
}

0 comments on commit 8f3c9ba

Please sign in to comment.