forked from FriendsOfTYPO3/frontend_editing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ext_localconf.php
82 lines (70 loc) · 3.14 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
<?php
defined('TYPO3_MODE') or die();
/**
* Hooks
*/
// Register the edit panel view
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/classes/class.frontendedit.php']['edit'] =
\TYPO3\CMS\FrontendEditing\EditingPanel\FrontendEditingPanel::class;
// Hook to render toolbars
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['contentPostProc-output'][$_EXTKEY] =
'TYPO3\\CMS\\FrontendEditing\\Hook\\ContentPostProc->main';
/**
* Pre processors
*/
$GLOBALS['TYPO3_CONF_VARS']['Ckeditor']['Classes/Save/Save.php']['requestPreProcess'][$_EXTKEY . '-cleanup'] =
\TYPO3\CMS\FrontendEditing\Utility\RequestPreProcess\Cleanup::class;
// Save core content element "Bullets"
$GLOBALS['TYPO3_CONF_VARS']['Ckeditor']['Classes/Save/Save.php']['requestPreProcess'][$_EXTKEY . '-cobjbullets'] =
\TYPO3\CMS\FrontendEditing\Utility\RequestPreProcess\CeBullets::class;
// Save core content element "Table"
$GLOBALS['TYPO3_CONF_VARS']['Ckeditor']['Classes/Save/Save.php']['requestPreProcess'][$_EXTKEY . '-cobjtable'] =
\TYPO3\CMS\FrontendEditing\Utility\RequestPreProcess\CeTable::class;
// Save core content special element "Plaintext"
// Activated by setting field to to bodytext-plaintext, which in hook will be restored to bodytext
$GLOBALS['TYPO3_CONF_VARS']['Ckeditor']['Classes/Save/Save.php']['requestPreProcess'][$_EXTKEY . '-Plaintext'] =
\TYPO3\CMS\FrontendEditing\Utility\RequestPreProcess\Plaintext::class;
// Save fluidcontent , field is targeted by pi_flexform-flexformfieldname
$GLOBALS['TYPO3_CONF_VARS']['Ckeditor']['Classes/Save/Save.php']['requestPreProcess'][$_EXTKEY . '-CeFluidContent'] =
\TYPO3\CMS\FrontendEditing\Utility\RequestPreProcess\CeFluidContent::class;
// Save headers, field header, will also affect field header_layout
$GLOBALS['TYPO3_CONF_VARS']['Ckeditor']['Classes/Save/Save.php']['requestPreProcess'][$_EXTKEY . '-CeHeader'] =
\TYPO3\CMS\FrontendEditing\Utility\RequestPreProcess\CeHeader::class;
/**
* Typoscript settings
*/
// Add UserTsConfig settings
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addUserTSConfig('<INCLUDE_TYPOSCRIPT: source="' .
'FILE:EXT:frontend_editing/Configuration/TypoScript/UserTsConfig/userTsConfig.ts">');
// If rtehtmlarea is loaded and be user is logged in then reset the pageTSConfig
if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('rtehtmlarea')) {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
'<INCLUDE_TYPOSCRIPT: source="' .
'FILE:EXT:frontend_editing/Configuration/TypoScript/PageTsConfig/Proc/pageTsConfig.ts">'
);
}
/**
* Frontend plugins
*/
// Content crud actions
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'TYPO3\CMS.frontend_editing',
'frontend_editing',
[
'Crud' => 'update, delete, moveContent'
],
[
'Crud' => 'update, delete, moveContent'
]
);
// Page tree crud actions
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'TYPO3\CMS.frontend_editing',
'frontend_editing_page_tree',
[
'PageTreeCrud' => 'update, save, read, delete'
],
[
'PageTreeCrud' => 'update, save, read, delete'
]
);