{ $this->
addCondition($condition,
$query);
} private function addCondition(HeightCondition
$condition, QueryBuilder
$query): void
{ $min = ':minHeight' .
md5(json_encode($condition, JSON_THROW_ON_ERROR
));
$max = ':maxHeight' .
md5(json_encode($condition, JSON_THROW_ON_ERROR
));
$this->variantHelper->
joinVariants($query);
if ($condition->
getMinHeight() > 0
) { $query->
andWhere('allVariants.height >= ' .
$min);
$query->
setParameter($min,
$condition->
getMinHeight());
} if ($condition->
getMaxHeight() > 0
) { $query->
andWhere('allVariants.height <= ' .
$max);
$query->
setParameter($max,
$condition->
getMaxHeight());
} }}