mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 13:54:23 +00:00
remove unused param in aggregators type + fix bug with labels
This commit is contained in:
parent
630be1d3d2
commit
b7f92a71cf
@ -69,10 +69,6 @@ class AggregatorType extends AbstractType
|
|||||||
public function configureOptions(OptionsResolver $resolver)
|
public function configureOptions(OptionsResolver $resolver)
|
||||||
{
|
{
|
||||||
$resolver->setRequired('aggregator_alias')
|
$resolver->setRequired('aggregator_alias')
|
||||||
->setRequired('aggregators_length')
|
|
||||||
->setAllowedTypes(array(
|
|
||||||
'aggregators_length' => 'int'
|
|
||||||
))
|
|
||||||
->setDefault('compound', true)
|
->setDefault('compound', true)
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
@ -73,16 +73,14 @@ class ExportType extends AbstractType
|
|||||||
$builder->add($filterBuilder);
|
$builder->add($filterBuilder);
|
||||||
|
|
||||||
//add aggregators
|
//add aggregators
|
||||||
$aggregators = iterator_to_array($this->exportManager
|
$aggregators = $this->exportManager
|
||||||
->getAggregatorsApplyingOn($export->supportsModifiers()));
|
->getAggregatorsApplyingOn($export->supportsModifiers());
|
||||||
$aggregatorBuilder = $builder->create('aggregators', 'form',
|
$aggregatorBuilder = $builder->create('aggregators', 'form',
|
||||||
array('compound' => true));
|
array('compound' => true));
|
||||||
$nb = count($aggregators);
|
|
||||||
|
|
||||||
foreach($aggregators as $alias => $aggregator) {
|
foreach($aggregators as $alias => $aggregator) {
|
||||||
$aggregatorBuilder->add($alias, new AggregatorType($this->exportManager), array(
|
$aggregatorBuilder->add($alias, new AggregatorType($this->exportManager), array(
|
||||||
'aggregator_alias' => $alias,
|
'aggregator_alias' => $alias,
|
||||||
'aggregators_length' => $nb,
|
|
||||||
'label' => $aggregator->getTitle()
|
'label' => $aggregator->getTitle()
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user