WEBMASTER AMM Posted August 14, 2023 Share Posted August 14, 2023 Hello, I'm working on a new module with a Bo controller on Symfony. When I call the controller ("configure action"), the query is not sorted by the defaults settings but by the primary key. ItemFilter.php AdminItemController.php ItemQueryBuilder.php Do you know where does come the problem (I have deleted all cache)? Thanks for your help Link to comment Share on other sites More sharing options...
WEBMASTER AMM Posted August 14, 2023 Author Share Posted August 14, 2023 class AdminItemController extends FrameworkBundleAdminController{ private $cache; private $commandBus; public function __construct(CacheProvider $cache, TacticianCommandBusAdapter $commandBus) { $this->cache = $cache; $this->commandBus = $commandBus; } public function indexAction(ItemFilter $filters) { $itemGridFactory = $this->get('amm.menu.grid.item_grid_factory'); $itemRequestGrid = $itemGridFactory->getGrid($filters); return $this->render('@Modules/ammmenu/views/templates/admin/list.html.twig',[ 'itemGrid' => $this->presentGrid($itemRequestGrid) ]); } } use PrestaShop\PrestaShop\Core\Search\Filters; use Amm\Menu\Grid\Definition\Factory\ItemDefinitionFactory; final class ItemFilter extends Filters { protected $filterId = ItemDefinitionFactory::GRID_ID; public static function getDefaults() { $tab=[ 'limit' => 10, 'offset' => 0, 'orderBy' => 'position', 'sortOrder' => 'asc', 'filters' => [], ]; return $tab; } } Link to comment Share on other sites More sharing options...
WEBMASTER AMM Posted August 14, 2023 Author Share Posted August 14, 2023 Finally, I have found in table ps_admin_filter the cached row After deleting it, the new code is operational Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now