fix deprecations: use fqcn for formtype

This commit is contained in:
nobohan 2018-04-09 12:15:34 +02:00
parent 7e36eee27a
commit 7119de8223
2 changed files with 39 additions and 37 deletions

View File

@ -22,8 +22,10 @@ namespace Chill\MainBundle\Form\Type\Export;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Form\FormBuilderInterface;
use Chill\MainBundle\Export\ExportManager;
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
use Symfony\Component\Form\Extension\Core\Type\FormType;
use Chill\MainBundle\Export\ExportManager;
/**
*
@ -54,7 +56,7 @@ class AggregatorType extends AbstractType
'data' => false
));
$filterFormBuilder = $builder->create('form', 'form', array(
$filterFormBuilder = $builder->create('form', FormType::class, array(
'compound' => true,
'required' => false,
'error_bubbling' => false

View File

@ -77,7 +77,7 @@ class ExportType extends AbstractType
//add filters
$filters = $this->exportManager->getFiltersApplyingOn($export, $options['picked_centers']);
$filterBuilder = $builder->create(self::FILTER_KEY, 'form', array('compound' => true));
$filterBuilder = $builder->create(self::FILTER_KEY, FormType::class, array('compound' => true));
foreach($filters as $alias => $filter) {
$filterBuilder->add($alias, new FilterType($this->exportManager), array(
@ -94,7 +94,7 @@ class ExportType extends AbstractType
//add aggregators
$aggregators = $this->exportManager
->getAggregatorsApplyingOn($export, $options['picked_centers']);
$aggregatorBuilder = $builder->create(self::AGGREGATOR_KEY, 'form',
$aggregatorBuilder = $builder->create(self::AGGREGATOR_KEY, FormType::class,
array('compound' => true));
foreach($aggregators as $alias => $aggregator) {