{ $conditions =
$this->criteria->
getConditionsByClass(VariantCondition::
class);
$conditions =
array_filter($conditions,
function DVariantCondition
$condition) { return $condition->
expandVariants();
});
if (!
$query->
hasState(self::STATE_INCLUDES_PSEUDO_PRICE_VARIANTS
)) { if (empty($conditions)) { $this->variantHelper->
joinVariants($query);
$this->
joinPrices($query,
$context);
} else { $this->listingPriceSwitcher->
joinPrice($query,
$this->criteria,
$context);
$query->
andWhere('listing_price.pseudoprice > 0'
);
} $query->
addState(self::STATE_INCLUDES_PSEUDO_PRICE_VARIANTS
);
} } public function setCriteria(Criteria
$criteria) { $this->criteria =
$criteria;
}