Commit aaa29488 authored by chadicus's avatar chadicus

Enable simple format in Grouping::parse()

parent ba27ed04
......@@ -81,6 +81,12 @@ class Grouping implements ComponentParserInterface
$matches = (isset($result['matches'])) ? $result['matches'] : null;
$groupCount = (isset($result['ngroups'])) ? $result['ngroups'] : null;
if ($grouping->getFormat() === GroupingComponent::FORMAT_SIMPLE) {
$valueGroups = [$this->extractValueGroup($valueResultClass, $documentClass, $result, $query)];
$groups[$field] = new FieldGroup($matches, $groupCount, $valueGroups);
continue;
}
$valueGroups = array();
foreach ($result['groups'] as $valueGroupResult) {
$valueGroups[] = $this->extractValueGroup($valueResultClass, $documentClass, $valueGroupResult, $query);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment