I don't know why this won't work:
->add('productSearchType', EntityType::class, array(
'label' => 'entity.text.product.product_search_number_type',
'class' => AC\ProductBundle\Entity\ProductSearchType::class,
'choice_label' => 'designation',
'expanded' => false,
'placeholder' =>
'entity.text.product.select_product_search_number_type',
'query_builder' => function (EntityRepository $er) {
return $er->createQueryBuilder('e')
->orderBy('e.designation', 'ASC');
},
))
That's the error message:
Catchable Fatal Error: Argument 1 passed to
Symfony\Bridge\Doctrine\Form\Type\DoctrineType::__construct()
must implement interface Doctrine\Common\Persistence\ManagerRegistry,
none given, called in (...)\src\Symfony\Component\Form\FormRegistry.php
on line 85 and defined (...)