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

Public Member Functions

 __construct (array $frontendGroupIds=null)
 
CompositeExpression buildExpression (array $queriedTables, ExpressionBuilder $expressionBuilder)
 

Protected Attributes

array $frontendGroupIds
 

Detailed Description

Restriction to filter records, which are limited to the given user groups

Definition at line 29 of file FrontendGroupRestriction.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\Database\Query\Restriction\FrontendGroupRestriction::__construct ( array  $frontendGroupIds = null)
Parameters
array | null$frontendGroupIds‪Normalized array with user groups of currently logged in user (typically found in the Frontend Context)

Definition at line 36 of file FrontendGroupRestriction.php.

References TYPO3\CMS\Core\Database\Query\Restriction\FrontendGroupRestriction\$frontendGroupIds.

Member Function Documentation

◆ buildExpression()

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

Main method to build expressions for given tables Evaluates the ctrl/enablecolumns/fe_group flag of the table and adds the according restriction 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 55 of file FrontendGroupRestriction.php.

References $GLOBALS, TYPO3\CMS\Core\Database\Query\Expression\ExpressionBuilder\eq(), TYPO3\CMS\Core\Database\Query\Expression\ExpressionBuilder\inSet(), TYPO3\CMS\Core\Database\Query\Expression\ExpressionBuilder\isNull(), TYPO3\CMS\Core\Database\Query\Expression\ExpressionBuilder\literal(), and TYPO3\CMS\Core\Database\Query\Expression\ExpressionBuilder\or().

Member Data Documentation

◆ $frontendGroupIds

array TYPO3\CMS\Core\Database\Query\Restriction\FrontendGroupRestriction::$frontendGroupIds
protected