浏览代码

Correctif

packProduct
Fabien Normand 3 年前
父节点
当前提交
e0fd05a63d
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. +6
    -1
      Controller/Product/ProductFamilyAdminController.php

+ 6
- 1
Controller/Product/ProductFamilyAdminController.php 查看文件

@@ -8,6 +8,7 @@ use EasyCorp\Bundle\EasyAdminBundle\Context\AdminContext;
use Lc\CaracoleBundle\Container\Order\OrderShopContainer;
use Lc\CaracoleBundle\Container\Product\ProductFamilyContainer;
use Lc\CaracoleBundle\Controller\AbstractAdminController;
use Lc\CaracoleBundle\Definition\ActionDefinition;
use Lc\CaracoleBundle\Resolver\SectionResolver;
use Lc\SovBundle\Repository\RepositoryQueryInterface;
use Symfony\Component\HttpFoundation\Response;
@@ -18,7 +19,11 @@ abstract class ProductFamilyAdminController extends AbstractAdminController
{
$crud = parent::configureCrud($crud);

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

return $crud;
}

正在加载...
取消
保存