Skip to content

Commit

Permalink
use Eccube\Pager\Pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
chihiro-adachi committed Jun 29, 2023
1 parent 67478b0 commit 49f3462
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions src/application/Eccube/Controller/ProductController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions src/application/Eccube/Controller/SitemapController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 49f3462

Please sign in to comment.