diff --git a/CHANGELOG.md b/CHANGELOG.md index d32ee5e749d95..8837cd299ee90 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,34 @@ +2.0.0.0-dev63 +============= +* Modularity improvements: + * Consolidated all PayPal-related logic in a separate module + * Resolved dependencies on the Magento_GroupedProduct module + * Added the ability to enable/disable/remove the Magento_GroupedProduct module without impact on the system +* Implemented the Oyejorge Less.php adapter +* Implemented the Less files importing mechanism +* Added the ability to configure certain cache frontend, and associate it to multiple cache types, thus avoiding the duplication of cache configuration +* Implemented the more strict format of array definition in the DI configuration: + * Covered array definitions with XSD, and made the whole DI configuration validated with XSD + * Added the ability to define arrays with keys containing invalid XML characters, that was impossible when keys were represented by the node names +* Fixed bugs: + * Fixed an issue with missed image for a cron job for the abandoned cart emails + * Restored the ability to configure cache storage in `local.xml` + * Fixed an issue with the css\js merging functionality + * Fixed an issue with customer selection on the order creation page +* AppInterface renamed to LauncherInterface +* Removed the reinit logic from the Config object +* Framework part of the "URL" functionality removed from modules +* Framework part of the "Config" functionality removed from modules +* Removed the deprecated EAV structure creation method from the EAV setup model +* Updated various PHPDoc with parameter and return types +* Indexer implementation: + * Implemented a new indexer structure +* Refactored Web API Framework to support the Data Object based service interfaces +* Refactored controllers, blocks and templates of the Sales module to use Customer service +* GitHub requests: + * [#275] (https://github.com/magento/magento2/issues/275) -- XSS Vulnerability in app/code/core/Mage/CatalogSearch/Block/Result.php +* Removed the outdated Customer service + 2.0.0.0-dev62 ============= * Modularity improvements: diff --git a/app/code/Magento/AdminNotification/Model/Feed.php b/app/code/Magento/AdminNotification/Model/Feed.php index 6ae518aeda43f..b99d9b75680b9 100644 --- a/app/code/Magento/AdminNotification/Model/Feed.php +++ b/app/code/Magento/AdminNotification/Model/Feed.php @@ -97,7 +97,7 @@ protected function _construct() */ public function getFeedUrl() { - $httpPath = $this->_backendConfig->getFlag(self::XML_USE_HTTPS_PATH) ? 'https://' : 'http://'; + $httpPath = $this->_backendConfig->isSetFlag(self::XML_USE_HTTPS_PATH) ? 'https://' : 'http://'; if (is_null($this->_feedUrl)) { $this->_feedUrl = $httpPath . $this->_backendConfig->getValue(self::XML_FEED_URL_PATH); } diff --git a/app/code/Magento/AdminNotification/Model/System/Message/Baseurl.php b/app/code/Magento/AdminNotification/Model/System/Message/Baseurl.php index e0dcf3bcc3db6..28753875e539c 100644 --- a/app/code/Magento/AdminNotification/Model/System/Message/Baseurl.php +++ b/app/code/Magento/AdminNotification/Model/System/Message/Baseurl.php @@ -32,7 +32,7 @@ class Baseurl protected $_urlBuilder; /** - * @var \Magento\Core\Model\Config + * @var \Magento\App\ConfigInterface */ protected $_config; @@ -47,13 +47,13 @@ class Baseurl protected $_configValueFactory; /** - * @param \Magento\Core\Model\Config $config + * @param \Magento\App\ConfigInterface $config * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\UrlInterface $urlBuilder * @param \Magento\Core\Model\Config\ValueFactory $configValueFactory */ public function __construct( - \Magento\Core\Model\Config $config, + \Magento\App\ConfigInterface $config, \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\UrlInterface $urlBuilder, \Magento\Core\Model\Config\ValueFactory $configValueFactory @@ -91,7 +91,7 @@ protected function _getConfigUrl() $dataCollection = $this->_configValueFactory->create()->getCollection(); $dataCollection->addValueFilter(\Magento\Core\Model\Store::BASE_URL_PLACEHOLDER); - /** @var $data \Magento\Core\Model\Config\Value */ + /** @var $data \Magento\App\Config\ValueInterface */ foreach ($dataCollection as $data) { if ($data->getScope() == 'stores') { $code = $this->_storeManager->getStore($data->getScopeId())->getCode(); diff --git a/app/code/Magento/AdminNotification/Model/System/Message/Security.php b/app/code/Magento/AdminNotification/Model/System/Message/Security.php index b089242adca2e..d4b41ceff5ca8 100644 --- a/app/code/Magento/AdminNotification/Model/System/Message/Security.php +++ b/app/code/Magento/AdminNotification/Model/System/Message/Security.php @@ -55,7 +55,7 @@ class Security protected $_backendConfig; /** - * @var \Magento\Core\Model\Config + * @var \Magento\App\ConfigInterface */ protected $_config; @@ -67,13 +67,13 @@ class Security /** * @param \Magento\App\CacheInterface $cache * @param \Magento\Backend\App\ConfigInterface $backendConfig - * @param \Magento\Core\Model\Config $config + * @param \Magento\App\ConfigInterface $config * @param \Magento\HTTP\Adapter\CurlFactory $curlFactory */ public function __construct( \Magento\App\CacheInterface $cache, \Magento\Backend\App\ConfigInterface $backendConfig, - \Magento\Core\Model\Config $config, + \Magento\App\ConfigInterface $config, \Magento\HTTP\Adapter\CurlFactory $curlFactory ) { $this->_cache = $cache; diff --git a/app/code/Magento/AdminNotification/etc/adminhtml/di.xml b/app/code/Magento/AdminNotification/etc/adminhtml/di.xml index a17fef326e532..d633836e3ffea 100644 --- a/app/code/Magento/AdminNotification/etc/adminhtml/di.xml +++ b/app/code/Magento/AdminNotification/etc/adminhtml/di.xml @@ -26,14 +26,14 @@ - - Magento\AdminNotification\Model\System\Message\Baseurl - Magento\AdminNotification\Model\System\Message\Security - Magento\AdminNotification\Model\System\Message\CacheOutdated - Magento\AdminNotification\Model\System\Message\Survey - Magento\AdminNotification\Model\System\Message\Media\Synchronization\Error - Magento\AdminNotification\Model\System\Message\Media\Synchronization\Success - + + Magento\AdminNotification\Model\System\Message\Baseurl + Magento\AdminNotification\Model\System\Message\Security + Magento\AdminNotification\Model\System\Message\CacheOutdated + Magento\AdminNotification\Model\System\Message\Survey + Magento\AdminNotification\Model\System\Message\Media\Synchronization\Error + Magento\AdminNotification\Model\System\Message\Media\Synchronization\Success + diff --git a/app/code/Magento/Authorizenet/Controller/Adminhtml/Authorizenet/Directpost/Payment.php b/app/code/Magento/Authorizenet/Controller/Adminhtml/Authorizenet/Directpost/Payment.php index 6cc99bb9c4200..793087f43489c 100644 --- a/app/code/Magento/Authorizenet/Controller/Adminhtml/Authorizenet/Directpost/Payment.php +++ b/app/code/Magento/Authorizenet/Controller/Adminhtml/Authorizenet/Directpost/Payment.php @@ -135,7 +135,7 @@ public function placeAction() $requestToAuthorizenet->setOrderSendConfirmation($sendConfirmationFlag); $requestToAuthorizenet->setStoreId($this->_getOrderCreateModel()->getQuote()->getStoreId()); - $adminUrl = $this->_objectManager->get('Magento\Backend\Model\Url'); + $adminUrl = $this->_objectManager->get('Magento\Backend\Model\UrlInterface'); if ($adminUrl->useSecretKey()) { $requestToAuthorizenet->setKey( $adminUrl->getSecretKey('adminhtml', 'authorizenet_directpost_payment', 'redirect') @@ -161,7 +161,7 @@ public function placeAction() $result['success'] = 0; $result['error'] = 1; $result['redirect'] = $this->_objectManager - ->get('Magento\Backend\Model\Url') + ->get('Magento\Backend\Model\UrlInterface') ->getUrl('sales/order_create/'); } diff --git a/app/code/Magento/Authorizenet/Helper/Backend.php b/app/code/Magento/Authorizenet/Helper/Backend.php index 92ba346c82a05..c30b972e33939 100644 --- a/app/code/Magento/Authorizenet/Helper/Backend.php +++ b/app/code/Magento/Authorizenet/Helper/Backend.php @@ -35,13 +35,13 @@ class Backend extends Data * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Sales\Model\OrderFactory $orderFactory - * @param \Magento\Backend\Model\Url $backendUrl + * @param \Magento\Backend\Model\UrlInterface $backendUrl */ public function __construct( \Magento\App\Helper\Context $context, \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Sales\Model\OrderFactory $orderFactory, - \Magento\Backend\Model\Url $backendUrl + \Magento\Backend\Model\UrlInterface $backendUrl ) { parent::__construct($context, $storeManager, $orderFactory); $this->_urlBuilder = $backendUrl; diff --git a/app/code/Magento/Authorizenet/Helper/Data.php b/app/code/Magento/Authorizenet/Helper/Data.php index 3dbcedd6794a7..0cc27f6694c84 100644 --- a/app/code/Magento/Authorizenet/Helper/Data.php +++ b/app/code/Magento/Authorizenet/Helper/Data.php @@ -65,7 +65,7 @@ public function __construct( */ protected function _getUrl($route, $params = array()) { - $params['_type'] = \Magento\Core\Model\Store::URL_TYPE_LINK; + $params['_type'] = \Magento\UrlInterface::URL_TYPE_LINK; if (isset($params['is_secure'])) { $params['_secure'] = (bool)$params['is_secure']; } elseif ($this->_storeManager->getStore()->isCurrentlySecure()) { diff --git a/app/code/Magento/Authorizenet/Model/Directpost.php b/app/code/Magento/Authorizenet/Model/Directpost.php index 9cc9f9b879cf7..89c476bbed699 100644 --- a/app/code/Magento/Authorizenet/Model/Directpost.php +++ b/app/code/Magento/Authorizenet/Model/Directpost.php @@ -89,7 +89,7 @@ class Directpost extends \Magento\Authorizenet\Model\Authorizenet * @param \Magento\Authorizenet\Model\Directpost\Response $response * @param \Magento\Authorizenet\Helper\HelperInterface $helper * @param array $data - * + * * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( @@ -346,9 +346,9 @@ protected function _refund(\Magento\Object $payment, $amount) } $shouldCloseCaptureTransaction = $payment->getOrder()->canCreditmemo() ? 0 : 1; $payment - ->setIsTransactionClosed(1) - ->setShouldCloseParentTransaction($shouldCloseCaptureTransaction) - ->setTransactionAdditionalInfo($this->_realTransactionIdKey, $result->getTransactionId()); + ->setIsTransactionClosed(1) + ->setShouldCloseParentTransaction($shouldCloseCaptureTransaction) + ->setTransactionAdditionalInfo($this->_realTransactionIdKey, $result->getTransactionId()); return $this; } throw new \Magento\Core\Exception($this->_wrapGatewayError($result->getResponseReasonText())); @@ -520,8 +520,8 @@ public function process(array $responseData) if ($isError) { throw new \Magento\Core\Exception( ($responseText && !$response->isApproved()) ? - $responseText : - __('This payment didn\'t work out because we can\'t find this order.') + $responseText : + __('This payment didn\'t work out because we can\'t find this order.') ); } } @@ -588,7 +588,7 @@ public function checkTransId() */ protected function _matchAmount($amount) { - return sprintf('%.2F', $amount) == sprintf('%.2F', $this->getResponse()->getXAmount()); + return sprintf('%.2F', $amount) == sprintf('%.2F', $this->getResponse()->getXAmount()); } /** @@ -702,7 +702,7 @@ protected function _captureOrder(\Magento\Sales\Model\Order $order) $orderStatus = $this->getConfigData('order_status'); if (!$orderStatus || $order->getIsVirtual()) { $orderStatus = $order->getConfig() - ->getStateDefaultStatus(\Magento\Sales\Model\Order::STATE_PROCESSING); + ->getStateDefaultStatus(\Magento\Sales\Model\Order::STATE_PROCESSING); } if ($orderStatus) { $order->setStatus($orderStatus); diff --git a/app/code/Magento/Authorizenet/etc/frontend/di.xml b/app/code/Magento/Authorizenet/etc/frontend/di.xml index 1d95c6e9a7cf4..693fab6c1b85b 100644 --- a/app/code/Magento/Authorizenet/etc/frontend/di.xml +++ b/app/code/Magento/Authorizenet/etc/frontend/di.xml @@ -37,9 +37,9 @@ - - /authorizenet/payment - + + /authorizenet/payment + diff --git a/app/code/Magento/Backend/App/AbstractAction.php b/app/code/Magento/Backend/App/AbstractAction.php index 2ec2f32e6904b..0ca05ec35cb09 100644 --- a/app/code/Magento/Backend/App/AbstractAction.php +++ b/app/code/Magento/Backend/App/AbstractAction.php @@ -78,7 +78,7 @@ abstract class AbstractAction extends \Magento\App\Action\Action protected $_auth; /** - * @var \Magento\Backend\Model\Url + * @var \Magento\Backend\Model\UrlInterface */ protected $_backendUrl; @@ -375,7 +375,7 @@ protected function _validateSecretKey() return true; } - $secretKey = $this->getRequest()->getParam(\Magento\Backend\Model\Url::SECRET_KEY_PARAM_NAME, null); + $secretKey = $this->getRequest()->getParam(\Magento\Backend\Model\UrlInterface::SECRET_KEY_PARAM_NAME, null); if (!$secretKey || $secretKey != $this->_backendUrl->getSecretKey()) { return false; } diff --git a/app/code/Magento/Backend/App/Action/Context.php b/app/code/Magento/Backend/App/Action/Context.php index 1900380183403..6cdccaa8c0bb2 100644 --- a/app/code/Magento/Backend/App/Action/Context.php +++ b/app/code/Magento/Backend/App/Action/Context.php @@ -47,7 +47,7 @@ class Context extends \Magento\App\Action\Context protected $_helper; /** - * @var \Magento\Backend\Model\Url + * @var \Magento\Backend\Model\UrlInterface */ protected $_backendUrl; @@ -90,7 +90,7 @@ class Context extends \Magento\App\Action\Context * @param \Magento\AuthorizationInterface $authorization * @param \Magento\Backend\Model\Auth $auth * @param \Magento\Backend\Helper\Data $helper - * @param \Magento\Backend\Model\Url $backendUrl + * @param \Magento\Backend\Model\UrlInterface $backendUrl * @param \Magento\Core\App\Action\FormKeyValidator $formKeyValidator * @param \Magento\App\Action\Title $title * @param \Magento\Core\Model\LocaleInterface $locale @@ -110,7 +110,7 @@ public function __construct( \Magento\AuthorizationInterface $authorization, \Magento\Backend\Model\Auth $auth, \Magento\Backend\Helper\Data $helper, - \Magento\Backend\Model\Url $backendUrl, + \Magento\Backend\Model\UrlInterface $backendUrl, \Magento\Core\App\Action\FormKeyValidator $formKeyValidator, \Magento\App\Action\Title $title, \Magento\Core\Model\LocaleInterface $locale, @@ -156,7 +156,7 @@ public function getAuthorization() } /** - * @return \Magento\Backend\Model\Url + * @return \Magento\Backend\Model\UrlInterface */ public function getBackendUrl() { diff --git a/app/code/Magento/Backend/App/Action/Plugin/Authentication.php b/app/code/Magento/Backend/App/Action/Plugin/Authentication.php index c8da533e4355b..3fbb8bb3eb834 100644 --- a/app/code/Magento/Backend/App/Action/Plugin/Authentication.php +++ b/app/code/Magento/Backend/App/Action/Plugin/Authentication.php @@ -45,7 +45,7 @@ class Authentication ); /** - * @var \Magento\Backend\Model\Url + * @var \Magento\Backend\Model\UrlInterface */ protected $_url; @@ -66,14 +66,14 @@ class Authentication /** * @param \Magento\Backend\Model\Auth $auth - * @param \Magento\Backend\Model\Url $url + * @param \Magento\Backend\Model\UrlInterface $url * @param \Magento\App\ResponseInterface $response * @param \Magento\App\ActionFlag $actionFlag * @param \Magento\Message\ManagerInterface $messageManager */ public function __construct( \Magento\Backend\Model\Auth $auth, - \Magento\Backend\Model\Url $url, + \Magento\Backend\Model\UrlInterface $url, \Magento\App\ResponseInterface $response, \Magento\App\ActionFlag $actionFlag, \Magento\Message\ManagerInterface $messageManager diff --git a/app/code/Magento/Backend/App/Config.php b/app/code/Magento/Backend/App/Config.php index 73585d01e8a10..10bfd96418010 100644 --- a/app/code/Magento/Backend/App/Config.php +++ b/app/code/Magento/Backend/App/Config.php @@ -67,8 +67,6 @@ public function setValue($path, $value) /** * Reinitialize configuration - * - * @return \Magento\Core\Model\Config */ public function reinit() { @@ -81,7 +79,7 @@ public function reinit() * @param string $path * @return bool */ - public function getFlag($path) + public function isSetFlag($path) { return !!$this->_sectionPool->getSection('default', null)->getValue($path); } diff --git a/app/code/Magento/Backend/App/ConfigInterface.php b/app/code/Magento/Backend/App/ConfigInterface.php index 6bfa8ab1dddc8..916b477a3a0dd 100644 --- a/app/code/Magento/Backend/App/ConfigInterface.php +++ b/app/code/Magento/Backend/App/ConfigInterface.php @@ -57,5 +57,5 @@ public function reinit(); * @param string $path * @return bool */ - public function getFlag($path); + public function isSetFlag($path); } diff --git a/app/code/Magento/Backend/App/Response/Http/FileFactory.php b/app/code/Magento/Backend/App/Response/Http/FileFactory.php index 077620a3f8ea4..854243ec07f64 100644 --- a/app/code/Magento/Backend/App/Response/Http/FileFactory.php +++ b/app/code/Magento/Backend/App/Response/Http/FileFactory.php @@ -31,7 +31,7 @@ class FileFactory extends \Magento\App\Response\Http\FileFactory protected $_auth; /** - * @var \Magento\Backend\Model\Url + * @var \Magento\Backend\Model\UrlInterface */ protected $_backendUrl; @@ -59,7 +59,7 @@ class FileFactory extends \Magento\App\Response\Http\FileFactory * @param \Magento\App\ResponseInterface $response * @param \Magento\App\Filesystem $filesystem * @param \Magento\Backend\Model\Auth $auth - * @param \Magento\Backend\Model\Url $backendUrl + * @param \Magento\Backend\Model\UrlInterface $backendUrl * @param \Magento\Backend\Model\Session $session * @param \Magento\App\ActionFlag $flag * @param \Magento\Backend\Helper\Data $helper @@ -68,7 +68,7 @@ public function __construct( \Magento\App\ResponseInterface $response, \Magento\App\Filesystem $filesystem, \Magento\Backend\Model\Auth $auth, - \Magento\Backend\Model\Url $backendUrl, + \Magento\Backend\Model\UrlInterface $backendUrl, \Magento\Backend\Model\Session $session, \Magento\App\ActionFlag $flag, \Magento\Backend\Helper\Data $helper diff --git a/app/code/Magento/Backend/App/Router/DefaultRouter.php b/app/code/Magento/Backend/App/Router/DefaultRouter.php index 4d3b84385c2c8..7b581c8d4082b 100644 --- a/app/code/Magento/Backend/App/Router/DefaultRouter.php +++ b/app/code/Magento/Backend/App/Router/DefaultRouter.php @@ -39,7 +39,7 @@ class DefaultRouter extends \Magento\Core\App\Router\Base protected $_url; /** - * @var \Magento\Core\Model\Config + * @var \Magento\App\ConfigInterface */ protected $_coreConfig; @@ -52,9 +52,9 @@ class DefaultRouter extends \Magento\Core\App\Router\Base * @param \Magento\UrlInterface $url * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Store\Config $storeConfig - * @param \Magento\Core\Model\Url\SecurityInfoInterface $urlSecurityInfo + * @param \Magento\Url\SecurityInfoInterface $urlSecurityInfo * @param string $routerId - * @param \Magento\Core\Model\Config $coreConfig + * @param \Magento\App\ConfigInterface $coreConfig * @param \Magento\Backend\App\ConfigInterface $backendConfig * * @SuppressWarnings(PHPMD.ExcessiveParameterList) @@ -68,9 +68,9 @@ public function __construct( \Magento\UrlInterface $url, \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Store\Config $storeConfig, - \Magento\Core\Model\Url\SecurityInfoInterface $urlSecurityInfo, + \Magento\Url\SecurityInfoInterface $urlSecurityInfo, $routerId, - \Magento\Core\Model\Config $coreConfig, + \Magento\App\ConfigInterface $coreConfig, \Magento\Backend\App\ConfigInterface $backendConfig ) { parent::__construct( @@ -132,7 +132,7 @@ protected function _noRouteShouldBeApplied() protected function _shouldBeSecure($path) { return substr((string)$this->_coreConfig->getValue('web/unsecure/base_url', 'default'), 0, 5) === 'https' - || $this->_backendConfig->getFlag('web/secure/use_in_adminhtml') + || $this->_backendConfig->isSetFlag('web/secure/use_in_adminhtml') && substr((string)$this->_coreConfig->getValue('web/secure/base_url', 'default'), 0, 5) === 'https'; } diff --git a/app/code/Magento/Backend/Block/Dashboard/Orders/Grid.php b/app/code/Magento/Backend/Block/Dashboard/Orders/Grid.php index 5b6124e350e8a..1ec575ae10baa 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Orders/Grid.php +++ b/app/code/Magento/Backend/Block/Dashboard/Orders/Grid.php @@ -48,7 +48,6 @@ class Grid extends \Magento\Backend\Block\Dashboard\Grid /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Url $urlModel * @param \Magento\Backend\Helper\Data $backendHelper * @param \Magento\Module\Manager $moduleManager * @param \Magento\Reports\Model\Resource\Order\CollectionFactory $collectionFactory @@ -56,7 +55,6 @@ class Grid extends \Magento\Backend\Block\Dashboard\Grid */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Url $urlModel, \Magento\Backend\Helper\Data $backendHelper, \Magento\Module\Manager $moduleManager, \Magento\Reports\Model\Resource\Order\CollectionFactory $collectionFactory, @@ -64,7 +62,7 @@ public function __construct( ) { $this->_moduleManager = $moduleManager; $this->_collectionFactory = $collectionFactory; - parent::__construct($context, $urlModel, $backendHelper, $data); + parent::__construct($context, $backendHelper, $data); } protected function _construct() diff --git a/app/code/Magento/Backend/Block/Dashboard/Searches/Last.php b/app/code/Magento/Backend/Block/Dashboard/Searches/Last.php index c0e7599df0f1d..d4806307300aa 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Searches/Last.php +++ b/app/code/Magento/Backend/Block/Dashboard/Searches/Last.php @@ -50,7 +50,6 @@ class Last extends \Magento\Backend\Block\Dashboard\Grid /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Url $urlModel * @param \Magento\Backend\Helper\Data $backendHelper * @param \Magento\Module\Manager $moduleManager * @param \Magento\CatalogSearch\Model\Resource\Query\CollectionFactory $queriesFactory @@ -58,7 +57,6 @@ class Last extends \Magento\Backend\Block\Dashboard\Grid */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Url $urlModel, \Magento\Backend\Helper\Data $backendHelper, \Magento\Module\Manager $moduleManager, \Magento\CatalogSearch\Model\Resource\Query\CollectionFactory $queriesFactory, @@ -66,7 +64,7 @@ public function __construct( ) { $this->_moduleManager = $moduleManager; $this->_queriesFactory = $queriesFactory; - parent::__construct($context, $urlModel, $backendHelper, $data); + parent::__construct($context, $backendHelper, $data); } protected function _construct() diff --git a/app/code/Magento/Backend/Block/Dashboard/Searches/Renderer/Searchquery.php b/app/code/Magento/Backend/Block/Dashboard/Searches/Renderer/Searchquery.php index 2f4e4c5233dbb..2b29903a8185e 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Searches/Renderer/Searchquery.php +++ b/app/code/Magento/Backend/Block/Dashboard/Searches/Renderer/Searchquery.php @@ -24,21 +24,19 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\Backend\Block\Dashboard\Searches\Renderer; /** * Dashboard search query column renderer */ -namespace Magento\Backend\Block\Dashboard\Searches\Renderer; - -class Searchquery - extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer +class Searchquery extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer { /** * String helper * * @var \Magento\Stdlib\String */ - protected $_stringHelper = null; + protected $stringHelper; /** * @param \Magento\Backend\Block\Context $context @@ -50,16 +48,22 @@ public function __construct( \Magento\Stdlib\String $stringHelper, array $data = array() ) { - $this->_stringHelper = $stringHelper; + $this->stringHelper = $stringHelper; parent::__construct($context, $data); } + /** + * Renders a column + * + * @param \Magento\Object $row + * @return string + */ public function render(\Magento\Object $row) { $value = $row->getData($this->getColumn()->getIndex()); - if ($this->_stringHelper->strlen($value) > 30) { - $value = '' - . $this->escapeHtml($this->_stringHelper->truncate($value, 30)) . ''; + if ($this->stringHelper->strlen($value) > 30) { + $value = '' + . $this->escapeHtml($this->filterManager->truncate($value, array('length' => 30))) . ''; } else { $value = $this->escapeHtml($value); } diff --git a/app/code/Magento/Backend/Block/Dashboard/Searches/Top.php b/app/code/Magento/Backend/Block/Dashboard/Searches/Top.php index b9169d8df25b3..2f7eea8b353e9 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Searches/Top.php +++ b/app/code/Magento/Backend/Block/Dashboard/Searches/Top.php @@ -50,7 +50,6 @@ class Top extends \Magento\Backend\Block\Dashboard\Grid /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Url $urlModel * @param \Magento\Backend\Helper\Data $backendHelper * @param \Magento\Module\Manager $moduleManager * @param \Magento\CatalogSearch\Model\Resource\Query\CollectionFactory $queriesFactory @@ -58,7 +57,6 @@ class Top extends \Magento\Backend\Block\Dashboard\Grid */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Url $urlModel, \Magento\Backend\Helper\Data $backendHelper, \Magento\Module\Manager $moduleManager, \Magento\CatalogSearch\Model\Resource\Query\CollectionFactory $queriesFactory, @@ -66,7 +64,7 @@ public function __construct( ) { $this->_moduleManager = $moduleManager; $this->_queriesFactory = $queriesFactory; - parent::__construct($context, $urlModel, $backendHelper, $data); + parent::__construct($context, $backendHelper, $data); } protected function _construct() diff --git a/app/code/Magento/Backend/Block/Dashboard/Tab/Customers/Most.php b/app/code/Magento/Backend/Block/Dashboard/Tab/Customers/Most.php index 9a0881d3d77cd..8f2e5535c8e4d 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Tab/Customers/Most.php +++ b/app/code/Magento/Backend/Block/Dashboard/Tab/Customers/Most.php @@ -43,20 +43,18 @@ class Most extends \Magento\Backend\Block\Dashboard\Grid /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Url $urlModel * @param \Magento\Backend\Helper\Data $backendHelper * @param \Magento\Reports\Model\Resource\Order\CollectionFactory $collectionFactory * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Url $urlModel, \Magento\Backend\Helper\Data $backendHelper, \Magento\Reports\Model\Resource\Order\CollectionFactory $collectionFactory, array $data = array() ) { $this->_collectionFactory = $collectionFactory; - parent::__construct($context, $urlModel, $backendHelper, $data); + parent::__construct($context, $backendHelper, $data); } protected function _construct() diff --git a/app/code/Magento/Backend/Block/Dashboard/Tab/Customers/Newest.php b/app/code/Magento/Backend/Block/Dashboard/Tab/Customers/Newest.php index 802f5240f5e0a..50c99dd435904 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Tab/Customers/Newest.php +++ b/app/code/Magento/Backend/Block/Dashboard/Tab/Customers/Newest.php @@ -43,20 +43,18 @@ class Newest extends \Magento\Backend\Block\Dashboard\Grid /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Url $urlModel * @param \Magento\Backend\Helper\Data $backendHelper * @param \Magento\Reports\Model\Resource\Customer\CollectionFactory $collectionFactory * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Url $urlModel, \Magento\Backend\Helper\Data $backendHelper, \Magento\Reports\Model\Resource\Customer\CollectionFactory $collectionFactory, array $data = array() ) { $this->_collectionFactory = $collectionFactory; - parent::__construct($context, $urlModel, $backendHelper, $data); + parent::__construct($context, $backendHelper, $data); } protected function _construct() diff --git a/app/code/Magento/Backend/Block/Dashboard/Tab/Products/Ordered.php b/app/code/Magento/Backend/Block/Dashboard/Tab/Products/Ordered.php index 6b834b469a66a..e8d1231a28276 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Tab/Products/Ordered.php +++ b/app/code/Magento/Backend/Block/Dashboard/Tab/Products/Ordered.php @@ -48,7 +48,6 @@ class Ordered extends \Magento\Backend\Block\Dashboard\Grid /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Url $urlModel * @param \Magento\Backend\Helper\Data $backendHelper * @param \Magento\Module\Manager $moduleManager * @param \Magento\Sales\Model\Resource\Report\Bestsellers\CollectionFactory $collectionFactory @@ -56,7 +55,6 @@ class Ordered extends \Magento\Backend\Block\Dashboard\Grid */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Url $urlModel, \Magento\Backend\Helper\Data $backendHelper, \Magento\Module\Manager $moduleManager, \Magento\Sales\Model\Resource\Report\Bestsellers\CollectionFactory $collectionFactory, @@ -64,7 +62,7 @@ public function __construct( ) { $this->_collectionFactory = $collectionFactory; $this->_moduleManager = $moduleManager; - parent::__construct($context, $urlModel, $backendHelper, $data); + parent::__construct($context, $backendHelper, $data); } protected function _construct() diff --git a/app/code/Magento/Backend/Block/Dashboard/Tab/Products/Viewed.php b/app/code/Magento/Backend/Block/Dashboard/Tab/Products/Viewed.php index 57eefcbea4963..abadcd927e474 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Tab/Products/Viewed.php +++ b/app/code/Magento/Backend/Block/Dashboard/Tab/Products/Viewed.php @@ -43,20 +43,18 @@ class Viewed extends \Magento\Backend\Block\Dashboard\Grid /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Url $urlModel * @param \Magento\Backend\Helper\Data $backendHelper * @param \Magento\Reports\Model\Resource\Product\CollectionFactory $productsFactory * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Url $urlModel, \Magento\Backend\Helper\Data $backendHelper, \Magento\Reports\Model\Resource\Product\CollectionFactory $productsFactory, array $data = array() ) { $this->_productsFactory = $productsFactory; - parent::__construct($context, $urlModel, $backendHelper, $data); + parent::__construct($context, $backendHelper, $data); } protected function _construct() diff --git a/app/code/Magento/Backend/Block/Menu.php b/app/code/Magento/Backend/Block/Menu.php index 9dc4094a83e91..2ed7d5a50f7e2 100644 --- a/app/code/Magento/Backend/Block/Menu.php +++ b/app/code/Magento/Backend/Block/Menu.php @@ -49,7 +49,7 @@ class Menu extends \Magento\Backend\Block\Template /** * Backend URL instance * - * @var \Magento\Backend\Model\Url + * @var \Magento\Backend\Model\UrlInterface */ protected $_url; @@ -77,7 +77,7 @@ class Menu extends \Magento\Backend\Block\Template /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Backend\Model\Url $url + * @param \Magento\Backend\Model\UrlInterface $url * @param \Magento\Backend\Model\Menu\Filter\IteratorFactory $iteratorFactory * @param \Magento\Backend\Model\Auth\Session $authSession * @param \Magento\Backend\Model\Menu\Config $menuConfig @@ -85,7 +85,7 @@ class Menu extends \Magento\Backend\Block\Template */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Backend\Model\Url $url, + \Magento\Backend\Model\UrlInterface $url, \Magento\Backend\Model\Menu\Filter\IteratorFactory $iteratorFactory, \Magento\Backend\Model\Auth\Session $authSession, \Magento\Backend\Model\Menu\Config $menuConfig, @@ -238,7 +238,7 @@ protected function _getMenuIterator($menu) protected function _afterToHtml($html) { $html = preg_replace_callback( - '#' . \Magento\Backend\Model\Url::SECRET_KEY_PARAM_NAME . '/\$([^\/].*)/([^\/].*)/([^\$].*)\$#U', + '#' . \Magento\Backend\Model\UrlInterface::SECRET_KEY_PARAM_NAME . '/\$([^\/].*)/([^\/].*)/([^\$].*)\$#U', array($this, '_callbackSecretKey'), $html ); @@ -254,7 +254,7 @@ protected function _afterToHtml($html) */ protected function _callbackSecretKey($match) { - return \Magento\Backend\Model\Url::SECRET_KEY_PARAM_NAME . '/' + return \Magento\Backend\Model\UrlInterface::SECRET_KEY_PARAM_NAME . '/' . $this->_url->getSecretKey($match[1], $match[2], $match[3]); } diff --git a/app/code/Magento/Backend/Block/Page/System/Config/Robots/Reset.php b/app/code/Magento/Backend/Block/Page/System/Config/Robots/Reset.php index 1ef88376c7d08..59e0995bc1180 100644 --- a/app/code/Magento/Backend/Block/Page/System/Config/Robots/Reset.php +++ b/app/code/Magento/Backend/Block/Page/System/Config/Robots/Reset.php @@ -49,12 +49,12 @@ class Reset extends \Magento\Backend\Block\System\Config\Form\Field /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\ConfigInterface $coreConfig + * @param \Magento\App\ConfigInterface $coreConfig * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\ConfigInterface $coreConfig, + \Magento\App\ConfigInterface $coreConfig, array $data = array() ) { $this->coreConfig = $coreConfig; diff --git a/app/code/Magento/Backend/Block/System/Config/Form.php b/app/code/Magento/Backend/Block/System/Config/Form.php index fb59d2fa5f4cc..c9db61e977687 100644 --- a/app/code/Magento/Backend/Block/System/Config/Form.php +++ b/app/code/Magento/Backend/Block/System/Config/Form.php @@ -120,7 +120,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic /** * Form field factory * - * @var \Magento\Core\Model\Config + * @var \Magento\App\ConfigInterface */ protected $_config; @@ -132,7 +132,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic * @param \Magento\Backend\Model\Config\Structure $configStructure * @param \Magento\Backend\Block\System\Config\Form\Fieldset\Factory $fieldsetFactory * @param \Magento\Backend\Block\System\Config\Form\Field\Factory $fieldFactory - * @param \Magento\Core\Model\Config $coreConfig + * @param \Magento\App\ConfigInterface $coreConfig * @param array $data */ public function __construct( @@ -143,7 +143,7 @@ public function __construct( \Magento\Backend\Model\Config\Structure $configStructure, \Magento\Backend\Block\System\Config\Form\Fieldset\Factory $fieldsetFactory, \Magento\Backend\Block\System\Config\Form\Field\Factory $fieldFactory, - \Magento\Core\Model\Config $coreConfig, + \Magento\App\ConfigInterface $coreConfig, array $data = array() ) { parent::__construct($context, $registry, $formFactory, $data); diff --git a/app/code/Magento/Backend/Block/System/Config/Form/Field.php b/app/code/Magento/Backend/Block/System/Config/Form/Field.php index faaa12bc74e83..fee6ae80c6fb7 100644 --- a/app/code/Magento/Backend/Block/System/Config/Form/Field.php +++ b/app/code/Magento/Backend/Block/System/Config/Form/Field.php @@ -163,7 +163,7 @@ protected function _getInheritCheckboxLabel(\Magento\Data\Form\Element\AbstractE protected function _renderScopeLabel(\Magento\Data\Form\Element\AbstractElement $element) { $html = ''; - if ($element->getScope() && false == $this->_app->isSingleStoreMode()) { + if ($element->getScope() && false == $this->_storeManager->isSingleStoreMode()) { $html .= $element->getScopeLabel(); } $html .= ''; diff --git a/app/code/Magento/Backend/Block/Widget/Grid.php b/app/code/Magento/Backend/Block/Widget/Grid.php index 8b4024be381b7..0a469868a0630 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid.php +++ b/app/code/Magento/Backend/Block/Widget/Grid.php @@ -109,11 +109,6 @@ class Grid extends \Magento\Backend\Block\Widget protected $_template = 'Magento_Backend::widget/grid.phtml'; - /** - * @var \Magento\Core\Model\Url - */ - protected $_urlModel; - /** * @var \Magento\Backend\Model\Session */ @@ -126,18 +121,15 @@ class Grid extends \Magento\Backend\Block\Widget /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Url $urlModel * @param \Magento\Backend\Helper\Data $backendHelper * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Url $urlModel, \Magento\Backend\Helper\Data $backendHelper, array $data = array() ) { $this->_backendHelper = $backendHelper; - $this->_urlModel = $urlModel; $this->_backendSession = $context->getBackendSession(); parent::__construct($context, $data); } diff --git a/app/code/Magento/Backend/Helper/Addresses.php b/app/code/Magento/Backend/Helper/Addresses.php index 8f4aa89242e6c..a7a4b722bd1de 100644 --- a/app/code/Magento/Backend/Helper/Addresses.php +++ b/app/code/Magento/Backend/Helper/Addresses.php @@ -45,7 +45,7 @@ class Addresses extends \Magento\App\Helper\AbstractHelper */ public function processStreetAttribute(\Magento\Customer\Model\Attribute $attribute) { - if($attribute->getScopeMultilineCount() <= 0) { + if ($attribute->getScopeMultilineCount() <= 0) { $attribute->setScopeMultilineCount(self::DEFAULT_STREET_LINES_COUNT); } return $attribute; diff --git a/app/code/Magento/Backend/Helper/Data.php b/app/code/Magento/Backend/Helper/Data.php index 341bed29bb3cc..6af5e8c5dad1c 100644 --- a/app/code/Magento/Backend/Helper/Data.php +++ b/app/code/Magento/Backend/Helper/Data.php @@ -46,7 +46,7 @@ class Data extends \Magento\App\Helper\AbstractHelper protected $_app; /** - * @var \Magento\Backend\Model\Url + * @var \Magento\Backend\Model\UrlInterface */ protected $_backendUrl; @@ -68,8 +68,8 @@ class Data extends \Magento\App\Helper\AbstractHelper /** * @param \Magento\App\Helper\Context $context * @param \Magento\App\Route\Config $routeConfig - * @param \Magento\Core\Model\AppInterface $app - * @param \Magento\Backend\Model\Url $backendUrl + * @param \Magento\AppInterface $app + * @param \Magento\Backend\Model\UrlInterface $backendUrl * @param \Magento\Backend\Model\Auth $auth * @param \Magento\Backend\App\Area\FrontNameResolver $frontNameResolver * @param \Magento\Math\Random $mathRandom @@ -77,8 +77,8 @@ class Data extends \Magento\App\Helper\AbstractHelper public function __construct( \Magento\App\Helper\Context $context, \Magento\App\Route\Config $routeConfig, - \Magento\Core\Model\AppInterface $app, - \Magento\Backend\Model\Url $backendUrl, + \Magento\AppInterface $app, + \Magento\Backend\Model\UrlInterface $backendUrl, \Magento\Backend\Model\Auth $auth, \Magento\Backend\App\Area\FrontNameResolver $frontNameResolver, \Magento\Math\Random $mathRandom diff --git a/app/code/Magento/Backend/Model/Auth.php b/app/code/Magento/Backend/Model/Auth.php index 8c439feab24e4..e808dc5f45c9f 100644 --- a/app/code/Magento/Backend/Model/Auth.php +++ b/app/code/Magento/Backend/Model/Auth.php @@ -56,7 +56,7 @@ class Auth protected $_eventManager; /** - * @var \Magento\Core\Model\Config + * @var \Magento\App\ConfigInterface */ protected $_coreConfig; @@ -70,7 +70,7 @@ class Auth * @param \Magento\Backend\Helper\Data $backendData * @param \Magento\Backend\Model\Auth\StorageInterface $authStorage * @param \Magento\Backend\Model\Auth\Credential\StorageInterface $credentialStorage - * @param \Magento\Core\Model\Config $coreConfig + * @param \Magento\App\ConfigInterface $coreConfig * @param \Magento\Core\Model\Factory $modelFactory */ public function __construct( @@ -78,7 +78,7 @@ public function __construct( \Magento\Backend\Helper\Data $backendData, \Magento\Backend\Model\Auth\StorageInterface $authStorage, \Magento\Backend\Model\Auth\Credential\StorageInterface $credentialStorage, - \Magento\Core\Model\Config $coreConfig, + \Magento\App\ConfigInterface $coreConfig, \Magento\Core\Model\Factory $modelFactory ) { $this->_eventManager = $eventManager; diff --git a/app/code/Magento/Backend/Model/Auth/Session.php b/app/code/Magento/Backend/Model/Auth/Session.php index 67e9c459f6f05..0db4fb38690aa 100644 --- a/app/code/Magento/Backend/Model/Auth/Session.php +++ b/app/code/Magento/Backend/Model/Auth/Session.php @@ -60,7 +60,7 @@ class Session protected $_aclBuilder; /** - * @var \Magento\Backend\Model\Url + * @var \Magento\Backend\Model\UrlInterface */ protected $_backendUrl; @@ -77,7 +77,7 @@ class Session * @param \Magento\Session\ValidatorInterface $validator * @param \Magento\Session\StorageInterface $storage * @param \Magento\Acl\Builder $aclBuilder - * @param \Magento\Backend\Model\Url $backendUrl + * @param \Magento\Backend\Model\UrlInterface $backendUrl * @param \Magento\Backend\App\ConfigInterface $config */ public function __construct( @@ -88,7 +88,7 @@ public function __construct( \Magento\Session\ValidatorInterface $validator, \Magento\Session\StorageInterface $storage, \Magento\Acl\Builder $aclBuilder, - \Magento\Backend\Model\Url $backendUrl, + \Magento\Backend\Model\UrlInterface $backendUrl, \Magento\Backend\App\ConfigInterface $config ) { $this->_config = $config; diff --git a/app/code/Magento/Backend/Model/Config.php b/app/code/Magento/Backend/Model/Config.php index 6ca34703f43ec..17fe9e669da78 100644 --- a/app/code/Magento/Backend/Model/Config.php +++ b/app/code/Magento/Backend/Model/Config.php @@ -61,14 +61,14 @@ class Config extends \Magento\Object /** * Application config * - * @var \Magento\Core\Model\Config + * @var \Magento\App\ConfigInterface */ protected $_appConfig; /** * Global factory * - * @var \Magento\Core\Model\Config + * @var \Magento\App\ConfigInterface */ protected $_objectFactory; @@ -79,14 +79,7 @@ class Config extends \Magento\Object */ protected $_transactionFactory; - /** - * Global Application - * - * @var \Magento\Core\Model\App - */ - protected $_application; - - /** + /** * Config data loader * * @var \Magento\Backend\Model\Config\Loader @@ -106,8 +99,7 @@ class Config extends \Magento\Object protected $_storeManager; /** - * @param \Magento\Core\Model\App $application - * @param \Magento\Core\Model\Config $config + * @param \Magento\App\ConfigInterface $config * @param \Magento\Event\ManagerInterface $eventManager * @param \Magento\Backend\Model\Config\Structure $configStructure * @param \Magento\Core\Model\Resource\TransactionFactory $transactionFactory @@ -117,8 +109,7 @@ class Config extends \Magento\Object * @param array $data */ public function __construct( - \Magento\Core\Model\App $application, - \Magento\Core\Model\Config $config, + \Magento\App\ConfigInterface $config, \Magento\Event\ManagerInterface $eventManager, \Magento\Backend\Model\Config\Structure $configStructure, \Magento\Core\Model\Resource\TransactionFactory $transactionFactory, @@ -132,7 +123,6 @@ public function __construct( $this->_configStructure = $configStructure; $this->_transactionFactory = $transactionFactory; $this->_appConfig = $config; - $this->_application = $application; $this->_configLoader = $configLoader; $this->_configValueFactory = $configValueFactory; $this->_storeManager = $storeManager; @@ -259,7 +249,7 @@ protected function _processGroup( /** @var $field \Magento\Backend\Model\Config\Structure\Element\Field */ $field = $this->_configStructure->getElement($groupPath . '/' . $originalFieldId); - /** @var \Magento\Core\Model\Config\Value $backendModel */ + /** @var \Magento\App\Config\ValueInterface $backendModel */ $backendModel = $field->hasBackendModel() ? $field->getBackendModel() : $this->_configValueFactory->create(); @@ -424,18 +414,18 @@ protected function _getConfig($full = true) * Set correct scope if isSingleStoreMode = true * * @param \Magento\Backend\Model\Config\Structure\Element\Field $fieldConfig - * @param \Magento\Core\Model\Config\Value $dataObject + * @param \Magento\App\Config\ValueInterface $dataObject */ protected function _checkSingleStoreMode( \Magento\Backend\Model\Config\Structure\Element\Field $fieldConfig, $dataObject ) { - $isSingleStoreMode = $this->_application->isSingleStoreMode(); + $isSingleStoreMode = $this->_storeManager->isSingleStoreMode(); if (!$isSingleStoreMode) { return; } if (!$fieldConfig->showInDefault()) { - $websites = $this->_application->getWebsites(); + $websites = $this->_storeManager->getWebsites(); $singleStoreWebsite = array_shift($websites); $dataObject->setScope('websites'); $dataObject->setWebsiteCode($singleStoreWebsite->getCode()); diff --git a/app/code/Magento/Backend/Model/Config/Backend/Admin/Custom.php b/app/code/Magento/Backend/Model/Config/Backend/Admin/Custom.php index d6226b3c8e7f1..2b5d4201d503e 100644 --- a/app/code/Magento/Backend/Model/Config/Backend/Admin/Custom.php +++ b/app/code/Magento/Backend/Model/Config/Backend/Admin/Custom.php @@ -55,7 +55,7 @@ class Custom extends \Magento\Core\Model\Config\Value * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Config $config + * @param \Magento\App\ConfigInterface $config * @param \Magento\Core\Model\Config\Storage\WriterInterface $configWriter * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection @@ -65,7 +65,7 @@ public function __construct( \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Config $config, + \Magento\App\ConfigInterface $config, \Magento\Core\Model\Config\Storage\WriterInterface $configWriter, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, diff --git a/app/code/Magento/Backend/Model/Config/Backend/Admin/Robots.php b/app/code/Magento/Backend/Model/Config/Backend/Admin/Robots.php index cf9238ae9554d..b27630864e9ff 100644 --- a/app/code/Magento/Backend/Model/Config/Backend/Admin/Robots.php +++ b/app/code/Magento/Backend/Model/Config/Backend/Admin/Robots.php @@ -45,7 +45,7 @@ class Robots extends \Magento\Core\Model\Config\Value * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Config $config + * @param \Magento\App\ConfigInterface $config * @param \Magento\App\Filesystem $filesystem * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection @@ -55,7 +55,7 @@ public function __construct( \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Config $config, + \Magento\App\ConfigInterface $config, \Magento\App\Filesystem $filesystem, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, diff --git a/app/code/Magento/Backend/Model/Config/Backend/Admin/Usecustom.php b/app/code/Magento/Backend/Model/Config/Backend/Admin/Usecustom.php index 0c85a5866d345..65d2a3397125c 100644 --- a/app/code/Magento/Backend/Model/Config/Backend/Admin/Usecustom.php +++ b/app/code/Magento/Backend/Model/Config/Backend/Admin/Usecustom.php @@ -43,7 +43,7 @@ class Usecustom extends \Magento\Core\Model\Config\Value * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Config $config + * @param \Magento\App\ConfigInterface $config * @param \Magento\Core\Model\Config\Storage\WriterInterface $configWriter * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection @@ -53,7 +53,7 @@ public function __construct( \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Config $config, + \Magento\App\ConfigInterface $config, \Magento\Core\Model\Config\Storage\WriterInterface $configWriter, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, diff --git a/app/code/Magento/Backend/Model/Config/Backend/Admin/Usesecretkey.php b/app/code/Magento/Backend/Model/Config/Backend/Admin/Usesecretkey.php index 14430f0cdf20b..c969bc007dcb1 100644 --- a/app/code/Magento/Backend/Model/Config/Backend/Admin/Usesecretkey.php +++ b/app/code/Magento/Backend/Model/Config/Backend/Admin/Usesecretkey.php @@ -32,7 +32,7 @@ class Usesecretkey extends \Magento\Core\Model\Config\Value { /** - * @var \Magento\Backend\Model\Url + * @var \Magento\Backend\Model\UrlInterface */ protected $_backendUrl; @@ -40,8 +40,8 @@ class Usesecretkey extends \Magento\Core\Model\Config\Value * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Config $config - * @param \Magento\Backend\Model\Url $backendUrl + * @param \Magento\App\ConfigInterface $config + * @param \Magento\Backend\Model\UrlInterface $backendUrl * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection * @param array $data @@ -50,8 +50,8 @@ public function __construct( \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Config $config, - \Magento\Backend\Model\Url $backendUrl, + \Magento\App\ConfigInterface $config, + \Magento\Backend\Model\UrlInterface $backendUrl, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, array $data = array() diff --git a/app/code/Magento/Backend/Model/Config/Backend/Baseurl.php b/app/code/Magento/Backend/Model/Config/Backend/Baseurl.php index 0eb3354143fc1..a30cf63981ac5 100644 --- a/app/code/Magento/Backend/Model/Config/Backend/Baseurl.php +++ b/app/code/Magento/Backend/Model/Config/Backend/Baseurl.php @@ -34,7 +34,7 @@ class Baseurl extends \Magento\Core\Model\Config\Value * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Config $config + * @param \Magento\App\ConfigInterface $config * @param \Magento\View\Asset\MergeService $mergeService * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection @@ -44,7 +44,7 @@ public function __construct( \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Config $config, + \Magento\App\ConfigInterface $config, \Magento\View\Asset\MergeService $mergeService, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, diff --git a/app/code/Magento/Backend/Model/Config/Backend/Currency/AbstractCurrency.php b/app/code/Magento/Backend/Model/Config/Backend/Currency/AbstractCurrency.php index 0c9dd4169d722..db7ef1f16b673 100644 --- a/app/code/Magento/Backend/Model/Config/Backend/Currency/AbstractCurrency.php +++ b/app/code/Magento/Backend/Model/Config/Backend/Currency/AbstractCurrency.php @@ -51,7 +51,7 @@ abstract class AbstractCurrency extends \Magento\Core\Model\Config\Value * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Config $config + * @param \Magento\App\ConfigInterface $config * @param \Magento\Core\Model\Store\Config $coreStoreConfig * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection @@ -61,7 +61,7 @@ public function __construct( \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Config $config, + \Magento\App\ConfigInterface $config, \Magento\Core\Model\Store\Config $coreStoreConfig, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, diff --git a/app/code/Magento/Backend/Model/Config/Backend/Currency/Allow.php b/app/code/Magento/Backend/Model/Config/Backend/Currency/Allow.php index 3c70c7fd40e5a..bea126e62df31 100644 --- a/app/code/Magento/Backend/Model/Config/Backend/Currency/Allow.php +++ b/app/code/Magento/Backend/Model/Config/Backend/Currency/Allow.php @@ -41,7 +41,7 @@ class Allow extends \Magento\Backend\Model\Config\Backend\Currency\AbstractCurre * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Config $config + * @param \Magento\App\ConfigInterface $config * @param \Magento\Core\Model\Store\Config $coreStoreConfig * @param \Magento\Core\Model\LocaleInterface $locale * @param \Magento\Core\Model\Resource\AbstractResource $resource @@ -52,7 +52,7 @@ public function __construct( \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Config $config, + \Magento\App\ConfigInterface $config, \Magento\Core\Model\Store\Config $coreStoreConfig, \Magento\Core\Model\LocaleInterface $locale, \Magento\Core\Model\Resource\AbstractResource $resource = null, diff --git a/app/code/Magento/Backend/Model/Config/Backend/Currency/Cron.php b/app/code/Magento/Backend/Model/Config/Backend/Currency/Cron.php index 9bc8573234241..3e6f042ea97c0 100644 --- a/app/code/Magento/Backend/Model/Config/Backend/Currency/Cron.php +++ b/app/code/Magento/Backend/Model/Config/Backend/Currency/Cron.php @@ -42,7 +42,7 @@ class Cron extends \Magento\Core\Model\Config\Value * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Config $config + * @param \Magento\App\ConfigInterface $config * @param \Magento\Core\Model\Config\ValueFactory $configValueFactory * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection @@ -52,7 +52,7 @@ public function __construct( \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Config $config, + \Magento\App\ConfigInterface $config, \Magento\Core\Model\Config\ValueFactory $configValueFactory, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, @@ -81,7 +81,7 @@ protected function _afterSave() $cronExprString = join(' ', $cronExprArray); try { - /** @var $configValue \Magento\Core\Model\Config\Value */ + /** @var $configValue \Magento\App\Config\ValueInterface */ $configValue = $this->_configValueFactory->create(); $configValue->load(self::CRON_STRING_PATH, 'path'); $configValue->setValue($cronExprString) diff --git a/app/code/Magento/Backend/Model/Config/Backend/Encrypted.php b/app/code/Magento/Backend/Model/Config/Backend/Encrypted.php index cfc857b35abb9..12917d0d44595 100644 --- a/app/code/Magento/Backend/Model/Config/Backend/Encrypted.php +++ b/app/code/Magento/Backend/Model/Config/Backend/Encrypted.php @@ -40,7 +40,7 @@ class Encrypted * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Config $config + * @param \Magento\App\ConfigInterface $config * @param \Magento\Encryption\EncryptorInterface $encryptor * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection @@ -50,7 +50,7 @@ public function __construct( \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Config $config, + \Magento\App\ConfigInterface $config, \Magento\Encryption\EncryptorInterface $encryptor, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, diff --git a/app/code/Magento/Backend/Model/Config/Backend/File.php b/app/code/Magento/Backend/Model/Config/Backend/File.php index 3c9a6ea971768..c5f3d1f61ce30 100644 --- a/app/code/Magento/Backend/Model/Config/Backend/File.php +++ b/app/code/Magento/Backend/Model/Config/Backend/File.php @@ -64,7 +64,7 @@ class File extends \Magento\Core\Model\Config\Value * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Config $config + * @param \Magento\App\ConfigInterface $config * @param \Magento\Core\Model\File\UploaderFactory $uploaderFactory * @param \Magento\Backend\Model\Config\Backend\File\RequestData\RequestDataInterface $requestData * @param \Magento\App\Filesystem $filesystem @@ -76,7 +76,7 @@ public function __construct( \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Config $config, + \Magento\App\ConfigInterface $config, \Magento\Core\Model\File\UploaderFactory $uploaderFactory, \Magento\Backend\Model\Config\Backend\File\RequestData\RequestDataInterface $requestData, \Magento\App\Filesystem $filesystem, diff --git a/app/code/Magento/Backend/Model/Config/Backend/Image/Adapter.php b/app/code/Magento/Backend/Model/Config/Backend/Image/Adapter.php index 9d99d3808441e..70df22d778e19 100644 --- a/app/code/Magento/Backend/Model/Config/Backend/Image/Adapter.php +++ b/app/code/Magento/Backend/Model/Config/Backend/Image/Adapter.php @@ -45,7 +45,7 @@ class Adapter extends \Magento\Core\Model\Config\Value * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Config $config + * @param \Magento\App\ConfigInterface $config * @param \Magento\Image\AdapterFactory $imageFactory * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection @@ -55,7 +55,7 @@ public function __construct( \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Config $config, + \Magento\App\ConfigInterface $config, \Magento\Image\AdapterFactory $imageFactory, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, diff --git a/app/code/Magento/Backend/Model/Config/Backend/Locale.php b/app/code/Magento/Backend/Model/Config/Backend/Locale.php index 087da00b27222..5bf74b97a7447 100644 --- a/app/code/Magento/Backend/Model/Config/Backend/Locale.php +++ b/app/code/Magento/Backend/Model/Config/Backend/Locale.php @@ -55,7 +55,7 @@ class Locale extends \Magento\Core\Model\Config\Value * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Config $config + * @param \Magento\App\ConfigInterface $config * @param \Magento\Core\Model\Resource\Config\Data\CollectionFactory $configsFactory * @param \Magento\Core\Model\LocaleInterface $locale * @param \Magento\Core\Model\Website\Factory $websiteFactory @@ -70,7 +70,7 @@ public function __construct( \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Config $config, + \Magento\App\ConfigInterface $config, \Magento\Core\Model\Resource\Config\Data\CollectionFactory $configsFactory, \Magento\Core\Model\LocaleInterface $locale, \Magento\Core\Model\Website\Factory $websiteFactory, diff --git a/app/code/Magento/Backend/Model/Config/Backend/Log/Cron.php b/app/code/Magento/Backend/Model/Config/Backend/Log/Cron.php index c19a6c641c616..61897521bc82f 100644 --- a/app/code/Magento/Backend/Model/Config/Backend/Log/Cron.php +++ b/app/code/Magento/Backend/Model/Config/Backend/Log/Cron.php @@ -48,7 +48,7 @@ class Cron extends \Magento\Core\Model\Config\Value * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Config $config + * @param \Magento\App\ConfigInterface $config * @param \Magento\Core\Model\Config\ValueFactory $configValueFactory * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection @@ -59,7 +59,7 @@ public function __construct( \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Config $config, + \Magento\App\ConfigInterface $config, \Magento\Core\Model\Config\ValueFactory $configValueFactory, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, @@ -100,14 +100,14 @@ protected function _afterSave() } try { - /** @var $configValue \Magento\Core\Model\Config\Value */ + /** @var $configValue \Magento\App\Config\ValueInterface */ $configValue = $this->_configValueFactory->create(); $configValue->load(self::CRON_STRING_PATH, 'path'); $configValue->setValue($cronExprString) ->setPath(self::CRON_STRING_PATH) ->save(); - /** @var $configValue \Magento\Core\Model\Config\Value */ + /** @var $configValue \Magento\App\Config\ValueInterface */ $configValue = $this->_configValueFactory->create(); $configValue->load(self::CRON_MODEL_PATH, 'path'); $configValue->setValue($this->_runModelPath) diff --git a/app/code/Magento/Backend/Model/Config/Backend/Secure.php b/app/code/Magento/Backend/Model/Config/Backend/Secure.php index b910c4a946711..c8438f0d7f650 100644 --- a/app/code/Magento/Backend/Model/Config/Backend/Secure.php +++ b/app/code/Magento/Backend/Model/Config/Backend/Secure.php @@ -34,7 +34,7 @@ class Secure extends \Magento\Core\Model\Config\Value * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Config $config + * @param \Magento\App\ConfigInterface $config * @param \Magento\View\Asset\MergeService $mergeService * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection @@ -44,7 +44,7 @@ public function __construct( \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Config $config, + \Magento\App\ConfigInterface $config, \Magento\View\Asset\MergeService $mergeService, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, diff --git a/app/code/Magento/Backend/Model/Config/Backend/Storage/Media/Database.php b/app/code/Magento/Backend/Model/Config/Backend/Storage/Media/Database.php index e6ce0872d7a6c..459d4dd18d9f3 100644 --- a/app/code/Magento/Backend/Model/Config/Backend/Storage/Media/Database.php +++ b/app/code/Magento/Backend/Model/Config/Backend/Storage/Media/Database.php @@ -40,7 +40,7 @@ class Database extends \Magento\Core\Model\Config\Value * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Config $config + * @param \Magento\App\ConfigInterface $config * @param \Magento\Core\Helper\File\Storage $coreFileStorage * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection @@ -50,7 +50,7 @@ public function __construct( \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Config $config, + \Magento\App\ConfigInterface $config, \Magento\Core\Helper\File\Storage $coreFileStorage, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, diff --git a/app/code/Magento/Backend/Model/Config/Backend/Translate.php b/app/code/Magento/Backend/Model/Config/Backend/Translate.php index 862240c375994..52d1217bde88e 100644 --- a/app/code/Magento/Backend/Model/Config/Backend/Translate.php +++ b/app/code/Magento/Backend/Model/Config/Backend/Translate.php @@ -56,7 +56,7 @@ class Translate extends \Magento\Core\Model\Config\Value * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Config $config + * @param \Magento\App\ConfigInterface $config * @param \Magento\Core\Model\Store\Config $coreStoreConfig * @param \Magento\App\Cache\TypeListInterface $cacheTypeList * @param \Magento\Core\Model\Resource\AbstractResource $resource @@ -67,7 +67,7 @@ public function __construct( \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Config $config, + \Magento\App\ConfigInterface $config, \Magento\Core\Model\Store\Config $coreStoreConfig, \Magento\App\Cache\TypeListInterface $cacheTypeList, \Magento\Core\Model\Resource\AbstractResource $resource = null, diff --git a/app/code/Magento/Backend/Model/Config/BackendClone/Factory.php b/app/code/Magento/Backend/Model/Config/BackendClone/Factory.php index 860ddcb7be4db..b8a267a2a5158 100644 --- a/app/code/Magento/Backend/Model/Config/BackendClone/Factory.php +++ b/app/code/Magento/Backend/Model/Config/BackendClone/Factory.php @@ -48,7 +48,7 @@ public function __construct(\Magento\ObjectManager $objectManager) * Create new clone model * * @param string $cloneModel - * @return \Magento\Core\Model\Config\Value + * @return mixed */ public function create($cloneModel) { diff --git a/app/code/Magento/Backend/Model/Config/BackendFactory.php b/app/code/Magento/Backend/Model/Config/BackendFactory.php index 1d9f9eb0f3160..3ea0b53e668df 100644 --- a/app/code/Magento/Backend/Model/Config/BackendFactory.php +++ b/app/code/Magento/Backend/Model/Config/BackendFactory.php @@ -47,13 +47,13 @@ public function __construct(\Magento\ObjectManager $objectmanager) * Create backend model by name * * @param string $modelName - * @return \Magento\Core\Model\Config\Value + * @return \Magento\App\Config\ValueInterface * @throws \InvalidArgumentException */ public function create($modelName) { $model = $this->_objectManager->create($modelName); - if (!$model instanceof \Magento\Core\Model\Config\Value) { + if (!$model instanceof \Magento\App\Config\ValueInterface) { throw new \InvalidArgumentException('Invalid config field backend model: ' . $modelName); } return $model; diff --git a/app/code/Magento/Backend/Model/Config/Source/Admin/Page.php b/app/code/Magento/Backend/Model/Config/Source/Admin/Page.php index 719b6de9dce0f..e312cd705fe45 100644 --- a/app/code/Magento/Backend/Model/Config/Source/Admin/Page.php +++ b/app/code/Magento/Backend/Model/Config/Source/Admin/Page.php @@ -34,13 +34,6 @@ class Page implements \Magento\Core\Model\Option\ArrayInterface */ protected $_menu; - /** - * @var \Magento\Backend\Model\Menu\Filter\IteratorFactory - * - * @var \Magento\Core\Model\Config - */ - protected $_objectFactory; - /** * @var \Magento\Backend\Model\Menu\Filter\IteratorFactory */ diff --git a/app/code/Magento/Backend/Model/Config/Source/Storage/Media/Database.php b/app/code/Magento/Backend/Model/Config/Source/Storage/Media/Database.php index 0efd885c35138..415fcfd1a80a0 100644 --- a/app/code/Magento/Backend/Model/Config/Source/Storage/Media/Database.php +++ b/app/code/Magento/Backend/Model/Config/Source/Storage/Media/Database.php @@ -32,16 +32,16 @@ class Database implements \Magento\Core\Model\Option\ArrayInterface { /** - * @var \Magento\App\Config + * @var \Magento\App\Arguments */ - protected $_config; + protected $_arguments; /** - * @param \Magento\App\Config + * @param \Magento\App\Arguments */ - public function __construct(\Magento\App\Config $config) + public function __construct(\Magento\App\Arguments $arguments) { - $this->_config = $config; + $this->_arguments = $arguments; } /** @@ -52,7 +52,7 @@ public function __construct(\Magento\App\Config $config) public function toOptionArray() { $resourceOptions = array(); - foreach (array_keys($this->_config->getResources()) as $resourceName) { + foreach (array_keys($this->_arguments->getResources()) as $resourceName) { $resourceOptions[] = array('value' => $resourceName, 'label' => $resourceName); } sort($resourceOptions); diff --git a/app/code/Magento/Backend/Model/Config/Structure/AbstractElement.php b/app/code/Magento/Backend/Model/Config/Structure/AbstractElement.php index 7d4ce2e5725b6..578732088e1c9 100644 --- a/app/code/Magento/Backend/Model/Config/Structure/AbstractElement.php +++ b/app/code/Magento/Backend/Model/Config/Structure/AbstractElement.php @@ -44,18 +44,18 @@ abstract class AbstractElement protected $_scope; /** - * Application object + * Store manager * - * @var \Magento\Core\Model\App + * @var \Magento\Core\Model\StoreManagerInterface */ - protected $_application; + protected $_storeManager; /** - * @param \Magento\Core\Model\App $application + * @param \Magento\Core\Model\StoreManagerInterface */ - public function __construct(\Magento\Core\Model\App $application) + public function __construct(\Magento\Core\Model\StoreManagerInterface $storeManager) { - $this->_application = $application; + $this->_storeManager = $storeManager; } /** @@ -158,7 +158,7 @@ public function isVisible() \Magento\Backend\Model\Config\ScopeDefiner::SCOPE_DEFAULT => $this->_hasVisibilityValue('showInDefault'), ); - if ($this->_application->isSingleStoreMode()) { + if ($this->_storeManager->isSingleStoreMode()) { $result = !$this->_hasVisibilityValue('hide_in_single_store_mode') && array_sum($showInScope); return $result; diff --git a/app/code/Magento/Backend/Model/Config/Structure/Element/AbstractComposite.php b/app/code/Magento/Backend/Model/Config/Structure/Element/AbstractComposite.php index 55412c7f17c97..09b1a7397d170 100644 --- a/app/code/Magento/Backend/Model/Config/Structure/Element/AbstractComposite.php +++ b/app/code/Magento/Backend/Model/Config/Structure/Element/AbstractComposite.php @@ -37,14 +37,14 @@ abstract class AbstractComposite protected $_childrenIterator; /** - * @param \Magento\Core\Model\App $application + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Backend\Model\Config\Structure\Element\Iterator $childrenIterator */ public function __construct( - \Magento\Core\Model\App $application, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Backend\Model\Config\Structure\Element\Iterator $childrenIterator ) { - parent::__construct($application); + parent::__construct($storeManager); $this->_childrenIterator = $childrenIterator; } diff --git a/app/code/Magento/Backend/Model/Config/Structure/Element/Dependency/Mapper.php b/app/code/Magento/Backend/Model/Config/Structure/Element/Dependency/Mapper.php index d40729515434a..75db42e38bf6f 100644 --- a/app/code/Magento/Backend/Model/Config/Structure/Element/Dependency/Mapper.php +++ b/app/code/Magento/Backend/Model/Config/Structure/Element/Dependency/Mapper.php @@ -43,25 +43,25 @@ class Mapper protected $_fieldFactory; /** - * Application object + * Store Manager * - * @var \Magento\Core\Model\App + * @var \Magento\Core\Model\StoreManagerInterface */ - protected $_application; + protected $_storeManager; /** - * @param \Magento\Core\Model\App $application + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Backend\Model\Config\Structure\SearchInterface $fieldLocator * @param \Magento\Backend\Model\Config\Structure\Element\Dependency\FieldFactory $fieldFactory */ public function __construct( - \Magento\Core\Model\App $application, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Backend\Model\Config\Structure\SearchInterface $fieldLocator, \Magento\Backend\Model\Config\Structure\Element\Dependency\FieldFactory $fieldFactory ) { $this->_fieldLocator = $fieldLocator; - $this->_application = $application; + $this->_storeManager = $storeManager; $this->_fieldFactory = $fieldFactory; } @@ -88,7 +88,7 @@ public function getDependencies($dependencies, $storeCode, $fieldPrefix = '') * based on not shown field (not rendered field) */ if (false == $dependentField->isVisible()) { - $valueInStore = $this->_application + $valueInStore = $this->_storeManager ->getStore($storeCode) ->getConfig($dependentField->getPath($fieldPrefix)); $shouldAddDependency = !$field->isValueSatisfy($valueInStore); diff --git a/app/code/Magento/Backend/Model/Config/Structure/Element/Field.php b/app/code/Magento/Backend/Model/Config/Structure/Element/Field.php index 2a39df68ba78d..12cb2e6f6ac88 100644 --- a/app/code/Magento/Backend/Model/Config/Structure/Element/Field.php +++ b/app/code/Magento/Backend/Model/Config/Structure/Element/Field.php @@ -70,7 +70,7 @@ class Field protected $_blockFactory; /** - * @param \Magento\Core\Model\App $application + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Backend\Model\Config\BackendFactory $backendFactory * @param \Magento\Backend\Model\Config\SourceFactory $sourceFactory * @param \Magento\Backend\Model\Config\CommentFactory $commentFactory @@ -78,14 +78,14 @@ class Field * @param \Magento\Backend\Model\Config\Structure\Element\Dependency\Mapper $dependencyMapper */ public function __construct( - \Magento\Core\Model\App $application, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Backend\Model\Config\BackendFactory $backendFactory, \Magento\Backend\Model\Config\SourceFactory $sourceFactory, \Magento\Backend\Model\Config\CommentFactory $commentFactory, \Magento\View\Element\BlockFactory $blockFactory, \Magento\Backend\Model\Config\Structure\Element\Dependency\Mapper $dependencyMapper ) { - parent::__construct($application); + parent::__construct($storeManager); $this->_backendFactory = $backendFactory; $this->_sourceFactory = $sourceFactory; $this->_commentFactory = $commentFactory; @@ -234,7 +234,7 @@ public function hasBackendModel() /** * Retrieve backend model * - * @return \Magento\Core\Model\Config\Value + * @return \Magento\App\Config\ValueInterface */ public function getBackendModel() { diff --git a/app/code/Magento/Backend/Model/Config/Structure/Element/Group.php b/app/code/Magento/Backend/Model/Config/Structure/Element/Group.php index 7cd7fdecf4a9d..5921eb20c1f66 100644 --- a/app/code/Magento/Backend/Model/Config/Structure/Element/Group.php +++ b/app/code/Magento/Backend/Model/Config/Structure/Element/Group.php @@ -43,18 +43,18 @@ class Group protected $_dependencyMapper; /** - * @param \Magento\Core\Model\App $application + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Backend\Model\Config\Structure\Element\Iterator\Field $childrenIterator * @param \Magento\Backend\Model\Config\BackendClone\Factory $cloneModelFactory * @param \Magento\Backend\Model\Config\Structure\Element\Dependency\Mapper $dependencyMapper */ public function __construct( - \Magento\Core\Model\App $application, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Backend\Model\Config\Structure\Element\Iterator\Field $childrenIterator, \Magento\Backend\Model\Config\BackendClone\Factory $cloneModelFactory, \Magento\Backend\Model\Config\Structure\Element\Dependency\Mapper $dependencyMapper ) { - parent::__construct($application, $childrenIterator); + parent::__construct($storeManager, $childrenIterator); $this->_cloneModelFactory = $cloneModelFactory; $this->_dependencyMapper = $dependencyMapper; } diff --git a/app/code/Magento/Backend/Model/Config/Structure/Element/Section.php b/app/code/Magento/Backend/Model/Config/Structure/Element/Section.php index 44e63a45f0942..ba1a3a3584834 100644 --- a/app/code/Magento/Backend/Model/Config/Structure/Element/Section.php +++ b/app/code/Magento/Backend/Model/Config/Structure/Element/Section.php @@ -37,16 +37,16 @@ class Section protected $_authorization; /** - * @param \Magento\Core\Model\App $application + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Backend\Model\Config\Structure\Element\Iterator $childrenIterator * @param \Magento\AuthorizationInterface $authorization */ public function __construct( - \Magento\Core\Model\App $application, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Backend\Model\Config\Structure\Element\Iterator $childrenIterator, \Magento\AuthorizationInterface $authorization ) { - parent::__construct($application, $childrenIterator); + parent::__construct($storeManager, $childrenIterator); $this->_authorization = $authorization; } diff --git a/app/code/Magento/Backend/Model/Config/Structure/Reader.php b/app/code/Magento/Backend/Model/Config/Structure/Reader.php index bca858dc8451b..c70db6d1c9f2c 100644 --- a/app/code/Magento/Backend/Model/Config/Structure/Reader.php +++ b/app/code/Magento/Backend/Model/Config/Structure/Reader.php @@ -36,25 +36,10 @@ class Reader extends \Magento\Config\Reader\Filesystem protected $_idAttributes = array( '/config/system/tab' => 'id', '/config/system/section' => 'id', - '/config/system/section/group' => 'id', - '/config/system/section/group/field' => 'id', - '/config/system/section/group/field/depends/field' => 'id', - '/config/system/section/group/group' => 'id', - '/config/system/section/group/group/field' => 'id', - '/config/system/section/group/group/field/depends/field' => 'id', - '/config/system/section/group/group/group' => 'id', - '/config/system/section/group/group/group/field' => 'id', - '/config/system/section/group/group/group/field/depends/field' => 'id', - '/config/system/section/group/group/group/group' => 'id', - '/config/system/section/group/group/group/group/field' => 'id', - '/config/system/section/group/group/group/group/field/depends/field' => 'id', - '/config/system/section/group/group/group/group/group' => 'id', - '/config/system/section/group/group/group/group/group/field' => 'id', - '/config/system/section/group/group/group/group/group/field/depends/field' => 'id', - '/config/system/section/group/field/options/option' => 'label', - '/config/system/section/group/group/field/options/option' => 'label', - '/config/system/section/group/group/group/field/options/option' => 'label', - '/config/system/section/group/group/group/group/field/options/option' => 'label', + '/config/system/section(/group)+' => 'id', + '/config/system/section(/group)+/field' => 'id', + '/config/system/section(/group)+/field/depends/field' => 'id', + '/config/system/section(/group)+/field/options/option' => 'label', ); /** diff --git a/app/code/Magento/Backend/Model/Menu/Item.php b/app/code/Magento/Backend/Model/Menu/Item.php index ac24793694725..d7782fc3abd48 100644 --- a/app/code/Magento/Backend/Model/Menu/Item.php +++ b/app/code/Magento/Backend/Model/Menu/Item.php @@ -130,7 +130,7 @@ class Item protected $_menuFactory; /** - * @var \Magento\Backend\Model\Url + * @var \Magento\Backend\Model\UrlInterface */ protected $_urlModel; @@ -168,7 +168,7 @@ class Item * @param \Magento\AuthorizationInterface $authorization * @param \Magento\Core\Model\Store\Config $storeConfig * @param \Magento\Backend\Model\MenuFactory $menuFactory - * @param \Magento\Backend\Model\Url $urlModel + * @param \Magento\Backend\Model\UrlInterface $urlModel * @param \Magento\Module\ModuleListInterface $moduleList * @param \Magento\Module\Manager $moduleManager * @param array $data @@ -178,7 +178,7 @@ public function __construct( \Magento\AuthorizationInterface $authorization, \Magento\Core\Model\Store\Config $storeConfig, \Magento\Backend\Model\MenuFactory $menuFactory, - \Magento\Backend\Model\Url $urlModel, + \Magento\Backend\Model\UrlInterface $urlModel, \Magento\Module\ModuleListInterface $moduleList, \Magento\Module\Manager $moduleManager, array $data = array() @@ -491,7 +491,7 @@ public function __wakeup() $this->_acl = $objectManager->get('Magento\AuthorizationInterface'); $this->_storeConfig = $objectManager->get('Magento\Core\Model\Store\Config'); $this->_menuFactory = $objectManager->get('Magento\Backend\Model\MenuFactory'); - $this->_urlModel = $objectManager->get('Magento\Backend\Model\Url'); + $this->_urlModel = $objectManager->get('Magento\Backend\Model\UrlInterface'); $this->_moduleList = $objectManager->get('Magento\Module\ModuleListInterface'); if ($this->_serializedSubmenu) { $this->_submenu = $this->_menuFactory->create(); diff --git a/app/code/Magento/Backend/Model/Observer.php b/app/code/Magento/Backend/Model/Observer.php index fef6039adf85d..f336e59f8e1c6 100644 --- a/app/code/Magento/Backend/Model/Observer.php +++ b/app/code/Magento/Backend/Model/Observer.php @@ -112,7 +112,7 @@ public function setUrlClassName(\Magento\Event\Observer $observer) /** @var $store \Magento\Core\Model\Store */ foreach ($storeCollection as $store) { if ($store->getId() == 0) { - $store->setUrlClassName('Magento\Backend\Model\Url'); + $store->setUrlClassName('Magento\Backend\Model\UrlInterface'); break; } } diff --git a/app/code/Magento/Backend/Model/Translate/Inline/Config.php b/app/code/Magento/Backend/Model/Translate/Inline/Config.php index a692af573255a..fa701b4b06b44 100644 --- a/app/code/Magento/Backend/Model/Translate/Inline/Config.php +++ b/app/code/Magento/Backend/Model/Translate/Inline/Config.php @@ -52,6 +52,6 @@ public function __construct(\Magento\Backend\App\ConfigInterface $config) */ public function isActive($store = null) { - return $this->_config->getFlag('dev/translate_inline/active_admin'); + return $this->_config->isSetFlag('dev/translate_inline/active_admin'); } } diff --git a/app/code/Magento/Backend/Model/Url.php b/app/code/Magento/Backend/Model/Url.php index 3c5a4105945d9..ffa5254b20723 100644 --- a/app/code/Magento/Backend/Model/Url.php +++ b/app/code/Magento/Backend/Model/Url.php @@ -29,22 +29,12 @@ use Magento\Backend\Model\Menu; /** - * Class \Magento\Backend\Model\Url + * Class \Magento\Backend\Model\UrlInterface * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ -class Url extends \Magento\Core\Model\Url +class Url extends \Magento\Url implements \Magento\Backend\Model\UrlInterface { - /** - * Secret key query param name - */ - const SECRET_KEY_PARAM_NAME = 'key'; - - /** - * xpath to startup page in configuration - */ - const XML_PATH_STARTUP_MENU_ITEM = 'admin/startup/menu_item_id'; - /** * Authentication session * @@ -97,10 +87,15 @@ class Url extends \Magento\Core\Model\Url protected $_storeFactory; /** - * @var \Magento\Core\Model\ConfigInterface + * @var \Magento\App\ConfigInterface */ protected $_coreConfig; + /** + * @var \Magento\Core\Model\Store\Config + */ + protected $_coreStoreConfig; + /** * @var \Magento\Data\Form\FormKey */ @@ -109,12 +104,12 @@ class Url extends \Magento\Core\Model\Url /** * @param \Magento\App\Route\ConfigInterface $routeConfig * @param \Magento\App\RequestInterface $request - * @param \Magento\Core\Model\Url\SecurityInfoInterface $urlSecurityInfo - * @param \Magento\Core\Model\Store\Config $coreStoreConfig - * @param \Magento\Core\Model\App $app - * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\Url\SecurityInfoInterface $urlSecurityInfo + * @param \Magento\Backend\Model\Url\ScopeResolver $scopeResolver * @param \Magento\Core\Model\Session $session * @param \Magento\Session\SidResolverInterface $sidResolver + * @param \Magento\Url\RouteParamsResolverFactory $routeParamsResolver + * @param \Magento\Url\QueryParamsResolverInterface $queryParamsResolver * @param \Magento\Backend\Helper\Data $backendHelper * @param Menu\Config $menuConfig * @param \Magento\App\CacheInterface $cache @@ -122,22 +117,22 @@ class Url extends \Magento\Core\Model\Url * @param \Magento\Encryption\EncryptorInterface $encryptor * @param \Magento\Backend\App\ConfigInterface $config * @param \Magento\Core\Model\StoreFactory $storeFactory - * @param \Magento\Core\Model\ConfigInterface $coreConfig + * @param \Magento\App\ConfigInterface $coreConfig * @param \Magento\Data\Form\FormKey $formKey - * @param null $areaCode + * @param \Magento\Core\Model\Store\Config $coreStoreConfig * @param array $data - * + * * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\App\Route\ConfigInterface $routeConfig, \Magento\App\RequestInterface $request, - \Magento\Core\Model\Url\SecurityInfoInterface $urlSecurityInfo, - \Magento\Core\Model\Store\Config $coreStoreConfig, - \Magento\Core\Model\App $app, - \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\Url\SecurityInfoInterface $urlSecurityInfo, + \Magento\Backend\Model\Url\ScopeResolver $scopeResolver, \Magento\Core\Model\Session $session, \Magento\Session\SidResolverInterface $sidResolver, + \Magento\Url\RouteParamsResolverFactory $routeParamsResolver, + \Magento\Url\QueryParamsResolverInterface $queryParamsResolver, \Magento\Backend\Helper\Data $backendHelper, \Magento\Backend\Model\Menu\Config $menuConfig, \Magento\App\CacheInterface $cache, @@ -145,9 +140,9 @@ public function __construct( \Magento\Encryption\EncryptorInterface $encryptor, \Magento\Backend\App\ConfigInterface $config, \Magento\Core\Model\StoreFactory $storeFactory, - \Magento\Core\Model\ConfigInterface $coreConfig, + \Magento\App\ConfigInterface $coreConfig, \Magento\Data\Form\FormKey $formKey, - $areaCode = null, + \Magento\Core\Model\Store\Config $coreStoreConfig, array $data = array() ) { $this->_encryptor = $encryptor; @@ -155,16 +150,14 @@ public function __construct( $routeConfig, $request, $urlSecurityInfo, - $coreStoreConfig, - $app, - $storeManager, + $scopeResolver, $session, $sidResolver, - $areaCode, + $routeParamsResolver, + $queryParamsResolver, $data ); $this->_config = $config; - $this->_startupMenuItemId = $coreStoreConfig->getConfig(self::XML_PATH_STARTUP_MENU_ITEM); $this->_backendHelper = $backendHelper; $this->_menuConfig = $menuConfig; $this->_cache = $cache; @@ -172,6 +165,7 @@ public function __construct( $this->formKey = $formKey; $this->_storeFactory = $storeFactory; $this->_coreConfig = $coreConfig; + $this->_coreStoreConfig = $coreStoreConfig; } /** @@ -179,12 +173,12 @@ public function __construct( * * @return bool */ - public function isSecure() + protected function _isSecure() { if ($this->hasData('secure_is_forced')) { return $this->getData('secure'); } - return $this->_config->getFlag('web/secure/use_in_adminhtml'); + return $this->_config->isSetFlag('web/secure/use_in_adminhtml'); } /** @@ -192,9 +186,9 @@ public function isSecure() * * @param array $data * @param bool $unsetOldParams - * @return \Magento\Backend\Model\Url + * @return \Magento\Backend\Model\UrlInterface */ - public function setRouteParams(array $data, $unsetOldParams = true) + protected function _setRouteParams(array $data, $unsetOldParams = true) { if (isset($data['_nosecret'])) { $this->setNoSecret(true); @@ -202,8 +196,8 @@ public function setRouteParams(array $data, $unsetOldParams = true) } else { $this->setNoSecret(false); } - unset($data['_store_to_url']); - return parent::setRouteParams($data, $unsetOldParams); + unset($data['_scope_to_url']); + return parent::_setRouteParams($data, $unsetOldParams); } /** @@ -224,9 +218,9 @@ public function getUrl($routePath = null, $routeParams = null) if (!$this->useSecretKey()) { return $result; } - $routeName = $this->getRouteName('*'); - $controllerName = $this->getControllerName($this->getDefaultControllerName()); - $actionName = $this->getActionName($this->getDefaultActionName()); + $routeName = $this->_getRouteName('*'); + $controllerName = $this->_getControllerName($this->_getDefaultControllerName()); + $actionName = $this->_getActionName($this->_getDefaultActionName()); if ($cacheSecretKey) { $secret = array(self::SECRET_KEY_PARAM_NAME => "\${$routeName}/{$controllerName}/{$actionName}\$"); } else { @@ -239,8 +233,8 @@ public function getUrl($routePath = null, $routeParams = null) } else { $routeParams = $secret; } - if (is_array($this->getRouteParams())) { - $routeParams = array_merge($this->getRouteParams(), $routeParams); + if (is_array($this->_getRouteParams())) { + $routeParams = array_merge($this->_getRouteParams(), $routeParams); } return parent::getUrl("{$routeName}/{$controllerName}/{$actionName}", $routeParams); } @@ -256,7 +250,7 @@ public function getUrl($routePath = null, $routeParams = null) public function getSecretKey($routeName = null, $controller = null, $action = null) { $salt = $this->formKey->getFormKey(); - $request = $this->getRequest(); + $request = $this->_getRequest(); if (!$routeName) { if ($request->getBeforeForwardInfo('route_name') !== null) { $routeName = $request->getBeforeForwardInfo('route_name'); @@ -289,13 +283,13 @@ public function getSecretKey($routeName = null, $controller = null, $action = nu */ public function useSecretKey() { - return $this->_config->getFlag('admin/security/use_form_key') && !$this->getNoSecret(); + return $this->_config->isSetFlag('admin/security/use_form_key') && !$this->getNoSecret(); } /** * Enable secret key using * - * @return \Magento\Backend\Model\Url + * @return \Magento\Backend\Model\UrlInterface */ public function turnOnSecretKey() { @@ -306,7 +300,7 @@ public function turnOnSecretKey() /** * Disable secret key using * - * @return \Magento\Backend\Model\Url + * @return \Magento\Backend\Model\UrlInterface */ public function turnOffSecretKey() { @@ -317,7 +311,7 @@ public function turnOffSecretKey() /** * Refresh admin menu cache etc. * - * @return \Magento\Backend\Model\Url + * @return \Magento\Backend\Model\UrlInterface */ public function renewSecretUrls() { @@ -331,7 +325,7 @@ public function renewSecretUrls() */ public function getStartupPageUrl() { - $menuItem = $this->_getMenu()->get($this->_startupMenuItemId); + $menuItem = $this->_getMenu()->get($this->_coreStoreConfig->getConfig(self::XML_PATH_STARTUP_MENU_ITEM)); if (!is_null($menuItem)) { if ($menuItem->isAllowed() && $menuItem->getAction()) { return $menuItem->getAction(); @@ -378,7 +372,7 @@ protected function _getMenu() * Set custom auth session * * @param \Magento\Backend\Model\Auth\Session $session - * @return \Magento\Backend\Model\Url + * @return \Magento\Backend\Model\UrlInterface */ public function setSession(\Magento\Backend\Model\Auth\Session $session) { @@ -415,9 +409,9 @@ public function getAreaFrontName() * * @return string */ - public function getActionPath() + protected function _getActionPath() { - $path = parent::getActionPath(); + $path = parent::_getActionPath(); if ($path) { if ($this->getAreaFrontName()) { $path = $this->getAreaFrontName() . '/' . $path; @@ -427,11 +421,11 @@ public function getActionPath() } /** - * Get fake store for the url instance + * Get scope for the url instance * * @return \Magento\Core\Model\Store */ - public function getStore() + protected function _getScope() { return $this->_storeFactory->create(array('url' => $this, 'data' => array( 'code' => 'admin', diff --git a/app/code/Magento/PaypalUk/sql/paypaluk_setup/install-1.6.0.0.php b/app/code/Magento/Backend/Model/Url/ScopeResolver.php similarity index 87% rename from app/code/Magento/PaypalUk/sql/paypaluk_setup/install-1.6.0.0.php rename to app/code/Magento/Backend/Model/Url/ScopeResolver.php index 09c23983ea222..07f64f5d41ec8 100644 --- a/app/code/Magento/PaypalUk/sql/paypaluk_setup/install-1.6.0.0.php +++ b/app/code/Magento/Backend/Model/Url/ScopeResolver.php @@ -18,11 +18,12 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * - * @category Magento - * @package Magento_PaypalUk * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -$installer = $this; -/* @var $installer \Magento\Core\Model\Resource\Setup */ +namespace Magento\Backend\Model\Url; + +class ScopeResolver extends \Magento\Core\Model\Url\ScopeResolver +{ +} diff --git a/app/code/Magento/Backend/Model/UrlInterface.php b/app/code/Magento/Backend/Model/UrlInterface.php new file mode 100644 index 0000000000000..ab9eba4d410da --- /dev/null +++ b/app/code/Magento/Backend/Model/UrlInterface.php @@ -0,0 +1,104 @@ + - + @@ -41,7 +41,7 @@ - + @@ -51,7 +51,7 @@ - + @@ -100,18 +100,22 @@ - - - Magento\Backend\App\Router\DefaultRouter - false - 10 - - - Magento\App\Router\DefaultRouter - false - 100 - - + + + + Magento\Backend\App\Router\DefaultRouter + false + 10 + + + + + Magento\App\Router\DefaultRouter + false + 100 + + + diff --git a/app/code/Magento/Backend/etc/di.xml b/app/code/Magento/Backend/etc/di.xml index 221b6eaafe276..3c53c7aa790ee 100644 --- a/app/code/Magento/Backend/etc/di.xml +++ b/app/code/Magento/Backend/etc/di.xml @@ -32,14 +32,17 @@ + - - - Magento\Backend\App\Area\FrontNameResolver - admin - - + + + + Magento\Backend\App\Area\FrontNameResolver + admin + + + @@ -62,7 +65,7 @@ - + @@ -70,17 +73,19 @@ - - - Magento\Backend\App\Router\NoRouteHandler - 10 - - + + + + Magento\Backend\App\Router\NoRouteHandler + 10 + + + - + @@ -88,6 +93,11 @@ + + + adminhtml + + @@ -95,14 +105,6 @@ - - adminhtml - - - - - frontend - @@ -139,20 +141,26 @@ - - - Magento\Backend\Model\Search\Catalog - Magento_Catalog::catalog - - - Magento\Backend\Model\Search\Customer - Magento_Customer::customer - - - Magento\Backend\Model\Search\Order - Magento_Sales::sales - - + + + + Magento\Backend\Model\Search\Catalog + Magento_Catalog::catalog + + + + + Magento\Backend\Model\Search\Customer + Magento_Customer::customer + + + + + Magento\Backend\Model\Search\Order + Magento_Sales::sales + + + diff --git a/app/code/Magento/Backup/Model/Config/Backend/Cron.php b/app/code/Magento/Backup/Model/Config/Backend/Cron.php index 9c9a3bdc3a531..10efaae705441 100644 --- a/app/code/Magento/Backup/Model/Config/Backend/Cron.php +++ b/app/code/Magento/Backup/Model/Config/Backend/Cron.php @@ -39,7 +39,7 @@ class Cron extends \Magento\Core\Model\Config\Value /** * Config value factory * - * @var \Magento\Core\Model\Config\Value + * @var \Magento\Core\Model\Config\ValueFactory */ protected $_configValueFactory; @@ -52,7 +52,7 @@ class Cron extends \Magento\Core\Model\Config\Value * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Config $config + * @param \Magento\App\ConfigInterface $config * @param \Magento\Core\Model\Config\ValueFactory $configValueFactory * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection @@ -63,7 +63,7 @@ public function __construct( \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Config $config, + \Magento\App\ConfigInterface $config, \Magento\Core\Model\Config\ValueFactory $configValueFactory, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, diff --git a/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Search/Grid.php b/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Search/Grid.php index e16dc110396ac..5f73dc89263ae 100644 --- a/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Search/Grid.php +++ b/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Search/Grid.php @@ -50,7 +50,6 @@ class Grid /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Url $urlModel * @param \Magento\Backend\Helper\Data $backendHelper * @param \Magento\Catalog\Model\ProductFactory $productFactory * @param \Magento\Bundle\Helper\Data $bundleData @@ -58,7 +57,6 @@ class Grid */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Url $urlModel, \Magento\Backend\Helper\Data $backendHelper, \Magento\Catalog\Model\ProductFactory $productFactory, \Magento\Bundle\Helper\Data $bundleData, @@ -66,7 +64,7 @@ public function __construct( ) { $this->_bundleData = $bundleData; $this->_productFactory = $productFactory; - parent::__construct($context, $urlModel, $backendHelper, $data); + parent::__construct($context, $backendHelper, $data); } protected function _construct() diff --git a/app/code/Magento/Bundle/Model/Product/CatalogPrice.php b/app/code/Magento/Bundle/Model/Product/CatalogPrice.php new file mode 100644 index 0000000000000..2e544ed26caeb --- /dev/null +++ b/app/code/Magento/Bundle/Model/Product/CatalogPrice.php @@ -0,0 +1,101 @@ +storeManager = $storeManager; + $this->commonPriceModel = $commonPriceModel; + $this->coreRegistry = $coreRegistry; + } + + /** + * Minimal price for "regular" user + * + * @param \Magento\Catalog\Model\Product $product + * @param null|\Magento\Core\Model\Store $store Store view + * @param bool $inclTax + * @return null|float + */ + public function getCatalogPrice(\Magento\Catalog\Model\Product $product, $store = null, $inclTax = false) + { + if ($store instanceof \Magento\Core\Model\Store) { + $oldStore = $this->storeManager->getStore(); + $this->storeManager->setCurrentStore($store); + } + + $this->coreRegistry->unregister('rule_data'); + $this->coreRegistry->register('rule_data', new \Magento\Object(array( + 'store_id' => $product->getStoreId(), + 'website_id' => $product->getWebsiteId(), + 'customer_group_id' => $product->getCustomerGroupId()))); + + $minPrice = $product->getPriceModel()->getTotalPrices($product, 'min', $inclTax); + + if ($store instanceof \Magento\Core\Model\Store) { + $this->storeManager->setCurrentStore($oldStore); + } + return $minPrice; + } + + /** + * Regular catalog price not applicable for bundle product + * + * @param \Magento\Catalog\Model\Product $product + * @return null + */ + public function getCatalogRegularPrice(\Magento\Catalog\Model\Product $product) + { + return null; + } +} \ No newline at end of file diff --git a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/AbstractItems.php b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/AbstractItems.php index b690c4e497cdc..4e87df9fe7a06 100644 --- a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/AbstractItems.php +++ b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/AbstractItems.php @@ -24,15 +24,13 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\Bundle\Model\Sales\Order\Pdf\Items; + +use Magento\Catalog\Model\Product\Type\AbstractType; + /** * Sales Order Pdf Items renderer - * - * @category Magento - * @package Magento_Bundle - * @author Magento Core Team */ -namespace Magento\Bundle\Model\Sales\Order\Pdf\Items; - abstract class AbstractItems extends \Magento\Sales\Model\Order\Pdf\Items\AbstractItems { /** @@ -43,29 +41,30 @@ abstract class AbstractItems extends \Magento\Sales\Model\Order\Pdf\Items\Abstra */ public function getChilds($item) { - $_itemsArray = array(); + $itemsArray = array(); + $items = null; if ($item instanceof \Magento\Sales\Model\Order\Invoice\Item) { - $_items = $item->getInvoice()->getAllItems(); - } else if ($item instanceof \Magento\Sales\Model\Order\Shipment\Item) { - $_items = $item->getShipment()->getAllItems(); - } else if ($item instanceof \Magento\Sales\Model\Order\Creditmemo\Item) { - $_items = $item->getCreditmemo()->getAllItems(); + $items = $item->getInvoice()->getAllItems(); + } elseif ($item instanceof \Magento\Sales\Model\Order\Shipment\Item) { + $items = $item->getShipment()->getAllItems(); + } elseif ($item instanceof \Magento\Sales\Model\Order\Creditmemo\Item) { + $items = $item->getCreditmemo()->getAllItems(); } - if ($_items) { - foreach ($_items as $_item) { - $parentItem = $_item->getOrderItem()->getParentItem(); + if ($items) { + foreach ($items as $invoiceItem) { + $parentItem = $invoiceItem->getOrderItem()->getParentItem(); if ($parentItem) { - $_itemsArray[$parentItem->getId()][$_item->getOrderItemId()] = $_item; + $itemsArray[$parentItem->getId()][$invoiceItem->getOrderItemId()] = $invoiceItem; } else { - $_itemsArray[$_item->getOrderItem()->getId()][$_item->getOrderItemId()] = $_item; + $itemsArray[$invoiceItem->getOrderItem()->getId()][$invoiceItem->getOrderItemId()] = $invoiceItem; } } } - if (isset($_itemsArray[$item->getOrderItem()->getId()])) { - return $_itemsArray[$item->getOrderItem()->getId()]; + if (isset($itemsArray[$item->getOrderItem()->getId()])) { + return $itemsArray[$item->getOrderItem()->getId()]; } else { return null; } @@ -89,7 +88,8 @@ public function isShipmentSeparately($item = null) $options = $parentItem->getProductOptions(); if ($options) { if (isset($options['shipment_type']) - && $options['shipment_type'] == \Magento\Catalog\Model\Product\Type\AbstractType::SHIPMENT_SEPARATELY) { + && $options['shipment_type'] == AbstractType::SHIPMENT_SEPARATELY + ) { return true; } else { return false; @@ -99,7 +99,8 @@ public function isShipmentSeparately($item = null) $options = $item->getProductOptions(); if ($options) { if (isset($options['shipment_type']) - && $options['shipment_type'] == \Magento\Catalog\Model\Product\Type\AbstractType::SHIPMENT_SEPARATELY) { + && $options['shipment_type'] == AbstractType::SHIPMENT_SEPARATELY + ) { return false; } else { return true; @@ -111,7 +112,8 @@ public function isShipmentSeparately($item = null) $options = $this->getOrderItem()->getProductOptions(); if ($options) { if (isset($options['shipment_type']) - && $options['shipment_type'] == \Magento\Catalog\Model\Product\Type\AbstractType::SHIPMENT_SEPARATELY) { + && $options['shipment_type'] == AbstractType::SHIPMENT_SEPARATELY + ) { return true; } } @@ -135,8 +137,8 @@ public function isChildCalculated($item = null) if ($parentItem) { $options = $parentItem->getProductOptions(); if ($options) { - if (isset($options['product_calculations']) && - $options['product_calculations'] == \Magento\Catalog\Model\Product\Type\AbstractType::CALCULATE_CHILD + if (isset($options['product_calculations']) + && $options['product_calculations'] == AbstractType::CALCULATE_CHILD ) { return true; } else { @@ -146,8 +148,8 @@ public function isChildCalculated($item = null) } else { $options = $item->getProductOptions(); if ($options) { - if (isset($options['product_calculations']) && - $options['product_calculations'] == \Magento\Catalog\Model\Product\Type\AbstractType::CALCULATE_CHILD + if (isset($options['product_calculations']) + && $options['product_calculations'] == AbstractType::CALCULATE_CHILD ) { return false; } else { @@ -160,7 +162,8 @@ public function isChildCalculated($item = null) $options = $this->getOrderItem()->getProductOptions(); if ($options) { if (isset($options['product_calculations']) - && $options['product_calculations'] == \Magento\Catalog\Model\Product\Type\AbstractType::CALCULATE_CHILD) { + && $options['product_calculations'] == AbstractType::CALCULATE_CHILD + ) { return true; } } @@ -212,7 +215,6 @@ public function getSelectionAttributes($item) public function getOrderOptions($item = null) { $result = array(); - $options = $this->getOrderItem()->getProductOptions(); if ($options) { if (isset($options['options'])) { @@ -250,17 +252,19 @@ public function getOrderItem() */ public function getValueHtml($item) { - $result = strip_tags($item->getName()); + $result = $this->filterManager->stripTags($item->getName()); if (!$this->isShipmentSeparately($item)) { $attributes = $this->getSelectionAttributes($item); if ($attributes) { - $result = sprintf('%d', $attributes['qty']) . ' x ' . $result; + $result = $this->filterManager->sprintf($attributes['qty'], array('format' => '%d')) . ' x ' . $result; } } if (!$this->isChildCalculated($item)) { $attributes = $this->getSelectionAttributes($item); if ($attributes) { - $result .= " " . strip_tags($this->getOrderItem()->getOrder()->formatPrice($attributes['price'])); + $result .= " " . $this->filterManager->stripTags( + $this->getOrderItem()->getOrder()->formatPrice($attributes['price']) + ); } } return $result; @@ -275,7 +279,8 @@ public function getValueHtml($item) public function canShowPriceInfo($item) { if (($item->getOrderItem()->getParentItem() && $this->isChildCalculated()) - || (!$item->getOrderItem()->getParentItem() && !$this->isChildCalculated())) { + || (!$item->getOrderItem()->getParentItem() && !$this->isChildCalculated()) + ) { return true; } return false; diff --git a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Creditmemo.php b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Creditmemo.php index de78c696d2a00..86f22d882b24c 100644 --- a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Creditmemo.php +++ b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Creditmemo.php @@ -24,15 +24,11 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\Bundle\Model\Sales\Order\Pdf\Items; + /** * Sales Order Creditmemo Pdf default items renderer - * - * @category Magento - * @package Magento_Sales - * @author Magento Core Team */ -namespace Magento\Bundle\Model\Sales\Order\Pdf\Items; - class Creditmemo extends \Magento\Bundle\Model\Sales\Order\Pdf\Items\AbstractItems { /** @@ -47,6 +43,7 @@ class Creditmemo extends \Magento\Bundle\Model\Sales\Order\Pdf\Items\AbstractIte * @param \Magento\Core\Model\Registry $registry * @param \Magento\Tax\Helper\Data $taxData * @param \Magento\App\Filesystem $filesystem + * @param \Magento\Filter\FilterManager $filterManager * @param \Magento\Stdlib\String $string * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection @@ -57,18 +54,27 @@ public function __construct( \Magento\Core\Model\Registry $registry, \Magento\Tax\Helper\Data $taxData, \Magento\App\Filesystem $filesystem, + \Magento\Filter\FilterManager $filterManager, \Magento\Stdlib\String $string, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, array $data = array() ) { $this->string = $string; - parent::__construct($context, $registry, $taxData, $filesystem, $resource, $resourceCollection, $data); + parent::__construct( + $context, + $registry, + $taxData, + $filesystem, + $filterManager, + $resource, + $resourceCollection, + $data + ); } /** * Draw item line - * */ public function draw() { @@ -78,20 +84,19 @@ public function draw() $page = $this->getPage(); $items = $this->getChilds($item); - $_prevOptionId = ''; + $prevOptionId = ''; $drawItems = array(); $leftBound = 35; $rightBound = 565; - foreach ($items as $_item) { + foreach ($items as $childItem) { $x = $leftBound; $line = array(); - $attributes = $this->getSelectionAttributes($_item); + $attributes = $this->getSelectionAttributes($childItem); if (is_array($attributes)) { - $optionId = $attributes['option_id']; - } - else { + $optionId = $attributes['option_id']; + } else { $optionId = 0; } @@ -103,8 +108,8 @@ public function draw() } // draw selection attributes - if ($_item->getOrderItem()->getParentItem()) { - if ($_prevOptionId != $attributes['option_id']) { + if ($childItem->getOrderItem()->getParentItem()) { + if ($prevOptionId != $attributes['option_id']) { $line[0] = array( 'font' => 'italic', 'text' => $this->string->split($attributes['option_label'], 38, true, true), @@ -117,17 +122,17 @@ public function draw() ); $line = array(); - $_prevOptionId = $attributes['option_id']; + $prevOptionId = $attributes['option_id']; } } // draw product titles - if ($_item->getOrderItem()->getParentItem()) { + if ($childItem->getOrderItem()->getParentItem()) { $feed = $x + 5; - $name = $this->getValueHtml($_item); + $name = $this->getValueHtml($childItem); } else { $feed = $x; - $name = $_item->getName(); + $name = $childItem->getName(); } $line[] = array( @@ -138,7 +143,7 @@ public function draw() $x += 220; // draw SKUs - if (!$_item->getOrderItem()->getParentItem()) { + if (!$childItem->getOrderItem()->getParentItem()) { $text = array(); foreach ($this->string->split($item->getSku(), 17) as $part) { $text[] = $part; @@ -152,9 +157,9 @@ public function draw() $x += 100; // draw prices - if ($this->canShowPriceInfo($_item)) { + if ($this->canShowPriceInfo($childItem)) { // draw Total(ex) - $text = $order->formatPriceTxt($_item->getRowTotal()); + $text = $order->formatPriceTxt($childItem->getRowTotal()); $line[] = array( 'text' => $text, 'feed' => $x, @@ -165,7 +170,7 @@ public function draw() $x += 50; // draw Discount - $text = $order->formatPriceTxt(-$_item->getDiscountAmount()); + $text = $order->formatPriceTxt(-$childItem->getDiscountAmount()); $line[] = array( 'text' => $text, 'feed' => $x, @@ -176,9 +181,9 @@ public function draw() $x += 50; // draw QTY - $text = $_item->getQty() * 1; + $text = $childItem->getQty() * 1; $line[] = array( - 'text' => $_item->getQty()*1, + 'text' => $childItem->getQty() * 1, 'feed' => $x, 'font' => 'bold', 'align' => 'center', @@ -187,7 +192,7 @@ public function draw() $x += 30; // draw Tax - $text = $order->formatPriceTxt($_item->getTaxAmount()); + $text = $order->formatPriceTxt($childItem->getTaxAmount()); $line[] = array( 'text' => $text, 'feed' => $x, @@ -199,7 +204,7 @@ public function draw() // draw Total(inc) $text = $order->formatPriceTxt( - $_item->getRowTotal() + $_item->getTaxAmount() - $_item->getDiscountAmount() + $childItem->getRowTotal() + $childItem->getTaxAmount() - $childItem->getDiscountAmount() ); $line[] = array( 'text' => $text, @@ -220,20 +225,25 @@ public function draw() foreach ($options['options'] as $option) { $lines = array(); $lines[][] = array( - 'text' => $this->string->split(strip_tags($option['label']), 40, true, true), + 'text' => $this->string->split( + $this->filterManager->stripTags($option['label']), + 40, + true, + true + ), 'font' => 'italic', 'feed' => $leftBound ); if ($option['value']) { $text = array(); - $_printValue = isset($option['print_value']) + $printValue = isset($option['print_value']) ? $option['print_value'] - : strip_tags($option['value']); - $values = explode(', ', $_printValue); + : $this->filterManager->stripTags($option['value']); + $values = explode(', ', $printValue); foreach ($values as $value) { - foreach ($this->string->split($value, 30, true, true) as $_value) { - $text[] = $_value; + foreach ($this->string->split($value, 30, true, true) as $subValue) { + $text[] = $subValue; } } diff --git a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Invoice.php b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Invoice.php index c465a5f5c2943..0f70db38908b5 100644 --- a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Invoice.php +++ b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Invoice.php @@ -24,15 +24,11 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\Bundle\Model\Sales\Order\Pdf\Items; + /** * Sales Order Invoice Pdf default items renderer - * - * @category Magento - * @package Magento_Sales - * @author Magento Core Team */ -namespace Magento\Bundle\Model\Sales\Order\Pdf\Items; - class Invoice extends \Magento\Bundle\Model\Sales\Order\Pdf\Items\AbstractItems { /** @@ -45,6 +41,7 @@ class Invoice extends \Magento\Bundle\Model\Sales\Order\Pdf\Items\AbstractItems * @param \Magento\Core\Model\Registry $registry * @param \Magento\Tax\Helper\Data $taxData * @param \Magento\App\Filesystem $filesystem + * @param \Magento\Filter\FilterManager $filterManager * @param \Magento\Stdlib\String $coreString * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection @@ -55,18 +52,27 @@ public function __construct( \Magento\Core\Model\Registry $registry, \Magento\Tax\Helper\Data $taxData, \Magento\App\Filesystem $filesystem, + \Magento\Filter\FilterManager $filterManager, \Magento\Stdlib\String $coreString, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, array $data = array() ) { $this->string = $coreString; - parent::__construct($context, $registry, $taxData, $filesystem, $resource, $resourceCollection, $data); + parent::__construct( + $context, + $registry, + $taxData, + $filesystem, + $filterManager, + $resource, + $resourceCollection, + $data + ); } /** * Draw item line - * */ public function draw() { @@ -78,17 +84,16 @@ public function draw() $this->_setFontRegular(); $items = $this->getChilds($item); - $_prevOptionId = ''; + $prevOptionId = ''; $drawItems = array(); - foreach ($items as $_item) { + foreach ($items as $childItem) { $line = array(); - $attributes = $this->getSelectionAttributes($_item); + $attributes = $this->getSelectionAttributes($childItem); if (is_array($attributes)) { $optionId = $attributes['option_id']; - } - else { + } else { $optionId = 0; } @@ -99,8 +104,8 @@ public function draw() ); } - if ($_item->getOrderItem()->getParentItem()) { - if ($_prevOptionId != $attributes['option_id']) { + if ($childItem->getOrderItem()->getParentItem()) { + if ($prevOptionId != $attributes['option_id']) { $line[0] = array( 'font' => 'italic', 'text' => $this->string->split($attributes['option_label'], 45, true, true), @@ -113,18 +118,17 @@ public function draw() ); $line = array(); - - $_prevOptionId = $attributes['option_id']; + $prevOptionId = $attributes['option_id']; } } /* in case Product name is longer than 80 chars - it is written in a few lines */ - if ($_item->getOrderItem()->getParentItem()) { + if ($childItem->getOrderItem()->getParentItem()) { $feed = 40; - $name = $this->getValueHtml($_item); + $name = $this->getValueHtml($childItem); } else { $feed = 35; - $name = $_item->getName(); + $name = $childItem->getName(); } $line[] = array( 'text' => $this->string->split($name, 35, true, true), @@ -132,7 +136,7 @@ public function draw() ); // draw SKUs - if (!$_item->getOrderItem()->getParentItem()) { + if (!$childItem->getOrderItem()->getParentItem()) { $text = array(); foreach ($this->string->split($item->getSku(), 17) as $part) { $text[] = $part; @@ -144,8 +148,8 @@ public function draw() } // draw prices - if ($this->canShowPriceInfo($_item)) { - $price = $order->formatPriceTxt($_item->getPrice()); + if ($this->canShowPriceInfo($childItem)) { + $price = $order->formatPriceTxt($childItem->getPrice()); $line[] = array( 'text' => $price, 'feed' => 395, @@ -153,12 +157,12 @@ public function draw() 'align' => 'right' ); $line[] = array( - 'text' => $_item->getQty()*1, + 'text' => $childItem->getQty() * 1, 'feed' => 435, 'font' => 'bold', ); - $tax = $order->formatPriceTxt($_item->getTaxAmount()); + $tax = $order->formatPriceTxt($childItem->getTaxAmount()); $line[] = array( 'text' => $tax, 'feed' => 495, @@ -166,7 +170,7 @@ public function draw() 'align' => 'right' ); - $row_total = $order->formatPriceTxt($_item->getRowTotal()); + $row_total = $order->formatPriceTxt($childItem->getRowTotal()); $line[] = array( 'text' => $row_total, 'feed' => 565, @@ -185,20 +189,25 @@ public function draw() foreach ($options['options'] as $option) { $lines = array(); $lines[][] = array( - 'text' => $this->string->split(strip_tags($option['label']), 40, true, true), + 'text' => $this->string->split( + $this->filterManager->stripTags($option['label']), + 40, + true, + true + ), 'font' => 'italic', 'feed' => 35 ); if ($option['value']) { $text = array(); - $_printValue = isset($option['print_value']) + $printValue = isset($option['print_value']) ? $option['print_value'] - : strip_tags($option['value']); - $values = explode(', ', $_printValue); + : $this->filterManager->stripTags($option['value']); + $values = explode(', ', $printValue); foreach ($values as $value) { - foreach ($this->string->split($value, 30, true, true) as $_value) { - $text[] = $_value; + foreach ($this->string->split($value, 30, true, true) as $subValue) { + $text[] = $subValue; } } diff --git a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Shipment.php b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Shipment.php index f2ef29591a763..68a3656f529fc 100644 --- a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Shipment.php +++ b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Shipment.php @@ -24,15 +24,11 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\Bundle\Model\Sales\Order\Pdf\Items; + /** * Sales Order Shipment Pdf items renderer - * - * @category Magento - * @package Magento_Bundle - * @author Magento Core Team */ -namespace Magento\Bundle\Model\Sales\Order\Pdf\Items; - class Shipment extends \Magento\Bundle\Model\Sales\Order\Pdf\Items\AbstractItems { /** @@ -45,6 +41,7 @@ class Shipment extends \Magento\Bundle\Model\Sales\Order\Pdf\Items\AbstractItems * @param \Magento\Core\Model\Registry $registry * @param \Magento\Tax\Helper\Data $taxData * @param \Magento\App\Filesystem $filesystem + * @param \Magento\Filter\FilterManager $filterManager * @param \Magento\Stdlib\String $string * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection @@ -55,18 +52,27 @@ public function __construct( \Magento\Core\Model\Registry $registry, \Magento\Tax\Helper\Data $taxData, \Magento\App\Filesystem $filesystem, + \Magento\Filter\FilterManager $filterManager, \Magento\Stdlib\String $string, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, array $data = array() ) { $this->string = $string; - parent::__construct($context, $registry, $taxData, $filesystem, $resource, $resourceCollection, $data); + parent::__construct( + $context, + $registry, + $taxData, + $filesystem, + $filterManager, + $resource, + $resourceCollection, + $data + ); } /** * Draw item line - * */ public function draw() { @@ -79,17 +85,16 @@ public function draw() $shipItems = $this->getChilds($item); $items = array_merge(array($item->getOrderItem()), $item->getOrderItem()->getChildrenItems()); - $_prevOptionId = ''; + $prevOptionId = ''; $drawItems = array(); - foreach ($items as $_item) { + foreach ($items as $childItem) { $line = array(); - $attributes = $this->getSelectionAttributes($_item); + $attributes = $this->getSelectionAttributes($childItem); if (is_array($attributes)) { $optionId = $attributes['option_id']; - } - else { + } else { $optionId = 0; } @@ -100,8 +105,8 @@ public function draw() ); } - if ($_item->getParentItem()) { - if ($_prevOptionId != $attributes['option_id']) { + if ($childItem->getParentItem()) { + if ($prevOptionId != $attributes['option_id']) { $line[0] = array( 'font' => 'italic', 'text' => $this->string->split($attributes['option_label'], 60, true, true), @@ -115,16 +120,16 @@ public function draw() $line = array(); - $_prevOptionId = $attributes['option_id']; + $prevOptionId = $attributes['option_id']; } } - if (($this->isShipmentSeparately() && $_item->getParentItem()) - || (!$this->isShipmentSeparately() && !$_item->getParentItem()) + if (($this->isShipmentSeparately() && $childItem->getParentItem()) + || (!$this->isShipmentSeparately() && !$childItem->getParentItem()) ) { - if (isset($shipItems[$_item->getId()])) { - $qty = $shipItems[$_item->getId()]->getQty()*1; - } else if ($_item->getIsVirtual()) { + if (isset($shipItems[$childItem->getId()])) { + $qty = $shipItems[$childItem->getId()]->getQty() * 1; + } elseif ($childItem->getIsVirtual()) { $qty = __('N/A'); } else { $qty = 0; @@ -139,12 +144,12 @@ public function draw() ); // draw Name - if ($_item->getParentItem()) { + if ($childItem->getParentItem()) { $feed = 65; - $name = $this->getValueHtml($_item); + $name = $this->getValueHtml($childItem); } else { $feed = 60; - $name = $_item->getName(); + $name = $childItem->getName(); } $text = array(); foreach ($this->string->split($name, 60, true, true) as $part) { @@ -157,7 +162,7 @@ public function draw() // draw SKUs $text = array(); - foreach ($this->string->split($_item->getSku(), 25) as $part) { + foreach ($this->string->split($childItem->getSku(), 25) as $part) { $text[] = $part; } $line[] = array( @@ -175,20 +180,25 @@ public function draw() foreach ($options['options'] as $option) { $lines = array(); $lines[][] = array( - 'text' => $this->string->split(strip_tags($option['label']), 70, true, true), + 'text' => $this->string->split( + $this->filterManager->stripTags($option['label']), + 70, + true, + true + ), 'font' => 'italic', 'feed' => 60 ); if ($option['value']) { $text = array(); - $_printValue = isset($option['print_value']) + $printValue = isset($option['print_value']) ? $option['print_value'] - : strip_tags($option['value']); - $values = explode(', ', $_printValue); + : $this->filterManager->stripTags($option['value']); + $values = explode(', ', $printValue); foreach ($values as $value) { - foreach ($this->string->split($value, 50, true, true) as $_value) { - $text[] = $_value; + foreach ($this->string->split($value, 50, true, true) as $subValue) { + $text[] = $subValue; } } diff --git a/app/code/Magento/Bundle/etc/adminhtml/di.xml b/app/code/Magento/Bundle/etc/adminhtml/di.xml index 47e2e147f448d..5c9770590a68f 100644 --- a/app/code/Magento/Bundle/etc/adminhtml/di.xml +++ b/app/code/Magento/Bundle/etc/adminhtml/di.xml @@ -32,9 +32,16 @@ - - Magento\Bundle\Model\Product\CopyConstructor\Bundle - + + Magento\Bundle\Model\Product\CopyConstructor\Bundle + + + + + + + Magento\Catalog\Model\Product\Type::TYPE_BUNDLE + diff --git a/app/code/Magento/Bundle/etc/di.xml b/app/code/Magento/Bundle/etc/di.xml index 4525ce62cd50f..4c3acec63c1f0 100644 --- a/app/code/Magento/Bundle/etc/di.xml +++ b/app/code/Magento/Bundle/etc/di.xml @@ -26,19 +26,26 @@ - - - Radio Buttons - Checkbox - Multiple Select - + + Drop-down + Radio Buttons + Checkbox + Multiple Select + - - Magento\Catalog\Model\Resource\Setup - + + Magento\Catalog\Model\Resource\Setup + + + + + + + Magento\Bundle\Model\Product\CatalogPrice + diff --git a/app/code/Magento/Bundle/etc/module.xml b/app/code/Magento/Bundle/etc/module.xml index f137dc77683f2..725e8ad266a98 100755 --- a/app/code/Magento/Bundle/etc/module.xml +++ b/app/code/Magento/Bundle/etc/module.xml @@ -43,7 +43,6 @@ - diff --git a/app/code/Magento/Bundle/etc/product_types.xml b/app/code/Magento/Bundle/etc/product_types.xml index 484fb77f110f5..5afd7b68e6798 100644 --- a/app/code/Magento/Bundle/etc/product_types.xml +++ b/app/code/Magento/Bundle/etc/product_types.xml @@ -32,5 +32,8 @@ + + + diff --git a/app/code/Magento/Bundle/view/frontend/layout/catalog_product_rss_feed_renderer_list.xml b/app/code/Magento/Bundle/view/frontend/layout/catalog_product_rss_feed_renderer_list.xml new file mode 100644 index 0000000000000..736c975003722 --- /dev/null +++ b/app/code/Magento/Bundle/view/frontend/layout/catalog_product_rss_feed_renderer_list.xml @@ -0,0 +1,30 @@ + + + + + + + diff --git a/app/code/Magento/Bundle/view/frontend/layout/checkout_cart_index.xml b/app/code/Magento/Bundle/view/frontend/layout/checkout_cart_index.xml index df2305b67233b..429929d32a17e 100644 --- a/app/code/Magento/Bundle/view/frontend/layout/checkout_cart_index.xml +++ b/app/code/Magento/Bundle/view/frontend/layout/checkout_cart_index.xml @@ -24,9 +24,6 @@ */ --> - - - bundle diff --git a/app/code/Magento/Bundle/view/frontend/layout/multishipping_checkout_addresses.xml b/app/code/Magento/Bundle/view/frontend/layout/checkout_cart_item_renderers.xml similarity index 88% rename from app/code/Magento/Bundle/view/frontend/layout/multishipping_checkout_addresses.xml rename to app/code/Magento/Bundle/view/frontend/layout/checkout_cart_item_renderers.xml index 784a79eab627d..a73407879fd1a 100644 --- a/app/code/Magento/Bundle/view/frontend/layout/multishipping_checkout_addresses.xml +++ b/app/code/Magento/Bundle/view/frontend/layout/checkout_cart_item_renderers.xml @@ -24,7 +24,7 @@ */ --> - - + + diff --git a/app/code/Magento/Bundle/view/frontend/layout/multishipping_checkout_overview.xml b/app/code/Magento/Bundle/view/frontend/layout/checkout_cart_sidebar_item_renderers.xml similarity index 87% rename from app/code/Magento/Bundle/view/frontend/layout/multishipping_checkout_overview.xml rename to app/code/Magento/Bundle/view/frontend/layout/checkout_cart_sidebar_item_renderers.xml index 3c03cba7a9207..1412ba97b3362 100644 --- a/app/code/Magento/Bundle/view/frontend/layout/multishipping_checkout_overview.xml +++ b/app/code/Magento/Bundle/view/frontend/layout/checkout_cart_sidebar_item_renderers.xml @@ -24,7 +24,7 @@ */ --> - - + + diff --git a/app/code/Magento/Bundle/view/frontend/layout/checkout_onepage_review.xml b/app/code/Magento/Bundle/view/frontend/layout/checkout_onepage_review_item_renderers.xml similarity index 94% rename from app/code/Magento/Bundle/view/frontend/layout/checkout_onepage_review.xml rename to app/code/Magento/Bundle/view/frontend/layout/checkout_onepage_review_item_renderers.xml index 10b6e9f7103f5..53bc55d854ced 100644 --- a/app/code/Magento/Bundle/view/frontend/layout/checkout_onepage_review.xml +++ b/app/code/Magento/Bundle/view/frontend/layout/checkout_onepage_review_item_renderers.xml @@ -24,7 +24,7 @@ */ --> - + diff --git a/app/code/Magento/Bundle/view/frontend/layout/default.xml b/app/code/Magento/Bundle/view/frontend/layout/default.xml index 13ff3855a5e7a..f21db31f3fb6c 100644 --- a/app/code/Magento/Bundle/view/frontend/layout/default.xml +++ b/app/code/Magento/Bundle/view/frontend/layout/default.xml @@ -38,7 +38,4 @@ catalog/product/price.phtml - - - diff --git a/app/code/Magento/Bundle/view/frontend/layout/paypal_express_review_details.xml b/app/code/Magento/Bundle/view/frontend/layout/paypal_express_review_details.xml deleted file mode 100644 index 657757e4e4a6d..0000000000000 --- a/app/code/Magento/Bundle/view/frontend/layout/paypal_express_review_details.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - diff --git a/app/code/Magento/Bundle/view/frontend/layout/paypaluk_express_review.xml b/app/code/Magento/Bundle/view/frontend/layout/paypaluk_express_review.xml deleted file mode 100644 index 657757e4e4a6d..0000000000000 --- a/app/code/Magento/Bundle/view/frontend/layout/paypaluk_express_review.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - diff --git a/app/code/Magento/Bundle/view/frontend/layout/rss_catalog_category.xml b/app/code/Magento/Bundle/view/frontend/layout/rss_catalog_category.xml deleted file mode 100644 index d89e84903bd93..0000000000000 --- a/app/code/Magento/Bundle/view/frontend/layout/rss_catalog_category.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - bundle - Magento\Bundle\Block\Catalog\Product\Price - rss/catalog/product/price.phtml - - - diff --git a/app/code/Magento/Bundle/view/frontend/layout/rss_catalog_new.xml b/app/code/Magento/Bundle/view/frontend/layout/rss_catalog_new.xml deleted file mode 100644 index 397549add0953..0000000000000 --- a/app/code/Magento/Bundle/view/frontend/layout/rss_catalog_new.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - bundle - Magento\Bundle\Block\Catalog\Product\Price - rss/catalog/product/price.phtml - - - diff --git a/app/code/Magento/Bundle/view/frontend/layout/sales_email_order_creditmemo_items.xml b/app/code/Magento/Bundle/view/frontend/layout/sales_email_order_creditmemo_renderers.xml similarity index 94% rename from app/code/Magento/Bundle/view/frontend/layout/sales_email_order_creditmemo_items.xml rename to app/code/Magento/Bundle/view/frontend/layout/sales_email_order_creditmemo_renderers.xml index 604bef30a51f2..b45c2c8e5a54c 100644 --- a/app/code/Magento/Bundle/view/frontend/layout/sales_email_order_creditmemo_items.xml +++ b/app/code/Magento/Bundle/view/frontend/layout/sales_email_order_creditmemo_renderers.xml @@ -24,7 +24,7 @@ */ --> - + diff --git a/app/code/Magento/Bundle/view/frontend/layout/sales_email_order_invoice_items.xml b/app/code/Magento/Bundle/view/frontend/layout/sales_email_order_invoice_renderers.xml similarity index 94% rename from app/code/Magento/Bundle/view/frontend/layout/sales_email_order_invoice_items.xml rename to app/code/Magento/Bundle/view/frontend/layout/sales_email_order_invoice_renderers.xml index 0749c879c7f01..8222fbf4a8900 100644 --- a/app/code/Magento/Bundle/view/frontend/layout/sales_email_order_invoice_items.xml +++ b/app/code/Magento/Bundle/view/frontend/layout/sales_email_order_invoice_renderers.xml @@ -24,7 +24,7 @@ */ --> - + diff --git a/app/code/Magento/Bundle/view/frontend/layout/sales_email_order_items.xml b/app/code/Magento/Bundle/view/frontend/layout/sales_email_order_renderers.xml similarity index 95% rename from app/code/Magento/Bundle/view/frontend/layout/sales_email_order_items.xml rename to app/code/Magento/Bundle/view/frontend/layout/sales_email_order_renderers.xml index 55ce7a7e0a752..b7ca647029f26 100644 --- a/app/code/Magento/Bundle/view/frontend/layout/sales_email_order_items.xml +++ b/app/code/Magento/Bundle/view/frontend/layout/sales_email_order_renderers.xml @@ -24,7 +24,7 @@ */ --> - + diff --git a/app/code/Magento/Bundle/view/frontend/layout/sales_email_order_shipment_items.xml b/app/code/Magento/Bundle/view/frontend/layout/sales_email_order_shipment_renderers.xml similarity index 94% rename from app/code/Magento/Bundle/view/frontend/layout/sales_email_order_shipment_items.xml rename to app/code/Magento/Bundle/view/frontend/layout/sales_email_order_shipment_renderers.xml index 39d1d6cf39498..3300fad73fe62 100644 --- a/app/code/Magento/Bundle/view/frontend/layout/sales_email_order_shipment_items.xml +++ b/app/code/Magento/Bundle/view/frontend/layout/sales_email_order_shipment_renderers.xml @@ -24,7 +24,7 @@ */ --> - + diff --git a/app/code/Magento/Bundle/view/frontend/layout/sales_guest_creditmemo.xml b/app/code/Magento/Bundle/view/frontend/layout/sales_order_creditmemo_renderers.xml similarity index 95% rename from app/code/Magento/Bundle/view/frontend/layout/sales_guest_creditmemo.xml rename to app/code/Magento/Bundle/view/frontend/layout/sales_order_creditmemo_renderers.xml index 0de2252d1d8d4..bf0677f869612 100644 --- a/app/code/Magento/Bundle/view/frontend/layout/sales_guest_creditmemo.xml +++ b/app/code/Magento/Bundle/view/frontend/layout/sales_order_creditmemo_renderers.xml @@ -24,7 +24,7 @@ */ --> - + diff --git a/app/code/Magento/Bundle/view/frontend/layout/sales_guest_invoice.xml b/app/code/Magento/Bundle/view/frontend/layout/sales_order_invoice_renderers.xml similarity index 95% rename from app/code/Magento/Bundle/view/frontend/layout/sales_guest_invoice.xml rename to app/code/Magento/Bundle/view/frontend/layout/sales_order_invoice_renderers.xml index 861baa1c1087f..6a1ac057b5900 100644 --- a/app/code/Magento/Bundle/view/frontend/layout/sales_guest_invoice.xml +++ b/app/code/Magento/Bundle/view/frontend/layout/sales_order_invoice_renderers.xml @@ -24,7 +24,7 @@ */ --> - + diff --git a/app/code/Magento/Bundle/view/frontend/layout/sales_guest_printorder.xml b/app/code/Magento/Bundle/view/frontend/layout/sales_order_item_renderers.xml similarity index 95% rename from app/code/Magento/Bundle/view/frontend/layout/sales_guest_printorder.xml rename to app/code/Magento/Bundle/view/frontend/layout/sales_order_item_renderers.xml index bea81de24d974..f81b5292bd38c 100644 --- a/app/code/Magento/Bundle/view/frontend/layout/sales_guest_printorder.xml +++ b/app/code/Magento/Bundle/view/frontend/layout/sales_order_item_renderers.xml @@ -24,7 +24,7 @@ */ --> - + diff --git a/app/code/Magento/Bundle/view/frontend/layout/sales_guest_printordercreditmemo.xml b/app/code/Magento/Bundle/view/frontend/layout/sales_order_print_creditmemo_renderers.xml similarity index 94% rename from app/code/Magento/Bundle/view/frontend/layout/sales_guest_printordercreditmemo.xml rename to app/code/Magento/Bundle/view/frontend/layout/sales_order_print_creditmemo_renderers.xml index 69041a6c1f4f2..546983ccff300 100644 --- a/app/code/Magento/Bundle/view/frontend/layout/sales_guest_printordercreditmemo.xml +++ b/app/code/Magento/Bundle/view/frontend/layout/sales_order_print_creditmemo_renderers.xml @@ -24,7 +24,7 @@ */ --> - + diff --git a/app/code/Magento/Bundle/view/frontend/layout/sales_guest_printorderinvoice.xml b/app/code/Magento/Bundle/view/frontend/layout/sales_order_print_invoice_renderers.xml similarity index 94% rename from app/code/Magento/Bundle/view/frontend/layout/sales_guest_printorderinvoice.xml rename to app/code/Magento/Bundle/view/frontend/layout/sales_order_print_invoice_renderers.xml index 09224f79e5a1a..b99bf71820d1e 100644 --- a/app/code/Magento/Bundle/view/frontend/layout/sales_guest_printorderinvoice.xml +++ b/app/code/Magento/Bundle/view/frontend/layout/sales_order_print_invoice_renderers.xml @@ -24,7 +24,7 @@ */ --> - + diff --git a/app/code/Magento/Bundle/view/frontend/layout/sales_guest_view.xml b/app/code/Magento/Bundle/view/frontend/layout/sales_order_print_renderers.xml similarity index 95% rename from app/code/Magento/Bundle/view/frontend/layout/sales_guest_view.xml rename to app/code/Magento/Bundle/view/frontend/layout/sales_order_print_renderers.xml index 22abd2c96402d..528cda12b35e8 100644 --- a/app/code/Magento/Bundle/view/frontend/layout/sales_guest_view.xml +++ b/app/code/Magento/Bundle/view/frontend/layout/sales_order_print_renderers.xml @@ -24,7 +24,7 @@ */ --> - + diff --git a/app/code/Magento/Bundle/view/frontend/layout/sales_order_printordershipment.xml b/app/code/Magento/Bundle/view/frontend/layout/sales_order_print_shipment_renderers.xml similarity index 94% rename from app/code/Magento/Bundle/view/frontend/layout/sales_order_printordershipment.xml rename to app/code/Magento/Bundle/view/frontend/layout/sales_order_print_shipment_renderers.xml index 47f834decd5b8..d989534dd02ac 100644 --- a/app/code/Magento/Bundle/view/frontend/layout/sales_order_printordershipment.xml +++ b/app/code/Magento/Bundle/view/frontend/layout/sales_order_print_shipment_renderers.xml @@ -24,7 +24,7 @@ */ --> - + diff --git a/app/code/Magento/Bundle/view/frontend/layout/sales_order_printordercreditmemo.xml b/app/code/Magento/Bundle/view/frontend/layout/sales_order_printordercreditmemo.xml deleted file mode 100644 index 69041a6c1f4f2..0000000000000 --- a/app/code/Magento/Bundle/view/frontend/layout/sales_order_printordercreditmemo.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - diff --git a/app/code/Magento/Bundle/view/frontend/layout/sales_order_printorderinvoice.xml b/app/code/Magento/Bundle/view/frontend/layout/sales_order_printorderinvoice.xml deleted file mode 100644 index 09224f79e5a1a..0000000000000 --- a/app/code/Magento/Bundle/view/frontend/layout/sales_order_printorderinvoice.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - diff --git a/app/code/Magento/Bundle/view/frontend/layout/sales_order_shipment.xml b/app/code/Magento/Bundle/view/frontend/layout/sales_order_shipment.xml deleted file mode 100644 index d34a37f904840..0000000000000 --- a/app/code/Magento/Bundle/view/frontend/layout/sales_order_shipment.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - diff --git a/app/code/Magento/Bundle/view/frontend/layout/sales_guest_printordershipment.xml b/app/code/Magento/Bundle/view/frontend/layout/sales_order_shipment_renderers.xml similarity index 95% rename from app/code/Magento/Bundle/view/frontend/layout/sales_guest_printordershipment.xml rename to app/code/Magento/Bundle/view/frontend/layout/sales_order_shipment_renderers.xml index 47f834decd5b8..6d2b5fa72ad46 100644 --- a/app/code/Magento/Bundle/view/frontend/layout/sales_guest_printordershipment.xml +++ b/app/code/Magento/Bundle/view/frontend/layout/sales_order_shipment_renderers.xml @@ -24,7 +24,7 @@ */ --> - + diff --git a/app/code/Magento/Captcha/Block/Adminhtml/Captcha/DefaultCaptcha.php b/app/code/Magento/Captcha/Block/Adminhtml/Captcha/DefaultCaptcha.php index a2029d2311660..b36e27063bc86 100644 --- a/app/code/Magento/Captcha/Block/Adminhtml/Captcha/DefaultCaptcha.php +++ b/app/code/Magento/Captcha/Block/Adminhtml/Captcha/DefaultCaptcha.php @@ -36,7 +36,7 @@ class DefaultCaptcha extends \Magento\Captcha\Block\Captcha\DefaultCaptcha { /** - * @var \Magento\Backend\Model\Url + * @var \Magento\Backend\Model\UrlInterface */ protected $_url; @@ -48,14 +48,14 @@ class DefaultCaptcha extends \Magento\Captcha\Block\Captcha\DefaultCaptcha /** * @param \Magento\View\Element\Template\Context $context * @param \Magento\Captcha\Helper\Data $captchaData - * @param \Magento\Backend\Model\Url $url + * @param \Magento\Backend\Model\UrlInterface $url * @param \Magento\Backend\App\ConfigInterface $config * @param array $data */ public function __construct( \Magento\View\Element\Template\Context $context, \Magento\Captcha\Helper\Data $captchaData, - \Magento\Backend\Model\Url $url, + \Magento\Backend\Model\UrlInterface $url, \Magento\Backend\App\ConfigInterface $config, array $data = array() ) { @@ -73,7 +73,7 @@ public function __construct( public function getRefreshUrl() { return $this->_url->getUrl('adminhtml/refresh/refresh', array( - '_secure' => $this->_config->getFlag('web/secure/use_in_adminhtml'), + '_secure' => $this->_config->isSetFlag('web/secure/use_in_adminhtml'), '_nosecret' => true )); } diff --git a/app/code/Magento/Captcha/Helper/Adminhtml/Data.php b/app/code/Magento/Captcha/Helper/Adminhtml/Data.php index 4c94651463a5a..7911475bce1d1 100644 --- a/app/code/Magento/Captcha/Helper/Adminhtml/Data.php +++ b/app/code/Magento/Captcha/Helper/Adminhtml/Data.php @@ -43,7 +43,7 @@ class Data extends \Magento\Captcha\Helper\Data /** * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\StoreManager $storeManager - * @param \Magento\Core\Model\Config $config + * @param \Magento\App\ConfigInterface $config * @param \Magento\App\Filesystem $filesystem * @param \Magento\Captcha\Model\CaptchaFactory $factory * @param \Magento\Backend\App\ConfigInterface $backendConfig @@ -51,7 +51,7 @@ class Data extends \Magento\Captcha\Helper\Data public function __construct( \Magento\App\Helper\Context $context, \Magento\Core\Model\StoreManager $storeManager, - \Magento\Core\Model\Config $config, + \Magento\App\ConfigInterface $config, \Magento\App\Filesystem $filesystem, \Magento\Captcha\Model\CaptchaFactory $factory, \Magento\Backend\App\ConfigInterface $backendConfig diff --git a/app/code/Magento/Captcha/Helper/Data.php b/app/code/Magento/Captcha/Helper/Data.php index 6073837431914..debcddc06ea24 100644 --- a/app/code/Magento/Captcha/Helper/Data.php +++ b/app/code/Magento/Captcha/Helper/Data.php @@ -63,7 +63,7 @@ class Data extends \Magento\App\Helper\AbstractHelper protected $_captcha = array(); /** - * @var \Magento\Core\Model\Config + * @var \Magento\App\ConfigInterface */ protected $_config; @@ -85,14 +85,14 @@ class Data extends \Magento\App\Helper\AbstractHelper /** * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Config $config + * @param \Magento\App\ConfigInterface $config * @param \Magento\App\Filesystem $filesystem * @param \Magento\Captcha\Model\CaptchaFactory $factory */ public function __construct( \Magento\App\Helper\Context $context, \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Config $config, + \Magento\App\ConfigInterface $config, \Magento\App\Filesystem $filesystem, \Magento\Captcha\Model\CaptchaFactory $factory ) { diff --git a/app/code/Magento/Captcha/Model/Observer.php b/app/code/Magento/Captcha/Model/Observer.php index 9c5858995981a..1d4ae616c716a 100644 --- a/app/code/Magento/Captcha/Model/Observer.php +++ b/app/code/Magento/Captcha/Model/Observer.php @@ -45,7 +45,7 @@ class Observer /** * URL manager * - * @var \Magento\Core\Model\Url + * @var \Magento\UrlInterface */ protected $_urlManager; @@ -105,7 +105,7 @@ class Observer * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Customer\Helper\Data $customerData * @param \Magento\Captcha\Helper\Data $helper - * @param \Magento\Core\Model\Url $urlManager + * @param \Magento\UrlInterface $urlManager * @param \Magento\App\RequestInterface $request * @param \Magento\App\ActionFlag $actionFlag * @param \Magento\Message\ManagerInterface $messageManager @@ -120,7 +120,7 @@ public function __construct( \Magento\Core\Helper\Data $coreData, \Magento\Customer\Helper\Data $customerData, \Magento\Captcha\Helper\Data $helper, - \Magento\Core\Model\Url $urlManager, + \Magento\UrlInterface $urlManager, \Magento\App\RequestInterface $request, \Magento\App\ActionFlag $actionFlag, \Magento\Message\ManagerInterface $messageManager, diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Category/Helper/Image.php b/app/code/Magento/Catalog/Block/Adminhtml/Category/Helper/Image.php index d65a7f8c15cad..22d25b0ee82b7 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Category/Helper/Image.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Category/Helper/Image.php @@ -64,7 +64,8 @@ protected function _getUrl() { $url = false; if ($this->getValue()) { - $url = $this->_storeManager->getStore()->getBaseUrl('media') . 'catalog/category/' . $this->getValue(); + $url = $this->_storeManager->getStore() + ->getBaseUrl(\Magento\UrlInterface::URL_TYPE_MEDIA) . 'catalog/category/' . $this->getValue(); } return $url; } diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Category/Tab/Product.php b/app/code/Magento/Catalog/Block/Adminhtml/Category/Tab/Product.php index 935c500b9f58f..714420ec31ba2 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Category/Tab/Product.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Category/Tab/Product.php @@ -49,7 +49,6 @@ class Product extends \Magento\Backend\Block\Widget\Grid\Extended /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Url $urlModel * @param \Magento\Backend\Helper\Data $backendHelper * @param \Magento\Catalog\Model\ProductFactory $productFactory * @param \Magento\Core\Model\Registry $coreRegistry @@ -57,7 +56,6 @@ class Product extends \Magento\Backend\Block\Widget\Grid\Extended */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Url $urlModel, \Magento\Backend\Helper\Data $backendHelper, \Magento\Catalog\Model\ProductFactory $productFactory, \Magento\Core\Model\Registry $coreRegistry, @@ -65,7 +63,7 @@ public function __construct( ) { $this->_productFactory = $productFactory; $this->_coreRegistry = $coreRegistry; - parent::__construct($context, $urlModel, $backendHelper, $data); + parent::__construct($context, $backendHelper, $data); } protected function _construct() diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Main.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Main.php index 25b94f558b9e6..0c29fb85e1ad9 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Main.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Main.php @@ -92,12 +92,8 @@ protected function _prepareForm() if (isset($type['hide_fields'])) { $_hiddenFields[$type['value']] = $type['hide_fields']; } - if (isset($type['disabled_types'])) { - $_disabledTypes[$type['value']] = $type['disabled_types']; - } } $this->_coreRegistry->register('attribute_type_hidden_fields', $_hiddenFields); - $this->_coreRegistry->register('attribute_type_disabled_types', $_disabledTypes); $frontendInputValues = array_merge($frontendInputElm->getValues(), $additionalTypes); $frontendInputElm->setValues($frontendInputValues); diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Grid.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Grid.php index 443cab7468013..c42694f1f64f3 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Grid.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Grid.php @@ -42,21 +42,19 @@ class Grid extends \Magento\Eav\Block\Adminhtml\Attribute\Grid\AbstractGrid /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Url $urlModel * @param \Magento\Backend\Helper\Data $backendHelper * @param \Magento\Catalog\Model\Resource\Product\Attribute\CollectionFactory $collectionFactory * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Url $urlModel, \Magento\Backend\Helper\Data $backendHelper, \Magento\Catalog\Model\Resource\Product\Attribute\CollectionFactory $collectionFactory, array $data = array() ) { $this->_collectionFactory = $collectionFactory; $this->_module = 'catalog'; - parent::__construct($context, $urlModel, $backendHelper, $data); + parent::__construct($context, $backendHelper, $data); } /** diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Alerts/Price.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Alerts/Price.php index 8ad952bfd736b..7f78cb96fb704 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Alerts/Price.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Alerts/Price.php @@ -50,7 +50,6 @@ class Price extends \Magento\Backend\Block\Widget\Grid\Extended /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Url $urlModel * @param \Magento\Backend\Helper\Data $backendHelper * @param \Magento\ProductAlert\Model\PriceFactory $priceFactory * @param \Magento\Catalog\Helper\Data $catalogData @@ -58,7 +57,6 @@ class Price extends \Magento\Backend\Block\Widget\Grid\Extended */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Url $urlModel, \Magento\Backend\Helper\Data $backendHelper, \Magento\ProductAlert\Model\PriceFactory $priceFactory, \Magento\Catalog\Helper\Data $catalogData, @@ -66,7 +64,7 @@ public function __construct( ) { $this->_priceFactory = $priceFactory; $this->_catalogData = $catalogData; - parent::__construct($context, $urlModel, $backendHelper, $data); + parent::__construct($context, $backendHelper, $data); } protected function _construct() diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Alerts/Stock.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Alerts/Stock.php index 52c58018791c1..3abdd6e4b3b6a 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Alerts/Stock.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Alerts/Stock.php @@ -50,7 +50,6 @@ class Stock extends \Magento\Backend\Block\Widget\Grid\Extended /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Url $urlModel * @param \Magento\Backend\Helper\Data $backendHelper * @param \Magento\ProductAlert\Model\StockFactory $stockFactory * @param \Magento\Catalog\Helper\Data $catalogData @@ -58,7 +57,6 @@ class Stock extends \Magento\Backend\Block\Widget\Grid\Extended */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Url $urlModel, \Magento\Backend\Helper\Data $backendHelper, \Magento\ProductAlert\Model\StockFactory $stockFactory, \Magento\Catalog\Helper\Data $catalogData, @@ -66,7 +64,7 @@ public function __construct( ) { $this->_stockFactory = $stockFactory; $this->_catalogData = $catalogData; - parent::__construct($context, $urlModel, $backendHelper, $data); + parent::__construct($context, $backendHelper, $data); } protected function _construct() diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Crosssell.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Crosssell.php index a6fd4b95cf429..af1959479e24d 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Crosssell.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Crosssell.php @@ -74,7 +74,6 @@ class Crosssell extends \Magento\Backend\Block\Widget\Grid\Extended /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Url $urlModel * @param \Magento\Backend\Helper\Data $backendHelper * @param \Magento\Catalog\Model\Product\LinkFactory $linkFactory * @param \Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory $setsFactory @@ -89,7 +88,6 @@ class Crosssell extends \Magento\Backend\Block\Widget\Grid\Extended */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Url $urlModel, \Magento\Backend\Helper\Data $backendHelper, \Magento\Catalog\Model\Product\LinkFactory $linkFactory, \Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory $setsFactory, @@ -107,7 +105,7 @@ public function __construct( $this->_status = $status; $this->_visibility = $visibility; $this->_coreRegistry = $coreRegistry; - parent::__construct($context, $urlModel, $backendHelper, $data); + parent::__construct($context, $backendHelper, $data); } /** diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Related.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Related.php index db0ee3f840e92..ecbc97934debc 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Related.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Related.php @@ -74,7 +74,6 @@ class Related extends \Magento\Backend\Block\Widget\Grid\Extended /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Url $urlModel * @param \Magento\Backend\Helper\Data $backendHelper * @param \Magento\Catalog\Model\Product\LinkFactory $linkFactory * @param \Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory $setsFactory @@ -89,7 +88,6 @@ class Related extends \Magento\Backend\Block\Widget\Grid\Extended */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Url $urlModel, \Magento\Backend\Helper\Data $backendHelper, \Magento\Catalog\Model\Product\LinkFactory $linkFactory, \Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory $setsFactory, @@ -107,7 +105,7 @@ public function __construct( $this->_status = $status; $this->_visibility = $visibility; $this->_coreRegistry = $coreRegistry; - parent::__construct($context, $urlModel, $backendHelper, $data); + parent::__construct($context, $backendHelper, $data); } /** diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Upsell.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Upsell.php index 861b0f493099d..a34c27ab753e5 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Upsell.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Upsell.php @@ -74,7 +74,6 @@ class Upsell extends \Magento\Backend\Block\Widget\Grid\Extended /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Url $urlModel * @param \Magento\Backend\Helper\Data $backendHelper * @param \Magento\Catalog\Model\Product\LinkFactory $linkFactory * @param \Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory $setsFactory @@ -89,7 +88,6 @@ class Upsell extends \Magento\Backend\Block\Widget\Grid\Extended */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Url $urlModel, \Magento\Backend\Helper\Data $backendHelper, \Magento\Catalog\Model\Product\LinkFactory $linkFactory, \Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory $setsFactory, @@ -107,7 +105,7 @@ public function __construct( $this->_status = $status; $this->_visibility = $visibility; $this->_coreRegistry = $coreRegistry; - parent::__construct($context, $urlModel, $backendHelper, $data); + parent::__construct($context, $backendHelper, $data); } /** diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Grid.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Grid.php index ace24f1636923..3598be0702521 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Grid.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Grid.php @@ -74,7 +74,6 @@ class Grid extends \Magento\Backend\Block\Widget\Grid\Extended /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Url $urlModel * @param \Magento\Backend\Helper\Data $backendHelper * @param \Magento\Core\Model\WebsiteFactory $websiteFactory * @param \Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory $setsFactory @@ -89,7 +88,6 @@ class Grid extends \Magento\Backend\Block\Widget\Grid\Extended */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Url $urlModel, \Magento\Backend\Helper\Data $backendHelper, \Magento\Core\Model\WebsiteFactory $websiteFactory, \Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory $setsFactory, @@ -107,7 +105,7 @@ public function __construct( $this->_status = $status; $this->_visibility = $visibility; $this->_catalogData = $catalogData; - parent::__construct($context, $urlModel, $backendHelper, $data); + parent::__construct($context, $backendHelper, $data); } protected function _construct() diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/BaseImage.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/BaseImage.php index 89ef905df691f..cbf7773c3390a 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/BaseImage.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/BaseImage.php @@ -38,7 +38,7 @@ class BaseImage extends \Magento\Data\Form\Element\AbstractElement /** * Model Url instance * - * @var \Magento\Backend\Model\Url + * @var \Magento\Backend\Model\UrlInterface */ protected $_url; diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Image.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Image.php index 818aa1b307c9e..eeaadb8c5b251 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Image.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Image.php @@ -39,7 +39,8 @@ protected function _getUrl() { $url = false; if ($this->getValue()) { - $url = $this->_urlBuilder->getBaseUrl('media') . 'catalog/product/' . $this->getValue(); + $url = $this->_urlBuilder + ->getBaseUrl(\Magento\UrlInterface::URL_TYPE_MEDIA) . 'catalog/product/' . $this->getValue(); } return $url; } diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Widget/Chooser.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Widget/Chooser.php index cefd646a4af76..41d5c69761014 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Widget/Chooser.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Widget/Chooser.php @@ -59,7 +59,6 @@ class Chooser extends \Magento\Backend\Block\Widget\Grid\Extended /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Url $urlModel * @param \Magento\Backend\Helper\Data $backendHelper * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory * @param \Magento\Catalog\Model\Resource\Product\CollectionFactory $collectionFactory @@ -69,7 +68,6 @@ class Chooser extends \Magento\Backend\Block\Widget\Grid\Extended */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Url $urlModel, \Magento\Backend\Helper\Data $backendHelper, \Magento\Catalog\Model\CategoryFactory $categoryFactory, \Magento\Catalog\Model\Resource\Product\CollectionFactory $collectionFactory, @@ -81,7 +79,7 @@ public function __construct( $this->_collectionFactory = $collectionFactory; $this->_resourceCategory = $resourceCategory; $this->_resourceProduct = $resourceProduct; - parent::__construct($context, $urlModel, $backendHelper, $data); + parent::__construct($context, $backendHelper, $data); } /** diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Search/Edit.php b/app/code/Magento/Catalog/Block/Adminhtml/Search/Edit.php index 7c19a1dfa3127..ac370e5d6f3be 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Search/Edit.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Search/Edit.php @@ -24,12 +24,11 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\Catalog\Block\Adminhtml\Search; + /** * Admin tag edit block */ - -namespace Magento\Catalog\Block\Adminhtml\Search; - class Edit extends \Magento\Backend\Block\Widget\Form\Container { /** @@ -37,7 +36,7 @@ class Edit extends \Magento\Backend\Block\Widget\Form\Container * * @var \Magento\Core\Model\Registry */ - protected $_coreRegistry = null; + protected $coreRegistry; /** * @param \Magento\Backend\Block\Template\Context $context @@ -49,7 +48,7 @@ public function __construct( \Magento\Core\Model\Registry $registry, array $data = array() ) { - $this->_coreRegistry = $registry; + $this->coreRegistry = $registry; parent::__construct($context, $data); } @@ -67,8 +66,8 @@ protected function _construct() public function getHeaderText() { - if ($this->_coreRegistry->registry('current_catalog_search')->getId()) { - $queryText = $this->escapeHtml($this->_coreRegistry->registry('current_catalog_search')->getQueryText()); + if ($this->coreRegistry->registry('current_catalog_search')->getId()) { + $queryText = $this->escapeHtml($this->coreRegistry->registry('current_catalog_search')->getQueryText()); return __("Edit Search '%1'", $queryText); } else { return __('New Search'); diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Category.php b/app/code/Magento/Catalog/Controller/Adminhtml/Category.php index aaea81d186983..839971c48ed20 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Category.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Category.php @@ -214,7 +214,7 @@ public function wysiwygAction() $elementId = $this->getRequest()->getParam('element_id', md5(microtime())); $storeId = $this->getRequest()->getParam('store_id', 0); $storeMediaUrl = $this->_objectManager->get('Magento\Core\Model\StoreManagerInterface')->getStore($storeId) - ->getBaseUrl(\Magento\Core\Model\Store::URL_TYPE_MEDIA); + ->getBaseUrl(\Magento\UrlInterface::URL_TYPE_MEDIA); $content = $this->_view->getLayout()->createBlock( 'Magento\Catalog\Block\Adminhtml\Helper\Form\Wysiwyg\Content', diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product.php index 9200887cd11c1..347e2c1ac0e29 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product.php @@ -350,7 +350,7 @@ public function wysiwygAction() $elementId = $this->getRequest()->getParam('element_id', md5(microtime())); $storeId = $this->getRequest()->getParam('store_id', 0); $storeMediaUrl = $this->_objectManager->get('Magento\Core\Model\StoreManagerInterface') - ->getStore($storeId)->getBaseUrl(\Magento\Core\Model\Store::URL_TYPE_MEDIA); + ->getStore($storeId)->getBaseUrl(\Magento\UrlInterface::URL_TYPE_MEDIA); $content = $this->_view->getLayout()->createBlock( 'Magento\Catalog\Block\Adminhtml\Helper\Form\Wysiwyg\Content', diff --git a/app/code/Magento/Catalog/Helper/Data.php b/app/code/Magento/Catalog/Helper/Data.php index e345eb2223693..8bf63ef90843f 100644 --- a/app/code/Magento/Catalog/Helper/Data.php +++ b/app/code/Magento/Catalog/Helper/Data.php @@ -337,20 +337,6 @@ public function getAttributeHiddenFields() } } - /** - * Retrieve attribute disabled types - * - * @return array - */ - public function getAttributeDisabledTypes() - { - if ($this->_coreRegistry->registry('attribute_type_disabled_types')) { - return $this->_coreRegistry->registry('attribute_type_disabled_types'); - } else { - return array(); - } - } - /** * Retrieve Catalog Price Scope * diff --git a/app/code/Magento/Catalog/Helper/Product.php b/app/code/Magento/Catalog/Helper/Product.php index a5d62dbc206dc..e6180db8cffe4 100644 --- a/app/code/Magento/Catalog/Helper/Product.php +++ b/app/code/Magento/Catalog/Helper/Product.php @@ -89,7 +89,7 @@ class Product extends \Magento\Core\Helper\Url protected $_coreStoreConfig; /** - * @var \Magento\Core\Model\Config + * @var \Magento\App\ConfigInterface */ protected $_coreConfig; @@ -129,7 +129,7 @@ class Product extends \Magento\Core\Helper\Url * @param \Magento\Core\Model\Registry $coreRegistry * @param \Magento\Catalog\Model\Attribute\Config $attributeConfig * @param \Magento\Core\Model\Store\Config $coreStoreConfig - * @param \Magento\Core\Model\Config $coreConfig + * @param \Magento\App\ConfigInterface $coreConfig * @param string $typeSwitcherLabel */ public function __construct( @@ -142,7 +142,7 @@ public function __construct( \Magento\Core\Model\Registry $coreRegistry, \Magento\Catalog\Model\Attribute\Config $attributeConfig, \Magento\Core\Model\Store\Config $coreStoreConfig, - \Magento\Core\Model\Config $coreConfig, + \Magento\App\ConfigInterface $coreConfig, $typeSwitcherLabel ) { $this->_categoryFactory = $categoryFactory; diff --git a/app/code/Magento/Catalog/Helper/Product/Configuration.php b/app/code/Magento/Catalog/Helper/Product/Configuration.php index 1d76313ee475f..e5f7b9e962838 100644 --- a/app/code/Magento/Catalog/Helper/Product/Configuration.php +++ b/app/code/Magento/Catalog/Helper/Product/Configuration.php @@ -262,11 +262,10 @@ public function getFormattedOptionValue($optionValue, $params = null) /** * Get allowed product types for configurable product * - * @return \SimpleXMLElement + * @return array */ public function getConfigurableAllowedTypes() { - $configData = $this->_config->getType('configurable'); - return isset($configData['allow_product_types']) ? $configData['allow_product_types'] : array(); + return $this->_config->getComposableTypes(); } } diff --git a/app/code/Magento/Catalog/Helper/Product/Edit/Action/Attribute.php b/app/code/Magento/Catalog/Helper/Product/Edit/Action/Attribute.php index 2a870d49488e3..d589e7de04a93 100644 --- a/app/code/Magento/Catalog/Helper/Product/Edit/Action/Attribute.php +++ b/app/code/Magento/Catalog/Helper/Product/Edit/Action/Attribute.php @@ -70,8 +70,8 @@ class Attribute extends \Magento\Backend\Helper\Data /** * @param \Magento\App\Helper\Context $context * @param \Magento\App\Route\Config $routeConfig - * @param \Magento\Core\Model\AppInterface $app - * @param \Magento\Backend\Model\Url $backendUrl + * @param \Magento\AppInterface $app + * @param \Magento\Backend\Model\UrlInterface $backendUrl * @param \Magento\Backend\Model\Auth $auth * @param \Magento\Backend\App\Area\FrontNameResolver $frontNameResolver * @param \Magento\Math\Random $mathRandom @@ -82,8 +82,8 @@ class Attribute extends \Magento\Backend\Helper\Data public function __construct( \Magento\App\Helper\Context $context, \Magento\App\Route\Config $routeConfig, - \Magento\Core\Model\AppInterface $app, - \Magento\Backend\Model\Url $backendUrl, + \Magento\AppInterface $app, + \Magento\Backend\Model\UrlInterface $backendUrl, \Magento\Backend\Model\Auth $auth, \Magento\Backend\App\Area\FrontNameResolver $frontNameResolver, \Magento\Math\Random $mathRandom, diff --git a/app/code/Magento/Catalog/Helper/Product/Url.php b/app/code/Magento/Catalog/Helper/Product/Url.php index a1a24ba55d63a..4747d633f2085 100644 --- a/app/code/Magento/Catalog/Helper/Product/Url.php +++ b/app/code/Magento/Catalog/Helper/Product/Url.php @@ -100,12 +100,12 @@ class Url extends \Magento\Core\Helper\Url /** * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Config $config + * @param \Magento\App\ConfigInterface $config */ public function __construct( \Magento\App\Helper\Context $context, \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Config $config + \Magento\App\ConfigInterface $config ) { parent::__construct($context, $storeManager); $convertConfig = $config->getValue('url/convert', 'default'); diff --git a/app/code/Magento/Catalog/Helper/Product/View.php b/app/code/Magento/Catalog/Helper/Product/View.php index 42f2458b0b174..946d73ff0a37e 100644 --- a/app/code/Magento/Catalog/Helper/Product/View.php +++ b/app/code/Magento/Catalog/Helper/Product/View.php @@ -129,10 +129,11 @@ public function __construct( * * @param \Magento\Catalog\Model\Product $product * @param \Magento\App\Action\Action $controller + * @param null|\Magento\Object $params * * @return \Magento\Catalog\Helper\Product\View */ - public function initProductLayout($product, $controller) + public function initProductLayout($product, $controller, $params = null) { $settings = $this->_catalogDesign->getDesignSettings($product); @@ -142,9 +143,30 @@ public function initProductLayout($product, $controller) $update = $this->_view->getLayout()->getUpdate(); $update->addHandle('default'); + + if ($params && $params->getBeforeHandles()) { + foreach ($params->getBeforeHandles() as $handle) { + $this->_view->addPageLayoutHandles( + array('id' => $product->getId(), 'sku' => $product->getSku(), 'type' => $product->getTypeId()), + $handle + ); + } + } + $this->_view->addPageLayoutHandles( array('id' => $product->getId(), 'sku' => $product->getSku(), 'type' => $product->getTypeId()) ); + + if ($params && $params->getAfterHandles()) { + foreach ($params->getAfterHandles() as $handle) { + $this->_view->addPageLayoutHandles( + array('id' => $product->getId(), 'sku' => $product->getSku(), 'type' => $product->getTypeId()), + $handle + ); + + } + } + $this->_view->loadLayoutUpdates(); // Apply custom layout update once layout is loaded $layoutUpdates = $settings->getLayoutUpdates(); @@ -229,7 +251,7 @@ public function prepareAndRender($productId, $controller, $params = null) $this->_catalogSession->setLastViewedProductId($product->getId()); - $this->initProductLayout($product, $controller); + $this->initProductLayout($product, $controller, $params); if ($controller instanceof \Magento\Catalog\Controller\Product\View\ViewInterface) { $this->_view->getLayout()->initMessages($this->messageGroups); diff --git a/app/code/Magento/Catalog/Model/Category.php b/app/code/Magento/Catalog/Model/Category.php index 857a2c412eedd..0ff486480c73c 100644 --- a/app/code/Magento/Catalog/Model/Category.php +++ b/app/code/Magento/Catalog/Model/Category.php @@ -72,7 +72,7 @@ class Category extends \Magento\Catalog\Model\AbstractModel /** * URL Model instance * - * @var \Magento\Core\Model\Url + * @var \Magento\UrlInterface */ protected $_url; @@ -247,7 +247,7 @@ protected function _construct() /** * Retrieve URL instance * - * @return \Magento\Core\Model\Url + * @return \Magento\UrlInterface */ public function getUrlInstance() { @@ -583,7 +583,7 @@ public function getImageUrl() $url = false; $image = $this->getImage(); if ($image) { - $url = $this->_storeManager->getStore()->getBaseUrl(\Magento\Core\Model\Store::URL_TYPE_MEDIA) + $url = $this->_storeManager->getStore()->getBaseUrl(\Magento\UrlInterface::URL_TYPE_MEDIA) . 'catalog/category/' . $image; } return $url; diff --git a/app/code/Magento/Catalog/Model/Config/Backend/Category.php b/app/code/Magento/Catalog/Model/Config/Backend/Category.php index 71fcb9b7ac223..9bb344fbd7e7d 100644 --- a/app/code/Magento/Catalog/Model/Config/Backend/Category.php +++ b/app/code/Magento/Catalog/Model/Config/Backend/Category.php @@ -46,7 +46,7 @@ class Category extends \Magento\Core\Model\Config\Value * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Config $config + * @param \Magento\App\ConfigInterface $config * @param \Magento\Catalog\Model\Category $catalogCategory * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection @@ -56,7 +56,7 @@ public function __construct( \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Config $config, + \Magento\App\ConfigInterface $config, \Magento\Catalog\Model\Category $catalogCategory, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, diff --git a/app/code/Magento/Catalog/Model/Config/CatalogClone/Media/Image.php b/app/code/Magento/Catalog/Model/Config/CatalogClone/Media/Image.php index 08328fa629d19..c84d18b7ff765 100644 --- a/app/code/Magento/Catalog/Model/Config/CatalogClone/Media/Image.php +++ b/app/code/Magento/Catalog/Model/Config/CatalogClone/Media/Image.php @@ -51,7 +51,7 @@ class Image extends \Magento\Core\Model\Config\Value * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Config $config + * @param \Magento\App\ConfigInterface $config * @param \Magento\Catalog\Model\Resource\Product\Attribute\CollectionFactory $attributeCollectionFactory * @param \Magento\Eav\Model\Config $eavConfig * @param \Magento\Core\Model\Resource\AbstractResource $resource @@ -62,7 +62,7 @@ public function __construct( \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Config $config, + \Magento\App\ConfigInterface $config, \Magento\Catalog\Model\Resource\Product\Attribute\CollectionFactory $attributeCollectionFactory, \Magento\Eav\Model\Config $eavConfig, \Magento\Core\Model\Resource\AbstractResource $resource = null, diff --git a/app/code/Magento/Catalog/Model/Indexer/Url.php b/app/code/Magento/Catalog/Model/Indexer/Url.php index cd08ea39f806d..44fbeb9e86a43 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Url.php +++ b/app/code/Magento/Catalog/Model/Indexer/Url.php @@ -61,7 +61,7 @@ class Url extends \Magento\Index\Model\Indexer\AbstractIndexer \Magento\Core\Model\Store\Group::ENTITY => array( \Magento\Index\Model\Event::TYPE_SAVE ), - \Magento\Core\Model\Config\Value::ENTITY => array( + \Magento\App\Config\ValueInterface::ENTITY => array( \Magento\Index\Model\Event::TYPE_SAVE ), ); @@ -160,7 +160,7 @@ public function matchEvent(\Magento\Index\Model\Event $event) } else { $result = false; } - } else if ($entity == \Magento\Core\Model\Config\Value::ENTITY) { + } else if ($entity == \Magento\App\Config\ValueInterface::ENTITY) { $configData = $event->getDataObject(); if ($configData && in_array($configData->getPath(), $this->_relatedConfigSettings)) { $result = $configData->isValueChanged(); @@ -196,7 +196,7 @@ protected function _registerEvent(\Magento\Index\Model\Event $event) case \Magento\Core\Model\Store::ENTITY: case \Magento\Core\Model\Store\Group::ENTITY: - case \Magento\Core\Model\Config\Value::ENTITY: + case \Magento\App\Config\ValueInterface::ENTITY: $process = $event->getProcess(); $process->changeStatus(\Magento\Index\Model\Process::STATUS_REQUIRE_REINDEX); break; diff --git a/app/code/Magento/Catalog/Model/Observer.php b/app/code/Magento/Catalog/Model/Observer.php index 044b8f424e792..12bf8d2369f73 100644 --- a/app/code/Magento/Catalog/Model/Observer.php +++ b/app/code/Magento/Catalog/Model/Observer.php @@ -58,7 +58,7 @@ class Observer protected $_catalogCategory = null; /** - * @var \Magento\Core\Model\Config + * @var \Magento\App\ReinitableConfigInterface */ protected $_coreConfig; @@ -130,7 +130,7 @@ class Observer * @param \Magento\Catalog\Helper\Category $catalogCategory * @param \Magento\Catalog\Helper\Data $catalogData * @param \Magento\Catalog\Helper\Category\Flat $catalogCategoryFlat - * @param \Magento\Core\Model\Config $coreConfig + * @param \Magento\App\ReinitableConfigInterface $coreConfig * @param \Magento\Catalog\Model\Resource\Category\FlatFactory $flatResourceFactory * @param \Magento\Catalog\Model\Resource\ProductFactory $productResourceFactory */ @@ -144,7 +144,7 @@ public function __construct( \Magento\Catalog\Helper\Category $catalogCategory, \Magento\Catalog\Helper\Data $catalogData, \Magento\Catalog\Helper\Category\Flat $catalogCategoryFlat, - \Magento\Core\Model\Config $coreConfig, + \Magento\App\ReinitableConfigInterface $coreConfig, \Magento\Catalog\Model\Resource\Category\FlatFactory $flatResourceFactory, \Magento\Catalog\Model\Resource\ProductFactory $productResourceFactory ) { diff --git a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Groupprice.php b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Groupprice.php index 59b1f60d2b9ad..936370028fc67 100644 --- a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Groupprice.php +++ b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Groupprice.php @@ -46,7 +46,7 @@ class Groupprice * @param \Magento\Directory\Model\CurrencyFactory $currencyFactory * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Catalog\Helper\Data $catalogData - * @param \Magento\Core\Model\Config $config + * @param \Magento\App\ConfigInterface $config * @param \Magento\Catalog\Model\Product\Type $catalogProductType * @param \Magento\Catalog\Model\Resource\Product\Attribute\Backend\Groupprice $productAttributeBackendGroupprice */ @@ -55,7 +55,7 @@ public function __construct( \Magento\Directory\Model\CurrencyFactory $currencyFactory, \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Catalog\Helper\Data $catalogData, - \Magento\Core\Model\Config $config, + \Magento\App\ConfigInterface $config, \Magento\Catalog\Model\Product\Type $catalogProductType, \Magento\Catalog\Model\Resource\Product\Attribute\Backend\Groupprice $productAttributeBackendGroupprice ) { diff --git a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Groupprice/AbstractGroupprice.php b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Groupprice/AbstractGroupprice.php index 1d4f7da43a494..3aa56d5ba6ced 100644 --- a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Groupprice/AbstractGroupprice.php +++ b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Groupprice/AbstractGroupprice.php @@ -64,7 +64,7 @@ abstract protected function _getDuplicateErrorMessage(); * @param \Magento\Directory\Model\CurrencyFactory $currencyFactory * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Catalog\Helper\Data $catalogData - * @param \Magento\Core\Model\Config $config + * @param \Magento\App\ConfigInterface $config * @param \Magento\Catalog\Model\Product\Type $catalogProductType */ public function __construct( @@ -72,7 +72,7 @@ public function __construct( \Magento\Directory\Model\CurrencyFactory $currencyFactory, \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Catalog\Helper\Data $catalogData, - \Magento\Core\Model\Config $config, + \Magento\App\ConfigInterface $config, \Magento\Catalog\Model\Product\Type $catalogProductType ) { $this->_catalogProductType = $catalogProductType; diff --git a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Price.php b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Price.php index 2bbd62451bc2e..96c5d04af8d68 100644 --- a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Price.php +++ b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Price.php @@ -60,7 +60,7 @@ class Price extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend /** * Core config model * - * @var \Magento\Core\Model\ConfigInterface + * @var \Magento\App\ConfigInterface */ protected $_config; @@ -71,14 +71,14 @@ class Price extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend * @param \Magento\Directory\Model\CurrencyFactory $currencyFactory * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Catalog\Helper\Data $catalogData - * @param \Magento\Core\Model\Config $config + * @param \Magento\App\ConfigInterface $config */ public function __construct( \Magento\Logger $logger, \Magento\Directory\Model\CurrencyFactory $currencyFactory, \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Catalog\Helper\Data $catalogData, - \Magento\Core\Model\Config $config + \Magento\App\ConfigInterface $config ) { $this->_currencyFactory = $currencyFactory; $this->_storeManager = $storeManager; diff --git a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Tierprice.php b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Tierprice.php index 7b24c5a5d01e4..88e0baead0d20 100644 --- a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Tierprice.php +++ b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Tierprice.php @@ -49,7 +49,7 @@ class Tierprice * @param \Magento\Directory\Model\CurrencyFactory $currencyFactory * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Catalog\Helper\Data $catalogData - * @param \Magento\Core\Model\Config $config + * @param \Magento\App\ConfigInterface $config * @param \Magento\Catalog\Model\Product\Type $catalogProductType * @param \Magento\Catalog\Model\Resource\Product\Attribute\Backend\Tierprice $productAttributeTierprice */ @@ -58,7 +58,7 @@ public function __construct( \Magento\Directory\Model\CurrencyFactory $currencyFactory, \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Catalog\Helper\Data $catalogData, - \Magento\Core\Model\Config $config, + \Magento\App\ConfigInterface $config, \Magento\Catalog\Model\Product\Type $catalogProductType, \Magento\Catalog\Model\Resource\Product\Attribute\Backend\Tierprice $productAttributeTierprice ) { diff --git a/app/code/Magento/Catalog/Model/Product/Attribute/Frontend/Image.php b/app/code/Magento/Catalog/Model/Product/Attribute/Frontend/Image.php index aa64a449341b7..7f5a1ad83b5a5 100644 --- a/app/code/Magento/Catalog/Model/Product/Attribute/Frontend/Image.php +++ b/app/code/Magento/Catalog/Model/Product/Attribute/Frontend/Image.php @@ -65,7 +65,7 @@ public function getUrl($product) $image = $product->getData($this->getAttribute()->getAttributeCode()); if ($image) { $url = $this->_storeManager->getStore($product->getStore()) - ->getBaseUrl('media') . 'catalog/product/' . $image; + ->getBaseUrl(\Magento\UrlInterface::URL_TYPE_MEDIA) . 'catalog/product/' . $image; } else { $url = false; } diff --git a/app/code/Magento/Catalog/Model/Product/Attribute/Source/Inputtype.php b/app/code/Magento/Catalog/Model/Product/Attribute/Source/Inputtype.php index d8e5c9f40612c..4b70899f9851e 100644 --- a/app/code/Magento/Catalog/Model/Product/Attribute/Source/Inputtype.php +++ b/app/code/Magento/Catalog/Model/Product/Attribute/Source/Inputtype.php @@ -84,18 +84,11 @@ public function toOptionArray() if (isset($type['hide_fields'])) { $_hiddenFields[$type['value']] = $type['hide_fields']; } - if (isset($type['disabled_types'])) { - $_disabledTypes[$type['value']] = $type['disabled_types']; - } } if ($this->_coreRegistry->registry('attribute_type_hidden_fields') === null) { $this->_coreRegistry->register('attribute_type_hidden_fields', $_hiddenFields); } - if ($this->_coreRegistry->registry('attribute_type_disabled_types') === null) { - $this->_coreRegistry->register('attribute_type_disabled_types', $_disabledTypes); - } - return array_merge(parent::toOptionArray(), $inputTypes); } } diff --git a/dev/tests/unit/testsuite/Magento/GroupedProduct/Model/ProductTypes/Config/Converter/Plugin/GroupedTest.php b/app/code/Magento/Catalog/Model/Product/CartConfiguration.php similarity index 50% rename from dev/tests/unit/testsuite/Magento/GroupedProduct/Model/ProductTypes/Config/Converter/Plugin/GroupedTest.php rename to app/code/Magento/Catalog/Model/Product/CartConfiguration.php index 05cb2cdf71202..2a5bbf8165a59 100644 --- a/dev/tests/unit/testsuite/Magento/GroupedProduct/Model/ProductTypes/Config/Converter/Plugin/GroupedTest.php +++ b/app/code/Magento/Catalog/Model/Product/CartConfiguration.php @@ -22,34 +22,32 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\GroupedProduct\Model\ProductTypes\Config\Converter\Plugin; +/** + * Cart product configuration model + */ +namespace Magento\Catalog\Model\Product; -class GroupedTest extends \PHPUnit_Framework_TestCase +class CartConfiguration { /** + * Decide whether product has been configured for cart or not + * + * @param \Magento\Catalog\Model\Product $product * @param array $config - * @param array $result - * @dataProvider afterConvertDataProvider - */ - public function testAfterConvert($config, $result) - { - $model = new \Magento\GroupedProduct\Model\ProductTypes\Config\Converter\Plugin\Grouped(); - $this->assertEquals($result, $model->afterConvert($config)); - } - - /** - * @return array + * @return bool */ - public function afterConvertDataProvider() + public function isProductConfigured(\Magento\Catalog\Model\Product $product, $config) { - $index = \Magento\GroupedProduct\Model\Product\Type\Grouped::TYPE_CODE; - $emptyConfig = array(1, 2, 3); - $config = array($index => array(1)); - $result = array($index => array(1, 'is_product_set' => true)); - - return array( - 'empty config' => array($emptyConfig, $emptyConfig), - 'with grouped' => array($config, $result), - ); + // If below POST fields were submitted - this is product's options, it has been already configured + switch ($product->getTypeId()) { + case \Magento\Catalog\Model\Product\Type::TYPE_SIMPLE: + case \Magento\Catalog\Model\Product\Type::TYPE_VIRTUAL: + return isset($config['options']); + case \Magento\Catalog\Model\Product\Type::TYPE_CONFIGURABLE: + return isset($config['super_attribute']); + case \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE: + return isset($config['bundle_option']); + } + return false; } } diff --git a/app/code/Magento/Catalog/Model/Product/CatalogPrice.php b/app/code/Magento/Catalog/Model/Product/CatalogPrice.php new file mode 100644 index 0000000000000..47dca13bd137e --- /dev/null +++ b/app/code/Magento/Catalog/Model/Product/CatalogPrice.php @@ -0,0 +1,92 @@ +priceModelFactory = $priceModelFactory; + $this->priceModelPool = $priceModelPool; + } + + /** + * Minimal price for "regular" user + * + * @param \Magento\Catalog\Model\Product $product + * @param null|\Magento\Core\Model\Store $store Store view + * @param bool $inclTax + * @throws \UnexpectedValueException + * @return null|float + */ + public function getCatalogPrice(\Magento\Catalog\Model\Product $product, $store = null, $inclTax = false) + { + if (array_key_exists($product->getTypeId(), $this->priceModelPool)) { + $catalogPriceModel = $this->priceModelFactory->create($this->priceModelPool[$product->getTypeId()]); + return $catalogPriceModel->getCatalogPrice($product, $store, $inclTax); + } + + return $product->getFinalPrice(); + } + + /** + * Regular catalog price + * + * @param \Magento\Catalog\Model\Product $product + * @throws \UnexpectedValueException + * @return null + */ + public function getCatalogRegularPrice(\Magento\Catalog\Model\Product $product) + { + if (array_key_exists($product->getTypeId(), $this->priceModelPool)) { + $catalogPriceModel = $this->priceModelFactory->create($this->priceModelPool[$product->getTypeId()]); + return $catalogPriceModel->getCatalogRegularPrice($product); + } + + return $product->getPrice(); + } + +} \ No newline at end of file diff --git a/app/code/Magento/Catalog/Model/Product/CatalogPriceFactory.php b/app/code/Magento/Catalog/Model/Product/CatalogPriceFactory.php new file mode 100644 index 0000000000000..ae79697b29a3c --- /dev/null +++ b/app/code/Magento/Catalog/Model/Product/CatalogPriceFactory.php @@ -0,0 +1,63 @@ +objectManager = $objectManager; + } + + + /** + * Provide custom price model with basic validation + * + * @param string $name + * @return \Magento\Catalog\Model\Product\CatalogPriceInterface + * @throws \UnexpectedValueException + */ + public function create($name) + { + $customPriceModel = $this->objectManager->get($name); + if (!($customPriceModel instanceof \Magento\Catalog\Model\Product\CatalogPriceInterface)) { + throw new \UnexpectedValueException('Class ' . $name + . ' should be an instance of \Magento\Catalog\Model\Product\CatalogPriceInterface'); + } + + return $customPriceModel; + } +} \ No newline at end of file diff --git a/app/code/Magento/Catalog/Model/Product/CatalogPriceInterface.php b/app/code/Magento/Catalog/Model/Product/CatalogPriceInterface.php new file mode 100644 index 0000000000000..4f5896ef26a9f --- /dev/null +++ b/app/code/Magento/Catalog/Model/Product/CatalogPriceInterface.php @@ -0,0 +1,49 @@ +getDestinationSubdir()}.jpg" ); } else { - $url = $this->_storeManager->getStore()->getBaseUrl(Store::URL_TYPE_MEDIA) . $this->_newFile; + $url = $this->_storeManager->getStore()->getBaseUrl(\Magento\UrlInterface::URL_TYPE_MEDIA) . $this->_newFile; } return $url; diff --git a/app/code/Magento/Catalog/Model/Product/Indexer/Price.php b/app/code/Magento/Catalog/Model/Product/Indexer/Price.php index 21e7d601feac9..67f8352b2796a 100644 --- a/app/code/Magento/Catalog/Model/Product/Indexer/Price.php +++ b/app/code/Magento/Catalog/Model/Product/Indexer/Price.php @@ -74,7 +74,7 @@ class Price extends \Magento\Index\Model\Indexer\AbstractIndexer \Magento\Index\Model\Event::TYPE_MASS_ACTION, self::EVENT_TYPE_REINDEX_PRICE, ), - \Magento\Core\Model\Config\Value::ENTITY => array( + \Magento\App\Config\ValueInterface::ENTITY => array( \Magento\Index\Model\Event::TYPE_SAVE ), \Magento\Customer\Model\Group::ENTITY => array( @@ -149,7 +149,7 @@ public function matchEvent(\Magento\Index\Model\Event $event) return $data[self::EVENT_MATCH_RESULT_KEY]; } - if ($event->getEntity() == \Magento\Core\Model\Config\Value::ENTITY) { + if ($event->getEntity() == \Magento\App\Config\ValueInterface::ENTITY) { $data = $event->getDataObject(); if ($data && in_array($data->getPath(), $this->_relatedConfigSettings)) { $result = $data->isValueChanged(); @@ -250,7 +250,7 @@ protected function _registerEvent(\Magento\Index\Model\Event $event) $event->addNewData(self::EVENT_MATCH_RESULT_KEY, true); $entity = $event->getEntity(); - if ($entity == \Magento\Core\Model\Config\Value::ENTITY || $entity == \Magento\Customer\Model\Group::ENTITY) { + if ($entity == \Magento\App\Config\ValueInterface::ENTITY || $entity == \Magento\Customer\Model\Group::ENTITY) { $process = $event->getProcess(); $process->changeStatus(\Magento\Index\Model\Process::STATUS_REQUIRE_REINDEX); } else if ($entity == \Magento\Catalog\Model\Product::ENTITY) { diff --git a/app/code/Magento/Catalog/Model/Product/LinkTypeProvider.php b/app/code/Magento/Catalog/Model/Product/LinkTypeProvider.php new file mode 100644 index 0000000000000..ee5c19332b405 --- /dev/null +++ b/app/code/Magento/Catalog/Model/Product/LinkTypeProvider.php @@ -0,0 +1,57 @@ + 'product_link_code' + * + * @var array + */ + protected $_linkTypes; + + /** + * @param array $linkTypes + */ + public function __construct( + array $linkTypes = array() + ) { + $this->_linkTypes = $linkTypes; + } + + /** + * Retrieve information about available product link types + * + * @return array + */ + public function getLinkTypes() + { + return $this->_linkTypes; + } +} diff --git a/app/code/Magento/Catalog/Model/Product/Media/Config.php b/app/code/Magento/Catalog/Model/Product/Media/Config.php index fbfa9e2f6c5d6..56b09e0b95625 100644 --- a/app/code/Magento/Catalog/Model/Product/Media/Config.php +++ b/app/code/Magento/Catalog/Model/Product/Media/Config.php @@ -86,7 +86,7 @@ public function getBaseMediaPath() public function getBaseMediaUrl() { return $this->storeManager->getStore() - ->getBaseUrl(\Magento\Core\Model\Store::URL_TYPE_MEDIA) . 'catalog/product'; + ->getBaseUrl(\Magento\UrlInterface::URL_TYPE_MEDIA) . 'catalog/product'; } /** @@ -106,7 +106,7 @@ public function getBaseTmpMediaPath() public function getBaseTmpMediaUrl() { return $this->storeManager->getStore() - ->getBaseUrl(\Magento\Core\Model\Store::URL_TYPE_MEDIA) . 'tmp/' . $this->getBaseMediaUrlAddition(); + ->getBaseUrl(\Magento\UrlInterface::URL_TYPE_MEDIA) . 'tmp/' . $this->getBaseMediaUrlAddition(); } /** diff --git a/app/code/Magento/Catalog/Model/Product/Url.php b/app/code/Magento/Catalog/Model/Product/Url.php index c59b004ad8fd1..3c8277c772d7d 100644 --- a/app/code/Magento/Catalog/Model/Product/Url.php +++ b/app/code/Magento/Catalog/Model/Product/Url.php @@ -41,7 +41,7 @@ class Url extends \Magento\Object /** * Static URL instance * - * @var \Magento\Core\Model\Url + * @var \Magento\UrlInterface */ protected $_url; @@ -74,11 +74,9 @@ class Url extends \Magento\Object protected $_storeManager; /** - * App model - * - * @var \Magento\Core\Model\App + * @var \Magento\Session\SidResolverInterface */ - protected $_app; + protected $_sidResolver; /** * Construct @@ -88,7 +86,7 @@ class Url extends \Magento\Object * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Catalog\Helper\Category $catalogCategory * @param \Magento\Catalog\Helper\Product\Url $catalogProductUrl - * @param \Magento\Core\Model\App $app + * @param \Magento\Session\SidResolverInterface $sidResolver * @param array $data */ public function __construct( @@ -97,7 +95,7 @@ public function __construct( \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Catalog\Helper\Category $catalogCategory, \Magento\Catalog\Helper\Product\Url $catalogProductUrl, - \Magento\Core\Model\App $app, + \Magento\Session\SidResolverInterface $sidResolver, array $data = array() ) { $this->_urlRewrite = $urlRewriteFactory->create(); @@ -105,14 +103,14 @@ public function __construct( $this->_storeManager = $storeManager; $this->_catalogCategory = $catalogCategory; $this->_catalogProductUrl = $catalogProductUrl; - $this->_app = $app; + $this->_sidResolver = $sidResolver; parent::__construct($data); } /** * Retrieve URL Instance * - * @return \Magento\Core\Model\Url + * @return \Magento\UrlInterface */ public function getUrlInstance() { @@ -152,7 +150,7 @@ protected function _validImage($image) */ public function getUrlInStore(\Magento\Catalog\Model\Product $product, $params = array()) { - $params['_store_to_url'] = true; + $params['_scope_to_url'] = true; return $this->getUrl($product, $params); } @@ -166,7 +164,7 @@ public function getUrlInStore(\Magento\Catalog\Model\Product $product, $params = public function getProductUrl($product, $useSid = null) { if ($useSid === null) { - $useSid = $this->_app->getUseSessionInUrl(); + $useSid = $this->_sidResolver->getUseSessionInUrl(); } $params = array(); @@ -239,7 +237,7 @@ public function getUrl(\Magento\Catalog\Model\Product $product, $params = array( if ($product->hasUrlDataObject()) { $requestPath = $product->getUrlDataObject()->getUrlRewrite(); - $routeParams['_store'] = $product->getUrlDataObject()->getStoreId(); + $routeParams['_scope'] = $product->getUrlDataObject()->getStoreId(); } else { $requestPath = $product->getRequestPath(); if (empty($requestPath) && $requestPath !== false) { @@ -259,12 +257,12 @@ public function getUrl(\Magento\Catalog\Model\Product $product, $params = array( } } - if (isset($routeParams['_store'])) { - $storeId = $this->_storeManager->getStore($routeParams['_store'])->getId(); + if (isset($routeParams['_scope'])) { + $storeId = $this->_storeManager->getStore($routeParams['_scope'])->getId(); } if ($storeId != $this->_storeManager->getStore()->getId()) { - $routeParams['_store_to_url'] = true; + $routeParams['_scope_to_url'] = true; } if (!empty($requestPath)) { @@ -283,7 +281,7 @@ public function getUrl(\Magento\Catalog\Model\Product $product, $params = array( $routeParams['_query'] = array(); } - return $this->getUrlInstance()->setStore($storeId) + return $this->getUrlInstance()->setScope($storeId) ->getUrl($routePath, $routeParams); } } diff --git a/app/code/Magento/Catalog/Model/ProductTypes/Config.php b/app/code/Magento/Catalog/Model/ProductTypes/Config.php index 3e68285f783e6..e07b60fa5a14a 100644 --- a/app/code/Magento/Catalog/Model/ProductTypes/Config.php +++ b/app/code/Magento/Catalog/Model/ProductTypes/Config.php @@ -46,7 +46,7 @@ public function __construct( */ public function getType($name) { - return $this->get($name, array()); + return $this->get('types/' . $name, array()); } /** @@ -56,7 +56,7 @@ public function getType($name) */ public function getAll() { - return $this->get(); + return $this->get('types'); } /** @@ -67,6 +67,16 @@ public function getAll() */ public function isProductSet($typeId) { - return $this->get($typeId . '/is_product_set', false); + return 'true' == $this->get('types/' . $typeId . '/custom_attributes/is_product_set', false); + } + + /** + * Get composable types + * + * @return array + */ + public function getComposableTypes() + { + return $this->get('composableTypes', array()); } } diff --git a/app/code/Magento/Catalog/Model/ProductTypes/Config/Converter.php b/app/code/Magento/Catalog/Model/ProductTypes/Config/Converter.php index 60a43b9e88e44..a999733617370 100644 --- a/app/code/Magento/Catalog/Model/ProductTypes/Config/Converter.php +++ b/app/code/Magento/Catalog/Model/ProductTypes/Config/Converter.php @@ -39,7 +39,7 @@ public function convert($source) $output = array(); $xpath = new \DOMXPath($source); $types = $xpath->evaluate('/config/type'); - /** @var $typeNode DOMNode */ + /** @var $typeNode \DOMNode */ foreach ($types as $typeNode) { $typeName = $this->_getAttributeValue($typeNode, 'name'); $isComposite = $this->_getAttributeValue($typeNode, 'composite', 'false'); @@ -54,7 +54,7 @@ public function convert($source) $data['can_use_qty_decimals'] = !empty($isDecimal) && 'false' !== $isDecimal; $data['is_qty'] = !empty($isQty) && 'false' !== $isQty; - /** @var $childNode DOMNode */ + /** @var $childNode \DOMNode */ foreach ($typeNode->childNodes as $childNode) { if ($childNode->nodeType != XML_ELEMENT_NODE) { continue; @@ -70,18 +70,8 @@ public function convert($source) case 'stockIndexerModel': $data['stock_indexer'] = $this->_getAttributeValue($childNode, 'instance'); break; - case 'allowProductTypes': - /** @var $allowedTypes DOMNode */ - foreach ($childNode->childNodes as $allowedTypes) { - if ($allowedTypes->nodeType != XML_ELEMENT_NODE) { - continue; - } - $name = $this->_getAttributeValue($allowedTypes, 'name'); - $data['allow_product_types'][$name] = $name; - } - break; case 'allowedSelectionTypes': - /** @var $selectionsTypes DOMNode */ + /** @var $selectionsTypes \DOMNode */ foreach ($childNode->childNodes as $selectionsTypes) { if ($selectionsTypes->nodeType != XML_ELEMENT_NODE) { continue; @@ -90,18 +80,37 @@ public function convert($source) $data['allowed_selection_types'][$name] = $name; } break; + case 'customAttributes': + /** @var $customAttributes \DOMNode */ + foreach ($childNode->childNodes as $customAttributes) { + if ($customAttributes->nodeType != XML_ELEMENT_NODE) { + continue; + } + $name = $this->_getAttributeValue($customAttributes, 'name'); + $value = $this->_getAttributeValue($customAttributes, 'value'); + $data['custom_attributes'][$name] = $value; + } + break; } } - $output[$typeName] = $data; + $output['types'][$typeName] = $data; + } + + $composableTypes = $xpath->evaluate('/config/composableTypes/*'); + $output['composableTypes'] = array(); + foreach ($composableTypes as $typeNode) { + $typeName = $this->_getAttributeValue($typeNode, 'name'); + $output['composableTypes'][$typeName] = $typeName; } + return $output; } /** * Get attribute value * - * @param DOMNode $input + * @param \DOMNode $input * @param string $attributeName * @param mixed $default * @return null|string diff --git a/app/code/Magento/Catalog/Model/ProductTypes/Config/Reader.php b/app/code/Magento/Catalog/Model/ProductTypes/Config/Reader.php index 30463aa49d482..71ee55160017d 100644 --- a/app/code/Magento/Catalog/Model/ProductTypes/Config/Reader.php +++ b/app/code/Magento/Catalog/Model/ProductTypes/Config/Reader.php @@ -35,14 +35,14 @@ class Reader extends \Magento\Config\Reader\Filesystem '/config/type/priceModel' => 'instance', '/config/type/indexerModel' => 'instance', '/config/type/stockIndexerModel' => 'instance', - '/config/type/allowProductTypes/type' => 'name', '/config/type/allowedSelectionTypes/type' => 'name', + '/config/composableTypes/type' => 'name', ); /** * @param \Magento\Config\FileResolverInterface $fileResolver - * @param \Magento\Catalog\Model\ProductTypes\Config\Converter $converter - * @param \Magento\Catalog\Model\ProductTypes\Config\SchemaLocator $schemaLocator + * @param Converter $converter + * @param SchemaLocator $schemaLocator * @param \Magento\Config\ValidationStateInterface $validationState * @param string $fileName * @param array $idAttributes @@ -51,8 +51,8 @@ class Reader extends \Magento\Config\Reader\Filesystem */ public function __construct( \Magento\Config\FileResolverInterface $fileResolver, - \Magento\Catalog\Model\ProductTypes\Config\Converter $converter, - \Magento\Catalog\Model\ProductTypes\Config\SchemaLocator $schemaLocator, + Converter $converter, + SchemaLocator $schemaLocator, \Magento\Config\ValidationStateInterface $validationState, $fileName = 'product_types.xml', $idAttributes = array(), diff --git a/app/code/Magento/Catalog/Model/ProductTypes/ConfigInterface.php b/app/code/Magento/Catalog/Model/ProductTypes/ConfigInterface.php index f868e70e8111e..b66db7b741a8e 100644 --- a/app/code/Magento/Catalog/Model/ProductTypes/ConfigInterface.php +++ b/app/code/Magento/Catalog/Model/ProductTypes/ConfigInterface.php @@ -47,4 +47,11 @@ public function getAll(); * @return bool */ public function isProductSet($typeId); + + /** + * Get composable types + * + * @return array + */ + public function getComposableTypes(); } diff --git a/app/code/Magento/Catalog/Model/Resource/Attribute.php b/app/code/Magento/Catalog/Model/Resource/Attribute.php index 9a284295bc357..9add61456d7e1 100644 --- a/app/code/Magento/Catalog/Model/Resource/Attribute.php +++ b/app/code/Magento/Catalog/Model/Resource/Attribute.php @@ -43,34 +43,22 @@ class Attribute extends \Magento\Eav\Model\Resource\Entity\Attribute */ protected $_eavConfig; - /** - * Store manager - * - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - /** * Class constructor * * @param \Magento\App\Resource $resource - * @param \Magento\Core\Model\App $app - * @param \Magento\Eav\Model\Resource\Entity\Type $eavEntityType * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\Eav\Model\Resource\Entity\Type $eavEntityType * @param \Magento\Eav\Model\Config $eavConfig - * @param array $arguments */ public function __construct( \Magento\App\Resource $resource, - \Magento\Core\Model\App $app, - \Magento\Eav\Model\Resource\Entity\Type $eavEntityType, \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Eav\Model\Config $eavConfig, - array $arguments = array() + \Magento\Eav\Model\Resource\Entity\Type $eavEntityType, + \Magento\Eav\Model\Config $eavConfig ) { - $this->_storeManager = $storeManager; $this->_eavConfig = $eavConfig; - parent::__construct($resource, $app, $eavEntityType, $arguments); + parent::__construct($resource, $storeManager, $eavEntityType); } /** diff --git a/app/code/Magento/Catalog/Model/Resource/Category/Attribute/Frontend/Image.php b/app/code/Magento/Catalog/Model/Resource/Category/Attribute/Frontend/Image.php index 6c258dc545dd2..7bc25029ff545 100644 --- a/app/code/Magento/Catalog/Model/Resource/Category/Attribute/Frontend/Image.php +++ b/app/code/Magento/Catalog/Model/Resource/Category/Attribute/Frontend/Image.php @@ -68,7 +68,7 @@ public function getUrl($object) $url = false; if ($image = $object->getData($this->getAttribute()->getAttributeCode())) { $url = $this->_storeManager->getStore() - ->getBaseUrl(\Magento\Core\Model\Store::URL_TYPE_MEDIA) . self::IMAGE_PATH_SEGMENT . $image; + ->getBaseUrl(\Magento\UrlInterface::URL_TYPE_MEDIA) . self::IMAGE_PATH_SEGMENT . $image; } return $url; } diff --git a/app/code/Magento/Catalog/Model/Resource/Product/Indexer/Price.php b/app/code/Magento/Catalog/Model/Resource/Product/Indexer/Price.php index c7e79c60892df..fb6ca5e5a87e6 100644 --- a/app/code/Magento/Catalog/Model/Resource/Product/Indexer/Price.php +++ b/app/code/Magento/Catalog/Model/Resource/Product/Indexer/Price.php @@ -81,7 +81,7 @@ class Price extends \Magento\Index\Model\Resource\AbstractResource /** * Core config model * - * @var \Magento\Core\Model\ConfigInterface + * @var \Magento\App\ConfigInterface */ protected $_config; @@ -103,7 +103,7 @@ class Price extends \Magento\Index\Model\Resource\AbstractResource * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\LocaleInterface $locale * @param \Magento\Catalog\Model\Product\Type $catalogProductType - * @param \Magento\Core\Model\Config $config + * @param \Magento\App\ConfigInterface $config * @param \Magento\Catalog\Model\Resource\Product\Indexer\Price\Factory $indexerPriceFactory * @param \Magento\Stdlib\DateTime $dateTime */ @@ -113,7 +113,7 @@ public function __construct( \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\LocaleInterface $locale, \Magento\Catalog\Model\Product\Type $catalogProductType, - \Magento\Core\Model\Config $config, + \Magento\App\ConfigInterface $config, \Magento\Catalog\Model\Resource\Product\Indexer\Price\Factory $indexerPriceFactory, \Magento\Stdlib\DateTime $dateTime ) { diff --git a/app/code/Magento/Catalog/Model/Resource/Product/Option.php b/app/code/Magento/Catalog/Model/Resource/Product/Option.php index 58c8f0b41e877..a7fbd81e406cf 100644 --- a/app/code/Magento/Catalog/Model/Resource/Product/Option.php +++ b/app/code/Magento/Catalog/Model/Resource/Product/Option.php @@ -53,7 +53,7 @@ class Option extends \Magento\Core\Model\Resource\Db\AbstractDb /** * Core config model * - * @var \Magento\Core\Model\ConfigInterface + * @var \Magento\App\ConfigInterface */ protected $_config; @@ -63,13 +63,13 @@ class Option extends \Magento\Core\Model\Resource\Db\AbstractDb * @param \Magento\App\Resource $resource * @param \Magento\Directory\Model\CurrencyFactory $currencyFactory * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Config $config + * @param \Magento\App\ConfigInterface $config */ public function __construct( \Magento\App\Resource $resource, \Magento\Directory\Model\CurrencyFactory $currencyFactory, \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Config $config + \Magento\App\ConfigInterface $config ) { $this->_currencyFactory = $currencyFactory; $this->_storeManager = $storeManager; diff --git a/app/code/Magento/Catalog/Model/Resource/Product/Option/Value.php b/app/code/Magento/Catalog/Model/Resource/Product/Option/Value.php index dc933d9c78371..606ebee79d072 100644 --- a/app/code/Magento/Catalog/Model/Resource/Product/Option/Value.php +++ b/app/code/Magento/Catalog/Model/Resource/Product/Option/Value.php @@ -53,7 +53,7 @@ class Value extends \Magento\Core\Model\Resource\Db\AbstractDb /** * Core config model * - * @var \Magento\Core\Model\ConfigInterface + * @var \Magento\App\ConfigInterface */ protected $_config; @@ -63,13 +63,13 @@ class Value extends \Magento\Core\Model\Resource\Db\AbstractDb * @param \Magento\App\Resource $resource * @param \Magento\Directory\Model\CurrencyFactory $currencyFactory * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Config $config + * @param \Magento\App\ConfigInterface $config */ public function __construct( \Magento\App\Resource $resource, \Magento\Directory\Model\CurrencyFactory $currencyFactory, \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Config $config + \Magento\App\ConfigInterface $config ) { $this->_currencyFactory = $currencyFactory; $this->_storeManager = $storeManager; diff --git a/app/code/Magento/Catalog/Model/System/Config/Backend/Catalog/Category/Flat.php b/app/code/Magento/Catalog/Model/System/Config/Backend/Catalog/Category/Flat.php index c6b6a5f31b13d..23db87c2c098f 100644 --- a/app/code/Magento/Catalog/Model/System/Config/Backend/Catalog/Category/Flat.php +++ b/app/code/Magento/Catalog/Model/System/Config/Backend/Catalog/Category/Flat.php @@ -42,7 +42,7 @@ class Flat extends \Magento\Core\Model\Config\Value * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Config $config + * @param \Magento\App\ConfigInterface $config * @param \Magento\Index\Model\IndexerFactory $indexerFactory * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection @@ -52,7 +52,7 @@ public function __construct( \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Config $config, + \Magento\App\ConfigInterface $config, \Magento\Index\Model\IndexerFactory $indexerFactory, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, diff --git a/app/code/Magento/Catalog/Model/System/Config/Backend/Catalog/Product/Flat.php b/app/code/Magento/Catalog/Model/System/Config/Backend/Catalog/Product/Flat.php index 556e9fb13b435..159e7ac3f4d79 100644 --- a/app/code/Magento/Catalog/Model/System/Config/Backend/Catalog/Product/Flat.php +++ b/app/code/Magento/Catalog/Model/System/Config/Backend/Catalog/Product/Flat.php @@ -42,7 +42,7 @@ class Flat extends \Magento\Core\Model\Config\Value * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Config $config + * @param \Magento\App\ConfigInterface $config * @param \Magento\Index\Model\Indexer $indexIndexer * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection @@ -52,7 +52,7 @@ public function __construct( \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Config $config, + \Magento\App\ConfigInterface $config, \Magento\Index\Model\Indexer $indexIndexer, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, diff --git a/app/code/Magento/Catalog/Model/System/Config/Backend/Catalog/Url/Rewrite/Suffix.php b/app/code/Magento/Catalog/Model/System/Config/Backend/Catalog/Url/Rewrite/Suffix.php index 4ae31d45bd1ad..85063da36fb39 100644 --- a/app/code/Magento/Catalog/Model/System/Config/Backend/Catalog/Url/Rewrite/Suffix.php +++ b/app/code/Magento/Catalog/Model/System/Config/Backend/Catalog/Url/Rewrite/Suffix.php @@ -42,7 +42,7 @@ class Suffix extends \Magento\Core\Model\Config\Value * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Config $config + * @param \Magento\App\ConfigInterface $config * @param \Magento\Core\Helper\Url\Rewrite $coreUrlRewrite * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection @@ -52,7 +52,7 @@ public function __construct( \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Config $config, + \Magento\App\ConfigInterface $config, \Magento\Core\Helper\Url\Rewrite $coreUrlRewrite, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, diff --git a/app/code/Magento/Catalog/Model/Template/Filter.php b/app/code/Magento/Catalog/Model/Template/Filter.php index 69d18bff5db99..2a12cdcf4404f 100644 --- a/app/code/Magento/Catalog/Model/Template/Filter.php +++ b/app/code/Magento/Catalog/Model/Template/Filter.php @@ -132,7 +132,7 @@ public function viewDirective($construction) public function mediaDirective($construction) { $params = $this->_getIncludeParameters($construction[2]); - return $this->_storeManager->getStore()->getBaseUrl(\Magento\Core\Model\Store::URL_TYPE_MEDIA) . $params['url']; + return $this->_storeManager->getStore()->getBaseUrl(\Magento\UrlInterface::URL_TYPE_MEDIA) . $params['url']; } /** diff --git a/app/code/Magento/Catalog/etc/adminhtml/di.xml b/app/code/Magento/Catalog/etc/adminhtml/di.xml index 8569d9473101f..7261a5fdcd072 100644 --- a/app/code/Magento/Catalog/etc/adminhtml/di.xml +++ b/app/code/Magento/Catalog/etc/adminhtml/di.xml @@ -36,24 +36,32 @@ - - - Small - small_image - -
- Main - image -
- - Thumbnail - thumbnail - - - Custom image - custom_image - -
+ + + + Small + small_image + + + + + Main + image + + + + + Thumbnail + thumbnail + + + + + Custom image + custom_image + + +
@@ -66,11 +74,11 @@ - - Magento\Catalog\Model\Product\CopyConstructor\CrossSell - Magento\Catalog\Model\Product\CopyConstructor\UpSell - Magento\Catalog\Model\Product\CopyConstructor\Related - + + Magento\Catalog\Model\Product\CopyConstructor\CrossSell + Magento\Catalog\Model\Product\CopyConstructor\UpSell + Magento\Catalog\Model\Product\CopyConstructor\Related + diff --git a/app/code/Magento/Catalog/etc/di.xml b/app/code/Magento/Catalog/etc/di.xml index aa1521b927993..40b3d657c5727 100644 --- a/app/code/Magento/Catalog/etc/di.xml +++ b/app/code/Magento/Catalog/etc/di.xml @@ -52,9 +52,9 @@ 64 - - catalog_product - + + catalog_product + @@ -67,16 +67,20 @@ - - - container1 - - - - container2 - - - + + + + container1 + Product Info Column + + + + + container2 + Block after Info Column + + + @@ -112,9 +116,9 @@ - - Magento\Catalog\Model\Resource\Setup - + + Magento\Catalog\Model\Resource\Setup + @@ -145,4 +149,13 @@ + + + + Magento\Catalog\Model\Product\Link::LINK_TYPE_RELATED + Magento\Catalog\Model\Product\Link::LINK_TYPE_CROSSSELL + Magento\Catalog\Model\Product\Link::LINK_TYPE_UPSELL + + + diff --git a/app/code/Magento/Catalog/etc/frontend/di.xml b/app/code/Magento/Catalog/etc/frontend/di.xml index cd0ed17bbef3c..311d0f60dbe2d 100644 --- a/app/code/Magento/Catalog/etc/frontend/di.xml +++ b/app/code/Magento/Catalog/etc/frontend/di.xml @@ -39,9 +39,9 @@
- - add - + + add + diff --git a/app/code/Magento/Catalog/etc/product_types.xml b/app/code/Magento/Catalog/etc/product_types.xml index a4e0ddc487a37..0a093d3e7bdfa 100644 --- a/app/code/Magento/Catalog/etc/product_types.xml +++ b/app/code/Magento/Catalog/etc/product_types.xml @@ -24,14 +24,26 @@ */ --> - + + + + + - - - - + + + + + + + + - + + + + + diff --git a/app/code/Magento/Catalog/etc/product_types.xsd b/app/code/Magento/Catalog/etc/product_types.xsd index 610402841553a..6f5a6adc8c024 100644 --- a/app/code/Magento/Catalog/etc/product_types.xsd +++ b/app/code/Magento/Catalog/etc/product_types.xsd @@ -24,11 +24,14 @@ */ --> + + - - - + + + + @@ -39,6 +42,15 @@ + + + + Composable type name must be unique. + + + + + @@ -48,31 +60,31 @@ - - + + - Allowed type name must be unique. + Allowed selection type name must be unique. - - + + + + + - Allowed selection type name must be unique. + Attribute name should be unique. - + - - - @@ -82,82 +94,4 @@ - - - - - Price model declaration. - - - - - - - - - Indexer model declaration. - - - - - - - - - Allowed selection types declaration. - - - - - - - - - - - Stock indexer model declaration. - - - - - - - - - Allowed product types declaration. - - - - - - - - - - - Allowed product type declaration (used to describe possible composite product items). - - - - - - - - - Allowed selection type declaration. - - - - - - - - - Model name can contain only [a-zA-Z_\\\\]. - - - - - - diff --git a/app/code/Magento/Catalog/etc/product_types_base.xsd b/app/code/Magento/Catalog/etc/product_types_base.xsd new file mode 100644 index 0000000000000..c7beaae98335c --- /dev/null +++ b/app/code/Magento/Catalog/etc/product_types_base.xsd @@ -0,0 +1,120 @@ + + + + + + + Composable product types declaration. + + + + + + + + + + + Composable product type declaration (used to describe possible composite product items). + + + + + + + + + Price model declaration. + + + + + + + + + Indexer model declaration. + + + + + + + + + Allowed selection types declaration. + + + + + + + + + + + Stock indexer model declaration. + + + + + + + + + + + + + + + Custom attribute definition + + + + + + + + + + Allowed selection type declaration. + + + + + + + + + Model name can contain only [a-zA-Z_\\\\]. + + + + + + + diff --git a/app/code/Magento/Catalog/etc/product_types_merged.xsd b/app/code/Magento/Catalog/etc/product_types_merged.xsd index babd0c07f026d..1cacd516e1b8f 100644 --- a/app/code/Magento/Catalog/etc/product_types_merged.xsd +++ b/app/code/Magento/Catalog/etc/product_types_merged.xsd @@ -24,21 +24,86 @@ */ --> - - - - - - - - - - - - - - - + + + + + + + + + + + Product type name must be unique. + + + + + + + + + + + Composable type name must be unique. + + + + + + + - + + + + + + + + + + + + + + Product type declaration. + + + + + + + + Allowed selection type name must be unique. + + + + + + + + + + + + + + Attribute name should be unique. + + + + + + + + + + + + + + + + diff --git a/app/code/Magento/Catalog/view/frontend/layout/catalog_product_rss_feed_renderer_list.xml b/app/code/Magento/Catalog/view/frontend/layout/catalog_product_rss_feed_renderer_list.xml new file mode 100644 index 0000000000000..29358124098b4 --- /dev/null +++ b/app/code/Magento/Catalog/view/frontend/layout/catalog_product_rss_feed_renderer_list.xml @@ -0,0 +1,31 @@ + + + + + + + + diff --git a/app/code/Magento/CatalogInventory/Block/Adminhtml/Form/Field/Stock.php b/app/code/Magento/CatalogInventory/Block/Adminhtml/Form/Field/Stock.php index 6a88db7fa1f56..a8ba20428a5fb 100644 --- a/app/code/Magento/CatalogInventory/Block/Adminhtml/Form/Field/Stock.php +++ b/app/code/Magento/CatalogInventory/Block/Adminhtml/Form/Field/Stock.php @@ -41,7 +41,7 @@ class Stock extends \Magento\Data\Form\Element\Select protected $_qty; /** - * Is product composite (grouped or configurable) + * Is product composite * * @var bool */ @@ -54,11 +54,20 @@ class Stock extends \Magento\Data\Form\Element\Select */ protected $_factoryText; + /** + * List of product types that treated as complex and + * has no quantity option if taken without their children + * + * @var array + */ + protected $complexProductTypes; + /** * @param \Magento\Data\Form\Element\Factory $factoryElement * @param \Magento\Data\Form\Element\CollectionFactory $factoryCollection * @param \Magento\Escaper $escaper * @param \Magento\Data\Form\Element\TextFactory $factoryText + * @param array $complexProductTypes * @param array $data */ public function __construct( @@ -66,10 +75,12 @@ public function __construct( \Magento\Data\Form\Element\CollectionFactory $factoryCollection, \Magento\Escaper $escaper, \Magento\Data\Form\Element\TextFactory $factoryText, + array $complexProductTypes = array(), array $data = array() ) { $this->_factoryText = $factoryText; $this->_qty = isset($data['qty']) ? $data['qty'] : $this->_createQtyElement(); + $this->complexProductTypes = $complexProductTypes; unset($data['qty']); parent::__construct($factoryElement, $factoryCollection, $escaper, $data); $this->setName($data['name']); @@ -139,7 +150,7 @@ public function setName($name) } /** - * Get whether product is configurable or grouped + * Get whether product is composite * * @return bool */ @@ -190,10 +201,10 @@ protected function _getJs($quantityFieldId, $inStockFieldId) useConfigManageStockField = $('#inventory_use_config_manage_stock'); var disabler = function(event) { + var complexProductTypes = " . json_encode(array_values($this->complexProductTypes)) . "; var hasVariation = $('[data-panel=product-variations]').is('.opened'); if ((productType == 'configurable' && hasVariation) - || productType == 'grouped' - || productType == 'bundle'//@TODO move this check to Magento_Bundle after refactoring as widget + || $.inArray(productType, complexProductTypes) >= 0 || hasVariation ) { return; diff --git a/app/code/Magento/CatalogInventory/Model/Config/Backend/Managestock.php b/app/code/Magento/CatalogInventory/Model/Config/Backend/Managestock.php index f79b1d81bd05f..fcdfb222d3050 100644 --- a/app/code/Magento/CatalogInventory/Model/Config/Backend/Managestock.php +++ b/app/code/Magento/CatalogInventory/Model/Config/Backend/Managestock.php @@ -46,7 +46,7 @@ class Managestock * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Config $config + * @param \Magento\App\ConfigInterface $config * @param \Magento\CatalogInventory\Model\Stock\Status $stockStatus * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection @@ -56,7 +56,7 @@ public function __construct( \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Config $config, + \Magento\App\ConfigInterface $config, \Magento\CatalogInventory\Model\Stock\Status $stockStatus, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, diff --git a/app/code/Magento/CatalogInventory/Model/Indexer/Stock.php b/app/code/Magento/CatalogInventory/Model/Indexer/Stock.php index 4da440e305151..f04f585d55444 100644 --- a/app/code/Magento/CatalogInventory/Model/Indexer/Stock.php +++ b/app/code/Magento/CatalogInventory/Model/Indexer/Stock.php @@ -71,7 +71,7 @@ class Stock extends \Magento\Index\Model\Indexer\AbstractIndexer \Magento\Core\Model\Store\Group::ENTITY => array( \Magento\Index\Model\Event::TYPE_SAVE ), - \Magento\Core\Model\Config\Value::ENTITY => array( + \Magento\App\Config\ValueInterface::ENTITY => array( \Magento\Index\Model\Event::TYPE_SAVE ), ); @@ -192,7 +192,7 @@ public function matchEvent(\Magento\Index\Model\Event $event) } else { $result = false; } - } else if ($entity == \Magento\Core\Model\Config\Value::ENTITY) { + } else if ($entity == \Magento\App\Config\ValueInterface::ENTITY) { $configData = $event->getDataObject(); if ($configData && in_array($configData->getPath(), $this->_relatedConfigSettings)) { $result = $configData->isValueChanged(); @@ -227,12 +227,12 @@ protected function _registerEvent(\Magento\Index\Model\Event $event) case \Magento\Core\Model\Store::ENTITY: case \Magento\Core\Model\Store\Group::ENTITY: - case \Magento\Core\Model\Config\Value::ENTITY: + case \Magento\App\Config\ValueInterface::ENTITY: $event->addNewData('cataloginventory_stock_skip_call_event_handler', true); $process = $event->getProcess(); $process->changeStatus(\Magento\Index\Model\Process::STATUS_REQUIRE_REINDEX); - if ($event->getEntity() == \Magento\Core\Model\Config\Value::ENTITY) { + if ($event->getEntity() == \Magento\App\Config\ValueInterface::ENTITY) { $configData = $event->getDataObject(); if ($configData->getPath() == \Magento\CatalogInventory\Helper\Data::XML_PATH_SHOW_OUT_OF_STOCK) { $this->_indexer->getProcessByCode('catalog_product_price') diff --git a/app/code/Magento/CatalogInventory/Model/Observer.php b/app/code/Magento/CatalogInventory/Model/Observer.php index 7ae79d792f619..19c618d5bd4ce 100644 --- a/app/code/Magento/CatalogInventory/Model/Observer.php +++ b/app/code/Magento/CatalogInventory/Model/Observer.php @@ -109,6 +109,11 @@ class Observer */ protected $_indexerPrice; + /** + * @var \Magento\Catalog\Model\ProductTypes\ConfigInterface + */ + protected $typeConfig; + /** * @param \Magento\Catalog\Model\Resource\Product\Indexer\Price $indexerPrice * @param \Magento\CatalogInventory\Model\Resource\Indexer\Stock $resourceIndexerStock @@ -120,6 +125,7 @@ class Observer * @param \Magento\CatalogInventory\Model\Stock\ItemFactory $stockItemFactory * @param \Magento\CatalogInventory\Model\StockFactory $stockFactory * @param \Magento\CatalogInventory\Model\Stock\StatusFactory $stockStatusFactory + * @param \Magento\Catalog\Model\ProductTypes\ConfigInterface $typeConfig */ public function __construct( \Magento\Catalog\Model\Resource\Product\Indexer\Price $indexerPrice, @@ -131,7 +137,8 @@ public function __construct( \Magento\CatalogInventory\Helper\Data $catalogInventoryData, \Magento\CatalogInventory\Model\Stock\ItemFactory $stockItemFactory, \Magento\CatalogInventory\Model\StockFactory $stockFactory, - \Magento\CatalogInventory\Model\Stock\StatusFactory $stockStatusFactory + \Magento\CatalogInventory\Model\Stock\StatusFactory $stockStatusFactory, + \Magento\Catalog\Model\ProductTypes\ConfigInterface $typeConfig ) { $this->_indexerPrice = $indexerPrice; $this->_resourceIndexerStock = $resourceIndexerStock; @@ -143,6 +150,7 @@ public function __construct( $this->_stockItemFactory = $stockItemFactory; $this->_stockFactory = $stockFactory; $this->_stockStatusFactory = $stockStatusFactory; + $this->typeConfig = $typeConfig; } /** @@ -502,7 +510,7 @@ public function checkQuoteItemQty($observer) } /** - * When we work with subitem (as subproduct of bundle or configurable product) + * When we work with subitem (as subproduct of configurable product) */ if ($quoteItem->getParentItem()) { $rowQty = $quoteItem->getParentItem()->getQty() * $qty; @@ -526,8 +534,8 @@ public function checkQuoteItemQty($observer) $productTypeCustomOption = $quoteItem->getProduct()->getCustomOption('product_type'); if (!is_null($productTypeCustomOption)) { - // Check if product related to current item is a part of grouped product - if ($productTypeCustomOption->getValue() == \Magento\GroupedProduct\Model\Product\Type\Grouped::TYPE_CODE) { + // Check if product related to current item is a part of product that represents product set + if ($this->typeConfig->isProductSet($productTypeCustomOption->getValue())) { $stockItem->setProductName($quoteItem->getProduct()->getName()); $stockItem->setIsChildItem(true); } diff --git a/app/code/Magento/CatalogInventory/Model/System/Config/Backend/Minsaleqty.php b/app/code/Magento/CatalogInventory/Model/System/Config/Backend/Minsaleqty.php index e3833c5935795..a0341de77f4c1 100644 --- a/app/code/Magento/CatalogInventory/Model/System/Config/Backend/Minsaleqty.php +++ b/app/code/Magento/CatalogInventory/Model/System/Config/Backend/Minsaleqty.php @@ -43,7 +43,7 @@ class Minsaleqty extends \Magento\Core\Model\Config\Value * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Config $config + * @param \Magento\App\ConfigInterface $config * @param \Magento\CatalogInventory\Helper\Minsaleqty $catalogInventoryMinsaleqty * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection @@ -53,7 +53,7 @@ public function __construct( \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Config $config, + \Magento\App\ConfigInterface $config, \Magento\CatalogInventory\Helper\Minsaleqty $catalogInventoryMinsaleqty, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, diff --git a/app/code/Magento/CatalogInventory/etc/adminhtml/di.xml b/app/code/Magento/CatalogInventory/etc/adminhtml/di.xml index 05457026a73b2..58041a9577b75 100644 --- a/app/code/Magento/CatalogInventory/etc/adminhtml/di.xml +++ b/app/code/Magento/CatalogInventory/etc/adminhtml/di.xml @@ -27,9 +27,9 @@ - - Magento\CatalogInventory\Model\Product\CopyConstructor\CatalogInventory - + + Magento\CatalogInventory\Model\Product\CopyConstructor\CatalogInventory + diff --git a/app/code/Magento/CatalogInventory/etc/di.xml b/app/code/Magento/CatalogInventory/etc/di.xml index 6a94d3033bbe5..729b4eb1a342e 100644 --- a/app/code/Magento/CatalogInventory/etc/di.xml +++ b/app/code/Magento/CatalogInventory/etc/di.xml @@ -49,9 +49,9 @@ - - Magento\Eav\Model\Entity\Setup - + + Magento\Eav\Model\Entity\Setup + diff --git a/app/code/Magento/CatalogInventory/etc/module.xml b/app/code/Magento/CatalogInventory/etc/module.xml index 5442076b16fe3..8b2aa2d84f80b 100755 --- a/app/code/Magento/CatalogInventory/etc/module.xml +++ b/app/code/Magento/CatalogInventory/etc/module.xml @@ -30,10 +30,8 @@ - - diff --git a/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Widget/Chooser/Sku.php b/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Widget/Chooser/Sku.php index 5fbf375118c22..d8bf2b85a90b5 100644 --- a/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Widget/Chooser/Sku.php +++ b/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Widget/Chooser/Sku.php @@ -57,7 +57,6 @@ class Sku extends \Magento\Backend\Block\Widget\Grid\Extended /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Url $urlModel * @param \Magento\Backend\Helper\Data $backendHelper * @param \Magento\Catalog\Model\ProductFactory $catalogProduct * @param \Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory $eavAttSetCollection @@ -67,7 +66,6 @@ class Sku extends \Magento\Backend\Block\Widget\Grid\Extended */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Url $urlModel, \Magento\Backend\Helper\Data $backendHelper, \Magento\Catalog\Model\ProductFactory $catalogProduct, \Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory $eavAttSetCollection, @@ -79,7 +77,7 @@ public function __construct( $this->_cpCollection = $cpCollection; $this->_eavAttSetCollection = $eavAttSetCollection; $this->_catalogProduct = $catalogProduct; - parent::__construct($context, $urlModel, $backendHelper, $data); + parent::__construct($context, $backendHelper, $data); } protected function _construct() diff --git a/app/code/Magento/CatalogRule/etc/adminhtml/di.xml b/app/code/Magento/CatalogRule/etc/adminhtml/di.xml index e133447269398..a0dc1ca7fc560 100644 --- a/app/code/Magento/CatalogRule/etc/adminhtml/di.xml +++ b/app/code/Magento/CatalogRule/etc/adminhtml/di.xml @@ -26,9 +26,9 @@ - - block_html - + + block_html + diff --git a/app/code/Magento/CatalogRule/etc/di.xml b/app/code/Magento/CatalogRule/etc/di.xml index 92048a433502e..b31f71d7defe1 100644 --- a/app/code/Magento/CatalogRule/etc/di.xml +++ b/app/code/Magento/CatalogRule/etc/di.xml @@ -43,9 +43,9 @@ - - Magento\Core\Model\Resource\Setup\Generic - + + Magento\Core\Model\Resource\Setup\Generic + diff --git a/app/code/Magento/CatalogSearch/Block/Advanced/Result.php b/app/code/Magento/CatalogSearch/Block/Advanced/Result.php index 7a6dbe69672c6..d7039161ef6bf 100644 --- a/app/code/Magento/CatalogSearch/Block/Advanced/Result.php +++ b/app/code/Magento/CatalogSearch/Block/Advanced/Result.php @@ -24,21 +24,17 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\CatalogSearch\Block\Advanced; + /** * Advanced search result - * - * @category Magento - * @package Magento_CatalogSearch - * @author Magento Core Team */ -namespace Magento\CatalogSearch\Block\Advanced; - class Result extends \Magento\View\Element\Template { /** * Url factory * - * @var \Magento\Core\Model\UrlFactory + * @var \Magento\UrlFactory */ protected $_urlFactory; @@ -60,14 +56,14 @@ class Result extends \Magento\View\Element\Template * @param \Magento\View\Element\Template\Context $context * @param \Magento\CatalogSearch\Model\Advanced $catalogSearchAdvanced * @param \Magento\Catalog\Model\Layer $catalogLayer - * @param \Magento\Core\Model\UrlFactory $urlFactory + * @param \Magento\UrlFactory $urlFactory * @param array $data */ public function __construct( \Magento\View\Element\Template\Context $context, \Magento\CatalogSearch\Model\Advanced $catalogSearchAdvanced, \Magento\Catalog\Model\Layer $catalogLayer, - \Magento\Core\Model\UrlFactory $urlFactory, + \Magento\UrlFactory $urlFactory, array $data = array() ) { $this->_catalogSearchAdvanced = $catalogSearchAdvanced; @@ -78,46 +74,52 @@ public function __construct( protected function _prepareLayout() { - if ($breadcrumbs = $this->getLayout()->getBlock('breadcrumbs')) { + $breadcrumbs = $this->getLayout()->getBlock('breadcrumbs'); + if ($breadcrumbs) { $breadcrumbs->addCrumb('home', array( - 'label'=>__('Home'), - 'title'=>__('Go to Home Page'), - 'link' => $this->_storeManager->getStore()->getBaseUrl(), + 'label' => __('Home'), + 'title' => __('Go to Home Page'), + 'link' => $this->_storeManager->getStore()->getBaseUrl(), ))->addCrumb('search', array( - 'label'=>__('Catalog Advanced Search'), - 'link'=>$this->getUrl('*/*/') + 'label' => __('Catalog Advanced Search'), + 'link' => $this->getUrl('*/*/') ))->addCrumb('search_result', array( - 'label'=>__('Results') + 'label' => __('Results') )); } return parent::_prepareLayout(); } - public function setListOrders() { - $category = $this->_catalogLayer->getCurrentCategory(); + /** + * Set order options + */ + public function setListOrders() + { /* @var $category \Magento\Catalog\Model\Category */ + $category = $this->_catalogLayer->getCurrentCategory(); $availableOrders = $category->getAvailableSortByOptions(); unset($availableOrders['position']); - $this->getChildBlock('search_result_list') - ->setAvailableOrders($availableOrders); + $this->getChildBlock('search_result_list')->setAvailableOrders($availableOrders); } - public function setListModes() { - $this->getChildBlock('search_result_list') - ->setModes(array( - 'grid' => __('Grid'), - 'list' => __('List')) - ); + /** + * Set view mode options + */ + public function setListModes() + { + $this->getChildBlock('search_result_list')->setModes(array('grid' => __('Grid'), 'list' => __('List'))); } - public function setListCollection() { + public function setListCollection() + { $this->getChildBlock('search_result_list') ->setCollection($this->_getProductCollection()); } - protected function _getProductCollection(){ + protected function _getProductCollection() + { return $this->getSearchModel()->getProductCollection(); } diff --git a/app/code/Magento/CatalogSearch/Block/Result.php b/app/code/Magento/CatalogSearch/Block/Result.php index fd2296201885a..93505f0f14efb 100644 --- a/app/code/Magento/CatalogSearch/Block/Result.php +++ b/app/code/Magento/CatalogSearch/Block/Result.php @@ -24,16 +24,11 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\CatalogSearch\Block; /** * Product search result block - * - * @category Magento - * @package Magento_CatalogSearch - * @module Catalog */ -namespace Magento\CatalogSearch\Block; - class Result extends \Magento\View\Element\Template { /** @@ -41,21 +36,21 @@ class Result extends \Magento\View\Element\Template * * @var \Magento\CatalogSearch\Model\Resource\Fulltext\Collection */ - protected $_productCollection; + protected $productCollection; /** * Catalog search data * * @var \Magento\CatalogSearch\Helper\Data */ - protected $_catalogSearchData = null; + protected $catalogSearchData; /** * Catalog layer * * @var \Magento\Catalog\Model\Layer */ - protected $_catalogLayer; + protected $catalogLayer; /** * @param \Magento\View\Element\Template\Context $context @@ -69,8 +64,8 @@ public function __construct( \Magento\CatalogSearch\Helper\Data $catalogSearchData, array $data = array() ) { - $this->_catalogLayer = $catalogLayer; - $this->_catalogSearchData = $catalogSearchData; + $this->catalogLayer = $catalogLayer; + $this->catalogSearchData = $catalogSearchData; parent::__construct($context, $data); } @@ -81,7 +76,7 @@ public function __construct( */ protected function _getQuery() { - return $this->_catalogSearchData->getQuery(); + return $this->catalogSearchData->getQuery(); } /** @@ -91,11 +86,12 @@ protected function _getQuery() */ protected function _prepareLayout() { + $title = $this->getSearchQueryText(); + $this->getLayout()->getBlock('head')->setTitle($title); + // add Home breadcrumb $breadcrumbs = $this->getLayout()->getBlock('breadcrumbs'); if ($breadcrumbs) { - $title = __("Search results for: '%1'", $this->_catalogSearchData->getQueryText()); - $breadcrumbs->addCrumb('home', array( 'label' => __('Home'), 'title' => __('Go to Home Page'), @@ -106,10 +102,6 @@ protected function _prepareLayout() )); } - // modify page title - $title = __("Search results for: '%1'", $this->_catalogSearchData->getEscapedQueryText()); - $this->getLayout()->getBlock('head')->setTitle($title); - return parent::_prepareLayout(); } @@ -140,7 +132,7 @@ public function getListBlock() */ public function setListOrders() { - $category = $this->_catalogLayer->getCurrentCategory(); + $category = $this->catalogLayer->getCurrentCategory(); /* @var $category \Magento\Catalog\Model\Category */ $availableOrders = $category->getAvailableSortByOptions(); unset($availableOrders['position']); @@ -163,11 +155,8 @@ public function setListOrders() */ public function setListModes() { - $this->getListBlock() - ->setModes(array( - 'grid' => __('Grid'), - 'list' => __('List')) - ); + $test = $this->getListBlock(); + $test->setModes(array('grid' => __('Grid'), 'list' => __('List'))); return $this; } @@ -200,11 +189,21 @@ public function getProductListHtml() */ protected function _getProductCollection() { - if (is_null($this->_productCollection)) { - $this->_productCollection = $this->getListBlock()->getLoadedProductCollection(); + if (null === $this->productCollection) { + $this->productCollection = $this->getListBlock()->getLoadedProductCollection(); } - return $this->_productCollection; + return $this->productCollection; + } + + /** + * Get search query text + * + * @return string + */ + public function getSearchQueryText() + { + return __("Search results for: '%1'", $this->catalogSearchData->getEscapedQueryText()); } /** @@ -229,7 +228,7 @@ public function getResultCount() */ public function getNoResultText() { - if ($this->_catalogSearchData->isMinQueryLength()) { + if ($this->catalogSearchData->isMinQueryLength()) { return __('Minimum Search query length is %1', $this->_getQuery()->getMinQueryLength()); } return $this->_getData('no_result_text'); @@ -242,6 +241,6 @@ public function getNoResultText() */ public function getNoteMessages() { - return $this->_catalogSearchData->getNoteMessages(); + return $this->catalogSearchData->getNoteMessages(); } } diff --git a/app/code/Magento/CatalogSearch/Block/Term.php b/app/code/Magento/CatalogSearch/Block/Term.php index ac6b58702a47e..ffeea84a9c9d9 100644 --- a/app/code/Magento/CatalogSearch/Block/Term.php +++ b/app/code/Magento/CatalogSearch/Block/Term.php @@ -42,7 +42,7 @@ class Term extends \Magento\View\Element\Template /** * Url factory * - * @var \Magento\Core\Model\UrlFactory + * @var \Magento\UrlFactory */ protected $_urlFactory; @@ -56,13 +56,13 @@ class Term extends \Magento\View\Element\Template /** * @param \Magento\View\Element\Template\Context $context * @param \Magento\CatalogSearch\Model\Resource\Query\CollectionFactory $queryCollectionFactory - * @param \Magento\Core\Model\UrlFactory $urlFactory + * @param \Magento\UrlFactory $urlFactory * @param array $data */ public function __construct( \Magento\View\Element\Template\Context $context, \Magento\CatalogSearch\Model\Resource\Query\CollectionFactory $queryCollectionFactory, - \Magento\Core\Model\UrlFactory $urlFactory, + \Magento\UrlFactory $urlFactory, array $data = array() ) { $this->_queryCollectionFactory = $queryCollectionFactory; @@ -119,7 +119,7 @@ public function getTerms() public function getSearchUrl($obj) { - /** @var $url \Magento\Core\Model\Url */ + /** @var $url \Magento\UrlInterface */ $url = $this->_urlFactory->create(); /* * url encoding will be done in Url.php http_build_query diff --git a/app/code/Magento/CatalogSearch/Controller/Advanced.php b/app/code/Magento/CatalogSearch/Controller/Advanced.php index fbc639a094c26..fa435a9da5ee9 100644 --- a/app/code/Magento/CatalogSearch/Controller/Advanced.php +++ b/app/code/Magento/CatalogSearch/Controller/Advanced.php @@ -39,7 +39,7 @@ class Advanced extends \Magento\App\Action\Action /** * Url factory * - * @var \Magento\Core\Model\UrlFactory + * @var \Magento\UrlFactory */ protected $_urlFactory; @@ -63,13 +63,13 @@ class Advanced extends \Magento\App\Action\Action * @param \Magento\App\Action\Context $context * @param \Magento\Session\Generic $catalogSearchSession * @param \Magento\CatalogSearch\Model\Advanced $catalogSearchAdvanced - * @param \Magento\Core\Model\UrlFactory $urlFactory + * @param \Magento\UrlFactory $urlFactory */ public function __construct( \Magento\App\Action\Context $context, \Magento\Session\Generic $catalogSearchSession, \Magento\CatalogSearch\Model\Advanced $catalogSearchAdvanced, - \Magento\Core\Model\UrlFactory $urlFactory + \Magento\UrlFactory $urlFactory ) { $this->_catalogSearchSession = $catalogSearchSession; $this->_catalogSearchAdvanced = $catalogSearchAdvanced; diff --git a/app/code/Magento/CatalogSearch/Controller/Result.php b/app/code/Magento/CatalogSearch/Controller/Result.php index d42fe07389ede..6b2060e430603 100644 --- a/app/code/Magento/CatalogSearch/Controller/Result.php +++ b/app/code/Magento/CatalogSearch/Controller/Result.php @@ -24,14 +24,13 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\CatalogSearch\Controller; + /** * Catalog Search Controller */ -namespace Magento\CatalogSearch\Controller; - class Result extends \Magento\App\Action\Action { - /** * Catalog session * @@ -59,22 +58,13 @@ public function __construct( parent::__construct($context); } - /** - * Retrieve catalog session - * - * @return \Magento\Catalog\Model\Session - */ - protected function _getSession() - { - return $this->_catalogSession; - } /** * Display search result */ public function indexAction() { - $query = $this->_objectManager->get('Magento\CatalogSearch\Helper\Data')->getQuery(); /* @var $query \Magento\CatalogSearch\Model\Query */ + $query = $this->_objectManager->get('Magento\CatalogSearch\Helper\Data')->getQuery(); $query->setStoreId($this->_storeManager->getStore()->getId()); @@ -85,7 +75,7 @@ public function indexAction() ->setIsProcessed(1); } else { if ($query->getId()) { - $query->setPopularity($query->getPopularity()+1); + $query->setPopularity($query->getPopularity() + 1); } else { $query->setPopularity(1); } diff --git a/app/code/Magento/CatalogSearch/Model/Config/Backend/Search/Type.php b/app/code/Magento/CatalogSearch/Model/Config/Backend/Search/Type.php index 886b53c3771a7..c08d806eefcaa 100644 --- a/app/code/Magento/CatalogSearch/Model/Config/Backend/Search/Type.php +++ b/app/code/Magento/CatalogSearch/Model/Config/Backend/Search/Type.php @@ -47,7 +47,7 @@ class Type extends \Magento\Core\Model\Config\Value * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Config $config + * @param \Magento\App\ConfigInterface $config * @param \Magento\CatalogSearch\Model\Fulltext $catalogSearchFulltext * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection @@ -57,7 +57,7 @@ public function __construct( \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Config $config, + \Magento\App\ConfigInterface $config, \Magento\CatalogSearch\Model\Fulltext $catalogSearchFulltext, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, diff --git a/app/code/Magento/CatalogSearch/Model/Fulltext/Observer.php b/app/code/Magento/CatalogSearch/Model/Fulltext/Observer.php index 0ced2c08a5df5..e8e4c0ca8a75a 100644 --- a/app/code/Magento/CatalogSearch/Model/Fulltext/Observer.php +++ b/app/code/Magento/CatalogSearch/Model/Fulltext/Observer.php @@ -59,7 +59,7 @@ class Observer /** * Backend url * - * @var \Magento\Backend\Model\Url + * @var \Magento\Backend\Model\UrlInterface */ protected $_backendUrl; @@ -79,7 +79,7 @@ class Observer * Construct * * @param \Magento\Backend\Model\Session $backendSession - * @param \Magento\Backend\Model\Url $backendUrl + * @param \Magento\Backend\Model\UrlInterface $backendUrl * @param \Magento\Eav\Model\Config $eavConfig * @param \Magento\CatalogSearch\Model\Fulltext $catalogSearchFulltext * @param \Magento\Core\Model\StoreManagerInterface $storeManager @@ -87,7 +87,7 @@ class Observer */ public function __construct( \Magento\Backend\Model\Session $backendSession, - \Magento\Backend\Model\Url $backendUrl, + \Magento\Backend\Model\UrlInterface $backendUrl, \Magento\Eav\Model\Config $eavConfig, \Magento\CatalogSearch\Model\Fulltext $catalogSearchFulltext, \Magento\Core\Model\StoreManagerInterface $storeManager, diff --git a/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext.php b/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext.php index a66df2fdf403d..ceca16d9d7b30 100644 --- a/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext.php +++ b/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext.php @@ -145,7 +145,7 @@ protected function _getResource() \Magento\Core\Model\Store\Group::ENTITY => array( \Magento\Index\Model\Event::TYPE_SAVE ), - \Magento\Core\Model\Config\Value::ENTITY => array( + \Magento\App\Config\ValueInterface::ENTITY => array( \Magento\Index\Model\Event::TYPE_SAVE ), \Magento\Catalog\Model\Category::ENTITY => array( @@ -241,7 +241,7 @@ public function matchEvent(\Magento\Index\Model\Event $event) } else { $result = false; } - } else if ($entity == \Magento\Core\Model\Config\Value::ENTITY) { + } else if ($entity == \Magento\App\Config\ValueInterface::ENTITY) { $data = $event->getDataObject(); if ($data && in_array($data->getPath(), $this->_relatedConfigSettings)) { $result = $data->isValueChanged(); @@ -270,7 +270,7 @@ protected function _registerEvent(\Magento\Index\Model\Event $event) $this->_registerCatalogProductEvent($event); break; - case \Magento\Core\Model\Config\Value::ENTITY: + case \Magento\App\Config\ValueInterface::ENTITY: case \Magento\Core\Model\Store::ENTITY: case \Magento\Catalog\Model\Resource\Eav\Attribute::ENTITY: case \Magento\Core\Model\Store\Group::ENTITY: diff --git a/app/code/Magento/CatalogSearch/Model/Resource/Fulltext.php b/app/code/Magento/CatalogSearch/Model/Resource/Fulltext.php index d78e8c89482a1..d923b0060f7eb 100644 --- a/app/code/Magento/CatalogSearch/Model/Resource/Fulltext.php +++ b/app/code/Magento/CatalogSearch/Model/Resource/Fulltext.php @@ -750,14 +750,12 @@ protected function _prepareProductIndex($indexData, $productData, $storeId) if (isset($productData[$attributeCode])) { $value = $this->_getAttributeValue($attribute->getId(), $productData[$attributeCode], $storeId); if ($value) { - //For grouped products if (isset($index[$attributeCode])) { if (!is_array($index[$attributeCode])) { $index[$attributeCode] = array($index[$attributeCode]); } $index[$attributeCode][] = $value; } else { - //For other types of products $index[$attributeCode] = $value; } } diff --git a/app/code/Magento/CatalogSearch/view/frontend/result.phtml b/app/code/Magento/CatalogSearch/view/frontend/result.phtml index c5ad2b2798e48..35e603d962123 100644 --- a/app/code/Magento/CatalogSearch/view/frontend/result.phtml +++ b/app/code/Magento/CatalogSearch/view/frontend/result.phtml @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -getResultCount()): ?> +getResultCount()): ?> getChildHtml('tagged_product_list_rss_link'); ?>