Mage2\User\Models\Address::getCountryIdAttribute PHP Method

getCountryIdAttribute() public method

    public function getCountryIdAttribute()
    {
        if (isset($this->attributes['country_id']) && $this->attributes['country_id'] > 0) {
            return $this->attributes['country_id'];
        }
        $defaultCountry = Configuration::getConfiguration('mage2_address_default_country');
        if (isset($defaultCountry)) {
            return $defaultCountry;
        }
        return "";
    }