Переглянути джерело

filter

feature/symfony6.1
Charly 2 роки тому
джерело
коміт
ba3e33b0ea
1 змінених файлів з 2 додано та 2 видалено
  1. +2
    -2
      Field/Filter/AssociationFilter.php

+ 2
- 2
Field/Filter/AssociationFilter.php Переглянути файл

@@ -57,9 +57,9 @@ class AssociationFilter
public function applyFilter(RepositoryQueryInterface $repositoryQuery, FieldDto $fieldDto, $filteredValue = null)
{
$fieldProperty = $this->getFieldProperty($fieldDto);
if ($filteredValue !== null) {

if ($fieldDto->getFormTypeOption('multiple')) {
if ($filteredValue !== null) {
if ($fieldDto->getFormTypeOption('multiple') || ($fieldDto->getTemplatePath() != null && str_contains($fieldDto->getTemplatePath(), 'association_many'))) {
$repositoryQuery->andWhere(':' . $fieldProperty . ' MEMBER OF .' . $fieldProperty . '');
} else {
$repositoryQuery->andWhere('.' . $fieldProperty . ' = :' . $fieldProperty . '');

Завантаження…
Відмінити
Зберегти