[TASK] Prepare Frontend Tests for additional site handling tests
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Tests / Functional / Fixtures / Frontend / JsonRenderer.typoscript
1 config {
2 no_cache = 1
3 debug = 0
4 xhtml_cleaning = 0
5 admPanel = 0
6 disableAllHeaderCode = 1
7 sendCacheHeaders = 0
8 sys_language_uid = 0
9 sys_language_mode = ignore
10 sys_language_overlay = 1
11 additionalHeaders.10.header = Content-Type: application/json; charset=utf-8
12 additionalHeaders.10.replace = 1
13
14 watcher {
15 tableFields {
16 pages = uid,_PAGES_OVERLAY_UID,pid,sorting,title,tx_irretutorial_hotels,tx_irretutorial_1ncsv_hotels
17 sys_category = uid,_ORIG_uid,_LOCALIZED_UID,pid,sys_language_uid,title,parent,items,sys_language_uid
18 sys_file = uid,_ORIG_uid,_LOCALIZED_UID,pid,title,sys_language_uid
19 sys_file_reference = uid,_ORIG_uid,_LOCALIZED_UID,title,description,alternative,link,missing,identifier,file,pid,sys_language_uid,title,parent,items,sys_language_uid,uid_local,uid_foreign,tablenames,fieldname,table_local
20 tt_content = uid,_ORIG_uid,_LOCALIZED_UID,pid,sorting,sys_language_uid,header,categories,tx_irretutorial_1nff_hotels
21 tx_irretutorial_1nff_hotel = uid,_ORIG_uid,_LOCALIZED_UID,pid,sorting,sys_language_uid,title,offers
22 tx_irretutorial_1nff_offer = uid,_ORIG_uid,_LOCALIZED_UID,pid,sorting,sys_language_uid,title,prices
23 tx_irretutorial_1nff_price = uid,_ORIG_uid,_LOCALIZED_UID,pid,sorting,sys_language_uid,title,price
24 tx_irretutorial_1ncsv_hotel = uid,_ORIG_uid,_LOCALIZED_UID,pid,sorting,sys_language_uid,title,offers
25 tx_irretutorial_1ncsv_offer = uid,_ORIG_uid,_LOCALIZED_UID,pid,sorting,sys_language_uid,title,prices
26 tx_irretutorial_1ncsv_price = uid,_ORIG_uid,_LOCALIZED_UID,pid,sorting,sys_language_uid,title,price
27 tx_testdatahandler_element = uid,_ORIG_uid,_LOCALIZED_UID,pid,sorting,sys_language_uid,title
28 }
29 }
30 }
31
32 lib.watcherDataObject = COA
33 lib.watcherDataObject {
34 1 = LOAD_REGISTER
35 1.watcher.dataWrap = |
36 2 = USER
37 2.userFunc = TYPO3\TestingFramework\Core\Functional\Framework\Frontend\Collector->addRecordData
38 99 = RESTORE_REGISTER
39 }
40
41 lib.watcherFileObject = COA
42 lib.watcherFileObject {
43 1 = LOAD_REGISTER
44 1.watcher.dataWrap = |
45 2 = USER
46 2.userFunc = TYPO3\TestingFramework\Core\Functional\Framework\Frontend\Collector->addFileData
47 99 = RESTORE_REGISTER
48 }
49
50 page = PAGE
51 page {
52 10 = COA
53 10 {
54 1 = LOAD_REGISTER
55 1.watcher.dataWrap = pages:{field:uid}
56 2 = USER
57 2.userFunc = TYPO3\TestingFramework\Core\Functional\Framework\Frontend\Collector->addRecordData
58 10 = CONTENT
59 10 {
60 stdWrap.required = 1
61 table = pages
62 select {
63 orderBy = sorting
64 pidInList = this
65 # prevent sys_language_uid lookup
66 languageField = 0
67 }
68 renderObj < lib.watcherDataObject
69 renderObj.1.watcher.dataWrap = {register:watcher}|.__pages/pages:{field:uid}
70 }
71 15 = CONTENT
72 15 {
73 if.isTrue.field = tx_irretutorial_hotels
74 table = tx_irretutorial_1nff_hotel
75 select {
76 orderBy = sorting
77 where.field = uid
78 where.intval = 1
79 where.wrap = parenttable='pages' AND parentid=|
80 }
81 renderObj < lib.watcherDataObject
82 renderObj.1.watcher.dataWrap = {register:watcher}|.tx_irretutorial_hotels/tx_irretutorial_1nff_hotel:{field:uid}
83 }
84 16 = CONTENT
85 16 {
86 if.isTrue.field = tx_irretutorial_1ncsv_hotels
87 table = tx_irretutorial_1ncsv_hotel
88 select {
89 uidInList.data = field:tx_irretutorial_1ncsv_hotels
90 orderBy = sorting
91 # prevent sys_language_uid lookup
92 languageField = 0
93 }
94 renderObj < lib.watcherDataObject
95 renderObj.1.watcher.dataWrap = {register:watcher}|.tx_irretutorial_1ncsv_hotels/tx_irretutorial_1ncsv_hotel:{field:uid}
96 }
97 20 = CONTENT
98 20 {
99 table = tt_content
100 select {
101 orderBy = sorting
102 where = {#colPos}=0
103 }
104 renderObj < lib.watcherDataObject
105 renderObj.1.watcher.dataWrap = {register:watcher}|.__contents/tt_content:{field:uid}
106 renderObj {
107 10 = CONTENT
108 10 {
109 if.isTrue.field = categories
110 table = sys_category
111 select {
112 pidInList = root,-1
113 selectFields = sys_category.*
114 join = sys_category_record_mm ON sys_category_record_mm.uid_local = sys_category.uid
115 where.data = field:_ORIG_uid // field:_LOCALIZED_UID // field:uid
116 where.intval = 1
117 where.wrap = sys_category_record_mm.uid_foreign=|
118 orderBy = sys_category_record_mm.sorting_foreign
119 languageField = sys_category.sys_language_uid
120 }
121 renderObj < lib.watcherDataObject
122 renderObj.1.watcher.dataWrap = {register:watcher}|.categories/sys_category:{field:uid}
123 }
124 20 = CONTENT
125 20 {
126 if.isTrue.field = tx_irretutorial_1nff_hotels
127 table = tx_irretutorial_1nff_hotel
128 select {
129 orderBy = sorting
130 where.field = uid
131 where.intval = 1
132 where.wrap = parenttable='tt_content' AND parentid=|
133 }
134 renderObj < lib.watcherDataObject
135 renderObj.1.watcher.dataWrap = {register:watcher}|.tx_irretutorial_1nff_hotels/tx_irretutorial_1nff_hotel:{field:uid}
136 renderObj {
137 10 = CONTENT
138 10 {
139 if.isTrue.field = offers
140 table = tx_irretutorial_1nff_offer
141 select {
142 orderBy = sorting
143 where.field = uid
144 where.intval = 1
145 where.wrap = parenttable='tx_irretutorial_1nff_hotel' AND parentid=|
146 }
147 renderObj < lib.watcherDataObject
148 renderObj.1.watcher.dataWrap = {register:watcher}|.offers/tx_irretutorial_1nff_offer:{field:uid}
149 renderObj {
150 10 = CONTENT
151 10 {
152 if.isTrue.field = prices
153 table = tx_irretutorial_1nff_price
154 select {
155 orderBy = sorting
156 where.field = uid
157 where.intval = 1
158 where.wrap = parenttable='tx_irretutorial_1nff_offer' AND parentid=|
159 }
160 renderObj < lib.watcherDataObject
161 renderObj.1.watcher.dataWrap = {register:watcher}|.prices/tx_irretutorial_1nff_price:{field:uid}
162 }
163 }
164 }
165 }
166 }
167 30 = CONTENT
168 30 {
169 if.isTrue.field = tx_irretutorial_1ncsv_hotels
170 table = tx_irretutorial_1ncsv_hotel
171 select {
172 uidInList.data = field:tx_irretutorial_1ncsv_hotels
173 orderBy = sorting
174 # prevent sys_language_uid lookup
175 languageField = 0
176 }
177 renderObj < lib.watcherDataObject
178 renderObj.1.watcher.dataWrap = {register:watcher}|.tx_irretutorial_1ncsv_hotels/tx_irretutorial_1ncsv_hotel:{field:uid}
179 renderObj {
180 10 = CONTENT
181 10 {
182 if.isTrue.field = offers
183 table = tx_irretutorial_1ncsv_offer
184 select {
185 uidInList.data = field:offers
186 orderBy = sorting
187 # prevent sys_language_uid lookup
188 languageField = 0
189 }
190 renderObj < lib.watcherDataObject
191 renderObj.1.watcher.dataWrap = {register:watcher}|.offers/tx_irretutorial_1ncsv_offer:{field:uid}
192 renderObj {
193 10 = CONTENT
194 10 {
195 if.isTrue.field = prices
196 table = tx_irretutorial_1ncsv_price
197 select {
198 uidInList.data = field:prices
199 orderBy = sorting
200 # prevent sys_language_uid lookup
201 languageField = 0
202 }
203 renderObj < lib.watcherDataObject
204 renderObj.1.watcher.dataWrap = {register:watcher}|.prices/tx_irretutorial_1ncsv_price:{field:uid}
205 }
206 }
207 }
208 }
209 }
210 40 = FILES
211 40 {
212 if.isTrue.field = image
213 references {
214 fieldName = image
215 }
216 renderObj < lib.watcherFileObject
217 renderObj.1.watcher.dataWrap = {register:watcher}|.image/
218 }
219 50 = CONTENT
220 50 {
221 if.isTrue.field = tx_testdatahandler_select
222 table = tx_testdatahandler_element
223 select {
224 uidInList.data = field:tx_testdatahandler_select
225 pidInList = 0
226 orderBy = sorting
227 # prevent sys_language_uid lookup
228 languageField = 0
229 }
230 renderObj < lib.watcherDataObject
231 renderObj.1.watcher.dataWrap = {register:watcher}|.tx_testdatahandler_select/tx_testdatahandler_element:{field:uid}
232 }
233 60 = CONTENT
234 60 {
235 if.isTrue.field = tx_testdatahandler_group
236 table = tx_testdatahandler_element
237 select {
238 uidInList.data = field:tx_testdatahandler_group
239 pidInList = 0
240 orderBy = sorting
241 # prevent sys_language_uid lookup
242 languageField = 0
243 }
244 renderObj < lib.watcherDataObject
245 renderObj.1.watcher.dataWrap = {register:watcher}|.tx_testdatahandler_group/tx_testdatahandler_element:{field:uid}
246 }
247 }
248 }
249 stdWrap.postUserFunc = TYPO3\TestingFramework\Core\Functional\Framework\Frontend\Collector->attachSection
250 stdWrap.postUserFunc.as = Default
251 }
252 99999 = COA
253 99999 {
254 stdWrap.postUserFunc = TYPO3\TestingFramework\Core\Functional\Framework\Frontend\Renderer->renderValues
255 stdWrap.postUserFunc.values {
256 template.children {
257 sitetitle.data = tsfe:tmpl|setup|sitetitle
258 }
259 page.children {
260 uid.data = page:uid
261 pid.data = page:pid
262 title.data = page:title
263 }
264 tsfe.children {
265 sys_language_uid.data = context:language:id
266 sys_language_mode.data = context:language:legacyLanguageMode
267 sys_language_content.data = context:language:contentId
268 sys_language_contentOL.data = context:language:legacyOverlayType
269 }
270 languageInfo.children {
271 id.data = context:language:id
272 contentId.data = context:language:contentId
273 fallbackType.data = sitelanguage:fallbackType
274 fallbackChain.data = context:language:fallbackChain
275 overlayType.data = context:language:overlayType
276 }
277 }
278 stdWrap.postUserFunc.as = Scope
279 }
280 stdWrap.postUserFunc = TYPO3\TestingFramework\Core\Functional\Framework\Frontend\Renderer->renderSections
281 }
282
283 [request.getQueryParams()['L'] == 1 || request.getParsedBody()['L'] == 1]
284 config.sys_language_uid = 1
285 [end]
286 [request.getQueryParams()['L'] == 2 || request.getParsedBody()['L'] == 2]
287 config.sys_language_uid = 2
288 [end]
289 [request.getQueryParams()['L'] == 3 || request.getParsedBody()['L'] == 3]
290 config.sys_language_uid = 3
291 [end]