FrontendWorkspaceRestriction implements QueryRestrictionInterface

Restriction to filter records for fronted workspaces preview

Table of Contents

Interfaces

QueryRestrictionInterface
The main restriction interface. All restrictions (including the collections) must implement this.

Properties

$enforceLiveRowsOnly  : bool
$includeRowsForWorkspacePreview  : bool
$workspaceId  : int

Methods

__construct()  : mixed
buildExpression()  : CompositeExpression
Main method to build expressions for given tables Evaluates the ctrl/versioningWS flag of the table and adds various workspace related restrictions if set

Properties

$enforceLiveRowsOnly

protected bool $enforceLiveRowsOnly

$includeRowsForWorkspacePreview

protected bool $includeRowsForWorkspacePreview

Methods

__construct()

public __construct([int|null $workspaceId = null ][, bool|null $includeRowsForWorkspacePreview = null ][, bool $enforceLiveRowsOnly = true ]) : mixed
Parameters
$workspaceId : int|null = null

(PageRepository::$versioningWorkspaceId property)

$includeRowsForWorkspacePreview : bool|null = null

(PageRepository::$versioningWorkspaceId > 0 property)

$enforceLiveRowsOnly : bool = true

(!$noVersionPreview argument from PageRepository::enableFields()) This is ONLY for use in PageRepository class and most likely will be removed

buildExpression()

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

public buildExpression(array<string|int, mixed> $queriedTables, ExpressionBuilder $expressionBuilder) : CompositeExpression
Parameters
$queriedTables : array<string|int, mixed>

Array of tables, where array key is table alias and value is a table name

$expressionBuilder : ExpressionBuilder

Expression builder instance to add restrictions with

Return values
CompositeExpression

The result of query builder expression(s)


        
On this page

Search results