/** * * @param DataParam $params * @param array $years * @return ArrayIterator */ public function getValuesFilteringWithMultipleParams(DataParam $params, array $years) { if (is_array($params->getSubgroup())) { $subgroup = $params->getSubgroup(); $paramsForList1 = $params; $paramsForList1->setSubgroup($subgroup[0]); $listValues1 = $this->repository->getValuesWithMultipleParamsSelected($paramsForList1, $years); $paramsForList2 = $params; $paramsForList2->setSubgroup($subgroup[1]); $listValues2 = $this->repository->getValuesWithMultipleParamsSelected($paramsForList2, $years); $map = new HashMap(); $map->put(0, $listValues1); $map->put(1, $listValues2); return $map; } else { if ($params->theOptionAllHasBeenSelected()) { $listValues = $this->repository->getValuesWhenTheOptionAllWasSelected($params->getSubgroup(), $params->getVariety(), $params->getType(), $params->getOrigin(), $params->getDestiny(), $params->getFont(), $years); } else { $listValues = $this->repository->getValuesWithMultipleParamsSelected($params, $years); } return $listValues; } }