2019-07-18 13:44:19 +02:00
|
|
|
<?php
|
2021-01-07 08:50:43 +01:00
|
|
|
|
2023-11-27 10:04:42 +01:00
|
|
|
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;
|
|
|
|
|
2021-01-07 08:47:15 +01:00
|
|
|
defined('TYPO3') || die('Access denied.');
|
2019-07-18 13:44:19 +02:00
|
|
|
|
2021-06-14 16:08:43 +02:00
|
|
|
call_user_func(function () {
|
2023-11-27 10:04:42 +01:00
|
|
|
ExtensionUtility::configurePlugin(
|
2021-06-14 16:08:43 +02:00
|
|
|
'Events',
|
|
|
|
'DateSearch',
|
2023-11-27 10:04:42 +01:00
|
|
|
[DateController::class => 'search'],
|
|
|
|
[DateController::class => 'search']
|
2021-06-14 16:08:43 +02:00
|
|
|
);
|
|
|
|
|
2023-11-27 10:04:42 +01:00
|
|
|
ExtensionUtility::configurePlugin(
|
2021-06-14 16:08:43 +02:00
|
|
|
'Events',
|
|
|
|
'DateList',
|
2023-11-27 10:04:42 +01:00
|
|
|
[DateController::class => 'list'],
|
|
|
|
[DateController::class => 'list']
|
2021-06-14 16:08:43 +02:00
|
|
|
);
|
|
|
|
|
2023-11-27 10:04:42 +01:00
|
|
|
ExtensionUtility::configurePlugin(
|
2021-06-14 16:08:43 +02:00
|
|
|
'Events',
|
|
|
|
'DateShow',
|
2023-11-27 10:04:42 +01:00
|
|
|
[DateController::class => 'show'],
|
|
|
|
[DateController::class => 'show']
|
2021-06-14 16:08:43 +02:00
|
|
|
);
|
|
|
|
|
2023-11-27 10:04:42 +01:00
|
|
|
ExtensionUtility::configurePlugin(
|
2021-06-14 16:08:43 +02:00
|
|
|
'Events',
|
|
|
|
'Selected',
|
2023-11-27 10:04:42 +01:00
|
|
|
[EventController::class => 'list']
|
2021-06-14 16:08:43 +02:00
|
|
|
);
|
|
|
|
|
2021-12-20 10:20:47 +01:00
|
|
|
if (
|
|
|
|
isset($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['events_category']) === false
|
|
|
|
|| is_array($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['events_category']) === false
|
|
|
|
) {
|
2021-06-14 16:08:43 +02:00
|
|
|
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['events_category'] = [];
|
2019-07-18 13:44:19 +02:00
|
|
|
}
|
2021-02-11 13:18:06 +01:00
|
|
|
|
2022-11-22 12:58:36 +01:00
|
|
|
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = '^events_search';
|
|
|
|
|
2023-11-27 10:04:42 +01:00
|
|
|
$iconRegistry = GeneralUtility::makeInstance(IconRegistry::class);
|
2021-06-14 16:08:43 +02:00
|
|
|
$iconRegistry->registerIcon(
|
|
|
|
'events-plugin',
|
2023-11-27 10:04:42 +01:00
|
|
|
SvgIconProvider::class,
|
2021-06-14 16:08:43 +02:00
|
|
|
['source' => 'EXT:events/Resources/Public/Icons/Extension.svg']
|
|
|
|
);
|
2023-01-05 10:21:25 +01:00
|
|
|
$iconRegistry->registerIcon(
|
|
|
|
'pages-module-events',
|
2023-11-27 10:04:42 +01:00
|
|
|
SvgIconProvider::class,
|
2023-01-05 10:21:25 +01:00
|
|
|
['source' => 'EXT:events/Resources/Public/Icons/Folder.svg']
|
|
|
|
);
|
2021-06-14 16:08:43 +02:00
|
|
|
});
|