_configFactory = $configFactory; $this->_countryCollectionFactory = $countryCollectionFactory; } /** * {@inheritdoc} */ public function toOptionArray($isMultiselect = false) { $supported = $this->_configFactory->create()->getSupportedMerchantCountryCodes(); $options = $this->_countryCollectionFactory->create()->addCountryCodeFilter( $supported, 'iso2' )->loadData()->toOptionArray( $isMultiselect ? false : __('--Please Select--') ); return $options; } }