TYPO3 CMS  TYPO3_8-7
TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings Class Reference
Inheritance diagram for TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings:
TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface

Public Member Functions

 setRespectStoragePage ($respectStoragePage)
 
 getRespectStoragePage ()
 
 setStoragePageIds (array $storagePageIds)
 
 getStoragePageIds ()
 
 setRespectSysLanguage ($respectSysLanguage)
 
 getRespectSysLanguage ()
 
 setLanguageOverlayMode ($languageOverlayMode=false)
 
 getLanguageOverlayMode ()
 
 setLanguageMode ($languageMode='')
 
 getLanguageMode ()
 
 setLanguageUid ($languageUid)
 
 getLanguageUid ()
 
 setIgnoreEnableFields ($ignoreEnableFields)
 
 getIgnoreEnableFields ()
 
 setEnableFieldsToBeIgnored ($enableFieldsToBeIgnored)
 
 getEnableFieldsToBeIgnored ()
 
 setIncludeDeleted ($includeDeleted)
 
 getIncludeDeleted ()
 
 usePreparedStatement ($usePreparedStatement)
 
 getUsePreparedStatement ()
 
 useQueryCache ($useQueryCache)
 
 getUseQueryCache ()
 

Protected Attributes

 $respectStoragePage = true
 
 $storagePageIds = []
 
 $ignoreEnableFields = false
 
 $enableFieldsToBeIgnored = []
 
 $includeDeleted = false
 
 $respectSysLanguage = true
 
 $languageOverlayMode = true
 
 $languageMode = null
 
 $languageUid = 0
 
 $usePreparedStatement = false
 
 $useQueryCache = true
 

Detailed Description

Query settings. This class is NOT part of the TYPO3.Flow API. It reflects the settings unique to TYPO3 CMS.

Definition at line 27 of file Typo3QuerySettings.php.

Member Function Documentation

◆ getEnableFieldsToBeIgnored()

TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::getEnableFieldsToBeIgnored ( )

An array of column names in the enable columns array (array keys in $GLOBALS['TCA'][$table]['ctrl']['enablecolumns']), to be ignored while building the query statement.

Returns
array
See also
getIgnoreEnableFields()

Implements TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface.

Definition at line 316 of file Typo3QuerySettings.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings\$enableFieldsToBeIgnored.

◆ getIgnoreEnableFields()

TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::getIgnoreEnableFields ( )

The returned value indicates whether all or some enable fields should be ignored.

If TRUE, all enable fields are ignored. If–in addition to this–enableFieldsToBeIgnored is set, only fields specified there are ignored. If FALSE, all enable fields are taken into account, regardless of the enableFieldsToBeIgnored setting.

Returns
bool
See also
getEnableFieldsToBeIgnored()

Implements TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface.

Definition at line 288 of file Typo3QuerySettings.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings\$ignoreEnableFields.

◆ getIncludeDeleted()

TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::getIncludeDeleted ( )

Returns if the query should return objects that are deleted.

Returns
bool

Implements TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface.

Definition at line 339 of file Typo3QuerySettings.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings\$includeDeleted.

◆ getLanguageMode()

TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::getLanguageMode ( )
Returns
string NULL, "content_fallback", "strict" or "ignore"

Implements TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface.

Definition at line 239 of file Typo3QuerySettings.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings\$languageMode.

◆ getLanguageOverlayMode()

TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::getLanguageOverlayMode ( )

◆ getLanguageUid()

TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::getLanguageUid ( )

◆ getRespectStoragePage()

TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::getRespectStoragePage ( )

Returns the state, if the storage page should be respected for the query.

Returns
bool TRUE, if the storage page should be respected; otherwise FALSE.

Implements TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface.

Definition at line 159 of file Typo3QuerySettings.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings\$respectStoragePage.

◆ getRespectSysLanguage()

TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::getRespectSysLanguage ( )
Returns
bool TRUE if TYPO3 language settings are to be applied

Implements TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface.

Definition at line 201 of file Typo3QuerySettings.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings\$respectSysLanguage.

◆ getStoragePageIds()

TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::getStoragePageIds ( )

Returns the pid(s) of the storage page(s) that should be respected for the query.

Returns
array list of integers that each represent a storage page id

Implements TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface.

Definition at line 182 of file Typo3QuerySettings.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings\$storagePageIds.

◆ getUsePreparedStatement()

TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::getUsePreparedStatement ( )
Returns
bool
Deprecated:
since TYPO3 v8, will be removed in TYPO3 9, this option is handled automatically now in the database abstraction

Definition at line 360 of file Typo3QuerySettings.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings\$usePreparedStatement, and TYPO3\CMS\Core\Utility\GeneralUtility\logDeprecatedFunction().

◆ getUseQueryCache()

TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::getUseQueryCache ( )
Returns
bool
Deprecated:
since TYPO3 v8, will be removed in TYPO3 v9, as the database is taking care of query caching

Definition at line 382 of file Typo3QuerySettings.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings\$useQueryCache, and TYPO3\CMS\Core\Utility\GeneralUtility\logDeprecatedFunction().

◆ setEnableFieldsToBeIgnored()

TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::setEnableFieldsToBeIgnored (   $enableFieldsToBeIgnored)

