/** * Index action (fetch all ui locales) * * @return JsonResponse */ public function indexAction() { return new JsonResponse($this->normalizer->normalize($this->localeProvider->getLocales(), 'internal_api')); }
/** * {@inheritdoc} */ public function configureOptions(OptionsResolver $resolver) { $choices = $this->localeProvider->getLocales(); $resolver->setDefaults(['choices' => $choices]); }