‪TYPO3CMS  10.4
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

 injectEnvironmentService (EnvironmentService $environmentService)
 
 initializeObject ()
 
QuerySettingsInterface setRespectStoragePage ($respectStoragePage)
 
bool getRespectStoragePage ()
 
QuerySettingsInterface setStoragePageIds (array $storagePageIds)
 
array getStoragePageIds ()
 
QuerySettingsInterface setRespectSysLanguage ($respectSysLanguage)
 
bool getRespectSysLanguage ()
 
QuerySettingsInterface setLanguageOverlayMode ($languageOverlayMode=false)
 
mixed getLanguageOverlayMode ()
 
QuerySettingsInterface setLanguageMode ($languageMode='')
 
string getLanguageMode ()
 
QuerySettingsInterface setLanguageUid ($languageUid)
 
int getLanguageUid ()
 
QuerySettingsInterface setIgnoreEnableFields ($ignoreEnableFields)
 
bool getIgnoreEnableFields ()
 
QuerySettingsInterface setEnableFieldsToBeIgnored ($enableFieldsToBeIgnored)
 
array getEnableFieldsToBeIgnored ()
 
QuerySettingsInterface setIncludeDeleted ($includeDeleted)
 
bool getIncludeDeleted ()
 

Protected Attributes

bool $respectStoragePage = true
 
array $storagePageIds = array( )
 
bool $ignoreEnableFields = false
 
array $enableFieldsToBeIgnored = array( )
 
bool $includeDeleted = false
 
bool $respectSysLanguage = true
 
bool $languageOverlayMode = true
 
int $languageUid = 0
 
EnvironmentService $environmentService
 

Detailed Description

Query settings, reflects the settings unique to TYPO3 CMS.

Definition at line 28 of file Typo3QuerySettings.php.

Member Function Documentation

◆ getEnableFieldsToBeIgnored()

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

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

◆ getIgnoreEnableFields()

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

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

◆ getIncludeDeleted()

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

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

◆ getLanguageMode()

string TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::getLanguageMode ( )

Language Mode is NOT used anymore, so just avoid using it. Will be deprecated in the future.

Returns
‪string NULL, "content_fallback", "strict" or "ignore"

Definition at line 216 of file Typo3QuerySettings.php.

◆ getLanguageOverlayMode()

mixed TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::getLanguageOverlayMode ( )
Returns
‪mixed TRUE, FALSE or "hideNonTranslated"

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

Definition at line 195 of file Typo3QuerySettings.php.

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

◆ getLanguageUid()

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

◆ getRespectStoragePage()

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

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

◆ getRespectSysLanguage()

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

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

◆ getStoragePageIds()

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

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

◆ initializeObject()

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

As long as we use a feature flag ignoreAllEnableFieldsInBe to determine the default behavior, the initializeObject is responsible for handling that.

Definition at line 97 of file Typo3QuerySettings.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings\setIgnoreEnableFields(), TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings\setLanguageOverlayMode(), and TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings\setLanguageUid().

◆ injectEnvironmentService()

TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::injectEnvironmentService ( EnvironmentService  $environmentService)
Parameters
EnvironmentService$environmentService

Definition at line 88 of file Typo3QuerySettings.php.

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

◆ setEnableFieldsToBeIgnored()

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

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

◆ setIgnoreEnableFields()

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

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

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings\initializeObject().

◆ setIncludeDeleted()

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

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

◆ setLanguageMode()

QuerySettingsInterface TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::setLanguageMode (   $languageMode = '')

Language Mode is NOT used anymore, so just avoid using it. Will be deprecated in the future.

Parameters
string$languageMode
Returns
QuerySettingsInterface instance of $this to allow method chaining

Definition at line 206 of file Typo3QuerySettings.php.

◆ setLanguageOverlayMode()

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

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

Definition at line 186 of file Typo3QuerySettings.php.

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

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings\initializeObject().

◆ setLanguageUid()

QuerySettingsInterface TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::setLanguageUid (   $languageUid)

◆ setRespectStoragePage()

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

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

Parameters
bool$respectStoragePage‪If 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 126 of file Typo3QuerySettings.php.

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

◆ setRespectSysLanguage()

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

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

Definition at line 168 of file Typo3QuerySettings.php.

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

◆ setStoragePageIds()

QuerySettingsInterface 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$storagePageIds‪If 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 148 of file Typo3QuerySettings.php.

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

Member Data Documentation

◆ $enableFieldsToBeIgnored

array TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::$enableFieldsToBeIgnored = array( )
protected

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

Definition at line 55 of file Typo3QuerySettings.php.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings\getEnableFieldsToBeIgnored(), and TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings\setEnableFieldsToBeIgnored().

◆ $environmentService

EnvironmentService TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::$environmentService
protected

◆ $ignoreEnableFields

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

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.

Definition at line 48 of file Typo3QuerySettings.php.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings\getIgnoreEnableFields(), and TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings\setIgnoreEnableFields().

◆ $includeDeleted

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

Flag whether deleted records should be included in the result set.

Definition at line 61 of file Typo3QuerySettings.php.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings\getIncludeDeleted(), and TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings\setIncludeDeleted().

◆ $languageOverlayMode

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

◆ $languageUid

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

Representing sys_language_uid only valid for current context

Definition at line 79 of file Typo3QuerySettings.php.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings\getLanguageUid(), and TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings\setLanguageUid().

◆ $respectStoragePage

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

◆ $respectSysLanguage

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

◆ $storagePageIds

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

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

Definition at line 40 of file Typo3QuerySettings.php.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings\getStoragePageIds(), and TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings\setStoragePageIds().