EditableRestriction implements QueryRestrictionInterface
Table of Contents
Interfaces
- QueryRestrictionInterface
- The main restriction interface. All restrictions (including the collections) must implement this.
Properties
- $allowedFields : array<string|int, mixed>
- Specify which database fields the current user is allowed to edit
- $allowedLanguages : array<string|int, mixed>
- Specify which languages the current user is allowed to edit
- $explicitAllowFields : array<string|int, mixed>
- Explicit allow fields
- $queryBuilder : QueryBuilder
Methods
- __construct() : mixed
- buildExpression() : CompositeExpression
- Main method to build expressions for given tables
- getAllowedFieldsForCurrentUser() : array<string|int, mixed>
- Get allowed table / fieldnames for current backend user.
- getAllowedLanguagesForCurrentUser() : array<string|int, mixed>
- Gets all allowed language ids for current backend user
- getExplicitAllowTypesForCurrentUser() : array<string|int, 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<string|int, mixed>
$allowedFields
= []
$allowedLanguages
Specify which languages the current user is allowed to edit
protected
array<string|int, mixed>
$allowedLanguages
= []
$explicitAllowFields
Explicit allow fields
protected
array<string|int, mixed>
$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<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)
getAllowedFieldsForCurrentUser()
Get allowed table / fieldnames for current backend user.
protected
getAllowedFieldsForCurrentUser([array<string|int, mixed> $searchFields = [] ]) : array<string|int, mixed>
Only consider table / fields in $searchFields
Parameters
- $searchFields : array<string|int, mixed> = []
-
array of 'table' => ['field1, field2', ....] in which linkvalidator searches for broken links
Return values
array<string|int, mixed>getAllowedLanguagesForCurrentUser()
Gets all allowed language ids for current backend user
protected
getAllowedLanguagesForCurrentUser() : array<string|int, mixed>
Return values
array<string|int, mixed>getExplicitAllowTypesForCurrentUser()
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, string $typeField) : array<string|int, string>
Parameters
- $table : string
- $typeField : string