[BUGFIX] Make redirect sources with Query matchable
[Packages/TYPO3.CMS.git] / typo3 / sysext / redirects / Configuration / TCA / sys_redirect.php
1 <?php
2
3 return [
4 'ctrl' => [
5 'title' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect',
6 'label' => 'source_host',
7 'label_alt' => 'source_path',
8 'label_alt_force' => true,
9 'crdate' => 'createdon',
10 'cruser_id' => 'createdby',
11 'tstamp' => 'updatedon',
12 'versioningWS' => false,
13 'default_sortby' => 'source_host, source_path',
14 'rootLevel' => 1,
15 'security' => [
16 'ignoreWebMountRestriction' => true,
17 'ignoreRootLevelRestriction' => true,
18 ],
19 'delete' => 'deleted',
20 'enablecolumns' => [
21 'disabled' => 'disabled',
22 'starttime' => 'starttime',
23 'endtime' => 'endtime',
24 ],
25 'typeicon_classes' => [
26 'default' => 'mimetypes-x-sys_redirect',
27 ],
28 'searchFields' => 'source_host,source_path,target,target_statuscode',
29 ],
30 'interface' => [
31 'showRecordFieldList' => 'disabled, source_host, source_path, respect_query_parameters, is_regexp, force_https, keep_query_parameters, target, target_statuscode, hitcount, lasthiton, disable_hitcount',
32 ],
33 'types' => [
34 '1' => [
35 'showitem' => '
36 --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:general, --palette--;;source, --palette--;;targetdetails,
37 --div--;LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:tabs.redirectCount, disable_hitcount, hitcount, lasthiton,
38 --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:access, --palette--;;visibility'
39 ],
40 ],
41 'palettes' => [
42 'visibility' => [
43 'showitem' => 'disabled, --linebreak--, starttime, endtime'
44 ],
45 'source' => [
46 'showitem' => 'source_host, --linebreak--, source_path, respect_query_parameters, is_regexp'
47 ],
48 'targetdetails' => [
49 'showitem' => 'target, target_statuscode, --linebreak--, force_https, keep_query_parameters'
50 ],
51 ],
52 'columns' => [
53 'disabled' => [
54 'exclude' => true,
55 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.enabled',
56 'config' => [
57 'type' => 'check',
58 'renderType' => 'checkboxToggle',
59 'items' => [
60 [
61 0 => '',
62 1 => '',
63 'invertStateDisplay' => true
64 ]
65 ],
66 ]
67 ],
68 'starttime' => [
69 'exclude' => true,
70 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime',
71 'config' => [
72 'type' => 'input',
73 'renderType' => 'inputDateTime',
74 'eval' => 'datetime,int',
75 'default' => 0
76 ]
77 ],
78 'endtime' => [
79 'exclude' => true,
80 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime',
81 'config' => [
82 'type' => 'input',
83 'renderType' => 'inputDateTime',
84 'eval' => 'datetime,int',
85 'default' => 0,
86 'range' => [
87 'upper' => mktime(0, 0, 0, 1, 1, 2038)
88 ]
89 ]
90 ],
91 'source_host' => [
92 'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.source_host',
93 'config' => [
94 'type' => 'input',
95 'eval' => 'trim,required,' . \TYPO3\CMS\Redirects\Evaluation\SourceHost::class,
96 // items will be extended by local sys_domain records using dataprovider TYPO3\CMS\Redirects\FormDataProvider\ValuePickerItemDataProvider
97 'valuePicker' => [
98 'items' => [
99 [ 'LLL:EXT:redirects/Resources/Private/Language/locallang_module_redirect.xlf:source_host_global_text',
100 '*',
101 ],
102 ],
103 ],
104 'default' => '*',
105 ],
106 ],
107 'source_path' => [
108 'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.source_path',
109 'config' => [
110 'type' => 'input',
111 'size' => 30,
112 'eval' => 'trim,required',
113 'placeholder' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_module_redirect.xlf:source_path.placeholder',
114 ],
115 ],
116 'force_https' => [
117 'exclude' => true,
118 'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.force_https.0',
119 'config' => [
120 'type' => 'check',
121 'renderType' => 'checkboxToggle',
122 'default' => 0,
123 'items' => [
124 [
125 0 => '',
126 1 => '',
127 ]
128 ],
129 ]
130 ],
131 'keep_query_parameters' => [
132 'exclude' => true,
133 'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.keep_query_parameters.0',
134 'config' => [
135 'type' => 'check',
136 'renderType' => 'checkboxToggle',
137 'default' => 0,
138 'items' => [
139 [
140 0 => '',
141 1 => '',
142 ]
143 ],
144 ]
145 ],
146 'respect_query_parameters' => [
147 'exclude' => true,
148 'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.respect_query_parameters.0',
149 'config' => [
150 'type' => 'check',
151 'renderType' => 'checkboxToggle',
152 'default' => 0,
153 'items' => [
154 [
155 0 => '',
156 1 => '',
157 ]
158 ],
159 ]
160 ],
161 'target' => [
162 'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.target',
163 'config' => [
164 'type' => 'input',
165 'eval' =>'required',
166 'renderType' => 'inputLink',
167 'softref' => 'typolink',
168 'fieldControl' => [
169 'linkPopup' => [
170 'options' => [
171 'blindLinkOptions' => 'mail',
172 'blindLinkFields' => 'class, target'
173 ],
174 ],
175 ],
176 ],
177 ],
178 'target_statuscode' => [
179 'exclude' => true,
180 'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.target_statuscode',
181 'config' => [
182 'type' => 'select',
183 'renderType' => 'selectSingle',
184 'items' => [
185 ['LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.target_statuscode.301', 301],
186 ['LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.target_statuscode.302', 302],
187 ['LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.target_statuscode.303', 303],
188 ['LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.target_statuscode.307', 307],
189 ],
190 'default' => 307,
191 'size' => 1,
192 ],
193 ],
194 'hitcount' => [
195 'exclude' => true,
196 'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.hitcount',
197 'config' => [
198 'type' => 'input',
199 'size' => 5,
200 'default' => 0,
201 'readOnly' => true
202 ],
203 'displayCond' => 'USER:TYPO3\CMS\Redirects\UserFunctions\HitCountDisplayCondition->isEnabled'
204 ],
205 'lasthiton' => [
206 'exclude' => true,
207 'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.lasthiton',
208 'config' => [
209 'type' => 'input',
210 'eval' => 'datetime,int',
211 'renderType' => 'inputDateTime',
212 'readOnly' => true
213 ],
214 'displayCond' => 'USER:TYPO3\CMS\Redirects\UserFunctions\HitCountDisplayCondition->isEnabled'
215 ],
216 'disable_hitcount' => [
217 'exclude' => true,
218 'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.hitcountState',
219 'config' => [
220 'type' => 'check',
221 'renderType' => 'checkboxLabeledToggle',
222 'items' => [
223 [
224 0 => '',
225 1 => '',
226 'labelChecked' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.enabled',
227 'labelUnchecked' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.disabled',
228 'invertStateDisplay' => true
229 ]
230 ],
231 ],
232 'displayCond' => 'USER:TYPO3\CMS\Redirects\UserFunctions\HitCountDisplayCondition->isEnabled'
233 ],
234 'is_regexp' => [
235 'exclude' => true,
236 'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.is_regexp',
237 'config' => [
238 'type' => 'check',
239 'renderType' => 'checkboxToggle',
240 'items' => [
241 [
242 0 => '',
243 1 => '',
244 ]
245 ],
246 ]
247 ],
248 ],
249 ];