/**
  * {@inheritdoc}
  */
 public function getList($locale = null)
 {
     if ($this->countryRepository) {
         $countryNames = $this->countryRepository->getList($locale);
     } else {
         $locale = $this->canonicalizeLocale($locale);
         $countryNames = $this->regionBundle->getCountryNames($locale);
     }
     return $countryNames;
 }
예제 #2
0
 /**
  * {@inheritdoc}
  */
 public function getList($locale = null)
 {
     if ($this->countryRepository) {
         $countryNames = $this->countryRepository->getList($locale);
     } else {
         $locale = LocaleHelper::canonicalize($locale);
         // symfony/intl uses underscores.
         $locale = str_replace('-', '_', $locale);
         $countryNames = $this->regionBundle->getCountryNames($locale);
     }
     return $countryNames;
 }