Bladeren bron

Merge branch 'develop' of https://gitea.laclic.fr/Laclic/LcShopBundle into develop

develop
Guillaume 3 jaren geleden
bovenliggende
commit
d841c1d2b2
1 gewijzigde bestanden met toevoegingen van 20 en 0 verwijderingen
  1. +20
    -0
      ShopBundle/Controller/Backend/AdminController.php

+ 20
- 0
ShopBundle/Controller/Backend/AdminController.php Bestand weergeven

@@ -203,6 +203,7 @@ class AdminController extends EasyAdminController
case 'text':
case 'string':
case 'toggle':
// $filter = $this->getListFilterParam($field['property']);
$filter = $this->filtersForm->get($field['property'])->getData();
if ($filter !== null) {

@@ -327,6 +328,25 @@ class AdminController extends EasyAdminController
return $this->executeDynamicMethod('render<EntityName>Template', ['list', $this->entity['templates']['list'], $parameters]);
}

//TODO finaliser la sauvegarde des filtres
/*
protected function getListFilterParam($param){
$entityName = $this->entity['name'];
$sessionParam = $entityName.$param;
//CUSTOM

$value = $this->filtersForm->get($param)->getViewData();
if($value){
$this->session->set($sessionParam, $value);
}else if($this->session->get($sessionParam) && !$this->filtersForm->isSubmitted() && $this->filtersForm->get($param)){
$value = $this->session->get($sessionParam);
$this->filtersForm->get($param)->setData($value);
}

return $value;

}*/

protected function getListParam($param, $default =null){
$entityName = $this->entity['name'];
$sessionParam = $entityName.$param;

Laden…
Annuleren
Opslaan