src/Forms/RegionSelectionField.php
public function getSource()
    {
        $field = $this
            ->getForm()
            ->Fields()
            ->dataFieldByName($this->country_field);

        if (empty($field) || empty($field->Value())) {
            $locale = strtoupper(Locale::getRegion(i18n::get_locale()));
        } else {
            $locale = $field->Value();
        }

        return $this
            ->getList($locale)
            ->map("Code", "Name")
            ->toArray();
    }
public function getSource()
    {
        $field = $this
            ->getForm()
            ->Fields()
            ->dataFieldByName($this->country_field);

        if (empty($field) || empty($field->Value())) {
            $locale = strtoupper(Locale::getRegion(i18n::get_locale()));
        } else {
            $locale = $field->Value();
        }

        return $this
            ->getList($locale)
            ->map("Code", "Name")
            ->toArray();
    }
public function getSource ( ) { $ field = $ this -> getForm ( ) -> Fields ( ) -> dataFieldByName ( $ this -> country_field ) ; if ( empty ( $ field ) || empty ( $ field -> Value ( ) ) ) { $ locale = strtoupper ( Locale :: getRegion ( i18n :: get_locale ( ) ) ) ; } else { $ locale = $ field -> Value ( ) ; } return $ this -> getList ( $ locale ) -> map ( "Code" , "Name" ) -> toArray ( ) ; }
Overwrite default get source to return
custom list of regions

@return array|ArrayAccess
Overwrite default get source to return custom list of regions