forked from sypets/brofix
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathext_localconf.php
More file actions
146 lines (125 loc) · 6.29 KB
/
Copy pathext_localconf.php
File metadata and controls
146 lines (125 loc) · 6.29 KB
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<?php
use Sypets\Brofix\FormEngine\CustomEvaluation\ExcludeLinkTargetsLinkTargetEvaluation;
defined('TYPO3') or die();
(function () {
// ------------------
// load page TSconfig
// ------------------
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
"@import 'EXT:brofix/Configuration/TsConfig/Page/pagetsconfig.tsconfig'"
);
// -----
// Fluid
// -----
if (!isset($GLOBALS['TYPO3_CONF_VARS']['MAIL']['templateRootPaths'][901])) {
$GLOBALS['TYPO3_CONF_VARS']['MAIL']['templateRootPaths'][901] = 'EXT:brofix/Resources/Private/Templates/Email';
}
if (!isset($GLOBALS['TYPO3_CONF_VARS']['MAIL']['partialRootPaths'][901])) {
$GLOBALS['TYPO3_CONF_VARS']['MAIL']['partialRootPaths'][901] = 'EXT:brofix/Resources/Private/Partials';
}
// --------------------
// Configure link types
// --------------------
if (!is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['brofix']['checkLinks'] ?? false)) {
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['brofix']['checkLinks'] = [];
}
// link types can be replaced with custom linktypes, custom link types added
// should correspond with Page TSconfig mod.brofix.linktypes
if (!isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['brofix']['checkLinks']['db'])) {
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['brofix']['checkLinks']['db'] = \Sypets\Brofix\Linktype\InternalLinktype::class;
}
if (!isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['brofix']['checkLinks']['file'])) {
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['brofix']['checkLinks']['file'] = \Sypets\Brofix\Linktype\FileLinktype::class;
}
if (!isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['brofix']['checkLinks']['external'])) {
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['brofix']['checkLinks']['external'] = \Sypets\Brofix\Linktype\ExternalLinktype::class;
}
// -------------------------------
// FormEngine: custom formDataGrup
// -------------------------------
// used for checking if fields are editable
// for link checking, do not perform user permission checks, only check if field is editable
// permission checks are done when reading records from tx_brofix_broken_links for report
$GLOBALS['TYPO3_CONF_VARS']['SYS']['formEngine']['formDataGroup']['brofixFieldShouldBeChecked'] = [
\TYPO3\CMS\Backend\Form\FormDataProvider\InitializeProcessedTca::class => [],
\TYPO3\CMS\Backend\Form\FormDataProvider\DatabaseEditRow::class => [
'depends' => [
\TYPO3\CMS\Backend\Form\FormDataProvider\InitializeProcessedTca::class,
]
],
\TYPO3\CMS\Backend\Form\FormDataProvider\DatabaseRowInitializeNew::class => [
'depends' => [
\TYPO3\CMS\Backend\Form\FormDataProvider\PageTsConfig::class,
\TYPO3\CMS\Backend\Form\FormDataProvider\InitializeProcessedTca::class,
],
],
\TYPO3\CMS\Backend\Form\FormDataProvider\DatabasePageLanguageOverlayRows::class => [
'depends' => [
],
],
\TYPO3\CMS\Backend\Form\FormDataProvider\DatabaseLanguageRows::class => [
'depends' => [
\TYPO3\CMS\Backend\Form\FormDataProvider\DatabaseRowInitializeNew::class,
],
],
\TYPO3\CMS\Backend\Form\FormDataProvider\DatabaseRecordTypeValue::class => [
'depends' => [
\TYPO3\CMS\Backend\Form\FormDataProvider\DatabaseLanguageRows::class,
],
],
\TYPO3\CMS\Backend\Form\FormDataProvider\TcaColumnsOverrides::class => [
'depends' => [
\TYPO3\CMS\Backend\Form\FormDataProvider\DatabaseRecordTypeValue::class,
],
],
\TYPO3\CMS\Backend\Form\FormDataProvider\TcaInlineExpandCollapseState::class => [
'depends' => [
\TYPO3\CMS\Backend\Form\FormDataProvider\DatabaseEditRow::class,
\TYPO3\CMS\Backend\Form\FormDataProvider\TcaColumnsOverrides::class,
],
],
\TYPO3\CMS\Backend\Form\FormDataProvider\TcaColumnsProcessShowitem::class => [
'depends' => [
\TYPO3\CMS\Backend\Form\FormDataProvider\TcaInlineExpandCollapseState::class,
\TYPO3\CMS\Backend\Form\FormDataProvider\TcaColumnsProcessPlaceholders::class
],
],
\TYPO3\CMS\Backend\Form\FormDataProvider\TcaColumnsRemoveUnused::class => [
'depends' => [
\TYPO3\CMS\Backend\Form\FormDataProvider\TcaColumnsProcessCommon::class,
\TYPO3\CMS\Backend\Form\FormDataProvider\TcaColumnsProcessShowitem::class,
],
],
];
// -----
// hooks
// -----
// form input evaluation
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tce']['formevals'][ExcludeLinkTargetsLinkTargetEvaluation::class] = '';
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['Sypets/PageCallouts/Xclass/PageLayoutControllerWithCallouts']['addFlashMessageToPageModule'][] =
\Sypets\Brofix\Hooks\PageCalloutsHook::class;
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass']['brofix'] = \Sypets\Brofix\Hooks\DataHandlerHook::class;
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass']['brofix'] = \Sypets\Brofix\Hooks\DataHandlerHook::class;
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class)
->registerIcon(
'mimetypes-x-exclude-link-target',
\TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
['source' => 'EXT:brofix/Resources/Public/Icons/mimetypes-x-exclude-link-target.svg']
);
// -----
// icons
// -----
$iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
\TYPO3\CMS\Core\Imaging\IconRegistry::class
);
$iconRegistry->registerIcon(
'view-table-min',
\TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
['source' => 'EXT:brofix/Resources/Public/Icons/view-table-min.svg']
);
$iconRegistry->registerIcon(
'view-table-complex',
\TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
['source' => 'EXT:brofix/Resources/Public/Icons/view-table-complex.svg']
);
})();