class SqlFilter extends SQLFilter (View source)

A filter to rewrite doctrine queries according to the security policy.

Properties

protected PolicyService $policyService
protected Context $securityContext

Methods

string
addFilterConstraint(ClassMetadata $targetEntity, string $targetTableAlias)

Gets the SQL query part to add to a query.

void
initializeDependencies()

Initializes the dependencies by retrieving them from the object manager

Details

string addFilterConstraint(ClassMetadata $targetEntity, string $targetTableAlias)

Gets the SQL query part to add to a query.

Parameters

ClassMetadata $targetEntity

Metadata object for the target entity to be filtered

string $targetTableAlias

The target table alias used in the current query

Return Value

string

The constraint SQL if there is available, empty string otherwise

protected void initializeDependencies()

Initializes the dependencies by retrieving them from the object manager

Return Value

void