I want to get customize choices from a FormType
This is is the FormType:
builder->add('demandes', EntityType::class, [
'placeholder' => 'Choisissez une option',
'class' => DemandeCandidats::class,
'mapped' => false,
])
And this the repository
public function findActif($value)
{
return $this->createQueryBuilder('d')
->andWhere('d.etat = :val')
->setParameter('val', "actif")
->getQuery()
->getResult()
;
}
How to add this repository to EntityType ?