TYPO3 CMS  TYPO3_8-7
Typo3QuerySettings.php
Go to the documentation of this file.
1 <?php
3 
4 /*
5  * This file is part of the TYPO3 CMS project.
6  *
7  * It is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU General Public License, either version 2
9  * of the License, or any later version.
10  *
11  * For the full copyright and license information, please read the
12  * LICENSE.txt file that was distributed with this source code.
13  *
14  * The TYPO3 project - inspiring people to share!
15  */
16 
20 
28 {
34  protected $respectStoragePage = true;
35 
41  protected $storagePageIds = [];
42 
50  protected $ignoreEnableFields = false;
51 
58  protected $enableFieldsToBeIgnored = [];
59 
65  protected $includeDeleted = false;
66 
72  protected $respectSysLanguage = true;
73 
79  protected $languageOverlayMode = true;
80 
86  protected $languageMode = null;
87 
93  protected $languageUid = 0;
94 
101  protected $usePreparedStatement = false;
102 
109  protected $useQueryCache = true;
110 
115  public function initializeObject()
116  {
118  $objectManager = GeneralUtility::makeInstance(ObjectManager::class);
120  $configurationManager = $objectManager->get(ConfigurationManagerInterface::class);
121  if (TYPO3_MODE === 'BE' && $configurationManager->isFeatureEnabled('ignoreAllEnableFieldsInBe')) {
122  $this->setIgnoreEnableFields(true);
123  }
124 
125  // TYPO3 CMS language defaults
126  $this->setLanguageUid(0);
127  $this->setLanguageMode(null);
128  $this->setLanguageOverlayMode(false);
129 
130  // Set correct language uid for frontend handling
131  if (isset($GLOBALS['TSFE']) && is_object($GLOBALS['TSFE'])) {
132  $this->setLanguageUid((int)$GLOBALS['TSFE']->sys_language_content);
133  $this->setLanguageOverlayMode($GLOBALS['TSFE']->sys_language_contentOL ?: false);
134  $this->setLanguageMode($GLOBALS['TSFE']->sys_language_mode ?: null);
135  } elseif ((int)GeneralUtility::_GP('L')) {
136  // Set language from 'L' parameter
137  $this->setLanguageUid((int)GeneralUtility::_GP('L'));
138  }
139  }
140 
149  {
150  $this->respectStoragePage = $respectStoragePage;
151  return $this;
152  }
153 
159  public function getRespectStoragePage()
160  {
162  }
163 
171  public function setStoragePageIds(array $storagePageIds)
172  {
173  $this->storagePageIds = $storagePageIds;
174  return $this;
175  }
176 
182  public function getStoragePageIds()
183  {
184  return $this->storagePageIds;
185  }
186 
193  {
194  $this->respectSysLanguage = $respectSysLanguage;
195  return $this;
196  }
197 
201  public function getRespectSysLanguage()
202  {
204  }
205 
212  {
213  $this->languageOverlayMode = $languageOverlayMode;
214  return $this;
215  }
216 
220  public function getLanguageOverlayMode()
221  {
223  }
224 
230  public function setLanguageMode($languageMode = '')
231  {
232  $this->languageMode = $languageMode;
233  return $this;
234  }
235 
239  public function getLanguageMode()
240  {
241  return $this->languageMode;
242  }
243 
249  public function setLanguageUid($languageUid)
250  {
251  $this->languageUid = $languageUid;
252  return $this;
253  }
254 
258  public function getLanguageUid()
259  {
260  return $this->languageUid;
261  }
262 
274  {
275  $this->ignoreEnableFields = $ignoreEnableFields;
276  return $this;
277  }
278 
288  public function getIgnoreEnableFields()
289  {
291  }
292 
304  {
305  $this->enableFieldsToBeIgnored = $enableFieldsToBeIgnored;
306  return $this;
307  }
308 
316  public function getEnableFieldsToBeIgnored()
317  {
319  }
320 
329  {
330  $this->includeDeleted = $includeDeleted;
331  return $this;
332  }
333 
339  public function getIncludeDeleted()
340  {
341  return $this->includeDeleted;
342  }
343 
350  {
353  return $this;
354  }
355 
360  public function getUsePreparedStatement()
361  {
363  return (bool)$this->usePreparedStatement;
364  }
365 
371  public function useQueryCache($useQueryCache)
372  {
374  $this->useQueryCache = (bool)$useQueryCache;
375  return $this;
376  }
377 
382  public function getUseQueryCache()
383  {
385  return $this->useQueryCache;
386  }
387 }
static makeInstance($className,... $constructorArguments)
if(TYPO3_MODE==='BE') $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tsfebeuserauth.php']['frontendEditingController']['default']