‪TYPO3CMS  10.4
TYPO3\CMS\Core\Database\Query\Restriction\FrontendRestrictionContainer Class Reference
Inheritance diagram for TYPO3\CMS\Core\Database\Query\Restriction\FrontendRestrictionContainer:
TYPO3\CMS\Core\Database\Query\Restriction\AbstractRestrictionContainer TYPO3\CMS\Core\Database\Query\Restriction\QueryRestrictionContainerInterface TYPO3\CMS\Core\Database\Query\Restriction\QueryRestrictionInterface

Public Member Functions

 __construct (Context $context=null)
 
CompositeExpression buildExpression (array $queriedTables, ExpressionBuilder $expressionBuilder)
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Core\Database\Query\Restriction\AbstractRestrictionContainer
QueryRestrictionContainerInterface removeAll ()
 
QueryRestrictionContainerInterface removeByType (string $restrictionType)
 
QueryRestrictionContainerInterface add (QueryRestrictionInterface $restriction)
 

Protected Attributes

string[] $defaultRestrictionTypes
 
Context $context
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Core\Database\Query\Restriction\AbstractRestrictionContainer
QueryRestrictionInterface[] $restrictions = array( )
 
QueryRestrictionInterface[] $enforcedRestrictions = array( )
 

Additional Inherited Members

- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Core\Database\Query\Restriction\AbstractRestrictionContainer
QueryRestrictionInterface createRestriction ($restrictionClass)
 

Detailed Description

A collection of restrictions to be used in frontend context. This is a replacement for PageRepository::enableFields()

Definition at line 30 of file FrontendRestrictionContainer.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\Database\Query\Restriction\FrontendRestrictionContainer::__construct ( Context  $context = null)

Member Function Documentation

◆ buildExpression()

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

Main method to build expressions for given tables Iterates over all registered restrictions and removes the hidden restriction if preview is requested

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)

Reimplemented from TYPO3\CMS\Core\Database\Query\Restriction\AbstractRestrictionContainer.

Definition at line 69 of file FrontendRestrictionContainer.php.

References TYPO3\CMS\Core\Database\Query\Expression\ExpressionBuilder\andX().

Member Data Documentation

◆ $context

Context TYPO3\CMS\Core\Database\Query\Restriction\FrontendRestrictionContainer::$context
protected

◆ $defaultRestrictionTypes

string [] TYPO3\CMS\Core\Database\Query\Restriction\FrontendRestrictionContainer::$defaultRestrictionTypes
protected
Initial value:
= array(
DeletedRestriction::class,
FrontendWorkspaceRestriction::class,
HiddenRestriction::class,
StartTimeRestriction::class,
EndTimeRestriction::class,
FrontendGroupRestriction::class,
)

Definition at line 34 of file FrontendRestrictionContainer.php.