Paypal Backend helper
Definition at line 13 of file Backend.php.
◆ __construct()
- Parameters
-
\Magento\Framework\App\Helper\Context | $context | |
\Magento\Directory\Helper\Data | $directoryHelper | |
\Magento\Config\Model\Config | $backendConfig | |
\Magento\Config\Model\Config\ScopeDefiner | $scopeDefiner | |
Definition at line 36 of file Backend.php.
42 parent::__construct($context);
◆ getConfigurationCountryCode()
getConfigurationCountryCode |
( |
| ) |
|
Get selected merchant country code in system configuration
- Returns
- string
Definition at line 53 of file Backend.php.
55 $countryCode = $this->_request->getParam(\
Magento\Paypal\Model\Config\StructurePlugin::REQUEST_PARAM_COUNTRY);
56 if ($countryCode ===
null || preg_match(
'/^[a-zA-Z]{2}$/', $countryCode) == 0) {
57 $scope = $this->scopeDefiner->getScope();
59 $this->backendConfig->setData($scope, $this->_request->getParam($scope));
61 $countryCode = $this->backendConfig->getConfigDataValue(
62 \
Magento\Paypal\Block\Adminhtml\System\Config\Field\Country::FIELD_CONFIG_PATH
65 if (empty($countryCode)) {
66 $countryCode = $this->directoryHelper->getDefaultCountry();
◆ $backendConfig
◆ $directoryHelper
◆ $scopeDefiner
The documentation for this class was generated from the following file: