protected function generateFilterConditionSQL(ClassMetadata
$targetEntity,
$targetTableAlias) { $filterClauses =
[];
foreach ($this->em->
getFilters()->
getEnabledFilters() as $filter) { $filterExpr =
$filter->
addFilterConstraint($targetEntity,
$targetTableAlias);
if ($filterExpr !== ''
) { $filterClauses[] = '(' .
$filterExpr . ')';
} } $sql =
implode(' AND ',
$filterClauses);
return $sql ? '(' .
$sql . ')' : ''; // Wrap again to avoid "X or Y and FilterConditionSQL"
}