20a954e6a3cba5bb6f29f70feed707707f595323
[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
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                 20 = CONTENT
85                 20 {
86                         table = tt_content
87                         select {
88                                 orderBy = sorting
89                                 where = {#colPos}=0
90                         }
91                         renderObj < lib.watcherDataObject
92                         renderObj.1.watcher.dataWrap = {register:watcher}|.__contents/tt_content:{field:uid}
93                         renderObj {
94                                 10 = CONTENT
95                                 10 {
96                                         if.isTrue.field = categories
97                                         table = sys_category
98                                         select {
99                                                 pidInList = root,-1
100                                                 selectFields = sys_category.*
101                                                 join = sys_category_record_mm ON sys_category_record_mm.uid_local = sys_category.uid
102                                                 where.data = field:_ORIG_uid // field:_LOCALIZED_UID // field:uid
103                                                 where.intval = 1
104                                                 where.wrap = sys_category_record_mm.uid_foreign=|
105                                                 orderBy = sys_category_record_mm.sorting_foreign
106                                                 languageField = sys_category.sys_language_uid
107                                         }
108                                         renderObj < lib.watcherDataObject
109                                         renderObj.1.watcher.dataWrap = {register:watcher}|.categories/sys_category:{field:uid}
110                                 }
111                                 20 = CONTENT
112                                 20 {
113                                         if.isTrue.field = tx_irretutorial_1nff_hotels
114                                         table = tx_irretutorial_1nff_hotel
115                                         select {
116                                                 orderBy = sorting
117                                                 where.field = uid
118                                                 where.intval = 1
119                                                 where.wrap = parenttable='tt_content' AND parentid=|
120                                         }
121                                         renderObj < lib.watcherDataObject
122                                         renderObj.1.watcher.dataWrap = {register:watcher}|.tx_irretutorial_1nff_hotels/tx_irretutorial_1nff_hotel:{field:uid}
123                                         renderObj {
124                                                 10 = CONTENT
125                                                 10 {
126                                                         if.isTrue.field = offers
127                                                         table = tx_irretutorial_1nff_offer
128                                                         select {
129                                                                 orderBy = sorting
130                                                                 where.field = uid
131                                                                 where.intval = 1
132                                                                 where.wrap = parenttable='tx_irretutorial_1nff_hotel' AND parentid=|
133                                                         }
134                                                         renderObj < lib.watcherDataObject
135                                                         renderObj.1.watcher.dataWrap = {register:watcher}|.offers/tx_irretutorial_1nff_offer:{field:uid}
136                                                         renderObj {
137                                                                 10 = CONTENT
138                                                                 10 {
139                                                                         if.isTrue.field = prices
140                                                                         table = tx_irretutorial_1nff_price
141                                                                         select {
142                                                                                 orderBy = sorting
143                                                                                 where.field = uid
144                                                                                 where.intval = 1
145                                                                                 where.wrap = parenttable='tx_irretutorial_1nff_offer' AND parentid=|
146                                                                         }
147                                                                         renderObj < lib.watcherDataObject
148                                                                         renderObj.1.watcher.dataWrap = {register:watcher}|.prices/tx_irretutorial_1nff_price:{field:uid}
149                                                                 }
150                                                         }
151                                                 }
152                                         }
153                                 }
154                                 30 = CONTENT
155                                 30 {
156                                         if.isTrue.field = tx_irretutorial_1ncsv_hotels
157                                         table = tx_irretutorial_1ncsv_hotel
158                                         select {
159                                                 uidInList.data = field:tx_irretutorial_1ncsv_hotels
160                                                 orderBy = sorting
161                                                 # prevent sys_language_uid lookup
162                                                 languageField = 0
163                                         }
164                                         renderObj < lib.watcherDataObject
165                                         renderObj.1.watcher.dataWrap = {register:watcher}|.tx_irretutorial_1ncsv_hotels/tx_irretutorial_1ncsv_hotel:{field:uid}
166                                         renderObj {
167                                                 10 = CONTENT
168                                                 10 {
169                                                         if.isTrue.field = offers
170                                                         table = tx_irretutorial_1ncsv_offer
171                                                         select {
172                                                                 uidInList.data = field:offers
173                                                                 orderBy = sorting
174                                                                 # prevent sys_language_uid lookup
175                                                                 languageField = 0
176                                                         }
177                                                         renderObj < lib.watcherDataObject
178                                                         renderObj.1.watcher.dataWrap = {register:watcher}|.offers/tx_irretutorial_1ncsv_offer:{field:uid}
179                                                         renderObj {
180                                                                 10 = CONTENT
181                                                                 10 {
182                                                                         if.isTrue.field = prices
183                                                                         table = tx_irretutorial_1ncsv_price
184                                                                         select {
185                                                                                 uidInList.data = field:prices
186                                                                                 orderBy = sorting
187                                                                                 # prevent sys_language_uid lookup
188                                                                                 languageField = 0
189                                                                         }
190                                                                         renderObj < lib.watcherDataObject
191                                                                         renderObj.1.watcher.dataWrap = {register:watcher}|.prices/tx_irretutorial_1ncsv_price:{field:uid}
192                                                                 }
193                                                         }
194                                                 }
195                                         }
196                                 }
197                                 40 = FILES
198                                 40 {
199                                         if.isTrue.field = image
200                                         references {
201                                                 fieldName = image
202                                         }
203                                         renderObj < lib.watcherFileObject
204                                         renderObj.1.watcher.dataWrap = {register:watcher}|.image/
205                                 }
206                                 50 = CONTENT
207                                 50 {
208                                         if.isTrue.field = tx_testdatahandler_select
209                                         table = tx_testdatahandler_element
210                                         select {
211                                                 uidInList.data = field:tx_testdatahandler_select
212                                                 pidInList = 0
213                                                 orderBy = sorting
214                                                 # prevent sys_language_uid lookup
215                                                 languageField = 0
216                                         }
217                                         renderObj < lib.watcherDataObject
218                                         renderObj.1.watcher.dataWrap = {register:watcher}|.tx_testdatahandler_select/tx_testdatahandler_element:{field:uid}
219                                 }
220                                 60 = CONTENT
221                                 60 {
222                                         if.isTrue.field = tx_testdatahandler_group
223                                         table = tx_testdatahandler_element
224                                         select {
225                                                 uidInList.data = field:tx_testdatahandler_group
226                                                 pidInList = 0
227                                                 orderBy = sorting
228                                                 # prevent sys_language_uid lookup
229                                                 languageField = 0
230                                         }
231                                         renderObj < lib.watcherDataObject
232                                         renderObj.1.watcher.dataWrap = {register:watcher}|.tx_testdatahandler_group/tx_testdatahandler_element:{field:uid}
233                                 }
234                         }
235                 }
236                 stdWrap.postUserFunc = TYPO3\TestingFramework\Core\Functional\Framework\Frontend\Collector->attachSection
237                 stdWrap.postUserFunc.as = Default
238         }
239         99999 = COA
240         99999 {
241                 stdWrap.postUserFunc = TYPO3\TestingFramework\Core\Functional\Framework\Frontend\Renderer->renderValues
242                 stdWrap.postUserFunc.values {
243                         page.children {
244                                 uid.data = page:uid
245                                 pid.data = page:pid
246                                 title.data = page:title
247                         }
248                         tsfe.children {
249                                 sys_language_uid.data = context:language:id
250                                 sys_language_mode.data = context:language:legacyLanguageMode
251                                 sys_language_content.data = context:language:contentId
252                                 sys_language_contentOL.data = context:language:legacyOverlayType
253                         }
254                 }
255                 stdWrap.postUserFunc.as = Scope
256         }
257         stdWrap.postUserFunc = TYPO3\TestingFramework\Core\Functional\Framework\Frontend\Renderer->renderSections
258 }
259
260 [globalVar = GP:L = 1]
261 config.sys_language_uid = 1
262 [end]
263 [globalVar = GP:L = 2]
264 config.sys_language_uid = 2
265 [end]
266 [globalVar = GP:L = 3]
267 config.sys_language_uid = 3
268 [end]