TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
FrontendWorkspaceRestriction Class Reference
Inheritance diagram for FrontendWorkspaceRestriction:
QueryRestrictionInterface

Public Member Functions

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

Protected Attributes

 $workspaceId
 
 $includeRowsForWorkspacePreview
 
 $enforceLiveRowsOnly
 

Detailed Description

Restriction to filter records for fronted workspaces preview

Definition at line 25 of file FrontendWorkspaceRestriction.php.

Constructor & Destructor Documentation

__construct ( int  $workspaceId = null,
bool  $includeRowsForWorkspacePreview = null,
bool  $enforceLiveRowsOnly = true 
)
Parameters
int$workspaceId(PageRepository::$versioningWorkspaceId property)
bool$includeRowsForWorkspacePreview(PageRepository::$versioningPreview 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 47 of file FrontendWorkspaceRestriction.php.

References FrontendWorkspaceRestriction\$enforceLiveRowsOnly, $GLOBALS, FrontendWorkspaceRestriction\$includeRowsForWorkspacePreview, and FrontendWorkspaceRestriction\$workspaceId.

Member Function Documentation

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$queriedTablesArray of tables, where array key is table name and value potentially an alias
ExpressionBuilder$expressionBuilderExpression builder instance to add restrictions with
Returns
CompositeExpression The result of query builder expression(s)

Implements QueryRestrictionInterface.

Definition at line 62 of file FrontendWorkspaceRestriction.php.

References $GLOBALS, ExpressionBuilder\andX(), VersionState\DEFAULT_STATE, ExpressionBuilder\eq(), ExpressionBuilder\lte(), ExpressionBuilder\neq(), and ExpressionBuilder\orX().

Member Data Documentation

$enforceLiveRowsOnly
protected
$includeRowsForWorkspacePreview
protected
$workspaceId
protected