TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
Typo3QuerySettings Class Reference
Inheritance diagram for Typo3QuerySettings:
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 25 of file Typo3QuerySettings.php.

Member Function Documentation

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 QuerySettingsInterface.

Definition at line 314 of file Typo3QuerySettings.php.

References Typo3QuerySettings\$enableFieldsToBeIgnored.

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 QuerySettingsInterface.

Definition at line 286 of file Typo3QuerySettings.php.

References Typo3QuerySettings\$ignoreEnableFields.

getIncludeDeleted ( )

Returns if the query should return objects that are deleted.

Returns
bool

Implements QuerySettingsInterface.

Definition at line 337 of file Typo3QuerySettings.php.

References Typo3QuerySettings\$includeDeleted.

getLanguageMode ( )
Returns
string NULL, "content_fallback", "strict" or "ignore"

Implements QuerySettingsInterface.

Definition at line 237 of file Typo3QuerySettings.php.

References Typo3QuerySettings\$languageMode.

getLanguageOverlayMode ( )
Returns
mixed TRUE, FALSE or "hideNonTranslated"

Implements QuerySettingsInterface.

Definition at line 218 of file Typo3QuerySettings.php.

References Typo3QuerySettings\$languageOverlayMode.

getLanguageUid ( )
Returns
int

Implements QuerySettingsInterface.

Definition at line 256 of file Typo3QuerySettings.php.

References Typo3QuerySettings\$languageUid.

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 QuerySettingsInterface.

Definition at line 157 of file Typo3QuerySettings.php.

References Typo3QuerySettings\$respectStoragePage.

getRespectSysLanguage ( )
Returns
bool TRUE if TYPO3 language settings are to be applied

Implements QuerySettingsInterface.

Definition at line 199 of file Typo3QuerySettings.php.

References Typo3QuerySettings\$respectSysLanguage.

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 QuerySettingsInterface.

Definition at line 180 of file Typo3QuerySettings.php.

References Typo3QuerySettings\$storagePageIds.

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 358 of file Typo3QuerySettings.php.

References Typo3QuerySettings\$usePreparedStatement, and GeneralUtility\logDeprecatedFunction().

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 380 of file Typo3QuerySettings.php.

References Typo3QuerySettings\$useQueryCache, and GeneralUtility\logDeprecatedFunction().

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 QuerySettingsInterface.

Definition at line 301 of file Typo3QuerySettings.php.

References Typo3QuerySettings\$enableFieldsToBeIgnored.

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 QuerySettingsInterface.

Definition at line 271 of file Typo3QuerySettings.php.

References Typo3QuerySettings\$ignoreEnableFields.

setIncludeDeleted (   $includeDeleted)

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

Parameters
bool$includeDeleted
Returns
QuerySettingsInterface

Implements QuerySettingsInterface.

Definition at line 326 of file Typo3QuerySettings.php.

References Typo3QuerySettings\$includeDeleted.

setLanguageMode (   $languageMode = '')
Parameters
string$languageModeNULL, "content_fallback", "strict" or "ignore"
Returns
QuerySettingsInterface instance of $this to allow method chaining

Implements QuerySettingsInterface.

Definition at line 228 of file Typo3QuerySettings.php.

References Typo3QuerySettings\$languageMode.

setLanguageOverlayMode (   $languageOverlayMode = false)
Parameters
mixed$languageOverlayModeTRUE, FALSE or "hideNonTranslated"
Returns
QuerySettingsInterface instance of $this to allow method chaining

Implements QuerySettingsInterface.

Definition at line 209 of file Typo3QuerySettings.php.

References Typo3QuerySettings\$languageOverlayMode.

setLanguageUid (   $languageUid)
Parameters
int$languageUid
Returns
QuerySettingsInterface instance of $this to allow method chaining

Implements QuerySettingsInterface.

Definition at line 247 of file Typo3QuerySettings.php.

References Typo3QuerySettings\$languageUid.

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 QuerySettingsInterface.

Definition at line 146 of file Typo3QuerySettings.php.

References Typo3QuerySettings\$respectStoragePage.

setRespectSysLanguage (   $respectSysLanguage)
Parameters
bool$respectSysLanguageTRUE if TYPO3 language settings are to be applied
Returns
QuerySettingsInterface

Implements QuerySettingsInterface.

Definition at line 190 of file Typo3QuerySettings.php.

References Typo3QuerySettings\$respectSysLanguage.

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 QuerySettingsInterface.

Definition at line 169 of file Typo3QuerySettings.php.

References Typo3QuerySettings\$storagePageIds.

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 347 of file Typo3QuerySettings.php.

References Typo3QuerySettings\$usePreparedStatement, and GeneralUtility\logDeprecatedFunction().

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 369 of file Typo3QuerySettings.php.

References Typo3QuerySettings\$useQueryCache, and GeneralUtility\logDeprecatedFunction().

Member Data Documentation

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