TYPO3ContentElements/ext_localconf.php
Daniel Siepmann da3aed135c
Add content element "skills"
Allow editors to add new content element "skills".
The element contains an input for a comma separated list of skill IDs.
A preview in backend is shown.
Frontend rendering is provided.
2020-09-22 10:37:24 +02:00

26 lines
886 B
PHP

<?php
(function (string $extKey) {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
"@import 'EXT:" . $extKey . "/Configuration/PageTSconfig/*.tsconfig'"
);
$icons = [
'skill',
];
$iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
\TYPO3\CMS\Core\Imaging\IconRegistry::class
);
foreach ($icons as $icon) {
$iconRegistry->registerIcon(
'skilldisplay-' . $icon,
\TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class,
[
'source' => 'EXT:' . $extKey . '/Resources/Public/Icons/' . $icon . '.png',
]
);
}
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['tt_content_drawItem'][$extKey] =
\SkillDisplay\Typo3Extension\Backend\Preview::class;
})('skilldisplay');