public function configureOptions(OptionsResolver $resolver)
{
parent::configureOptions($resolver);
$resolver->setDefaults(['choices' => function (Options $options) {
if (null === $options['enabled']) {
return $this->localeRepository->findAll();
}
return $this->localeRepository->findBy(['enabled' => $options['enabled']]);
}, 'choice_value' => 'code', 'choice_label' => 'name', 'choice_translation_domain' => false, 'enabled' => null, 'label' => 'sylius.form.locale.locale', 'placeholder' => 'sylius.form.locale.select']);
}