TYPO3  7.6
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
PlainDataResolver Class Reference

Public Member Functions

 __construct ($tableName, array $liveIds, $sortingStatement=null)
 
 setWorkspaceId ($workspaceId)
 
 setKeepLiveIds ($keepLiveIds)
 
 setKeepDeletePlaceholder ($keepDeletePlaceholder)
 
 get ()
 

Protected Member Functions

 processVersionOverlays (array $ids)
 
 processVersionMovePlaceholders (array $ids)
 
 processSorting (array $ids)
 
 applyLiveIds (array $ids)
 
 reindex (array $ids)
 
 isWorkspaceEnabled ()
 
 isLocalizationEnabled ()
 
 intImplode ($delimiter, array $values)
 
 getDatabaseConnection ()
 

Protected Attributes

 $tableName
 
 $liveIds
 
 $sortingStatement
 
 $workspaceId
 
 $keepLiveIds = false
 
 $keepDeletePlaceholder = false
 
 $resolvedIds
 

Detailed Description

Plain data resolving.

This component resolves data constraints for given IDs of a particular table on a plain/raw database level. Thus, workspaces placeholders and overlay related resorting is applied automatically.

Definition at line 27 of file PlainDataResolver.php.

Constructor & Destructor Documentation

__construct (   $tableName,
array  $liveIds,
  $sortingStatement = null 
)
Parameters
string$tableName
int[]$liveIds
NULL | string$sortingStatement

Definition at line 69 of file PlainDataResolver.php.

References PlainDataResolver\$sortingStatement, PlainDataResolver\$tableName, and PlainDataResolver\reindex().

Member Function Documentation

applyLiveIds ( array  $ids)
protected

Applies live IDs to the final result set, if the current table is enabled for workspaces and the keepLiveIds class member is enabled.

Parameters
int[]$ids
Returns
int[]

Definition at line 238 of file PlainDataResolver.php.

References PlainDataResolver\getDatabaseConnection(), PlainDataResolver\intImplode(), PlainDataResolver\isWorkspaceEnabled(), and PlainDataResolver\reindex().

Referenced by PlainDataResolver\get().

get ( )
getDatabaseConnection ( )
protected
intImplode (   $delimiter,
array  $values 
)
protected

Implodes an array of casted integer values.

Parameters
string$delimiter
array$values
Returns
string

Definition at line 307 of file PlainDataResolver.php.

References PlainDataResolver\getDatabaseConnection().

Referenced by PlainDataResolver\applyLiveIds(), PlainDataResolver\processSorting(), PlainDataResolver\processVersionMovePlaceholders(), and PlainDataResolver\processVersionOverlays().

isLocalizationEnabled ( )
protected
Returns
bool

Definition at line 295 of file PlainDataResolver.php.

References BackendUtility\isTableLocalizable().

isWorkspaceEnabled ( )
protected
processSorting ( array  $ids)
protected

Processes sorting of the final result set, if a sorting statement (table column/expression) is given.

Parameters
int[]$ids
Returns
int[]

Definition at line 205 of file PlainDataResolver.php.

References PlainDataResolver\getDatabaseConnection(), PlainDataResolver\intImplode(), and PlainDataResolver\reindex().

Referenced by PlainDataResolver\get().

processVersionMovePlaceholders ( array  $ids)
protected

Processes and resolves move placeholders on the final result set.

Parameters
int[]$ids
Returns
int[]

Definition at line 167 of file PlainDataResolver.php.

References PlainDataResolver\getDatabaseConnection(), PlainDataResolver\intImplode(), PlainDataResolver\isWorkspaceEnabled(), VersionState\MOVE_PLACEHOLDER, and PlainDataResolver\reindex().

Referenced by PlainDataResolver\processVersionOverlays().

processVersionOverlays ( array  $ids)
protected
reindex ( array  $ids)
protected
setKeepDeletePlaceholder (   $keepDeletePlaceholder)

Sets whether delete placeholders shall be kept in the final result set.

Parameters
bool$keepDeletePlaceholder

Definition at line 101 of file PlainDataResolver.php.

References PlainDataResolver\$keepDeletePlaceholder.

setKeepLiveIds (   $keepLiveIds)

Sets whether live IDs shall be kept in the final result set.

Parameters
bool$keepLiveIds

Definition at line 91 of file PlainDataResolver.php.

References PlainDataResolver\$keepLiveIds.

setWorkspaceId (   $workspaceId)

Sets the target workspace ID the final result shall use.

Parameters
int$workspaceId

Definition at line 81 of file PlainDataResolver.php.

References PlainDataResolver\$workspaceId.

Member Data Documentation

$keepDeletePlaceholder = false
protected

Definition at line 57 of file PlainDataResolver.php.

Referenced by PlainDataResolver\setKeepDeletePlaceholder().

$keepLiveIds = false
protected

Definition at line 52 of file PlainDataResolver.php.

Referenced by PlainDataResolver\setKeepLiveIds().

$liveIds
protected

Definition at line 37 of file PlainDataResolver.php.

$resolvedIds
protected

Definition at line 62 of file PlainDataResolver.php.

Referenced by PlainDataResolver\get().

$sortingStatement
protected

Definition at line 42 of file PlainDataResolver.php.

Referenced by PlainDataResolver\__construct().

$tableName
protected

Definition at line 32 of file PlainDataResolver.php.

Referenced by PlainDataResolver\__construct().

$workspaceId
protected

Definition at line 47 of file PlainDataResolver.php.

Referenced by PlainDataResolver\setWorkspaceId().