Skip to content

Commit

Permalink
[TASK] Use new registration API for TSconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
fnagel committed Sep 23, 2024
1 parent 8a9bcdc commit 307aea5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
File renamed without changes.
10 changes: 3 additions & 7 deletions ext_localconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
use FelixNagel\GenericGallery\Controller\GalleryCollectionController;
use FelixNagel\GenericGallery\Controller\GalleryItemController;
use FelixNagel\GenericGallery\Routing\Aspect\ImageItemMapper;
use FelixNagel\GenericGallery\UpgradeWizard;
use TYPO3\CMS\Core\Resource\Collection\StaticFileCollection;

defined('TYPO3') || die();
Expand All @@ -15,27 +14,24 @@
$configuration = EmConfiguration::getSettings();

// Add page TS config
ExtensionManagementUtility::addPageTSConfig(
'<INCLUDE_TYPOSCRIPT: source="FILE:EXT:generic_gallery/Configuration/TSconfig/page.tsconfig">'
);
if (!$configuration->isEnableTypeItems()) {
ExtensionManagementUtility::addPageTSConfig(
'TCEFORM.tt_content.tx_generic_gallery_items.disabled = 1'
);
}

if (!$configuration->isEnableTypeImages()) {
ExtensionManagementUtility::addPageTSConfig(
'TCEFORM.tt_content.tx_generic_gallery_images.disabled = 1'
);
}

if (!$configuration->isEnableTypeCollection()) {
ExtensionManagementUtility::addPageTSConfig(
'TCEFORM.tt_content.tx_generic_gallery_collection.disabled = 1'
);
}

if ($configuration->isHideRelations()) {
ExtensionManagementUtility::addPageTSConfig(trim('
mod.web_list.table.tx_generic_gallery_pictures.hideTable = 1
Expand Down

0 comments on commit 307aea5

Please sign in to comment.