Example #1
0
 /**
  * Retrieve option array with allowed countries
  *
  * @return array
  */
 public function toOptionArray()
 {
     $_allowed = $this->_config->getAllowedCountries();
     $result = [];
     foreach ($_allowed as $iso => $info) {
         $result[] = ['value' => $iso, 'label' => $info['name']];
     }
     return $result;
 }
Example #2
0
 /**
  * Get allowed country names array
  *
  * @return array
  */
 protected function _getCountriesArray()
 {
     $_allowed = $this->_config->getAllowedCountries();
     $result = [];
     foreach ($_allowed as $iso => $info) {
         $result[$iso] = $info['name'];
     }
     return $result;
 }