diff --git a/Form/Type/Export/AggregatorType.php b/Form/Type/Export/AggregatorType.php index bcbe48ec7..ad68340d6 100644 --- a/Form/Type/Export/AggregatorType.php +++ b/Form/Type/Export/AggregatorType.php @@ -69,10 +69,6 @@ class AggregatorType extends AbstractType public function configureOptions(OptionsResolver $resolver) { $resolver->setRequired('aggregator_alias') - ->setRequired('aggregators_length') - ->setAllowedTypes(array( - 'aggregators_length' => 'int' - )) ->setDefault('compound', true) ; } diff --git a/Form/Type/Export/ExportType.php b/Form/Type/Export/ExportType.php index 21d525b7e..b0d38e989 100644 --- a/Form/Type/Export/ExportType.php +++ b/Form/Type/Export/ExportType.php @@ -73,16 +73,14 @@ class ExportType extends AbstractType $builder->add($filterBuilder); //add aggregators - $aggregators = iterator_to_array($this->exportManager - ->getAggregatorsApplyingOn($export->supportsModifiers())); + $aggregators = $this->exportManager + ->getAggregatorsApplyingOn($export->supportsModifiers()); $aggregatorBuilder = $builder->create('aggregators', 'form', array('compound' => true)); - $nb = count($aggregators); foreach($aggregators as $alias => $aggregator) { $aggregatorBuilder->add($alias, new AggregatorType($this->exportManager), array( 'aggregator_alias' => $alias, - 'aggregators_length' => $nb, 'label' => $aggregator->getTitle() )); }