An array of column names in the enable columns array (array keys in $GLOBALS['TCA'][$table]['ctrl']['enablecolumns']), to be ignored while building the query statement. Adding a column name here effectively switches off filtering by this column. This setting is only taken into account if $this->ignoreEnableFields = TRUE.

Parameters
array$enableFieldsToBeIgnored
Returns
QuerySettingsInterface
See also
setIgnoreEnableFields()

Implements TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface.

Definition at line 303 of file Typo3QuerySettings.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings\$enableFieldsToBeIgnored.

◆ setIgnoreEnableFields()

TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::setIgnoreEnableFields (   $ignoreEnableFields)

Sets a flag indicating whether all or some enable fields should be ignored. If TRUE, all enable fields are ignored. If–in addition to this–enableFieldsToBeIgnored is set, only fields specified there are ignored. If FALSE, all enable fields are taken into account, regardless of the enableFieldsToBeIgnored setting.

Parameters
bool$ignoreEnableFields
Returns
QuerySettingsInterface
See also
setEnableFieldsToBeIgnored()

Implements TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface.

Definition at line 273 of file Typo3QuerySettings.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings\$ignoreEnableFields.

◆ setIncludeDeleted()

TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::setIncludeDeleted (   $includeDeleted)

Sets the flag if the query should return objects that are deleted.

Parameters
bool$includeDeleted
Returns
QuerySettingsInterface

Implements TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface.

Definition at line 328 of file Typo3QuerySettings.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings\$includeDeleted.

◆ setLanguageMode()

TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::setLanguageMode (   $languageMode = '')
Parameters
string$languageModeNULL, "content_fallback", "strict" or "ignore"
Returns
QuerySettingsInterface instance of $this to allow method chaining

Implements TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface.

Definition at line 230 of file Typo3QuerySettings.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings\$languageMode.

◆ setLanguageOverlayMode()

TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::setLanguageOverlayMode (   $languageOverlayMode = false)
Parameters
mixed$languageOverlayModeTRUE, FALSE or "hideNonTranslated"
Returns
QuerySettingsInterface instance of $this to allow method chaining

Implements TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface.

Definition at line 211 of file Typo3QuerySettings.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings\$languageOverlayMode.

◆ setLanguageUid()

TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::setLanguageUid (   $languageUid)
Parameters
int$languageUid
Returns
QuerySettingsInterface instance of $this to allow method chaining

Implements TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface.

Definition at line 249 of file Typo3QuerySettings.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings\$languageUid.

◆ setRespectStoragePage()

TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::setRespectStoragePage (   $respectStoragePage)

Sets the flag if the storage page should be respected for the query.

Parameters
bool$respectStoragePageIf TRUE the storage page ID will be determined and the statement will be extended accordingly.
Returns
QuerySettingsInterface

Implements TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface.

Definition at line 148 of file Typo3QuerySettings.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings\$respectStoragePage.

◆ setRespectSysLanguage()

TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::setRespectSysLanguage (   $respectSysLanguage)
Parameters
bool$respectSysLanguageTRUE if TYPO3 language settings are to be applied
Returns
QuerySettingsInterface

Implements TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface.

Definition at line 192 of file Typo3QuerySettings.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings\$respectSysLanguage.

◆ setStoragePageIds()

TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::setStoragePageIds ( array  $storagePageIds)

Sets the pid(s) of the storage page(s) that should be respected for the query.

Parameters
array$storagePageIdsIf given the storage page IDs will be determined and the statement will be extended accordingly.
Returns
QuerySettingsInterface

Implements TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface.

Definition at line 171 of file Typo3QuerySettings.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings\$storagePageIds.

◆ usePreparedStatement()

TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::usePreparedStatement (   $usePreparedStatement)
Parameters
bool$usePreparedStatement
Returns
QuerySettingsInterface
Deprecated:
since TYPO3 v8, will be removed in TYPO3 9, this option is handled automatically now in the database abstraction

Definition at line 349 of file Typo3QuerySettings.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings\$usePreparedStatement, and TYPO3\CMS\Core\Utility\GeneralUtility\logDeprecatedFunction().

◆ useQueryCache()

TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::useQueryCache (   $useQueryCache)
Parameters
bool$useQueryCache
Deprecated:
since TYPO3 v8, will be removed in TYPO3 v9, as the database is taking care of query caching
Returns
QuerySettingsInterface

Definition at line 371 of file Typo3QuerySettings.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings\$useQueryCache, and TYPO3\CMS\Core\Utility\GeneralUtility\logDeprecatedFunction().

Member Data Documentation

◆ $enableFieldsToBeIgnored

TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::$enableFieldsToBeIgnored = []
protected

◆ $ignoreEnableFields

TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::$ignoreEnableFields = false
protected

◆ $includeDeleted

TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::$includeDeleted = false
protected

◆ $languageMode

TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::$languageMode = null
protected

◆ $languageOverlayMode

TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::$languageOverlayMode = true
protected

◆ $languageUid

TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::$languageUid = 0
protected

◆ $respectStoragePage

TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::$respectStoragePage = true
protected

◆ $respectSysLanguage

TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::$respectSysLanguage = true
protected

◆ $storagePageIds

TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::$storagePageIds = []
protected

◆ $usePreparedStatement

TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::$usePreparedStatement = false
protected

◆ $useQueryCache

TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::$useQueryCache = true
protected