TYPO3 CMS  TYPO3_7-6
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 
100  protected $usePreparedStatement = false;
101 
107  protected $useQueryCache = true;
108 
113  public function initializeObject()
114  {
116  $objectManager = GeneralUtility::makeInstance(ObjectManager::class);
118  $configurationManager = $objectManager->get(ConfigurationManagerInterface::class);
119  if (TYPO3_MODE === 'BE' && $configurationManager->isFeatureEnabled('ignoreAllEnableFieldsInBe')) {
120  $this->setIgnoreEnableFields(true);
121  }
122 
123  // TYPO3 CMS language defaults
124  $this->setLanguageUid(0);
125  $this->setLanguageMode(null);
126  $this->setLanguageOverlayMode(false);
127 
128  // Set correct language uid for frontend handling
129  if (isset($GLOBALS['TSFE']) && is_object($GLOBALS['TSFE'])) {
130  $this->setLanguageUid((int)$GLOBALS['TSFE']->sys_language_content);
131  $this->setLanguageOverlayMode($GLOBALS['TSFE']->sys_language_contentOL ?: false);
132  $this->setLanguageMode($GLOBALS['TSFE']->sys_language_mode ?: null);
133  } elseif ((int)GeneralUtility::_GP('L')) {
134  // Set language from 'L' parameter
135  $this->setLanguageUid((int)GeneralUtility::_GP('L'));
136  }
137  }
138 
147  {
148  $this->respectStoragePage = $respectStoragePage;
149  return $this;
150  }
151 
157  public function getRespectStoragePage()
158  {
160  }
161 
169  public function setStoragePageIds(array $storagePageIds)
170  {
171  $this->storagePageIds = $storagePageIds;
172  return $this;
173  }
174 
180  public function getStoragePageIds()
181  {
182  return $this->storagePageIds;
183  }
184 
191  {
192  $this->respectSysLanguage = $respectSysLanguage;
193  return $this;
194  }
195 
199  public function getRespectSysLanguage()
200  {
202  }
203 
210  {
211  $this->languageOverlayMode = $languageOverlayMode;
212  return $this;
213  }
214 
218  public function getLanguageOverlayMode()
219  {
221  }
222 
228  public function setLanguageMode($languageMode = '')
229  {
230  $this->languageMode = $languageMode;
231  return $this;
232  }
233 
237  public function getLanguageMode()
238  {
239  return $this->languageMode;
240  }
241 
247  public function setLanguageUid($languageUid)
248  {
249  $this->languageUid = $languageUid;
250  return $this;
251  }
252 
256  public function getLanguageUid()
257  {
258  return $this->languageUid;
259  }
260 
272  {
273  $this->ignoreEnableFields = $ignoreEnableFields;
274  return $this;
275  }
276 
286  public function getIgnoreEnableFields()
287  {
289  }
290 
302  {
303  $this->enableFieldsToBeIgnored = $enableFieldsToBeIgnored;
304  return $this;
305  }
306 
314  public function getEnableFieldsToBeIgnored()
315  {
317  }
318 
327  {
328  $this->includeDeleted = $includeDeleted;
329  return $this;
330  }
331 
337  public function getIncludeDeleted()
338  {
339  return $this->includeDeleted;
340  }
341 
347  {
349  return $this;
350  }
351 
355  public function getUsePreparedStatement()
356  {
357  return (bool)$this->usePreparedStatement;
358  }
359 
364  public function useQueryCache($useQueryCache)
365  {
366  $this->useQueryCache = (bool)$useQueryCache;
367  return $this;
368  }
369 
373  public function getUseQueryCache()
374  {
375  return $this->useQueryCache;
376  }
377 }
if(TYPO3_MODE==='BE') $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tsfebeuserauth.php']['frontendEditingController']['default']