protected function getWheres($categoryIDs = [])
{
$wheres = [];
$filters = $this->getFiltersFromKeys($this->getFilters());
foreach ($filters as $filter) {
if (!empty($categoryIDs)) {
$setKey = val('setKey', $filter);
$filterSetCategories = val('categories', val($setKey, self::getAllowedFilters()));
if (!empty($filterSetCategories) and array_diff($categoryIDs, $filterSetCategories)) {
$filter['wheres'] = [];
}
}
$wheres = $this->combineWheres(val('wheres', $filter, []), $wheres);
}
return $wheres;
}