public function getCountriesList($prefixisocode = false)
    {
        $countries = self::config()->iso_3166_country_codes;
        asort($countries);
        if ($allowed = $this->owner->AllowedCountries) {
            $allowed = json_decode($allowed);
            if (!empty($allowed)) {
                $countries = array_intersect_key($countries, array_flip($allowed));
            }
        }
        if ($prefixisocode) {
            foreach ($countries as $key => $value) {
                $countries[$key] = "$key - $value";
            }
        }
        return $countries;
    }
public function getCountriesList($prefixisocode = false)
    {
        $countries = self::config()->iso_3166_country_codes;
        asort($countries);
        if ($allowed = $this->owner->AllowedCountries) {
            $allowed = json_decode($allowed);
            if (!empty($allowed)) {
                $countries = array_intersect_key($countries, array_flip($allowed));
            }
        }
        if ($prefixisocode) {
            foreach ($countries as $key => $value) {
                $countries[$key] = "$key - $value";
            }
        }
        return $countries;
    }
public function getCountriesList ( $ prefixisocode = false ) { $ countries = self :: config ( ) -> iso_3166_country_codes ; asort ( $ countries ) ; if ( $ allowed = $ this -> owner -> AllowedCountries ) { $ allowed = json_decode ( $ allowed ) ; if ( ! empty ( $ allowed ) ) { $ countries = array_intersect_key ( $ countries , array_flip ( $ allowed ) ) ; } } if ( $ prefixisocode ) { foreach ( $ countries as $ key => $ value ) { $ countries [ $ key ] = "$key - $value" ; } } return $ countries ; }
Get list of allowed countries

@param boolean $prefixisocode - prefix the country code

@return array
Get list of allowed countries