} if (\
in_array($type,
[TypeMappingInterface::TYPE_DATE, TypeMappingInterface::TYPE_DATETIME
], true
)) { $aggregations[$key] =
$this->
formatDates($aggregations[$key]);
} $criteriaPartResult = null;
switch ($criteriaPart->
getMode()) { case ProductAttributeFacet::MODE_VALUE_LIST_RESULT:
case ProductAttributeFacet::MODE_RADIO_LIST_RESULT:
$criteriaPartResult =
$this->
createItemListResult($criteriaPart,
$aggregations[$key],
$criteria);
break;
case ProductAttributeFacet::MODE_BOOLEAN_RESULT:
$criteriaPartResult =
$this->
createBooleanResult($criteriaPart,
$aggregations[$key],
$criteria);
break;
case ProductAttributeFacet::MODE_RANGE_RESULT:
$criteriaPartResult =
$this->
createRangeResult($criteriaPart,
$aggregations[$key],
$criteria);
if ($criteriaPartResult->
getMax() ===
$criteriaPartResult->
getMin()) { $criteriaPartResult = null;
}