getRequestCrudAction() === ActionDefinition::SORT) { $crud->setDefaultSort(['position' => 'ASC']); }else{ $crud->setDefaultSort(['id' => 'DESC']); } return $crud; } public function getRepositoryQuery() :RepositoryQueryInterface { return $this->get(ProductFamilyContainer::class)->getRepositoryQuery(); } public function createEntity(string $entityFqcn) { return $this->getProductFamilyContainer() ->getFactory() ->create($this->getMerchantCurrent()); } public function configureResponseParameters(KeyValueStore $responseParameters): KeyValueStore { $responseParameters = parent::configureResponseParameters($responseParameters); // affichage du filtre sur section $responseParameters->set('display_switch_section', true); return $responseParameters; } }