Get Google Maps API countries

@return array
485300
public function getGoogleMapAddressCountries()
    {
        return explode(
            ',',
            (string) $this->scopeConfig->getValue(
                self::XML_GOOGLE_MAP_ADDRESS_COUNTRY,
                \Magento\Store\Model\ScopeInterface::SCOPE_STORE
            )
        );
    }
237235
public function regionslist()
    {
        $id = $this->getRequest()->param("ID");
        $data = $this->getList($id)->map("Code", "Name")->toArray();

        return json_encode($data);
    }
672834
public function getAllFlat()
    {
        $aOut       = array();
        $aCountries = $this->getAll();

        foreach ($aCountries as $oCountry) {
            $aOut[$oCountry->code] = $oCountry->label;
        }

        return $aOut;
    }
640399
public function getUiLangsList() {
		$result = [];
		$UIlangs = $this->_modelConfigSettingsApp->getUiLangs();
		if (empty($UIlangs)) {
			return $result;
		}

		$language = new Language();
		foreach ($UIlangs as $country => $UIlang) {
			$langName = $language->convertLangCode($UIlang, 'native');
			if (empty($langName)) {
				continue;
			}

			$result[$country] = mb_ucfirst($langName);
		}

		return $result;
	}
482349
public function get_list_of_countries($returnall = false, $lang = null) {
        global $CFG;

        if ($lang === null) {
            $lang = current_language();
        }

        $countries = $this->load_component_strings('core_countries', $lang);
        core_collator::asort($countries);
        if (!$returnall and !empty($CFG->allcountrycodes)) {
            $enabled = explode(',', $CFG->allcountrycodes);
            $return = array();
            foreach ($enabled as $c) {
                if (isset($countries[$c])) {
                    $return[$c] = $countries[$c];
                }
            }
            return $return;
        }

        return $countries;
    }
698023
public function geot_cities_by_country() {
		global $wpdb;

		if ( empty( $_POST['country'] ) ) {
			die();
		}

		$cities = geot_get_cities( $_POST['country'] );
		$json   = [];
		if ( ! empty( $cities ) ) {
			$cities = json_decode( $cities );

			foreach ( $cities as $c ) {
				$json[] = [ 'name' => $c->city ];
			}
		}
		echo json_encode( $json );
		die();
	}
1008341
private function getCountry()
    {
        if (null === $this->country) {
            $this->country = $this->loadXml($this->countryFile);
        }

        return $this->country;
    }
311924
public static function getNameMap(): array
    {
        if (self::$nameMap === null) {
            self::$nameMap = [];
            $countries     = self::getLoader()->all();

            foreach ($countries as $country) {
                self::$nameMap[$country['alpha2']] = $country['name'];
            }

            self::$alpha2CodeMap = array_flip(self::$nameMap);
        }

        return self::$nameMap;
    }
1249693
public function getLocaleArray()
	{
		$localeArray = array();

		foreach ($this->getLocales() as $locale) {

			$country = $locale->getCountry();

			if (! isset($localeArray[$country])) {
				$localeArray[$country] = array(
					'title' => $country,
					'languages' => array()
				);
			}

			$localeArray[$country]['languages'][] = array(
				'id' => $locale->getId(),
				'title' => $locale->getTitle(),
				'flag' => $locale->getProperty('flag')
			);
		}

		return array_values($localeArray);
	}
1253703
public function getCountries($includeNoLongerUsingVAT = false)
    {
        if ($includeNoLongerUsingVAT) {
            return $this->countries;
        }

        return array_filter($this->countries, function ($country) {
            /** @var VATCountry $country */
            return $country->usedVATOnCurrentDate();
        });
    }
769768
public function getLocales()
	{
		$currentLocales = array();
		
		foreach($this->localeCategories as $category) {
			if($category === LC_ALL)
				continue;
			
			$currentLocales[$category] = setlocale($category, 0);
		}
		
		return $currentLocales;
	}
334187
public function getGoogleMapAddressLanguage()
    {
        return $this->scopeConfig->getValue(
            self::XML_GOOGLE_MAP_ADDRESS_LANGUAGE,
            \Magento\Store\Model\ScopeInterface::SCOPE_STORE
        );
    }
646711
public function getAllowedCountries()
    {
        // Get allowed_countries from extending object. (ie. Page, DataObject)
        $allowedCountries = $this->owner->config()->allowed_countries;
        if (is_array($allowedCountries) &&
            $allowedCountries) {
            return $allowedCountries;
        }

        // Get allowed countries global. If there are no specific rules on a Page/DataObject
        // fallback to what is configured on this extension
        $allowedCountries = Config::inst()->get(__CLASS__, 'allowed_countries');
        if (is_array($allowedCountries) &&
            $allowedCountries) {
            return $allowedCountries;
        }

        // Finally, fallback to a full list of countries
        return IntlLocales::singleton()->config()->get('countries');
    }
687048
public function getLocations() {
    $data = [];

    $location_ids = $this->queryFactory->get('node')
      ->condition('type', 'branch')
      ->execute();

    if (!$location_ids) {
      return [];
    }

    $storage = $this->entityTypeManager->getStorage('node');
    $locations = $storage->loadMultiple($location_ids);

    foreach ($locations as $location) {
      $data[$location->id()] = [
        'title' => $location->label(),
      ];
    }

    return $data;
  }
1050063
public function getAvailableLocales()
    {
        $availableLocales = [];
        $translations = $this->getTranslations();
        foreach ($translations as $translation) {
            $availableLocales[] = $translation->getLocale();
        }

        return $availableLocales;
    }
186124
public function getMap()
    {
        $result = [];

        foreach ($this->getConstants() as $dbName => $dbValue) {
            if (0 === strpos($dbName, self::PREFIX_DB)) {
                $result[$dbValue] = $this->getAppropriateConstValue(self::PREFIX_DB, $dbName);
            }
        }

        return $result;
    }
627598
public function getCountries(): array
    {

        $loadCountries = $this->countryHelper->toOptionArray();
        $countries = [];
        $i = 0;
        foreach ($loadCountries as $country ) {
            $i++;
            if ($i == 1) { //remove first element that is a select
                continue;
            }
            $countries[$country["value"]] = $country["label"];
        }
        return $countries;
    }