events/ext_localconf.php
Daniel Siepmann 81065f5c67
BREAKING: TYPO3 v12 support (#44)
* Migrated all fixtures to PHP.
* Removed version specific adjustments.
2023-11-27 10:04:42 +01:00

62 lines
1.9 KiB
PHP

<?php
declare(strict_types=1);
use TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider;
use TYPO3\CMS\Core\Imaging\IconRegistry;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Utility\ExtensionUtility;
use WerkraumMedia\Events\Controller\DateController;
use WerkraumMedia\Events\Controller\EventController;
defined('TYPO3') || die('Access denied.');
call_user_func(function () {
ExtensionUtility::configurePlugin(
'Events',
'DateSearch',
[DateController::class => 'search'],
[DateController::class => 'search']
);
ExtensionUtility::configurePlugin(
'Events',
'DateList',
[DateController::class => 'list'],
[DateController::class => 'list']
);
ExtensionUtility::configurePlugin(
'Events',
'DateShow',
[DateController::class => 'show'],
[DateController::class => 'show']
);
ExtensionUtility::configurePlugin(
'Events',
'Selected',
[EventController::class => 'list']
);
if (
isset($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['events_category']) === false
|| is_array($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['events_category']) === false
) {
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['events_category'] = [];
}
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = '^events_search';
$iconRegistry = GeneralUtility::makeInstance(IconRegistry::class);
$iconRegistry->registerIcon(
'events-plugin',
SvgIconProvider::class,
['source' => 'EXT:events/Resources/Public/Icons/Extension.svg']
);
$iconRegistry->registerIcon(
'pages-module-events',
SvgIconProvider::class,
['source' => 'EXT:events/Resources/Public/Icons/Folder.svg']
);
});