$attribute =
$this->crudService->
get('s_articles_attributes',
$criteriaPart->
getField());
$type =
$attribute ?
$attribute->
getColumnType() : '';
if (\
is_array($aggregations[$key]['buckets'
])) { $aggregations[$key]['buckets'
] =
array_filter($aggregations[$key]['buckets'
],
function D
$item) { return $item['key'
] !== '';
});
} 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;