41 \
Magento\Framework\
Data\Collection\AbstractDb $resourceCollection =
null,
44 $this->_localeCurrency = $localeCurrency;
59 foreach ($allowedCurrencies as $currencyCode) {
62 'Selected allowed currency "%1" is not available in installed currencies.',
63 $this->_localeCurrency->getCurrency($currencyCode)->getName()
70 'Default display currency "%1" is not available in allowed currencies.',
71 $this->_localeCurrency->getCurrency($this->_getCurrencyDefault())->getName()
76 throw new \Magento\Framework\Exception\LocalizedException(
__(join(
"\n", $exceptions)));
79 return parent::afterSave();
88 $value = $this->getValue();
89 $isFormData = $this->
getData(
'groups/options/fields') !==
null;
90 if ($isFormData && $this->
getData(
'groups/options/fields/allow/inherit')) {
91 $value = (string)$this->_config->getValue(
92 \
Magento\Directory\Model\Currency::XML_PATH_CURRENCY_ALLOW,
98 return explode(
',',
$value);
getData($key='', $index=null)
_getInstalledCurrencies()
__construct(\Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\App\Config\ScopeConfigInterface $config, \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList, \Magento\Framework\Locale\CurrencyInterface $localeCurrency, \Magento\Framework\Model\ResourceModel\AbstractResource $resource=null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection=null, array $data=[])