forked from PHORAX/formhandler
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathext_localconf.php
36 lines (29 loc) · 1.53 KB
/
ext_localconf.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
declare(strict_types=1);
use TYPO3\CMS\Core\Cache\Backend\SimpleFileBackend;
use TYPO3\CMS\Extbase\Utility\ExtensionUtility;
use Typoheads\Formhandler\Controller\FormController;
use Typoheads\Formhandler\Definitions\FormhandlerExtensionConfig;
defined('TYPO3') or exit;
call_user_func(static function (): void {
ExtensionUtility::configurePlugin(
FormhandlerExtensionConfig::EXTENSION_KEY,
FormhandlerExtensionConfig::EXTENSION_PLUGIN_NAME,
[
FormController::class => 'form',
],
[
FormController::class => 'form',
],
ExtensionUtility::PLUGIN_TYPE_CONTENT_ELEMENT
);
// Cache registration
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['formhandler_cache'] ??= [];
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['formhandler_cache']['backend'] ??= SimpleFileBackend::class;
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = FormhandlerExtensionConfig::EXTENSION_KEY.'[randomId]';
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = FormhandlerExtensionConfig::EXTENSION_KEY.'[removeFile]';
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = FormhandlerExtensionConfig::EXTENSION_KEY.'[removeFileField]';
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = FormhandlerExtensionConfig::EXTENSION_KEY.'[step]';
// Register "formhandler:" namespace
$GLOBALS['TYPO3_CONF_VARS']['SYS']['fluid']['namespaces']['formhandler'][] = 'Typoheads\\Formhandler\\ViewHelpers';
});