app/Customize/Repository/ProductCustomizer.php line 20

Open in your IDE?
  1. <?php
  2. namespace Customize\Repository;
  3. use Eccube\Doctrine\Query\WhereClause;
  4. use Eccube\Doctrine\Query\WhereCustomizer;
  5. use Eccube\Repository\QueryKey;
  6. class ProductCustomizer extends WhereCustomizer{
  7.     /**
  8.      * {@inheritdoc}
  9.      *
  10.      * @param array $params
  11.      * @param $queryKey
  12.      *
  13.      * @return WhereClause[]
  14.      */
  15.     protected function createStatements($params$queryKey){
  16.         if(!isset($params['product_types']) && $params['product_types']){
  17.             dd(WhereClause::in('p.product_type',':productTypes',['productTypes' => $params['product_types']]));
  18.             return [
  19.                 WhereClause::in('p.product_type',':productTypes',['productTypes' => $params['product_types']]),
  20.             ];
  21.         }
  22.     }
  23.     public function getQueryKey(){
  24.         return QueryKey::PRODUCT_SEARCH;
  25.     }
  26. }