getEntity()->getInstance(); $currentSection = $this->get(SectionResolver::class)->getCurrent(); $productsSalesStatistic = $this->get(OrderShopContainer::class)->getBuilder()->getProductsSalesStatistic($currentSection, $productFamily, 16); $parameters = array( 'productFamily' => $productFamily, 'productsSalesStatistic' => $productsSalesStatistic ); //TODO flashMessages ??? $response['flashMessages'] = [];//$this->utils->getFlashMessages(); $response['data'] = $this->render('@LcCaracole/admin/product/modal/show_products_sales_statistic.html.twig', $parameters)->getContent(); $response['statistics'] = $productsSalesStatistic; return new Response(json_encode($response)); } }