Browse Source

Merge branch 'develop'

master
Fabien Normand 3 years ago
parent
commit
9a3c99fe00
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      Controller/Product/ProductFamilyAdminController.php

+ 6
- 1
Controller/Product/ProductFamilyAdminController.php View File

use Lc\CaracoleBundle\Container\Order\OrderShopContainer; use Lc\CaracoleBundle\Container\Order\OrderShopContainer;
use Lc\CaracoleBundle\Container\Product\ProductFamilyContainer; use Lc\CaracoleBundle\Container\Product\ProductFamilyContainer;
use Lc\CaracoleBundle\Controller\AbstractAdminController; use Lc\CaracoleBundle\Controller\AbstractAdminController;
use Lc\CaracoleBundle\Definition\ActionDefinition;
use Lc\CaracoleBundle\Resolver\SectionResolver; use Lc\CaracoleBundle\Resolver\SectionResolver;
use Lc\SovBundle\Repository\RepositoryQueryInterface; use Lc\SovBundle\Repository\RepositoryQueryInterface;
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Response;
{ {
$crud = parent::configureCrud($crud); $crud = parent::configureCrud($crud);


$crud->setDefaultSort(['id' => 'DESC']);
if($this->getRequestCrudAction() === ActionDefinition::SORT) {
$crud->setDefaultSort(['position' => 'ASC']);
}else{
$crud->setDefaultSort(['id' => 'DESC']);
}


return $crud; return $crud;
} }

Loading…
Cancel
Save