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