diff --git a/app/code/Magento/AdminNotification/Model/System/Message/Baseurl.php b/app/code/Magento/AdminNotification/Model/System/Message/Baseurl.php index e9e00749a4fb2..12eb318e92f5e 100644 --- a/app/code/Magento/AdminNotification/Model/System/Message/Baseurl.php +++ b/app/code/Magento/AdminNotification/Model/System/Message/Baseurl.php @@ -8,6 +8,8 @@ namespace Magento\AdminNotification\Model\System\Message; +use Magento\Store\Model\Store; + class Baseurl implements \Magento\Framework\Notification\MessageInterface { /** @@ -56,9 +58,9 @@ public function __construct( protected function _getConfigUrl() { $output = ''; - $defaultUnsecure = $this->_config->getValue(\Magento\Store\Model\Store::XML_PATH_UNSECURE_BASE_URL, 'default'); + $defaultUnsecure = $this->_config->getValue(Store::XML_PATH_UNSECURE_BASE_URL, 'default'); - $defaultSecure = $this->_config->getValue(\Magento\Store\Model\Store::XML_PATH_SECURE_BASE_URL, 'default'); + $defaultSecure = $this->_config->getValue(Store::XML_PATH_SECURE_BASE_URL, 'default'); if ($defaultSecure == \Magento\Store\Model\Store::BASE_URL_PLACEHOLDER || $defaultUnsecure == \Magento\Store\Model\Store::BASE_URL_PLACEHOLDER diff --git a/app/code/Magento/AdminNotification/Model/System/Message/Security.php b/app/code/Magento/AdminNotification/Model/System/Message/Security.php index 3a966391c75cb..378596188378e 100644 --- a/app/code/Magento/AdminNotification/Model/System/Message/Security.php +++ b/app/code/Magento/AdminNotification/Model/System/Message/Security.php @@ -8,6 +8,8 @@ namespace Magento\AdminNotification\Model\System\Message; +use Magento\Store\Model\Store; + class Security implements \Magento\Framework\Notification\MessageInterface { /** @@ -93,7 +95,7 @@ private function _canShowNotification() */ private function _isFileAccessible() { - $unsecureBaseURL = $this->_config->getValue(\Magento\Store\Model\Store::XML_PATH_UNSECURE_BASE_URL, 'default'); + $unsecureBaseURL = $this->_config->getValue(Store::XML_PATH_UNSECURE_BASE_URL, 'default'); /** @var $http \Magento\Framework\HTTP\Adapter\Curl */ $http = $this->_curlFactory->create(); diff --git a/app/code/Magento/Backend/App/AbstractAction.php b/app/code/Magento/Backend/App/AbstractAction.php index 2d793e5632e9c..6efb27722a57e 100644 --- a/app/code/Magento/Backend/App/AbstractAction.php +++ b/app/code/Magento/Backend/App/AbstractAction.php @@ -72,7 +72,7 @@ abstract class AbstractAction extends \Magento\Framework\App\Action\Action protected $_canUseBaseUrl; /** - * @var \Magento\Core\App\Action\FormKeyValidator + * @var \Magento\Framework\Data\Form\FormKey\Validator */ protected $_formKeyValidator; diff --git a/app/code/Magento/Backend/App/Action/Context.php b/app/code/Magento/Backend/App/Action/Context.php index ceae4ef4bf04e..0630d8213d241 100644 --- a/app/code/Magento/Backend/App/Action/Context.php +++ b/app/code/Magento/Backend/App/Action/Context.php @@ -32,7 +32,7 @@ class Context extends \Magento\Framework\App\Action\Context protected $_backendUrl; /** - * @var \Magento\Core\App\Action\FormKeyValidator + * @var \Magento\Framework\Data\Form\FormKey\Validator */ protected $_formKeyValidator; @@ -66,7 +66,7 @@ class Context extends \Magento\Framework\App\Action\Context * @param \Magento\Backend\Model\Auth $auth * @param \Magento\Backend\Helper\Data $helper * @param \Magento\Backend\Model\UrlInterface $backendUrl - * @param \Magento\Core\App\Action\FormKeyValidator $formKeyValidator + * @param \Magento\Framework\Data\Form\FormKey\Validator $formKeyValidator * @param \Magento\Framework\Locale\ResolverInterface $localeResolver * @param bool $canUseBaseUrl * @SuppressWarnings(PHPMD.ExcessiveParameterList) @@ -86,7 +86,7 @@ public function __construct( \Magento\Backend\Model\Auth $auth, \Magento\Backend\Helper\Data $helper, \Magento\Backend\Model\UrlInterface $backendUrl, - \Magento\Core\App\Action\FormKeyValidator $formKeyValidator, + \Magento\Framework\Data\Form\FormKey\Validator $formKeyValidator, \Magento\Framework\Locale\ResolverInterface $localeResolver, $canUseBaseUrl = false ) { @@ -146,7 +146,7 @@ public function getCanUseBaseUrl() } /** - * @return \Magento\Core\App\Action\FormKeyValidator + * @return \Magento\Framework\Data\Form\FormKey\Validator */ public function getFormKeyValidator() { diff --git a/app/code/Magento/Backend/App/Router.php b/app/code/Magento/Backend/App/Router.php index 3ae734acb76f9..fbcacd862a219 100644 --- a/app/code/Magento/Backend/App/Router.php +++ b/app/code/Magento/Backend/App/Router.php @@ -8,7 +8,7 @@ */ namespace Magento\Backend\App; -class Router extends \Magento\Core\App\Router\Base +class Router extends \Magento\Framework\App\Router\Base { /** * @var \Magento\Backend\App\ConfigInterface @@ -53,11 +53,9 @@ class Router extends \Magento\Core\App\Router\Base * @param \Magento\Framework\App\ResponseFactory $responseFactory * @param \Magento\Framework\App\Route\ConfigInterface $routeConfig * @param \Magento\Framework\UrlInterface $url - * @param \Magento\Store\Model\StoreManagerInterface $storeManager - * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig - * @param \Magento\Framework\Url\SecurityInfoInterface $urlSecurityInfo * @param string $routerId * @param \Magento\Framework\Code\NameBuilder $nameBuilder + * @param \Magento\Framework\App\Router\PathConfigInterface $pathConfig * @param \Magento\Framework\App\Config\ScopeConfigInterface $coreConfig * @param \Magento\Backend\App\ConfigInterface $backendConfig * @@ -70,11 +68,9 @@ public function __construct( \Magento\Framework\App\ResponseFactory $responseFactory, \Magento\Framework\App\Route\ConfigInterface $routeConfig, \Magento\Framework\UrlInterface $url, - \Magento\Store\Model\StoreManagerInterface $storeManager, - \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, - \Magento\Framework\Url\SecurityInfoInterface $urlSecurityInfo, $routerId, \Magento\Framework\Code\NameBuilder $nameBuilder, + \Magento\Framework\App\Router\PathConfigInterface $pathConfig, \Magento\Framework\App\Config\ScopeConfigInterface $coreConfig, \Magento\Backend\App\ConfigInterface $backendConfig ) { @@ -85,11 +81,9 @@ public function __construct( $responseFactory, $routeConfig, $url, - $storeManager, - $scopeConfig, - $urlSecurityInfo, $routerId, - $nameBuilder + $nameBuilder, + $pathConfig ); $this->_coreConfig = $coreConfig; $this->_backendConfig = $backendConfig; diff --git a/app/code/Magento/Backend/Block/System/Cache/Form.php b/app/code/Magento/Backend/Block/System/Cache/Form.php index fb098810898de..7265e5336ed71 100644 --- a/app/code/Magento/Backend/Block/System/Cache/Form.php +++ b/app/code/Magento/Backend/Block/System/Cache/Form.php @@ -13,25 +13,25 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic { /** - * @var \Magento\Core\Helper\Data + * @var \Magento\Framework\App\Cache\TypeListInterface */ - protected $_coreData; + protected $cacheTypeList; /** * @param \Magento\Backend\Block\Template\Context $context * @param \Magento\Framework\Registry $registry * @param \Magento\Framework\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, + \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList, array $data = [] ) { - $this->_coreData = $coreData; + $this->cacheTypeList = $cacheTypeList; parent::__construct($context, $registry, $formFactory, $data); } @@ -63,7 +63,7 @@ public function initForm() ] ); - foreach ($this->_coreData->getCacheTypes() as $type => $label) { + foreach ($this->cacheTypeList->getTypeLabels() as $type => $label) { $fieldset->addField( 'enable_' . $type, 'checkbox', diff --git a/app/code/Magento/Backend/Helper/Dashboard/AbstractDashboard.php b/app/code/Magento/Backend/Helper/Dashboard/AbstractDashboard.php index d788419b38025..2e8c60f95bab0 100644 --- a/app/code/Magento/Backend/Helper/Dashboard/AbstractDashboard.php +++ b/app/code/Magento/Backend/Helper/Dashboard/AbstractDashboard.php @@ -5,12 +5,10 @@ */ namespace Magento\Backend\Helper\Dashboard; -use Magento\Core\Helper\Data as HelperData; - /** * Adminhtml abstract dashboard helper. */ -abstract class AbstractDashboard extends HelperData +abstract class AbstractDashboard extends \Magento\Framework\App\Helper\AbstractHelper { /** * Helper collection diff --git a/app/code/Magento/Backend/Helper/Dashboard/Data.php b/app/code/Magento/Backend/Helper/Dashboard/Data.php index 17cffb3f53c45..c72171c9199e6 100644 --- a/app/code/Magento/Backend/Helper/Dashboard/Data.php +++ b/app/code/Magento/Backend/Helper/Dashboard/Data.php @@ -10,7 +10,7 @@ /** * Data helper for dashboard */ -class Data extends \Magento\Core\Helper\Data +class Data extends \Magento\Framework\App\Helper\AbstractHelper { /** * @var \Magento\Framework\Data\Collection\Db @@ -27,33 +27,26 @@ class Data extends \Magento\Core\Helper\Data */ const INSTALL_DATE = 'install/date'; + /** + * @var \Magento\Store\Model\StoreManagerInterface + */ + private $_storeManager; + /** * @param \Magento\Framework\App\Helper\Context $context - * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig * @param \Magento\Store\Model\StoreManagerInterface $storeManager - * @param \Magento\Framework\App\State $appState - * @param \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency * @param DeploymentConfig $deploymentConfig - * @param bool $dbCompatibleMode */ public function __construct( \Magento\Framework\App\Helper\Context $context, - \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Store\Model\StoreManagerInterface $storeManager, - \Magento\Framework\App\State $appState, - \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency, - DeploymentConfig $deploymentConfig, - $dbCompatibleMode = true + DeploymentConfig $deploymentConfig ) { parent::__construct( - $context, - $scopeConfig, - $storeManager, - $appState, - $priceCurrency, - $dbCompatibleMode + $context ); $this->_installDate = $deploymentConfig->get(self::INSTALL_DATE); + $this->_storeManager = $storeManager; } /** diff --git a/app/code/Magento/Backend/Helper/Dashboard/Order.php b/app/code/Magento/Backend/Helper/Dashboard/Order.php index 899e2b2ee6e04..df9396bbe3247 100644 --- a/app/code/Magento/Backend/Helper/Dashboard/Order.php +++ b/app/code/Magento/Backend/Helper/Dashboard/Order.php @@ -17,30 +17,15 @@ class Order extends \Magento\Backend\Helper\Dashboard\AbstractDashboard /** * @param \Magento\Framework\App\Helper\Context $context - * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig - * @param \Magento\Store\Model\StoreManagerInterface $storeManager - * @param \Magento\Framework\App\State $appState - * @param \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency * @param \Magento\Reports\Model\Resource\Order\Collection $orderCollection - * @param bool $dbCompatibleMode */ public function __construct( \Magento\Framework\App\Helper\Context $context, - \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, - \Magento\Store\Model\StoreManagerInterface $storeManager, - \Magento\Framework\App\State $appState, - \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency, - \Magento\Reports\Model\Resource\Order\Collection $orderCollection, - $dbCompatibleMode = true + \Magento\Reports\Model\Resource\Order\Collection $orderCollection ) { $this->_orderCollection = $orderCollection; parent::__construct( - $context, - $scopeConfig, - $storeManager, - $appState, - $priceCurrency, - $dbCompatibleMode + $context ); } diff --git a/app/code/Magento/Backend/Model/Translate/Inline/Config.php b/app/code/Magento/Backend/Model/Translate/Inline/Config.php index 6817f9e166a73..c78299439efc7 100644 --- a/app/code/Magento/Backend/Model/Translate/Inline/Config.php +++ b/app/code/Magento/Backend/Model/Translate/Inline/Config.php @@ -13,21 +13,23 @@ class Config implements \Magento\Framework\Translate\Inline\ConfigInterface /** * @var \Magento\Backend\App\ConfigInterface */ - protected $_config; + protected $config; /** - * @var \Magento\Core\Helper\Data + * @var \Magento\Developer\Helper\Data */ - protected $_helper; + protected $devHelper; /** * @param \Magento\Backend\App\ConfigInterface $config - * @param \Magento\Core\Helper\Data $helper + * @param \Magento\Developer\Helper\Data $devHelper */ - public function __construct(\Magento\Backend\App\ConfigInterface $config, \Magento\Core\Helper\Data $helper) - { - $this->_config = $config; - $this->_helper = $helper; + public function __construct( + \Magento\Backend\App\ConfigInterface $config, + \Magento\Developer\Helper\Data $devHelper + ) { + $this->config = $config; + $this->devHelper = $devHelper; } /** @@ -35,7 +37,7 @@ public function __construct(\Magento\Backend\App\ConfigInterface $config, \Magen */ public function isActive($scope = null) { - return $this->_config->isSetFlag('dev/translate_inline/active_admin'); + return $this->config->isSetFlag('dev/translate_inline/active_admin'); } /** @@ -43,6 +45,6 @@ public function isActive($scope = null) */ public function isDevAllowed($scope = null) { - return $this->_helper->isDevAllowed($scope); + return $this->devHelper->isDevAllowed($scope); } } diff --git a/app/code/Magento/Backend/composer.json b/app/code/Magento/Backend/composer.json index c7550ac85fd96..29dfc0423c490 100644 --- a/app/code/Magento/Backend/composer.json +++ b/app/code/Magento/Backend/composer.json @@ -6,6 +6,7 @@ "magento/module-store": "0.42.0-beta8", "magento/module-directory": "0.42.0-beta8", "magento/module-core": "0.42.0-beta8", + "magento/module-developer": "0.42.0-beta8", "magento/module-eav": "0.42.0-beta8", "magento/module-cron": "0.42.0-beta8", "magento/module-theme": "0.42.0-beta8", diff --git a/app/code/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle/Option.php b/app/code/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle/Option.php index 3fbebc9a79a4d..0028de483092f 100644 --- a/app/code/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle/Option.php +++ b/app/code/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle/Option.php @@ -8,8 +8,6 @@ namespace Magento\Bundle\Block\Catalog\Product\View\Type\Bundle; -use Magento\Bundle\Model\Product\Price; - /** * Bundle option renderer */ @@ -30,9 +28,9 @@ class Option extends \Magento\Bundle\Block\Catalog\Product\Price protected $_showSingle; /** - * @var \Magento\Core\Helper\Data + * @var \Magento\Framework\Pricing\Helper\Data */ - protected $_coreHelper; + protected $pricingHelper; /** * @var \Magento\Tax\Helper\Data @@ -53,7 +51,7 @@ class Option extends \Magento\Bundle\Block\Catalog\Product\Price * @param \Magento\Framework\Math\Random $mathRandom * @param \Magento\Checkout\Helper\Cart $cartHelper * @param \Magento\Tax\Helper\Data $taxData - * @param \Magento\Core\Helper\Data $coreHelper + * @param \Magento\Framework\Pricing\Helper\Data $pricingHelper * @param array $data * * @SuppressWarnings(PHPMD.ExcessiveParameterList) @@ -67,10 +65,10 @@ public function __construct( \Magento\Framework\Math\Random $mathRandom, \Magento\Checkout\Helper\Cart $cartHelper, \Magento\Tax\Helper\Data $taxData, - \Magento\Core\Helper\Data $coreHelper, + \Magento\Framework\Pricing\Helper\Data $pricingHelper, array $data = [] ) { - $this->_coreHelper = $coreHelper; + $this->pricingHelper = $pricingHelper; $this->_catalogHelper = $catalogData; $this->_taxHelper = $taxData; parent::__construct( @@ -248,7 +246,7 @@ public function getSelectionPrice($selection) 1 ); if (is_numeric($price)) { - $price = $this->_coreHelper->currencyByStore($price, $store, false); + $price = $this->pricingHelper->currencyByStore($price, $store, false); } } return is_numeric($price) ? $price : 0; diff --git a/app/code/Magento/Bundle/Helper/Catalog/Product/Configuration.php b/app/code/Magento/Bundle/Helper/Catalog/Product/Configuration.php index 577c518d1e611..55a9f0c6724e5 100644 --- a/app/code/Magento/Bundle/Helper/Catalog/Product/Configuration.php +++ b/app/code/Magento/Bundle/Helper/Catalog/Product/Configuration.php @@ -17,9 +17,9 @@ class Configuration extends AbstractHelper implements ConfigurationInterface /** * Core data * - * @var \Magento\Core\Helper\Data + * @var \Magento\Framework\Pricing\Helper\Data */ - protected $coreData; + protected $pricingHelper; /** * Catalog product configuration @@ -38,17 +38,17 @@ class Configuration extends AbstractHelper implements ConfigurationInterface /** * @param \Magento\Framework\App\Helper\Context $context * @param \Magento\Catalog\Helper\Product\Configuration $productConfiguration - * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Framework\Pricing\Helper\Data $pricingHelper * @param \Magento\Framework\Escaper $escaper */ public function __construct( \Magento\Framework\App\Helper\Context $context, \Magento\Catalog\Helper\Product\Configuration $productConfiguration, - \Magento\Core\Helper\Data $coreData, + \Magento\Framework\Pricing\Helper\Data $pricingHelper, \Magento\Framework\Escaper $escaper ) { $this->productConfiguration = $productConfiguration; - $this->coreData = $coreData; + $this->pricingHelper = $pricingHelper; $this->escaper = $escaper; parent::__construct($context); } @@ -139,7 +139,9 @@ public function getBundleOptions(ItemInterface $item) $option['value'][] = $qty . ' x ' . $this->escaper->escapeHtml($bundleSelection->getName()) . ' ' - . $this->coreData->currency($this->getSelectionFinalPrice($item, $bundleSelection)); + . $this->pricingHelper->currency( + $this->getSelectionFinalPrice($item, $bundleSelection) + ); } } diff --git a/app/code/Magento/Bundle/Model/Product/Type.php b/app/code/Magento/Bundle/Model/Product/Type.php index b14a7d9292e62..e3dbc53bac480 100644 --- a/app/code/Magento/Bundle/Model/Product/Type.php +++ b/app/code/Magento/Bundle/Model/Product/Type.php @@ -144,7 +144,6 @@ class Type extends \Magento\Catalog\Model\Product\Type\AbstractType * @param \Magento\Eav\Model\Config $eavConfig * @param \Magento\Catalog\Model\Product\Type $catalogProductType * @param \Magento\Framework\Event\ManagerInterface $eventManager - * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Core\Helper\File\Storage\Database $fileStorageDb * @param \Magento\Framework\Filesystem $filesystem * @param \Magento\Framework\Registry $coreRegistry @@ -170,7 +169,6 @@ public function __construct( \Magento\Eav\Model\Config $eavConfig, \Magento\Catalog\Model\Product\Type $catalogProductType, \Magento\Framework\Event\ManagerInterface $eventManager, - \Magento\Core\Helper\Data $coreData, \Magento\Core\Helper\File\Storage\Database $fileStorageDb, \Magento\Framework\Filesystem $filesystem, \Magento\Framework\Registry $coreRegistry, @@ -206,7 +204,6 @@ public function __construct( $eavConfig, $catalogProductType, $eventManager, - $coreData, $fileStorageDb, $filesystem, $coreRegistry, diff --git a/app/code/Magento/Captcha/Helper/Adminhtml/Data.php b/app/code/Magento/Captcha/Helper/Adminhtml/Data.php index d1b3d77da6c3d..4cd99cbceee50 100644 --- a/app/code/Magento/Captcha/Helper/Adminhtml/Data.php +++ b/app/code/Magento/Captcha/Helper/Adminhtml/Data.php @@ -21,7 +21,6 @@ class Data extends \Magento\Captcha\Helper\Data /** * @param \Magento\Framework\App\Helper\Context $context * @param \Magento\Store\Model\StoreManager $storeManager - * @param \Magento\Framework\App\Config\ScopeConfigInterface $config * @param \Magento\Framework\Filesystem $filesystem * @param \Magento\Captcha\Model\CaptchaFactory $factory * @param \Magento\Backend\App\ConfigInterface $backendConfig @@ -29,13 +28,12 @@ class Data extends \Magento\Captcha\Helper\Data public function __construct( \Magento\Framework\App\Helper\Context $context, \Magento\Store\Model\StoreManager $storeManager, - \Magento\Framework\App\Config\ScopeConfigInterface $config, \Magento\Framework\Filesystem $filesystem, \Magento\Captcha\Model\CaptchaFactory $factory, \Magento\Backend\App\ConfigInterface $backendConfig ) { $this->_backendConfig = $backendConfig; - parent::__construct($context, $storeManager, $config, $filesystem, $factory); + parent::__construct($context, $storeManager, $filesystem, $factory); } /** diff --git a/app/code/Magento/Captcha/Helper/Data.php b/app/code/Magento/Captcha/Helper/Data.php index 47c0ad3a56bb0..922595252b905 100644 --- a/app/code/Magento/Captcha/Helper/Data.php +++ b/app/code/Magento/Captcha/Helper/Data.php @@ -44,11 +44,6 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper */ protected $_captcha = []; - /** - * @var \Magento\Framework\App\Config\ScopeConfigInterface - */ - protected $_config; - /** * @var Filesystem */ @@ -67,19 +62,16 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper /** * @param \Magento\Framework\App\Helper\Context $context * @param \Magento\Store\Model\StoreManagerInterface $storeManager - * @param \Magento\Framework\App\Config\ScopeConfigInterface $config * @param Filesystem $filesystem * @param \Magento\Captcha\Model\CaptchaFactory $factory */ public function __construct( \Magento\Framework\App\Helper\Context $context, \Magento\Store\Model\StoreManagerInterface $storeManager, - \Magento\Framework\App\Config\ScopeConfigInterface $config, Filesystem $filesystem, \Magento\Captcha\Model\CaptchaFactory $factory ) { $this->_storeManager = $storeManager; - $this->_config = $config; $this->_filesystem = $filesystem; $this->_factory = $factory; parent::__construct($context); @@ -115,7 +107,7 @@ public function getCaptcha($formId) */ public function getConfig($key, $store = null) { - return $this->_config->getValue( + return $this->scopeConfig->getValue( 'customer/captcha/' . $key, \Magento\Store\Model\ScopeInterface::SCOPE_STORE, $store @@ -132,7 +124,7 @@ public function getConfig($key, $store = null) */ public function getFonts() { - $fontsConfig = $this->_config->getValue(\Magento\Captcha\Helper\Data::XML_PATH_CAPTCHA_FONTS, 'default'); + $fontsConfig = $this->scopeConfig->getValue(\Magento\Captcha\Helper\Data::XML_PATH_CAPTCHA_FONTS, 'default'); $fonts = []; if ($fontsConfig) { $libDir = $this->_filesystem->getDirectoryRead(DirectoryList::LIB_INTERNAL); diff --git a/app/code/Magento/Catalog/Block/Product/View/Options.php b/app/code/Magento/Catalog/Block/Product/View/Options.php index 0a830a078df72..f80bdede71af3 100644 --- a/app/code/Magento/Catalog/Block/Product/View/Options.php +++ b/app/code/Magento/Catalog/Block/Product/View/Options.php @@ -47,9 +47,9 @@ class Options extends \Magento\Framework\View\Element\Template protected $_jsonEncoder; /** - * @var \Magento\Core\Helper\Data + * @var \Magento\Framework\Pricing\Helper\Data */ - protected $_coreData; + protected $pricingHelper; /** * @var \Magento\Catalog\Helper\Data @@ -58,7 +58,7 @@ class Options extends \Magento\Framework\View\Element\Template /** * @param \Magento\Framework\View\Element\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Framework\Pricing\Helper\Data $pricingHelper * @param \Magento\Catalog\Helper\Data $catalogData * @param \Magento\Framework\Json\EncoderInterface $jsonEncoder * @param \Magento\Catalog\Model\Product\Option $option @@ -68,7 +68,7 @@ class Options extends \Magento\Framework\View\Element\Template */ public function __construct( \Magento\Framework\View\Element\Template\Context $context, - \Magento\Core\Helper\Data $coreData, + \Magento\Framework\Pricing\Helper\Data $pricingHelper, \Magento\Catalog\Helper\Data $catalogData, \Magento\Framework\Json\EncoderInterface $jsonEncoder, \Magento\Catalog\Model\Product\Option $option, @@ -76,7 +76,7 @@ public function __construct( \Magento\Framework\Stdlib\ArrayUtils $arrayUtils, array $data = [] ) { - $this->_coreData = $coreData; + $this->pricingHelper = $pricingHelper; $this->_catalogData = $catalogData; $this->_jsonEncoder = $jsonEncoder; $this->_registry = $registry; @@ -155,11 +155,11 @@ public function hasOptions() */ protected function _getPriceConfiguration($option) { - $optionPrice = $this->_coreData->currency($option->getPrice(true), false, false); + $optionPrice = $this->pricingHelper->currency($option->getPrice(true), false, false); $data = [ 'prices' => [ 'oldPrice' => [ - 'amount' => $this->_coreData->currency($option->getPrice(false), false, false), + 'amount' => $this->pricingHelper->currency($option->getPrice(false), false, false), 'adjustments' => [], ], 'basePrice' => [ diff --git a/app/code/Magento/Catalog/Block/Product/View/Options/AbstractOptions.php b/app/code/Magento/Catalog/Block/Product/View/Options/AbstractOptions.php index 56874d583125f..58ab8d2db8b1c 100644 --- a/app/code/Magento/Catalog/Block/Product/View/Options/AbstractOptions.php +++ b/app/code/Magento/Catalog/Block/Product/View/Options/AbstractOptions.php @@ -30,9 +30,9 @@ abstract class AbstractOptions extends \Magento\Framework\View\Element\Template protected $_option; /** - * @var \Magento\Core\Helper\Data + * @var \Magento\Framework\Pricing\Helper\Data */ - protected $_coreHelper; + protected $pricingHelper; /** * @var \Magento\Catalog\Helper\Data @@ -41,17 +41,17 @@ abstract class AbstractOptions extends \Magento\Framework\View\Element\Template /** * @param \Magento\Framework\View\Element\Template\Context $context - * @param \Magento\Core\Helper\Data $coreHelper + * @param \Magento\Framework\Pricing\Helper\Data $pricingHelper * @param \Magento\Catalog\Helper\Data $catalogData, * @param array $data */ public function __construct( \Magento\Framework\View\Element\Template\Context $context, - \Magento\Core\Helper\Data $coreHelper, + \Magento\Framework\Pricing\Helper\Data $pricingHelper, \Magento\Catalog\Helper\Data $catalogData, array $data = [] ) { - $this->_coreHelper = $coreHelper; + $this->pricingHelper = $pricingHelper; $this->_catalogHelper = $catalogData; parent::__construct($context, $data); } @@ -179,6 +179,6 @@ public function getPrice($price, $includingTax = null) public function getCurrencyPrice($price) { $store = $this->getProduct()->getStore(); - return $this->_coreHelper->currencyByStore($price, $store, false); + return $this->pricingHelper->currencyByStore($price, $store, false); } } diff --git a/app/code/Magento/Catalog/Block/Product/View/Options/Type/Date.php b/app/code/Magento/Catalog/Block/Product/View/Options/Type/Date.php index 4cdd4984ff31a..bac018a247f34 100644 --- a/app/code/Magento/Catalog/Block/Product/View/Options/Type/Date.php +++ b/app/code/Magento/Catalog/Block/Product/View/Options/Type/Date.php @@ -29,20 +29,20 @@ class Date extends \Magento\Catalog\Block\Product\View\Options\AbstractOptions /** * @param \Magento\Framework\View\Element\Template\Context $context - * @param \Magento\Core\Helper\Data $coreHelper + * @param \Magento\Framework\Pricing\Helper\Data $pricingHelper * @param \Magento\Catalog\Helper\Data $catalogData * @param \Magento\Catalog\Model\Product\Option\Type\Date $catalogProductOptionTypeDate * @param array $data */ public function __construct( \Magento\Framework\View\Element\Template\Context $context, - \Magento\Core\Helper\Data $coreHelper, + \Magento\Framework\Pricing\Helper\Data $pricingHelper, \Magento\Catalog\Helper\Data $catalogData, \Magento\Catalog\Model\Product\Option\Type\Date $catalogProductOptionTypeDate, array $data = [] ) { $this->_catalogProductOptionTypeDate = $catalogProductOptionTypeDate; - parent::__construct($context, $coreHelper, $catalogData, $data); + parent::__construct($context, $pricingHelper, $catalogData, $data); } /** diff --git a/app/code/Magento/Catalog/Block/Product/View/Options/Type/Select.php b/app/code/Magento/Catalog/Block/Product/View/Options/Type/Select.php index d2c8f141aefab..2ee644bacd6a6 100644 --- a/app/code/Magento/Catalog/Block/Product/View/Options/Type/Select.php +++ b/app/code/Magento/Catalog/Block/Product/View/Options/Type/Select.php @@ -13,27 +13,6 @@ class Select extends \Magento\Catalog\Block\Product\View\Options\AbstractOptions { - /** - * @var \Magento\Core\Helper\Data - */ - protected $_coreHelper; - - /** - * @param \Magento\Framework\View\Element\Template\Context $context - * @param \Magento\Core\Helper\Data $coreHelper - * @param \Magento\Catalog\Helper\Data $catalogData - * @param array $data - */ - public function __construct( - \Magento\Framework\View\Element\Template\Context $context, - \Magento\Core\Helper\Data $coreHelper, - \Magento\Catalog\Helper\Data $catalogData, - array $data = [] - ) { - $this->_coreHelper = $coreHelper; - parent::__construct($context, $coreHelper, $catalogData, $data); - } - /** * Return html for control element * @@ -78,7 +57,7 @@ public function getValuesHtml() $select->addOption( $_value->getOptionTypeId(), $_value->getTitle() . ' ' . $priceStr . '', - ['price' => $this->_coreHelper->currencyByStore($_value->getPrice(true), $store, false)] + ['price' => $this->pricingHelper->currencyByStore($_value->getPrice(true), $store, false)] ); } if ($_option->getType() == \Magento\Catalog\Model\Product\Option::OPTION_TYPE_MULTIPLE) { @@ -169,7 +148,7 @@ public function getValuesHtml() '" ' . $checked . ' price="' . - $this->_coreHelper->currencyByStore($_value->getPrice(true), $store, false) . + $this->pricingHelper->currencyByStore($_value->getPrice(true), $store, false) . '" />' . '