Skip to content

Commit

Permalink
Fix #27 - page tree icon for TYPO3 9.x
Browse files Browse the repository at this point in the history
  • Loading branch information
lochmueller committed Apr 30, 2019
1 parent e264a09 commit a40e800
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
10 changes: 10 additions & 0 deletions Configuration/TCA/Overrides/pages.php
@@ -0,0 +1,10 @@
<?php


$GLOBALS['TCA']['pages']['columns']['module']['config']['items'][$_EXTKEY] = [
'LLL:EXT:faq/Resources/Private/Language/locallang.xlf:sysfolder',
$_EXTKEY,
'contains-faq'
];
$GLOBALS['TCA']['pages']['ctrl']['typeicon_classes']['contains-faq'] = 'apps-pagetree-folder-contains-faq';

8 changes: 5 additions & 3 deletions ext_tables.php
Expand Up @@ -7,9 +7,6 @@
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin($_EXTKEY, 'FaqTeaser', 'FAQ Teaser');
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin($_EXTKEY, 'FaqEnter', 'FAQ Eingabe');

$GLOBALS['TCA']['pages']['columns']['module']['config']['items'][$_EXTKEY]['0'] = 'LLL:EXT:faq/Resources/Private/Language/locallang.xlf:sysfolder';
$GLOBALS['TCA']['pages']['columns']['module']['config']['items'][$_EXTKEY]['1'] = $_EXTKEY;

// module icon
$extensionIcon = \HDNET\Autoloader\Utility\IconUtility::getByExtensionKey('faq', true);
/** @var \TYPO3\CMS\Core\Imaging\IconRegistry $iconRegistry */
Expand All @@ -19,6 +16,11 @@
\TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class,
['source' => $extensionIcon]
);
$iconRegistry->registerIcon(
'contains-faq',
\TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class,
['source' => $extensionIcon]
);

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('
mod {
Expand Down

0 comments on commit a40e800

Please sign in to comment.