src/UthandoCommon/Form/Element/LibPhoneNumberCountryList.php
public function init()
    {
        $libPhoneNumber = PhoneNumberUtil::getInstance();
        $optionsList    = [];

        foreach ($libPhoneNumber->getSupportedRegions() as $code) {
            $fullTextCountry = \Locale::getDisplayRegion('en_' . $code, 'en');
            $optionsList[$code] = $fullTextCountry;
        }

        asort($optionsList);

        $this->setValueOptions($optionsList);
    }
public function init()
    {
        $libPhoneNumber = PhoneNumberUtil::getInstance();
        $optionsList    = [];

        foreach ($libPhoneNumber->getSupportedRegions() as $code) {
            $fullTextCountry = \Locale::getDisplayRegion('en_' . $code, 'en');
            $optionsList[$code] = $fullTextCountry;
        }

        asort($optionsList);

        $this->setValueOptions($optionsList);
    }
public function init ( ) { $ libPhoneNumber = PhoneNumberUtil :: getInstance ( ) ; $ optionsList = [ ] ; foreach ( $ libPhoneNumber -> getSupportedRegions ( ) as $ code ) { $ fullTextCountry = \ Locale :: getDisplayRegion ( 'en_' . $ code , 'en' ) ; $ optionsList [ $ code ] = $ fullTextCountry ; } asort ( $ optionsList ) ; $ this -> setValueOptions ( $ optionsList ) ; }
set up option list
set up option list