/** * Loops through all the attributes that are to be aggregated into a single attribute for a specific converter. * * @param string $attribute * @param array $values * @param AttributeConverterInterface $converter * @return array */ protected function convertAggregateValues($attribute, array $values, AttributeConverterInterface $converter) { $this->aggregated[] = $attribute; $converterName = $this->schema->getConverter($attribute); $toAggregate = array_keys($this->schema->getConverterMap(), $converterName); $values = $this->iterateAggregates($toAggregate, $values, $converter); return is_array($values) ? $values : [$values]; }