‪TYPO3CMS  ‪main
Typo3DbQueryParserTest.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
20 use PHPUnit\Framework\Attributes\DataProvider;
21 use PHPUnit\Framework\Attributes\Test;
38 use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase;
41 
42 final class ‪Typo3DbQueryParserTest extends FunctionalTestCase
43 {
44  protected array ‪$testExtensionsToLoad = [
45  'typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example',
46  ];
47 
48  #[Test]
50  {
51  $frontendTypoScript = new ‪FrontendTypoScript(new ‪RootNode(), [], [], []);
52  $frontendTypoScript->setSetupArray([]);
53  ‪$GLOBALS['TYPO3_REQUEST'] = (new ‪ServerRequest())
54  ->withAttribute('applicationType', ‪SystemEnvironmentBuilder::REQUESTTYPE_FE)
55  ->withAttribute('frontend.typoscript', $frontendTypoScript);
56  $typo3DbQueryParser = $this->get(Typo3DbQueryParser::class);
57  $blogRepository = $this->get(BlogRepository::class);
58  $query = $blogRepository->createQuery();
59 
60  $queryBuilder = $typo3DbQueryParser->convertQueryToDoctrineQueryBuilder($query);
61 
62  $compositeExpression = $queryBuilder->getWhere();
63  // 1-4: language constraint, pid constraint, workspace constraint, enable fields constraint.
64  self::assertCount(4, $compositeExpression);
65  }
66 
67  #[Test]
69  {
70  $frontendTypoScript = new ‪FrontendTypoScript(new ‪RootNode(), [], [], []);
71  $frontendTypoScript->setSetupArray([]);
72  ‪$GLOBALS['TYPO3_REQUEST'] = (new ‪ServerRequest())
73  ->withAttribute('applicationType', ‪SystemEnvironmentBuilder::REQUESTTYPE_FE)
74  ->withAttribute('frontend.typoscript', $frontendTypoScript);
75  $typo3DbQueryParser = $this->get(Typo3DbQueryParser::class);
76 
77  $query = $this->createMock(QueryInterface::class);
78  $query->method('getSource')->willReturn($this->createMock(SourceInterface::class));
79  $query->method('getOrderings')->willReturn([]);
80  $query->method('getStatement')->willReturn(null);
81  // Test part: getConstraint returns not implemented object
82  $query->method('getConstraint')->willReturn($this->createMock(ConstraintInterface::class));
83 
84  $this->expectException(\RuntimeException::class);
85  $this->expectExceptionCode(1476199898);
86 
87  $typo3DbQueryParser->convertQueryToDoctrineQueryBuilder($query);
88  }
89 
90  #[Test]
92  {
93  $frontendTypoScript = new ‪FrontendTypoScript(new ‪RootNode(), [], [], []);
94  $frontendTypoScript->setSetupArray([]);
95  ‪$GLOBALS['TYPO3_REQUEST'] = (new ‪ServerRequest())
96  ->withAttribute('applicationType', ‪SystemEnvironmentBuilder::REQUESTTYPE_FE)
97  ->withAttribute('frontend.typoscript', $frontendTypoScript);
98  $typo3DbQueryParser = $this->get(Typo3DbQueryParser::class);
99  $blogRepository = $this->get(BlogRepository::class);
100  $query = $blogRepository->createQuery();
101  $query->matching($query->equals('uid', 1));
102 
103  $queryBuilder = $typo3DbQueryParser->convertQueryToDoctrineQueryBuilder($query);
104 
105  $compositeExpression = $queryBuilder->getWhere();
106  // 1-4: language constraint, pid constraint, workspace constraint, enable fields constraint.
107  // 5: custom constraint uid = 1
108  self::assertCount(5, $compositeExpression);
109  self::assertStringContainsString('uid', (string)$compositeExpression);
110  }
111 
112  #[Test]
114  {
115  $frontendTypoScript = new ‪FrontendTypoScript(new ‪RootNode(), [], [], []);
116  $frontendTypoScript->setSetupArray([]);
117  ‪$GLOBALS['TYPO3_REQUEST'] = (new ‪ServerRequest())
118  ->withAttribute('applicationType', ‪SystemEnvironmentBuilder::REQUESTTYPE_FE)
119  ->withAttribute('frontend.typoscript', $frontendTypoScript);
120  $typo3DbQueryParser = $this->get(Typo3DbQueryParser::class);
121  $blogRepository = $this->get(BlogRepository::class);
122  $query = $blogRepository->createQuery();
123  $query->matching($query->logicalNot($query->equals('uid', 1)));
124 
125  $queryBuilder = $typo3DbQueryParser->convertQueryToDoctrineQueryBuilder($query);
126 
127  $compositeExpression = $queryBuilder->getWhere();
128  // 1-4: language constraint, pid constraint, workspace constraint, enable fields constraint.
129  // 5: custom constraint NOT(uid = 1)
130  self::assertCount(5, $compositeExpression);
131  self::assertMatchesRegularExpression('/NOT\‍(.*uid/', (string)$compositeExpression);
132  }
133 
134  #[Test]
136  {
137  $frontendTypoScript = new ‪FrontendTypoScript(new ‪RootNode(), [], [], []);
138  $frontendTypoScript->setSetupArray([]);
139  ‪$GLOBALS['TYPO3_REQUEST'] = (new ‪ServerRequest())
140  ->withAttribute('applicationType', ‪SystemEnvironmentBuilder::REQUESTTYPE_FE)
141  ->withAttribute('frontend.typoscript', $frontendTypoScript);
142  $typo3DbQueryParser = $this->get(Typo3DbQueryParser::class);
143  $blogRepository = $this->get(BlogRepository::class);
144  $query = $blogRepository->createQuery();
145  $andConstraint = $query->logicalAnd(
146  $query->equals('title', 'Heinz'),
147  $query->equals('description', 'Heinz'),
148  );
149  $query->matching($andConstraint);
150 
151  $queryBuilder = $typo3DbQueryParser->convertQueryToDoctrineQueryBuilder($query);
152 
153  $compositeExpression = $queryBuilder->getWhere();
154  // 1-2: custom AND constraint title = 'Heinz' AND description = 'Heinz'
155  // 3-6: language constraint, pid constraint, workspace constraint, enable fields constraint.
156  self::assertCount(6, $compositeExpression);
157  self::assertMatchesRegularExpression('/title.* AND .*description/', (string)$compositeExpression);
158  }
159 
160  #[Test]
162  {
163  $frontendTypoScript = new ‪FrontendTypoScript(new ‪RootNode(), [], [], []);
164  $frontendTypoScript->setSetupArray([]);
165  ‪$GLOBALS['TYPO3_REQUEST'] = (new ‪ServerRequest())
166  ->withAttribute('applicationType', ‪SystemEnvironmentBuilder::REQUESTTYPE_FE)
167  ->withAttribute('frontend.typoscript', $frontendTypoScript);
168  $typo3DbQueryParser = $this->get(Typo3DbQueryParser::class);
169  $blogRepository = $this->get(BlogRepository::class);
170  $query = $blogRepository->createQuery();
171  $andConstraint = $query->logicalOr(
172  $query->equals('title', 'Heinz'),
173  $query->equals('description', 'Heinz'),
174  );
175  $query->matching($andConstraint);
176 
177  $queryBuilder = $typo3DbQueryParser->convertQueryToDoctrineQueryBuilder($query);
178 
179  $compositeExpression = $queryBuilder->getWhere();
180  // 1-4: language constraint, pid constraint, workspace constraint, enable fields constraint.
181  // 5: custom AND constraint title = 'Heinz' OR description = 'Heinz'
182  self::assertCount(5, $compositeExpression);
183  self::assertMatchesRegularExpression('/title.* OR .*description/', (string)$compositeExpression);
184  }
185 
186  #[Test]
188  {
189  $frontendTypoScript = new ‪FrontendTypoScript(new ‪RootNode(), [], [], []);
190  $frontendTypoScript->setSetupArray([]);
191  ‪$GLOBALS['TYPO3_REQUEST'] = (new ‪ServerRequest())
192  ->withAttribute('applicationType', ‪SystemEnvironmentBuilder::REQUESTTYPE_FE)
193  ->withAttribute('frontend.typoscript', $frontendTypoScript);
194  $typo3DbQueryParser = $this->get(Typo3DbQueryParser::class);
195  $blogRepository = $this->get(BlogRepository::class);
196  $query = $blogRepository->createQuery();
197 
198  $queryBuilder = $typo3DbQueryParser->convertQueryToDoctrineQueryBuilder($query);
199 
200  $compositeExpression = $queryBuilder->getWhere();
201  self::assertMatchesRegularExpression('/sys_language_uid. IN \‍(0, -1\‍)/', (string)$compositeExpression);
202  }
203 
204  #[Test]
206  {
207  $frontendTypoScript = new ‪FrontendTypoScript(new ‪RootNode(), [], [], []);
208  $frontendTypoScript->setSetupArray([]);
209  ‪$GLOBALS['TYPO3_REQUEST'] = (new ‪ServerRequest())
210  ->withAttribute('applicationType', ‪SystemEnvironmentBuilder::REQUESTTYPE_FE)
211  ->withAttribute('frontend.typoscript', $frontendTypoScript);
212  $typo3DbQueryParser = $this->get(Typo3DbQueryParser::class);
213  $blogRepository = $this->get(BlogRepository::class);
214  $context = new ‪Context();
215  $context->setAspect('language', new ‪LanguageAspect(1, overlayType: ‪LanguageAspect::OVERLAYS_OFF));
216  $querySettings = new ‪Typo3QuerySettings($context, $this->get(ConfigurationManagerInterface::class));
217  $querySettings->setRespectStoragePage(false);
218  $query = $blogRepository->createQuery();
219  $query->setQuerySettings($querySettings);
220 
221  $queryBuilder = $typo3DbQueryParser->convertQueryToDoctrineQueryBuilder($query);
222 
223  $compositeExpression = $queryBuilder->getWhere();
224  self::assertMatchesRegularExpression('/sys_language_uid. IN \‍(1, -1\‍)/', (string)$compositeExpression);
225  }
226 
227  #[Test]
229  {
230  ‪$GLOBALS['TYPO3_REQUEST'] = (new ‪ServerRequest())->withAttribute('applicationType', ‪SystemEnvironmentBuilder::REQUESTTYPE_BE);
231  $typo3DbQueryParser = $this->get(Typo3DbQueryParser::class);
232  $blogRepository = $this->get(BlogRepository::class);
233  $context = new ‪Context();
234  $context->setAspect('language', new ‪LanguageAspect(1, overlayType: ‪LanguageAspect::OVERLAYS_OFF));
235  $querySettings = new ‪Typo3QuerySettings($context, $this->get(ConfigurationManagerInterface::class));
236  $querySettings->setRespectStoragePage(false);
237  $query = $blogRepository->createQuery();
238  $query->setQuerySettings($querySettings);
239 
240  $queryBuilder = $typo3DbQueryParser->convertQueryToDoctrineQueryBuilder($query);
241 
242  $compositeExpression = $queryBuilder->getWhere();
243  self::assertMatchesRegularExpression('/sys_language_uid. IN \‍(1, -1\‍)/', (string)$compositeExpression);
244  }
245 
246  #[Test]
248  {
249  ‪$GLOBALS['TCA']['tx_blogexample_domain_model_blog']['ctrl']['delete'] = null;
250  ‪$GLOBALS['TYPO3_REQUEST'] = (new ‪ServerRequest())->withAttribute('applicationType', ‪SystemEnvironmentBuilder::REQUESTTYPE_BE);
251  $typo3DbQueryParser = $this->get(Typo3DbQueryParser::class);
252  $blogRepository = $this->get(BlogRepository::class);
253  $context = new ‪Context();
254  $context->setAspect('language', new ‪LanguageAspect(1));
255  $querySettings = new ‪Typo3QuerySettings($context, $this->get(ConfigurationManagerInterface::class));
256  $querySettings->setRespectStoragePage(false);
257  $query = $blogRepository->createQuery();
258  $query->setQuerySettings($querySettings);
259 
260  $queryBuilder = $typo3DbQueryParser->convertQueryToDoctrineQueryBuilder($query);
261 
262  $compositeExpression = $queryBuilder->getWhere();
263  self::assertMatchesRegularExpression('/l18n_parent. IN \‍(SELECT/', (string)$compositeExpression);
264  self::assertStringNotContainsString('deleted', (string)$compositeExpression);
265  }
266 
267  #[Test]
269  {
270  $frontendTypoScript = new ‪FrontendTypoScript(new ‪RootNode(), [], [], []);
271  $frontendTypoScript->setSetupArray([]);
272  ‪$GLOBALS['TYPO3_REQUEST'] = (new ‪ServerRequest())
273  ->withAttribute('applicationType', ‪SystemEnvironmentBuilder::REQUESTTYPE_FE)
274  ->withAttribute('frontend.typoscript', $frontendTypoScript);
275  $typo3DbQueryParser = $this->get(Typo3DbQueryParser::class);
276  $blogRepository = $this->get(BlogRepository::class);
277  $context = new ‪Context();
278  $context->setAspect('language', new ‪LanguageAspect(id: 1, contentId: 1, overlayType: ‪LanguageAspect::OVERLAYS_MIXED));
279  $querySettings = new ‪Typo3QuerySettings($context, $this->get(ConfigurationManagerInterface::class));
280  $querySettings->setRespectStoragePage(false);
281  $query = $blogRepository->createQuery();
282  $query->setQuerySettings($querySettings);
283 
284  $queryBuilder = $typo3DbQueryParser->convertQueryToDoctrineQueryBuilder($query);
285 
286  $compositeExpression = $queryBuilder->getWhere();
287  self::assertMatchesRegularExpression('/l18n_parent. IN \‍(SELECT/', (string)$compositeExpression);
288  self::assertStringContainsString('deleted', (string)$compositeExpression);
289  }
290 
291  #[Test]
293  {
294  ‪$GLOBALS['TYPO3_REQUEST'] = (new ‪ServerRequest())
295  ->withAttribute('applicationType', ‪SystemEnvironmentBuilder::REQUESTTYPE_BE);
296  $typo3DbQueryParser = $this->get(Typo3DbQueryParser::class);
297  $blogRepository = $this->get(BlogRepository::class);
298  $context = new ‪Context();
299  $context->setAspect('language', new ‪LanguageAspect(id: 1, contentId: 1, overlayType: ‪LanguageAspect::OVERLAYS_MIXED));
300  $querySettings = new ‪Typo3QuerySettings($context, $this->get(ConfigurationManagerInterface::class));
301  $querySettings->setRespectStoragePage(false);
302  $query = $blogRepository->createQuery();
303  $query->setQuerySettings($querySettings);
304 
305  $queryBuilder = $typo3DbQueryParser->convertQueryToDoctrineQueryBuilder($query);
306 
307  $compositeExpression = $queryBuilder->getWhere();
308  self::assertMatchesRegularExpression('/l18n_parent. IN \‍(SELECT/', (string)$compositeExpression);
309  self::assertStringContainsString('deleted', (string)$compositeExpression);
310  }
311 
312  #[Test]
313  public function ‪orderStatementGenerationWorks(): void
314  {
315  $frontendTypoScript = new ‪FrontendTypoScript(new ‪RootNode(), [], [], []);
316  $frontendTypoScript->setSetupArray([]);
317  ‪$GLOBALS['TYPO3_REQUEST'] = (new ‪ServerRequest())
318  ->withAttribute('applicationType', ‪SystemEnvironmentBuilder::REQUESTTYPE_FE)
319  ->withAttribute('frontend.typoscript', $frontendTypoScript);
320  $typo3DbQueryParser = $this->get(Typo3DbQueryParser::class);
321  $blogRepository = $this->get(BlogRepository::class);
322  $context = new ‪Context();
323  $context->setAspect('language', new ‪LanguageAspect(1));
324  $querySettings = new ‪Typo3QuerySettings($context, $this->get(ConfigurationManagerInterface::class));
325  $querySettings->setRespectStoragePage(false);
326  $query = $blogRepository->createQuery();
327  $query->setOrderings(['title' => ‪QueryInterface::ORDER_DESCENDING]);
328  $query->setQuerySettings($querySettings);
329 
330  $queryBuilder = $typo3DbQueryParser->convertQueryToDoctrineQueryBuilder($query);
331 
332  $orderBy = $queryBuilder->getOrderBy();
333  self::assertMatchesRegularExpression('/title. DESC/', $orderBy[0]);
334  }
335 
336  #[Test]
338  {
339  $this->expectException(UnsupportedOrderException::class);
340  $this->expectExceptionCode(1242816074);
341 
342  $frontendTypoScript = new ‪FrontendTypoScript(new ‪RootNode(), [], [], []);
343  $frontendTypoScript->setSetupArray([]);
344  ‪$GLOBALS['TYPO3_REQUEST'] = (new ‪ServerRequest())
345  ->withAttribute('applicationType', ‪SystemEnvironmentBuilder::REQUESTTYPE_FE)
346  ->withAttribute('frontend.typoscript', $frontendTypoScript);
347  $typo3DbQueryParser = $this->get(Typo3DbQueryParser::class);
348  $blogRepository = $this->get(BlogRepository::class);
349  $context = new ‪Context();
350  $context->setAspect('language', new ‪LanguageAspect(1));
351  $querySettings = new ‪Typo3QuerySettings($context, $this->get(ConfigurationManagerInterface::class));
352  $querySettings->setRespectStoragePage(false);
353  $query = $blogRepository->createQuery();
354  $query->setOrderings(['title' => 'FOO']);
355  $query->setQuerySettings($querySettings);
356 
357  $typo3DbQueryParser->convertQueryToDoctrineQueryBuilder($query);
358  }
359 
360  #[Test]
362  {
363  $frontendTypoScript = new ‪FrontendTypoScript(new ‪RootNode(), [], [], []);
364  $frontendTypoScript->setSetupArray([]);
365  ‪$GLOBALS['TYPO3_REQUEST'] = (new ‪ServerRequest())
366  ->withAttribute('applicationType', ‪SystemEnvironmentBuilder::REQUESTTYPE_FE)
367  ->withAttribute('frontend.typoscript', $frontendTypoScript);
368  $typo3DbQueryParser = $this->get(Typo3DbQueryParser::class);
369  $blogRepository = $this->get(BlogRepository::class);
370  $context = new ‪Context();
371  $context->setAspect('language', new ‪LanguageAspect(1));
372  $querySettings = new ‪Typo3QuerySettings($context, $this->get(ConfigurationManagerInterface::class));
373  $querySettings->setRespectStoragePage(false);
374  $query = $blogRepository->createQuery();
375  $query->setOrderings(
377  );
378  $query->setQuerySettings($querySettings);
379 
380  $queryBuilder = $typo3DbQueryParser->convertQueryToDoctrineQueryBuilder($query);
381 
382  $orderBy = $queryBuilder->getOrderBy();
383  self::assertMatchesRegularExpression('/title. DESC/', $orderBy[0]);
384  self::assertMatchesRegularExpression('/description. ASC/', $orderBy[1]);
385  }
386 
387  #[Test]
389  {
390  ‪$GLOBALS['TYPO3_REQUEST'] = (new ‪ServerRequest())
391  ->withAttribute('applicationType', ‪SystemEnvironmentBuilder::REQUESTTYPE_BE);
392  $typo3DbQueryParser = $this->get(Typo3DbQueryParser::class);
393  $blogRepository = $this->get(BlogRepository::class);
394  $context = new ‪Context();
395  $querySettings = new ‪Typo3QuerySettings($context, $this->get(ConfigurationManagerInterface::class));
396  $querySettings->setRespectStoragePage(false);
397  $querySettings->setIgnoreEnableFields(true);
398  $querySettings->setIncludeDeleted(true);
399  $query = $blogRepository->createQuery();
400  $query->setQuerySettings($querySettings);
401 
402  $queryBuilder = $typo3DbQueryParser->convertQueryToDoctrineQueryBuilder($query);
403 
404  $compositeExpression = $queryBuilder->getWhere();
405  self::assertStringNotContainsString('hidden', (string)$compositeExpression);
406  self::assertStringNotContainsString('deleted', (string)$compositeExpression);
407  }
408 
409  #[Test]
411  {
412  ‪$GLOBALS['TYPO3_REQUEST'] = (new ‪ServerRequest())
413  ->withAttribute('applicationType', ‪SystemEnvironmentBuilder::REQUESTTYPE_BE);
414  $typo3DbQueryParser = $this->get(Typo3DbQueryParser::class);
415  $blogRepository = $this->get(BlogRepository::class);
416  $context = new ‪Context();
417  $querySettings = new ‪Typo3QuerySettings($context, $this->get(ConfigurationManagerInterface::class));
418  $querySettings->setRespectStoragePage(false);
419  $querySettings->setIgnoreEnableFields(true);
420  $querySettings->setIncludeDeleted(false);
421  $query = $blogRepository->createQuery();
422  $query->setQuerySettings($querySettings);
423 
424  $queryBuilder = $typo3DbQueryParser->convertQueryToDoctrineQueryBuilder($query);
425 
426  $compositeExpression = $queryBuilder->getWhere();
427  self::assertStringNotContainsString('hidden', (string)$compositeExpression);
428  self::assertStringContainsString('deleted', (string)$compositeExpression);
429  }
430 
431  #[Test]
433  {
434  ‪$GLOBALS['TYPO3_REQUEST'] = (new ‪ServerRequest())
435  ->withAttribute('applicationType', ‪SystemEnvironmentBuilder::REQUESTTYPE_BE);
436  $typo3DbQueryParser = $this->get(Typo3DbQueryParser::class);
437  $blogRepository = $this->get(BlogRepository::class);
438  $querySettings = new ‪Typo3QuerySettings(new ‪Context(), $this->get(ConfigurationManagerInterface::class));
439  $querySettings->setRespectStoragePage(false);
440  $querySettings->setIgnoreEnableFields(false);
441  $querySettings->setIncludeDeleted(true);
442  $query = $blogRepository->createQuery();
443  $query->setQuerySettings($querySettings);
444 
445  $queryBuilder = $typo3DbQueryParser->convertQueryToDoctrineQueryBuilder($query);
446 
447  $compositeExpression = $queryBuilder->getWhere();
448  self::assertStringContainsString('hidden', (string)$compositeExpression);
449  self::assertStringNotContainsString('deleted', (string)$compositeExpression);
450  }
451 
452  #[Test]
454  {
455  ‪$GLOBALS['TYPO3_REQUEST'] = (new ‪ServerRequest())
456  ->withAttribute('applicationType', ‪SystemEnvironmentBuilder::REQUESTTYPE_BE);
457  $typo3DbQueryParser = $this->get(Typo3DbQueryParser::class);
458  $blogRepository = $this->get(BlogRepository::class);
459  $querySettings = new ‪Typo3QuerySettings(new ‪Context(), $this->get(ConfigurationManagerInterface::class));
460  $querySettings->setRespectStoragePage(false);
461  $querySettings->setIgnoreEnableFields(false);
462  $querySettings->setIncludeDeleted(false);
463  $query = $blogRepository->createQuery();
464  $query->setQuerySettings($querySettings);
465 
466  $queryBuilder = $typo3DbQueryParser->convertQueryToDoctrineQueryBuilder($query);
467 
468  $compositeExpression = $queryBuilder->getWhere();
469  self::assertStringContainsString('hidden', (string)$compositeExpression);
470  self::assertStringContainsString('deleted', (string)$compositeExpression);
471  }
472 
473  #[Test]
475  {
476  $frontendTypoScript = new ‪FrontendTypoScript(new ‪RootNode(), [], [], []);
477  $frontendTypoScript->setSetupArray([]);
478  ‪$GLOBALS['TYPO3_REQUEST'] = (new ‪ServerRequest())
479  ->withAttribute('applicationType', ‪SystemEnvironmentBuilder::REQUESTTYPE_FE)
480  ->withAttribute('frontend.typoscript', $frontendTypoScript);
481  $typo3DbQueryParser = $this->get(Typo3DbQueryParser::class);
482  $blogRepository = $this->get(BlogRepository::class);
483  $querySettings = new ‪Typo3QuerySettings(new ‪Context(), $this->get(ConfigurationManagerInterface::class));
484  $querySettings->setRespectStoragePage(false);
485  $querySettings->setIgnoreEnableFields(true);
486  $querySettings->setIncludeDeleted(true);
487  $query = $blogRepository->createQuery();
488  $query->setQuerySettings($querySettings);
489 
490  $queryBuilder = $typo3DbQueryParser->convertQueryToDoctrineQueryBuilder($query);
491 
492  $compositeExpression = $queryBuilder->getWhere();
493  self::assertStringNotContainsString('hidden', (string)$compositeExpression);
494  self::assertStringNotContainsString('deleted', (string)$compositeExpression);
495  }
496 
497  #[Test]
499  {
500  $frontendTypoScript = new ‪FrontendTypoScript(new ‪RootNode(), [], [], []);
501  $frontendTypoScript->setSetupArray([]);
502  ‪$GLOBALS['TYPO3_REQUEST'] = (new ‪ServerRequest())
503  ->withAttribute('applicationType', ‪SystemEnvironmentBuilder::REQUESTTYPE_FE)
504  ->withAttribute('frontend.typoscript', $frontendTypoScript);
505  $typo3DbQueryParser = $this->get(Typo3DbQueryParser::class);
506  $blogRepository = $this->get(BlogRepository::class);
507  $querySettings = new ‪Typo3QuerySettings(new ‪Context(), $this->get(ConfigurationManagerInterface::class));
508  $querySettings->setRespectStoragePage(false);
509  $querySettings->setIgnoreEnableFields(true);
510  $querySettings->setIncludeDeleted(false);
511  $query = $blogRepository->createQuery();
512  $query->setQuerySettings($querySettings);
513 
514  $queryBuilder = $typo3DbQueryParser->convertQueryToDoctrineQueryBuilder($query);
515 
516  $compositeExpression = $queryBuilder->getWhere();
517  self::assertStringNotContainsString('hidden', (string)$compositeExpression);
518  self::assertStringContainsString('deleted', (string)$compositeExpression);
519  }
520 
521  #[Test]
523  {
524  $frontendTypoScript = new ‪FrontendTypoScript(new ‪RootNode(), [], [], []);
525  $frontendTypoScript->setSetupArray([]);
526  ‪$GLOBALS['TYPO3_REQUEST'] = (new ‪ServerRequest())
527  ->withAttribute('applicationType', ‪SystemEnvironmentBuilder::REQUESTTYPE_FE)
528  ->withAttribute('frontend.typoscript', $frontendTypoScript);
529  $typo3DbQueryParser = $this->get(Typo3DbQueryParser::class);
530  $blogRepository = $this->get(BlogRepository::class);
531  $querySettings = new ‪Typo3QuerySettings(new ‪Context(), $this->get(ConfigurationManagerInterface::class));
532  $querySettings->setRespectStoragePage(false);
533  $querySettings->setIgnoreEnableFields(true);
534  $querySettings->setEnableFieldsToBeIgnored(['fe_group']);
535  $querySettings->setIncludeDeleted(false);
536  $query = $blogRepository->createQuery();
537  $query->setQuerySettings($querySettings);
538 
539  $queryBuilder = $typo3DbQueryParser->convertQueryToDoctrineQueryBuilder($query);
540 
541  $compositeExpression = $queryBuilder->getWhere();
542  self::assertStringNotContainsString('fe_group', (string)$compositeExpression);
543  self::assertStringContainsString('hidden', (string)$compositeExpression);
544  self::assertStringContainsString('deleted', (string)$compositeExpression);
545  }
546 
547  #[Test]
549  {
550  $frontendTypoScript = new ‪FrontendTypoScript(new ‪RootNode(), [], [], []);
551  $frontendTypoScript->setSetupArray([]);
552  ‪$GLOBALS['TYPO3_REQUEST'] = (new ‪ServerRequest())
553  ->withAttribute('applicationType', ‪SystemEnvironmentBuilder::REQUESTTYPE_FE)
554  ->withAttribute('frontend.typoscript', $frontendTypoScript);
555  $typo3DbQueryParser = $this->get(Typo3DbQueryParser::class);
556  $blogRepository = $this->get(BlogRepository::class);
557  $querySettings = new ‪Typo3QuerySettings(new ‪Context(), $this->get(ConfigurationManagerInterface::class));
558  $querySettings->setRespectStoragePage(false);
559  $querySettings->setIgnoreEnableFields(false);
560  $querySettings->setIncludeDeleted(false);
561  $query = $blogRepository->createQuery();
562  $query->setQuerySettings($querySettings);
563 
564  $queryBuilder = $typo3DbQueryParser->convertQueryToDoctrineQueryBuilder($query);
565 
566  $compositeExpression = $queryBuilder->getWhere();
567  self::assertStringContainsString('fe_group', (string)$compositeExpression);
568  self::assertStringContainsString('hidden', (string)$compositeExpression);
569  self::assertStringContainsString('deleted', (string)$compositeExpression);
570  }
571 
572  #[Test]
574  {
575  ‪$GLOBALS['TCA']['tx_blogexample_domain_model_blog']['ctrl']['enablecolumns']['endtime'] = 'endtime_column';
576  $frontendTypoScript = new ‪FrontendTypoScript(new ‪RootNode(), [], [], []);
577  $frontendTypoScript->setSetupArray([]);
578  ‪$GLOBALS['TYPO3_REQUEST'] = (new ‪ServerRequest())
579  ->withAttribute('applicationType', ‪SystemEnvironmentBuilder::REQUESTTYPE_FE)
580  ->withAttribute('frontend.typoscript', $frontendTypoScript);
581  $typo3DbQueryParser = $this->get(Typo3DbQueryParser::class);
582  $blogRepository = $this->get(BlogRepository::class);
583  $dateAspect = new ‪DateTimeAspect(new \DateTimeImmutable('3.1.2016'));
584  $context = new ‪Context();
585  $context->setAspect('date', $dateAspect);
586  GeneralUtility::setSingletonInstance(Context::class, $context);
587  $querySettings = new ‪Typo3QuerySettings(new ‪Context(), $this->get(ConfigurationManagerInterface::class));
588  $querySettings->setRespectStoragePage(false);
589  $query = $blogRepository->createQuery();
590  $query->setQuerySettings($querySettings);
591 
592  $queryBuilder = $typo3DbQueryParser->convertQueryToDoctrineQueryBuilder($query);
593 
594  $compositeExpression = $queryBuilder->getWhere();
595  self::assertMatchesRegularExpression('/endtime_column. = 0\‍) OR \‍(.*endtime_column. > 1451779200/', (string)$compositeExpression);
596  }
597 
598  #[Test]
600  {
601  // simulate time for backend enable fields
602  ‪$GLOBALS['SIM_ACCESS_TIME'] = 1451779200;
603  ‪$GLOBALS['TCA']['tx_blogexample_domain_model_blog']['ctrl']['enablecolumns']['endtime'] = 'endtime_column';
604  $frontendTypoScript = new ‪FrontendTypoScript(new ‪RootNode(), [], [], []);
605  $frontendTypoScript->setSetupArray([]);
606  ‪$GLOBALS['TYPO3_REQUEST'] = (new ‪ServerRequest())
607  ->withAttribute('applicationType', ‪SystemEnvironmentBuilder::REQUESTTYPE_BE);
608  $typo3DbQueryParser = $this->get(Typo3DbQueryParser::class);
609  $blogRepository = $this->get(BlogRepository::class);
610  $context = new ‪Context();
611  $querySettings = new ‪Typo3QuerySettings($context, $this->get(ConfigurationManagerInterface::class));
612  $querySettings->setRespectStoragePage(false);
613  $query = $blogRepository->createQuery();
614  $query->setQuerySettings($querySettings);
615 
616  $queryBuilder = $typo3DbQueryParser->convertQueryToDoctrineQueryBuilder($query);
617 
618  $compositeExpression = $queryBuilder->getWhere();
619  self::assertMatchesRegularExpression('/endtime_column. = 0\‍) OR \‍(.*endtime_column. > 1451779200/', (string)$compositeExpression);
620  }
621 
622  #[Test]
624  {
625  $frontendTypoScript = new ‪FrontendTypoScript(new ‪RootNode(), [], [], []);
626  $frontendTypoScript->setSetupArray([]);
627  ‪$GLOBALS['TYPO3_REQUEST'] = (new ‪ServerRequest())
628  ->withAttribute('applicationType', ‪SystemEnvironmentBuilder::REQUESTTYPE_FE)
629  ->withAttribute('frontend.typoscript', $frontendTypoScript);
630  $typo3DbQueryParser = $this->get(Typo3DbQueryParser::class);
631  $blogRepository = $this->get(BlogRepository::class);
632  $context = new ‪Context();
633  $querySettings = new ‪Typo3QuerySettings($context, $this->get(ConfigurationManagerInterface::class));
634  $querySettings->setRespectStoragePage(false);
635  $querySettings->setIgnoreEnableFields(false);
636  $querySettings->setIncludeDeleted(true);
637 
638  $query = $blogRepository->createQuery();
639  $query->setQuerySettings($querySettings);
640 
641  $this->expectException(InconsistentQuerySettingsException::class);
642  $this->expectExceptionCode(1460975922);
643 
644  $typo3DbQueryParser->convertQueryToDoctrineQueryBuilder($query);
645  }
646 
648  {
649  yield 'set Pid to zero if rootLevel = 1' => [
650  'rootLevel' => 1,
651  'expectedSql' => '/pid. = 0/',
652  'storagePageIds' => [42, 27],
653  ];
654 
655  yield 'set Pid to given Pids if rootLevel = 0' => [
656  'rootLevel' => 0,
657  'expectedSql' => '/pid. IN \‍(42, 27\‍)/',
658  'storagePageIds' => [42, 27],
659  ];
660 
661  yield 'add 0 to given Pids if rootLevel = -1' => [
662  'rootLevel' => -1,
663  'expectedSql' => '/pid. IN \‍(42, 27, 0\‍)/',
664  'storagePageIds' => [42, 27],
665  ];
666 
667  yield 'set Pid to zero if rootLevel = -1 and no further pids given' => [
668  'rootLevel' => -1,
669  'expectedSql' => '/pid. = 0/',
670  'storagePageIds' => [],
671  ];
672 
673  yield 'set no statement for invalid configuration' => [
674  'rootLevel' => 2,
675  'expectedSql' => '//',
676  'storagePageIds' => [42, 27],
677  ];
678  }
679 
680  #[DataProvider('addPageIdStatementSetsPidToZeroIfTableDeclaresRootLevelDataProvider')]
681  #[Test]
682  public function ‪addPageIdStatementSetsPidToZeroIfTableDeclaresRootLevel(int $rootLevel, string $expectedSql, array $storagePageIds): void
683  {
684  ‪$GLOBALS['TCA']['tx_blogexample_domain_model_blog']['ctrl'] = [
685  'rootLevel' => $rootLevel,
686  ];
687  $frontendTypoScript = new ‪FrontendTypoScript(new ‪RootNode(), [], [], []);
688  $frontendTypoScript->setSetupArray([]);
689  ‪$GLOBALS['TYPO3_REQUEST'] = (new ‪ServerRequest())
690  ->withAttribute('applicationType', ‪SystemEnvironmentBuilder::REQUESTTYPE_FE)
691  ->withAttribute('frontend.typoscript', $frontendTypoScript);
692  $typo3DbQueryParser = $this->get(Typo3DbQueryParser::class);
693  $blogRepository = $this->get(BlogRepository::class);
694  $context = new ‪Context();
695  $querySettings = new ‪Typo3QuerySettings($context, $this->get(ConfigurationManagerInterface::class));
696  $querySettings->setStoragePageIds($storagePageIds);
697  $query = $blogRepository->createQuery();
698  $query->setQuerySettings($querySettings);
699 
700  $queryBuilder = $typo3DbQueryParser->convertQueryToDoctrineQueryBuilder($query);
701 
702  $compositeExpression = $queryBuilder->getWhere();
703  self::assertMatchesRegularExpression($expectedSql, (string)$compositeExpression);
704  }
705 
706  #[Test]
708  {
709  ‪$GLOBALS['TYPO3_REQUEST'] = (new ‪ServerRequest())
710  ->withAttribute('applicationType', ‪SystemEnvironmentBuilder::REQUESTTYPE_BE);
711  $registryEntryRepository = $this->get(RegistryEntryRepository::class);
712  $querySettings = new ‪Typo3QuerySettings(new ‪Context(), $this->get(ConfigurationManagerInterface::class));
713 
714  $query = $registryEntryRepository->createQuery();
715  $query->setQuerySettings($querySettings);
716 
717  $typo3DbQueryParser = $this->get(Typo3DbQueryParser::class);
718  $queryBuilder = $typo3DbQueryParser->convertQueryToDoctrineQueryBuilder($query);
719 
720  $compositeExpression = $queryBuilder->getWhere();
721  self::assertStringNotContainsString('hidden', (string)$compositeExpression);
722  self::assertStringNotContainsString('deleted', (string)$compositeExpression);
723  }
724 
725  #[Test]
727  {
728  $this->importCSVDataSet(__DIR__ . '/Fixtures/Typo3DbQueryParserTestImport.csv');
729  $frontendTypoScript = new ‪FrontendTypoScript(new ‪RootNode(), [], [], []);
730  $frontendTypoScript->setSetupArray([]);
731  ‪$GLOBALS['TYPO3_REQUEST'] = (new ‪ServerRequest())
732  ->withAttribute('applicationType', ‪SystemEnvironmentBuilder::REQUESTTYPE_FE)
733  ->withAttribute('frontend.typoscript', $frontendTypoScript);
734  $blogRepository = $this->get(BlogRepository::class);
735  $query = $blogRepository->createQuery();
736  $query->getQuerySettings()->setRespectStoragePage(false);
737 
738  $query->matching($query->like('title', '%BlOg%'));
739  self::assertCount(2, $query->execute());
740  }
741 }
‪TYPO3\CMS\Extbase\Tests\Functional\Persistence\Generic\Storage\Typo3DbQueryParserTest\visibilityConstraintStatementGenerationThrowsExceptionIfTheQuerySettingsAreInconsistent
‪visibilityConstraintStatementGenerationThrowsExceptionIfTheQuerySettingsAreInconsistent()
Definition: Typo3DbQueryParserTest.php:623
‪TYPO3\CMS\Extbase\Tests\Functional\Persistence\Generic\Storage\Typo3DbQueryParserTest\convertQueryToDoctrineQueryBuilderThrowsExceptionOnNotImplementedConstraint
‪convertQueryToDoctrineQueryBuilderThrowsExceptionOnNotImplementedConstraint()
Definition: Typo3DbQueryParserTest.php:68
‪TYPO3\CMS\Core\Context\LanguageAspect\OVERLAYS_MIXED
‪const OVERLAYS_MIXED
Definition: LanguageAspect.php:75
‪TYPO3\CMS\Extbase\Tests\Functional\Persistence\Generic\Storage\Typo3DbQueryParserTest\expressionIsGeneratedForDoNotIgnoreEnableFieldsAndDoNotIncludeDeletedInFrontendContext
‪expressionIsGeneratedForDoNotIgnoreEnableFieldsAndDoNotIncludeDeletedInFrontendContext()
Definition: Typo3DbQueryParserTest.php:548
‪TYPO3\CMS\Extbase\Tests\Functional\Persistence\Generic\Storage\Typo3DbQueryParserTest\convertQueryToDoctrineQueryBuilderAddsAndConstraint
‪convertQueryToDoctrineQueryBuilderAddsAndConstraint()
Definition: Typo3DbQueryParserTest.php:135
‪TYPO3\CMS\Extbase\Persistence\QueryInterface
Definition: QueryInterface.php:30
‪TYPO3\CMS\Extbase\Tests\Functional\Persistence\Generic\Storage\Typo3DbQueryParserTest\convertQueryToDoctrineQueryBuilderAddsNotConstraint
‪convertQueryToDoctrineQueryBuilderAddsNotConstraint()
Definition: Typo3DbQueryParserTest.php:113
‪TYPO3\CMS\Core\Core\SystemEnvironmentBuilder
Definition: SystemEnvironmentBuilder.php:41
‪TYPO3\CMS\Extbase\Tests\Functional\Persistence\Generic\Storage\Typo3DbQueryParserTest\languageStatementWorksForNonDefaultLanguage
‪languageStatementWorksForNonDefaultLanguage()
Definition: Typo3DbQueryParserTest.php:205
‪TYPO3\CMS\Extbase\Persistence\QueryInterface\ORDER_DESCENDING
‪const ORDER_DESCENDING
Definition: QueryInterface.php:100
‪TYPO3\CMS\Extbase\Persistence\Generic\Qom\SourceInterface
Definition: SourceInterface.php:23
‪TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface
Definition: ConfigurationManagerInterface.php:27
‪TYPO3\CMS\Core\Core\SystemEnvironmentBuilder\REQUESTTYPE_BE
‪const REQUESTTYPE_BE
Definition: SystemEnvironmentBuilder.php:45
‪TYPO3\CMS\Extbase\Tests\Functional\Persistence\Generic\Storage\Typo3DbQueryParserTest\expressionIsGeneratedForIgnoreOnlyFeGroupAndDoNotIncludeDeletedInFrontendContext
‪expressionIsGeneratedForIgnoreOnlyFeGroupAndDoNotIncludeDeletedInFrontendContext()
Definition: Typo3DbQueryParserTest.php:522
‪TYPO3\CMS\Extbase\Tests\Functional\Persistence\Generic\Storage\Typo3DbQueryParserTest\expressionIsOmittedForIgnoreEnableFieldsAreAndDoNotIncludeDeletedInBackendContext
‪expressionIsOmittedForIgnoreEnableFieldsAreAndDoNotIncludeDeletedInBackendContext()
Definition: Typo3DbQueryParserTest.php:388
‪TYPO3\CMS\Extbase\Tests\Functional\Persistence\Generic\Storage\Typo3DbQueryParserTest\convertQueryToDoctrineQueryBuilderAddsOrConstraint
‪convertQueryToDoctrineQueryBuilderAddsOrConstraint()
Definition: Typo3DbQueryParserTest.php:161
‪TYPO3\CMS\Extbase\Tests\Functional\Persistence\Generic\Storage\Typo3DbQueryParserTest\expressionIsGeneratedForIgnoreEnableFieldsAndDoNotIncludeDeletedInBackendContext
‪expressionIsGeneratedForIgnoreEnableFieldsAndDoNotIncludeDeletedInBackendContext()
Definition: Typo3DbQueryParserTest.php:410
‪TYPO3\CMS\Extbase\Tests\Functional\Persistence\Generic\Storage\Typo3DbQueryParserTest\addGetLanguageStatementWorksForForeignLanguageWithSubselectionWithoutDeleteStatementReturned
‪addGetLanguageStatementWorksForForeignLanguageWithSubselectionWithoutDeleteStatementReturned()
Definition: Typo3DbQueryParserTest.php:247
‪TYPO3\CMS\Core\Context\Context
Definition: Context.php:54
‪TYPO3\CMS\Extbase\Tests\Functional\Persistence\Generic\Storage\Typo3DbQueryParserTest\expressionIsOmittedForIgnoreEnableFieldsAreAndDoNotIncludeDeletedInFrontendContext
‪expressionIsOmittedForIgnoreEnableFieldsAreAndDoNotIncludeDeletedInFrontendContext()
Definition: Typo3DbQueryParserTest.php:474
‪TYPO3\CMS\Extbase\Tests\Functional\Persistence\Generic\Storage
Definition: Typo3DbBackendTest.php:18
‪TYPO3\CMS\Extbase\Tests\Functional\Persistence\Generic\Storage\Typo3DbQueryParserTest\orderStatementGenerationThrowsExceptionOnUnsupportedOrder
‪orderStatementGenerationThrowsExceptionOnUnsupportedOrder()
Definition: Typo3DbQueryParserTest.php:337
‪TYPO3\CMS\Extbase\Tests\Functional\Persistence\Generic\Storage\Typo3DbQueryParserTest\languageStatementWorksForDefaultLanguage
‪languageStatementWorksForDefaultLanguage()
Definition: Typo3DbQueryParserTest.php:187
‪TYPO3\CMS\Extbase\Tests\Functional\Persistence\Generic\Storage\Typo3DbQueryParserTest\$testExtensionsToLoad
‪array $testExtensionsToLoad
Definition: Typo3DbQueryParserTest.php:44
‪TYPO3\CMS\Extbase\Persistence\Generic\Exception\InconsistentQuerySettingsException
Definition: InconsistentQuerySettingsException.php:25
‪TYPO3\CMS\Extbase\Persistence\QueryInterface\ORDER_ASCENDING
‪const ORDER_ASCENDING
Definition: QueryInterface.php:99
‪TYPO3\CMS\Extbase\Tests\Functional\Persistence\Generic\Storage\Typo3DbQueryParserTest\addGetLanguageStatementWorksInBackendContextWithSubselectionTakesDeleteStatementIntoAccountIfNecessary
‪addGetLanguageStatementWorksInBackendContextWithSubselectionTakesDeleteStatementIntoAccountIfNecessary()
Definition: Typo3DbQueryParserTest.php:292
‪TYPO3\CMS\Extbase\Tests\Functional\Persistence\Generic\Storage\Typo3DbQueryParserTest\generatedLikeExpressionIsCaseInsensitive
‪generatedLikeExpressionIsCaseInsensitive()
Definition: Typo3DbQueryParserTest.php:726
‪TYPO3\CMS\Extbase\Tests\Functional\Persistence\Generic\Storage\Typo3DbQueryParserTest\respectEnableFieldsSettingGeneratesCorrectStatementWithOnlyEndTimeInBackendContext
‪respectEnableFieldsSettingGeneratesCorrectStatementWithOnlyEndTimeInBackendContext()
Definition: Typo3DbQueryParserTest.php:599
‪TYPO3\CMS\Extbase\Tests\Functional\Persistence\Generic\Storage\Typo3DbQueryParserTest\addPageIdStatementSetsPidToZeroIfTableDeclaresRootLevel
‪addPageIdStatementSetsPidToZeroIfTableDeclaresRootLevel(int $rootLevel, string $expectedSql, array $storagePageIds)
Definition: Typo3DbQueryParserTest.php:682
‪TYPO3\CMS\Core\Http\ServerRequest
Definition: ServerRequest.php:39
‪TYPO3\CMS\Extbase\Tests\Functional\Persistence\Generic\Storage\Typo3DbQueryParserTest\convertQueryToDoctrineQueryBuilderDoesNotAddAndWhereWithEmptyConstraint
‪convertQueryToDoctrineQueryBuilderDoesNotAddAndWhereWithEmptyConstraint()
Definition: Typo3DbQueryParserTest.php:49
‪TYPO3\CMS\Extbase\Tests\Functional\Persistence\Generic\Storage\Typo3DbQueryParserTest\orderStatementGenerationWorksWithMultipleOrderings
‪orderStatementGenerationWorksWithMultipleOrderings()
Definition: Typo3DbQueryParserTest.php:361
‪TYPO3\CMS\Extbase\Tests\Functional\Persistence\Generic\Storage\Typo3DbQueryParserTest\languageStatementWorksInBackendContext
‪languageStatementWorksInBackendContext()
Definition: Typo3DbQueryParserTest.php:228
‪TYPO3\CMS\Extbase\Tests\Functional\Persistence\Generic\Storage\Typo3DbQueryParserTest\addGetLanguageStatementWorksForForeignLanguageWithSubselectionTakesDeleteStatementIntoAccountIfNecessary
‪addGetLanguageStatementWorksForForeignLanguageWithSubselectionTakesDeleteStatementIntoAccountIfNecessary()
Definition: Typo3DbQueryParserTest.php:268
‪TYPO3\CMS\Core\Context\LanguageAspect
Definition: LanguageAspect.php:57
‪TYPO3\CMS\Extbase\Tests\Functional\Persistence\Generic\Storage\Typo3DbQueryParserTest\convertQueryToDoctrineQueryBuilderAddsSimpleAndWhere
‪convertQueryToDoctrineQueryBuilderAddsSimpleAndWhere()
Definition: Typo3DbQueryParserTest.php:91
‪TYPO3\CMS\Extbase\Persistence\Generic\Exception\UnsupportedOrderException
Definition: UnsupportedOrderException.php:25
‪TYPO3\CMS\Extbase\Tests\Functional\Persistence\Generic\Storage\Typo3DbQueryParserTest\expressionIsGeneratedForDoNotIgnoreEnableFieldsAndIncludeDeletedInBackendContext
‪expressionIsGeneratedForDoNotIgnoreEnableFieldsAndIncludeDeletedInBackendContext()
Definition: Typo3DbQueryParserTest.php:432
‪TYPO3\CMS\Extbase\Tests\Functional\Persistence\Generic\Storage\Typo3DbQueryParserTest\orderStatementGenerationWorks
‪orderStatementGenerationWorks()
Definition: Typo3DbQueryParserTest.php:313
‪TYPO3\CMS\Extbase\Tests\Functional\Persistence\Generic\Storage\Typo3DbQueryParserTest\expressionIsGeneratedForIgnoreEnableFieldsAndDoNotIncludeDeletedInFrontendContext
‪expressionIsGeneratedForIgnoreEnableFieldsAndDoNotIncludeDeletedInFrontendContext()
Definition: Typo3DbQueryParserTest.php:498
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:25
‪TYPO3\CMS\Core\TypoScript\AST\Node\RootNode
Definition: RootNode.php:26
‪TYPO3\CMS\Extbase\Persistence\Generic\Qom\ConstraintInterface
Definition: ConstraintInterface.php:27
‪TYPO3Tests\BlogExample\Domain\Repository\RegistryEntryRepository
Definition: RegistryEntryRepository.php:27
‪TYPO3Tests\BlogExample\Domain\Repository\BlogRepository
Definition: BlogRepository.php:29
‪TYPO3\CMS\Core\Context\LanguageAspect\OVERLAYS_OFF
‪const OVERLAYS_OFF
Definition: LanguageAspect.php:74
‪TYPO3\CMS\Extbase\Tests\Functional\Persistence\Generic\Storage\Typo3DbQueryParserTest
Definition: Typo3DbQueryParserTest.php:43
‪TYPO3\CMS\Core\TypoScript\FrontendTypoScript
Definition: FrontendTypoScript.php:30
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:52
‪TYPO3\CMS\Core\Core\SystemEnvironmentBuilder\REQUESTTYPE_FE
‪const REQUESTTYPE_FE
Definition: SystemEnvironmentBuilder.php:43
‪TYPO3\CMS\Extbase\Tests\Functional\Persistence\Generic\Storage\Typo3DbQueryParserTest\respectEnableFieldsSettingGeneratesCorrectStatementWithOnlyEndTimeInFrontendContext
‪respectEnableFieldsSettingGeneratesCorrectStatementWithOnlyEndTimeInFrontendContext()
Definition: Typo3DbQueryParserTest.php:573
‪TYPO3\CMS\Extbase\Tests\Functional\Persistence\Generic\Storage\Typo3DbQueryParserTest\expressionIsGeneratedForDoNotIgnoreEnableFieldsAndDoNotIncludeDeletedInBackendContext
‪expressionIsGeneratedForDoNotIgnoreEnableFieldsAndDoNotIncludeDeletedInBackendContext()
Definition: Typo3DbQueryParserTest.php:453
‪TYPO3\CMS\Core\Context\DateTimeAspect
Definition: DateTimeAspect.php:35
‪TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings
Definition: Typo3QuerySettings.php:30
‪TYPO3\CMS\Extbase\Tests\Functional\Persistence\Generic\Storage\Typo3DbQueryParserTest\addPageIdStatementSetsPidToZeroIfTableDeclaresRootLevelDataProvider
‪static addPageIdStatementSetsPidToZeroIfTableDeclaresRootLevelDataProvider()
Definition: Typo3DbQueryParserTest.php:647
‪TYPO3\CMS\Extbase\Tests\Functional\Persistence\Generic\Storage\Typo3DbQueryParserTest\tcaWithoutCtrlCreatesAValidSQLStatement
‪tcaWithoutCtrlCreatesAValidSQLStatement()
Definition: Typo3DbQueryParserTest.php:707
‪TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbQueryParser
Definition: Typo3DbQueryParser.php:72