EditableRestriction
class \
- Implements
- QueryRestrictionInterface
Table of Contents
Interfaces
- QueryRestrictionInterface
- The main restriction interface. All restrictions (including the collections) must implement this.
Properties
- $allowedFields : array
- Specify which database fields the current user is allowed to edit
- $allowedLanguages : array
- Specify which languages the current user is allowed to edit
- $explicitAllowFields : array
- Explicit allow fields
- $queryBuilder : QueryBuilder
Methods
- __construct() : mixed
- buildExpression() : CompositeExpression
- Main method to build expressions for given tables
- getAllowedFieldsForCurrentUser() : array
- Get allowed table / fieldnames for current backend user.
- getAllowedLanguagesForCurrentUser() : array
- Gets all allowed language ids for current backend user
- getBackendUser() : BackendUserAuthentication
- getExplicitAllowTypesForCurrentUser() : string[]
- Returns the allowed types for the current user. Should only be called if the table has a type field (defined by TCA ctrl => type) which contains 'authMode'.
Properties
$allowedFields
Specify which database fields the current user is allowed to edit
protected
array
$allowedFields
= []
$allowedLanguages
Specify which languages the current user is allowed to edit
protected
array
$allowedLanguages
= []
$explicitAllowFields
Explicit allow fields
protected
array
$explicitAllowFields
= []
$queryBuilder
protected
QueryBuilder
$queryBuilder
Methods
__construct()
public
__construct(array<string, string> $searchFields, QueryBuilder $queryBuilder) : mixed
Parameters
- $searchFields : array<string, string>
-
array of 'table' => 'field1, field2' in which linkvalidator searches for broken links.
- $queryBuilder : QueryBuilder
buildExpression()
Main method to build expressions for given tables
public
buildExpression(array $queriedTables, ExpressionBuilder $expressionBuilder) : CompositeExpression
Parameters
- $queriedTables : array
-
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)
getAllowedFieldsForCurrentUser()
Get allowed table / fieldnames for current backend user.
protected
getAllowedFieldsForCurrentUser([array $searchFields = [] ]) : array
Only consider table / fields in $searchFields
Parameters
- $searchFields : array = []
-
array of 'table' => ['field1, field2', ....] in which linkvalidator searches for broken links
Return values
arraygetAllowedLanguagesForCurrentUser()
Gets all allowed language ids for current backend user
protected
getAllowedLanguagesForCurrentUser() : array
Return values
arraygetBackendUser()
protected
getBackendUser() : BackendUserAuthentication
Return values
BackendUserAuthenticationgetExplicitAllowTypesForCurrentUser()
Returns the allowed types for the current user. Should only be called if the table has a type field (defined by TCA ctrl => type) which contains 'authMode'.
protected
getExplicitAllowTypesForCurrentUser(string $table, FieldTypeInterface $typeField) : string[]
Parameters
- $table : string
- $typeField : FieldTypeInterface