| @@ 379-395 (lines=17) @@ | ||
| 376 | * @param Request $request |
|
| 377 | * @return \Doctrine\ORM\QueryBuilder |
|
| 378 | */ |
|
| 379 | public function getCustomerQueryBuilder(Request $request) |
|
| 380 | { |
|
| 381 | $em = $this->getEntityManager(); |
|
| 382 | $session = $request->getSession(); |
|
| 383 | if ($session->has('eccube.admin.customer.search')) { |
|
| 384 | $searchData = $session->get('eccube.admin.customer.search'); |
|
| 385 | $this->findDeserializeObjects($searchData, $em); |
|
| 386 | } else { |
|
| 387 | $searchData = array(); |
|
| 388 | } |
|
| 389 | ||
| 390 | // 会員データのクエリビルダを構築. |
|
| 391 | $qb = $this->customerRepository |
|
| 392 | ->getQueryBuilderBySearchData($searchData); |
|
| 393 | ||
| 394 | return $qb; |
|
| 395 | } |
|
| 396 | ||
| 397 | /** |
|
| 398 | * 商品検索用のクエリビルダを返す. |
|
| @@ 403-419 (lines=17) @@ | ||
| 400 | * @param Request $request |
|
| 401 | * @return \Doctrine\ORM\QueryBuilder |
|
| 402 | */ |
|
| 403 | public function getProductQueryBuilder(Request $request) |
|
| 404 | { |
|
| 405 | $em = $this->getEntityManager(); |
|
| 406 | $session = $request->getSession(); |
|
| 407 | if ($session->has('eccube.admin.product.search')) { |
|
| 408 | $searchData = $session->get('eccube.admin.product.search'); |
|
| 409 | $this->findDeserializeObjects($searchData, $em); |
|
| 410 | } else { |
|
| 411 | $searchData = array(); |
|
| 412 | } |
|
| 413 | ||
| 414 | // 商品データのクエリビルダを構築. |
|
| 415 | $qb = $this->productRepository |
|
| 416 | ->getQueryBuilderBySearchDataForAdmin($searchData); |
|
| 417 | ||
| 418 | return $qb; |
|
| 419 | } |
|
| 420 | ||
| 421 | /** |
|
| 422 | * セッションでシリアライズされた Doctrine のオブジェクトを取得し直す. |
|