‪TYPO3CMS  ‪main
TYPO3\CMS\Core\Resource\Search\QueryRestrictions\FolderMountsRestriction Class Reference
Inheritance diagram for TYPO3\CMS\Core\Resource\Search\QueryRestrictions\FolderMountsRestriction:
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 (BackendUserAuthentication $backendUser)
 
CompositeExpression buildExpression (array $queriedTables, ExpressionBuilder $expressionBuilder)
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Core\Database\Query\Restriction\AbstractRestrictionContainer
 removeAll ()
 
 removeByType (string $restrictionType)
 
 add (QueryRestrictionInterface $restriction)
 

Private Member Functions

 populateRestrictions ()
 
Folder[] getFolderMounts ()
 

Private Attributes

BackendUserAuthentication $backendUser
 
Folder[] null $folderMounts
 

Additional Inherited Members

- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Core\Database\Query\Restriction\AbstractRestrictionContainer
 createRestriction ($restrictionClass)
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Core\Database\Query\Restriction\AbstractRestrictionContainer
QueryRestrictionInterface[] $restrictions = array( )
 
QueryRestrictionInterface[] $enforcedRestrictions = array( )
 

Detailed Description

Restricts the result to available file mounts. No restriction is added if the user is admin.

Definition at line 32 of file FolderMountsRestriction.php.

Constructor & Destructor Documentation

◆ __construct()

Member Function Documentation

◆ buildExpression()

CompositeExpression TYPO3\CMS\Core\Resource\Search\QueryRestrictions\FolderMountsRestriction::buildExpression ( array  $queriedTables,
ExpressionBuilder  $expressionBuilder 
)

Same as parent method, but using OR composite, as files in either mounted folder should be found.

Parameters
array$queriedTables‪Array of tables, where array key is table alias and value is a table name
ExpressionBuilder$expressionBuilder‪Expression 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 65 of file FolderMountsRestriction.php.

References TYPO3\CMS\Core\Database\Query\Expression\ExpressionBuilder\and(), TYPO3\CMS\Core\Resource\Search\QueryRestrictions\FolderMountsRestriction\getFolderMounts(), and TYPO3\CMS\Core\Database\Query\Expression\ExpressionBuilder\or().

◆ getFolderMounts()

◆ populateRestrictions()

Member Data Documentation

◆ $backendUser

BackendUserAuthentication TYPO3\CMS\Core\Resource\Search\QueryRestrictions\FolderMountsRestriction::$backendUser
private

◆ $folderMounts

Folder [] null TYPO3\CMS\Core\Resource\Search\QueryRestrictions\FolderMountsRestriction::$folderMounts
private