$builder->add('parent', EntityType::class, array(
'class' => 'AdBundle:AdLocation',
'choice_label' => 'title',
'query_builder' => function(EntityRepository $er) {
return $er->createQueryBuilder('l')
->where('l.visible = :visible')
->setParameter('visible', true);
}
))