-
Notifications
You must be signed in to change notification settings - Fork 39
/
ext_localconf.php
126 lines (114 loc) · 5.79 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<?php
defined('TYPO3') or die();
// TODO: cleanup and only if FEediting enabled?
$boot = static function (): void {
// Extend the <core:contentEditable> viewhelper by the one from EXT:frontend_editing
$GLOBALS['TYPO3_CONF_VARS']['SYS']['fluid']['namespaces']['core'][] = 'TYPO3\\CMS\\FrontendEditing\\ViewHelpers';
// Exclude Frontend Editing parameters to prevent errors when $GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['enforceValidation'] = true
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'fe_edit';
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'show_hidden_items';
// Copy configuration array so we can have our own.
$GLOBALS['TYPO3_CONF_VARS']['SYS']['formEngine']['formDataGroup']['frontendTcaDatabaseRecord'] =
$GLOBALS['TYPO3_CONF_VARS']['SYS']['formEngine']['formDataGroup']['tcaDatabaseRecord'];
// Add processor for frontend-related RTE configuration
$GLOBALS['TYPO3_CONF_VARS']['SYS']['formEngine']['formDataGroup']['frontendTcaDatabaseRecord'][
\TYPO3\CMS\FrontendEditing\Backend\Form\FormDataProvider\TcaFrontendRichtextConfiguration::class
] = [
'before' => [
\TYPO3\CMS\Backend\Form\FormDataProvider\TcaText::class
]
];
// Add RTE presets for frontend use
$GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['bronly'] = 'EXT:frontend_editing/Configuration/RTE/BrOnly.yaml';
$GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['listonly'] = 'EXT:frontend_editing/Configuration/RTE/ListOnly.yaml';
/**
* Hooks
*/
// Register the edit panel view
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/classes/class.frontendedit.php']['edit'] =
\TYPO3\CMS\FrontendEditing\EditingPanel\FrontendEditingPanel::class;
// Modify every link to save unparsed links but allow editors to still browse the website
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['typoLink_PostProc']['frontend_editing'] =
\TYPO3\CMS\FrontendEditing\Hook\TypoLinkPostProcHook::class . '->modifyFinalLinkTag';
/**
* Custom icons
*/
$iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class);
$iconRegistry->registerIcon(
'ext-news-wizard-icon',
\TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class,
['source' => 'EXT:news/Resources/Public/Icons/plugin_wizard.svg']
);
$iconRegistry->registerIcon(
'grid-elements-2ColumnGrid',
\TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class,
['source' => 'EXT:theme_t3kit/Resources/Public/Icons/GridElements/2-column-grid.svg']
);
$iconRegistry->registerIcon(
'grid-elements-3ColumnGrid',
\TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class,
['source' => 'EXT:theme_t3kit/Resources/Public/Icons/GridElements/3-column-grid.svg']
);
$iconRegistry->registerIcon(
'grid-elements-4ColumnGrid',
\TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class,
['source' => 'EXT:theme_t3kit/Resources/Public/Icons/GridElements/4-column-grid.svg']
);
$iconRegistry->registerIcon(
'grid-elements-adv1ColumnGrid',
\TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class,
['source' => 'EXT:theme_t3kit/Resources/Public/Icons/GridElements/adv1-column-grid.svg']
);
$iconRegistry->registerIcon(
'grid-elements-adv2ColumnGrid',
\TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class,
['source' => 'EXT:theme_t3kit/Resources/Public/Icons/GridElements/adv2-column-grid.svg']
);
$iconRegistry->registerIcon(
'grid-elements-adv3ColumnGrid',
\TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class,
['source' => 'EXT:theme_t3kit/Resources/Public/Icons/GridElements/adv3-column-grid.svg']
);
$iconRegistry->registerIcon(
'grid-elements-adv4ColumnGrid',
\TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class,
['source' => 'EXT:theme_t3kit/Resources/Public/Icons/GridElements/adv4-column-grid.svg']
);
$iconRegistry->registerIcon(
'grid-elements-collapsibleGroup',
\TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class,
['source' => 'EXT:theme_t3kit/Resources/Public/Icons/GridElements/collapsibleGroup.svg']
);
$iconRegistry->registerIcon(
'grid-elements-collapsible',
\TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class,
['source' => 'EXT:theme_t3kit/Resources/Public/Icons/GridElements/collapsible.svg']
);
$iconRegistry->registerIcon(
'grid-elements-parallax',
\TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class,
['source' => 'EXT:theme_t3kit/Resources/Public/Icons/GridElements/parallax.svg']
);
$iconRegistry->registerIcon(
'grid-elements-simpleAccordion',
\TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class,
['source' => 'EXT:theme_t3kit/Resources/Public/Icons/GridElements/simpleAccordion.svg']
);
$iconRegistry->registerIcon(
'grid-elements-sliderContainer',
\TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class,
['source' => 'EXT:theme_t3kit/Resources/Public/Icons/GridElements/sliderContainer.svg']
);
$iconRegistry->registerIcon(
'grid-elements-tabGroup',
\TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class,
['source' => 'EXT:theme_t3kit/Resources/Public/Icons/GridElements/tabGroup.svg']
);
$iconRegistry->registerIcon(
'grid-elements-tab',
\TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class,
['source' => 'EXT:theme_t3kit/Resources/Public/Icons/GridElements/tab.svg']
);
};
$boot();
unset($boot);