‪TYPO3CMS  ‪main
TYPO3\CMS\Core\Database\Query\Restriction\FrontendWorkspaceRestriction Class Reference
Inheritance diagram for TYPO3\CMS\Core\Database\Query\Restriction\FrontendWorkspaceRestriction:
TYPO3\CMS\Core\Database\Query\Restriction\QueryRestrictionInterface

Public Member Functions

 __construct (int $workspaceId=null, bool $includeRowsForWorkspacePreview=null, bool $enforceLiveRowsOnly=true)
 
CompositeExpression buildExpression (array $queriedTables, ExpressionBuilder $expressionBuilder)
 

Protected Attributes

int $workspaceId
 
bool $includeRowsForWorkspacePreview
 
bool $enforceLiveRowsOnly
 

Detailed Description

Restriction to filter records for fronted workspaces preview

Deprecated:
‪will be removed in TYPO3 v13.0. Use WorkspaceRestriction instead.

Definition at line 30 of file FrontendWorkspaceRestriction.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\Database\Query\Restriction\FrontendWorkspaceRestriction::__construct ( int  $workspaceId = null,
bool  $includeRowsForWorkspacePreview = null,
bool  $enforceLiveRowsOnly = true 
)
Parameters
int$workspaceId‪(PageRepository::$versioningWorkspaceId property)
bool$includeRowsForWorkspacePreview‪(PageRepository::$versioningWorkspaceId > 0 property)
bool$enforceLiveRowsOnly‪(!$noVersionPreview argument from PageRepository::enableFields()) This is ONLY for use in PageRepository class and most likely will be removed

Definition at line 49 of file FrontendWorkspaceRestriction.php.

References TYPO3\CMS\Core\Database\Query\Restriction\FrontendWorkspaceRestriction\$enforceLiveRowsOnly, TYPO3\CMS\Core\Database\Query\Restriction\FrontendWorkspaceRestriction\$includeRowsForWorkspacePreview, and TYPO3\CMS\Core\Database\Query\Restriction\FrontendWorkspaceRestriction\$workspaceId.

Member Function Documentation

◆ buildExpression()

CompositeExpression TYPO3\CMS\Core\Database\Query\Restriction\FrontendWorkspaceRestriction::buildExpression ( array  $queriedTables,
ExpressionBuilder  $expressionBuilder 
)

Main method to build expressions for given tables Evaluates the ctrl/versioningWS flag of the table and adds various workspace related restrictions if set

Parameters
array$queriedTables‪Array of tables, where array key is table alias and value is a table name
ExpressionBuilder$expressionBuilderExpression builder instance to add restrictions with
Returns
‪CompositeExpression The result of query builder expression(s)

Implements TYPO3\CMS\Core\Database\Query\Restriction\QueryRestrictionInterface.

Definition at line 66 of file FrontendWorkspaceRestriction.php.

References $GLOBALS, TYPO3\CMS\Core\Database\Query\Expression\ExpressionBuilder\and(), TYPO3\CMS\Core\Versioning\VersionState\DEFAULT_STATE, TYPO3\CMS\Core\Database\Query\Expression\ExpressionBuilder\eq(), TYPO3\CMS\Core\Database\Query\Expression\ExpressionBuilder\lte(), and TYPO3\CMS\Core\Database\Query\Expression\ExpressionBuilder\or().

Member Data Documentation

◆ $enforceLiveRowsOnly

bool TYPO3\CMS\Core\Database\Query\Restriction\FrontendWorkspaceRestriction::$enforceLiveRowsOnly
protected

◆ $includeRowsForWorkspacePreview

bool TYPO3\CMS\Core\Database\Query\Restriction\FrontendWorkspaceRestriction::$includeRowsForWorkspacePreview
protected

◆ $workspaceId

int TYPO3\CMS\Core\Database\Query\Restriction\FrontendWorkspaceRestriction::$workspaceId
protected