Parcourir la source

Erreur 500 : Argument 2 passed to Lc\SovBundle\Field\Filter\FilterManager::applyFilter() must be an instance of EasyCorp\Bundle\EasyAdminBundle\Dto\FieldDto, null given #623

develop
Guillaume Bourgeois il y a 2 ans
Parent
révision
1a4a3c1f71
1 fichiers modifiés avec 6 ajouts et 3 suppressions
  1. +6
    -3
      Controller/AbstractAdminController.php

+ 6
- 3
Controller/AbstractAdminController.php Voir le fichier

@@ -64,9 +64,12 @@ abstract class AbstractAdminController extends SovAbstractAdminController
$controller->configureFields($autocompleteContext['originatingPage'])
)->getByProperty($autocompleteContext['propertyName']);

$filterManager = $this->get(FilterManager::class);
$filteredValue = ['value' => $context->getRequest()->query->get('q')];
$filterManager->applyFilter($repositoryQuery, $field, $filteredValue);
if($field) {
$filterManager = $this->get(FilterManager::class);
$filteredValue = ['value' => $context->getRequest()->query->get('q')];
$filterManager->applyFilter($repositoryQuery, $field, $filteredValue);
}

$repositoryQuery->select('.' . $autocompleteContext['propertyName']);

$responses = array();

Chargement…
Annuler
Enregistrer