From 49f3462301eb9a522be1caef49ac8be0918be581 Mon Sep 17 00:00:00 2001 From: Chihiro Adachi <8196725+chihiro-adachi@users.noreply.github.com> Date: Wed, 28 Jun 2023 12:16:51 +0900 Subject: [PATCH] use Eccube\Pager\Pagination --- .../Eccube/Controller/Admin/Order/EditController.php | 5 +++-- src/application/Eccube/Controller/ProductController.php | 4 ++-- src/application/Eccube/Controller/SitemapController.php | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/application/Eccube/Controller/Admin/Order/EditController.php b/src/application/Eccube/Controller/Admin/Order/EditController.php index 2a0b982ef5..ff2c72d9f6 100644 --- a/src/application/Eccube/Controller/Admin/Order/EditController.php +++ b/src/application/Eccube/Controller/Admin/Order/EditController.php @@ -46,6 +46,7 @@ use Eccube\Service\PurchaseFlow\PurchaseException; use Eccube\Service\PurchaseFlow\PurchaseFlow; use Eccube\Service\TaxRuleService; +use Eccube\Pager\Pagination; use Eccube\Pager\Paginator; use Eccube\Http\Request; use Eccube\Http\Exception\BadRequestHttpException; @@ -449,7 +450,7 @@ public function searchCustomerHtml(Request $request, Paginator $paginator, $page ); $this->eventDispatcher->dispatch($event, EccubeEvents::ADMIN_ORDER_EDIT_SEARCH_CUSTOMER_SEARCH); - /** @var \Knp\Component\Pager\Pagination\SlidingPagination $pagination */ + /** @var Pagination $pagination */ $pagination = $paginator->paginate( $qb, $page_no, @@ -608,7 +609,7 @@ public function searchProduct(Request $request, Paginator $paginator, $page_no = ); $this->eventDispatcher->dispatch($event, EccubeEvents::ADMIN_ORDER_EDIT_SEARCH_PRODUCT_SEARCH); - /** @var \Knp\Component\Pager\Pagination\SlidingPagination $pagination */ + /** @var Pagination $pagination */ $pagination = $paginator->paginate( $qb, $page_no, diff --git a/src/application/Eccube/Controller/ProductController.php b/src/application/Eccube/Controller/ProductController.php index 827fdfb83f..98aa74f796 100644 --- a/src/application/Eccube/Controller/ProductController.php +++ b/src/application/Eccube/Controller/ProductController.php @@ -31,9 +31,9 @@ use Eccube\Service\CartService; use Eccube\Service\PurchaseFlow\PurchaseContext; use Eccube\Service\PurchaseFlow\PurchaseFlow; -use Knp\Bundle\PaginatorBundle\Pagination\SlidingPagination; use Eccube\Http\Request; use Eccube\Http\Exception\NotFoundHttpException; +use Eccube\Pager\Pagination; use Eccube\Pager\Paginator; class ProductController extends AbstractController @@ -152,7 +152,7 @@ public function index(Request $request, Paginator $paginator) $query = $qb->getQuery() ->useResultCache(true, $this->eccubeConfig['eccube_result_cache_lifetime_short']); - /** @var SlidingPagination $pagination */ + /** @var Pagination $pagination */ $pagination = $paginator->paginate( $query, !empty($searchData['pageno']) ? $searchData['pageno'] : 1, diff --git a/src/application/Eccube/Controller/SitemapController.php b/src/application/Eccube/Controller/SitemapController.php index 6a4f8b3693..20a44171aa 100644 --- a/src/application/Eccube/Controller/SitemapController.php +++ b/src/application/Eccube/Controller/SitemapController.php @@ -22,7 +22,7 @@ use Eccube\Repository\ProductRepository; use Eccube\Routing\Annotation\Route; use Eccube\Routing\Router; -use Knp\Bundle\PaginatorBundle\Pagination\SlidingPagination; +use Eccube\Pager\Pagination; use Eccube\Pager\Paginator; use Eccube\Http\Request; use Eccube\Http\Response; @@ -94,7 +94,7 @@ public function index(Paginator $paginator) // フロントの商品一覧の条件で商品情報を取得 $ProductListOrder = $this->productListOrderByRepository->find($this->eccubeConfig['eccube_product_order_newer']); $productQueryBuilder = $this->productRepository->getQueryBuilderBySearchData(['orderby' => $ProductListOrder]); - /** @var SlidingPagination $pagination */ + /** @var Pagination $pagination */ $pagination = $paginator->paginate( $productQueryBuilder, 1,