CodeExplorer getGroupedFilters example
$this->
addVariantCondition($request,
$criteria);
} private function addVariantCondition(Request
$request, Criteria
$criteria) { $filters =
$request->
getParam('variants',
[]);
if (empty($filters)) { return;
} $filters =
explode('|',
$filters);
$filters =
$this->
getGroupedFilters($filters);
if (empty($filters)) { return;
} $facet =
$this->variantHelper->
getVariantFacet();
$groups =
[];
if ($facet) { $groups =
$facet->
getExpandGroupIds();
} $this->
addPropertyCondition($request,
$criteria);
} private function addPropertyCondition(Request
$request, Criteria
$criteria): void
{ $filters =
$request->
getParam('sFilterProperties',
[]);
if (empty($filters)) { return;
} $filters =
explode('|',
$filters);
$filters =
$this->
getGroupedFilters($filters);
if (empty($filters)) { return;
} foreach ($filters as $filter) { $condition =
new PropertyCondition($filter);
$criteria->
addCondition($condition);
} }