<?php
namespace Customize\Repository;
use Eccube\Doctrine\Query\WhereClause;
use Eccube\Doctrine\Query\WhereCustomizer;
use Eccube\Repository\QueryKey;
class ProductCustomizer extends WhereCustomizer{
/**
* {@inheritdoc}
*
* @param array $params
* @param $queryKey
*
* @return WhereClause[]
*/
protected function createStatements($params, $queryKey){
if(!isset($params['product_types']) && $params['product_types']){
dd(WhereClause::in('p.product_type',':productTypes',['productTypes' => $params['product_types']]));
return [
WhereClause::in('p.product_type',':productTypes',['productTypes' => $params['product_types']]),
];
}
}
public function getQueryKey(){
return QueryKey::PRODUCT_SEARCH;
}
}