diff --git a/CHANGELOG.md b/CHANGELOG.md index d601a36f590673902bee6c20349e61ab359012a9..974e9df22c295761050dc62de5b6feda5184f400 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,25 @@ +2.0.0.0-dev53 +============= +* Moved general action-related functionality to \Magento\App\Action\Action in the library. Removed Magento\Core\Controller\Varien\Action and related logic from the Magento_Core module +* Moved view-related methods from action interface to \Magento\App\ViewInterface with corresponding implementation +* Moved redirect creation logic from the action interface to \Magento\App\Response\RedirectInterface +* Moved Magento\Core common blocks to the library +* Added reading of etc/integration/config.xml and etc/integration/api.xml files for API Integrations +* Various improvements: + * Email-related logic from the Core and Adminhtml modules consolidated in the new Email module +* GitHub requests: + * [#238](https://github.com/magento/magento2/pull/238) -- Improve escaping HTML entities in URL + * [#199](https://github.com/magento/magento2/pull/199) -- Replaced function calls to array_push with adding the elements directly + * [#182](https://github.com/magento/magento2/pull/182) -- By default use collection _idFieldName for toOption* methods. + * [#233](https://github.com/magento/magento2/pull/233) -- Google Rich Snippet Code + * [#339](https://github.com/magento/magento2/pull/339) -- Correcting 'cahce' typo in documentation. + * [#232](https://github.com/magento/magento2/pull/232) -- Update app/code/core/Mage/Checkout/controllers/CartController.php (fix issue #27632) +* Fixed bugs: + * Fixed JavaScript error when printing orders from the frontend + * Fixed Captcha problems on various forms when Captcha is enabled on the frontend + * Fixed "Page not found" on category page if setting "Add Store Code to Urls" to "Yes" in the backend config + * Fixed Fatal error when creating shipping label for returns + 2.0.0.0-dev52 ============= * Better Navigation menu rendering due to improved Caching of Categories @@ -53,7 +75,7 @@ * Moved the String Helper to the Magento\Filter, Magento\Stdlib\String, Magento\Stdlib\ArrayUtils libraries * Moved the Data Helper to the Magento\Math, Magento\Filter, Magento\Convert, Magento\Encryption, Magento\Filesystem libraries and to Magento\Customer\Helper\Data libraries * Moved the Http Magento Helper to the Magento\HTTP library - * The Hint Magento Helper, Http Magento Helper helpers were removed from the Magento\Core module + * The Hint Magento Helper, Http Magento Helper helpers were removed from the Magento\Core module * Implemented SOAP faults declaration in WSDL * Web API config reader was refactored to use Magento\Config\Reader\Filesystem * Created integrations module. Added 'Integrations Grid' and 'New/Edit' Integration pages in the admin diff --git a/app/code/Magento/AdminNotification/Block/Grid/Renderer/Actions.php b/app/code/Magento/AdminNotification/Block/Grid/Renderer/Actions.php index 29c4a227b791679744363ced4731276dc1ee2f9f..44e74e36cdeed8f17ef74ec8b23edbc4933c86d5 100644 --- a/app/code/Magento/AdminNotification/Block/Grid/Renderer/Actions.php +++ b/app/code/Magento/AdminNotification/Block/Grid/Renderer/Actions.php @@ -53,7 +53,7 @@ class Actions $this->getUrl('*/*/remove/', array( '_current'=>true, 'id' => $row->getId(), - \Magento\Core\Controller\Front\Action::PARAM_NAME_URL_ENCODED => $encodedUrl) + \Magento\App\Action\Action::PARAM_NAME_URL_ENCODED => $encodedUrl) ), __('Are you sure?'), __('Remove') diff --git a/app/code/Magento/AdminNotification/Block/System/Messages.php b/app/code/Magento/AdminNotification/Block/System/Messages.php index af0ab84636270aceab4e2e1aab5a09294541b1a2..ce984ccf278201222a5f1710a8de8610504147b3 100644 --- a/app/code/Magento/AdminNotification/Block/System/Messages.php +++ b/app/code/Magento/AdminNotification/Block/System/Messages.php @@ -32,19 +32,19 @@ class Messages extends \Magento\Backend\Block\Template */ protected $_messages; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\AdminNotification\Model\Resource\System\Message\Collection\Synchronized $messages - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\AdminNotification\Model\Resource\System\Message\Collection\Synchronized $messages + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\AdminNotification\Model\Resource\System\Message\Collection\Synchronized $messages, - array $data = array() - ) { - parent::__construct($coreData, $context, $data); + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\AdminNotification\Model\Resource\System\Message\Collection\Synchronized $messages, + array $data = array() + ) { + parent::__construct($context, $coreData, $data); $this->_messages = $messages; } diff --git a/app/code/Magento/AdminNotification/Block/System/Messages/UnreadMessagePopup.php b/app/code/Magento/AdminNotification/Block/System/Messages/UnreadMessagePopup.php index 2c509af6e2de54a057f0bf81141264fc56032c25..95635f6103cddd7880b2473eeaec10b88c1f789c 100644 --- a/app/code/Magento/AdminNotification/Block/System/Messages/UnreadMessagePopup.php +++ b/app/code/Magento/AdminNotification/Block/System/Messages/UnreadMessagePopup.php @@ -42,19 +42,19 @@ class UnreadMessagePopup extends \Magento\Backend\Block\Template */ protected $_messages; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\AdminNotification\Model\Resource\System\Message\Collection\Synchronized $messages - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\AdminNotification\Model\Resource\System\Message\Collection\Synchronized $messages + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\AdminNotification\Model\Resource\System\Message\Collection\Synchronized $messages, - array $data = array() - ) { - parent::__construct($coreData, $context, $data); + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\AdminNotification\Model\Resource\System\Message\Collection\Synchronized $messages, + array $data = array() + ) { + parent::__construct($context, $coreData, $data); $this->_messages = $messages; } diff --git a/app/code/Magento/AdminNotification/Block/ToolbarEntry.php b/app/code/Magento/AdminNotification/Block/ToolbarEntry.php index 9df8fec4cc45a97b57dd5baa71d1ff9bdc705c01..3ad43a591176a1e16e7ca071c1927644239b557b 100644 --- a/app/code/Magento/AdminNotification/Block/ToolbarEntry.php +++ b/app/code/Magento/AdminNotification/Block/ToolbarEntry.php @@ -42,19 +42,19 @@ class ToolbarEntry extends \Magento\Backend\Block\Template */ protected $_notificationList; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\AdminNotification\Model\Resource\Inbox\Collection\Unread $notificationList - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\AdminNotification\Model\Resource\Inbox\Collection\Unread $notificationList + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\AdminNotification\Model\Resource\Inbox\Collection\Unread $notificationList, - array $data = array() - ) { - parent::__construct($coreData, $context, $data); + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\AdminNotification\Model\Resource\Inbox\Collection\Unread $notificationList, + array $data = array() + ) { + parent::__construct($context, $coreData, $data); $this->_notificationList = $notificationList; } diff --git a/app/code/Magento/AdminNotification/Block/Window.php b/app/code/Magento/AdminNotification/Block/Window.php index 5f2ee757ddf4277ce0e8906daa99729ddd9c5bb8..a2116a9fb027f41231c1bc15959a14c48d6a58c5 100644 --- a/app/code/Magento/AdminNotification/Block/Window.php +++ b/app/code/Magento/AdminNotification/Block/Window.php @@ -60,21 +60,21 @@ class Window extends \Magento\Backend\Block\Template */ protected $_latestItem; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Backend\Model\Auth\Session $authSession - * @param \Magento\AdminNotification\Model\Resource\Inbox\Collection\Critical $criticalCollection - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Backend\Model\Auth\Session $authSession + * @param \Magento\AdminNotification\Model\Resource\Inbox\Collection\Critical $criticalCollection + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Backend\Model\Auth\Session $authSession, - \Magento\AdminNotification\Model\Resource\Inbox\Collection\Critical $criticalCollection, - array $data = array() - ) { - parent::__construct($coreData, $context, $data); + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Backend\Model\Auth\Session $authSession, + \Magento\AdminNotification\Model\Resource\Inbox\Collection\Critical $criticalCollection, + array $data = array() + ) { + parent::__construct($context, $coreData, $data); $this->_authSession = $authSession; $this->_criticalCollection = $criticalCollection; } diff --git a/app/code/Magento/AdminNotification/Controller/Adminhtml/Notification.php b/app/code/Magento/AdminNotification/Controller/Adminhtml/Notification.php index dc3c1078de4a26bd06e523e36bfdc3538e449765..e79c4a49bd58bc3bc16bd692b9415a8f5bfae71a 100644 --- a/app/code/Magento/AdminNotification/Controller/Adminhtml/Notification.php +++ b/app/code/Magento/AdminNotification/Controller/Adminhtml/Notification.php @@ -27,18 +27,19 @@ */ namespace Magento\AdminNotification\Controller\Adminhtml; -class Notification extends \Magento\Backend\Controller\AbstractAction +class Notification extends \Magento\Backend\App\AbstractAction { public function indexAction() { - $this->_title(__('Notifications')); + $this->_title->add(__('Notifications')); - $this->loadLayout() - ->_setActiveMenu('Magento_AdminNotification::system_adminnotification') + $this->_view->loadLayout(); + $this->_setActiveMenu('Magento_AdminNotification::system_adminnotification') ->_addBreadcrumb( __('Messages Inbox'), __('Messages Inbox') - )->renderLayout(); + ); + $this->_view->renderLayout(); } public function markAsReadAction() @@ -59,7 +60,7 @@ class Notification extends \Magento\Backend\Controller\AbstractAction ); } - $this->_redirectReferer(); + $this->getResponse()->setRedirect($this->_redirect->getRedirectUrl($this->getUrl('*'))); return; } $this->_redirect('adminhtml/*/'); @@ -174,7 +175,7 @@ class Notification extends \Magento\Backend\Controller\AbstractAction __("We couldn't remove the messages because of an error.")); } } - $this->_redirectReferer(); + $this->getResponse()->setRedirect($this->_redirect->getRedirectUrl($this->getUrl('*'))); } protected function _isAllowed() diff --git a/app/code/Magento/AdminNotification/Controller/Adminhtml/Survey.php b/app/code/Magento/AdminNotification/Controller/Adminhtml/Survey.php index f8d688ac8737076fcd84765062378f90c630faab..d66c585ef138e2d10c8516aed3e4731404ca0cd2 100644 --- a/app/code/Magento/AdminNotification/Controller/Adminhtml/Survey.php +++ b/app/code/Magento/AdminNotification/Controller/Adminhtml/Survey.php @@ -34,7 +34,7 @@ */ namespace Magento\AdminNotification\Controller\Adminhtml; -class Survey extends \Magento\Backend\Controller\Adminhtml\Action +class Survey extends \Magento\Backend\App\Action { /** * Index Action diff --git a/app/code/Magento/AdminNotification/Controller/Adminhtml/System/Message.php b/app/code/Magento/AdminNotification/Controller/Adminhtml/System/Message.php index 17e26203ef0ac80e569698d9906e2e331ea6902e..49532c93c820f27b21f4aa54474e96802a27e8f7 100644 --- a/app/code/Magento/AdminNotification/Controller/Adminhtml/System/Message.php +++ b/app/code/Magento/AdminNotification/Controller/Adminhtml/System/Message.php @@ -24,7 +24,7 @@ namespace Magento\AdminNotification\Controller\Adminhtml\System; -class Message extends \Magento\Backend\Controller\AbstractAction +class Message extends \Magento\Backend\App\AbstractAction { public function listAction() { diff --git a/app/code/Magento/AdminNotification/Helper/Data.php b/app/code/Magento/AdminNotification/Helper/Data.php index 24b0512350b5c3734b3b731cbef9b4d282de33f1..f117a74a51258822331fc9414f0eda9462e45201 100644 --- a/app/code/Magento/AdminNotification/Helper/Data.php +++ b/app/code/Magento/AdminNotification/Helper/Data.php @@ -34,7 +34,7 @@ */ namespace Magento\AdminNotification\Helper; -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { const XML_PATH_POPUP_URL = 'system/adminnotification/popup_url'; @@ -77,7 +77,7 @@ class Data extends \Magento\Core\Helper\AbstractHelper protected $_inboxFactory; public function __construct( - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Core\Model\Store\Config $coreStoreConfig, \Magento\AdminNotification\Model\InboxFactory $inboxFactory ) { diff --git a/app/code/Magento/AdminNotification/Model/Feed.php b/app/code/Magento/AdminNotification/Model/Feed.php index a0f94bf5ec8d55c694b555881220896286c27e3d..4477bb68e9db713305694effa4110547044c0366 100644 --- a/app/code/Magento/AdminNotification/Model/Feed.php +++ b/app/code/Magento/AdminNotification/Model/Feed.php @@ -58,17 +58,11 @@ class Feed extends \Magento\Core\Model\AbstractModel */ protected $_inboxFactory; - /** - * @var \Magento\App\CacheInterface - */ - protected $_cache; - /** * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry * @param \Magento\Core\Model\Store\Config $coreStoreConfig * @param \Magento\AdminNotification\Model\InboxFactory $inboxFactory - * @param \Magento\App\CacheInterface $cache * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection * @param array $data @@ -78,7 +72,6 @@ class Feed extends \Magento\Core\Model\AbstractModel \Magento\Core\Model\Registry $registry, \Magento\Core\Model\Store\Config $coreStoreConfig, \Magento\AdminNotification\Model\InboxFactory $inboxFactory, - \Magento\App\CacheInterface $cache, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, array $data = array() @@ -86,7 +79,6 @@ class Feed extends \Magento\Core\Model\AbstractModel parent::__construct($context, $registry, $resource, $resourceCollection, $data); $this->_coreStoreConfig = $coreStoreConfig; $this->_inboxFactory = $inboxFactory; - $this->_cache = $cache; } /** @@ -94,7 +86,9 @@ class Feed extends \Magento\Core\Model\AbstractModel * */ protected function _construct() - {} + { + + } /** * Retrieve feed url @@ -174,7 +168,7 @@ class Feed extends \Magento\Core\Model\AbstractModel */ public function getLastUpdate() { - return $this->_cache->load('admin_notifications_lastcheck'); + return $this->_cacheManager->load('admin_notifications_lastcheck'); } /** @@ -184,7 +178,7 @@ class Feed extends \Magento\Core\Model\AbstractModel */ public function setLastUpdate() { - $this->_cache->save(time(), 'admin_notifications_lastcheck'); + $this->_cacheManager->save(time(), 'admin_notifications_lastcheck'); return $this; } diff --git a/app/code/Magento/Adminhtml/Block/Backup/Dialogs.php b/app/code/Magento/Adminhtml/Block/Backup/Dialogs.php index 673f91627b6bbd947e710c935e71826326531e4c..fc3499afd7885b40e80a3a345d3bb9f697407fde 100644 --- a/app/code/Magento/Adminhtml/Block/Backup/Dialogs.php +++ b/app/code/Magento/Adminhtml/Block/Backup/Dialogs.php @@ -45,7 +45,7 @@ class Dialogs extends \Magento\Adminhtml\Block\Template /** * Include backup.js file in page before rendering * - * @see \Magento\Core\Block\AbstractBlock::_prepareLayout() + * @see \Magento\View\Block\AbstractBlock::_prepareLayout() */ protected function _prepareLayout() { diff --git a/app/code/Magento/Adminhtml/Block/Denied.php b/app/code/Magento/Adminhtml/Block/Denied.php index d9c6b272f616a9c2eaef4bfbf956db102221bb78..96c0fa78b55a9801e81386f56713fdfed40fc602 100644 --- a/app/code/Magento/Adminhtml/Block/Denied.php +++ b/app/code/Magento/Adminhtml/Block/Denied.php @@ -33,20 +33,20 @@ class Denied extends \Magento\Adminhtml\Block\Template */ protected $_authSession; - /** - * @param \Magento\Backend\Model\Auth\Session $authSession - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Backend\Model\Auth\Session $authSession + * @param array $data */ - public function __construct( - \Magento\Backend\Model\Auth\Session $authSession, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Backend\Model\Auth\Session $authSession, + array $data = array() + ) { $this->_authSession = $authSession; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } public function hasAvailableResources() diff --git a/app/code/Magento/Adminhtml/Block/Html/Date.php b/app/code/Magento/Adminhtml/Block/Html/Date.php index 3d67e24be1ec6d91890c01efc4c5bf8c34f7b9b3..b66f44d120cbd81d791292cf7f17c314b9f87838 100644 --- a/app/code/Magento/Adminhtml/Block/Html/Date.php +++ b/app/code/Magento/Adminhtml/Block/Html/Date.php @@ -33,6 +33,6 @@ */ namespace Magento\Adminhtml\Block\Html; -class Date extends \Magento\Core\Block\Html\Date +class Date extends \Magento\View\Block\Html\Date { } diff --git a/app/code/Magento/Adminhtml/Block/Html/Select.php b/app/code/Magento/Adminhtml/Block/Html/Select.php index d3387a83f1c28b0e2fdc2e593dfcbc622f84a69b..ace827710884f29393db026f1af33d2a74551472 100644 --- a/app/code/Magento/Adminhtml/Block/Html/Select.php +++ b/app/code/Magento/Adminhtml/Block/Html/Select.php @@ -33,6 +33,6 @@ */ namespace Magento\Adminhtml\Block\Html; -class Select extends \Magento\Core\Block\Html\Select +class Select extends \Magento\View\Block\Html\Select { } diff --git a/app/code/Magento/Adminhtml/Block/Media/Uploader.php b/app/code/Magento/Adminhtml/Block/Media/Uploader.php index e2b72f17e51fb8ae71eca5d99cbd8aa7165f3dfa..0cb0c9c6973d07e0ba1338bd657a0c63c36b39a9 100644 --- a/app/code/Magento/Adminhtml/Block/Media/Uploader.php +++ b/app/code/Magento/Adminhtml/Block/Media/Uploader.php @@ -41,33 +41,25 @@ class Uploader extends \Magento\Adminhtml\Block\Widget */ protected $_template = 'Magento_Adminhtml::media/uploader.phtml'; - /** - * @var \Magento\View\Url - */ - protected $_viewUrl; - /** * @var \Magento\File\Size */ protected $_fileSizeService; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\View\Url $viewUrl - * @param \Magento\File\Size $fileSize - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\File\Size $fileSize + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\View\Url $viewUrl, - \Magento\File\Size $fileSize, - array $data = array() - ) { - $this->_viewUrl = $viewUrl; + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\File\Size $fileSize, + array $data = array() + ) { $this->_fileSizeService = $fileSize; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _construct() diff --git a/app/code/Magento/Adminhtml/Block/Messages.php b/app/code/Magento/Adminhtml/Block/Messages.php index e17a7284a32eea29b5f7f7a82d76de2cbe9cf041..93896f840b8b75a01df92c62023101284dd2d0a9 100644 --- a/app/code/Magento/Adminhtml/Block/Messages.php +++ b/app/code/Magento/Adminhtml/Block/Messages.php @@ -34,6 +34,6 @@ */ namespace Magento\Adminhtml\Block; -class Messages extends \Magento\Core\Block\Messages +class Messages extends \Magento\View\Block\Messages { } diff --git a/app/code/Magento/Adminhtml/Block/Newsletter/Problem.php b/app/code/Magento/Adminhtml/Block/Newsletter/Problem.php index c139adb9e5b50aaed12f921ecaa15caeb947e213..7a9af30931af38547fcb49f59c296c467137052d 100644 --- a/app/code/Magento/Adminhtml/Block/Newsletter/Problem.php +++ b/app/code/Magento/Adminhtml/Block/Newsletter/Problem.php @@ -43,20 +43,20 @@ class Problem extends \Magento\Adminhtml\Block\Template */ protected $_problemCollection; - /** - * @param \Magento\Newsletter\Model\Resource\Problem\Collection $problemCollection - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Newsletter\Model\Resource\Problem\Collection $problemCollection + * @param array $data */ - public function __construct( - \Magento\Newsletter\Model\Resource\Problem\Collection $problemCollection, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Newsletter\Model\Resource\Problem\Collection $problemCollection, + array $data = array() + ) { $this->_problemCollection = $problemCollection; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _construct() diff --git a/app/code/Magento/Adminhtml/Block/Newsletter/Queue/Edit.php b/app/code/Magento/Adminhtml/Block/Newsletter/Queue/Edit.php index ffcd6e1866a8f5cd9b20ee31e49002c20e0b4fee..7dac9990abcdf3b92e9d2f97beded54ae6cb8abd 100644 --- a/app/code/Magento/Adminhtml/Block/Newsletter/Queue/Edit.php +++ b/app/code/Magento/Adminhtml/Block/Newsletter/Queue/Edit.php @@ -45,23 +45,23 @@ class Edit extends \Magento\Adminhtml\Block\Template */ protected $_wysiwygConfig; - /** - * @param \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; $this->_wysiwygConfig = $wysiwygConfig; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _construct() diff --git a/app/code/Magento/Adminhtml/Block/Newsletter/Queue/Edit/Form.php b/app/code/Magento/Adminhtml/Block/Newsletter/Queue/Edit/Form.php index 40ce922592ad148ec4a2e7cb7e68ed6160dc5881..58a32c934080231564f4d4bea776f7d25f9a9607 100644 --- a/app/code/Magento/Adminhtml/Block/Newsletter/Queue/Edit/Form.php +++ b/app/code/Magento/Adminhtml/Block/Newsletter/Queue/Edit/Form.php @@ -51,30 +51,30 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic */ protected $_queueFactory; - /** - * @param \Magento\Newsletter\Model\QueueFactory $queueFactory - * @param \Magento\Core\Model\System\Store $systemStore - * @param \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Newsletter\Model\QueueFactory $queueFactory + * @param \Magento\Core\Model\System\Store $systemStore + * @param \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig + * @param array $data */ - public function __construct( - \Magento\Newsletter\Model\QueueFactory $queueFactory, - \Magento\Core\Model\System\Store $systemStore, - \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Newsletter\Model\QueueFactory $queueFactory, + \Magento\Core\Model\System\Store $systemStore, + \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig, + array $data = array() + ) { $this->_wysiwygConfig = $wysiwygConfig; $this->_systemStore = $systemStore; $this->_queueFactory = $queueFactory; - parent::__construct($registry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); } /** diff --git a/app/code/Magento/Adminhtml/Block/Newsletter/Queue/Preview.php b/app/code/Magento/Adminhtml/Block/Newsletter/Queue/Preview.php index 406e1e218fd4897d2e699e24f092cff1a47578b7..e42e83e22f2b0f5e18a95975b828f3cdadeedb1c 100644 --- a/app/code/Magento/Adminhtml/Block/Newsletter/Queue/Preview.php +++ b/app/code/Magento/Adminhtml/Block/Newsletter/Queue/Preview.php @@ -50,26 +50,26 @@ class Preview extends \Magento\Adminhtml\Block\Widget */ protected $_subscriberFactory; - /** - * @param \Magento\Newsletter\Model\TemplateFactory $templateFactory - * @param \Magento\Newsletter\Model\QueueFactory $queueFactory - * @param \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Newsletter\Model\TemplateFactory $templateFactory + * @param \Magento\Newsletter\Model\QueueFactory $queueFactory + * @param \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory + * @param array $data */ - public function __construct( - \Magento\Newsletter\Model\TemplateFactory $templateFactory, - \Magento\Newsletter\Model\QueueFactory $queueFactory, - \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Newsletter\Model\TemplateFactory $templateFactory, + \Magento\Newsletter\Model\QueueFactory $queueFactory, + \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory, + array $data = array() + ) { $this->_templateFactory = $templateFactory; $this->_queueFactory = $queueFactory; $this->_subscriberFactory = $subscriberFactory; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _toHtml() diff --git a/app/code/Magento/Adminhtml/Block/Newsletter/Subscriber.php b/app/code/Magento/Adminhtml/Block/Newsletter/Subscriber.php index f13d5c91f220a0770a7de8f54e2be7ffe39e13e6..77983dbce8d05f3f42d2136b95ddfc6a122ea957 100644 --- a/app/code/Magento/Adminhtml/Block/Newsletter/Subscriber.php +++ b/app/code/Magento/Adminhtml/Block/Newsletter/Subscriber.php @@ -50,20 +50,20 @@ class Subscriber extends \Magento\Adminhtml\Block\Template */ protected $_collectionFactory; - /** - * @param \Magento\Newsletter\Model\Resource\Queue\CollectionFactory $collectionFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Newsletter\Model\Resource\Queue\CollectionFactory $collectionFactory + * @param array $data */ - public function __construct( - \Magento\Newsletter\Model\Resource\Queue\CollectionFactory $collectionFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Newsletter\Model\Resource\Queue\CollectionFactory $collectionFactory, + array $data = array() + ) { $this->_collectionFactory = $collectionFactory; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Adminhtml/Block/Newsletter/Subscriber/Grid.php b/app/code/Magento/Adminhtml/Block/Newsletter/Subscriber/Grid.php index 196316360e444794847ad55b09fb68f81e174a0a..58d5307b946a5fcdfc8eec5176904a724c5913c7 100644 --- a/app/code/Magento/Adminhtml/Block/Newsletter/Subscriber/Grid.php +++ b/app/code/Magento/Adminhtml/Block/Newsletter/Subscriber/Grid.php @@ -40,24 +40,22 @@ class Grid extends \Magento\Backend\Block\Widget\Grid */ protected $_queueFactory; - /** - * @param \Magento\Newsletter\Model\QueueFactory $queueFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Newsletter\Model\QueueFactory $queueFactory + * @param array $data */ - public function __construct( - \Magento\Newsletter\Model\QueueFactory $queueFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Newsletter\Model\QueueFactory $queueFactory, + array $data = array() + ) { $this->_queueFactory = $queueFactory; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $data); } /** diff --git a/app/code/Magento/Adminhtml/Block/Newsletter/Subscriber/Grid/Filter/Website.php b/app/code/Magento/Adminhtml/Block/Newsletter/Subscriber/Grid/Filter/Website.php index 832de5c9ab655c0ef1532bac55f5e00129456c5f..69b889266f1433db96089fbc1474e5b039748bc6 100644 --- a/app/code/Magento/Adminhtml/Block/Newsletter/Subscriber/Grid/Filter/Website.php +++ b/app/code/Magento/Adminhtml/Block/Newsletter/Subscriber/Grid/Filter/Website.php @@ -51,22 +51,22 @@ class Website */ protected $_websitesFactory; - /** - * @param \Magento\Core\Model\Resource\Website\CollectionFactory $websitesFactory - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Backend\Block\Context $context - * @param \Magento\Core\Model\Resource\Helper $resourceHelper - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Context $context + * @param \Magento\Core\Model\Resource\Helper $resourceHelper + * @param \Magento\Core\Model\Resource\Website\CollectionFactory $websitesFactory + * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Model\Resource\Website\CollectionFactory $websitesFactory, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Backend\Block\Context $context, - \Magento\Core\Model\Resource\Helper $resourceHelper, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Context $context, + \Magento\Core\Model\Resource\Helper $resourceHelper, + \Magento\Core\Model\Resource\Website\CollectionFactory $websitesFactory, + \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; $this->_storeManager = $storeManager; $this->_websitesFactory = $websitesFactory; diff --git a/app/code/Magento/Adminhtml/Block/Newsletter/Template/Edit.php b/app/code/Magento/Adminhtml/Block/Newsletter/Template/Edit.php index 2c00dd14382853ab17adcc1bc79be8b383a53281..e5e39f2044038cedeb333a2a231f2689162b2dac 100644 --- a/app/code/Magento/Adminhtml/Block/Newsletter/Template/Edit.php +++ b/app/code/Magento/Adminhtml/Block/Newsletter/Template/Edit.php @@ -54,23 +54,23 @@ class Edit extends \Magento\Adminhtml\Block\Widget */ protected $_wysiwygConfig; - /** - * @param \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; $this->_wysiwygConfig = $wysiwygConfig; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Adminhtml/Block/Newsletter/Template/Edit/Form.php b/app/code/Magento/Adminhtml/Block/Newsletter/Template/Edit/Form.php index e4739860bab80a3aaf0bf7bc8f1d429ffe624231..aca73a4d278775d02b9a2b56a4a92172441b5c3f 100644 --- a/app/code/Magento/Adminhtml/Block/Newsletter/Template/Edit/Form.php +++ b/app/code/Magento/Adminhtml/Block/Newsletter/Template/Edit/Form.php @@ -41,24 +41,24 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic */ protected $_wysiwygConfig; - /** - * @param \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig + * @param array $data */ - public function __construct( - \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig, + array $data = array() + ) { $this->_wysiwygConfig = $wysiwygConfig; - parent::__construct($registry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); } /** diff --git a/app/code/Magento/Adminhtml/Block/Newsletter/Template/Grid.php b/app/code/Magento/Adminhtml/Block/Newsletter/Template/Grid.php index 9c2f5ef483e3b2d2be9a6c40be4e852893f73ab5..e065b186a583f0d9e4fb9f4c08f2de616d507331 100644 --- a/app/code/Magento/Adminhtml/Block/Newsletter/Template/Grid.php +++ b/app/code/Magento/Adminhtml/Block/Newsletter/Template/Grid.php @@ -40,24 +40,22 @@ class Grid extends \Magento\Backend\Block\Widget\Grid\Extended */ protected $_templateCollection; - /** - * @param \Magento\Newsletter\Model\Resource\Template\Collection $templateCollection - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Newsletter\Model\Resource\Template\Collection $templateCollection + * @param array $data */ - public function __construct( - \Magento\Newsletter\Model\Resource\Template\Collection $templateCollection, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Newsletter\Model\Resource\Template\Collection $templateCollection, + array $data = array() + ) { $this->_templateCollection = $templateCollection; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $data); $this->setEmptyText(__('No Templates Found')); } diff --git a/app/code/Magento/Adminhtml/Block/Newsletter/Template/Preview.php b/app/code/Magento/Adminhtml/Block/Newsletter/Template/Preview.php index 304eca2cb6d83860d9b14f213ca1164bf7846f9b..f60823e8bcd46889bd40d63e55e4c026ebf0afd6 100644 --- a/app/code/Magento/Adminhtml/Block/Newsletter/Template/Preview.php +++ b/app/code/Magento/Adminhtml/Block/Newsletter/Template/Preview.php @@ -45,23 +45,23 @@ class Preview extends \Magento\Adminhtml\Block\Widget */ protected $_subscriberFactory; - /** - * @param \Magento\Newsletter\Model\TemplateFactory $templateFactory - * @param \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Newsletter\Model\TemplateFactory $templateFactory + * @param \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory + * @param array $data */ - public function __construct( - \Magento\Newsletter\Model\TemplateFactory $templateFactory, - \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Newsletter\Model\TemplateFactory $templateFactory, + \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory, + array $data = array() + ) { $this->_templateFactory = $templateFactory; $this->_subscriberFactory = $subscriberFactory; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _toHtml() diff --git a/app/code/Magento/Adminhtml/Block/Page.php b/app/code/Magento/Adminhtml/Block/Page.php index a1622bac45b68a127f0f97c01a6ea9390d78b4dc..db5845b304fa11a4f9785f3005a424150be51cfe 100644 --- a/app/code/Magento/Adminhtml/Block/Page.php +++ b/app/code/Magento/Adminhtml/Block/Page.php @@ -35,30 +35,8 @@ namespace Magento\Adminhtml\Block; class Page extends \Magento\Backend\Block\Template { - protected $_template = 'admin/page.phtml'; - /** - * @var \Magento\Core\Model\App - */ - protected $_application; - - /** - * @param \Magento\Core\Model\App $application - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data - */ - public function __construct( - \Magento\Core\Model\App $application, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { - $this->_application = $application; - parent::__construct($coreData, $context, $data); - } - /** * Class constructor * @@ -67,10 +45,7 @@ class Page extends \Magento\Backend\Block\Template { parent::_construct(); - $action = $this->_application->getFrontController()->getAction(); - if ($action) { - $this->addBodyClass($action->getFullActionName('-')); - } + $this->addBodyClass($this->_request->getFullActionName('-')); } /** diff --git a/app/code/Magento/Adminhtml/Block/Page/Head.php b/app/code/Magento/Adminhtml/Block/Page/Head.php index f8b7a0a6d2ae8cf5bb0723057e87f20690019a1f..f0c549d8ccb50476a1a5cca2a1953f8e41083900 100644 --- a/app/code/Magento/Adminhtml/Block/Page/Head.php +++ b/app/code/Magento/Adminhtml/Block/Page/Head.php @@ -41,42 +41,42 @@ class Head extends \Magento\Page\Block\Html\Head protected $_template = 'page/head.phtml'; /** - * @var \Magento\Core\Model\Session + * @var \Magento\App\Action\Title */ - protected $_session; + protected $_titles; /** - * @param \Magento\Core\Model\Session $session - * @param \Magento\Core\Model\LocaleInterface $locale - * @param \Magento\App\Dir $dir - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Helper\File\Storage\Database $fileStorageDatabase + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context + * @param \Magento\Core\Helper\File\Storage\Database $fileStorageDatabase * @param \Magento\ObjectManager $objectManager * @param \Magento\Core\Model\Page $page * @param \Magento\Core\Model\Page\Asset\MergeService $assetMergeService * @param \Magento\Core\Model\Page\Asset\MinifyService $assetMinifyService + * @param \Magento\App\Action\Title $titles * @param array $data */ public function __construct( - \Magento\Core\Model\Session $session, - \Magento\Core\Model\LocaleInterface $locale, - \Magento\App\Dir $dir, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Helper\File\Storage\Database $fileStorageDatabase, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, + \Magento\Core\Helper\File\Storage\Database $fileStorageDatabase, \Magento\ObjectManager $objectManager, \Magento\Core\Model\Page $page, \Magento\Core\Model\Page\Asset\MergeService $assetMergeService, \Magento\Core\Model\Page\Asset\MinifyService $assetMinifyService, + \Magento\App\Action\Title $titles, array $data = array() ) { - $this->_session = $session; + $this->_titles = $titles; parent::__construct( - $locale, $dir, $storeManager, $fileStorageDatabase, $coreData, $context, $objectManager, $page, - $assetMergeService, $assetMinifyService, $data + $context, + $coreData, + $fileStorageDatabase, + $objectManager, + $page, + $assetMergeService, + $assetMinifyService, + $data ); } @@ -89,4 +89,22 @@ class Head extends \Magento\Page\Block\Html\Head { return $this->_session->getFormKey(); } + + /** + * @return array|string + */ + public function getTitle() + { + /** Get default title */ + $title = parent::getTitle(); + + /** Add default title */ + $this->_titles->add($title, true); + + /** Set title list */ + $this->setTitle(array_reverse($this->_titles->get())); + + /** Render titles */ + return parent::getTitle(); + } } diff --git a/app/code/Magento/Adminhtml/Block/Page/Header.php b/app/code/Magento/Adminhtml/Block/Page/Header.php index 4c80e37bc1b85a56045ad7f163dc8eacfdf75c47..88d99b1e169c6f73fc06b23c106e3a35653733b7 100644 --- a/app/code/Magento/Adminhtml/Block/Page/Header.php +++ b/app/code/Magento/Adminhtml/Block/Page/Header.php @@ -49,23 +49,23 @@ class Header extends \Magento\Adminhtml\Block\Template */ protected $_authSession; - /** - * @param \Magento\Backend\Model\Auth\Session $authSession - * @param \Magento\Backend\Helper\Data $backendData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Backend\Model\Auth\Session $authSession + * @param \Magento\Backend\Helper\Data $backendData + * @param array $data */ - public function __construct( - \Magento\Backend\Model\Auth\Session $authSession, - \Magento\Backend\Helper\Data $backendData, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Backend\Model\Auth\Session $authSession, + \Magento\Backend\Helper\Data $backendData, + array $data = array() + ) { $this->_backendData = $backendData; $this->_authSession = $authSession; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } public function getHomeLink() diff --git a/app/code/Magento/Adminhtml/Block/Page/System/Config/Robots/Reset.php b/app/code/Magento/Adminhtml/Block/Page/System/Config/Robots/Reset.php index 9334fab0c6c0e086062d09e5448b8f3b8a9b6331..481945d922f4b2e9a4fcbb7e03ce3b4c053524bc 100644 --- a/app/code/Magento/Adminhtml/Block/Page/System/Config/Robots/Reset.php +++ b/app/code/Magento/Adminhtml/Block/Page/System/Config/Robots/Reset.php @@ -42,22 +42,20 @@ class Reset extends \Magento\Backend\Block\System\Config\Form\Field */ protected $_pageRobots = null; - /** - * @param \Magento\Page\Helper\Robots $pageRobots - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\App $application - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Page\Helper\Robots $pageRobots + * @param array $data */ - public function __construct( - \Magento\Page\Helper\Robots $pageRobots, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\App $application, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Page\Helper\Robots $pageRobots, + array $data = array() + ) { $this->_pageRobots = $pageRobots; - parent::__construct($coreData, $context, $application, $data); + parent::__construct($context, $coreData, $data); } /* diff --git a/app/code/Magento/Adminhtml/Block/Report/Config/Form/Field/YtdStart.php b/app/code/Magento/Adminhtml/Block/Report/Config/Form/Field/YtdStart.php index fdf5086eb0c804f9f4f6a749f55a564253938e62..d5fdeb3b6d2f8c15729c3e509f06134ae617efc7 100644 --- a/app/code/Magento/Adminhtml/Block/Report/Config/Form/Field/YtdStart.php +++ b/app/code/Magento/Adminhtml/Block/Report/Config/Form/Field/YtdStart.php @@ -35,31 +35,6 @@ namespace Magento\Adminhtml\Block\Report\Config\Form\Field; class YtdStart extends \Magento\Backend\Block\System\Config\Form\Field { - /** - * Locale - * - * @var \Magento\Core\Model\LocaleInterface - */ - protected $_locale; - - /** - * @param \Magento\Core\Model\LocaleInterface $locale - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\App $application - * @param array $data - */ - public function __construct( - \Magento\Core\Model\LocaleInterface $locale, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\App $application, - array $data = array() - ) { - $this->_locale = $locale; - parent::__construct($coreData, $context, $application, $data); - } - protected function _getElementHtml(\Magento\Data\Form\Element\AbstractElement $element) { $_months = array(); diff --git a/app/code/Magento/Adminhtml/Block/Report/Grid/AbstractGrid.php b/app/code/Magento/Adminhtml/Block/Report/Grid/AbstractGrid.php index a91ef21a32b3eb1d62e1ed2887e34df21004c4b5..2d729bcff57247f0348d1083c3398210b8841424 100644 --- a/app/code/Magento/Adminhtml/Block/Report/Grid/AbstractGrid.php +++ b/app/code/Magento/Adminhtml/Block/Report/Grid/AbstractGrid.php @@ -55,30 +55,28 @@ class AbstractGrid extends \Magento\Backend\Block\Widget\Grid\Extended */ protected $_resourceFactory; - /** - * @param \Magento\Reports\Model\Resource\Report\Collection\Factory $resourceFactory - * @param \Magento\Reports\Model\Grouped\CollectionFactory $collectionFactory - * @param \Magento\Reports\Helper\Data $reportsData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Reports\Model\Resource\Report\Collection\Factory $resourceFactory + * @param \Magento\Reports\Model\Grouped\CollectionFactory $collectionFactory + * @param \Magento\Reports\Helper\Data $reportsData + * @param array $data */ - public function __construct( - \Magento\Reports\Model\Resource\Report\Collection\Factory $resourceFactory, - \Magento\Reports\Model\Grouped\CollectionFactory $collectionFactory, - \Magento\Reports\Helper\Data $reportsData, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Reports\Model\Resource\Report\Collection\Factory $resourceFactory, + \Magento\Reports\Model\Grouped\CollectionFactory $collectionFactory, + \Magento\Reports\Helper\Data $reportsData, + array $data = array() + ) { $this->_resourceFactory = $resourceFactory; $this->_collectionFactory = $collectionFactory; $this->_reportsData = $reportsData; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $data); } protected function _construct() diff --git a/app/code/Magento/Adminhtml/Block/Report/Product/Downloads/Grid.php b/app/code/Magento/Adminhtml/Block/Report/Product/Downloads/Grid.php index 4cb3ae35647aad6737c55f0229cffe3c56707548..92839062b40710e41e23abef31d8eeb08ae3d14e 100644 --- a/app/code/Magento/Adminhtml/Block/Report/Product/Downloads/Grid.php +++ b/app/code/Magento/Adminhtml/Block/Report/Product/Downloads/Grid.php @@ -40,24 +40,22 @@ class Grid extends \Magento\Adminhtml\Block\Widget\Grid */ protected $_downloadsFactory; - /** - * @param \Magento\Reports\Model\Resource\Product\Downloads\CollectionFactory $downloadsFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Reports\Model\Resource\Product\Downloads\CollectionFactory $downloadsFactory + * @param array $data */ - public function __construct( - \Magento\Reports\Model\Resource\Product\Downloads\CollectionFactory $downloadsFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Reports\Model\Resource\Product\Downloads\CollectionFactory $downloadsFactory, + array $data = array() + ) { $this->_downloadsFactory = $downloadsFactory; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $data); } protected function _construct() diff --git a/app/code/Magento/Adminhtml/Block/Report/Product/Grid.php b/app/code/Magento/Adminhtml/Block/Report/Product/Grid.php index e760cd4082e3c1015bedb9cc58736a745ed1b0d2..e5b71fae7b322dca7c25f81dd3a608e05060e525 100644 --- a/app/code/Magento/Adminhtml/Block/Report/Product/Grid.php +++ b/app/code/Magento/Adminhtml/Block/Report/Product/Grid.php @@ -40,24 +40,22 @@ class Grid extends \Magento\Backend\Block\Widget\Grid\Extended */ protected $_collectionFactory; - /** - * @param \Magento\Reports\Model\Resource\Product\CollectionFactory $collectionFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Reports\Model\Resource\Product\CollectionFactory $collectionFactory + * @param array $data */ - public function __construct( - \Magento\Reports\Model\Resource\Product\CollectionFactory $collectionFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Reports\Model\Resource\Product\CollectionFactory $collectionFactory, + array $data = array() + ) { $this->_collectionFactory = $collectionFactory; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $data); } protected function _construct() diff --git a/app/code/Magento/Adminhtml/Block/Report/Product/Lowstock/Grid.php b/app/code/Magento/Adminhtml/Block/Report/Product/Lowstock/Grid.php index eb236302e84fde334ab702dacee43dae3bcf6ed7..5f415544878d0ef87f5ab0ebb6ba36322bc2ae85 100644 --- a/app/code/Magento/Adminhtml/Block/Report/Product/Lowstock/Grid.php +++ b/app/code/Magento/Adminhtml/Block/Report/Product/Lowstock/Grid.php @@ -40,24 +40,22 @@ class Grid extends \Magento\Backend\Block\Widget\Grid */ protected $_lowstocksFactory; - /** - * @param \Magento\Reports\Model\Resource\Product\Lowstock\CollectionFactory $lowstocksFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Reports\Model\Resource\Product\Lowstock\CollectionFactory $lowstocksFactory + * @param array $data */ - public function __construct( - \Magento\Reports\Model\Resource\Product\Lowstock\CollectionFactory $lowstocksFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Reports\Model\Resource\Product\Lowstock\CollectionFactory $lowstocksFactory, + array $data = array() + ) { $this->_lowstocksFactory = $lowstocksFactory; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $data); } /** diff --git a/app/code/Magento/Adminhtml/Block/Report/Review/Detail.php b/app/code/Magento/Adminhtml/Block/Report/Review/Detail.php index 2164a5c57785269545edeb5447647aff08f9eb73..49fa91e3e2994697e2cd0a522fe7e2fd057adf33 100644 --- a/app/code/Magento/Adminhtml/Block/Report/Review/Detail.php +++ b/app/code/Magento/Adminhtml/Block/Report/Review/Detail.php @@ -41,20 +41,20 @@ class Detail extends \Magento\Adminhtml\Block\Widget\Grid\Container */ protected $_productFactory; - /** - * @param \Magento\Catalog\Model\ProductFactory $productFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Catalog\Model\ProductFactory $productFactory + * @param array $data */ - public function __construct( - \Magento\Catalog\Model\ProductFactory $productFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Catalog\Model\ProductFactory $productFactory, + array $data = array() + ) { $this->_productFactory = $productFactory; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _construct() diff --git a/app/code/Magento/Adminhtml/Block/Report/Review/Detail/Grid.php b/app/code/Magento/Adminhtml/Block/Report/Review/Detail/Grid.php index 5ee344a390d3a3708d33786b1cc6199956d39480..c8032a5ff018bead4be1dba521f94c168301aff8 100644 --- a/app/code/Magento/Adminhtml/Block/Report/Review/Detail/Grid.php +++ b/app/code/Magento/Adminhtml/Block/Report/Review/Detail/Grid.php @@ -40,24 +40,22 @@ class Grid extends \Magento\Adminhtml\Block\Widget\Grid */ protected $_reviewsFactory; - /** - * @param \Magento\Reports\Model\Resource\Review\CollectionFactory $reviewsFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Reports\Model\Resource\Review\CollectionFactory $reviewsFactory + * @param array $data */ - public function __construct( - \Magento\Reports\Model\Resource\Review\CollectionFactory $reviewsFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Reports\Model\Resource\Review\CollectionFactory $reviewsFactory, + array $data = array() + ) { $this->_reviewsFactory = $reviewsFactory; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $data); } protected function _construct() diff --git a/app/code/Magento/Adminhtml/Block/Report/Sales/Tax/Grid.php b/app/code/Magento/Adminhtml/Block/Report/Sales/Tax/Grid.php index c0fd6e58ff293124ce741d274abd2f17c9972b87..cb23cc1d3b2b9da641f2872a01d5e1db621ed73e 100644 --- a/app/code/Magento/Adminhtml/Block/Report/Sales/Tax/Grid.php +++ b/app/code/Magento/Adminhtml/Block/Report/Sales/Tax/Grid.php @@ -42,32 +42,28 @@ class Grid extends \Magento\Adminhtml\Block\Report\Grid\AbstractGrid */ protected $_configFactory; - /** - * @param \Magento\Sales\Model\Order\ConfigFactory $configFactory - * @param \Magento\Reports\Model\Resource\Report\Collection\Factory $resourceFactory - * @param \Magento\Reports\Model\Grouped\CollectionFactory $collectionFactory - * @param \Magento\Reports\Helper\Data $reportsData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Reports\Model\Resource\Report\Collection\Factory $resourceFactory + * @param \Magento\Reports\Model\Grouped\CollectionFactory $collectionFactory + * @param \Magento\Reports\Helper\Data $reportsData + * @param \Magento\Sales\Model\Order\ConfigFactory $configFactory + * @param array $data */ - public function __construct( - \Magento\Sales\Model\Order\ConfigFactory $configFactory, - \Magento\Reports\Model\Resource\Report\Collection\Factory $resourceFactory, - \Magento\Reports\Model\Grouped\CollectionFactory $collectionFactory, - \Magento\Reports\Helper\Data $reportsData, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Reports\Model\Resource\Report\Collection\Factory $resourceFactory, + \Magento\Reports\Model\Grouped\CollectionFactory $collectionFactory, + \Magento\Reports\Helper\Data $reportsData, + \Magento\Sales\Model\Order\ConfigFactory $configFactory, + array $data = array() + ) { $this->_configFactory = $configFactory; - parent::__construct( - $resourceFactory, $collectionFactory, $reportsData, $coreData, $context, $storeManager, $urlModel, $data - ); + parent::__construct($context, $coreData, $urlModel, $resourceFactory, $collectionFactory, $reportsData, $data); } protected function _construct() diff --git a/app/code/Magento/Adminhtml/Block/Report/Shopcart/Abandoned/Grid.php b/app/code/Magento/Adminhtml/Block/Report/Shopcart/Abandoned/Grid.php index 89335c849104ac0e0c1505cf78f71645c4493497..cc77533f1d48ea5e0cb0f12214027af021aa05e1 100644 --- a/app/code/Magento/Adminhtml/Block/Report/Shopcart/Abandoned/Grid.php +++ b/app/code/Magento/Adminhtml/Block/Report/Shopcart/Abandoned/Grid.php @@ -40,24 +40,22 @@ class Grid extends \Magento\Adminhtml\Block\Report\Grid\Shopcart */ protected $_quotesFactory; - /** - * @param \Magento\Reports\Model\Resource\Quote\CollectionFactory $quotesFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Reports\Model\Resource\Quote\CollectionFactory $quotesFactory + * @param array $data */ - public function __construct( - \Magento\Reports\Model\Resource\Quote\CollectionFactory $quotesFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Reports\Model\Resource\Quote\CollectionFactory $quotesFactory, + array $data = array() + ) { $this->_quotesFactory = $quotesFactory; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $data); } protected function _construct() diff --git a/app/code/Magento/Adminhtml/Block/Report/Shopcart/Customer/Grid.php b/app/code/Magento/Adminhtml/Block/Report/Shopcart/Customer/Grid.php index 19d583493b8d6a8857b3ceca77841032ecb10770..d167a0e66d989e89c9c5deae4eb113bcffa05e43 100644 --- a/app/code/Magento/Adminhtml/Block/Report/Shopcart/Customer/Grid.php +++ b/app/code/Magento/Adminhtml/Block/Report/Shopcart/Customer/Grid.php @@ -40,24 +40,22 @@ class Grid extends \Magento\Adminhtml\Block\Report\Grid\Shopcart */ protected $_customersFactory; - /** - * @param \Magento\Reports\Model\Resource\Customer\CollectionFactory $customersFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Reports\Model\Resource\Customer\CollectionFactory $customersFactory + * @param array $data */ - public function __construct( - \Magento\Reports\Model\Resource\Customer\CollectionFactory $customersFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Reports\Model\Resource\Customer\CollectionFactory $customersFactory, + array $data = array() + ) { $this->_customersFactory = $customersFactory; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $data); } protected function _construct() diff --git a/app/code/Magento/Adminhtml/Block/Report/Shopcart/Product/Grid.php b/app/code/Magento/Adminhtml/Block/Report/Shopcart/Product/Grid.php index b755b3e65c64bea7d565f5f5f1395bbbcb360083..fb98870a7e1ba8225f10917a67469c21a12db581 100644 --- a/app/code/Magento/Adminhtml/Block/Report/Shopcart/Product/Grid.php +++ b/app/code/Magento/Adminhtml/Block/Report/Shopcart/Product/Grid.php @@ -40,24 +40,22 @@ class Grid extends \Magento\Adminhtml\Block\Report\Grid\Shopcart */ protected $_quotesFactory; - /** - * @param \Magento\Reports\Model\Resource\Quote\CollectionFactory $quotesFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Reports\Model\Resource\Quote\CollectionFactory $quotesFactory + * @param array $data */ - public function __construct( - \Magento\Reports\Model\Resource\Quote\CollectionFactory $quotesFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Reports\Model\Resource\Quote\CollectionFactory $quotesFactory, + array $data = array() + ) { $this->_quotesFactory = $quotesFactory; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $data); } protected function _construct() diff --git a/app/code/Magento/Adminhtml/Block/Report/Wishlist.php b/app/code/Magento/Adminhtml/Block/Report/Wishlist.php index a70d709edca0b116c91966caea1a0ec51036ed0c..bb013103362c1bd0789f29a7abdbfed8d92cbf12 100644 --- a/app/code/Magento/Adminhtml/Block/Report/Wishlist.php +++ b/app/code/Magento/Adminhtml/Block/Report/Wishlist.php @@ -52,20 +52,20 @@ class Wishlist extends \Magento\Backend\Block\Template */ protected $_wishlistFactory; - /** - * @param \Magento\Reports\Model\Resource\Wishlist\CollectionFactory $wishlistFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Reports\Model\Resource\Wishlist\CollectionFactory $wishlistFactory + * @param array $data */ - public function __construct( - \Magento\Reports\Model\Resource\Wishlist\CollectionFactory $wishlistFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Reports\Model\Resource\Wishlist\CollectionFactory $wishlistFactory, + array $data = array() + ) { $this->_wishlistFactory = $wishlistFactory; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } public function _beforeToHtml() diff --git a/app/code/Magento/Adminhtml/Block/Report/Wishlist/Grid.php b/app/code/Magento/Adminhtml/Block/Report/Wishlist/Grid.php index 0267454e50b2d1b39f2b8fa82c7a4a95e495b9b7..d0a7e08aaa5f20da580834a9f4371b72fbcc7ebb 100644 --- a/app/code/Magento/Adminhtml/Block/Report/Wishlist/Grid.php +++ b/app/code/Magento/Adminhtml/Block/Report/Wishlist/Grid.php @@ -40,24 +40,22 @@ class Grid extends \Magento\Adminhtml\Block\Widget\Grid */ protected $_productsFactory; - /** - * @param \Magento\Reports\Model\Resource\Wishlist\Product\CollectionFactory $productsFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Reports\Model\Resource\Wishlist\Product\CollectionFactory $productsFactory + * @param array $data */ - public function __construct( - \Magento\Reports\Model\Resource\Wishlist\Product\CollectionFactory $productsFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Reports\Model\Resource\Wishlist\Product\CollectionFactory $productsFactory, + array $data = array() + ) { $this->_productsFactory = $productsFactory; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $data); } protected function _construct() diff --git a/app/code/Magento/Adminhtml/Block/Review/Add/Form.php b/app/code/Magento/Adminhtml/Block/Review/Add/Form.php index 49843a68a04570a7021870f06b3713220082c7d3..57ab6ced96f39082eada102baea325d28d230158 100644 --- a/app/code/Magento/Adminhtml/Block/Review/Add/Form.php +++ b/app/code/Magento/Adminhtml/Block/Review/Add/Form.php @@ -48,27 +48,27 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic */ protected $_systemStore; - /** - * @param \Magento\Core\Model\System\Store $systemStore - * @param \Magento\Review\Helper\Data $reviewData - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Core\Model\System\Store $systemStore + * @param \Magento\Review\Helper\Data $reviewData + * @param array $data */ - public function __construct( - \Magento\Core\Model\System\Store $systemStore, - \Magento\Review\Helper\Data $reviewData, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Core\Model\System\Store $systemStore, + \Magento\Review\Helper\Data $reviewData, + array $data = array() + ) { $this->_reviewData = $reviewData; $this->_systemStore = $systemStore; - parent::__construct($registry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); } protected function _prepareForm() diff --git a/app/code/Magento/Adminhtml/Block/Review/Edit.php b/app/code/Magento/Adminhtml/Block/Review/Edit.php index 19aec3669700f38a72882833c3b31b9209b22c13..207148434d0c973d5fbce64a65ba509aa254a350 100644 --- a/app/code/Magento/Adminhtml/Block/Review/Edit.php +++ b/app/code/Magento/Adminhtml/Block/Review/Edit.php @@ -50,26 +50,26 @@ class Edit extends \Magento\Adminhtml\Block\Widget\Form\Container */ protected $_reviewFactory; - /** - * @param \Magento\Review\Model\ReviewFactory $reviewFactory - * @param \Magento\Review\Helper\Action\Pager $reviewActionPager - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Review\Model\ReviewFactory $reviewFactory + * @param \Magento\Review\Helper\Action\Pager $reviewActionPager + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Review\Model\ReviewFactory $reviewFactory, - \Magento\Review\Helper\Action\Pager $reviewActionPager, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Review\Model\ReviewFactory $reviewFactory, + \Magento\Review\Helper\Action\Pager $reviewActionPager, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; $this->_reviewActionPager = $reviewActionPager; $this->_reviewFactory = $reviewFactory; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _construct() diff --git a/app/code/Magento/Adminhtml/Block/Review/Edit/Form.php b/app/code/Magento/Adminhtml/Block/Review/Edit/Form.php index 41c5fac3f074ca3147bcf2187e8080601cce5aec..7867f8a1923cf7002265a8ce3eb091cc889ce7e1 100644 --- a/app/code/Magento/Adminhtml/Block/Review/Edit/Form.php +++ b/app/code/Magento/Adminhtml/Block/Review/Edit/Form.php @@ -53,33 +53,33 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic */ protected $_systemStore; - /** - * @param \Magento\Core\Model\System\Store $systemStore - * @param \Magento\Customer\Model\CustomerFactory $customerFactory - * @param \Magento\Catalog\Model\ProductFactory $productFactory - * @param \Magento\Review\Helper\Data $reviewData - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Core\Model\System\Store $systemStore + * @param \Magento\Customer\Model\CustomerFactory $customerFactory + * @param \Magento\Catalog\Model\ProductFactory $productFactory + * @param \Magento\Review\Helper\Data $reviewData + * @param array $data */ - public function __construct( - \Magento\Core\Model\System\Store $systemStore, - \Magento\Customer\Model\CustomerFactory $customerFactory, - \Magento\Catalog\Model\ProductFactory $productFactory, - \Magento\Review\Helper\Data $reviewData, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Core\Model\System\Store $systemStore, + \Magento\Customer\Model\CustomerFactory $customerFactory, + \Magento\Catalog\Model\ProductFactory $productFactory, + \Magento\Review\Helper\Data $reviewData, + array $data = array() + ) { $this->_reviewData = $reviewData; $this->_customerFactory = $customerFactory; $this->_productFactory = $productFactory; $this->_systemStore = $systemStore; - parent::__construct($registry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); } protected function _prepareForm() diff --git a/app/code/Magento/Adminhtml/Block/Review/Grid.php b/app/code/Magento/Adminhtml/Block/Review/Grid.php index 54ed13592fd3da237c0cdd3787f8aa8f740e00d2..34758723c83cfedfd06c2d2b099a8d556c6ef837 100644 --- a/app/code/Magento/Adminhtml/Block/Review/Grid.php +++ b/app/code/Magento/Adminhtml/Block/Review/Grid.php @@ -72,36 +72,34 @@ class Grid extends \Magento\Backend\Block\Widget\Grid\Extended */ protected $_reviewFactory; - /** - * @param \Magento\Review\Model\ReviewFactory $reviewFactory - * @param \Magento\Review\Model\Resource\Review\Product\CollectionFactory $productsFactory - * @param \Magento\Review\Helper\Data $reviewData - * @param \Magento\Review\Helper\Action\Pager $reviewActionPager - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param \Magento\Core\Model\Registry $coreRegistry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Review\Model\ReviewFactory $reviewFactory + * @param \Magento\Review\Model\Resource\Review\Product\CollectionFactory $productsFactory + * @param \Magento\Review\Helper\Data $reviewData + * @param \Magento\Review\Helper\Action\Pager $reviewActionPager + * @param \Magento\Core\Model\Registry $coreRegistry + * @param array $data */ - public function __construct( - \Magento\Review\Model\ReviewFactory $reviewFactory, - \Magento\Review\Model\Resource\Review\Product\CollectionFactory $productsFactory, - \Magento\Review\Helper\Data $reviewData, - \Magento\Review\Helper\Action\Pager $reviewActionPager, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - \Magento\Core\Model\Registry $coreRegistry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Review\Model\ReviewFactory $reviewFactory, + \Magento\Review\Model\Resource\Review\Product\CollectionFactory $productsFactory, + \Magento\Review\Helper\Data $reviewData, + \Magento\Review\Helper\Action\Pager $reviewActionPager, + \Magento\Core\Model\Registry $coreRegistry, + array $data = array() + ) { $this->_productsFactory = $productsFactory; $this->_coreRegistry = $coreRegistry; $this->_reviewData = $reviewData; $this->_reviewActionPager = $reviewActionPager; $this->_reviewFactory = $reviewFactory; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $data); } /** diff --git a/app/code/Magento/Adminhtml/Block/Review/Main.php b/app/code/Magento/Adminhtml/Block/Review/Main.php index e3be25f5e8e16ba2dc173b4dcbfc2cff1148347a..eac15d1f713171ad3ad32af31f26c964d7164351 100644 --- a/app/code/Magento/Adminhtml/Block/Review/Main.php +++ b/app/code/Magento/Adminhtml/Block/Review/Main.php @@ -48,26 +48,26 @@ class Main extends \Magento\Adminhtml\Block\Widget\Grid\Container */ protected $_productFactory; - /** - * @param \Magento\Customer\Model\CustomerFactory $customerFactory - * @param \Magento\Catalog\Model\ProductFactory $productFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Customer\Model\CustomerFactory $customerFactory + * @param \Magento\Catalog\Model\ProductFactory $productFactory + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Customer\Model\CustomerFactory $customerFactory, - \Magento\Catalog\Model\ProductFactory $productFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Customer\Model\CustomerFactory $customerFactory, + \Magento\Catalog\Model\ProductFactory $productFactory, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; $this->_customerFactory = $customerFactory; $this->_productFactory = $productFactory; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _construct() diff --git a/app/code/Magento/Adminhtml/Block/Review/Product/Grid.php b/app/code/Magento/Adminhtml/Block/Review/Product/Grid.php index 3210efe0633ee2b39ee61573c0b98f724116caa8..38038e6d0104617251657de6879467008312206f 100644 --- a/app/code/Magento/Adminhtml/Block/Review/Product/Grid.php +++ b/app/code/Magento/Adminhtml/Block/Review/Product/Grid.php @@ -41,7 +41,9 @@ class Grid extends \Magento\Catalog\Block\Adminhtml\Product\Grid protected $_websitesFactory; /** - * @param \Magento\Core\Model\Resource\Website\CollectionFactory $websitesFactory + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel * @param \Magento\Core\Model\WebsiteFactory $websiteFactory * @param \Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory $setsFactory * @param \Magento\Catalog\Model\ProductFactory $productFactory @@ -49,16 +51,13 @@ class Grid extends \Magento\Catalog\Block\Adminhtml\Product\Grid * @param \Magento\Catalog\Model\Product\Status $status * @param \Magento\Catalog\Model\Product\Visibility $visibility * @param \Magento\Catalog\Helper\Data $catalogData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Core\Model\Resource\Website\CollectionFactory $websitesFactory * @param array $data - * - * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( - \Magento\Core\Model\Resource\Website\CollectionFactory $websitesFactory, + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, \Magento\Core\Model\WebsiteFactory $websiteFactory, \Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory $setsFactory, \Magento\Catalog\Model\ProductFactory $productFactory, @@ -66,16 +65,22 @@ class Grid extends \Magento\Catalog\Block\Adminhtml\Product\Grid \Magento\Catalog\Model\Product\Status $status, \Magento\Catalog\Model\Product\Visibility $visibility, \Magento\Catalog\Helper\Data $catalogData, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, + \Magento\Core\Model\Resource\Website\CollectionFactory $websitesFactory, array $data = array() ) { $this->_websitesFactory = $websitesFactory; parent::__construct( - $websiteFactory, $setsFactory, $productFactory, $type, $status, $visibility, $catalogData, $coreData, - $context, $storeManager, $urlModel, $data + $context, + $coreData, + $urlModel, + $websiteFactory, + $setsFactory, + $productFactory, + $type, + $status, + $visibility, + $catalogData, + $data ); } diff --git a/app/code/Magento/Adminhtml/Block/Review/Rating/Detailed.php b/app/code/Magento/Adminhtml/Block/Review/Rating/Detailed.php index 8c464d1a724769d3d0e56cd3079de9c45c61903a..aed4f848991f2461bf62d8eed68e476b0ed34865 100644 --- a/app/code/Magento/Adminhtml/Block/Review/Rating/Detailed.php +++ b/app/code/Magento/Adminhtml/Block/Review/Rating/Detailed.php @@ -52,26 +52,26 @@ class Detailed extends \Magento\Adminhtml\Block\Template */ protected $_votesFactory; - /** - * @param \Magento\Rating\Model\Resource\Rating\CollectionFactory $ratingsFactory - * @param \Magento\Rating\Model\Resource\Rating\Option\Vote\CollectionFactory $votesFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Rating\Model\Resource\Rating\CollectionFactory $ratingsFactory + * @param \Magento\Rating\Model\Resource\Rating\Option\Vote\CollectionFactory $votesFactory + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Rating\Model\Resource\Rating\CollectionFactory $ratingsFactory, - \Magento\Rating\Model\Resource\Rating\Option\Vote\CollectionFactory $votesFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Rating\Model\Resource\Rating\CollectionFactory $ratingsFactory, + \Magento\Rating\Model\Resource\Rating\Option\Vote\CollectionFactory $votesFactory, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_ratingsFactory = $ratingsFactory; $this->_votesFactory = $votesFactory; $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _construct() diff --git a/app/code/Magento/Adminhtml/Block/Review/Rating/Summary.php b/app/code/Magento/Adminhtml/Block/Review/Rating/Summary.php index b3d99b87b30a36c4bb00888bef8a59d40d445597..9cb9a4fd4713de5a804bdfff4631d59b7c76c45a 100644 --- a/app/code/Magento/Adminhtml/Block/Review/Rating/Summary.php +++ b/app/code/Magento/Adminhtml/Block/Review/Rating/Summary.php @@ -50,26 +50,26 @@ class Summary extends \Magento\Adminhtml\Block\Template */ protected $_ratingFactory; - /** - * @param \Magento\Rating\Model\Resource\Rating\Option\Vote\CollectionFactory $votesFactory - * @param \Magento\Rating\Model\RatingFactory $ratingFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Rating\Model\Resource\Rating\Option\Vote\CollectionFactory $votesFactory + * @param \Magento\Rating\Model\RatingFactory $ratingFactory + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Rating\Model\Resource\Rating\Option\Vote\CollectionFactory $votesFactory, - \Magento\Rating\Model\RatingFactory $ratingFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Rating\Model\Resource\Rating\Option\Vote\CollectionFactory $votesFactory, + \Magento\Rating\Model\RatingFactory $ratingFactory, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_votesFactory = $votesFactory; $this->_ratingFactory = $ratingFactory; $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _construct() diff --git a/app/code/Magento/Adminhtml/Block/Shipping/Carrier/Tablerate/Grid.php b/app/code/Magento/Adminhtml/Block/Shipping/Carrier/Tablerate/Grid.php index 01fbb2b0dac0dcf520ac16ef5bdee3951f107a13..6798661931b8f2ce6a67ba13c98f52a18903e619 100644 --- a/app/code/Magento/Adminhtml/Block/Shipping/Carrier/Tablerate/Grid.php +++ b/app/code/Magento/Adminhtml/Block/Shipping/Carrier/Tablerate/Grid.php @@ -60,27 +60,25 @@ class Grid extends \Magento\Adminhtml\Block\Widget\Grid */ protected $_collectionFactory; - /** - * @param \Magento\Shipping\Model\Resource\Carrier\Tablerate\CollectionFactory $collectionFactory - * @param \Magento\Shipping\Model\Carrier\Tablerate $tablerate - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Shipping\Model\Resource\Carrier\Tablerate\CollectionFactory $collectionFactory + * @param \Magento\Shipping\Model\Carrier\Tablerate $tablerate + * @param array $data */ - public function __construct( - \Magento\Shipping\Model\Resource\Carrier\Tablerate\CollectionFactory $collectionFactory, - \Magento\Shipping\Model\Carrier\Tablerate $tablerate, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Shipping\Model\Resource\Carrier\Tablerate\CollectionFactory $collectionFactory, + \Magento\Shipping\Model\Carrier\Tablerate $tablerate, + array $data = array() + ) { $this->_collectionFactory = $collectionFactory; $this->_tablerate = $tablerate; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $data); } /** diff --git a/app/code/Magento/Adminhtml/Block/Sitemap/Edit.php b/app/code/Magento/Adminhtml/Block/Sitemap/Edit.php index 813fb82a0a7d540d635f7c6e1ab40a8f55cf7111..c9d7920924779f10ebc41e36feca692227f546ae 100644 --- a/app/code/Magento/Adminhtml/Block/Sitemap/Edit.php +++ b/app/code/Magento/Adminhtml/Block/Sitemap/Edit.php @@ -42,20 +42,20 @@ class Edit extends \Magento\Adminhtml\Block\Widget\Form\Container */ protected $_coreRegistry = null; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Adminhtml/Block/Sitemap/Edit/Form.php b/app/code/Magento/Adminhtml/Block/Sitemap/Edit/Form.php index 35e38bb6a1ef89ece8fd9c536364d0f6ca6b3f01..5122754073dbe186f568d9e8702ffd770f05b55e 100644 --- a/app/code/Magento/Adminhtml/Block/Sitemap/Edit/Form.php +++ b/app/code/Magento/Adminhtml/Block/Sitemap/Edit/Form.php @@ -40,24 +40,24 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic */ protected $_systemStore; - /** - * @param \Magento\Core\Model\System\Store $systemStore - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Core\Model\System\Store $systemStore + * @param array $data */ - public function __construct( - \Magento\Core\Model\System\Store $systemStore, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Core\Model\System\Store $systemStore, + array $data = array() + ) { $this->_systemStore = $systemStore; - parent::__construct($registry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); } /** diff --git a/app/code/Magento/Adminhtml/Block/Sitemap/Grid/Renderer/Link.php b/app/code/Magento/Adminhtml/Block/Sitemap/Grid/Renderer/Link.php index 4637739196f5ab25e8320f05b2e74704e3b032fc..3baf481abd6919cf426c9f857250a9874d14d905 100644 --- a/app/code/Magento/Adminhtml/Block/Sitemap/Grid/Renderer/Link.php +++ b/app/code/Magento/Adminhtml/Block/Sitemap/Grid/Renderer/Link.php @@ -44,18 +44,18 @@ class Link extends \Magento\Adminhtml\Block\Widget\Grid\Column\Renderer\Abstract */ protected $_sitemapFactory; - /** - * @param \Magento\Sitemap\Model\SitemapFactory $sitemapFactory - * @param \Magento\Backend\Block\Context $context - * @param \Magento\Filesystem $filesystem - * @param array $data + /** + * @param \Magento\Backend\Block\Context $context + * @param \Magento\Sitemap\Model\SitemapFactory $sitemapFactory + * @param \Magento\Filesystem $filesystem + * @param array $data */ - public function __construct( - \Magento\Sitemap\Model\SitemapFactory $sitemapFactory, - \Magento\Backend\Block\Context $context, - \Magento\Filesystem $filesystem, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Context $context, + \Magento\Sitemap\Model\SitemapFactory $sitemapFactory, + \Magento\Filesystem $filesystem, + array $data = array() + ) { $this->_sitemapFactory = $sitemapFactory; $this->_filesystem = $filesystem; parent::__construct($context, $data); diff --git a/app/code/Magento/Adminhtml/Block/Sitemap/Grid/Renderer/Time.php b/app/code/Magento/Adminhtml/Block/Sitemap/Grid/Renderer/Time.php index b66d948eed256ff7bbe8f492d28277c42f38ee32..414d0bc23c7958aebb88f91fca926152c5e5f9b7 100644 --- a/app/code/Magento/Adminhtml/Block/Sitemap/Grid/Renderer/Time.php +++ b/app/code/Magento/Adminhtml/Block/Sitemap/Grid/Renderer/Time.php @@ -39,16 +39,16 @@ class Time extends \Magento\Adminhtml\Block\Widget\Grid\Column\Renderer\Abstract */ protected $_date; - /** - * @param \Magento\Core\Model\Date $date - * @param \Magento\Backend\Block\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Context $context + * @param \Magento\Core\Model\Date $date + * @param array $data */ - public function __construct( - \Magento\Core\Model\Date $date, - \Magento\Backend\Block\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Context $context, + \Magento\Core\Model\Date $date, + array $data = array() + ) { $this->_date = $date; parent::__construct($context, $data); } diff --git a/app/code/Magento/Adminhtml/Block/Text/ListText.php b/app/code/Magento/Adminhtml/Block/Text/ListText.php index 5ae98bdcfe0a4276c26e56d20dff3233b84247eb..151cd4997b3777ebba895f5589ee1d0be5b046aa 100644 --- a/app/code/Magento/Adminhtml/Block/Text/ListText.php +++ b/app/code/Magento/Adminhtml/Block/Text/ListText.php @@ -34,6 +34,6 @@ */ namespace Magento\Adminhtml\Block\Text; -class ListText extends \Magento\Core\Block\Text\ListText +class ListText extends \Magento\View\Block\Text\ListText { } diff --git a/app/code/Magento/Adminhtml/Block/Urlrewrite.php b/app/code/Magento/Adminhtml/Block/Urlrewrite.php index 12c52c2fa0d6eed390e075e23ef4d2bde7a13c98..cc6745ab1294639eb911bdd862961d42b9dba63f 100644 --- a/app/code/Magento/Adminhtml/Block/Urlrewrite.php +++ b/app/code/Magento/Adminhtml/Block/Urlrewrite.php @@ -50,20 +50,20 @@ class Urlrewrite extends \Magento\Adminhtml\Block\Widget\Grid\Container */ protected $_urlrewriteSelector; - /** - * @param \Magento\Adminhtml\Block\Urlrewrite\Selector $urlrewriteSelector - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Adminhtml\Block\Urlrewrite\Selector $urlrewriteSelector + * @param array $data */ - public function __construct( - \Magento\Adminhtml\Block\Urlrewrite\Selector $urlrewriteSelector, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Adminhtml\Block\Urlrewrite\Selector $urlrewriteSelector, + array $data = array() + ) { $this->_urlrewriteSelector = $urlrewriteSelector; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Adminhtml/Block/Urlrewrite/Catalog/Category/Edit.php b/app/code/Magento/Adminhtml/Block/Urlrewrite/Catalog/Category/Edit.php index eb63830d34ae5cea66cfd52bf6848a9891517bb3..5d36e90c52d30431aac5a5cdfbf84d4ccd06ccc3 100644 --- a/app/code/Magento/Adminhtml/Block/Urlrewrite/Catalog/Category/Edit.php +++ b/app/code/Magento/Adminhtml/Block/Urlrewrite/Catalog/Category/Edit.php @@ -45,24 +45,24 @@ class Edit */ protected $_categoryFactory; - /** - * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory - * @param \Magento\Core\Model\Url\RewriteFactory $rewriteFactory - * @param \Magento\Backend\Helper\Data $adminhtmlData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url\RewriteFactory $rewriteFactory + * @param \Magento\Backend\Helper\Data $adminhtmlData + * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory + * @param array $data */ - public function __construct( - \Magento\Catalog\Model\CategoryFactory $categoryFactory, - \Magento\Core\Model\Url\RewriteFactory $rewriteFactory, - \Magento\Backend\Helper\Data $adminhtmlData, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url\RewriteFactory $rewriteFactory, + \Magento\Backend\Helper\Data $adminhtmlData, + \Magento\Catalog\Model\CategoryFactory $categoryFactory, + array $data = array() + ) { $this->_categoryFactory = $categoryFactory; - parent::__construct($rewriteFactory, $adminhtmlData, $coreData, $context, $data); + parent::__construct($context, $coreData, $rewriteFactory, $adminhtmlData, $data); } /** diff --git a/app/code/Magento/Adminhtml/Block/Urlrewrite/Catalog/Category/Tree.php b/app/code/Magento/Adminhtml/Block/Urlrewrite/Catalog/Category/Tree.php index 112b806b4f929e17b4e16c1aaa4a4bab04992e92..385ae7a4063d5c7ced1d7c04fa31ddac50d0dfb9 100644 --- a/app/code/Magento/Adminhtml/Block/Urlrewrite/Catalog/Category/Tree.php +++ b/app/code/Magento/Adminhtml/Block/Urlrewrite/Catalog/Category/Tree.php @@ -61,30 +61,30 @@ class Tree extends \Magento\Catalog\Block\Adminhtml\Category\AbstractCategory */ protected $_productFactory; - /** - * @param \Magento\Catalog\Model\ProductFactory $productFactory - * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory - * @param \Magento\Backend\Helper\Data $adminhtmlData - * @param \Magento\Catalog\Model\Resource\Category\Tree $categoryTree - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Catalog\Model\Resource\Category\Tree $categoryTree + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Catalog\Model\ProductFactory $productFactory + * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory + * @param \Magento\Backend\Helper\Data $adminhtmlData + * @param array $data */ - public function __construct( - \Magento\Catalog\Model\ProductFactory $productFactory, - \Magento\Catalog\Model\CategoryFactory $categoryFactory, - \Magento\Backend\Helper\Data $adminhtmlData, - \Magento\Catalog\Model\Resource\Category\Tree $categoryTree, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Catalog\Model\Resource\Category\Tree $categoryTree, + \Magento\Core\Model\Registry $registry, + \Magento\Catalog\Model\ProductFactory $productFactory, + \Magento\Catalog\Model\CategoryFactory $categoryFactory, + \Magento\Backend\Helper\Data $adminhtmlData, + array $data = array() + ) { $this->_categoryFactory = $categoryFactory; $this->_productFactory = $productFactory; $this->_adminhtmlData = $adminhtmlData; - parent::__construct($categoryTree, $coreData, $context, $registry, $data); + parent::__construct($context, $coreData, $categoryTree, $registry, $data); } /** diff --git a/app/code/Magento/Adminhtml/Block/Urlrewrite/Catalog/Edit/Form.php b/app/code/Magento/Adminhtml/Block/Urlrewrite/Catalog/Edit/Form.php index 87e2bbf6f94babc7c29dcc12301c9ab00816ffc1..bfa806ad3afb298729e8ef504c8e22d1809ec284 100644 --- a/app/code/Magento/Adminhtml/Block/Urlrewrite/Catalog/Edit/Form.php +++ b/app/code/Magento/Adminhtml/Block/Urlrewrite/Catalog/Edit/Form.php @@ -61,45 +61,51 @@ class Form extends \Magento\Adminhtml\Block\Urlrewrite\Edit\Form protected $_categoryFactory; /** - * @param \Magento\Catalog\Model\ProductFactory $productFactory - * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory - * @param \Magento\Catalog\Model\Url $catalogUrl + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory * @param \Magento\Core\Model\Source\Urlrewrite\TypesFactory $typesFactory * @param \Magento\Core\Model\Source\Urlrewrite\OptionsFactory $optionFactory * @param \Magento\Core\Model\Url\RewriteFactory $rewriteFactory * @param \Magento\Core\Model\System\Store $systemStore - * @param \Magento\Backend\Model\Session $backendSession * @param \Magento\Backend\Helper\Data $adminhtmlData - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Catalog\Model\ProductFactory $productFactory + * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory + * @param \Magento\Catalog\Model\Url $catalogUrl * @param array $data * * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( - \Magento\Catalog\Model\ProductFactory $productFactory, - \Magento\Catalog\Model\CategoryFactory $categoryFactory, - \Magento\Catalog\Model\Url $catalogUrl, + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, \Magento\Core\Model\Source\Urlrewrite\TypesFactory $typesFactory, \Magento\Core\Model\Source\Urlrewrite\OptionsFactory $optionFactory, \Magento\Core\Model\Url\RewriteFactory $rewriteFactory, \Magento\Core\Model\System\Store $systemStore, - \Magento\Backend\Model\Session $backendSession, \Magento\Backend\Helper\Data $adminhtmlData, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, + \Magento\Catalog\Model\ProductFactory $productFactory, + \Magento\Catalog\Model\CategoryFactory $categoryFactory, + \Magento\Catalog\Model\Url $catalogUrl, array $data = array() ) { $this->_productFactory = $productFactory; $this->_categoryFactory = $categoryFactory; $this->_catalogUrl = $catalogUrl; parent::__construct( - $typesFactory, $optionFactory, $rewriteFactory, $systemStore, $backendSession, $adminhtmlData, $registry, - $formFactory, $coreData, $context, $data + $context, + $coreData, + $registry, + $formFactory, + $typesFactory, + $optionFactory, + $rewriteFactory, + $systemStore, + $adminhtmlData, + $data ); } diff --git a/app/code/Magento/Adminhtml/Block/Urlrewrite/Catalog/Product/Edit.php b/app/code/Magento/Adminhtml/Block/Urlrewrite/Catalog/Product/Edit.php index 96799d5401eddd7f02b0f1aab68ff876620b57cc..da37c7a96d35bf7bebe7d03c29a17dd390b21085 100644 --- a/app/code/Magento/Adminhtml/Block/Urlrewrite/Catalog/Product/Edit.php +++ b/app/code/Magento/Adminhtml/Block/Urlrewrite/Catalog/Product/Edit.php @@ -52,27 +52,27 @@ class Edit extends \Magento\Adminhtml\Block\Urlrewrite\Edit */ protected $_categoryFactory; - /** - * @param \Magento\Catalog\Model\ProductFactory $productFactory - * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory - * @param \Magento\Core\Model\Url\RewriteFactory $rewriteFactory - * @param \Magento\Backend\Helper\Data $adminhtmlData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url\RewriteFactory $rewriteFactory + * @param \Magento\Backend\Helper\Data $adminhtmlData + * @param \Magento\Catalog\Model\ProductFactory $productFactory + * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory + * @param array $data */ - public function __construct( - \Magento\Catalog\Model\ProductFactory $productFactory, - \Magento\Catalog\Model\CategoryFactory $categoryFactory, - \Magento\Core\Model\Url\RewriteFactory $rewriteFactory, - \Magento\Backend\Helper\Data $adminhtmlData, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url\RewriteFactory $rewriteFactory, + \Magento\Backend\Helper\Data $adminhtmlData, + \Magento\Catalog\Model\ProductFactory $productFactory, + \Magento\Catalog\Model\CategoryFactory $categoryFactory, + array $data = array() + ) { $this->_categoryFactory = $categoryFactory; $this->_productFactory = $productFactory; - parent::__construct($rewriteFactory, $adminhtmlData, $coreData, $context, $data); + parent::__construct($context, $coreData, $rewriteFactory, $adminhtmlData, $data); } /** diff --git a/app/code/Magento/Adminhtml/Block/Urlrewrite/Cms/Page/Edit.php b/app/code/Magento/Adminhtml/Block/Urlrewrite/Cms/Page/Edit.php index 21b28ec5647cef42374d2977ae2df1d585c83ec6..be91545f67ac0408dccbf65d7f4dc6164d1fd860 100644 --- a/app/code/Magento/Adminhtml/Block/Urlrewrite/Cms/Page/Edit.php +++ b/app/code/Magento/Adminhtml/Block/Urlrewrite/Cms/Page/Edit.php @@ -43,24 +43,24 @@ class Edit extends \Magento\Adminhtml\Block\Urlrewrite\Edit */ protected $_pageFactory; - /** - * @param \Magento\Cms\Model\PageFactory $pageFactory - * @param \Magento\Core\Model\Url\RewriteFactory $rewriteFactory - * @param \Magento\Backend\Helper\Data $adminhtmlData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url\RewriteFactory $rewriteFactory + * @param \Magento\Backend\Helper\Data $adminhtmlData + * @param \Magento\Cms\Model\PageFactory $pageFactory + * @param array $data */ - public function __construct( - \Magento\Cms\Model\PageFactory $pageFactory, - \Magento\Core\Model\Url\RewriteFactory $rewriteFactory, - \Magento\Backend\Helper\Data $adminhtmlData, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url\RewriteFactory $rewriteFactory, + \Magento\Backend\Helper\Data $adminhtmlData, + \Magento\Cms\Model\PageFactory $pageFactory, + array $data = array() + ) { $this->_pageFactory = $pageFactory; - parent::__construct($rewriteFactory, $adminhtmlData, $coreData, $context, $data); + parent::__construct($context, $coreData, $rewriteFactory, $adminhtmlData, $data); } /** diff --git a/app/code/Magento/Adminhtml/Block/Urlrewrite/Cms/Page/Edit/Form.php b/app/code/Magento/Adminhtml/Block/Urlrewrite/Cms/Page/Edit/Form.php index f7a1a53addb90afcab4512fed55238589d8926bd..b066a100577479a1ff7d4249ec45687dd85b0dcd 100644 --- a/app/code/Magento/Adminhtml/Block/Urlrewrite/Cms/Page/Edit/Form.php +++ b/app/code/Magento/Adminhtml/Block/Urlrewrite/Cms/Page/Edit/Form.php @@ -54,42 +54,48 @@ class Form extends \Magento\Adminhtml\Block\Urlrewrite\Edit\Form protected $_urlRewriteFactory; /** - * @param \Magento\Cms\Model\Page\UrlrewriteFactory $urlRewriteFactory - * @param \Magento\Cms\Model\PageFactory $pageFactory + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory * @param \Magento\Core\Model\Source\Urlrewrite\TypesFactory $typesFactory * @param \Magento\Core\Model\Source\Urlrewrite\OptionsFactory $optionFactory * @param \Magento\Core\Model\Url\RewriteFactory $rewriteFactory * @param \Magento\Core\Model\System\Store $systemStore - * @param \Magento\Backend\Model\Session $backendSession * @param \Magento\Backend\Helper\Data $adminhtmlData - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Cms\Model\Page\UrlrewriteFactory $urlRewriteFactory + * @param \Magento\Cms\Model\PageFactory $pageFactory * @param array $data * * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( - \Magento\Cms\Model\Page\UrlrewriteFactory $urlRewriteFactory, - \Magento\Cms\Model\PageFactory $pageFactory, + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, \Magento\Core\Model\Source\Urlrewrite\TypesFactory $typesFactory, \Magento\Core\Model\Source\Urlrewrite\OptionsFactory $optionFactory, \Magento\Core\Model\Url\RewriteFactory $rewriteFactory, \Magento\Core\Model\System\Store $systemStore, - \Magento\Backend\Model\Session $backendSession, \Magento\Backend\Helper\Data $adminhtmlData, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, + \Magento\Cms\Model\Page\UrlrewriteFactory $urlRewriteFactory, + \Magento\Cms\Model\PageFactory $pageFactory, array $data = array() ) { $this->_urlRewriteFactory = $urlRewriteFactory; $this->_pageFactory = $pageFactory; parent::__construct( - $typesFactory, $optionFactory, $rewriteFactory, $systemStore, $backendSession, $adminhtmlData, $registry, - $formFactory, $coreData, $context, $data + $context, + $coreData, + $registry, + $formFactory, + $typesFactory, + $optionFactory, + $rewriteFactory, + $systemStore, + $adminhtmlData, + $data ); } diff --git a/app/code/Magento/Adminhtml/Block/Urlrewrite/Edit.php b/app/code/Magento/Adminhtml/Block/Urlrewrite/Edit.php index 9027b3d0fc0fedab582db75bb5ebdcc90557007a..62f85dd7de96d06aaed2a260b63725a7c90393bf 100644 --- a/app/code/Magento/Adminhtml/Block/Urlrewrite/Edit.php +++ b/app/code/Magento/Adminhtml/Block/Urlrewrite/Edit.php @@ -69,23 +69,23 @@ class Edit extends \Magento\Adminhtml\Block\Widget\Container */ protected $_rewriteFactory; - /** - * @param \Magento\Core\Model\Url\RewriteFactory $rewriteFactory - * @param \Magento\Backend\Helper\Data $adminhtmlData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url\RewriteFactory $rewriteFactory + * @param \Magento\Backend\Helper\Data $adminhtmlData + * @param array $data */ - public function __construct( - \Magento\Core\Model\Url\RewriteFactory $rewriteFactory, - \Magento\Backend\Helper\Data $adminhtmlData, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url\RewriteFactory $rewriteFactory, + \Magento\Backend\Helper\Data $adminhtmlData, + array $data = array() + ) { $this->_rewriteFactory = $rewriteFactory; $this->_adminhtmlData = $adminhtmlData; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Adminhtml/Block/Urlrewrite/Edit/Form.php b/app/code/Magento/Adminhtml/Block/Urlrewrite/Edit/Form.php index 7c2b06f3fe90c7cff7ce694550c7faac3337b595..640a40be19d16781110bf273dc34ea8a558cf3ee 100644 --- a/app/code/Magento/Adminhtml/Block/Urlrewrite/Edit/Form.php +++ b/app/code/Magento/Adminhtml/Block/Urlrewrite/Edit/Form.php @@ -69,11 +69,6 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic */ protected $_adminhtmlData = null; - /** - * @var \Magento\Backend\Model\Session - */ - protected $_backendSession; - /** * @var \Magento\Core\Model\System\Store */ @@ -95,40 +90,37 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic protected $_typesFactory; /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory * @param \Magento\Core\Model\Source\Urlrewrite\TypesFactory $typesFactory * @param \Magento\Core\Model\Source\Urlrewrite\OptionsFactory $optionFactory * @param \Magento\Core\Model\Url\RewriteFactory $rewriteFactory * @param \Magento\Core\Model\System\Store $systemStore - * @param \Magento\Backend\Model\Session $backendSession * @param \Magento\Backend\Helper\Data $adminhtmlData - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context * @param array $data * * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, \Magento\Core\Model\Source\Urlrewrite\TypesFactory $typesFactory, \Magento\Core\Model\Source\Urlrewrite\OptionsFactory $optionFactory, \Magento\Core\Model\Url\RewriteFactory $rewriteFactory, \Magento\Core\Model\System\Store $systemStore, - \Magento\Backend\Model\Session $backendSession, \Magento\Backend\Helper\Data $adminhtmlData, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, array $data = array() ) { $this->_typesFactory = $typesFactory; $this->_optionFactory = $optionFactory; $this->_rewriteFactory = $rewriteFactory; $this->_systemStore = $systemStore; - $this->_backendSession = $backendSession; $this->_adminhtmlData = $adminhtmlData; - parent::__construct($registry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); } /** diff --git a/app/code/Magento/Adminhtml/Block/Urlrewrite/Link.php b/app/code/Magento/Adminhtml/Block/Urlrewrite/Link.php index 588f3dd61fd4ba70cb97b982c1362435a520ccd5..b9e48dc84ac3eca982dca82305a2e2293f3ff373 100644 --- a/app/code/Magento/Adminhtml/Block/Urlrewrite/Link.php +++ b/app/code/Magento/Adminhtml/Block/Urlrewrite/Link.php @@ -37,7 +37,7 @@ */ namespace Magento\Adminhtml\Block\Urlrewrite; -class Link extends \Magento\Core\Block\AbstractBlock +class Link extends \Magento\View\Block\AbstractBlock { /** * Render output diff --git a/app/code/Magento/Adminhtml/Block/Urlrewrite/Selector.php b/app/code/Magento/Adminhtml/Block/Urlrewrite/Selector.php index 26cdac523bb3dd4f5a1f26611d83b3dbb2f65af0..f9c3d2557674be1c0b377fb686593ce2d1eb04e7 100644 --- a/app/code/Magento/Adminhtml/Block/Urlrewrite/Selector.php +++ b/app/code/Magento/Adminhtml/Block/Urlrewrite/Selector.php @@ -33,7 +33,7 @@ */ namespace Magento\Adminhtml\Block\Urlrewrite; -class Selector extends \Magento\Core\Block\Template +class Selector extends \Magento\View\Block\Template { /** * List of available modes from source model diff --git a/app/code/Magento/Adminhtml/Controller/Newsletter/Problem.php b/app/code/Magento/Adminhtml/Controller/Newsletter/Problem.php index 149d34db364f1037f5380617c0c2591a80410086..e8a921042102cca73c9b465e0878f8cf28c94ecc 100644 --- a/app/code/Magento/Adminhtml/Controller/Newsletter/Problem.php +++ b/app/code/Magento/Adminhtml/Controller/Newsletter/Problem.php @@ -33,27 +33,27 @@ */ namespace Magento\Adminhtml\Controller\Newsletter; -class Problem extends \Magento\Backend\Controller\Adminhtml\Action +class Problem extends \Magento\Backend\App\Action { public function indexAction() { - $this->_title(__('Newsletter Problems Report')); + $this->_title->add(__('Newsletter Problems Report')); if ($this->getRequest()->getQuery('ajax')) { $this->_forward('grid'); return; } - $this->getLayout()->getMessagesBlock()->setMessages( + $this->_view->getLayout()->getMessagesBlock()->setMessages( $this->_objectManager->get('Magento\Adminhtml\Model\Session')->getMessages(true) ); - $this->loadLayout(); + $this->_view->loadLayout(); $this->_setActiveMenu('Magento_Newsletter::newsletter_problem'); $this->_addBreadcrumb(__('Newsletter Problem Reports'), __('Newsletter Problem Reports')); - $this->renderLayout(); + $this->_view->renderLayout(); } public function gridAction() @@ -89,10 +89,10 @@ class Problem extends \Magento\Backend\Controller\Adminhtml\Action $this->_objectManager->get('Magento\Adminhtml\Model\Session') ->addSuccess(__('The problems you identified have been deleted.')); } - $this->getLayout()->getMessagesBlock()->setMessages($this->_objectManager->get('Magento\Adminhtml\Model\Session')->getMessages(true)); + $this->_view->getLayout()->getMessagesBlock()->setMessages($this->_objectManager->get('Magento\Adminhtml\Model\Session')->getMessages(true)); - $this->loadLayout(false); - $this->renderLayout(); + $this->_view->loadLayout(false); + $this->_view->renderLayout(); } protected function _isAllowed() diff --git a/app/code/Magento/Adminhtml/Controller/Newsletter/Queue.php b/app/code/Magento/Adminhtml/Controller/Newsletter/Queue.php index 295f7f47b4f0552d9b476beae8c1bba5f992091f..440e022e2ca8f5e9d700567a2dfe102248e37a86 100644 --- a/app/code/Magento/Adminhtml/Controller/Newsletter/Queue.php +++ b/app/code/Magento/Adminhtml/Controller/Newsletter/Queue.php @@ -33,7 +33,7 @@ */ namespace Magento\Adminhtml\Controller\Newsletter; -class Queue extends \Magento\Backend\Controller\Adminhtml\Action +class Queue extends \Magento\Backend\App\Action { /** * Core registry @@ -43,11 +43,11 @@ class Queue extends \Magento\Backend\Controller\Adminhtml\Action protected $_coreRegistry = null; /** - * @param \Magento\Backend\Controller\Context $context + * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Core\Model\Registry $coreRegistry */ public function __construct( - \Magento\Backend\Controller\Context $context, + \Magento\Backend\App\Action\Context $context, \Magento\Core\Model\Registry $coreRegistry ) { $this->_coreRegistry = $coreRegistry; @@ -59,20 +59,20 @@ class Queue extends \Magento\Backend\Controller\Adminhtml\Action */ public function indexAction() { - $this->_title(__('Newsletter Queue')); + $this->_title->add(__('Newsletter Queue')); if ($this->getRequest()->getQuery('ajax')) { $this->_forward('grid'); return; } - $this->loadLayout(); + $this->_view->loadLayout(); $this->_setActiveMenu('Magento_Newsletter::newsletter_queue'); $this->_addBreadcrumb(__('Newsletter Queue'), __('Newsletter Queue')); - $this->renderLayout(); + $this->_view->renderLayout(); } @@ -81,8 +81,8 @@ class Queue extends \Magento\Backend\Controller\Adminhtml\Action */ public function dropAction() { - $this->loadLayout('newsletter_queue_preview'); - $this->renderLayout(); + $this->_view->loadLayout('newsletter_queue_preview'); + $this->_view->renderLayout(); } /** @@ -90,10 +90,10 @@ class Queue extends \Magento\Backend\Controller\Adminhtml\Action */ public function previewAction() { - $this->loadLayout(); + $this->_view->loadLayout(); $data = $this->getRequest()->getParams(); if (empty($data) || !isset($data['id'])) { - $this->_forward('noRoute'); + $this->_forward('noroute'); return $this; } @@ -101,8 +101,8 @@ class Queue extends \Magento\Backend\Controller\Adminhtml\Action $data['preview_store_id'] = $this->_objectManager->get('Magento\Core\Model\StoreManager') ->getDefaultStoreView()->getId(); - $this->getLayout()->getBlock('preview_form')->setFormData($data); - $this->renderLayout(); + $this->_view->getLayout()->getBlock('preview_form')->setFormData($data); + $this->_view->renderLayout(); } /** @@ -110,8 +110,8 @@ class Queue extends \Magento\Backend\Controller\Adminhtml\Action */ public function gridAction() { - $this->loadLayout(false); - $this->renderLayout(); + $this->_view->loadLayout(false); + $this->_view->renderLayout(); } public function startAction() @@ -202,7 +202,7 @@ class Queue extends \Magento\Backend\Controller\Adminhtml\Action public function editAction() { - $this->_title(__('Newsletter Queue')); + $this->_title->add(__('Newsletter Queue')); $this->_coreRegistry->register('current_queue', $this->_objectManager->get('Magento\Newsletter\Model\Queue')); @@ -216,9 +216,9 @@ class Queue extends \Magento\Backend\Controller\Adminhtml\Action $queue = $this->_coreRegistry->registry('current_queue')->setTemplateId($template->getId()); } - $this->_title(__('Edit Queue')); + $this->_title->add(__('Edit Queue')); - $this->loadLayout(); + $this->_view->loadLayout(); $this->_setActiveMenu('Magento_Newsletter::newsletter_queue'); @@ -229,7 +229,7 @@ class Queue extends \Magento\Backend\Controller\Adminhtml\Action ); $this->_addBreadcrumb(__('Edit Queue'), __('Edit Queue')); - $this->renderLayout(); + $this->_view->renderLayout(); } public function saveAction() @@ -289,7 +289,7 @@ class Queue extends \Magento\Backend\Controller\Adminhtml\Action if ($id) { $this->_redirect('adminhtml/*/edit', array('id' => $id)); } else { - $this->_redirectReferer(); + $this->getResponse()->setRedirect($this->_redirect->getRedirectUrl($this->getUrl('*'))); } } } diff --git a/app/code/Magento/Adminhtml/Controller/Newsletter/Subscriber.php b/app/code/Magento/Adminhtml/Controller/Newsletter/Subscriber.php index a768e0bad69135c620f3af9d4e8a6d19314a1bec..a91f652f1266fb3502b35c8ff212f4fac1b55adc 100644 --- a/app/code/Magento/Adminhtml/Controller/Newsletter/Subscriber.php +++ b/app/code/Magento/Adminhtml/Controller/Newsletter/Subscriber.php @@ -33,32 +33,48 @@ */ namespace Magento\Adminhtml\Controller\Newsletter; -class Subscriber extends \Magento\Backend\Controller\Adminhtml\Action +class Subscriber extends \Magento\Backend\App\Action { + /** + * @var \Magento\App\Response\Http\FileFactory + */ + protected $_fileFactory; + + /** + * @param \Magento\Backend\App\Action\Context $context + * @param \Magento\App\Response\Http\FileFactory $fileFactory + */ + public function __construct( + \Magento\Backend\App\Action\Context $context, + \Magento\App\Response\Http\FileFactory $fileFactory + ) { + $this->_fileFactory = $fileFactory; + parent::__construct($context); + } public function indexAction() { - $this->_title(__('Newsletter Subscribers')); + $this->_title->add(__('Newsletter Subscribers')); if ($this->getRequest()->getParam('ajax')) { $this->_forward('grid'); return; } - $this->loadLayout(); + $this->_view->loadLayout(); $this->_setActiveMenu('Magento_Newsletter::newsletter_subscriber'); $this->_addBreadcrumb(__('Newsletter'), __('Newsletter')); $this->_addBreadcrumb(__('Subscribers'), __('Subscribers')); - $this->renderLayout(); + $this->_view->renderLayout(); } public function gridAction() { - $this->loadLayout(false); - $this->renderLayout(); + $this->_view->loadLayout(false); + $this->_view->renderLayout(); } /** @@ -66,11 +82,11 @@ class Subscriber extends \Magento\Backend\Controller\Adminhtml\Action */ public function exportCsvAction() { - $this->loadLayout(); + $this->_view->loadLayout(); $fileName = 'subscribers.csv'; - $content = $this->getLayout()->getChildBlock('adminhtml.newslettrer.subscriber.grid', 'grid.export'); + $content = $this->_view->getLayout()->getChildBlock('adminhtml.newslettrer.subscriber.grid', 'grid.export'); - $this->_prepareDownloadResponse($fileName, $content->getCsvFile($fileName)); + return $this->_fileFactory->create($fileName, $content->getCsvFile($fileName)); } /** @@ -78,10 +94,10 @@ class Subscriber extends \Magento\Backend\Controller\Adminhtml\Action */ public function exportXmlAction() { - $this->loadLayout(); + $this->_view->loadLayout(); $fileName = 'subscribers.xml'; - $content = $this->getLayout()->getChildBlock('adminhtml.newslettrer.subscriber.grid', 'grid.export'); - $this->_prepareDownloadResponse($fileName, $content->getExcelFile($fileName)); + $content = $this->_view->getLayout()->getChildBlock('adminhtml.newslettrer.subscriber.grid', 'grid.export'); + return $this->_fileFactory->create($fileName, $content->getExcelFile($fileName)); } public function massUnsubscribeAction() diff --git a/app/code/Magento/Adminhtml/Controller/Newsletter/Template.php b/app/code/Magento/Adminhtml/Controller/Newsletter/Template.php index 9b17d8cf37ebfd59b133dddbcf7e609d6f6e1b82..53537fe7b08232e6b919ead5f7e14c89f9c1bb6a 100644 --- a/app/code/Magento/Adminhtml/Controller/Newsletter/Template.php +++ b/app/code/Magento/Adminhtml/Controller/Newsletter/Template.php @@ -32,7 +32,7 @@ */ namespace Magento\Adminhtml\Controller\Newsletter; -class Template extends \Magento\Backend\Controller\Adminhtml\Action +class Template extends \Magento\Backend\App\Action { /** * Core registry @@ -40,13 +40,12 @@ class Template extends \Magento\Backend\Controller\Adminhtml\Action * @var \Magento\Core\Model\Registry */ protected $_coreRegistry = null; - /** - * @param \Magento\Backend\Controller\Context $context + * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Core\Model\Registry $coreRegistry */ public function __construct( - \Magento\Backend\Controller\Context $context, + \Magento\Backend\App\Action\Context $context, \Magento\Core\Model\Registry $coreRegistry ) { $this->_coreRegistry = $coreRegistry; @@ -71,7 +70,7 @@ class Template extends \Magento\Backend\Controller\Adminhtml\Action */ protected function _setTitle() { - return $this->_title(__('Newsletter Templates')); + return $this->_title->add(__('Newsletter Templates')); } /** @@ -86,11 +85,11 @@ class Template extends \Magento\Backend\Controller\Adminhtml\Action $this->_forward('grid'); return; } - $this->loadLayout(); + $this->_view->loadLayout(); $this->_setActiveMenu('Magento_Newsletter::newsletter_template'); $this->_addBreadcrumb(__('Newsletter Templates'), __('Newsletter Templates')); - $this->_addContent($this->getLayout()->createBlock('Magento\Adminhtml\Block\Newsletter\Template', 'template')); - $this->renderLayout(); + $this->_addContent($this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Newsletter\Template', 'template')); + $this->_view->renderLayout(); } /** @@ -99,8 +98,8 @@ class Template extends \Magento\Backend\Controller\Adminhtml\Action */ public function gridAction() { - $this->loadLayout(); - $grid = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Newsletter\Template\Grid') + $this->_view->loadLayout(); + $grid = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Newsletter\Template\Grid') ->toHtml(); $this->getResponse()->setBody($grid); } @@ -130,7 +129,7 @@ class Template extends \Magento\Backend\Controller\Adminhtml\Action $this->_coreRegistry->register('_current_template', $model); - $this->loadLayout(); + $this->_view->loadLayout(); $this->_setActiveMenu('Magento_Newsletter::newsletter_template'); if ($model->getId()) { @@ -141,7 +140,7 @@ class Template extends \Magento\Backend\Controller\Adminhtml\Action $breadcrumbLabel = __('Create Newsletter Template'); } - $this->_title($model->getId() ? $model->getTemplateCode() : __('New Template')); + $this->_title->add($model->getId() ? $model->getTemplateCode() : __('New Template')); $this->_addBreadcrumb($breadcrumbLabel, $breadcrumbTitle); @@ -151,12 +150,12 @@ class Template extends \Magento\Backend\Controller\Adminhtml\Action $model->addData($values); } - $editBlock = $this->getLayout()->getBlock('template_edit'); + $editBlock = $this->_view->getLayout()->getBlock('template_edit'); if ($editBlock) { $editBlock->setEditMode($model->getId() > 0); } - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -165,8 +164,8 @@ class Template extends \Magento\Backend\Controller\Adminhtml\Action */ public function dropAction() { - $this->loadLayout('newsletter_template_preview'); - $this->renderLayout(); + $this->_view->loadLayout('newsletter_template_preview'); + $this->_view->renderLayout(); } /** @@ -259,11 +258,11 @@ class Template extends \Magento\Backend\Controller\Adminhtml\Action public function previewAction() { $this->_setTitle(); - $this->loadLayout(); + $this->_view->loadLayout(); $data = $this->getRequest()->getParams(); if (empty($data) || !isset($data['id'])) { - $this->_forward('noRoute'); + $this->_forward('noroute'); return $this; } @@ -271,7 +270,7 @@ class Template extends \Magento\Backend\Controller\Adminhtml\Action $data['preview_store_id'] = $this->_objectManager->get('Magento\Core\Model\StoreManager') ->getDefaultStoreView()->getId(); - $this->getLayout()->getBlock('preview_form')->setFormData($data); - $this->renderLayout(); + $this->_view->getLayout()->getBlock('preview_form')->setFormData($data); + $this->_view->renderLayout(); } } diff --git a/app/code/Magento/Adminhtml/Controller/Report.php b/app/code/Magento/Adminhtml/Controller/Report.php index c550488c9bf4f0e850e540a92d93ce8df9a8f337..45ed4c367ed3493686dfe890b0469d867a1b77d6 100644 --- a/app/code/Magento/Adminhtml/Controller/Report.php +++ b/app/code/Magento/Adminhtml/Controller/Report.php @@ -33,26 +33,43 @@ */ namespace Magento\Adminhtml\Controller; -class Report extends \Magento\Backend\Controller\Adminhtml\Action +class Report extends \Magento\Backend\App\Action { + /** + * @var \Magento\App\Response\Http\FileFactory + */ + protected $_fileFactory; + + /** + * @param \Magento\Backend\App\Action\Context $context + * @param \Magento\App\Response\Http\FileFactory $fileFactory + */ + public function __construct( + \Magento\Backend\App\Action\Context $context, + \Magento\App\Response\Http\FileFactory $fileFactory + ) { + $this->_fileFactory = $fileFactory; + parent::__construct($context); + } + public function _initAction() { - $this->loadLayout() - ->_addBreadcrumb(__('Reports'), __('Reports')); + $this->_view->loadLayout(); + $this->_addBreadcrumb(__('Reports'), __('Reports')); return $this; } public function searchAction() { - $this->_title(__('Search Terms Report')); + $this->_title->add(__('Search Terms Report')); $this->_eventManager->dispatch('on_view_report', array('report' => 'search')); $this->_initAction() ->_setActiveMenu('Magento_Reports::report_search') - ->_addBreadcrumb(__('Search Terms'), __('Search Terms')) - ->renderLayout(); + ->_addBreadcrumb(__('Search Terms'), __('Search Terms')); + $this->_view->renderLayout(); } /** @@ -60,9 +77,9 @@ class Report extends \Magento\Backend\Controller\Adminhtml\Action */ public function exportSearchCsvAction() { - $this->loadLayout(false); - $content = $this->getLayout()->getChildBlock('adminhtml.report.search.grid', 'grid.export'); - $this->_prepareDownloadResponse('search.csv', $content->getCsvFile()); + $this->_view->loadLayout(false); + $content = $this->_view->getLayout()->getChildBlock('adminhtml.report.search.grid', 'grid.export'); + return $this->_fileFactory->create('search.csv', $content->getCsvFile()); } /** @@ -70,9 +87,9 @@ class Report extends \Magento\Backend\Controller\Adminhtml\Action */ public function exportSearchExcelAction() { - $this->loadLayout(false); - $content = $this->getLayout()->getChildBlock('adminhtml.report.search.grid', 'grid.export'); - $this->_prepareDownloadResponse('search.xml', $content->getExcelFile()); + $this->_view->loadLayout(false); + $content = $this->_view->getLayout()->getChildBlock('adminhtml.report.search.grid', 'grid.export'); + return $this->_fileFactory->create('search.xml', $content->getExcelFile()); } protected function _isAllowed() diff --git a/app/code/Magento/Adminhtml/Controller/Report/AbstractReport.php b/app/code/Magento/Adminhtml/Controller/Report/AbstractReport.php index 5d6a4d569e63e271b445f3d79e4237d586331530..21c7d398f839ac4820a95a07e9be3ce411b84235 100644 --- a/app/code/Magento/Adminhtml/Controller/Report/AbstractReport.php +++ b/app/code/Magento/Adminhtml/Controller/Report/AbstractReport.php @@ -34,8 +34,33 @@ */ namespace Magento\Adminhtml\Controller\Report; -abstract class AbstractReport extends \Magento\Backend\Controller\Adminhtml\Action +abstract class AbstractReport extends \Magento\Backend\App\Action { + /** + * @var \Magento\App\Response\Http\FileFactory + */ + protected $_fileFactory; + + /** + * @var \Magento\Core\Filter\Date + */ + protected $_dateFilter; + + /** + * @param \Magento\Backend\App\Action\Context $context + * @param \Magento\App\Response\Http\FileFactory $fileFactory + * @param \Magento\Core\Filter\Date $dateFilter + */ + public function __construct( + \Magento\Backend\App\Action\Context $context, + \Magento\App\Response\Http\FileFactory $fileFactory, + \Magento\Core\Filter\Date $dateFilter + ) { + parent::__construct($context); + $this->_fileFactory = $fileFactory; + $this->_dateFilter = $dateFilter; + } + /** * Admin session model * @@ -63,8 +88,8 @@ abstract class AbstractReport extends \Magento\Backend\Controller\Adminhtml\Acti */ public function _initAction() { - $this->loadLayout() - ->_addBreadcrumb(__('Reports'), __('Reports')); + $this->_view->loadLayout(); + $this->_addBreadcrumb(__('Reports'), __('Reports')); return $this; } @@ -82,7 +107,9 @@ abstract class AbstractReport extends \Magento\Backend\Controller\Adminhtml\Acti $requestData = $this->_objectManager->get('Magento\Adminhtml\Helper\Data') ->prepareFilterString($this->getRequest()->getParam('filter')); - $requestData = $this->_filterDates($requestData, array('from', 'to')); + $inputFilter = new \Zend_Filter_Input(array('from' => $this->_dateFilter, 'to' => $this->_dateFilter), + array(), $requestData); + $requestData = $inputFilter->getUnescaped(); $requestData['store_ids'] = $this->getRequest()->getParam('store_ids'); $params = new \Magento\Object(); diff --git a/app/code/Magento/Adminhtml/Controller/Report/Customer.php b/app/code/Magento/Adminhtml/Controller/Report/Customer.php index ad5fcdb9f808b4cd6aeecd485571703340491122..da40a61d283b6cb30b397c8d9698adeb8f50dd9a 100644 --- a/app/code/Magento/Adminhtml/Controller/Report/Customer.php +++ b/app/code/Magento/Adminhtml/Controller/Report/Customer.php @@ -34,8 +34,25 @@ */ namespace Magento\Adminhtml\Controller\Report; -class Customer extends \Magento\Backend\Controller\Adminhtml\Action +class Customer extends \Magento\Backend\App\Action { + /** + * @var \Magento\App\Response\Http\FileFactory + */ + protected $_fileFactory; + + /** + * @param \Magento\Backend\App\Action\Context $context + * @param \Magento\App\Response\Http\FileFactory $fileFactory + */ + public function __construct( + \Magento\Backend\App\Action\Context $context, + \Magento\App\Response\Http\FileFactory $fileFactory + ) { + $this->_fileFactory = $fileFactory; + parent::__construct($context); + } + public function _initAction() { $act = $this->getRequest()->getActionName(); @@ -43,29 +60,29 @@ class Customer extends \Magento\Backend\Controller\Adminhtml\Action $act = 'default'; } - $this->loadLayout() - ->_addBreadcrumb( - __('Reports'), - __('Reports') - ) - ->_addBreadcrumb( - __('Customers'), - __('Customers') - ); + $this->_view->loadLayout(); + $this->_addBreadcrumb( + __('Reports'), + __('Reports') + ); + $this->_addBreadcrumb( + __('Customers'), + __('Customers') + ); return $this; } public function accountsAction() { - $this->_title(__('New Accounts Report')); + $this->_title->add(__('New Accounts Report')); $this->_initAction() ->_setActiveMenu('Magento_Reports::report_customers_accounts') ->_addBreadcrumb( __('New Accounts'), __('New Accounts') - ) - ->renderLayout(); + ); + $this->_view->renderLayout(); } /** @@ -73,11 +90,11 @@ class Customer extends \Magento\Backend\Controller\Adminhtml\Action */ public function exportAccountsCsvAction() { - $this->loadLayout(); + $this->_view->loadLayout(); $fileName = 'new_accounts.csv'; /** @var \Magento\Backend\Block\Widget\Grid\ExportInterface $exportBlock */ - $exportBlock = $this->getLayout()->getChildBlock('adminhtml.report.grid', 'grid.export'); - $this->_prepareDownloadResponse($fileName, $exportBlock->getCsvFile()); + $exportBlock = $this->_view->getLayout()->getChildBlock('adminhtml.report.grid', 'grid.export'); + return $this->_fileFactory->create($fileName, $exportBlock->getCsvFile()); } /** @@ -85,22 +102,22 @@ class Customer extends \Magento\Backend\Controller\Adminhtml\Action */ public function exportAccountsExcelAction() { - $this->loadLayout(); + $this->_view->loadLayout(); $fileName = 'new_accounts.xml'; /** @var \Magento\Backend\Block\Widget\Grid\ExportInterface $exportBlock */ - $exportBlock = $this->getLayout()->getChildBlock('adminhtml.report.grid', 'grid.export'); - $this->_prepareDownloadResponse($fileName, $exportBlock->getExcelFile($fileName)); + $exportBlock = $this->_view->getLayout()->getChildBlock('adminhtml.report.grid', 'grid.export'); + return $this->_fileFactory->create($fileName, $exportBlock->getExcelFile($fileName)); } public function ordersAction() { - $this->_title(__('Order Count Report')); + $this->_title->add(__('Order Count Report')); $this->_initAction() ->_setActiveMenu('Magento_Reports::report_customers_orders') ->_addBreadcrumb(__('Customers by Number of Orders'), - __('Customers by Number of Orders')) - ->renderLayout(); + __('Customers by Number of Orders')); + $this->_view->renderLayout(); } /** @@ -108,11 +125,11 @@ class Customer extends \Magento\Backend\Controller\Adminhtml\Action */ public function exportOrdersCsvAction() { - $this->loadLayout(); + $this->_view->loadLayout(); $fileName = 'customers_orders.csv'; /** @var \Magento\Backend\Block\Widget\Grid\ExportInterface $exportBlock */ - $exportBlock = $this->getLayout()->getChildBlock('adminhtml.report.grid', 'grid.export'); - $this->_prepareDownloadResponse($fileName, $exportBlock->getCsvFile()); + $exportBlock = $this->_view->getLayout()->getChildBlock('adminhtml.report.grid', 'grid.export'); + return $this->_fileFactory->create($fileName, $exportBlock->getCsvFile()); } /** @@ -120,22 +137,22 @@ class Customer extends \Magento\Backend\Controller\Adminhtml\Action */ public function exportOrdersExcelAction() { - $this->loadLayout(); + $this->_view->loadLayout(); $fileName = 'customers_orders.xml'; /** @var \Magento\Backend\Block\Widget\Grid\ExportInterface $exportBlock */ - $exportBlock = $this->getLayout()->getChildBlock('adminhtml.report.grid', 'grid.export'); - $this->_prepareDownloadResponse($fileName, $exportBlock->getExcelFile($fileName)); + $exportBlock = $this->_view->getLayout()->getChildBlock('adminhtml.report.grid', 'grid.export'); + return $this->_fileFactory->create($fileName, $exportBlock->getExcelFile($fileName)); } public function totalsAction() { - $this->_title(__('Order Total Report')); + $this->_title->add(__('Order Total Report')); $this->_initAction() ->_setActiveMenu('Magento_Reports::report_customers_totals') ->_addBreadcrumb(__('Customers by Orders Total'), - __('Customers by Orders Total')) - ->renderLayout(); + __('Customers by Orders Total')); + $this->_view->renderLayout(); } /** @@ -143,11 +160,11 @@ class Customer extends \Magento\Backend\Controller\Adminhtml\Action */ public function exportTotalsCsvAction() { - $this->loadLayout(); + $this->_view->loadLayout(); $fileName = 'customer_totals.csv'; /** @var \Magento\Backend\Block\Widget\Grid\ExportInterface $exportBlock */ - $exportBlock = $this->getLayout()->getChildBlock('adminhtml.report.grid', 'grid.export'); - $this->_prepareDownloadResponse($fileName, $exportBlock->getCsvFile()); + $exportBlock = $this->_view->getLayout()->getChildBlock('adminhtml.report.grid', 'grid.export'); + return $this->_fileFactory->create($fileName, $exportBlock->getCsvFile()); } /** @@ -155,11 +172,11 @@ class Customer extends \Magento\Backend\Controller\Adminhtml\Action */ public function exportTotalsExcelAction() { - $this->loadLayout(); + $this->_view->loadLayout(); $fileName = 'customer_totals.xml'; /** @var \Magento\Backend\Block\Widget\Grid\ExportInterface $exportBlock */ - $exportBlock = $this->getLayout()->getChildBlock('adminhtml.report.grid', 'grid.export'); - $this->_prepareDownloadResponse($fileName, $exportBlock->getExcelFile($fileName)); + $exportBlock = $this->_view->getLayout()->getChildBlock('adminhtml.report.grid', 'grid.export'); + return $this->_fileFactory->create($fileName, $exportBlock->getExcelFile($fileName)); } protected function _isAllowed() diff --git a/app/code/Magento/Adminhtml/Controller/Report/Product.php b/app/code/Magento/Adminhtml/Controller/Report/Product.php index 356c49ddbf85ad5f62544edc473b0674f76f51b7..5365f1e4a9f9bf959da53a015ed82e3d1cfb4306 100644 --- a/app/code/Magento/Adminhtml/Controller/Report/Product.php +++ b/app/code/Magento/Adminhtml/Controller/Report/Product.php @@ -57,14 +57,14 @@ class Product extends \Magento\Adminhtml\Controller\Report\AbstractReport */ public function soldAction() { - $this->_title(__('Ordered Products Report')); + $this->_title->add(__('Ordered Products Report')); $this->_initAction() ->_setActiveMenu('Magento_Reports::report_products_sold') ->_addBreadcrumb( __('Products Ordered'), __('Products Ordered') - ) - ->renderLayout(); + ); + $this->_view->renderLayout(); } /** @@ -73,11 +73,11 @@ class Product extends \Magento\Adminhtml\Controller\Report\AbstractReport */ public function exportSoldCsvAction() { - $this->loadLayout(); + $this->_view->loadLayout(); $fileName = 'products_ordered.csv'; /** @var \Magento\Backend\Block\Widget\Grid\ExportInterface $exportBlock */ - $exportBlock = $this->getLayout()->getChildBlock('adminhtml.report.grid', 'grid.export'); - $this->_prepareDownloadResponse($fileName, $exportBlock->getCsvFile()); + $exportBlock = $this->_view->getLayout()->getChildBlock('adminhtml.report.grid', 'grid.export'); + return $this->_fileFactory->create($fileName, $exportBlock->getCsvFile()); } /** @@ -86,11 +86,11 @@ class Product extends \Magento\Adminhtml\Controller\Report\AbstractReport */ public function exportSoldExcelAction() { - $this->loadLayout(); + $this->_view->loadLayout(); $fileName = 'products_ordered.xml'; /** @var \Magento\Backend\Block\Widget\Grid\ExportInterface $exportBlock */ - $exportBlock = $this->getLayout()->getChildBlock('adminhtml.report.grid', 'grid.export'); - $this->_prepareDownloadResponse($fileName, $exportBlock->getExcelFile($fileName)); + $exportBlock = $this->_view->getLayout()->getChildBlock('adminhtml.report.grid', 'grid.export'); + return $this->_fileFactory->create($fileName, $exportBlock->getExcelFile($fileName)); } /** @@ -99,7 +99,7 @@ class Product extends \Magento\Adminhtml\Controller\Report\AbstractReport */ public function viewedAction() { - $this->_title(__('Product Views Report')); + $this->_title->add(__('Product Views Report')); $this->_showLastExecutionTime(\Magento\Reports\Model\Flag::REPORT_PRODUCT_VIEWED_FLAG_CODE, 'viewed'); @@ -110,15 +110,15 @@ class Product extends \Magento\Adminhtml\Controller\Report\AbstractReport __('Products Most Viewed Report') ); - $gridBlock = $this->getLayout()->getBlock('report_product_viewed.grid'); - $filterFormBlock = $this->getLayout()->getBlock('grid.filter.form'); + $gridBlock = $this->_view->getLayout()->getBlock('report_product_viewed.grid'); + $filterFormBlock = $this->_view->getLayout()->getBlock('grid.filter.form'); $this->_initReportAction(array( $gridBlock, $filterFormBlock )); - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -128,9 +128,9 @@ class Product extends \Magento\Adminhtml\Controller\Report\AbstractReport public function exportViewedCsvAction() { $fileName = 'products_mostviewed.csv'; - $grid = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Product\Viewed\Grid'); + $grid = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Product\Viewed\Grid'); $this->_initReportAction($grid); - $this->_prepareDownloadResponse($fileName, $grid->getCsvFile()); + return $this->_fileFactory->create($fileName, $grid->getCsvFile()); } /** @@ -140,9 +140,9 @@ class Product extends \Magento\Adminhtml\Controller\Report\AbstractReport public function exportViewedExcelAction() { $fileName = 'products_mostviewed.xml'; - $grid = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Product\Viewed\Grid'); + $grid = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Product\Viewed\Grid'); $this->_initReportAction($grid); - $this->_prepareDownloadResponse($fileName, $grid->getExcelFile($fileName)); + return $this->_fileFactory->create($fileName, $grid->getExcelFile($fileName)); } /** @@ -151,7 +151,7 @@ class Product extends \Magento\Adminhtml\Controller\Report\AbstractReport */ public function lowstockAction() { - $this->_title(__('Low Stock Report')); + $this->_title->add(__('Low Stock Report')); $this->_initAction() ->_setActiveMenu('Magento_Reports::report_products_lowstock') @@ -159,7 +159,7 @@ class Product extends \Magento\Adminhtml\Controller\Report\AbstractReport __('Low Stock'), __('Low Stock') ); - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -168,10 +168,11 @@ class Product extends \Magento\Adminhtml\Controller\Report\AbstractReport */ public function exportLowstockCsvAction() { - $this->loadLayout(false); + $this->_view->loadLayout(false); $fileName = 'products_lowstock.csv'; - $exportBlock = $this->getLayout()->getChildBlock('adminhtml.block.report.product.lowstock.grid', 'grid.export'); - $this->_prepareDownloadResponse($fileName, $exportBlock->getCsvFile()); + $exportBlock = $this->_view->getLayout() + ->getChildBlock('adminhtml.block.report.product.lowstock.grid', 'grid.export'); + return $this->_fileFactory->create($fileName, $exportBlock->getCsvFile()); } /** @@ -180,10 +181,11 @@ class Product extends \Magento\Adminhtml\Controller\Report\AbstractReport */ public function exportLowstockExcelAction() { - $this->loadLayout(false); + $this->_view->loadLayout(false); $fileName = 'products_lowstock.xml'; - $exportBlock = $this->getLayout()->getChildBlock('adminhtml.block.report.product.lowstock.grid', 'grid.export'); - $this->_prepareDownloadResponse($fileName, $exportBlock->getExcelFile()); + $exportBlock = $this->_view->getLayout() + ->getChildBlock('adminhtml.block.report.product.lowstock.grid', 'grid.export'); + return $this->_fileFactory->create($fileName, $exportBlock->getExcelFile()); } /** @@ -192,7 +194,7 @@ class Product extends \Magento\Adminhtml\Controller\Report\AbstractReport */ public function downloadsAction() { - $this->_title(__('Downloads Report')); + $this->_title->add(__('Downloads Report')); $this->_initAction() ->_setActiveMenu('Magento_Downloadable::report_products_downloads') @@ -200,8 +202,10 @@ class Product extends \Magento\Adminhtml\Controller\Report\AbstractReport __('Downloads'), __('Downloads') ) - ->_addContent($this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Product\Downloads')) - ->renderLayout(); + ->_addContent( + $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Product\Downloads') + ); + $this->_view->renderLayout(); } /** @@ -211,11 +215,11 @@ class Product extends \Magento\Adminhtml\Controller\Report\AbstractReport public function exportDownloadsCsvAction() { $fileName = 'products_downloads.csv'; - $content = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Product\Downloads\Grid') + $content = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Product\Downloads\Grid') ->setSaveParametersInSession(true) ->getCsv(); - $this->_prepareDownloadResponse($fileName, $content); + return $this->_fileFactory->create($fileName, $content); } /** @@ -225,11 +229,11 @@ class Product extends \Magento\Adminhtml\Controller\Report\AbstractReport public function exportDownloadsExcelAction() { $fileName = 'products_downloads.xml'; - $content = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Product\Downloads\Grid') + $content = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Product\Downloads\Grid') ->setSaveParametersInSession(true) ->getExcel($fileName); - $this->_prepareDownloadResponse($fileName, $content); + return $this->_fileFactory->create($fileName, $content); } /** diff --git a/app/code/Magento/Adminhtml/Controller/Report/Review.php b/app/code/Magento/Adminhtml/Controller/Report/Review.php index d6ad16dbd667f315df01ad4c8907b1f9f3cf8aac..8e4fe66345a5ed13f7285530b78ace90552f21ea 100644 --- a/app/code/Magento/Adminhtml/Controller/Report/Review.php +++ b/app/code/Magento/Adminhtml/Controller/Report/Review.php @@ -33,25 +33,42 @@ */ namespace Magento\Adminhtml\Controller\Report; -class Review extends \Magento\Backend\Controller\Adminhtml\Action +class Review extends \Magento\Backend\App\Action { + /** + * @var \Magento\App\Response\Http\FileFactory + */ + protected $_fileFactory; + + /** + * @param \Magento\Backend\App\Action\Context $context + * @param \Magento\App\Response\Http\FileFactory $fileFactory + */ + public function __construct( + \Magento\Backend\App\Action\Context $context, + \Magento\App\Response\Http\FileFactory $fileFactory + ) { + $this->_fileFactory = $fileFactory; + parent::__construct($context); + } + public function _initAction() { - $this->loadLayout() - ->_addBreadcrumb( - __('Reports'), - __('Reports') - ) - ->_addBreadcrumb( - __('Review'), - __('Reviews') - ); + $this->_view->loadLayout(); + $this->_addBreadcrumb( + __('Reports'), + __('Reports') + ); + $this->_addBreadcrumb( + __('Review'), + __('Reviews') + ); return $this; } public function customerAction() { - $this->_title(__('Customer Reviews Report')); + $this->_title->add(__('Customer Reviews Report')); $this->_initAction() ->_setActiveMenu('Magento_Review::report_review_customer') @@ -59,7 +76,7 @@ class Review extends \Magento\Backend\Controller\Adminhtml\Action __('Customers Report'), __('Customers Report') ); - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -67,10 +84,10 @@ class Review extends \Magento\Backend\Controller\Adminhtml\Action */ public function exportCustomerCsvAction() { - $this->loadLayout(false); + $this->_view->loadLayout(false); $fileName = 'review_customer.csv'; - $exportBlock = $this->getLayout()->getChildBlock('adminhtml.block.report.review.customer.grid','grid.export'); - $this->_prepareDownloadResponse($fileName, $exportBlock->getCsvFile()); + $exportBlock = $this->_view->getLayout()->getChildBlock('adminhtml.block.report.review.customer.grid','grid.export'); + return $this->_fileFactory->create($fileName, $exportBlock->getCsvFile()); } /** @@ -78,16 +95,16 @@ class Review extends \Magento\Backend\Controller\Adminhtml\Action */ public function exportCustomerExcelAction() { - $this->loadLayout(false); + $this->_view->loadLayout(false); $fileName = 'review_customer.xml'; - $exportBlock = $this->getLayout()->getChildBlock('adminhtml.block.report.review.customer.grid','grid.export'); - $this->_prepareDownloadResponse($fileName, $exportBlock->getExcelFile()); + $exportBlock = $this->_view->getLayout()->getChildBlock('adminhtml.block.report.review.customer.grid','grid.export'); + return $this->_fileFactory->create($fileName, $exportBlock->getExcelFile()); } public function productAction() { - $this->_title(__('Product Reviews Report')); + $this->_title->add(__('Product Reviews Report')); $this->_initAction() ->_setActiveMenu('Magento_Review::report_review_product') @@ -95,7 +112,7 @@ class Review extends \Magento\Backend\Controller\Adminhtml\Action __('Products Report'), __('Products Report') ); - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -103,10 +120,10 @@ class Review extends \Magento\Backend\Controller\Adminhtml\Action */ public function exportProductCsvAction() { - $this->loadLayout(false); + $this->_view->loadLayout(false); $fileName = 'review_product.csv'; - $exportBlock = $this->getLayout()->getChildBlock('adminhtml.block.report.review.product.grid','grid.export'); - $this->_prepareDownloadResponse($fileName, $exportBlock->getCsvFile()); + $exportBlock = $this->_view->getLayout()->getChildBlock('adminhtml.block.report.review.product.grid','grid.export'); + return $this->_fileFactory->create($fileName, $exportBlock->getCsvFile()); } /** @@ -114,22 +131,24 @@ class Review extends \Magento\Backend\Controller\Adminhtml\Action */ public function exportProductExcelAction() { - $this->loadLayout(false); + $this->_view->loadLayout(false); $fileName = 'review_product.xml'; - $exportBlock = $this->getLayout()->getChildBlock('adminhtml.block.report.review.product.grid','grid.export'); - $this->_prepareDownloadResponse($fileName, $exportBlock->getExcelFile()); + $exportBlock = $this->_view->getLayout()->getChildBlock('adminhtml.block.report.review.product.grid','grid.export'); + return $this->_fileFactory->create($fileName, $exportBlock->getExcelFile()); } public function productDetailAction() { - $this->_title(__('Details')); + $this->_title->add(__('Details')); $this->_initAction() ->_setActiveMenu('Magento_Review::report_review') ->_addBreadcrumb(__('Products Report'), __('Products Report')) ->_addBreadcrumb(__('Product Reviews'), __('Product Reviews')) - ->_addContent($this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Review\Detail')) - ->renderLayout(); + ->_addContent( + $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Review\Detail') + ); + $this->_view->renderLayout(); } /** @@ -138,10 +157,10 @@ class Review extends \Magento\Backend\Controller\Adminhtml\Action public function exportProductDetailCsvAction() { $fileName = 'review_product_detail.csv'; - $content = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Review\Detail\Grid') + $content = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Review\Detail\Grid') ->getCsv(); - $this->_prepareDownloadResponse($fileName, $content); + return $this->_fileFactory->create($fileName, $content); } /** @@ -150,10 +169,10 @@ class Review extends \Magento\Backend\Controller\Adminhtml\Action public function exportProductDetailExcelAction() { $fileName = 'review_product_detail.xml'; - $content = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Review\Detail\Grid') + $content = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Review\Detail\Grid') ->getExcel($fileName); - $this->_prepareDownloadResponse($fileName, $content); + return $this->_fileFactory->create($fileName, $content); } protected function _isAllowed() diff --git a/app/code/Magento/Adminhtml/Controller/Report/Sales.php b/app/code/Magento/Adminhtml/Controller/Report/Sales.php index e99b0c8cad37aacd36d3fa744831252f2fff118f..4a02b2853ea1b7903bf752d0be05d4cd1f5fc1f0 100644 --- a/app/code/Magento/Adminhtml/Controller/Report/Sales.php +++ b/app/code/Magento/Adminhtml/Controller/Report/Sales.php @@ -49,7 +49,7 @@ class Sales extends \Magento\Adminhtml\Controller\Report\AbstractReport public function salesAction() { - $this->_title(__('Sales Report')); + $this->_title->add(__('Sales Report')); $this->_showLastExecutionTime(\Magento\Reports\Model\Flag::REPORT_ORDER_FLAG_CODE, 'sales'); @@ -57,20 +57,20 @@ class Sales extends \Magento\Adminhtml\Controller\Report\AbstractReport ->_setActiveMenu('Magento_Reports::report_salesroot_sales') ->_addBreadcrumb(__('Sales Report'), __('Sales Report')); - $gridBlock = $this->getLayout()->getBlock('report_sales_sales.grid'); - $filterFormBlock = $this->getLayout()->getBlock('grid.filter.form'); + $gridBlock = $this->_view->getLayout()->getBlock('report_sales_sales.grid'); + $filterFormBlock = $this->_view->getLayout()->getBlock('grid.filter.form'); $this->_initReportAction(array( $gridBlock, $filterFormBlock )); - $this->renderLayout(); + $this->_view->renderLayout(); } public function bestsellersAction() { - $this->_title(__('Best Sellers Report')); + $this->_title->add(__('Best Sellers Report')); $this->_showLastExecutionTime(\Magento\Reports\Model\Flag::REPORT_BESTSELLERS_FLAG_CODE, 'bestsellers'); @@ -78,15 +78,15 @@ class Sales extends \Magento\Adminhtml\Controller\Report\AbstractReport ->_setActiveMenu('Magento_Reports::report_products_bestsellers') ->_addBreadcrumb(__('Products Bestsellers Report'), __('Products Bestsellers Report')); - $gridBlock = $this->getLayout()->getBlock('report_sales_bestsellers.grid'); - $filterFormBlock = $this->getLayout()->getBlock('grid.filter.form'); + $gridBlock = $this->_view->getLayout()->getBlock('report_sales_bestsellers.grid'); + $filterFormBlock = $this->_view->getLayout()->getBlock('grid.filter.form'); $this->_initReportAction(array( $gridBlock, $filterFormBlock )); - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -95,9 +95,9 @@ class Sales extends \Magento\Adminhtml\Controller\Report\AbstractReport public function exportBestsellersCsvAction() { $fileName = 'bestsellers.csv'; - $grid = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Bestsellers\Grid'); + $grid = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Bestsellers\Grid'); $this->_initReportAction($grid); - $this->_prepareDownloadResponse($fileName, $grid->getCsvFile()); + return $this->_fileFactory->create($fileName, $grid->getCsvFile()); } /** @@ -106,9 +106,9 @@ class Sales extends \Magento\Adminhtml\Controller\Report\AbstractReport public function exportBestsellersExcelAction() { $fileName = 'bestsellers.xml'; - $grid = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Bestsellers\Grid'); + $grid = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Bestsellers\Grid'); $this->_initReportAction($grid); - $this->_prepareDownloadResponse($fileName, $grid->getExcelFile($fileName)); + return $this->_fileFactory->create($fileName, $grid->getExcelFile($fileName)); } /** @@ -137,9 +137,9 @@ class Sales extends \Magento\Adminhtml\Controller\Report\AbstractReport public function exportSalesCsvAction() { $fileName = 'sales.csv'; - $grid = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Sales\Grid'); + $grid = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Sales\Grid'); $this->_initReportAction($grid); - $this->_prepareDownloadResponse($fileName, $grid->getCsvFile()); + return $this->_fileFactory->create($fileName, $grid->getCsvFile()); } /** @@ -148,14 +148,14 @@ class Sales extends \Magento\Adminhtml\Controller\Report\AbstractReport public function exportSalesExcelAction() { $fileName = 'sales.xml'; - $grid = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Sales\Grid'); + $grid = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Sales\Grid'); $this->_initReportAction($grid); - $this->_prepareDownloadResponse($fileName, $grid->getExcelFile($fileName)); + return $this->_fileFactory->create($fileName, $grid->getExcelFile($fileName)); } public function taxAction() { - $this->_title(__('Tax Report')); + $this->_title->add(__('Tax Report')); $this->_showLastExecutionTime(\Magento\Reports\Model\Flag::REPORT_TAX_FLAG_CODE, 'tax'); @@ -163,15 +163,15 @@ class Sales extends \Magento\Adminhtml\Controller\Report\AbstractReport ->_setActiveMenu('Magento_Reports::report_salesroot_tax') ->_addBreadcrumb(__('Tax'), __('Tax')); - $gridBlock = $this->getLayout()->getBlock('report_sales_tax.grid'); - $filterFormBlock = $this->getLayout()->getBlock('grid.filter.form'); + $gridBlock = $this->_view->getLayout()->getBlock('report_sales_tax.grid'); + $filterFormBlock = $this->_view->getLayout()->getBlock('grid.filter.form'); $this->_initReportAction(array( $gridBlock, $filterFormBlock )); - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -180,9 +180,9 @@ class Sales extends \Magento\Adminhtml\Controller\Report\AbstractReport public function exportTaxCsvAction() { $fileName = 'tax.csv'; - $grid = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Tax\Grid'); + $grid = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Tax\Grid'); $this->_initReportAction($grid); - $this->_prepareDownloadResponse($fileName, $grid->getCsvFile()); + return $this->_fileFactory->create($fileName, $grid->getCsvFile()); } /** @@ -191,14 +191,14 @@ class Sales extends \Magento\Adminhtml\Controller\Report\AbstractReport public function exportTaxExcelAction() { $fileName = 'tax.xml'; - $grid = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Tax\Grid'); + $grid = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Tax\Grid'); $this->_initReportAction($grid); - $this->_prepareDownloadResponse($fileName, $grid->getExcelFile($fileName)); + return $this->_fileFactory->create($fileName, $grid->getExcelFile($fileName)); } public function shippingAction() { - $this->_title(__('Shipping Report')); + $this->_title->add(__('Shipping Report')); $this->_showLastExecutionTime(\Magento\Reports\Model\Flag::REPORT_SHIPPING_FLAG_CODE, 'shipping'); @@ -206,15 +206,15 @@ class Sales extends \Magento\Adminhtml\Controller\Report\AbstractReport ->_setActiveMenu('Magento_Reports::report_salesroot_shipping') ->_addBreadcrumb(__('Shipping'), __('Shipping')); - $gridBlock = $this->getLayout()->getBlock('report_sales_shipping.grid'); - $filterFormBlock = $this->getLayout()->getBlock('grid.filter.form'); + $gridBlock = $this->_view->getLayout()->getBlock('report_sales_shipping.grid'); + $filterFormBlock = $this->_view->getLayout()->getBlock('grid.filter.form'); $this->_initReportAction(array( $gridBlock, $filterFormBlock )); - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -223,9 +223,9 @@ class Sales extends \Magento\Adminhtml\Controller\Report\AbstractReport public function exportShippingCsvAction() { $fileName = 'shipping.csv'; - $grid = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Shipping\Grid'); + $grid = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Shipping\Grid'); $this->_initReportAction($grid); - $this->_prepareDownloadResponse($fileName, $grid->getCsvFile()); + return $this->_fileFactory->create($fileName, $grid->getCsvFile()); } /** @@ -234,14 +234,14 @@ class Sales extends \Magento\Adminhtml\Controller\Report\AbstractReport public function exportShippingExcelAction() { $fileName = 'shipping.xml'; - $grid = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Shipping\Grid'); + $grid = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Shipping\Grid'); $this->_initReportAction($grid); - $this->_prepareDownloadResponse($fileName, $grid->getExcelFile($fileName)); + return $this->_fileFactory->create($fileName, $grid->getExcelFile($fileName)); } public function invoicedAction() { - $this->_title(__('Invoice Report')); + $this->_title->add(__('Invoice Report')); $this->_showLastExecutionTime(\Magento\Reports\Model\Flag::REPORT_INVOICE_FLAG_CODE, 'invoiced'); @@ -249,15 +249,15 @@ class Sales extends \Magento\Adminhtml\Controller\Report\AbstractReport ->_setActiveMenu('Magento_Reports::report_salesroot_invoiced') ->_addBreadcrumb(__('Total Invoiced'), __('Total Invoiced')); - $gridBlock = $this->getLayout()->getBlock('report_sales_invoiced.grid'); - $filterFormBlock = $this->getLayout()->getBlock('grid.filter.form'); + $gridBlock = $this->_view->getLayout()->getBlock('report_sales_invoiced.grid'); + $filterFormBlock = $this->_view->getLayout()->getBlock('grid.filter.form'); $this->_initReportAction(array( $gridBlock, $filterFormBlock )); - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -266,9 +266,9 @@ class Sales extends \Magento\Adminhtml\Controller\Report\AbstractReport public function exportInvoicedCsvAction() { $fileName = 'invoiced.csv'; - $grid = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Invoiced\Grid'); + $grid = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Invoiced\Grid'); $this->_initReportAction($grid); - $this->_prepareDownloadResponse($fileName, $grid->getCsvFile()); + return $this->_fileFactory->create($fileName, $grid->getCsvFile()); } /** @@ -277,14 +277,14 @@ class Sales extends \Magento\Adminhtml\Controller\Report\AbstractReport public function exportInvoicedExcelAction() { $fileName = 'invoiced.xml'; - $grid = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Invoiced\Grid'); + $grid = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Invoiced\Grid'); $this->_initReportAction($grid); - $this->_prepareDownloadResponse($fileName, $grid->getExcelFile($fileName)); + return $this->_fileFactory->create($fileName, $grid->getExcelFile($fileName)); } public function refundedAction() { - $this->_title(__('Refunds Report')); + $this->_title->add(__('Refunds Report')); $this->_showLastExecutionTime(\Magento\Reports\Model\Flag::REPORT_REFUNDED_FLAG_CODE, 'refunded'); @@ -292,15 +292,15 @@ class Sales extends \Magento\Adminhtml\Controller\Report\AbstractReport ->_setActiveMenu('Magento_Reports::report_salesroot_refunded') ->_addBreadcrumb(__('Total Refunded'), __('Total Refunded')); - $gridBlock = $this->getLayout()->getBlock('report_sales_refunded.grid'); - $filterFormBlock = $this->getLayout()->getBlock('grid.filter.form'); + $gridBlock = $this->_view->getLayout()->getBlock('report_sales_refunded.grid'); + $filterFormBlock = $this->_view->getLayout()->getBlock('grid.filter.form'); $this->_initReportAction(array( $gridBlock, $filterFormBlock )); - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -309,9 +309,9 @@ class Sales extends \Magento\Adminhtml\Controller\Report\AbstractReport public function exportRefundedCsvAction() { $fileName = 'refunded.csv'; - $grid = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Refunded\Grid'); + $grid = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Refunded\Grid'); $this->_initReportAction($grid); - $this->_prepareDownloadResponse($fileName, $grid->getCsvFile()); + return $this->_fileFactory->create($fileName, $grid->getCsvFile()); } /** @@ -320,14 +320,14 @@ class Sales extends \Magento\Adminhtml\Controller\Report\AbstractReport public function exportRefundedExcelAction() { $fileName = 'refunded.xml'; - $grid = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Refunded\Grid'); + $grid = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Refunded\Grid'); $this->_initReportAction($grid); - $this->_prepareDownloadResponse($fileName, $grid->getExcelFile($fileName)); + return $this->_fileFactory->create($fileName, $grid->getExcelFile($fileName)); } public function couponsAction() { - $this->_title(__('Coupons Report')); + $this->_title->add(__('Coupons Report')); $this->_showLastExecutionTime(\Magento\Reports\Model\Flag::REPORT_COUPONS_FLAG_CODE, 'coupons'); @@ -335,15 +335,15 @@ class Sales extends \Magento\Adminhtml\Controller\Report\AbstractReport ->_setActiveMenu('Magento_Reports::report_salesroot_coupons') ->_addBreadcrumb(__('Coupons'), __('Coupons')); - $gridBlock = $this->getLayout()->getBlock('report_sales_coupons.grid'); - $filterFormBlock = $this->getLayout()->getBlock('grid.filter.form'); + $gridBlock = $this->_view->getLayout()->getBlock('report_sales_coupons.grid'); + $filterFormBlock = $this->_view->getLayout()->getBlock('grid.filter.form'); $this->_initReportAction(array( $gridBlock, $filterFormBlock )); - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -352,9 +352,9 @@ class Sales extends \Magento\Adminhtml\Controller\Report\AbstractReport public function exportCouponsCsvAction() { $fileName = 'coupons.csv'; - $grid = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Coupons\Grid'); + $grid = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Coupons\Grid'); $this->_initReportAction($grid); - $this->_prepareDownloadResponse($fileName, $grid->getCsvFile()); + return $this->_fileFactory->create($fileName, $grid->getCsvFile()); } /** @@ -363,9 +363,9 @@ class Sales extends \Magento\Adminhtml\Controller\Report\AbstractReport public function exportCouponsExcelAction() { $fileName = 'coupons.xml'; - $grid = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Coupons\Grid'); + $grid = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Coupons\Grid'); $this->_initReportAction($grid); - $this->_prepareDownloadResponse($fileName, $grid->getExcelFile($fileName)); + return $this->_fileFactory->create($fileName, $grid->getExcelFile($fileName)); } public function refreshStatisticsAction() diff --git a/app/code/Magento/Adminhtml/Controller/Report/Shopcart.php b/app/code/Magento/Adminhtml/Controller/Report/Shopcart.php index 0bdbb5155c849e56a0be0222ac9e4fd4315a118d..965d125ad6198adb409deb45bde7536cebf7cbc1 100644 --- a/app/code/Magento/Adminhtml/Controller/Report/Shopcart.php +++ b/app/code/Magento/Adminhtml/Controller/Report/Shopcart.php @@ -33,26 +33,46 @@ */ namespace Magento\Adminhtml\Controller\Report; -class Shopcart extends \Magento\Backend\Controller\Adminhtml\Action +class Shopcart extends \Magento\Backend\App\Action { + /** + * @var \Magento\App\Response\Http\FileFactory + */ + protected $_fileFactory; + + /** + * @param \Magento\Backend\App\Action\Context $context + * @param \Magento\App\Response\Http\FileFactory $fileFactory + */ + public function __construct( + \Magento\Backend\App\Action\Context $context, + \Magento\App\Response\Http\FileFactory $fileFactory + ) { + $this->_fileFactory = $fileFactory; + parent::__construct($context); + } + public function _initAction() { - $act = $this->getRequest()->getActionName(); - $this->loadLayout() - ->_addBreadcrumb(__('Reports'), __('Reports')) - ->_addBreadcrumb(__('Shopping Cart'), __('Shopping Cart')); + $this->_view->loadLayout(); + $this->_addBreadcrumb(__('Reports'), __('Reports')); + $this->_addBreadcrumb(__('Shopping Cart'), __('Shopping Cart')); return $this; } public function customerAction() { - $this->_title(__('Customer Shopping Carts')); + $this->_title->add(__('Customer Shopping Carts')); $this->_initAction() ->_setActiveMenu('Magento_Reports::report_shopcart_customer') ->_addBreadcrumb(__('Customers Report'), __('Customers Report')) - ->_addContent($this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Shopcart\Customer')) - ->renderLayout(); + ->_addContent( + $this->_view + ->getLayout() + ->createBlock('Magento\Adminhtml\Block\Report\Shopcart\Customer') + ); + $this->_view->renderLayout(); } /** @@ -61,10 +81,10 @@ class Shopcart extends \Magento\Backend\Controller\Adminhtml\Action public function exportCustomerCsvAction() { $fileName = 'shopcart_customer.csv'; - $content = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Shopcart\Customer\Grid') + $content = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Shopcart\Customer\Grid') ->getCsvFile(); - $this->_prepareDownloadResponse($fileName, $content); + return $this->_fileFactory->create($fileName, $content); } /** @@ -73,21 +93,23 @@ class Shopcart extends \Magento\Backend\Controller\Adminhtml\Action public function exportCustomerExcelAction() { $fileName = 'shopcart_customer.xml'; - $content = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Shopcart\Customer\Grid') + $content = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Shopcart\Customer\Grid') ->getExcelFile($fileName); - $this->_prepareDownloadResponse($fileName, $content); + return $this->_fileFactory->create($fileName, $content); } public function productAction() { - $this->_title(__('Products in Carts')); + $this->_title->add(__('Products in Carts')); $this->_initAction() ->_setActiveMenu('Magento_Reports::report_shopcart_product') ->_addBreadcrumb(__('Products Report'), __('Products Report')) - ->_addContent($this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Shopcart\Product')) - ->renderLayout(); + ->_addContent( + $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Shopcart\Product') + ); + $this->_view->renderLayout(); } /** @@ -96,10 +118,10 @@ class Shopcart extends \Magento\Backend\Controller\Adminhtml\Action public function exportProductCsvAction() { $fileName = 'shopcart_product.csv'; - $content = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Shopcart\Product\Grid') + $content = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Shopcart\Product\Grid') ->getCsvFile(); - $this->_prepareDownloadResponse($fileName, $content); + return $this->_fileFactory->create($fileName, $content); } /** @@ -108,21 +130,23 @@ class Shopcart extends \Magento\Backend\Controller\Adminhtml\Action public function exportProductExcelAction() { $fileName = 'shopcart_product.xml'; - $content = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Shopcart\Product\Grid') + $content = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Shopcart\Product\Grid') ->getExcelFile($fileName); - $this->_prepareDownloadResponse($fileName, $content); + return $this->_fileFactory->create($fileName, $content); } public function abandonedAction() { - $this->_title(__('Abandoned Carts')); + $this->_title->add(__('Abandoned Carts')); $this->_initAction() ->_setActiveMenu('Magento_Reports::report_shopcart_abandoned') ->_addBreadcrumb(__('Abandoned Carts'), __('Abandoned Carts')) - ->_addContent($this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Shopcart\Abandoned')) - ->renderLayout(); + ->_addContent( + $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Shopcart\Abandoned') + ); + $this->_view->renderLayout(); } /** @@ -131,10 +155,10 @@ class Shopcart extends \Magento\Backend\Controller\Adminhtml\Action public function exportAbandonedCsvAction() { $fileName = 'shopcart_abandoned.csv'; - $content = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Shopcart\Abandoned\Grid') + $content = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Shopcart\Abandoned\Grid') ->getCsvFile(); - $this->_prepareDownloadResponse($fileName, $content); + return $this->_fileFactory->create($fileName, $content); } /** @@ -143,10 +167,10 @@ class Shopcart extends \Magento\Backend\Controller\Adminhtml\Action public function exportAbandonedExcelAction() { $fileName = 'shopcart_abandoned.xml'; - $content = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Shopcart\Abandoned\Grid') + $content = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Shopcart\Abandoned\Grid') ->getExcelFile($fileName); - $this->_prepareDownloadResponse($fileName, $content); + return $this->_fileFactory->create($fileName, $content); } protected function _isAllowed() diff --git a/app/code/Magento/Adminhtml/Controller/Report/Statistics.php b/app/code/Magento/Adminhtml/Controller/Report/Statistics.php index 7671ef5b8148084d91e2271f011e5a7705eb1be8..50877faea2166cfafb7abdf24a81ff20d46b0b2a 100644 --- a/app/code/Magento/Adminhtml/Controller/Report/Statistics.php +++ b/app/code/Magento/Adminhtml/Controller/Report/Statistics.php @@ -33,7 +33,7 @@ */ namespace Magento\Adminhtml\Controller\Report; -class Statistics extends \Magento\Backend\Controller\Adminhtml\Action +class Statistics extends \Magento\Backend\App\Action { /** * Admin session model @@ -42,11 +42,26 @@ class Statistics extends \Magento\Backend\Controller\Adminhtml\Action */ protected $_adminSession = null; + /** + * @var \Magento\Core\Filter\Date + */ + protected $_dateFilter; + + /** + * @param \Magento\Backend\App\Action\Context $context + * @param \Magento\Core\Filter\Date $dateFilter + */ + public function __construct(\Magento\Backend\App\Action\Context $context, \Magento\Core\Filter\Date $dateFilter) + { + $this->_dateFilter = $dateFilter; + parent::__construct($context); + } + public function _initAction() { - $this->loadLayout() - ->_addBreadcrumb(__('Reports'), __('Reports')) - ->_addBreadcrumb(__('Statistics'), __('Statistics')); + $this->_view->loadLayout(); + $this->_addBreadcrumb(__('Reports'), __('Reports')); + $this->_addBreadcrumb(__('Statistics'), __('Statistics')); return $this; } @@ -58,7 +73,9 @@ class Statistics extends \Magento\Backend\Controller\Adminhtml\Action $requestData = $this->_objectManager->get('Magento\Adminhtml\Helper\Data') ->prepareFilterString($this->getRequest()->getParam('filter')); - $requestData = $this->_filterDates($requestData, array('from', 'to')); + $inputFilter = new \Zend_Filter_Input(array('from' => $this->_dateFilter, 'to' => $this->_dateFilter), + array(), $requestData); + $requestData = $inputFilter->getUnescaped(); $requestData['store_ids'] = $this->getRequest()->getParam('store_ids'); $params = new \Magento\Object(); @@ -141,7 +158,7 @@ class Statistics extends \Magento\Backend\Controller\Adminhtml\Action if($this->_getSession()->isFirstPageAfterLogin()) { $this->_redirect('adminhtml/*'); } else { - $this->_redirectReferer('*/*'); + $this->getResponse()->setRedirect($this->_redirect->getRedirectUrl('*/*')); } return $this; } @@ -172,7 +189,7 @@ class Statistics extends \Magento\Backend\Controller\Adminhtml\Action if($this->_getSession()->isFirstPageAfterLogin()) { $this->_redirect('adminhtml/*'); } else { - $this->_redirectReferer('*/*'); + $this->getResponse()->setRedirect($this->_redirect->getRedirectUrl('*/*')); } return $this; @@ -180,12 +197,12 @@ class Statistics extends \Magento\Backend\Controller\Adminhtml\Action public function indexAction() { - $this->_title(__('Refresh Statistics')); + $this->_title->add(__('Refresh Statistics')); $this->_initAction() ->_setActiveMenu('Magento_Reports::report_statistics_refresh') - ->_addBreadcrumb(__('Refresh Statistics'), __('Refresh Statistics')) - ->renderLayout(); + ->_addBreadcrumb(__('Refresh Statistics'), __('Refresh Statistics')); + $this->_view->renderLayout(); } protected function _isAllowed() diff --git a/app/code/Magento/Adminhtml/Controller/Urlrewrite.php b/app/code/Magento/Adminhtml/Controller/Urlrewrite.php index 5112c98e086c560b26bf8b9ef2da94b285470bca..712e86affb549a64674d32c59b8d48d48617e55a 100644 --- a/app/code/Magento/Adminhtml/Controller/Urlrewrite.php +++ b/app/code/Magento/Adminhtml/Controller/Urlrewrite.php @@ -33,7 +33,7 @@ */ namespace Magento\Adminhtml\Controller; -class Urlrewrite extends \Magento\Backend\Controller\Adminhtml\Action +class Urlrewrite extends \Magento\Backend\App\Action { const ID_MODE = 'id'; const PRODUCT_MODE = 'product'; @@ -65,11 +65,11 @@ class Urlrewrite extends \Magento\Backend\Controller\Adminhtml\Action */ public function indexAction() { - $this->_title(__('URL Redirects')); + $this->_title->add(__('URL Redirects')); - $this->loadLayout(); + $this->_view->loadLayout(); $this->_setActiveMenu('Magento_Catalog::catalog_urlrewrite'); - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -77,17 +77,17 @@ class Urlrewrite extends \Magento\Backend\Controller\Adminhtml\Action */ public function editAction() { - $this->_title(__('URL Redirects')) - ->_title(__('[New/Edit] URL Redirect')); + $this->_title->add(__('URL Redirects')); + $this->_title->add(__('[New/Edit] URL Redirect')); - $this->loadLayout(); + $this->_view->loadLayout(); $this->_setActiveMenu('Magento_Catalog::catalog_urlrewrite'); $mode = $this->_getMode(); switch ($mode) { case self::PRODUCT_MODE: - $editBlock = $this->getLayout() + $editBlock = $this->_view->getLayout() ->createBlock('Magento\Adminhtml\Block\Urlrewrite\Catalog\Product\Edit', '', array('data' => array( 'category' => $this->_getCategory(), 'product' => $this->_getProduct(), @@ -96,25 +96,28 @@ class Urlrewrite extends \Magento\Backend\Controller\Adminhtml\Action ))); break; case self::CATEGORY_MODE: - $editBlock = $this->getLayout() + $editBlock = $this->_view->getLayout() ->createBlock('Magento\Adminhtml\Block\Urlrewrite\Catalog\Category\Edit', '', array('data' => array( 'category' => $this->_getCategory(), 'url_rewrite' => $this->_getUrlRewrite() ))); break; case self::CMS_PAGE_MODE: - $editBlock = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Urlrewrite\Cms\Page\Edit', '', - array( - 'data' => array( - 'cms_page' => $this->_getCmsPage(), - 'url_rewrite' => $this->_getUrlRewrite(), - ), - ) + $editBlock = $this->_view->getLayout() + ->createBlock( + 'Magento\Adminhtml\Block\Urlrewrite\Cms\Page\Edit', '', + array( + 'data' => array( + 'cms_page' => $this->_getCmsPage(), + 'url_rewrite' => $this->_getUrlRewrite(), + ), + ) ); break; case self::ID_MODE: default: - $editBlock = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Urlrewrite\Edit', '', array( + $editBlock = $this->_view->getLayout()->createBlock( + 'Magento\Adminhtml\Block\Urlrewrite\Edit', '', array( 'data' => array('url_rewrite' => $this->_getUrlRewrite()) )); break; @@ -122,9 +125,9 @@ class Urlrewrite extends \Magento\Backend\Controller\Adminhtml\Action $this->_addContent($editBlock); if (in_array($mode, array(self::PRODUCT_MODE, self::CATEGORY_MODE))) { - $this->getLayout()->getBlock('head')->setCanLoadExtJs(true); + $this->_view->getLayout()->getBlock('head')->setCanLoadExtJs(true); } - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -154,7 +157,7 @@ class Urlrewrite extends \Magento\Backend\Controller\Adminhtml\Action public function productGridAction() { $this->getResponse()->setBody( - $this->getLayout()->createBlock('Magento\Adminhtml\Block\Urlrewrite\Catalog\Product\Grid')->toHtml() + $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Urlrewrite\Catalog\Product\Grid')->toHtml() ); } @@ -176,7 +179,7 @@ class Urlrewrite extends \Magento\Backend\Controller\Adminhtml\Action public function cmsPageGridAction() { $this->getResponse()->setBody( - $this->getLayout()->createBlock('Magento\Adminhtml\Block\Urlrewrite\Cms\Page\Grid')->toHtml() + $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Urlrewrite\Cms\Page\Grid')->toHtml() ); } @@ -230,7 +233,7 @@ class Urlrewrite extends \Magento\Backend\Controller\Adminhtml\Action ->setUrlrewriteData($data); } } - $this->_redirectReferer(); + $this->getResponse()->setRedirect($this->_redirect->getRedirectUrl($this->getUrl('*'))); } /** diff --git a/app/code/Magento/Adminhtml/Helper/Addresses.php b/app/code/Magento/Adminhtml/Helper/Addresses.php index a1501d721797ba1ef23feefd7f874fd1915dcb38..ddbf8e4943ff077213211de3a1c17cbe3c36b09c 100644 --- a/app/code/Magento/Adminhtml/Helper/Addresses.php +++ b/app/code/Magento/Adminhtml/Helper/Addresses.php @@ -33,7 +33,7 @@ */ namespace Magento\Adminhtml\Helper; -class Addresses extends \Magento\Core\Helper\AbstractHelper +class Addresses extends \Magento\App\Helper\AbstractHelper { const DEFAULT_STREET_LINES_COUNT = 2; diff --git a/app/code/Magento/Adminhtml/Model/Session/Quote.php b/app/code/Magento/Adminhtml/Model/Session/Quote.php index c7759239aa3ff1a29bbfa2ced3ba5ff650c621c7..dc13f7485e3054bbd101d7736301a62228999476 100644 --- a/app/code/Magento/Adminhtml/Model/Session/Quote.php +++ b/app/code/Magento/Adminhtml/Model/Session/Quote.php @@ -66,11 +66,6 @@ class Quote extends \Magento\Core\Model\Session\AbstractSession */ protected $_orderFactory; - /** - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - /** * @var \Magento\Customer\Model\CustomerFactory */ @@ -85,7 +80,6 @@ class Quote extends \Magento\Core\Model\Session\AbstractSession * @param \Magento\Core\Model\Session\Context $context * @param \Magento\Sales\Model\QuoteFactory $quoteFactory * @param \Magento\Customer\Model\CustomerFactory $customerFactory - * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Sales\Model\OrderFactory $orderFactory * @param array $data */ @@ -93,13 +87,11 @@ class Quote extends \Magento\Core\Model\Session\AbstractSession \Magento\Core\Model\Session\Context $context, \Magento\Sales\Model\QuoteFactory $quoteFactory, \Magento\Customer\Model\CustomerFactory $customerFactory, - \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Sales\Model\OrderFactory $orderFactory, array $data = array() ) { $this->_quoteFactory = $quoteFactory; $this->_customerFactory = $customerFactory; - $this->_storeManager = $storeManager; $this->_orderFactory = $orderFactory; parent::__construct($context, $data); $this->init('adminhtml_quote'); diff --git a/app/code/Magento/Adminhtml/etc/adminhtml/acl.xml b/app/code/Magento/Adminhtml/etc/adminhtml/acl.xml index e160fdbc64239e3e9e0ee9de8e474796d90ce55e..bc6e642838fbbfab3d1262550e503190afeaed59 100644 --- a/app/code/Magento/Adminhtml/etc/adminhtml/acl.xml +++ b/app/code/Magento/Adminhtml/etc/adminhtml/acl.xml @@ -34,9 +34,6 @@ <resource id="Magento_Adminhtml::global_search" title="Global Search" sortOrder="100" /> <resource id="Magento_Adminhtml::myaccount" title="My Account" sortOrder="50" /> <resource id="Magento_Adminhtml::marketing" title="Marketing" sortOrder="50"> - <resource id="Magento_Adminhtml::marketing_communications" title="Communications" sortOrder="30"> - <resource id="Magento_Adminhtml::email_template" title="Email Templates" sortOrder="10" /> - </resource> <resource id="Magento_Adminhtml::marketing_seo" title="SEO & Search" sortOrder="40" /> <resource id="Magento_Adminhtml::marketing_user_content" title="User Content" sortOrder="50" /> </resource> diff --git a/app/code/Magento/Adminhtml/etc/config.xml b/app/code/Magento/Adminhtml/etc/config.xml index 2142978ee0ca1186a4c2b7c1e6bb41a8b01f876d..bcff89c470e2d873f05e04999da6d6a0206b9fdb 100644 --- a/app/code/Magento/Adminhtml/etc/config.xml +++ b/app/code/Magento/Adminhtml/etc/config.xml @@ -28,15 +28,6 @@ <config> <default> <system> - <media_storage_configuration> - <allowed_resources> - <email_folder>email</email_folder> - </allowed_resources> - </media_storage_configuration> - <emails> - <forgot_email_template>system_emails_forgot_email_template</forgot_email_template> - <forgot_email_identity>general</forgot_email_identity> - </emails> <dashboard> <enable_charts>1</enable_charts> </dashboard> @@ -79,9 +70,9 @@ </frontend> </routers> <default> - <no_route>admin/index/noRoute</no_route> + <no_route>admin/noroute/index</no_route> </default> </web> </admin> </websites> -</config> \ No newline at end of file +</config> diff --git a/app/code/Magento/Adminhtml/etc/events.xml b/app/code/Magento/Adminhtml/etc/events.xml index ecb34a534129fa4912b8414b57a6e022f3e58712..166dcf93fadb0312d83b9253d6d16430f77215d3 100644 --- a/app/code/Magento/Adminhtml/etc/events.xml +++ b/app/code/Magento/Adminhtml/etc/events.xml @@ -24,9 +24,6 @@ */ --> <config> - <event name="adminhtml_controller_action_predispatch_start"> - <observer name="massaction" instance="Magento\Adminhtml\Model\Observer" method="massactionPrepareKey" /> - </event> <event name="admin_user_authenticate_after"> <observer name="configuration_files_access_level_verification" instance="Magento\Adminhtml\Model\Observer" method="clearCacheConfigurationFilesAccessLevelVerification" /> </event> diff --git a/app/code/Magento/Adminhtml/view/adminhtml/admin/popup.phtml b/app/code/Magento/Adminhtml/view/adminhtml/admin/popup.phtml index faf7a1d2611574e12d93a92062bcf4ac92671cf4..81d21c9c0da936d3a97c3858fc0b2632fb643ff3 100644 --- a/app/code/Magento/Adminhtml/view/adminhtml/admin/popup.phtml +++ b/app/code/Magento/Adminhtml/view/adminhtml/admin/popup.phtml @@ -26,13 +26,13 @@ ?> <?php /*{ "label":"Root page layout", - "type":"Magento\Core\Block\Template", + "type":"Magento\View\Block\Template", "children":{ "header":{ "label":"Header", "type":"Magento\Adminhtml\Block\Page\Header" }, "menu":{ "label":"Top navigation", "type":"Magento\Backend\Block\Menu" }, "breadcrumbs":{ "label":"Breadcrumbs", "type":"Magento\Adminhtml\Block\Widget\Breadcrumbs" }, - "content":{ "label":"Content block", "type":"Magento\Core\Block\Template" }, - "left":{ "label":"Left navigation", "type":"Magento\Core\Block\Template" }, + "content":{ "label":"Content block", "type":"Magento\View\Block\Template" }, + "left":{ "label":"Left navigation", "type":"Magento\View\Block\Template" }, "footer":{ "label":"Footer", "type":"Magento\Adminhtml\Block\Page\Footer" } }, "vars":{} diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_noroute.xml b/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_noroute.xml index 2f66e9a3f4f17987cc864c2528e1877af4839fff..b214ee1b22e570b7a839386874fd2dadd3982292 100644 --- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_noroute.xml +++ b/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_noroute.xml @@ -25,7 +25,7 @@ --> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <referenceContainer name="content"> - <block class="Magento\Core\Block\Text" name="content.noRoute"> + <block class="Magento\View\Block\Text" name="content.noRoute"> <action method="setText"> <argument translate="true" name="text" xsi:type="string"> <![CDATA[<h1 class="page-heading">404 Error</h1><p>Page not found.</p>]]> diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/default.xml b/app/code/Magento/Adminhtml/view/adminhtml/layout/default.xml index 3980c42ad63e206bc1b1371275062c2c64b073c0..8b77671e35619b590629dee2d7c816111385f8c7 100644 --- a/app/code/Magento/Adminhtml/view/adminhtml/layout/default.xml +++ b/app/code/Magento/Adminhtml/view/adminhtml/layout/default.xml @@ -272,7 +272,7 @@ </arguments> </block> <block class="Magento\Page\Block\Js\Components" name="head.components" as="components" template="Magento_Adminhtml::page/js/components.phtml"/> - <block class="Magento\Core\Block\Html\Calendar" name="head.calendar" as="calendar" template="Magento_Adminhtml::page/js/calendar.phtml"/> + <block class="Magento\View\Block\Html\Calendar" name="head.calendar" as="calendar" template="Magento_Adminhtml::page/js/calendar.phtml"/> </block> <block class="Magento\Adminhtml\Block\Page\Notices" name="global_notices" as="global_notices" template="page/notices.phtml"/> <block class="Magento\Adminhtml\Block\Page\Header" name="header" as="header"> @@ -288,7 +288,7 @@ </container> <container name="left" as="left" label="Left Column"/> <container name="content" as="content" label="Content"/> - <block class="Magento\Core\Block\Messages" name="messages" as="messages"/> + <block class="Magento\View\Block\Messages" name="messages" as="messages"/> <container name="js" as="js" label="JavaScript"/> <block class="Magento\Adminhtml\Block\Page\Footer" name="footer" as="footer"> <block class="Magento\Backend\Block\Page\Copyright" name="copyright" as="copyright"/> diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/newsletter_queue_preview.xml b/app/code/Magento/Adminhtml/view/adminhtml/layout/newsletter_queue_preview.xml index dee31157f6faabf5bbdeba2ae380c998c204bf4f..596315b0f0caeda1256d0e2a4ceeb2123e7b603c 100644 --- a/app/code/Magento/Adminhtml/view/adminhtml/layout/newsletter_queue_preview.xml +++ b/app/code/Magento/Adminhtml/view/adminhtml/layout/newsletter_queue_preview.xml @@ -24,7 +24,7 @@ */ --> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <block class="Magento\Core\Block\Template" name="root" output="1" template="Magento_Adminhtml::newsletter/queue/preview.phtml"> + <block class="Magento\View\Block\Template" name="root" output="1" template="Magento_Adminhtml::newsletter/queue/preview.phtml"> <block class="Magento\Adminhtml\Block\Newsletter\Queue\Preview" name="content" as="content"/> </block> <block class="Magento\Adminhtml\Block\Newsletter\Queue\Preview" name="preview_template"/> diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/newsletter_template_preview.xml b/app/code/Magento/Adminhtml/view/adminhtml/layout/newsletter_template_preview.xml index 0a1a6e63bd2ff33a430ba6bc9dcad31d7f2161b4..5fbce706060eeae837eb5236a945e8e874893cdb 100644 --- a/app/code/Magento/Adminhtml/view/adminhtml/layout/newsletter_template_preview.xml +++ b/app/code/Magento/Adminhtml/view/adminhtml/layout/newsletter_template_preview.xml @@ -24,7 +24,7 @@ */ --> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <block class="Magento\Core\Block\Template" name="root" output="1" template="Magento_Adminhtml::newsletter/template/preview.phtml"> + <block class="Magento\View\Block\Template" name="root" output="1" template="Magento_Adminhtml::newsletter/template/preview.phtml"> <block class="Magento\Adminhtml\Block\Newsletter\Template\Preview" name="content" as="content"/> </block> <block class="Magento\Adminhtml\Block\Newsletter\Template\Preview" name="preview_template"/> diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/preview.xml b/app/code/Magento/Adminhtml/view/adminhtml/layout/preview.xml index 291c2f2422c3f591de95f66f98938b9b72b6e5b7..f92336d5d09d73869d131fc397f993192b93bb5c 100644 --- a/app/code/Magento/Adminhtml/view/adminhtml/layout/preview.xml +++ b/app/code/Magento/Adminhtml/view/adminhtml/layout/preview.xml @@ -24,7 +24,7 @@ */ --> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <block class="Magento\Core\Block\Template" name="root" output="1" template="Magento_Adminhtml::newsletter/template/preview.phtml"> + <block class="Magento\View\Block\Template" name="root" output="1" template="Magento_Adminhtml::newsletter/template/preview.phtml"> <block class="Magento\Adminhtml\Block\Newsletter\Template\Preview" name="content" as="content"/> </block> </layout> diff --git a/app/code/Magento/Adminhtml/view/adminhtml/page/js/calendar.phtml b/app/code/Magento/Adminhtml/view/adminhtml/page/js/calendar.phtml index 12456d524147f1d2813690e78ba4641609587f46..a6083df04e9e9d300e5c285497ec8ed27bb143bd 100644 --- a/app/code/Magento/Adminhtml/view/adminhtml/page/js/calendar.phtml +++ b/app/code/Magento/Adminhtml/view/adminhtml/page/js/calendar.phtml @@ -30,7 +30,7 @@ /** * Calendar localization script. Should be put into page header. * - * @see \Magento\Core\Block\Html\Calendar + * @see \Magento\View\Block\Html\Calendar */ ?> diff --git a/app/code/Magento/Authorizenet/Block/Directpost/Form.php b/app/code/Magento/Authorizenet/Block/Directpost/Form.php index 7f5fadd42645cc19127b554afba5d326d5a7d26a..3c327bcd36e84480df5dd9ddb8d71dd2c0471d7b 100644 --- a/app/code/Magento/Authorizenet/Block/Directpost/Form.php +++ b/app/code/Magento/Authorizenet/Block/Directpost/Form.php @@ -48,24 +48,22 @@ class Form extends \Magento\Payment\Block\Form\Cc protected $_checkoutModel; /** - * Construct - * + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Payment\Model\Config $paymentConfig * @param \Magento\Authorizenet\Model\Directpost $model * @param \Magento\Checkout\Model\Type\Onepage $checkoutModel * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Payment\Model\Config $paymentConfig, \Magento\Authorizenet\Model\Directpost $model, \Magento\Checkout\Model\Type\Onepage $checkoutModel, array $data = array() ) { - parent::__construct($coreData, $context, $paymentConfig, $data); + parent::__construct($context, $coreData, $paymentConfig, $data); $this->_model = $model; $this->_checkoutModel = $checkoutModel; } diff --git a/app/code/Magento/Authorizenet/Block/Directpost/Iframe.php b/app/code/Magento/Authorizenet/Block/Directpost/Iframe.php index df2d132f52844e5e6b963e6f4b3fe0520decbb3d..b5e66559d38b3abe4ffc3595ee5ecff835f850dd 100644 --- a/app/code/Magento/Authorizenet/Block/Directpost/Iframe.php +++ b/app/code/Magento/Authorizenet/Block/Directpost/Iframe.php @@ -33,7 +33,7 @@ */ namespace Magento\Authorizenet\Block\Directpost; -class Iframe extends \Magento\Core\Block\Template +class Iframe extends \Magento\View\Block\Template { /** * Core registry @@ -43,19 +43,19 @@ class Iframe extends \Magento\Core\Block\Template protected $_coreRegistry = null; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Core\Model\Registry $registry * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Core\Model\Registry $registry, array $data = array() ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** @@ -63,7 +63,7 @@ class Iframe extends \Magento\Core\Block\Template * * You can redefine this method in child classes for changing layout * - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ protected function _prepareLayout() { 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 09086d4d67473752b920f39be3cc281f54402a9d..97bc41b2154a54858d64c637e867e70b6035bc38 100644 --- a/app/code/Magento/Authorizenet/Controller/Adminhtml/Authorizenet/Directpost/Payment.php +++ b/app/code/Magento/Authorizenet/Controller/Adminhtml/Authorizenet/Directpost/Payment.php @@ -36,15 +36,17 @@ class Payment protected $_coreRegistry = null; /** - * @param \Magento\Backend\Controller\Context $context + * @param \Magento\Backend\App\Action\Context $context + * @param \Magento\Catalog\Helper\Product $productHelper * @param \Magento\Core\Model\Registry $coreRegistry */ public function __construct( - \Magento\Backend\Controller\Context $context, + \Magento\Backend\App\Action\Context $context, + \Magento\Catalog\Helper\Product $productHelper, \Magento\Core\Model\Registry $coreRegistry ) { $this->_coreRegistry = $coreRegistry; - parent::__construct($context); + parent::__construct($context, $productHelper); } /** @@ -214,7 +216,7 @@ class Payment } $this->_coreRegistry->register('authorizenet_directpost_form_params', array_merge($params, $redirectParams)); - $this->loadLayout(false)->renderLayout(); + $this->_view->loadLayout(false)->renderLayout(); } /** diff --git a/app/code/Magento/Authorizenet/Controller/Directpost/Payment.php b/app/code/Magento/Authorizenet/Controller/Directpost/Payment.php index d8c19d1021f4564de4a8ff0b7a511e06b23ecebc..fbf2630b3eb5daf988d614665cc607bf58b7b904 100644 --- a/app/code/Magento/Authorizenet/Controller/Directpost/Payment.php +++ b/app/code/Magento/Authorizenet/Controller/Directpost/Payment.php @@ -33,7 +33,7 @@ */ namespace Magento\Authorizenet\Controller\Directpost; -class Payment extends \Magento\Core\Controller\Front\Action +class Payment extends \Magento\App\Action\Action { /** * Core registry @@ -43,11 +43,11 @@ class Payment extends \Magento\Core\Controller\Front\Action protected $_coreRegistry = null; /** - * @param \Magento\Core\Controller\Varien\Action\Context $context + * @param \Magento\App\Action\Context $context * @param \Magento\Core\Model\Registry $coreRegistry */ public function __construct( - \Magento\Core\Controller\Varien\Action\Context $context, + \Magento\App\Action\Context $context, \Magento\Core\Model\Registry $coreRegistry ) { $this->_coreRegistry = $coreRegistry; @@ -117,8 +117,8 @@ class Payment extends \Magento\Core\Controller\Front\Action } $this->_coreRegistry->register('authorizenet_directpost_form_params', $params); - $this->addPageLayoutHandles(); - $this->loadLayout(false)->renderLayout(); + $this->_view->addPageLayoutHandles(); + $this->_view->loadLayout(false)->renderLayout(); } /** @@ -150,8 +150,8 @@ class Payment extends \Magento\Core\Controller\Front\Action } $this->_coreRegistry->register('authorizenet_directpost_form_params', array_merge($params, $redirectParams)); - $this->addPageLayoutHandles(); - $this->loadLayout(false)->renderLayout(); + $this->_view->addPageLayoutHandles(); + $this->_view->loadLayout(false)->renderLayout(); } /** diff --git a/app/code/Magento/Authorizenet/Helper/Data.php b/app/code/Magento/Authorizenet/Helper/Data.php index 63a555f67882be5ab2fa0ef8b9500cb6c0e3cc6e..3e61e8c4f12951279113ac95ce2e4501d0de02f5 100644 --- a/app/code/Magento/Authorizenet/Helper/Data.php +++ b/app/code/Magento/Authorizenet/Helper/Data.php @@ -33,15 +33,10 @@ */ namespace Magento\Authorizenet\Helper; -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { /** - * @var \Magento\Core\Model\App - */ - protected $_application; - - /** - * @var \Magento\Core\Model\StoreManager + * @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; @@ -56,21 +51,18 @@ class Data extends \Magento\Core\Helper\AbstractHelper protected $_urlBuilder; /** - * @param \Magento\Core\Helper\Context $context - * @param \Magento\Core\Model\App $application - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\App\Helper\Context $context + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Sales\Model\OrderFactory $orderFactory * @param \Magento\Backend\Model\Url $urlBuilder */ public function __construct( - \Magento\Core\Helper\Context $context, - \Magento\Core\Model\App $application, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\App\Helper\Context $context, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Sales\Model\OrderFactory $orderFactory, \Magento\Backend\Model\Url $urlBuilder ) { parent::__construct($context); - $this->_application = $application; $this->_storeManager = $storeManager; $this->_orderFactory = $orderFactory; $this->_urlBuilder = $urlBuilder; @@ -211,16 +203,6 @@ class Data extends \Magento\Core\Helper\AbstractHelper return $this->_getUrl($route, $param); } - /** - * Get controller name - * - * @return string - */ - public function getControllerName() - { - return $this->_application->getFrontController()->getRequest()->getControllerName(); - } - /** * Update all child and parent order's edit increment numbers. * Needed for Admin area. diff --git a/app/code/Magento/Authorizenet/Model/Directpost.php b/app/code/Magento/Authorizenet/Model/Directpost.php index e497766c0bda2f6ccb0fb0b2de6349072f54a358..c9abc5bce283e0ce542bc289c845225c675a00f2 100644 --- a/app/code/Magento/Authorizenet/Model/Directpost.php +++ b/app/code/Magento/Authorizenet/Model/Directpost.php @@ -49,7 +49,7 @@ class Directpost extends \Magento\Paygate\Model\Authorizenet protected $_isInitializeNeeded = true; /** - * @var \Magento\Core\Model\StoreManager + * @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; @@ -90,7 +90,7 @@ class Directpost extends \Magento\Paygate\Model\Authorizenet * @param \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory * @param \Magento\Core\Model\LocaleInterface $locale * @param \Magento\Centinel\Model\Service $centinelService - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Sales\Model\OrderFactory $orderFactory * @param \Magento\Sales\Model\QuoteFactory $quoteFactory * @param \Magento\Authorizenet\Model\Directpost\RequestFactory $requestFactory @@ -112,7 +112,7 @@ class Directpost extends \Magento\Paygate\Model\Authorizenet \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory, \Magento\Core\Model\LocaleInterface $locale, \Magento\Centinel\Model\Service $centinelService, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Sales\Model\OrderFactory $orderFactory, \Magento\Sales\Model\QuoteFactory $quoteFactory, \Magento\Authorizenet\Model\Directpost\RequestFactory $requestFactory, diff --git a/app/code/Magento/Authorizenet/Model/Directpost/Observer.php b/app/code/Magento/Authorizenet/Model/Directpost/Observer.php index 5fd8ce25f47a69a2ca2624ce2a0c2a0e1c37f6c1..bf71c6b32293db2ea4a84143ad71d88af497d74e 100644 --- a/app/code/Magento/Authorizenet/Model/Directpost/Observer.php +++ b/app/code/Magento/Authorizenet/Model/Directpost/Observer.php @@ -67,7 +67,7 @@ class Observer protected $_session; /** - * @var \Magento\Core\Model\StoreManager + * @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; @@ -77,7 +77,7 @@ class Observer * @param \Magento\Core\Model\Registry $coreRegistry * @param \Magento\Authorizenet\Model\DirectpostFactory $modelFactory * @param \Magento\Authorizenet\Model\Directpost\Session $session - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager */ public function __construct( \Magento\Authorizenet\Helper\Data $authorizenetData, @@ -85,7 +85,7 @@ class Observer \Magento\Core\Model\Registry $coreRegistry, \Magento\Authorizenet\Model\DirectpostFactory $modelFactory, \Magento\Authorizenet\Model\Directpost\Session $session, - \Magento\Core\Model\StoreManager $storeManager + \Magento\Core\Model\StoreManagerInterface $storeManager ) { $this->_coreRegistry = $coreRegistry; $this->_authorizenetData = $authorizenetData; @@ -124,12 +124,9 @@ class Observer if ($order && $order->getId()) { $payment = $order->getPayment(); if ($payment && $payment->getMethod() == $this->_modelFactory->create()->getCode()) { - /* @var $controller \Magento\Core\Controller\Varien\Action */ - $controller = $observer->getEvent()->getData('controller_action'); - $result = $this->_coreData->jsonDecode( - $controller->getResponse()->getBody('default'), - \Zend_Json::TYPE_ARRAY - ); + $request = $observer->getEvent()->getRequest(); + $response = $observer->getEvent()->getResponse(); + $result = $this->_coreData->jsonDecode($response->getBody('default'), \Zend_Json::TYPE_ARRAY); if (empty($result['error'])) { $payment = $order->getPayment(); @@ -137,13 +134,13 @@ class Observer $this->_session->addCheckoutOrderIncrementId($order->getIncrementId()); $this->_session->setLastOrderIncrementId($order->getIncrementId()); $requestToPaygate = $payment->getMethodInstance()->generateRequestFromOrder($order); - $requestToPaygate->setControllerActionName($controller->getRequest()->getControllerName()); + $requestToPaygate->setControllerActionName($request->getControllerName()); $requestToPaygate->setIsSecure((string)$this->_storeManager->getStore()->isCurrentlySecure()); $result['directpost'] = array('fields' => $requestToPaygate->getData()); - $controller->getResponse()->clearHeader('Location'); - $controller->getResponse()->setBody($this->_coreData->jsonEncode($result)); + $response->clearHeader('Location'); + $response->setBody($this->_coreData->jsonEncode($result)); } } } diff --git a/app/code/Magento/Authorizenet/view/adminhtml/directpost/info.phtml b/app/code/Magento/Authorizenet/view/adminhtml/directpost/info.phtml index 8ac13ed1a0225e347d0812f2b57870a1c5199395..8d08867396b4d84a38cb04d1ca608146db18a75d 100644 --- a/app/code/Magento/Authorizenet/view/adminhtml/directpost/info.phtml +++ b/app/code/Magento/Authorizenet/view/adminhtml/directpost/info.phtml @@ -32,7 +32,7 @@ $_form = $this; $_code = $_form->getMethodCode(); $_method = $_form->getMethod(); -$_controller = $this->helper('Magento\Authorizenet\Helper\Data')->getControllerName(); +$_controller = $this->getRequest()->getControllerName(); $_orderUrl = $this->helper('Magento\Authorizenet\Helper\Data')->getPlaceOrderAdminUrl(); ?> <!-- IFRAME for request to our server --> diff --git a/app/code/Magento/Authorizenet/view/frontend/directpost/form.phtml b/app/code/Magento/Authorizenet/view/frontend/directpost/form.phtml index 42f57f81ea728c51d8d4b21888fafa4fc99a1eec..b2d202315fca546cdf8d30b5560ded69f5463cf8 100644 --- a/app/code/Magento/Authorizenet/view/frontend/directpost/form.phtml +++ b/app/code/Magento/Authorizenet/view/frontend/directpost/form.phtml @@ -32,77 +32,77 @@ $_form = $this; $_code = $_form->getMethodCode(); $_method = $_form->getMethod(); -$_controller = $this->helper('Magento\Authorizenet\Helper\Data')->getControllerName(); +$_controller = $this->getRequest()->getControllerName(); $_orderUrl = $this->helper('Magento\Authorizenet\Helper\Data')->getPlaceOrderFrontUrl(); ?> -<div class="buttons-set"> + <!-- IFRAME for request to Authorize.net --> <iframe id="directpost-iframe" data-container="authorize-net-iframe" allowtransparency="true" frameborder="0" name="iframeDirectPost" style="display:none;width:100%;background-color:transparent" src="<?php echo $this->getViewFileUrl('blank.html') ?>"></iframe> - -<form id="co-directpost-form" action="#" method="post" data-mage-init="{directpost: {methodCode:'<?php echo $_code ?>', controller:'<?php echo $_controller ?>', orderSaveUrl:'<?php echo $_orderUrl ?>', cgiUrl:'<?php echo $_method->getCgiUrl() ?>', nativeAction:'<?php echo $this->getUrl('checkout/onepage/saveOrder', array('_secure' => $this->getRequest()->isSecure())) ?>'}, validation: []}"> -<fieldset> -<dl class="sp-methods"> -<dt class="a-center"><?php echo __('Credit Card Information') ?></dt> -<dd> -<ul id="payment_form_<?php echo $_code ?>" class="form-list"> - <li> - <label for="<?php echo $_code ?>_cc_type" class="required"><em>*</em><?php echo __('Credit Card Type') ?></label> - <div class="input-box"> - <select id="<?php echo $_code ?>_cc_type" data-container="cc-type" name="payment[cc_type]" data-validate='{required:true, "validate-cc-type-select":"#<?php echo $_code ?>_cc_number"}'> - <option value=""><?php echo __('--Please Select--')?></option> - <?php $_ccType = $_form->getInfoData('cc_type') ?> - <?php foreach ($_form->getCcAvailableTypes() as $_typeCode => $_typeName): ?> - <option value="<?php echo $_typeCode ?>"<?php if($_typeCode==$_ccType): ?> selected="selected"<?php endif ?>><?php echo $_typeName ?></option> - <?php endforeach ?> - </select> - </div> - </li> - <li> - <label for="<?php echo $_code ?>_cc_number" class="required"><em>*</em><?php echo __('Credit Card Number') ?></label> - <div class="input-box"> - <input type="text" id="<?php echo $_code ?>_cc_number" data-container="cc-number" name="payment[cc_number]" title="<?php echo __('Credit Card Number') ?>" class="input-text" value="" data-validate='{required:true, "validate-cc-number":"#<?php echo $_code ?>_cc_type", "validate-cc-type":"#<?php echo $_code ?>_cc_type"}' autocomplete="off"/> - </div> - </li> - <li id="<?php echo $_code ?>_cc_type_exp_div"> - <label for="<?php echo $_code ?>_expiration" class="required"><em>*</em><?php echo __('Expiration Date') ?></label> - <div class="input-box"> - <div class="v-fix"> - <select id="<?php echo $_code ?>_expiration" name="payment[cc_exp_month]" data-container="cc-month" class="month" data-validate='{required:true, "validate-cc-exp":"#<?php echo $_code ?>_expiration_yr"}'> - <?php $_ccExpMonth = $_form->getInfoData('cc_exp_month') ?> - <?php foreach ($_form->getCcMonths() as $k=>$v): ?> - <option value="<?php echo $k?$k:'' ?>"<?php if($k==$_ccExpMonth): ?> selected="selected"<?php endif ?>><?php echo $v ?></option> +<form class="form" id="co-directpost-form" action="#" method="post" data-mage-init="{directpost: {methodCode:'<?php echo $_code ?>', controller:'<?php echo $_controller ?>', orderSaveUrl:'<?php echo $_orderUrl ?>', cgiUrl:'<?php echo $_method->getCgiUrl() ?>', nativeAction:'<?php echo $this->getUrl('checkout/onepage/saveOrder', array('_secure' => $this->getRequest()->isSecure())) ?>'}, validation: []}"> + <fieldset class="fieldset ccard <?php echo $_code ?>" id="payment_form_<?php echo $_code ?>"> + <legend class="legend"><span><?php echo __('Credit Card Information') ?></span></legend><br /> + <div class="field required type"> + <label for="<?php echo $_code ?>_cc_type" class="label"><span><?php echo __('Credit Card Type') ?></span></label> + <div class="control"> + <select id="<?php echo $_code ?>_cc_type" data-container="cc-type" name="payment[cc_type]" data-validate='{required:true, "validate-cc-type-select":"#<?php echo $_code ?>_cc_number"}'> + <option value=""><?php echo __('--Please Select--')?></option> + <?php $_ccType = $_form->getInfoData('cc_type') ?> + <?php foreach ($_form->getCcAvailableTypes() as $_typeCode => $_typeName): ?> + <option value="<?php echo $_typeCode ?>"<?php if($_typeCode==$_ccType): ?> selected="selected"<?php endif ?>><?php echo $_typeName ?></option> <?php endforeach ?> </select> </div> - <div class="v-fix"> - <?php $_ccExpYear = $_form->getInfoData('cc_exp_year') ?> - <select id="<?php echo $_code ?>_expiration_yr" name="payment[cc_exp_year]" class="year" data-container="cc-year" data-validate='{required:true}'> - <?php foreach ($_form->getCcYears() as $k=>$v): ?> - <option value="<?php echo $k?$k:'' ?>"<?php if($k==$_ccExpYear): ?> selected="selected"<?php endif ?>><?php echo $v ?></option> - <?php endforeach ?> - </select> + </div> + <div class="field required number"> + <label for="<?php echo $_code ?>_cc_number" class="label"><span><?php echo __('Credit Card Number') ?></span></label> + <div class="control"> + <input type="text" id="<?php echo $_code ?>_cc_number" data-container="cc-number" name="payment[cc_number]" title="<?php echo __('Credit Card Number') ?>" class="input-text" value="" data-validate='{required:true, "validate-cc-number":"#<?php echo $_code ?>_cc_type", "validate-cc-type":"#<?php echo $_code ?>_cc_type"}' autocomplete="off"/> </div> </div> - </li> - <?php echo $_form->getChildHtml() ?> - <?php if($_form->hasVerification()): ?> - <li id="<?php echo $_code ?>_cc_type_cvv_div"> - <label for="<?php echo $_code ?>_cc_cid" class="required"><em>*</em><?php echo __('Card Verification Number') ?></label> - <div class="input-box"> - <div class="v-fix"> + <div class="field required date" id="<?php echo $_code ?>_cc_type_exp_div"> + <label for="<?php echo $_code ?>_expiration" class="label"><span><?php echo __('Expiration Date') ?></span></label> + <div class="control"> + <div class="fields group group-2"> + <div class="field no-label month"> + <div class="control"> + <select id="<?php echo $_code ?>_expiration" name="payment[cc_exp_month]" data-container="cc-month" class="month" data-validate='{required:true, "validate-cc-exp":"#<?php echo $_code ?>_expiration_yr"}'> + <?php $_ccExpMonth = $_form->getInfoData('cc_exp_month') ?> + <?php foreach ($_form->getCcMonths() as $k=>$v): ?> + <option value="<?php echo $k?$k:'' ?>"<?php if($k==$_ccExpMonth): ?> selected="selected"<?php endif ?>><?php echo $v ?></option> + <?php endforeach ?> + </select> + </div> + </div> + <div class="field no-label year"> + <div class="control"> + <?php $_ccExpYear = $_form->getInfoData('cc_exp_year') ?> + <select id="<?php echo $_code ?>_expiration_yr" name="payment[cc_exp_year]" class="year" data-container="cc-year" data-validate='{required:true}'> + <?php foreach ($_form->getCcYears() as $k=>$v): ?> + <option value="<?php echo $k?$k:'' ?>"<?php if($k==$_ccExpYear): ?> selected="selected"<?php endif ?>><?php echo $v ?></option> + <?php endforeach ?> + </select> + </div> + </div> + </div> + </div> + </div> + <?php if($_form->hasVerification()): ?> + <div class="field required cvv" id="<?php echo $_code ?>_cc_type_cvv_div"> + <label for="<?php echo $_code ?>_cc_cid" class="label"><span><?php echo __('Card Verification Number') ?></span></label> + <div class="control"> <input type="text" title="<?php echo __('Card Verification Number') ?>" data-container="cc-cvv" class="input-text cvv" id="<?php echo $_code ?>_cc_cid" name="payment[cc_cid]" value="" data-validate='{required:true, "validate-cc-cvn":"#<?php echo $_code ?>_cc_type"}' autocomplete="off"/> + <div class="note"> + <a href="#" id="directpost-cvv-what-is-this" class="action cvv" data-mage-init='{toggleAdvanced: {toggleContainers:"#directpost-tool-tip"}}'><span><?php echo __('What is this?') ?></span></a> + </div> + <div class="tooltip hidden" id="directpost-tool-tip"> + <a href="#" id="directpost-tool-tip-close" title="<?php echo __('Close') ?>" data-mage-init='{toggleAdvanced: {toggleContainers:"#directpost-tool-tip"}}' class="action close"> + <span><?php echo __('Close') ?></span> + </a> + <div class="content"><img src="<?php echo $this->getViewFileUrl('Magento_Checkout::cvv.gif') ?>" alt="<?php echo __('Card Verification Number Visual Reference') ?>" title="<?php echo __('Card Verification Number Visual Reference') ?>" /></div> + </div> </div> - <a href="#" id="directpost-cvv-what-is-this" style="cursor:help; margin-left:5px;" data-mage-init='{toggleAdvanced: {toggleContainers:"#directpost-tool-tip"}}'><?php echo __('What is this?') ?></a> </div> - </li> - <?php endif; ?> -</ul> -</dd> -</dl> + <?php endif; ?> + <?php echo $_form->getChildHtml() ?> </fieldset> </form> -</div> -<div class="tool-tip hidden" id="directpost-tool-tip"> - <div class="btn-close"><a href="#" id="directpost-tool-tip-close" title="<?php echo __('Close') ?>" data-mage-init='{toggleAdvanced: {toggleContainers:"#directpost-tool-tip"}}'><?php echo __('Close') ?></a></div> - <div class="tool-tip-content"><img src="<?php echo $this->getViewFileUrl('Magento_Checkout::cvv.gif') ?>" alt="<?php echo __('Card Verification Number Visual Reference') ?>" title="<?php echo __('Card Verification Number Visual Reference') ?>" /></div> -</div> diff --git a/app/code/Magento/Authorizenet/view/frontend/directpost/info.phtml b/app/code/Magento/Authorizenet/view/frontend/directpost/info.phtml index 7f1a692d0c1992be378f49691e38149c0f22fdc2..ec5a56ac5ee0a653e2251c4a9ada1b9367d82f99 100644 --- a/app/code/Magento/Authorizenet/view/frontend/directpost/info.phtml +++ b/app/code/Magento/Authorizenet/view/frontend/directpost/info.phtml @@ -28,8 +28,8 @@ * @see \Magento\Authorizenet\Block\Directpost\Form */ ?> -<ul id="payment_form_<?php echo $this->getMethodCode() ?>" style="display:none"> - <li> - <?php echo __('You\'ll be asked for your payment details before placing an order.') ?> - </li> -</ul> +<fieldset id="payment_form_<?php echo $this->getMethodCode() ?>" style="display:none" class="fieldset items"> + <div class="message notice"> + <div><?php echo __('You\'ll be asked for your payment details before placing an order.') ?></div> + </div> +</fieldset> diff --git a/app/code/Magento/Backend/App/AbstractAction.php b/app/code/Magento/Backend/App/AbstractAction.php new file mode 100644 index 0000000000000000000000000000000000000000..308a1c84d847949d0c8a38bcf6ae8fe3453913d4 --- /dev/null +++ b/app/code/Magento/Backend/App/AbstractAction.php @@ -0,0 +1,396 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * 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_Backend + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Backend\App; + +/** + * Generic backend controller + * + * @SuppressWarnings(PHPMD.NumberOfChildren) + */ +abstract class AbstractAction extends \Magento\App\Action\Action +{ + /** + * Name of "is URLs checked" flag + */ + const FLAG_IS_URLS_CHECKED = 'check_url_settings'; + + /** + * Session namespace to refer in other places + */ + const SESSION_NAMESPACE = 'adminhtml'; + + /** + * Array of actions which can be processed without secret key validation + * + * @var array + */ + protected $_publicActions = array(); + + /** + * Namespace for session. + * + * @var string + */ + protected $_sessionNamespace = self::SESSION_NAMESPACE; + + /** + * @var \Magento\Backend\Helper\Data + */ + protected $_helper; + + /** + * @var \Magento\Backend\Model\Session + */ + protected $_session; + + /** + * @var \Magento\AuthorizationInterface + */ + protected $_authorization; + + /** + * @var \Magento\Backend\Model\Auth + */ + protected $_auth; + + /** + * @var \Magento\Backend\Model\Url + */ + protected $_backendUrl; + + /** + * @var \Magento\Core\Model\LocaleInterface + */ + protected $_locale; + + /** + * @var bool + */ + protected $_canUseBaseUrl; + + /** + * @var \Magento\Core\App\Action\FormKeyValidator + */ + protected $_formKeyValidator; + + /** + * @var \Magento\App\Action\Title + */ + protected $_title; + + /** + * @param \Magento\Backend\App\Action\Context $context + */ + public function __construct(Action\Context $context) + { + parent::__construct($context); + $this->_authorization = $context->getAuthorization(); + $this->_auth = $context->getAuth(); + $this->_helper = $context->getHelper(); + $this->_backendUrl = $context->getBackendUrl(); + $this->_formKeyValidator = $context->getFormKeyValidator(); + $this->_title = $context->getTitle(); + $this->_locale = $context->getLocale(); + $this->_canUseBaseUrl = $context->getCanUseBaseUrl(); + $this->_session = $context->getSession(); + } + + protected function _isAllowed() + { + return true; + } + + /** + * Retrieve adminhtml session model object + * + * @return \Magento\Backend\Model\Session + */ + protected function _getSession() + { + return $this->_session; + } + + /** + * Define active menu item in menu block + * @param string $itemId current active menu item + * @return \Magento\Backend\App\AbstractAction + */ + protected function _setActiveMenu($itemId) + { + /** @var $menuBlock \Magento\Backend\Block\Menu */ + $menuBlock = $this->_view->getLayout()->getBlock('menu'); + $menuBlock->setActive($itemId); + $parents = $menuBlock->getMenuModel()->getParentItems($itemId); + $parents = array_reverse($parents); + foreach ($parents as $item) { + /** @var $item \Magento\Backend\Model\Menu\Item */ + $this->_title->add($item->getTitle(), true); + } + return $this; + } + + /** + * @param $label + * @param $title + * @param null $link + * @return \Magento\Backend\App\AbstractAction + */ + protected function _addBreadcrumb($label, $title, $link=null) + { + $this->_view->getLayout()->getBlock('breadcrumbs')->addLink($label, $title, $link); + return $this; + } + + /** + * @param \Magento\View\Block\AbstractBlock $block + * @return \Magento\Backend\App\AbstractAction + */ + protected function _addContent(\Magento\View\Block\AbstractBlock $block) + { + return $this->_moveBlockToContainer($block, 'content'); + } + + /** + * @param \Magento\View\Block\AbstractBlock $block + * @return \Magento\Backend\App\AbstractAction + */ + protected function _addLeft(\Magento\View\Block\AbstractBlock $block) + { + return $this->_moveBlockToContainer($block, 'left'); + } + + /** + * @param \Magento\View\Block\AbstractBlock $block + * @return \Magento\Backend\App\AbstractAction + */ + protected function _addJs(\Magento\View\Block\AbstractBlock $block) + { + return $this->_moveBlockToContainer($block, 'js'); + } + + /** + * Set specified block as an anonymous child to specified container + * + * The block will be moved to the container from previous parent after all other elements + * + * @param \Magento\View\Block\AbstractBlock $block + * @param string $containerName + * @return \Magento\Backend\App\AbstractAction + */ + private function _moveBlockToContainer(\Magento\View\Block\AbstractBlock $block, $containerName) + { + $this->_view->getLayout()->setChild($containerName, $block->getNameInLayout(), ''); + return $this; + } + + /** + * @param \Magento\App\RequestInterface $request + * @return $this|mixed + */ + public function dispatch(\Magento\App\RequestInterface $request) + { + if (!$this->_processUrlKeys()) { + return parent::dispatch($request); + } + + if ($request->isDispatched() && $request->getActionName() !== 'denied' && !$this->_isAllowed()) { + $this->_forward('denied'); + $this->_actionFlag->set('', self::FLAG_NO_DISPATCH, true); + return parent::dispatch($request); + } + + if ($this->_isUrlChecked()) { + $this->_actionFlag->set('', self::FLAG_IS_URLS_CHECKED, true); + } + + $this->_processLocaleSettings(); + + return parent::dispatch($request); + } + + /** + * Check whether url is checked + * + * @return bool + */ + protected function _isUrlChecked() + { + return !$this->_actionFlag->get('', self::FLAG_IS_URLS_CHECKED) + && !$this->getRequest()->getParam('forwarded') + && !$this->_getSession()->getIsUrlNotice(true) + && !$this->_canUseBaseUrl; + } + + /** + * Check url keys. If non valid - redirect + * + * @return bool + */ + public function _processUrlKeys() + { + $_isValidFormKey = true; + $_isValidSecretKey = true; + $_keyErrorMsg = ''; + if ($this->_auth->isLoggedIn()) { + if ($this->getRequest()->isPost()) { + $_isValidFormKey = $this->_formKeyValidator->validate($this->getRequest()); + $_keyErrorMsg = __('Invalid Form Key. Please refresh the page.'); + } elseif ($this->_backendUrl->useSecretKey()) { + $_isValidSecretKey = $this->_validateSecretKey(); + $_keyErrorMsg = __('You entered an invalid Secret Key. Please refresh the page.'); + } + } + if (!$_isValidFormKey || !$_isValidSecretKey) { + $this->_actionFlag->set('', self::FLAG_NO_DISPATCH, true); + $this->_actionFlag->set('', self::FLAG_NO_POST_DISPATCH, true); + if ($this->getRequest()->getQuery('isAjax', false) || $this->getRequest()->getQuery('ajax', false)) { + $this->getResponse()->setBody($this->_objectManager->get('Magento\Core\Helper\Data')->jsonEncode(array( + 'error' => true, + 'message' => $_keyErrorMsg + ))); + } else { + $this->_redirect($this->_backendUrl->getStartupPageUrl()); + } + return false; + } + return true; + } + + /** + * Set session locale, + * process force locale set through url params + * + * @return \Magento\Backend\App\AbstractAction + */ + protected function _processLocaleSettings() + { + $forceLocale = $this->getRequest()->getParam('locale', null); + if ($this->_objectManager->get('Magento\Core\Model\Locale\Validator')->isValid($forceLocale)) { + $this->_getSession()->setSessionLocale($forceLocale); + } + + if (is_null($this->_getSession()->getLocale())) { + $this->_getSession()->setLocale($this->_locale->getLocaleCode()); + } + + return $this; + } + + public function deniedAction() + { + $this->getResponse()->setHeader('HTTP/1.1', '403 Forbidden'); + if (!$this->_auth->isLoggedIn()) { + $this->_redirect('*/auth/login'); + return; + } + $this->_view->loadLayout(array('default', 'adminhtml_denied')); + $this->_view->renderLayout(); + } + + /** + * No route action + * + * @param null $coreRoute + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + public function norouteAction($coreRoute = null) + { + $this->getResponse()->setHeader('HTTP/1.1', '404 Not Found'); + $this->getResponse()->setHeader('Status', '404 File not found'); + $this->_view->loadLayout(array('default', 'adminhtml_noroute')); + $this->_view->renderLayout(); + } + + /** + * Set redirect into response + * + * @param string $path + * @param array $arguments + * @return \Magento\Backend\App\AbstractAction + */ + protected function _redirect($path, $arguments=array()) + { + $this->_getSession()->setIsUrlNotice($this->_actionFlag->get('', self::FLAG_IS_URLS_CHECKED)); + $this->getResponse()->setRedirect($this->getUrl($path, $arguments)); + return $this; + } + + protected function _forward($action, $controller = null, $module = null, array $params = null) + { + $this->_getSession()->setIsUrlNotice($this->_actionFlag->get('', self::FLAG_IS_URLS_CHECKED)); + return parent::_forward($action, $controller, $module, $params); + } + + /** + * Generate url by route and parameters + * + * @param string $route + * @param array $params + * @return string + */ + public function getUrl($route = '', $params=array()) + { + return $this->_helper->getUrl($route, $params); + } + + /** + * Validate Secret Key + * + * @return bool + */ + protected function _validateSecretKey() + { + if (is_array($this->_publicActions) && in_array($this->getRequest()->getActionName(), $this->_publicActions)) { + return true; + } + + $secretKey = $this->getRequest()->getParam(\Magento\Backend\Model\Url::SECRET_KEY_PARAM_NAME, null); + if (!$secretKey || $secretKey != $this->_backendUrl->getSecretKey()) { + return false; + } + return true; + } + + /** + * Render specified template + * + * @param string $tplName + * @param array $data parameters required by template + */ + protected function _outTemplate($tplName, $data = array()) + { + $this->_view->getLayout()->initMessages('Magento\Backend\Model\Session'); + $block = $this->_view->getLayout() + ->createBlock('Magento\Backend\Block\Template')->setTemplate("{$tplName}.phtml"); + foreach ($data as $index => $value) { + $block->assign($index, $value); + } + $html = $block->toHtml(); + $this->_objectManager->get('Magento\Core\Model\Translate')->processResponseBody($html); + $this->getResponse()->setBody($html); + } +} \ No newline at end of file diff --git a/app/code/Magento/Backend/Controller/Adminhtml/Action.php b/app/code/Magento/Backend/App/Action.php similarity index 90% rename from app/code/Magento/Backend/Controller/Adminhtml/Action.php rename to app/code/Magento/Backend/App/Action.php index bc612975e59101e362e24d548493bc43a82d2b31..3cb001f8cf8771bb1b1321981eb5085636306187 100644 --- a/app/code/Magento/Backend/Controller/Adminhtml/Action.php +++ b/app/code/Magento/Backend/App/Action.php @@ -27,8 +27,8 @@ /** * Generic backend controller */ -namespace Magento\Backend\Controller\Adminhtml; +namespace Magento\Backend\App; -class Action extends \Magento\Backend\Controller\AbstractAction +class Action extends \Magento\Backend\App\AbstractAction { } diff --git a/app/code/Magento/Backend/Controller/Context.php b/app/code/Magento/Backend/App/Action/Context.php similarity index 73% rename from app/code/Magento/Backend/Controller/Context.php rename to app/code/Magento/Backend/App/Action/Context.php index 2879f6c73fd6219dbdaebffede4ff612bb5ffae9..7774862ce12076a76a0447f43bffd889afec0066 100644 --- a/app/code/Magento/Backend/Controller/Context.php +++ b/app/code/Magento/Backend/App/Action/Context.php @@ -24,44 +24,42 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Backend\Controller; +namespace Magento\Backend\App\Action; /** - * Controller context - * - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * Backend Controller context */ -class Context extends \Magento\Core\Controller\Varien\Action\Context +class Context extends \Magento\App\Action\Context { /** - * @var \Magento\Backend\Model\Session + * @var \Magento\AuthorizationInterface */ - protected $_session; + protected $_authorization; /** - * @var \Magento\Backend\Helper\Data + * @var \Magento\Backend\Model\Auth */ - protected $_helper; + protected $_auth; /** - * @var \Magento\AuthorizationInterface + * @var \Magento\Backend\Helper\Data */ - protected $_authorization; + protected $_helper; /** - * @var \Magento\Core\Model\Translate + * @var \Magento\Backend\Model\Url */ - protected $_translator; + protected $_backendUrl; /** - * @var \Magento\Backend\Model\Auth + * @var \Magento\Core\App\Action\FormKeyValidator */ - protected $_auth; + protected $_formKeyValidator; /** - * @var \Magento\Backend\Model\Url + * @var \Magento\App\Action\Title */ - protected $_backendUrl; + protected $_title; /** * @var \Magento\Core\Model\LocaleInterface @@ -74,102 +72,115 @@ class Context extends \Magento\Core\Controller\Varien\Action\Context protected $_canUseBaseUrl; /** - * @param \Magento\Logger $logger + * @var \Magento\Backend\Model\Session + */ + protected $_session; + + /** * @param \Magento\App\RequestInterface $request * @param \Magento\App\ResponseInterface $response * @param \Magento\ObjectManager $objectManager - * @param \Magento\App\FrontController $frontController - * @param \Magento\View\LayoutInterface $layout * @param \Magento\Event\ManagerInterface $eventManager - * @param \Magento\HTTP\Authentication $authentication * @param \Magento\Backend\Model\Session $session - * @param \Magento\Backend\Helper\Data $helper + * @param \Magento\UrlInterface $url + * @param \Magento\App\Response\RedirectInterface $redirect + * @param \Magento\App\ActionFlag $actionFlag + * @param \Magento\App\ViewInterface $view * @param \Magento\AuthorizationInterface $authorization - * @param \Magento\Core\Model\Translate $translator * @param \Magento\Backend\Model\Auth $auth + * @param \Magento\Backend\Helper\Data $helper * @param \Magento\Backend\Model\Url $backendUrl + * @param \Magento\Core\App\Action\FormKeyValidator $formKeyValidator + * @param \Magento\App\Action\Title $title * @param \Magento\Core\Model\LocaleInterface $locale * @param bool $canUseBaseUrl - * - * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( - \Magento\Logger $logger, \Magento\App\RequestInterface $request, \Magento\App\ResponseInterface $response, \Magento\ObjectManager $objectManager, - \Magento\App\FrontController $frontController, - \Magento\View\LayoutInterface $layout, \Magento\Event\ManagerInterface $eventManager, - \Magento\HTTP\Authentication $authentication, \Magento\Backend\Model\Session $session, - \Magento\Backend\Helper\Data $helper, + \Magento\UrlInterface $url, + \Magento\App\Response\RedirectInterface $redirect, + \Magento\App\ActionFlag $actionFlag, + \Magento\App\ViewInterface $view, \Magento\AuthorizationInterface $authorization, - \Magento\Core\Model\Translate $translator, \Magento\Backend\Model\Auth $auth, + \Magento\Backend\Helper\Data $helper, \Magento\Backend\Model\Url $backendUrl, + \Magento\Core\App\Action\FormKeyValidator $formKeyValidator, + \Magento\App\Action\Title $title, \Magento\Core\Model\LocaleInterface $locale, $canUseBaseUrl = false ) { - parent::__construct($logger, $request, $response, $objectManager, $frontController, $layout, $eventManager, - $authentication + parent::__construct( + $request, + $response, + $objectManager, + $eventManager, + $url, + $redirect, + $actionFlag, + $view ); - $this->_canUseBaseUrl = $canUseBaseUrl; $this->_session = $session; - $this->_helper = $helper; $this->_authorization = $authorization; - $this->_translator = $translator; $this->_auth = $auth; + $this->_helper = $helper; $this->_backendUrl = $backendUrl; + $this->_formKeyValidator = $formKeyValidator; + $this->_title = $title; $this->_locale = $locale; + $this->_canUseBaseUrl = $canUseBaseUrl; } /** - * @return \Magento\Backend\Helper\Data + * @return \Magento\Backend\Model\Auth */ - public function getHelper() + public function getAuth() { - return $this->_helper; + return $this->_auth; } /** - * @return \Magento\Backend\Model\Session + * @return \Magento\AuthorizationInterface */ - public function getSession() + public function getAuthorization() { - return $this->_session; + return $this->_authorization; } /** - * @return \Magento\AuthorizationInterface + * @return \Magento\Backend\Model\Url */ - public function getAuthorization() + public function getBackendUrl() { - return $this->_authorization; + return $this->_backendUrl; } /** - * @return \Magento\Core\Model\Translate + * @return boolean */ - public function getTranslator() + public function getCanUseBaseUrl() { - return $this->_translator; + return $this->_canUseBaseUrl; } /** - * @return \Magento\Backend\Model\Auth + * @return \Magento\Core\App\Action\FormKeyValidator */ - public function getAuth() + public function getFormKeyValidator() { - return $this->_auth; + return $this->_formKeyValidator; } /** - * @return \Magento\Backend\Model\Url + * @return \Magento\Backend\Helper\Data */ - public function getBackendUrl() + public function getHelper() { - return $this->_backendUrl; + return $this->_helper; } /** @@ -181,10 +192,18 @@ class Context extends \Magento\Core\Controller\Varien\Action\Context } /** - * @return boolean + * @return \Magento\App\Action\Title */ - public function getCanUseBaseUrl() + public function getTitle() { - return $this->_canUseBaseUrl; + return $this->_title; + } + + /** + * @return \Magento\Backend\Model\Session + */ + public function getSession() + { + return $this->_session; } -} +} \ No newline at end of file diff --git a/app/code/Magento/Backend/App/Action/Plugin/Authentication.php b/app/code/Magento/Backend/App/Action/Plugin/Authentication.php new file mode 100644 index 0000000000000000000000000000000000000000..9013a9d6d49ca644c4eda46fde28f8023a750805 --- /dev/null +++ b/app/code/Magento/Backend/App/Action/Plugin/Authentication.php @@ -0,0 +1,196 @@ +<?php +/** + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Backend\App\Action\Plugin; + + +class Authentication +{ + /** + * @var \Magento\Backend\Model\Auth + */ + protected $_auth; + + /** + * @var array + */ + protected $_openActions = array( + 'forgotpassword', + 'resetpassword', + 'resetpasswordpost', + 'logout', + 'refresh' // captcha refresh + ); + + /** + * @var \Magento\Backend\Model\Url + */ + protected $_url; + + /** + * @var \Magento\Backend\Model\Session + */ + protected $_session; + + /** + * @var \Magento\App\ResponseInterface + */ + protected $_response; + + /** + * @var \Magento\App\ActionFlag + */ + protected $_actionFlag; + + /** + * @param \Magento\Backend\Model\Auth $auth + * @param \Magento\Backend\Model\Session $session + * @param \Magento\Backend\Model\Url $url + * @param \Magento\App\ResponseInterface $response + * @param \Magento\App\ActionFlag $actionFlag + */ + public function __construct( + \Magento\Backend\Model\Auth $auth, + \Magento\Backend\Model\Session $session, + \Magento\Backend\Model\Url $url, + \Magento\App\ResponseInterface $response, + \Magento\App\ActionFlag $actionFlag + ) { + $this->_auth = $auth; + $this->_session = $session; + $this->_url = $url; + $this->_response = $response; + $this->_actionFlag = $actionFlag; + } + + /** + * @param array $arguments + * @param \Magento\Code\Plugin\InvocationChain $invocationChain + * @return mixed + */ + public function aroundDispatch(array $arguments, \Magento\Code\Plugin\InvocationChain $invocationChain) + { + $request = $arguments[0]; + $requestedActionName = $request->getActionName(); + if (in_array($requestedActionName, $this->_openActions)) { + $request->setDispatched(true); + } else { + if ($this->_auth->getUser()) { + $this->_auth->getUser()->reload(); + } + if (!$this->_auth->isLoggedIn()) { + $this->_processNotLoggedInUser($request); + } + } + $this->_auth->getAuthStorage()->refreshAcl(); + return $invocationChain->proceed($arguments); + } + + /** + * Process not logged in user data + * + * @param \Magento\App\RequestInterface $request + */ + protected function _processNotLoggedInUser(\Magento\App\RequestInterface $request) + { + $isRedirectNeeded = false; + if ($request->getPost('login') && $this->_performLogin($request)) { + $isRedirectNeeded = $this->_redirectIfNeededAfterLogin($request); + } + if (!$isRedirectNeeded && !$request->getParam('forwarded')) { + if ($request->getParam('isIframe')) { + $request->setParam('forwarded', true) + ->setRouteName('adminhtml') + ->setControllerName('auth') + ->setActionName('deniedIframe') + ->setDispatched(false); + } elseif ($request->getParam('isAjax')) { + $request->setParam('forwarded', true) + ->setRouteName('adminhtml') + ->setControllerName('auth') + ->setActionName('deniedJson') + ->setDispatched(false); + } else { + $request->setParam('forwarded', true) + ->setRouteName('adminhtml') + ->setControllerName('auth') + ->setActionName('login') + ->setDispatched(false); + } + } + } + + /** + * Performs login, if user submitted login form + * + * @param \Magento\App\RequestInterface $request + * @return bool + */ + protected function _performLogin(\Magento\App\RequestInterface $request) + { + $outputValue = true; + $postLogin = $request->getPost('login'); + $username = isset($postLogin['username']) ? $postLogin['username'] : ''; + $password = isset($postLogin['password']) ? $postLogin['password'] : ''; + $request->setPost('login', null); + + try { + $this->_auth->login($username, $password); + } catch (\Magento\Backend\Model\Auth\Exception $e) { + if (!$request->getParam('messageSent')) { + $this->_session->addError($e->getMessage()); + $request->setParam('messageSent', true); + $outputValue = false; + } + } + return $outputValue; + } + + /** + * Checks, whether Magento requires redirection after successful admin login, and redirects user, if needed + * + * @param \Magento\App\RequestInterface $request + * @return bool + */ + protected function _redirectIfNeededAfterLogin(\Magento\App\RequestInterface $request) + { + $requestUri = null; + + // Checks, whether secret key is required for admin access or request uri is explicitly set + if ($this->_url->useSecretKey()) { + $requestUri = $this->_url->getUrl('*/*/*', array('_current' => true)); + } elseif ($request) { + $requestUri = $request->getRequestUri(); + } + + if (!$requestUri) { + return false; + } + + $this->_response->setRedirect($requestUri); + $this->_actionFlag->set('', \Magento\App\Action\Action::FLAG_NO_DISPATCH, true); + return true; + } +} \ No newline at end of file diff --git a/app/code/Magento/Backend/App/Action/Plugin/MassactionKey.php b/app/code/Magento/Backend/App/Action/Plugin/MassactionKey.php new file mode 100644 index 0000000000000000000000000000000000000000..6900a35f0dabcf7c1ace4ee9a0a8495f1886a41f --- /dev/null +++ b/app/code/Magento/Backend/App/Action/Plugin/MassactionKey.php @@ -0,0 +1,49 @@ +<?php +/** + * Massaction key processor + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +namespace Magento\Backend\App\Action\Plugin; + + +class MassactionKey +{ + /** + * Process massaction key + * + * @param array $arguments + * @param \Magento\Code\Plugin\InvocationChain $invocationChain + * @return mixed + */ + public function aroundDispatch(array $arguments, \Magento\Code\Plugin\InvocationChain $invocationChain) + { + $request = $arguments[0]; + $key = $request->getPost('massaction_prepare_key'); + if ($key) { + $postData = $request->getPost($key); + $value = is_array($postData) ? $postData : explode(',', $postData); + $request->setPost($key, $value ? $value : null); + } + return $invocationChain->proceed($arguments); + } +} \ No newline at end of file diff --git a/app/code/Magento/Backend/App/Action/Plugin/Store.php b/app/code/Magento/Backend/App/Action/Plugin/Store.php new file mode 100644 index 0000000000000000000000000000000000000000..25d991069eb720e1a7afa3e4e67fbd85f10ba595 --- /dev/null +++ b/app/code/Magento/Backend/App/Action/Plugin/Store.php @@ -0,0 +1,53 @@ +<?php +/** + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Backend\App\Action\Plugin; + +class Store +{ + /** + * @var \Magento\Core\Model\StoreManagerInterface + */ + protected $_storeManager; + + /** + * @param \Magento\Core\Model\StoreManagerInterface $storeManager + */ + public function __construct(\Magento\Core\Model\StoreManagerInterface $storeManager) + { + $this->_storeManager = $storeManager; + } + + /** + * @param array $arguments + * @param \Magento\Code\Plugin\InvocationChain $invocationChain + * @return array + */ + public function aroundDispatch(array $arguments, \Magento\Code\Plugin\InvocationChain $invocationChain) + { + $this->_storeManager->setCurrentStore('admin'); + return $invocationChain->proceed($arguments); + } +} \ No newline at end of file diff --git a/app/code/Magento/Backend/App/Response/Http/FileFactory.php b/app/code/Magento/Backend/App/Response/Http/FileFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..2facf5afe453ff13b0023d3a0849d56550dca7a1 --- /dev/null +++ b/app/code/Magento/Backend/App/Response/Http/FileFactory.php @@ -0,0 +1,120 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +namespace Magento\Backend\App\Response\Http; + +class FileFactory extends \Magento\App\Response\Http\FileFactory +{ + /** + * @var \Magento\Backend\Model\Auth + */ + protected $_auth; + + /** + * @var \Magento\Backend\Model\Url + */ + protected $_backendUrl; + + /** + * @var \Magento\App\ResponseFactory + */ + protected $_responseFactory; + + /** + * @var \Magento\Backend\Model\Session + */ + protected $_session; + + /** + * @var \Magento\App\ActionFlag + */ + protected $_flag; + + /** + * @var \Magento\Backend\Helper\Data + */ + protected $_helper; + + /** + * @param \Magento\App\ResponseFactory $responseFactory + * @param \Magento\Filesystem $filesystem + * @param \Magento\Backend\Model\Auth $auth + * @param \Magento\Backend\Model\Url $backendUrl + * @param \Magento\Backend\Model\Session $session + * @param \Magento\App\ActionFlag $flag + * @param \Magento\Backend\Helper\Data $helper + */ + public function __construct( + \Magento\App\ResponseFactory $responseFactory, + \Magento\Filesystem $filesystem, + \Magento\Backend\Model\Auth $auth, + \Magento\Backend\Model\Url $backendUrl, + \Magento\Backend\Model\Session $session, + \Magento\App\ActionFlag $flag, + \Magento\Backend\Helper\Data $helper + ) { + $this->_auth = $auth; + $this->_backendUrl = $backendUrl; + $this->_session = $session; + $this->_flag = $flag; + $this->_helper = $helper; + parent::__construct($responseFactory, $filesystem); + } + + + /** + * Set redirect into response + * + * @param string $path + * @param array $arguments + * @return \Magento\App\ResponseInterface + * @TODO move method + */ + protected function _redirect($path, $arguments=array()) + { + $this->_session + ->setIsUrlNotice($this->_flag->get('', \Magento\Backend\App\AbstractAction::FLAG_IS_URLS_CHECKED)); + $response = $this->_responseFactory->create(); + $response->setRedirect($this->_helper->getUrl($path, $arguments)); + return $response; + } + + /** + * Declare headers and content file in response for file download + * + * @param string $fileName + * @param string|array $content set to null to avoid starting output, $contentLength should be set explicitly in + * that case + * @param string $contentType + * @param int $contentLength explicit content length, if strlen($content) isn't applicable + * @return \Magento\App\ResponseInterface + */ + public function create($fileName, $content, $contentType = 'application/octet-stream', $contentLength = null) + { + if ($this->_auth->getAuthStorage()->isFirstPageAfterLogin()) { + $response = $this->_redirect($this->_backendUrl->getStartupPageUrl()); + return $response; + } + return parent::create($fileName, $content, $contentType, $contentLength); + } +} \ No newline at end of file diff --git a/app/code/Magento/Backend/App/Router/NoRouteHandler.php b/app/code/Magento/Backend/App/Router/NoRouteHandler.php index 5db07afe0fe49eb1c83f9bf5bf44ccba0bc459c1..bef2e0e58cfbb4b5002bcc829c02a0cede39228d 100644 --- a/app/code/Magento/Backend/App/Router/NoRouteHandler.php +++ b/app/code/Magento/Backend/App/Router/NoRouteHandler.php @@ -54,8 +54,8 @@ class NoRouteHandler implements \Magento\App\Router\NoRouteHandlerInterface if ($areaFrontName == $this->_helper->getAreaFrontName()) { $moduleName = 'admin'; - $controllerName = 'index'; - $actionName = 'noRoute'; + $controllerName = 'noroute'; + $actionName = 'index'; $request->setModuleName($moduleName) ->setControllerName($controllerName) diff --git a/app/code/Magento/Backend/Block/AbstractBlock.php b/app/code/Magento/Backend/Block/AbstractBlock.php index 4b6938b6d9605e1637fd79bf5f5e3fabfe6c7400..d2f15309be7434a55d899bfffef64ee325d2593b 100644 --- a/app/code/Magento/Backend/Block/AbstractBlock.php +++ b/app/code/Magento/Backend/Block/AbstractBlock.php @@ -31,7 +31,7 @@ namespace Magento\Backend\Block; * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ -class AbstractBlock extends \Magento\Core\Block\AbstractBlock +class AbstractBlock extends \Magento\View\Block\AbstractBlock { /** * @var \Magento\AuthorizationInterface diff --git a/app/code/Magento/Backend/Block/Cache/Grid/Column/Statuses.php b/app/code/Magento/Backend/Block/Cache/Grid/Column/Statuses.php index 23b3247368dabdc2abc0bece362796062f9a4e49..5fbf20e5c8f9075ebadf4c4f17fca18ac4360d98 100644 --- a/app/code/Magento/Backend/Block/Cache/Grid/Column/Statuses.php +++ b/app/code/Magento/Backend/Block/Cache/Grid/Column/Statuses.php @@ -33,18 +33,18 @@ class Statuses extends \Magento\Backend\Block\Widget\Grid\Column protected $_cacheTypeList; /** - * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\App\Cache\TypeListInterface $cacheTypeList * @param array $data */ public function __construct( - \Magento\Core\Helper\Data $coreData, \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\App\Cache\TypeListInterface $cacheTypeList, array $data = array() ) { - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); $this->_cacheTypeList = $cacheTypeList; } diff --git a/app/code/Magento/Backend/Block/Context.php b/app/code/Magento/Backend/Block/Context.php index 244de9a48b925d75916af7b0242a820212abd253..55880dc9e89c51119d3f6b03b0651dd7dc48e326 100644 --- a/app/code/Magento/Backend/Block/Context.php +++ b/app/code/Magento/Backend/Block/Context.php @@ -28,7 +28,7 @@ namespace Magento\Backend\Block; * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ -class Context extends \Magento\Core\Block\Context +class Context extends \Magento\View\Block\Context { /** * @var \Magento\AuthorizationInterface @@ -46,7 +46,7 @@ class Context extends \Magento\Core\Block\Context * @param \Magento\Core\Model\Session\AbstractSession $session * @param \Magento\Core\Model\Store\Config $storeConfig * @param \Magento\App\FrontController $frontController - * @param \Magento\Core\Model\Factory\Helper $helperFactory + * @param \Magento\App\Helper\HelperFactory $helperFactory * @param \Magento\View\Url $viewUrl * @param \Magento\View\ConfigInterface $viewConfig * @param \Magento\App\Cache\StateInterface $cacheState @@ -71,7 +71,7 @@ class Context extends \Magento\Core\Block\Context \Magento\Core\Model\Session\AbstractSession $session, \Magento\Core\Model\Store\Config $storeConfig, \Magento\App\FrontController $frontController, - \Magento\Core\Model\Factory\Helper $helperFactory, + \Magento\App\Helper\HelperFactory $helperFactory, \Magento\View\Url $viewUrl, \Magento\View\ConfigInterface $viewConfig, \Magento\App\Cache\StateInterface $cacheState, diff --git a/app/code/Magento/Backend/Block/Dashboard/AbstractDashboard.php b/app/code/Magento/Backend/Block/Dashboard/AbstractDashboard.php index 96b3a8860c8aefb8891f1eeb70835932e8a3cb24..123848b6717a7805e547d273484dc46a679114be 100644 --- a/app/code/Magento/Backend/Block/Dashboard/AbstractDashboard.php +++ b/app/code/Magento/Backend/Block/Dashboard/AbstractDashboard.php @@ -43,20 +43,20 @@ abstract class AbstractDashboard extends \Magento\Adminhtml\Block\Widget */ protected $_collectionFactory; - /** - * @param \Magento\Reports\Model\Resource\Order\CollectionFactory $collectionFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Reports\Model\Resource\Order\CollectionFactory $collectionFactory + * @param array $data */ - public function __construct( - \Magento\Reports\Model\Resource\Order\CollectionFactory $collectionFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Reports\Model\Resource\Order\CollectionFactory $collectionFactory, + array $data = array() + ) { $this->_collectionFactory = $collectionFactory; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } public function getCollection() diff --git a/app/code/Magento/Backend/Block/Dashboard/Graph.php b/app/code/Magento/Backend/Block/Dashboard/Graph.php index 31b7da638ef78678f6d7fb63a5845135d297c67b..797aaec69a2ac3399993381e57db0c32aa477474 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Graph.php +++ b/app/code/Magento/Backend/Block/Dashboard/Graph.php @@ -120,22 +120,22 @@ class Graph extends \Magento\Backend\Block\Dashboard\AbstractDashboard */ protected $_dashboardData = null; - /** - * @param \Magento\Backend\Helper\Dashboard\Data $dashboardData - * @param \Magento\Reports\Model\Resource\Order\CollectionFactory $collectionFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Reports\Model\Resource\Order\CollectionFactory $collectionFactory + * @param \Magento\Backend\Helper\Dashboard\Data $dashboardData + * @param array $data */ - public function __construct( - \Magento\Backend\Helper\Dashboard\Data $dashboardData, - \Magento\Reports\Model\Resource\Order\CollectionFactory $collectionFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Reports\Model\Resource\Order\CollectionFactory $collectionFactory, + \Magento\Backend\Helper\Dashboard\Data $dashboardData, + array $data = array() + ) { $this->_dashboardData = $dashboardData; - parent::__construct($collectionFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $collectionFactory, $data); } /** @@ -340,9 +340,9 @@ class Graph extends \Magento\Backend\Block\Dashboard\AbstractDashboard $currentvalue = $thisdataarray[$j]; if (is_numeric($currentvalue)) { $ylocation = round((strlen($this->_simpleEncoding)-1) * ($yorigin + $currentvalue) / $yrange); - array_push($chartdata, substr($this->_simpleEncoding, $ylocation, 1) . $dataDelimiter); + $chartdata[] = substr($this->_simpleEncoding, $ylocation, 1) . $dataDelimiter; } else { - array_push($chartdata, $dataMissing . $dataDelimiter); + $chartdata[] = $dataMissing . $dataDelimiter; } } // END SIMPLE ENCODING @@ -360,14 +360,14 @@ class Graph extends \Magento\Backend\Block\Dashboard\AbstractDashboard $secondchar = $ylocation % 64; $mappedchar = substr($this->_extendedEncoding, $firstchar, 1) . substr($this->_extendedEncoding, $secondchar, 1); - array_push($chartdata, $mappedchar . $dataDelimiter); + $chartdata[] = $mappedchar . $dataDelimiter; } else { - array_push($chartdata, $dataMissing . $dataDelimiter); + $chartdata[] = $dataMissing . $dataDelimiter; } } // ============= END EXTENDED ENCODING ============= } - array_push($chartdata, $dataSetdelimiter); + $chartdata[] = $dataSetdelimiter; } $buffer = implode('', $chartdata); diff --git a/app/code/Magento/Backend/Block/Dashboard/Orders/Grid.php b/app/code/Magento/Backend/Block/Dashboard/Orders/Grid.php index 93c1f246cf9cd71b13c9787c899bbdf365f0193e..05cd859d92c443d826b8ebf8968f5470afb6285b 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Orders/Grid.php +++ b/app/code/Magento/Backend/Block/Dashboard/Orders/Grid.php @@ -41,24 +41,22 @@ class Grid extends \Magento\Backend\Block\Dashboard\Grid */ protected $_collectionFactory; - /** - * @param \Magento\Reports\Model\Resource\Order\CollectionFactory $collectionFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Reports\Model\Resource\Order\CollectionFactory $collectionFactory + * @param array $data */ - public function __construct( - \Magento\Reports\Model\Resource\Order\CollectionFactory $collectionFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Reports\Model\Resource\Order\CollectionFactory $collectionFactory, + array $data = array() + ) { $this->_collectionFactory = $collectionFactory; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $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 b5e82583b7c507557c5ff081130612031240d257..c340713e2b2313bc9cc567447e9f955903418345 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Searches/Last.php +++ b/app/code/Magento/Backend/Block/Dashboard/Searches/Last.php @@ -43,24 +43,22 @@ class Last extends \Magento\Backend\Block\Dashboard\Grid */ protected $_queriesFactory; - /** - * @param \Magento\CatalogSearch\Model\Resource\Query\CollectionFactory $queriesFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\CatalogSearch\Model\Resource\Query\CollectionFactory $queriesFactory + * @param array $data */ - public function __construct( - \Magento\CatalogSearch\Model\Resource\Query\CollectionFactory $queriesFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\CatalogSearch\Model\Resource\Query\CollectionFactory $queriesFactory, + array $data = array() + ) { $this->_queriesFactory = $queriesFactory; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $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 910711f08d45e6798ee4cec9545c5a073e9b7152..43df3a75d246f3da16bbbdfcf1c9fe1d3501aab8 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Searches/Renderer/Searchquery.php +++ b/app/code/Magento/Backend/Block/Dashboard/Searches/Renderer/Searchquery.php @@ -41,13 +41,13 @@ class Searchquery protected $_stringHelper = null; /** - * @param \Magento\Stdlib\String $stringHelper * @param \Magento\Backend\Block\Context $context + * @param \Magento\Stdlib\String $stringHelper * @param array $data */ public function __construct( - \Magento\Stdlib\String $stringHelper, \Magento\Backend\Block\Context $context, + \Magento\Stdlib\String $stringHelper, array $data = array() ) { $this->_stringHelper = $stringHelper; diff --git a/app/code/Magento/Backend/Block/Dashboard/Searches/Top.php b/app/code/Magento/Backend/Block/Dashboard/Searches/Top.php index c440370317c11fe7dfa86b8d48999bb3510049a1..a525d9e837227f75ea36dbcdff3c4816623d8da4 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Searches/Top.php +++ b/app/code/Magento/Backend/Block/Dashboard/Searches/Top.php @@ -43,24 +43,22 @@ class Top extends \Magento\Backend\Block\Dashboard\Grid */ protected $_queriesFactory; - /** - * @param \Magento\CatalogSearch\Model\Resource\Query\CollectionFactory $queriesFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\CatalogSearch\Model\Resource\Query\CollectionFactory $queriesFactory + * @param array $data */ - public function __construct( - \Magento\CatalogSearch\Model\Resource\Query\CollectionFactory $queriesFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\CatalogSearch\Model\Resource\Query\CollectionFactory $queriesFactory, + array $data = array() + ) { $this->_queriesFactory = $queriesFactory; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $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 4b4839f51e4e875a9836ff4dfba29101d4655ac8..86fe59f32fe07a55521760ba01cdf53947d78883 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Tab/Customers/Most.php +++ b/app/code/Magento/Backend/Block/Dashboard/Tab/Customers/Most.php @@ -41,24 +41,22 @@ class Most extends \Magento\Backend\Block\Dashboard\Grid */ protected $_collectionFactory; - /** - * @param \Magento\Reports\Model\Resource\Order\CollectionFactory $collectionFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Reports\Model\Resource\Order\CollectionFactory $collectionFactory + * @param array $data */ - public function __construct( - \Magento\Reports\Model\Resource\Order\CollectionFactory $collectionFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Reports\Model\Resource\Order\CollectionFactory $collectionFactory, + array $data = array() + ) { $this->_collectionFactory = $collectionFactory; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $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 e07c4254b63f29aa58b6d980012a109eaade5afa..72215de3b598aed2981a6ca5b40706aaa1cb22d7 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Tab/Customers/Newest.php +++ b/app/code/Magento/Backend/Block/Dashboard/Tab/Customers/Newest.php @@ -41,24 +41,22 @@ class Newest extends \Magento\Backend\Block\Dashboard\Grid */ protected $_collectionFactory; - /** - * @param \Magento\Reports\Model\Resource\Customer\CollectionFactory $collectionFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Reports\Model\Resource\Customer\CollectionFactory $collectionFactory + * @param array $data */ - public function __construct( - \Magento\Reports\Model\Resource\Customer\CollectionFactory $collectionFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Reports\Model\Resource\Customer\CollectionFactory $collectionFactory, + array $data = array() + ) { $this->_collectionFactory = $collectionFactory; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $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 01881f2902d5e2f537386df3c84bedae67085ae0..24166c3530e5623eaef227626da8565839ac7404 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Tab/Products/Ordered.php +++ b/app/code/Magento/Backend/Block/Dashboard/Tab/Products/Ordered.php @@ -41,24 +41,22 @@ class Ordered extends \Magento\Backend\Block\Dashboard\Grid */ protected $_collectionFactory; - /** - * @param \Magento\Sales\Model\Resource\Report\Bestsellers\CollectionFactory $collectionFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Sales\Model\Resource\Report\Bestsellers\CollectionFactory $collectionFactory + * @param array $data */ - public function __construct( - \Magento\Sales\Model\Resource\Report\Bestsellers\CollectionFactory $collectionFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Sales\Model\Resource\Report\Bestsellers\CollectionFactory $collectionFactory, + array $data = array() + ) { $this->_collectionFactory = $collectionFactory; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $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 937f782d4a1d11fd1645b618d8bb130b2b0ee297..ac246a749d41ef6acf872f17e15e948093d4b917 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Tab/Products/Viewed.php +++ b/app/code/Magento/Backend/Block/Dashboard/Tab/Products/Viewed.php @@ -41,24 +41,22 @@ class Viewed extends \Magento\Backend\Block\Dashboard\Grid */ protected $_productsFactory; - /** - * @param \Magento\Reports\Model\Resource\Product\CollectionFactory $productsFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Reports\Model\Resource\Product\CollectionFactory $productsFactory + * @param array $data */ - public function __construct( - \Magento\Reports\Model\Resource\Product\CollectionFactory $productsFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Reports\Model\Resource\Product\CollectionFactory $productsFactory, + array $data = array() + ) { $this->_productsFactory = $productsFactory; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $data); } protected function _construct() diff --git a/app/code/Magento/Backend/Block/Menu.php b/app/code/Magento/Backend/Block/Menu.php index 4ccced0de24042400a2095304db92f0e30333b0d..d7e946f5d270bd69a3bb0ae2b9b39d53c9c3bcd5 100644 --- a/app/code/Magento/Backend/Block/Menu.php +++ b/app/code/Magento/Backend/Block/Menu.php @@ -70,32 +70,34 @@ class Menu extends \Magento\Backend\Block\Template */ protected $_authSession; - /** - * @var \Magento\Core\Model\LocaleInterface - */ - protected $_locale; - /** * @var \Magento\Backend\Model\Menu\Config */ protected $_menuConfig; - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Backend\Model\Url $url, - \Magento\Backend\Model\Menu\Filter\IteratorFactory $iteratorFactory, - \Magento\Backend\Model\Auth\Session $authSession, - \Magento\Core\Model\LocaleInterface $locale, - \Magento\Backend\Model\Menu\Config $menuConfig, - array $data = array() - ) { + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Backend\Model\Url $url + * @param \Magento\Backend\Model\Menu\Filter\IteratorFactory $iteratorFactory + * @param \Magento\Backend\Model\Auth\Session $authSession + * @param \Magento\Backend\Model\Menu\Config $menuConfig + * @param array $data + */ + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Backend\Model\Url $url, + \Magento\Backend\Model\Menu\Filter\IteratorFactory $iteratorFactory, + \Magento\Backend\Model\Auth\Session $authSession, + \Magento\Backend\Model\Menu\Config $menuConfig, + array $data = array() + ) { $this->_url = $url; $this->_iteratorFactory = $iteratorFactory; $this->_authSession = $authSession; - $this->_locale = $locale; $this->_menuConfig = $menuConfig; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Backend/Block/Store/Switcher.php b/app/code/Magento/Backend/Block/Store/Switcher.php index 6f557d2761f7135eb87672dfda55d9732fdacc95..9644f6152111ad7739be8e1e759a4c6fa9690515 100644 --- a/app/code/Magento/Backend/Block/Store/Switcher.php +++ b/app/code/Magento/Backend/Block/Store/Switcher.php @@ -74,13 +74,6 @@ class Switcher extends \Magento\Backend\Block\Template */ protected $_template = 'Magento_Backend::store/switcher.phtml'; - /** - * Application model - * - * @var \Magento\Core\Model\App - */ - protected $_application; - /** * Website factory * @@ -102,26 +95,23 @@ class Switcher extends \Magento\Backend\Block\Template */ protected $_storeFactory; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\App $application - * @param \Magento\Core\Model\Website\Factory $websiteFactory - * @param \Magento\Core\Model\Store\Group\Factory $storeGroupFactory - * @param \Magento\Core\Model\StoreFactory $storeFactory - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Website\Factory $websiteFactory + * @param \Magento\Core\Model\Store\Group\Factory $storeGroupFactory + * @param \Magento\Core\Model\StoreFactory $storeFactory + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\App $application, - \Magento\Core\Model\Website\Factory $websiteFactory, - \Magento\Core\Model\Store\Group\Factory $storeGroupFactory, - \Magento\Core\Model\StoreFactory $storeFactory, - array $data = array() - ) { - parent::__construct($coreData, $context, $data); - $this->_application = $application; + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Website\Factory $websiteFactory, + \Magento\Core\Model\Store\Group\Factory $storeGroupFactory, + \Magento\Core\Model\StoreFactory $storeFactory, + array $data = array() + ) { + parent::__construct($context, $coreData, $data); $this->_websiteFactory = $websiteFactory; $this->_storeGroupFactory = $storeGroupFactory; $this->_storeFactory = $storeFactory; @@ -158,7 +148,7 @@ class Switcher extends \Magento\Backend\Block\Template */ public function getWebsites() { - $websites = $this->_application->getWebsites(); + $websites = $this->_storeManager->getWebsites(); if ($websiteIds = $this->getWebsiteIds()) { foreach (array_keys($websites) as $websiteId) { if (!in_array($websiteId, $websiteIds)) { @@ -190,7 +180,7 @@ class Switcher extends \Magento\Backend\Block\Template public function getStoreGroups($website) { if (!$website instanceof \Magento\Core\Model\Website) { - $website = $this->_application->getWebsite($website); + $website = $this->_storeManager->getWebsite($website); } return $website->getGroups(); } @@ -221,7 +211,7 @@ class Switcher extends \Magento\Backend\Block\Template public function getStores($group) { if (!$group instanceof \Magento\Core\Model\Store\Group) { - $group = $this->_application->getGroup($group); + $group = $this->_storeManager->getGroup($group); } $stores = $group->getStores(); if ($storeIds = $this->getStoreIds()) { @@ -302,7 +292,7 @@ class Switcher extends \Magento\Backend\Block\Template */ public function isShow() { - return !$this->_application->isSingleStoreMode(); + return !$this->_storeManager->isSingleStoreMode(); } /** diff --git a/app/code/Magento/Backend/Block/System/Account/Edit/Form.php b/app/code/Magento/Backend/Block/System/Account/Edit/Form.php index 40e5c2607aefd8267f5307b997fab567fee5fbe8..3f2a19901c1d963d68957f539d34a2f940b2f089 100644 --- a/app/code/Magento/Backend/Block/System/Account/Edit/Form.php +++ b/app/code/Magento/Backend/Block/System/Account/Edit/Form.php @@ -46,27 +46,27 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic */ protected $_userFactory; - /** - * @param \Magento\User\Model\UserFactory $userFactory - * @param \Magento\Backend\Model\Auth\Session $authSession - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\User\Model\UserFactory $userFactory + * @param \Magento\Backend\Model\Auth\Session $authSession + * @param array $data */ - public function __construct( - \Magento\User\Model\UserFactory $userFactory, - \Magento\Backend\Model\Auth\Session $authSession, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\User\Model\UserFactory $userFactory, + \Magento\Backend\Model\Auth\Session $authSession, + array $data = array() + ) { $this->_userFactory = $userFactory; $this->_authSession = $authSession; - parent::__construct($registry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); } protected function _prepareForm() diff --git a/app/code/Magento/Backend/Block/System/Config/Dwstree.php b/app/code/Magento/Backend/Block/System/Config/Dwstree.php index 74841e30f07ce977f1c7fd40ed285320f0487c15..8afe0bce778c006a95d6ee239177126860d533f7 100644 --- a/app/code/Magento/Backend/Block/System/Config/Dwstree.php +++ b/app/code/Magento/Backend/Block/System/Config/Dwstree.php @@ -31,29 +31,6 @@ namespace Magento\Backend\Block\System\Config; class Dwstree extends \Magento\Backend\Block\Widget\Tabs { - /** - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Backend\Model\Auth\Session $authSession - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param array $data - */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Backend\Model\Auth\Session $authSession, - \Magento\Core\Model\StoreManagerInterface $storeManager, - array $data = array() - ) { - parent::__construct($coreData, $context, $authSession, $data); - $this->_storeManager = $storeManager; - } - protected function _construct() { parent::_construct(); diff --git a/app/code/Magento/Backend/Block/System/Config/Edit.php b/app/code/Magento/Backend/Block/System/Config/Edit.php index ca648a063882cfc578445bd429b0a3dbc2e33d93..81f16df26931286962c2ed2781dc8e6675aaacc7 100644 --- a/app/code/Magento/Backend/Block/System/Config/Edit.php +++ b/app/code/Magento/Backend/Block/System/Config/Edit.php @@ -61,26 +61,26 @@ class Edit extends \Magento\Backend\Block\Widget */ protected $_configStructure; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Backend\Model\Config\Structure $configStructure - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Backend\Model\Config\Structure $configStructure + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Backend\Model\Config\Structure $configStructure, - array $data = array() - ) { - parent::__construct($coreData, $context, $data); + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Backend\Model\Config\Structure $configStructure, + array $data = array() + ) { + parent::__construct($context, $coreData, $data); $this->_configStructure = $configStructure; } /** * Prepare layout object * - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ protected function _prepareLayout() { diff --git a/app/code/Magento/Backend/Block/System/Config/Form.php b/app/code/Magento/Backend/Block/System/Config/Form.php index b35c713e5473ac2605710bbd806dc7f22a3bc542..20cc7cd2df27e10d70811f2ff4fb24c2d72ce211 100644 --- a/app/code/Magento/Backend/Block/System/Config/Form.php +++ b/app/code/Magento/Backend/Block/System/Config/Form.php @@ -125,45 +125,35 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic protected $_config; /** - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - - /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory * @param \Magento\Backend\Model\Config\Factory $configFactory * @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\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context * @param array $data - * - * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, \Magento\Backend\Model\Config\Factory $configFactory, \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\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, array $data = array() ) { - parent::__construct($registry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); $this->_configFactory = $configFactory; $this->_configStructure = $configStructure; $this->_fieldsetFactory = $fieldsetFactory; $this->_fieldFactory = $fieldFactory; $this->_config = $coreConfig; - $this->_storeManager = $storeManager; $this->_scopeLabels = array( self::SCOPE_DEFAULT => __('[GLOBAL]'), @@ -471,7 +461,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic /** * * - * @return \Magento\Backend\Block\Widget\Form|\Magento\Core\Block\AbstractBlock|void + * @return \Magento\Backend\Block\Widget\Form|\Magento\View\Block\AbstractBlock|void */ protected function _beforeToHtml() { 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 ffcbd33f4a9240e342ce1ee73b2a5558dbe5d7d1..ec966bbdfa9441cf6ef741db3d908ad993b71e10 100644 --- a/app/code/Magento/Backend/Block/System/Config/Form/Field.php +++ b/app/code/Magento/Backend/Block/System/Config/Form/Field.php @@ -41,29 +41,6 @@ class Field extends \Magento\Backend\Block\Template implements \Magento\Data\Form\Element\Renderer\RendererInterface { - /** - * Application - * - * @var \Magento\Core\Model\App - */ - protected $_application; - - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\App $application - * @param array $data - */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\App $application, - array $data = array() - ) { - $this->_application = $application; - parent::__construct($coreData, $context, $data); - } - /** * Retrieve element HTML markup * @@ -186,7 +163,7 @@ class Field protected function _renderScopeLabel(\Magento\Data\Form\Element\AbstractElement $element) { $html = '<td class="scope-label">'; - if ($element->getScope() && false == $this->_application->isSingleStoreMode()) { + if ($element->getScope() && false == $this->_app->isSingleStoreMode()) { $html .= $element->getScopeLabel(); } $html .= '</td>'; diff --git a/app/code/Magento/Backend/Block/System/Config/Form/Field/Datetime.php b/app/code/Magento/Backend/Block/System/Config/Form/Field/Datetime.php index 77bf076750fba971135b63b04a3531862f673a1d..4f85cd677b18998c454c9f3b602932787cdc858d 100644 --- a/app/code/Magento/Backend/Block/System/Config/Form/Field/Datetime.php +++ b/app/code/Magento/Backend/Block/System/Config/Form/Field/Datetime.php @@ -33,9 +33,9 @@ class Datetime extends \Magento\Backend\Block\System\Config\Form\Field { protected function _getElementHtml(\Magento\Data\Form\Element\AbstractElement $element) { - $format = $this->_application->getLocale()->getDateTimeFormat( + $format = $this->_app->getLocale()->getDateTimeFormat( \Magento\Core\Model\LocaleInterface::FORMAT_TYPE_MEDIUM ); - return $this->_application->getLocale()->date(intval($element->getValue()))->toString($format); + return $this->_app->getLocale()->date(intval($element->getValue()))->toString($format); } } diff --git a/app/code/Magento/Backend/Block/System/Config/Form/Field/Export.php b/app/code/Magento/Backend/Block/System/Config/Form/Field/Export.php index 380ac862d61eb0cd1256ffe7c215a39fdbfc7d68..f5fdd0edbe4e5aed8cca10f7bcd3b9df91a6edb7 100644 --- a/app/code/Magento/Backend/Block/System/Config/Form/Field/Export.php +++ b/app/code/Magento/Backend/Block/System/Config/Form/Field/Export.php @@ -36,7 +36,7 @@ namespace Magento\Backend\Block\System\Config\Form\Field; class Export extends \Magento\Data\Form\Element\AbstractElement { /** - * @var \Magento\Core\Model\Factory\Helper + * @var \Magento\App\Helper\HelperFactory */ protected $_helperFactory; @@ -44,14 +44,14 @@ class Export extends \Magento\Data\Form\Element\AbstractElement * @param \Magento\Escaper $escaper * @param \Magento\Data\Form\Element\Factory $factoryElement * @param \Magento\Data\Form\Element\CollectionFactory $factoryCollection - * @param \Magento\Core\Model\Factory\Helper $helperFactory + * @param \Magento\App\Helper\HelperFactory $helperFactory * @param array $attributes */ public function __construct( \Magento\Escaper $escaper, \Magento\Data\Form\Element\Factory $factoryElement, \Magento\Data\Form\Element\CollectionFactory $factoryCollection, - \Magento\Core\Model\Factory\Helper $helperFactory, + \Magento\App\Helper\HelperFactory $helperFactory, array $attributes = array() ) { $this->_helperFactory = $helperFactory; diff --git a/app/code/Magento/Backend/Block/System/Config/Form/Field/FieldArray/AbstractFieldArray.php b/app/code/Magento/Backend/Block/System/Config/Form/Field/FieldArray/AbstractFieldArray.php index 39b368241f3a4eb5d066b5e230632b35da147dbd..adc4ed43bd7fab93ce315c092315a70e9b2ee415 100644 --- a/app/code/Magento/Backend/Block/System/Config/Form/Field/FieldArray/AbstractFieldArray.php +++ b/app/code/Magento/Backend/Block/System/Config/Form/Field/FieldArray/AbstractFieldArray.php @@ -101,7 +101,7 @@ abstract class AbstractFieldArray 'class' => $this->_getParam($params, 'class'), 'renderer' => false, ); - if ((!empty($params['renderer'])) && ($params['renderer'] instanceof \Magento\Core\Block\AbstractBlock)) { + if ((!empty($params['renderer'])) && ($params['renderer'] instanceof \Magento\View\Block\AbstractBlock)) { $this->_columns[$name]['renderer'] = $params['renderer']; } } diff --git a/app/code/Magento/Backend/Block/System/Config/Form/Field/Notification.php b/app/code/Magento/Backend/Block/System/Config/Form/Field/Notification.php index 5103f20df7842b6801fcf4cd661433e23f5a1a4c..e2b47bcc96270139e054c53525985b5e0870ed3f 100644 --- a/app/code/Magento/Backend/Block/System/Config/Form/Field/Notification.php +++ b/app/code/Magento/Backend/Block/System/Config/Form/Field/Notification.php @@ -33,10 +33,10 @@ class Notification extends \Magento\Backend\Block\System\Config\Form\Field { protected function _getElementHtml(\Magento\Data\Form\Element\AbstractElement $element) { - $element->setValue($this->_application->loadCache('admin_notifications_lastcheck')); - $format = $this->_application->getLocale()->getDateTimeFormat( + $element->setValue($this->_app->loadCache('admin_notifications_lastcheck')); + $format = $this->_app->getLocale()->getDateTimeFormat( \Magento\Core\Model\LocaleInterface::FORMAT_TYPE_MEDIUM ); - return $this->_application->getLocale()->date(intval($element->getValue()))->toString($format); + return $this->_app->getLocale()->date(intval($element->getValue()))->toString($format); } } diff --git a/app/code/Magento/Backend/Block/System/Config/Form/Field/Regexceptions.php b/app/code/Magento/Backend/Block/System/Config/Form/Field/Regexceptions.php index 4eadf3c9e92be05b7d04b37a43401e6ff324b361..28fd6d6b0748320475f41dd21aa231950fd3c14f 100644 --- a/app/code/Magento/Backend/Block/System/Config/Form/Field/Regexceptions.php +++ b/app/code/Magento/Backend/Block/System/Config/Form/Field/Regexceptions.php @@ -42,25 +42,23 @@ class Regexceptions */ protected $_labelFactory; - /** - * @param \Magento\Data\Form\Element\Factory $elementFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\App $application - * @param \Magento\Core\Model\Theme\LabelFactory $labelFactory - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Data\Form\Element\Factory $elementFactory + * @param \Magento\Core\Model\Theme\LabelFactory $labelFactory + * @param array $data */ - public function __construct( - \Magento\Data\Form\Element\Factory $elementFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\App $application, - \Magento\Core\Model\Theme\LabelFactory $labelFactory, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Data\Form\Element\Factory $elementFactory, + \Magento\Core\Model\Theme\LabelFactory $labelFactory, + array $data = array() + ) { $this->_elementFactory = $elementFactory; $this->_labelFactory = $labelFactory; - parent::__construct($coreData, $context, $application, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Backend/Block/System/Config/Switcher.php b/app/code/Magento/Backend/Block/System/Config/Switcher.php index c7c5f07be63ff66d9837481c7710d2dcc8a22652..6ab009aeb20307dae5f283bbf9597b7c3e65d430 100644 --- a/app/code/Magento/Backend/Block/System/Config/Switcher.php +++ b/app/code/Magento/Backend/Block/System/Config/Switcher.php @@ -34,31 +34,23 @@ class Switcher extends \Magento\Backend\Block\Template protected $_systemStore; /** - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - - /** - * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Core\Model\System\Store $systemStore - * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param array $data */ public function __construct( - \Magento\Core\Helper\Data $coreData, \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Core\Model\System\Store $systemStore, - \Magento\Core\Model\StoreManagerInterface $storeManager, array $data = array() ) { $this->_systemStore = $systemStore; - $this->_storeManager = $storeManager; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ protected function _prepareLayout() { diff --git a/app/code/Magento/Backend/Block/System/Config/System/Storage/Media/Synchronize.php b/app/code/Magento/Backend/Block/System/Config/System/Storage/Media/Synchronize.php index dd8743738cfa2a7fef9f868ec0a886eca4550b10..ca8c823a68fe993cbb607d950cabaf0bbc929b47 100644 --- a/app/code/Magento/Backend/Block/System/Config/System/Storage/Media/Synchronize.php +++ b/app/code/Magento/Backend/Block/System/Config/System/Storage/Media/Synchronize.php @@ -39,22 +39,20 @@ class Synchronize */ protected $_fileStorage; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\App $application - * @param \Magento\Core\Model\File\Storage $fileStorage - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\File\Storage $fileStorage + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\App $application, - \Magento\Core\Model\File\Storage $fileStorage, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\File\Storage $fileStorage, + array $data = array() + ) { $this->_fileStorage = $fileStorage; - parent::__construct($coreData, $context, $application, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Backend/Block/System/Config/Tabs.php b/app/code/Magento/Backend/Block/System/Config/Tabs.php index 5bae0bf86e45fe4b0246b5b97a9ba6220027177d..83728b75fab63657bd72b7397f50344d82bb39b1 100644 --- a/app/code/Magento/Backend/Block/System/Config/Tabs.php +++ b/app/code/Magento/Backend/Block/System/Config/Tabs.php @@ -76,19 +76,19 @@ class Tabs extends \Magento\Backend\Block\Widget */ protected $_storeCode; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Backend\Model\Config\Structure $configStructure - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Backend\Model\Config\Structure $configStructure + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Backend\Model\Config\Structure $configStructure, - array $data = array() - ) { - parent::__construct($coreData, $context, $data); + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Backend\Model\Config\Structure $configStructure, + array $data = array() + ) { + parent::__construct($context, $coreData, $data); $this->_tabs = $configStructure->getTabs(); $this->setId('system_config_tabs'); diff --git a/app/code/Magento/Backend/Block/System/Design/Edit.php b/app/code/Magento/Backend/Block/System/Design/Edit.php index 599bfd2fccc1be39bb088130874f6a609e0392e4..751ea6b97c9b0ea6a3b0cd62189bef2d73922e1f 100644 --- a/app/code/Magento/Backend/Block/System/Design/Edit.php +++ b/app/code/Magento/Backend/Block/System/Design/Edit.php @@ -38,20 +38,20 @@ class Edit extends \Magento\Adminhtml\Block\Widget */ protected $_coreRegistry = null; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _construct() diff --git a/app/code/Magento/Backend/Block/System/Design/Edit/Tab/General.php b/app/code/Magento/Backend/Block/System/Design/Edit/Tab/General.php index b353c44dd719edf1c5d24f361c621bebbebe370d..32a3ef650fe1f8e349fa6e5f6ce4823b60365e90 100644 --- a/app/code/Magento/Backend/Block/System/Design/Edit/Tab/General.php +++ b/app/code/Magento/Backend/Block/System/Design/Edit/Tab/General.php @@ -32,40 +32,32 @@ class General extends \Magento\Backend\Block\Widget\Form\Generic */ protected $_labelFactory; - /** - * @var \Magento\Backend\Model\Session - */ - protected $_backendSession; - /** * @var \Magento\Core\Model\System\Store */ protected $_systemStore; - /** - * @param \Magento\Core\Model\Theme\LabelFactory $labelFactory - * @param \Magento\Backend\Model\Session $backendSession - * @param \Magento\Core\Model\System\Store $systemStore - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Core\Model\Theme\LabelFactory $labelFactory + * @param \Magento\Core\Model\System\Store $systemStore + * @param array $data */ - public function __construct( - \Magento\Core\Model\Theme\LabelFactory $labelFactory, - \Magento\Backend\Model\Session $backendSession, - \Magento\Core\Model\System\Store $systemStore, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Core\Model\Theme\LabelFactory $labelFactory, + \Magento\Core\Model\System\Store $systemStore, + array $data = array() + ) { $this->_labelFactory = $labelFactory; - $this->_backendSession = $backendSession; $this->_systemStore = $systemStore; - parent::__construct($registry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); } /** diff --git a/app/code/Magento/Backend/Block/System/Shipping/Ups.php b/app/code/Magento/Backend/Block/System/Shipping/Ups.php index 17d4f85f6992ea33f2ab97d6beaab12559a2e2c7..39c77447a8d0d964d72865837d6cab44f33ac7e0 100644 --- a/app/code/Magento/Backend/Block/System/Shipping/Ups.php +++ b/app/code/Magento/Backend/Block/System/Shipping/Ups.php @@ -41,31 +41,23 @@ class Ups extends \Magento\Backend\Block\Template */ protected $_websiteModel; - /** - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeConfig; - - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Usa\Model\Shipping\Carrier\Ups $shippingModel - * @param \Magento\Core\Model\Website $websiteModel - * @param \Magento\Core\Model\Store\Config $storeConfig - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Usa\Model\Shipping\Carrier\Ups $shippingModel + * @param \Magento\Core\Model\Website $websiteModel + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Usa\Model\Shipping\Carrier\Ups $shippingModel, - \Magento\Core\Model\Website $websiteModel, - \Magento\Core\Model\Store\Config $storeConfig, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Usa\Model\Shipping\Carrier\Ups $shippingModel, + \Magento\Core\Model\Website $websiteModel, + array $data = array() + ) { $this->_shippingModel = $shippingModel; $this->_websiteModel = $websiteModel; - $this->_storeConfig = $storeConfig; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Backend/Block/System/Store/Edit.php b/app/code/Magento/Backend/Block/System/Store/Edit.php index c46b8beaf388105abfd16274b62c0a791dd24a81..e43f5746b0fcf85ecce0ac5b7f16b0b55596182e 100644 --- a/app/code/Magento/Backend/Block/System/Store/Edit.php +++ b/app/code/Magento/Backend/Block/System/Store/Edit.php @@ -39,20 +39,20 @@ class Edit extends \Magento\Adminhtml\Block\Widget\Form\Container */ protected $_coreRegistry = null; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Backend/Block/System/Store/Edit/Form/Group.php b/app/code/Magento/Backend/Block/System/Store/Edit/Form/Group.php index ad1392b7b5d0883debc9cf7c70dbfee6e1ba37c7..65fce16e9cb3f7b20f526057f72347636186b20c 100644 --- a/app/code/Magento/Backend/Block/System/Store/Edit/Form/Group.php +++ b/app/code/Magento/Backend/Block/System/Store/Edit/Form/Group.php @@ -54,30 +54,30 @@ class Group */ protected $_websiteFactory; - /** - * @param \Magento\Catalog\Model\Config\Source\Category $category - * @param \Magento\Core\Model\StoreFactory $storeFactory - * @param \Magento\Core\Model\Website\Factory $websiteFactory - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Catalog\Model\Config\Source\Category $category + * @param \Magento\Core\Model\StoreFactory $storeFactory + * @param \Magento\Core\Model\Website\Factory $websiteFactory + * @param array $data */ - public function __construct( - \Magento\Catalog\Model\Config\Source\Category $category, - \Magento\Core\Model\StoreFactory $storeFactory, - \Magento\Core\Model\Website\Factory $websiteFactory, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Catalog\Model\Config\Source\Category $category, + \Magento\Core\Model\StoreFactory $storeFactory, + \Magento\Core\Model\Website\Factory $websiteFactory, + array $data = array() + ) { $this->_category = $category; $this->_storeFactory = $storeFactory; $this->_websiteFactory = $websiteFactory; - parent::__construct($registry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); } /** diff --git a/app/code/Magento/Backend/Block/System/Store/Edit/Form/Store.php b/app/code/Magento/Backend/Block/System/Store/Edit/Form/Store.php index fa9b3af8a5b3689ef0f798f5b48a3f88a5cd8dcf..43006b0954ae2da9d5ea6d7f7af587108fd81e98 100644 --- a/app/code/Magento/Backend/Block/System/Store/Edit/Form/Store.php +++ b/app/code/Magento/Backend/Block/System/Store/Edit/Form/Store.php @@ -49,27 +49,27 @@ class Store */ protected $_groupFactory; - /** - * @param \Magento\Core\Model\Store\Group\Factory $groupFactory - * @param \Magento\Core\Model\Website\Factory $websiteFactory - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Core\Model\Store\Group\Factory $groupFactory + * @param \Magento\Core\Model\Website\Factory $websiteFactory + * @param array $data */ - public function __construct( - \Magento\Core\Model\Store\Group\Factory $groupFactory, - \Magento\Core\Model\Website\Factory $websiteFactory, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Core\Model\Store\Group\Factory $groupFactory, + \Magento\Core\Model\Website\Factory $websiteFactory, + array $data = array() + ) { $this->_groupFactory = $groupFactory; $this->_websiteFactory = $websiteFactory; - parent::__construct($registry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); } /** diff --git a/app/code/Magento/Backend/Block/System/Store/Edit/Form/Website.php b/app/code/Magento/Backend/Block/System/Store/Edit/Form/Website.php index 45fa7e16811639d6114fade65c5ef31be84c3cf5..284e0d7c0b7642a4835db818e3983355f1467a6f 100644 --- a/app/code/Magento/Backend/Block/System/Store/Edit/Form/Website.php +++ b/app/code/Magento/Backend/Block/System/Store/Edit/Form/Website.php @@ -44,24 +44,24 @@ class Website */ protected $_groupFactory; - /** - * @param \Magento\Core\Model\Store\GroupFactory $groupFactory - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Core\Model\Store\GroupFactory $groupFactory + * @param array $data */ - public function __construct( - \Magento\Core\Model\Store\GroupFactory $groupFactory, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Core\Model\Store\GroupFactory $groupFactory, + array $data = array() + ) { $this->_groupFactory = $groupFactory; - parent::__construct($registry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); } /** diff --git a/app/code/Magento/Backend/Block/System/Variable/Edit.php b/app/code/Magento/Backend/Block/System/Variable/Edit.php index 70e9d49104509ab7b14b05f8f07711cda0ac341c..c1c4668a1ff6f3f4cab5043a7b6e5a3e5757592a 100644 --- a/app/code/Magento/Backend/Block/System/Variable/Edit.php +++ b/app/code/Magento/Backend/Block/System/Variable/Edit.php @@ -38,20 +38,20 @@ class Edit extends \Magento\Adminhtml\Block\Widget\Form\Container */ protected $_coreRegistry = null; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Backend/Block/Template.php b/app/code/Magento/Backend/Block/Template.php index aff926903f8c79a410f61bef52fb6f833fcdf6e6..f7f0f0dbb6bca6b6c7822a15bc78ba8a30962fda 100644 --- a/app/code/Magento/Backend/Block/Template.php +++ b/app/code/Magento/Backend/Block/Template.php @@ -31,18 +31,13 @@ namespace Magento\Backend\Block; * * @SuppressWarnings(PHPMD.NumberOfChildren) */ -class Template extends \Magento\Core\Block\Template +class Template extends \Magento\View\Block\Template { /** * @var \Magento\AuthorizationInterface */ protected $_authorization; - /** - * @var \Magento\Core\Model\StoreManager - */ - protected $_storeManager; - /** * @var \Magento\Core\Model\LocaleInterface */ @@ -54,20 +49,25 @@ class Template extends \Magento\Core\Block\Template protected $mathRandom; /** - * @param \Magento\Core\Helper\Data $coreData + * @var \Magento\Backend\Model\Session + */ + protected $_backendSession; + + /** * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param array $data */ public function __construct( - \Magento\Core\Helper\Data $coreData, \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, array $data = array() ) { - $this->_storeManager = $context->getStoreManager(); $this->_locale = $context->getLocale(); $this->_authorization = $context->getAuthorization(); $this->mathRandom = $context->getMathRandom(); - parent::__construct($coreData, $context, $data); + $this->_backendSession = $context->getBackendSession(); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Backend/Block/Template/Context.php b/app/code/Magento/Backend/Block/Template/Context.php index 0ef867226f9ea62ced10c9bc125a4858cb797586..ca04a1cafaa067488cac86b154b27eb652cf3463 100644 --- a/app/code/Magento/Backend/Block/Template/Context.php +++ b/app/code/Magento/Backend/Block/Template/Context.php @@ -28,7 +28,7 @@ namespace Magento\Backend\Block\Template; * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ -class Context extends \Magento\Core\Block\Template\Context +class Context extends \Magento\View\Block\Template\Context { /** * @var \Magento\AuthorizationInterface @@ -36,17 +36,16 @@ class Context extends \Magento\Core\Block\Template\Context protected $_authorization; /** - * @var \Magento\Core\Model\StoreManager + * @var \Magento\Math\Random */ - protected $_storeManager; + protected $mathRandom; /** - * @var \Magento\Math\Random + * @var \Magento\Backend\Model\Session */ - protected $mathRandom; + protected $_backendSession; /** - * @param \Magento\Core\Model\StoreManager $storeManager * @param \Magento\App\RequestInterface $request * @param \Magento\View\LayoutInterface $layout * @param \Magento\Event\ManagerInterface $eventManager @@ -57,7 +56,7 @@ class Context extends \Magento\Core\Block\Template\Context * @param \Magento\Core\Model\Session $session * @param \Magento\Core\Model\Store\Config $storeConfig * @param \Magento\App\FrontController $frontController - * @param \Magento\Core\Model\Factory\Helper $helperFactory + * @param \Magento\App\Helper\HelperFactory $helperFactory * @param \Magento\View\Url $viewUrl * @param \Magento\View\ConfigInterface $viewConfig * @param \Magento\App\Cache\StateInterface $cacheState @@ -65,20 +64,21 @@ class Context extends \Magento\Core\Block\Template\Context * @param \Magento\Logger $logger * @param \Magento\Filesystem $filesystem * @param \Magento\View\FileSystem $viewFileSystem - * @param \Magento\View\TemplateEngineFactory $engineFactory - * @param \Magento\AuthorizationInterface $authorization + * @param \Magento\View\TemplateEnginePool $enginePool * @param \Magento\Core\Model\App $app * @param \Magento\App\State $appState * @param \Magento\Escaper $escaper * @param \Magento\Filter\FilterManager $filterManager - * @param \Magento\Backend\Model\Session $backendSession * @param \Magento\Core\Model\LocaleInterface $locale + * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\AuthorizationInterface $authorization + * @param \Magento\Backend\Model\Session $backendSession * @param \Magento\Math\Random $mathRandom - * + * @param array $data + * * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( - \Magento\Core\Model\StoreManager $storeManager, \Magento\App\RequestInterface $request, \Magento\View\LayoutInterface $layout, \Magento\Event\ManagerInterface $eventManager, @@ -89,7 +89,7 @@ class Context extends \Magento\Core\Block\Template\Context \Magento\Core\Model\Session $session, \Magento\Core\Model\Store\Config $storeConfig, \Magento\App\FrontController $frontController, - \Magento\Core\Model\Factory\Helper $helperFactory, + \Magento\App\Helper\HelperFactory $helperFactory, \Magento\View\Url $viewUrl, \Magento\View\ConfigInterface $viewConfig, \Magento\App\Cache\StateInterface $cacheState, @@ -97,16 +97,21 @@ class Context extends \Magento\Core\Block\Template\Context \Magento\Logger $logger, \Magento\Filesystem $filesystem, \Magento\View\FileSystem $viewFileSystem, - \Magento\View\TemplateEngineFactory $engineFactory, - \Magento\AuthorizationInterface $authorization, + \Magento\View\TemplateEnginePool $enginePool, \Magento\Core\Model\App $app, \Magento\App\State $appState, \Magento\Escaper $escaper, \Magento\Filter\FilterManager $filterManager, - \Magento\Backend\Model\Session $backendSession, \Magento\Core\Model\LocaleInterface $locale, - \Magento\Math\Random $mathRandom + \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\AuthorizationInterface $authorization, + \Magento\Backend\Model\Session $backendSession, + \Magento\Math\Random $mathRandom, + array $data = array() ) { + $this->_authorization = $authorization; + $this->_backendSession = $backendSession; + $this->mathRandom = $mathRandom; parent::__construct( $request, $layout, @@ -126,23 +131,22 @@ class Context extends \Magento\Core\Block\Template\Context $logger, $filesystem, $viewFileSystem, - $engineFactory, + $enginePool, $app, $appState, $escaper, $filterManager, - $locale + $locale, + $storeManager, + $data ); - $this->_storeManager = $storeManager; - $this->_authorization = $authorization; - $this->_backendSession = $backendSession; - $this->mathRandom = $mathRandom; } + /** * Get store manager * - * @return \Magento\Core\Model\StoreManager + * @return \Magento\Core\Model\StoreManagerInterface */ public function getStoreManager() { diff --git a/app/code/Magento/Backend/Block/Widget/Accordion.php b/app/code/Magento/Backend/Block/Widget/Accordion.php index ddddf6e40ee431f872d6b28ade3667247de8296c..7de430c0a747f48043b7391ca809f7510492bb75 100644 --- a/app/code/Magento/Backend/Block/Widget/Accordion.php +++ b/app/code/Magento/Backend/Block/Widget/Accordion.php @@ -57,7 +57,7 @@ class Accordion extends \Magento\Backend\Block\Widget ->setData($config) ->setAccordion($this) ->setId($itemId); - if (isset($config['content']) && $config['content'] instanceof \Magento\Core\Block\AbstractBlock) { + if (isset($config['content']) && $config['content'] instanceof \Magento\View\Block\AbstractBlock) { $this->_items[$itemId]->setChild($itemId.'_content', $config['content']); } diff --git a/app/code/Magento/Backend/Block/Widget/Accordion/Item.php b/app/code/Magento/Backend/Block/Widget/Accordion/Item.php index b79c033f93958f1124154b297fcb7d2adb5aaef3..85b65c92a21837dc42e552a6b63169232256fdfd 100644 --- a/app/code/Magento/Backend/Block/Widget/Accordion/Item.php +++ b/app/code/Magento/Backend/Block/Widget/Accordion/Item.php @@ -64,7 +64,7 @@ class Item extends \Magento\Backend\Block\Widget if (is_string($content)) { return $content; } - if ($content instanceof \Magento\Core\Block\AbstractBlock) { + if ($content instanceof \Magento\View\Block\AbstractBlock) { return $content->toHtml(); } return null; diff --git a/app/code/Magento/Backend/Block/Widget/Container.php b/app/code/Magento/Backend/Block/Widget/Container.php index df31be59299cef17c5314bd930825608a485b77d..3cdb73c67b403c78e4e12e2c0cda96817680bb01 100644 --- a/app/code/Magento/Backend/Block/Widget/Container.php +++ b/app/code/Magento/Backend/Block/Widget/Container.php @@ -202,7 +202,7 @@ class Container extends \Magento\Backend\Block\Template /** * Preparing child blocks for each added button * - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ protected function _prepareLayout() { diff --git a/app/code/Magento/Backend/Block/Widget/Form.php b/app/code/Magento/Backend/Block/Widget/Form.php index 8ca216c0de5a17e4ef2ddfc9406c6d59dd647b05..d3f6dd06e7a7901f76520299c65a6d1c9e68d9a7 100644 --- a/app/code/Magento/Backend/Block/Widget/Form.php +++ b/app/code/Magento/Backend/Block/Widget/Form.php @@ -47,18 +47,18 @@ class Form extends \Magento\Backend\Block\Widget */ protected $_locale; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + array $data = array() + ) { $this->_locale = $context->getLocale(); - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** @@ -78,7 +78,7 @@ class Form extends \Magento\Backend\Block\Widget * * You can redefine this method in child classes for changing layout * - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ protected function _prepareLayout() { @@ -154,7 +154,7 @@ class Form extends \Magento\Backend\Block\Widget /** * This method is called before rendering HTML * - * @return \Magento\Backend\Block\Widget\Form|\Magento\Core\Block\AbstractBlock + * @return \Magento\Backend\Block\Widget\Form|\Magento\View\Block\AbstractBlock */ protected function _beforeToHtml() { diff --git a/app/code/Magento/Backend/Block/Widget/Form/Container.php b/app/code/Magento/Backend/Block/Widget/Form/Container.php index ec3aa2de9429253ad15c28b184335087a3109447..a2494e34954daa21337d6bdfd9ee369efeed88fc 100644 --- a/app/code/Magento/Backend/Block/Widget/Form/Container.php +++ b/app/code/Magento/Backend/Block/Widget/Form/Container.php @@ -84,7 +84,7 @@ class Container extends \Magento\Backend\Block\Widget\Container /** * Create form block * - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ protected function _prepareLayout() { diff --git a/app/code/Magento/Backend/Block/Widget/Form/Element/Dependence.php b/app/code/Magento/Backend/Block/Widget/Form/Element/Dependence.php index 898ee8d41307f2ea3e13ee73c7466934644c0bbe..8d9d9de344b375fa68dc788664e9614850aec4e1 100644 --- a/app/code/Magento/Backend/Block/Widget/Form/Element/Dependence.php +++ b/app/code/Magento/Backend/Block/Widget/Form/Element/Dependence.php @@ -78,18 +78,18 @@ class Dependence extends \Magento\Backend\Block\AbstractBlock */ protected $_fieldFactory; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Context $context - * @param \Magento\Backend\Model\Config\Structure\Element\Dependency\FieldFactory $fieldFactory - * @param array $data + /** + * @param \Magento\Backend\Block\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Backend\Model\Config\Structure\Element\Dependency\FieldFactory $fieldFactory + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Context $context, - \Magento\Backend\Model\Config\Structure\Element\Dependency\FieldFactory $fieldFactory, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Backend\Model\Config\Structure\Element\Dependency\FieldFactory $fieldFactory, + array $data = array() + ) { $this->_coreData = $coreData; $this->_fieldFactory = $fieldFactory; parent::__construct($context, $data); diff --git a/app/code/Magento/Backend/Block/Widget/Form/Generic.php b/app/code/Magento/Backend/Block/Widget/Form/Generic.php index 8cee1231e12d9ea4723696c24f330dbf35f37058..713f3e121614960bb8355e3148055ad527982421 100644 --- a/app/code/Magento/Backend/Block/Widget/Form/Generic.php +++ b/app/code/Magento/Backend/Block/Widget/Form/Generic.php @@ -47,22 +47,22 @@ class Generic extends \Magento\Backend\Block\Widget\Form */ protected $_coreRegistry; - /** - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param array $data */ - public function __construct( - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + array $data = array() + ) { $this->_coreRegistry = $registry; $this->_formFactory = $formFactory; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } } diff --git a/app/code/Magento/Backend/Block/Widget/Grid.php b/app/code/Magento/Backend/Block/Widget/Grid.php index 582288bc39838b695f5712e5d397b0e7b785cf86..1ccbc22101f6f039f11621b3000dfe96e868f277 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\StoreManagerInterface - */ - protected $_storeManager; - /** * @var \Magento\Core\Model\Url */ @@ -125,23 +120,20 @@ class Grid extends \Magento\Backend\Block\Widget protected $_backendSession; /** - * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Core\Model\Url $urlModel * @param array $data */ public function __construct( - \Magento\Core\Helper\Data $coreData, \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\Core\Helper\Data $coreData, \Magento\Core\Model\Url $urlModel, array $data = array() ) { - $this->_storeManager = $storeManager; $this->_urlModel = $urlModel; $this->_backendSession = $context->getBackendSession(); - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _construct() @@ -216,7 +208,7 @@ class Grid extends \Magento\Backend\Block\Widget * Retrieve export block * * @throws \Magento\Core\Exception - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ public function getExportBlock() { @@ -250,7 +242,7 @@ class Grid extends \Magento\Backend\Block\Widget * Retrieve column by id * * @param string $columnId - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ public function getColumn($columnId) { @@ -412,7 +404,7 @@ class Grid extends \Magento\Backend\Block\Widget /** * Get massaction block * - * @return bool|\Magento\Core\Block\AbstractBlock + * @return bool|\Magento\View\Block\AbstractBlock */ public function getMassactionBlock() { @@ -444,7 +436,7 @@ class Grid extends \Magento\Backend\Block\Widget /** * Initialize grid before rendering * - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ protected function _beforeToHtml() { diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Extended.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Extended.php index 0dccc13fc7f2ee364ca9ee72c40161cad320c650..4351f21f1adb91fd342d6a8d1373fa4c25ffb209 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Extended.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Extended.php @@ -25,22 +25,22 @@ namespace Magento\Backend\Block\Widget\Grid\Column; class Extended extends \Magento\Backend\Block\Widget\Grid\Column { - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + array $data = array() + ) { $this->_rendererTypes['options'] = 'Magento\Backend\Block\Widget\Grid\Column\Renderer\Options\Extended'; $this->_filterTypes['options'] = 'Magento\Backend\Block\Widget\Grid\Column\Filter\Select\Extended'; $this->_rendererTypes['select'] = 'Magento\Backend\Block\Widget\Grid\Column\Renderer\Select\Extended'; $this->_rendererTypes['checkbox'] = 'Magento\Backend\Block\Widget\Grid\Column\Renderer\Checkboxes\Extended'; $this->_rendererTypes['radio'] = 'Magento\Backend\Block\Widget\Grid\Column\Renderer\Radio\Extended'; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } } diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Date.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Date.php index 016098c1020dad7674980739f21c9c9fccad6582..478e5e43de249daa27dedbaad3ec9aba9f326d22 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Date.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Date.php @@ -32,31 +32,23 @@ namespace Magento\Backend\Block\Widget\Grid\Column\Filter; class Date extends \Magento\Backend\Block\Widget\Grid\Column\Filter\AbstractFilter { - /** - * @var \Magento\Core\Model\LocaleInterface - */ - protected $_locale; - /** * @var \Magento\Math\Random */ protected $mathRandom; /** - * @param \Magento\Core\Model\Resource\Helper $resourceHelper * @param \Magento\Backend\Block\Context $context - * @param \Magento\Core\Model\LocaleInterface $locale + * @param \Magento\Core\Model\Resource\Helper $resourceHelper * @param \Magento\Math\Random $mathRandom * @param array $data */ public function __construct( - \Magento\Core\Model\Resource\Helper $resourceHelper, \Magento\Backend\Block\Context $context, - \Magento\Core\Model\LocaleInterface $locale, + \Magento\Core\Model\Resource\Helper $resourceHelper, \Magento\Math\Random $mathRandom, array $data = array() ) { - $this->_locale = $locale; $this->mathRandom = $mathRandom; parent::__construct($context, $resourceHelper, $data); } diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Multistore.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Multistore.php index 1580a87eb708f16518d18b3e0981b8ef6def87f9..848a262308cb425376d938489a3d7309b990d3f7 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Multistore.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Multistore.php @@ -36,26 +36,16 @@ namespace Magento\Backend\Block\Widget\Grid\Column; class Multistore extends \Magento\Backend\Block\Widget\Grid\Column { /** - * Store manager - * - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - - /** - * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\Core\Helper\Data $coreData * @param array $data */ public function __construct( - \Magento\Core\Helper\Data $coreData, \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\Core\Helper\Data $coreData, array $data = array() ) { - parent::__construct($coreData, $context, $data); - $this->_storeManager = $storeManager; + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/AbstractRenderer.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/AbstractRenderer.php index 2ecd1b4578a24ff4e562732ae914e0ccfb368271..7e4902de20075ae1697431185b85d16e93b6e63c 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/AbstractRenderer.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/AbstractRenderer.php @@ -35,7 +35,8 @@ namespace Magento\Backend\Block\Widget\Grid\Column\Renderer; abstract class AbstractRenderer - extends \Magento\Backend\Block\AbstractBlock implements \Magento\Backend\Block\Widget\Grid\Column\Renderer\RendererInterface + extends \Magento\Backend\Block\AbstractBlock + implements \Magento\Backend\Block\Widget\Grid\Column\Renderer\RendererInterface { protected $_defaultWidth; protected $_column; diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Action.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Action.php index f054a26bd2ca1a876267f52032d94a89277e05a5..8c88e4caf3b729b8219f7e11bfe571f0cbada19b 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Action.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Action.php @@ -44,16 +44,16 @@ class Action */ protected $_coreData = null; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Context $context, + \Magento\Core\Helper\Data $coreData, + array $data = array() + ) { $this->_coreData = $coreData; parent::__construct($context, $data); } diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Country.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Country.php index b89e009ccff4941debb520088724cbabf4540963..6c2c6988620f7bf3087ea1fbc140fdd73743ff25 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Country.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Country.php @@ -32,25 +32,6 @@ namespace Magento\Backend\Block\Widget\Grid\Column\Renderer; class Country extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer { - /** - * @var \Magento\Core\Model\LocaleInterface - */ - protected $_locale; - - /** - * @param \Magento\Backend\Block\Context $context - * @param \Magento\Core\Model\LocaleInterface $locale - * @param array $data - */ - public function __construct( - \Magento\Backend\Block\Context $context, - \Magento\Core\Model\LocaleInterface $locale, - array $data = array() - ) { - $this->_locale = $locale; - parent::__construct($context, $data); - } - /** * Render country grid column * diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Currency.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Currency.php index 6ffbd69dcc4e444b6cd0db497ca9feb6aaa3f2cb..90272e8d55d636d60cccfcd3d140f0ddd3ec9216 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Currency.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Currency.php @@ -47,7 +47,7 @@ class Currency /** * Application object * - * @var \Magento\Core\Model\App + * @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; @@ -66,24 +66,20 @@ class Currency /** * @param \Magento\Backend\Block\Context $context * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\LocaleInterface $locale * @param \Magento\Directory\Model\Currency\DefaultLocator $currencyLocator * @param array $data */ public function __construct( \Magento\Backend\Block\Context $context, \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\LocaleInterface $locale, \Magento\Directory\Model\Currency\DefaultLocator $currencyLocator, array $data = array() ) { parent::__construct($context, $data); $this->_storeManager = $storeManager; - $this->_locale = $locale; $this->_currencyLocator = $currencyLocator; } - /** * Renders grid column * diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Date.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Date.php index a28975c7375d52acd4e388b045cbb1fa77f20d6c..03b9c3467aef6c999cd4cd802d8b26a15006a255 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Date.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Date.php @@ -38,25 +38,6 @@ class Date */ protected static $_format = null; - /** - * @var \Magento\Core\Model\LocaleInterface - */ - protected $_locale; - - /** - * @param \Magento\Backend\Block\Context $context - * @param \Magento\Core\Model\LocaleInterface $locale - * @param array $data - */ - public function __construct( - \Magento\Backend\Block\Context $context, - \Magento\Core\Model\LocaleInterface $locale, - array $data = array() - ) { - $this->_locale = $locale; - parent::__construct($context, $data); - } - /** * Retrieve date format * diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Datetime.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Datetime.php index 6eb6c5bf23e6d8f47e82b97463d1dae3fcae7945..ce4a4bae9da0b210446c58b73e808e4c0f34a004 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Datetime.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Datetime.php @@ -37,25 +37,6 @@ class Datetime */ protected static $_format = null; - /** - * @var \Magento\Core\Model\LocaleInterface - */ - protected $_locale; - - /** - * @param \Magento\Backend\Block\Context $context - * @param \Magento\Core\Model\LocaleInterface $locale - * @param array $data - */ - public function __construct( - \Magento\Backend\Block\Context $context, - \Magento\Core\Model\LocaleInterface $locale, - array $data = array() - ) { - $this->_locale = $locale; - parent::__construct($context, $data); - } - /** * Retrieve datetime format * diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Longtext.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Longtext.php index f1521180522d5bf3ee7d736f6829a16d7a4a75e6..587e04e9a59d1f46cc3447f7993d0f9483d6a3e5 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Longtext.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Longtext.php @@ -31,27 +31,6 @@ namespace Magento\Backend\Block\Widget\Grid\Column\Renderer; */ class Longtext extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer { - /** - * Core string - * - * @var \Magento\Filter\FilterManager - */ - protected $filter; - - /** - * @param \Magento\Backend\Block\Context $context - * @param \Magento\Filter\FilterManager $filter - * @param array $data - */ - public function __construct( - \Magento\Backend\Block\Context $context, - \Magento\Filter\FilterManager $filter, - array $data = array() - ) { - $this->filter = $filter; - parent::__construct($context, $data); - } - /** * Render contents as a long text * @@ -71,7 +50,7 @@ class Longtext extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\Abstra if ($this->getColumn()->getTruncate()) { $truncateLength = $this->getColumn()->getTruncate(); } - $text = $this->filter->truncate(parent::_getValue($row), array('length' => $truncateLength)); + $text = $this->filterManager->truncate(parent::_getValue($row), array('length' => $truncateLength)); if ($this->getColumn()->getEscape()) { $text = $this->escapeHtml($text); } diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Price.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Price.php index 81b89f2365dad46669ff79f0531ec519a4daefbf..63b249785c5e38a27d35b4f5b3ce31e1f63b81b2 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Price.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Price.php @@ -38,25 +38,6 @@ class Price */ protected static $_currencies = array(); - /** - * @var \Magento\Core\Model\LocaleInterface - */ - protected $_locale; - - /** - * @param \Magento\Backend\Block\Context $context - * @param \Magento\Core\Model\LocaleInterface $locale - * @param array $data - */ - public function __construct( - \Magento\Backend\Block\Context $context, - \Magento\Core\Model\LocaleInterface $locale, - array $data = array() - ) { - $this->_locale = $locale; - parent::__construct($context, $data); - } - /** * Renders grid column * diff --git a/app/code/Magento/Backend/Block/Widget/Grid/ColumnSet.php b/app/code/Magento/Backend/Block/Widget/Grid/ColumnSet.php index 19c2c1245415ebe238f84cbae436acbc3660e2de..20771cbace8a07dabeb14ff9056ec8edce070e8f 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/ColumnSet.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/ColumnSet.php @@ -34,7 +34,7 @@ namespace Magento\Backend\Block\Widget\Grid; /** * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ -class ColumnSet extends \Magento\Core\Block\Template +class ColumnSet extends \Magento\View\Block\Template { /** * @var \Magento\Backend\Model\Widget\Grid\Row\UrlGenerator @@ -120,17 +120,16 @@ class ColumnSet extends \Magento\Core\Block\Template protected $_totals = null; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context - * @param \Magento\Backend\Model\Widget\Grid\Row\UrlGeneratorFactory - * $generatorFactory + * @param \Magento\Backend\Model\Widget\Grid\Row\UrlGeneratorFactory $generatorFactory * @param \Magento\Backend\Model\Widget\Grid\SubTotals $subtotals * @param \Magento\Backend\Model\Widget\Grid\Totals $totals * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Backend\Model\Widget\Grid\Row\UrlGeneratorFactory $generatorFactory, \Magento\Backend\Model\Widget\Grid\SubTotals $subtotals, \Magento\Backend\Model\Widget\Grid\Totals $totals, @@ -150,7 +149,7 @@ class ColumnSet extends \Magento\Core\Block\Template array_key_exists('filter_visibility', $data) ? (bool) $data['filter_visibility'] : true ); - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); $this->setEmptyText(__( isset($data['empty_text'])? $data['empty_text'] : 'We couldn\'t find any records.' @@ -243,7 +242,7 @@ class ColumnSet extends \Magento\Core\Block\Template /** * Prepare block for rendering * - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ protected function _beforeToHtml() { diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Export.php b/app/code/Magento/Backend/Block/Widget/Grid/Export.php index 67bf75f7c953d0b6376089accea95feda407ace4..1c7ea433520bc41b38694279df3040c41fd6066d 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Export.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Export.php @@ -64,20 +64,20 @@ class Export */ protected $_collectionFactory; - /** - * @param \Magento\Data\CollectionFactory $collectionFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Data\CollectionFactory $collectionFactory + * @param array $data */ - public function __construct( - \Magento\Data\CollectionFactory $collectionFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Data\CollectionFactory $collectionFactory, + array $data = array() + ) { $this->_collectionFactory = $collectionFactory; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _construct() @@ -157,7 +157,7 @@ class Export /** * Prepare export button * - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ protected function _prepareLayout() { diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Extended.php b/app/code/Magento/Backend/Block/Widget/Grid/Extended.php index 72bdd253523a985546fe74e7f0d070fe5b30086c..277948d31397d3b53841f410b47312a8934e77f6 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Extended.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Extended.php @@ -190,7 +190,7 @@ class Extended /** * Initialize child blocks * - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ protected function _prepareLayout() { @@ -223,7 +223,7 @@ class Extended /** * Retrieve column set block * - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ public function getColumnSet() { diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Additional.php b/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Additional.php index 69ccd8cb84927a9698b4dc7bb3d2e841eaea246e..5695da8fee3e56b2ce2281113a2a7a3c0ef25dc5 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Additional.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Additional.php @@ -44,23 +44,23 @@ class Additional extends \Magento\Backend\Block\Widget\Form\Generic */ protected $_handlerFactory; - /** - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Layout\Argument\HandlerFactory $handlerFactory - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Core\Model\Layout\Argument\HandlerFactory $handlerFactory + * @param array $data */ - public function __construct( - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Layout\Argument\HandlerFactory $handlerFactory, - array $data = array() - ) { - parent::__construct($registry, $formFactory, $coreData, $context, $data); + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Core\Model\Layout\Argument\HandlerFactory $handlerFactory, + array $data = array() + ) { + parent::__construct($context, $coreData, $registry, $formFactory, $data); $this->_handlerFactory = $handlerFactory; } diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Extended.php b/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Extended.php index 9d439f94933f517c21357c2d7a54e6ad29835af8..f706254a356de4633583410ffc0b1ec85f947590 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Extended.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Extended.php @@ -59,20 +59,20 @@ class Extended extends \Magento\Backend\Block\Widget */ protected $_backendData = null; - /** - * @param \Magento\Backend\Helper\Data $backendData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Backend\Helper\Data $backendData + * @param array $data */ - public function __construct( - \Magento\Backend\Helper\Data $backendData, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Backend\Helper\Data $backendData, + array $data = array() + ) { $this->_backendData = $backendData; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** @@ -92,7 +92,7 @@ class Extended extends \Magento\Backend\Block\Widget * 'complete' => string, // Only for ajax enabled grid (optional) * 'url' => string, * 'confirm' => string, // text of confirmation of this action (optional) - * 'additional' => string|array|\Magento\Core\Block\AbstractBlock // (optional) + * 'additional' => string|array|\Magento\View\Block\AbstractBlock // (optional) * ); * * @param string $itemId diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Item.php b/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Item.php index 1f2515a119b7890d3f81ae61660942eb5e1f9960..742edfbfb54a50a22bcdf714936cfc4154c08af5 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Item.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Item.php @@ -64,7 +64,7 @@ class Item extends \Magento\Backend\Block\Widget /** * Set additional action block for this item * - * @param string|\Magento\Core\Block\AbstractBlock $block + * @param string|\Magento\View\Block\AbstractBlock $block * @return \Magento\Backend\Block\Widget\Grid\Massaction\Item * @throws \Magento\Core\Exception */ @@ -74,7 +74,7 @@ class Item extends \Magento\Backend\Block\Widget $block = $this->getLayout()->createBlock($block); } elseif (is_array($block)) { $block = $this->_createFromConfig($block); - } elseif (!($block instanceof \Magento\Core\Block\AbstractBlock)) { + } elseif (!($block instanceof \Magento\View\Block\AbstractBlock)) { throw new \Magento\Core\Exception('Unknown block type'); } @@ -99,7 +99,7 @@ class Item extends \Magento\Backend\Block\Widget /** * Retrive additional action block for this item * - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ public function getAdditionalActionBlock() { diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Serializer.php b/app/code/Magento/Backend/Block/Widget/Grid/Serializer.php index c1201d0471e4046487e7017b82e3165101fef9d6..c28b6ef2cdc8d77230a58b3535530701465aea99 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Serializer.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Serializer.php @@ -33,7 +33,7 @@ */ namespace Magento\Backend\Block\Widget\Grid; -class Serializer extends \Magento\Core\Block\Template +class Serializer extends \Magento\View\Block\Template { /** * Preparing global layout diff --git a/app/code/Magento/Backend/Block/Widget/Tabs.php b/app/code/Magento/Backend/Block/Widget/Tabs.php index cfcd8cf28335be18b62035c2b3e3aaa70d28e0e4..076d838ef9af750c508ae27c11ce8b33d08ecc28 100644 --- a/app/code/Magento/Backend/Block/Widget/Tabs.php +++ b/app/code/Magento/Backend/Block/Widget/Tabs.php @@ -60,20 +60,20 @@ class Tabs extends \Magento\Backend\Block\Widget */ protected $_authSession; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Backend\Model\Auth\Session $authSession - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Backend\Model\Auth\Session $authSession + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Backend\Model\Auth\Session $authSession, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Backend\Model\Auth\Session $authSession, + array $data = array() + ) { $this->_authSession = $authSession; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Backend/Controller/AbstractAction.php b/app/code/Magento/Backend/Controller/AbstractAction.php deleted file mode 100644 index f5969a7cf0133903dc48ca2ed62ee6f420f13fe4..0000000000000000000000000000000000000000 --- a/app/code/Magento/Backend/Controller/AbstractAction.php +++ /dev/null @@ -1,587 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * 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_Backend - * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - -namespace Magento\Backend\Controller; - -/** - * Generic backend controller - * - * @SuppressWarnings(PHPMD.NumberOfChildren) - */ -abstract class AbstractAction extends \Magento\Core\Controller\Varien\Action -{ - /** - * Name of "is URLs checked" flag - */ - const FLAG_IS_URLS_CHECKED = 'check_url_settings'; - - /** - * Session namespace to refer in other places - */ - const SESSION_NAMESPACE = 'adminhtml'; - - /** - * Array of actions which can be processed without secret key validation - * - * @var array - */ - protected $_publicActions = array(); - - /** - * Namespace for session. - * - * @var string - */ - protected $_sessionNamespace = self::SESSION_NAMESPACE; - - /** - * @var \Magento\Backend\Helper\Data - */ - protected $_helper; - - /** - * @var \Magento\Backend\Model\Session - */ - protected $_session; - - /** - * @var \Magento\AuthorizationInterface - */ - protected $_authorization; - - /** - * @var \Magento\Core\Model\Translate - */ - protected $_translator; - - /** - * @var \Magento\Backend\Model\Auth - */ - protected $_auth; - - /** - * @var \Magento\Backend\Model\Url - */ - protected $_backendUrl; - - /** - * @var \Magento\Core\Model\LocaleInterface - */ - protected $_locale; - - /** - * @var bool - */ - protected $_canUseBaseUrl; - - /** - * @param \Magento\Backend\Controller\Context $context - */ - public function __construct(\Magento\Backend\Controller\Context $context) - { - parent::__construct($context); - $this->_helper = $context->getHelper(); - $this->_session = $context->getSession(); - $this->_authorization = $context->getAuthorization(); - $this->_translator = $context->getTranslator(); - $this->_auth = $context->getAuth(); - $this->_backendUrl = $context->getBackendUrl(); - $this->_locale = $context->getLocale(); - $this->_canUseBaseUrl = $context->getCanUseBaseUrl(); - } - - protected function _isAllowed() - { - return true; - } - - /** - * Retrieve adminhtml session model object - * - * @return \Magento\Backend\Model\Session - */ - protected function _getSession() - { - return $this->_session; - } - - /** - * Retrieve base adminhtml helper - * - * @return \Magento\Backend\Helper\Data - */ - protected function _getHelper() - { - return $this->_helper; - } - - /** - * Define active menu item in menu block - * @param string $itemId current active menu item - * @return \Magento\Backend\Controller\AbstractAction - */ - protected function _setActiveMenu($itemId) - { - /** @var $menuBlock \Magento\Backend\Block\Menu */ - $menuBlock = $this->getLayout()->getBlock('menu'); - $menuBlock->setActive($itemId); - $parents = $menuBlock->getMenuModel()->getParentItems($itemId); - $parents = array_reverse($parents); - foreach ($parents as $item) { - /** @var $item \Magento\Backend\Model\Menu\Item */ - array_unshift($this->_titles, $item->getTitle()); - } - return $this; - } - - /** - * @param $label - * @param $title - * @param null $link - * @return \Magento\Backend\Controller\AbstractAction - */ - protected function _addBreadcrumb($label, $title, $link=null) - { - $this->getLayout()->getBlock('breadcrumbs')->addLink($label, $title, $link); - return $this; - } - - /** - * @param \Magento\Core\Block\AbstractBlock $block - * @return \Magento\Backend\Controller\AbstractAction - */ - protected function _addContent(\Magento\Core\Block\AbstractBlock $block) - { - return $this->_moveBlockToContainer($block, 'content'); - } - - /** - * @param \Magento\Core\Block\AbstractBlock $block - * @return \Magento\Backend\Controller\AbstractAction - */ - protected function _addLeft(\Magento\Core\Block\AbstractBlock $block) - { - return $this->_moveBlockToContainer($block, 'left'); - } - - /** - * @param \Magento\Core\Block\AbstractBlock $block - * @return \Magento\Backend\Controller\AbstractAction - */ - protected function _addJs(\Magento\Core\Block\AbstractBlock $block) - { - return $this->_moveBlockToContainer($block, 'js'); - } - - /** - * Set specified block as an anonymous child to specified container - * - * The block will be moved to the container from previous parent after all other elements - * - * @param \Magento\Core\Block\AbstractBlock $block - * @param string $containerName - * @return \Magento\Backend\Controller\AbstractAction - */ - private function _moveBlockToContainer(\Magento\Core\Block\AbstractBlock $block, $containerName) - { - $this->getLayout()->setChild($containerName, $block->getNameInLayout(), ''); - return $this; - } - - /** - * Controller predispatch method - * - * @return \Magento\Backend\Controller\AbstractAction - */ - public function preDispatch() - { - /** @var $storeManager \Magento\Core\Model\StoreManager */ - $storeManager = $this->_objectManager->get('Magento\Core\Model\StoreManager'); - $storeManager->setCurrentStore('admin'); - - $this->_eventManager->dispatch('adminhtml_controller_action_predispatch_start', array()); - parent::preDispatch(); - if (!$this->_processUrlKeys()) { - return $this; - } - - if ($this->getRequest()->isDispatched() - && $this->getRequest()->getActionName() !== 'denied' - && !$this->_isAllowed()) { - $this->_forward('denied'); - $this->setFlag('', self::FLAG_NO_DISPATCH, true); - return $this; - } - - if ($this->_isUrlChecked()) { - $this->setFlag('', self::FLAG_IS_URLS_CHECKED, true); - } - - $this->_processLocaleSettings(); - - return $this; - } - - /** - * Check whether url is checked - * - * @return bool - */ - protected function _isUrlChecked() - { - return !$this->getFlag('', self::FLAG_IS_URLS_CHECKED) - && !$this->getRequest()->getParam('forwarded') - && !$this->_getSession()->getIsUrlNotice(true) - && !$this->_canUseBaseUrl; - } - - /** - * Check url keys. If non valid - redirect - * - * @return bool - */ - public function _processUrlKeys() - { - $_isValidFormKey = true; - $_isValidSecretKey = true; - $_keyErrorMsg = ''; - if ($this->_auth->isLoggedIn()) { - if ($this->getRequest()->isPost()) { - $_isValidFormKey = $this->_validateFormKey(); - $_keyErrorMsg = __('Invalid Form Key. Please refresh the page.'); - } elseif ($this->_backendUrl->useSecretKey()) { - $_isValidSecretKey = $this->_validateSecretKey(); - $_keyErrorMsg = __('You entered an invalid Secret Key. Please refresh the page.'); - } - } - if (!$_isValidFormKey || !$_isValidSecretKey) { - $this->setFlag('', self::FLAG_NO_DISPATCH, true); - $this->setFlag('', self::FLAG_NO_POST_DISPATCH, true); - if ($this->getRequest()->getQuery('isAjax', false) || $this->getRequest()->getQuery('ajax', false)) { - $this->getResponse()->setBody($this->_objectManager->get('Magento\Core\Helper\Data')->jsonEncode(array( - 'error' => true, - 'message' => $_keyErrorMsg - ))); - } else { - $this->_redirect($this->_backendUrl->getStartupPageUrl()); - } - return false; - } - return true; - } - - /** - * Set session locale, - * process force locale set through url params - * - * @return \Magento\Backend\Controller\AbstractAction - */ - protected function _processLocaleSettings() - { - $forceLocale = $this->getRequest()->getParam('locale', null); - if ($this->_objectManager->get('Magento\Core\Model\Locale\Validator')->isValid($forceLocale)) { - $this->_getSession()->setSessionLocale($forceLocale); - } - - if (is_null($this->_getSession()->getLocale())) { - $this->_getSession()->setLocale($this->_locale->getLocaleCode()); - } - - return $this; - } - - /** - * Fire predispatch events, execute extra logic after predispatch - */ - protected function _firePreDispatchEvents() - { - $this->_initAuthentication(); - parent::_firePreDispatchEvents(); - } - - /** - * Start authentication process - * - * @return \Magento\Backend\Controller\AbstractAction - */ - protected function _initAuthentication() - { - $request = $this->getRequest(); - $requestedActionName = $request->getActionName(); - $openActions = array( - 'forgotpassword', - 'resetpassword', - 'resetpasswordpost', - 'logout', - 'refresh' // captcha refresh - ); - if (in_array($requestedActionName, $openActions)) { - $request->setDispatched(true); - } else { - if ($this->_auth->getUser()) { - $this->_auth->getUser()->reload(); - } - if (!$this->_auth->isLoggedIn()) { - $this->_processNotLoggedInUser($request); - } - } - $this->_auth->getAuthStorage()->refreshAcl(); - return $this; - } - - /** - * Process not logged in user data - * - * @param \Magento\App\RequestInterface $request - */ - protected function _processNotLoggedInUser(\Magento\App\RequestInterface $request) - { - $isRedirectNeeded = false; - if ($request->getPost('login') && $this->_performLogin()) { - $isRedirectNeeded = $this->_redirectIfNeededAfterLogin(); - } - if (!$isRedirectNeeded && !$request->getParam('forwarded')) { - if ($request->getParam('isIframe')) { - $request->setParam('forwarded', true) - ->setRouteName('adminhtml') - ->setControllerName('auth') - ->setActionName('deniedIframe') - ->setDispatched(false); - } elseif ($request->getParam('isAjax')) { - $request->setParam('forwarded', true) - ->setRouteName('adminhtml') - ->setControllerName('auth') - ->setActionName('deniedJson') - ->setDispatched(false); - } else { - $request->setParam('forwarded', true) - ->setRouteName('adminhtml') - ->setControllerName('auth') - ->setActionName('login') - ->setDispatched(false); - } - } - } - - /** - * Performs login, if user submitted login form - * - * @return boolean - */ - protected function _performLogin() - { - $outputValue = true; - $postLogin = $this->getRequest()->getPost('login'); - $username = isset($postLogin['username']) ? $postLogin['username'] : ''; - $password = isset($postLogin['password']) ? $postLogin['password'] : ''; - $this->getRequest()->setPost('login', null); - - try { - $this->_auth->login($username, $password); - } catch (\Magento\Backend\Model\Auth\Exception $e) { - if (!$this->getRequest()->getParam('messageSent')) { - $this->_session->addError($e->getMessage()); - $this->getRequest()->setParam('messageSent', true); - $outputValue = false; - } - } - return $outputValue; - } - - /** - * Checks, whether Magento requires redirection after successful admin login, and redirects user, if needed - * - * @return bool - */ - protected function _redirectIfNeededAfterLogin() - { - $requestUri = null; - - // Checks, whether secret key is required for admin access or request uri is explicitly set - if ($this->_backendUrl->useSecretKey()) { - $requestUri = $this->_backendUrl->getUrl('*/*/*', array('_current' => true)); - } elseif ($this->getRequest()) { - $requestUri = $this->getRequest()->getRequestUri(); - } - - if (!$requestUri) { - return false; - } - - $this->getResponse()->setRedirect($requestUri); - $this->setFlag('', \Magento\Core\Controller\Varien\Action::FLAG_NO_DISPATCH, true); - return true; - } - - public function deniedAction() - { - $this->getResponse()->setHeader('HTTP/1.1', '403 Forbidden'); - if (!$this->_auth->isLoggedIn()) { - $this->_redirect('*/auth/login'); - return; - } - $this->loadLayout(array('default', 'adminhtml_denied')); - $this->renderLayout(); - } - - /** - * Load layout by handles and verify user ACL - * - * @param string|null|bool|array $ids - * @param bool $generateBlocks - * @param bool $generateXml - * @return \Magento\Backend\Controller\AbstractAction|\Magento\Core\Controller\Varien\Action - */ - public function loadLayout($ids = null, $generateBlocks = true, $generateXml = true) - { - parent::loadLayout($ids, false, $generateXml); - $this->_objectManager->get('Magento\Core\Model\Layout\Filter\Acl') - ->filterAclNodes($this->getLayout()->getNode()); - if ($generateBlocks) { - $this->generateLayoutBlocks(); - $this->_isLayoutLoaded = true; - } - $this->_initLayoutMessages('Magento\Backend\Model\Session'); - return $this; - } - - /** - * No route action - * - * @param null $coreRoute - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function norouteAction($coreRoute = null) - { - $this->getResponse()->setHeader('HTTP/1.1', '404 Not Found'); - $this->getResponse()->setHeader('Status', '404 File not found'); - $this->loadLayout(array('default', 'adminhtml_noroute')); - $this->renderLayout(); - } - - /** - * Set referrer url for redirect in response - * - * Is overridden here to set defaultUrl to admin url - * - * @param string $defaultUrl - * @return \Magento\Backend\Controller\AbstractAction - */ - protected function _redirectReferer($defaultUrl = null) - { - $defaultUrl = empty($defaultUrl) ? $this->getUrl('*') : $defaultUrl; - parent::_redirectReferer($defaultUrl); - return $this; - } - - /** - * Set redirect into response - * - * @param string $path - * @param array $arguments - * @return \Magento\Backend\Controller\AbstractAction - */ - protected function _redirect($path, $arguments=array()) - { - $this->_getSession()->setIsUrlNotice($this->getFlag('', self::FLAG_IS_URLS_CHECKED)); - $this->getResponse()->setRedirect($this->getUrl($path, $arguments)); - return $this; - } - - protected function _forward($action, $controller = null, $module = null, array $params = null) - { - $this->_getSession()->setIsUrlNotice($this->getFlag('', self::FLAG_IS_URLS_CHECKED)); - return parent::_forward($action, $controller, $module, $params); - } - - /** - * Generate url by route and parameters - * - * @param string $route - * @param array $params - * @return string - */ - public function getUrl($route = '', $params=array()) - { - return $this->_getHelper()->getUrl($route, $params); - } - - /** - * Validate Secret Key - * - * @return bool - */ - protected function _validateSecretKey() - { - if (is_array($this->_publicActions) && in_array($this->getRequest()->getActionName(), $this->_publicActions)) { - return true; - } - - $secretKey = $this->getRequest()->getParam(\Magento\Backend\Model\Url::SECRET_KEY_PARAM_NAME, null); - if (!$secretKey || $secretKey != $this->_backendUrl->getSecretKey()) { - return false; - } - return true; - } - - /** - * Render specified template - * - * @param string $tplName - * @param array $data parameters required by template - */ - protected function _outTemplate($tplName, $data = array()) - { - $this->_initLayoutMessages('Magento\Backend\Model\Session'); - $block = $this->getLayout()->createBlock('Magento\Backend\Block\Template')->setTemplate("{$tplName}.phtml"); - foreach ($data as $index => $value) { - $block->assign($index, $value); - } - $html = $block->toHtml(); - $this->_objectManager->get('Magento\Core\Model\Translate')->processResponseBody($html); - $this->getResponse()->setBody($html); - } - - /** - * Declare headers and content file in response for file download - * - * @param string $fileName - * @param string|array $content set to null to avoid starting output, $contentLength should be set explicitly in - * that case - * @param string $contentType - * @param int $contentLength explicit content length, if strlen($content) isn't applicable - * @return \Magento\Backend\Controller\AbstractAction - */ - protected function _prepareDownloadResponse($fileName, $content, $contentType = 'application/octet-stream', - $contentLength = null - ) { - if ($this->_auth->getAuthStorage()->isFirstPageAfterLogin()) { - $this->_redirect($this->_backendUrl->getStartupPageUrl()); - return $this; - } - return parent::_prepareDownloadResponse($fileName, $content, $contentType, $contentLength); - } -} diff --git a/app/code/Magento/Backend/Controller/Adminhtml/Ajax.php b/app/code/Magento/Backend/Controller/Adminhtml/Ajax.php index a8ff8da09e04540c72dc9bd2ba6e29c6140706ee..174eb6e45019ed30c3ad64bec5a98179cf3d7eeb 100644 --- a/app/code/Magento/Backend/Controller/Adminhtml/Ajax.php +++ b/app/code/Magento/Backend/Controller/Adminhtml/Ajax.php @@ -23,7 +23,7 @@ */ namespace Magento\Backend\Controller\Adminhtml; -class Ajax extends \Magento\Backend\Controller\Adminhtml\Action +class Ajax extends \Magento\Backend\App\Action { /** * Ajax action for inline translation @@ -36,6 +36,6 @@ class Ajax extends \Magento\Backend\Controller\Adminhtml\Action $translationHelper = $this->_objectManager->get('Magento\Core\Helper\Translate'); $response = $translationHelper->apply($translationParams, $area); $this->getResponse()->setBody($response); - $this->setFlag('', self::FLAG_NO_POST_DISPATCH, true); + $this->_actionFlag->set('', self::FLAG_NO_POST_DISPATCH, true); } } diff --git a/app/code/Magento/Backend/Controller/Adminhtml/Auth.php b/app/code/Magento/Backend/Controller/Adminhtml/Auth.php index 9e711ea79e02bee07661ccb770357736d4c47cc8..513ac3505ffa05ae0c74952f95c9a03cb0277fc8 100644 --- a/app/code/Magento/Backend/Controller/Adminhtml/Auth.php +++ b/app/code/Magento/Backend/Controller/Adminhtml/Auth.php @@ -29,7 +29,7 @@ */ namespace Magento\Backend\Controller\Adminhtml; -class Auth extends \Magento\Backend\Controller\AbstractAction +class Auth extends \Magento\Backend\App\AbstractAction { /** * Administrator login action @@ -43,8 +43,8 @@ class Auth extends \Magento\Backend\Controller\AbstractAction $this->_redirect($this->_backendUrl->getStartupPageUrl()); return; } - $this->loadLayout(false); - $this->renderLayout(); + $this->_view->loadLayout(false); + $this->_view->renderLayout(); } /** diff --git a/app/code/Magento/Backend/Controller/Adminhtml/Cache.php b/app/code/Magento/Backend/Controller/Adminhtml/Cache.php index 003fedf1b47914717355910cb036f0a3d64c2064..51c97b9f6e3cae79aaeb8ac737b517c419491d5e 100644 --- a/app/code/Magento/Backend/Controller/Adminhtml/Cache.php +++ b/app/code/Magento/Backend/Controller/Adminhtml/Cache.php @@ -26,7 +26,9 @@ namespace Magento\Backend\Controller\Adminhtml; -class Cache extends \Magento\Backend\Controller\Adminhtml\Action +use Magento\Backend\App\Action; + +class Cache extends \Magento\Backend\App\Action { /** * @var \Magento\App\Cache\TypeListInterface @@ -44,13 +46,13 @@ class Cache extends \Magento\Backend\Controller\Adminhtml\Action private $_cacheFrontendPool; /** - * @param \Magento\Backend\Controller\Context $context + * @param Action\Context $context * @param \Magento\App\Cache\TypeListInterface $cacheTypeList * @param \Magento\App\Cache\StateInterface $cacheState * @param \Magento\App\Cache\Frontend\Pool $cacheFrontendPool */ public function __construct( - \Magento\Backend\Controller\Context $context, + Action\Context $context, \Magento\App\Cache\TypeListInterface $cacheTypeList, \Magento\App\Cache\StateInterface $cacheState, \Magento\App\Cache\Frontend\Pool $cacheFrontendPool @@ -76,11 +78,11 @@ class Cache extends \Magento\Backend\Controller\Adminhtml\Action */ public function indexAction() { - $this->_title(__('Cache Management')); + $this->_title->add(__('Cache Management')); - $this->loadLayout() - ->_setActiveMenu('Magento_Adminhtml::system_cache') - ->renderLayout(); + $this->_view->loadLayout(); + $this->_setActiveMenu('Magento_Adminhtml::system_cache'); + $this->_view->renderLayout(); } /** diff --git a/app/code/Magento/Backend/Controller/Adminhtml/Dashboard.php b/app/code/Magento/Backend/Controller/Adminhtml/Dashboard.php index 859a2eb70bd3bc4e856a056b4d0ba36d55878da9..ae450db148eae529044462f2b3af3e5b38ee48c1 100644 --- a/app/code/Magento/Backend/Controller/Adminhtml/Dashboard.php +++ b/app/code/Magento/Backend/Controller/Adminhtml/Dashboard.php @@ -33,16 +33,24 @@ */ namespace Magento\Backend\Controller\Adminhtml; -class Dashboard extends \Magento\Backend\Controller\Adminhtml\Action +class Dashboard extends \Magento\Backend\App\Action { + /** + * @param \Magento\Backend\App\Action\Context $context + */ + public function __construct(\Magento\Backend\App\Action\Context $context) + { + parent::__construct($context); + } + public function indexAction() { - $this->_title(__('Dashboard')); + $this->_title->add(__('Dashboard')); - $this->loadLayout(); + $this->_view->loadLayout(); $this->_setActiveMenu('Magento_Adminhtml::dashboard'); $this->_addBreadcrumb(__('Dashboard'), __('Dashboard')); - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -51,8 +59,8 @@ class Dashboard extends \Magento\Backend\Controller\Adminhtml\Action */ public function productsViewedAction() { - $this->loadLayout(); - $this->renderLayout(); + $this->_view->loadLayout(); + $this->_view->renderLayout(); } /** @@ -61,8 +69,8 @@ class Dashboard extends \Magento\Backend\Controller\Adminhtml\Action */ public function customersNewestAction() { - $this->loadLayout(); - $this->renderLayout(); + $this->_view->loadLayout(); + $this->_view->renderLayout(); } /** @@ -71,8 +79,8 @@ class Dashboard extends \Magento\Backend\Controller\Adminhtml\Action */ public function customersMostAction() { - $this->loadLayout(); - $this->renderLayout(); + $this->_view->loadLayout(); + $this->_view->renderLayout(); } public function ajaxBlockAction() @@ -85,7 +93,7 @@ class Dashboard extends \Magento\Backend\Controller\Adminhtml\Action ucwords(str_replace('_', ' ', $blockTab)) ); if (in_array($blockTab, array('tab_orders', 'tab_amounts', 'totals'))) { - $output = $this->getLayout()->createBlock('Magento\\Backend\\Block\\Dashboard\\' . $blockClassSuffix) + $output = $this->_view->getLayout()->createBlock('Magento\\Backend\\Block\\Dashboard\\' . $blockClassSuffix) ->toHtml(); } $this->getResponse()->setBody($output); diff --git a/app/code/Magento/Backend/Controller/Adminhtml/Index.php b/app/code/Magento/Backend/Controller/Adminhtml/Index.php index a9893978394b43826dec8a2441ce821a7e3b0c3b..86347b3a4cde66c5d639a1dc822d07353909e994 100644 --- a/app/code/Magento/Backend/Controller/Adminhtml/Index.php +++ b/app/code/Magento/Backend/Controller/Adminhtml/Index.php @@ -29,7 +29,9 @@ */ namespace Magento\Backend\Controller\Adminhtml; -class Index extends \Magento\Backend\Controller\AbstractAction +use Magento\App\Action\NotFoundException; + +class Index extends \Magento\Backend\App\AbstractAction { /** * Search modules list @@ -39,11 +41,11 @@ class Index extends \Magento\Backend\Controller\AbstractAction protected $_searchModules; /** - * @param \Magento\Backend\Controller\Context $context + * @param \Magento\Backend\App\Action\Context $context * @param array $searchModules */ public function __construct( - \Magento\Backend\Controller\Context $context, + \Magento\Backend\App\Action\Context $context, array $searchModules = array() ) { $this->_searchModules = $searchModules; diff --git a/app/code/Magento/Backend/Controller/Adminhtml/Noroute.php b/app/code/Magento/Backend/Controller/Adminhtml/Noroute.php new file mode 100644 index 0000000000000000000000000000000000000000..e1a6916475979af331a22b08badc671178362023 --- /dev/null +++ b/app/code/Magento/Backend/Controller/Adminhtml/Noroute.php @@ -0,0 +1,39 @@ +<?php +/** + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +namespace Magento\Backend\Controller\Adminhtml; + +class Noroute extends \Magento\Backend\App\Action +{ + /** + * Noroute action + */ + public function indexAction() + { + $this->getResponse()->setHeader('HTTP/1.1', '404 Not Found'); + $this->getResponse()->setHeader('Status', '404 File not found'); + $this->_view->loadLayout(array('default', 'adminhtml_noroute')); + $this->_view->renderLayout(); + } +} \ No newline at end of file diff --git a/app/code/Magento/Backend/Controller/Adminhtml/System.php b/app/code/Magento/Backend/Controller/Adminhtml/System.php index 3239b98f15b584463f3db485d7e477dd76b65d8e..3e47135ccfa02d4283b4eea2552c807f57ebe743 100644 --- a/app/code/Magento/Backend/Controller/Adminhtml/System.php +++ b/app/code/Magento/Backend/Controller/Adminhtml/System.php @@ -33,17 +33,17 @@ */ namespace Magento\Backend\Controller\Adminhtml; -class System extends \Magento\Backend\Controller\AbstractAction +class System extends \Magento\Backend\App\AbstractAction { public function indexAction() { - $this->loadLayout(); + $this->_view->loadLayout(); $this->_setActiveMenu('Magento_Adminhtml::system'); $this->_addBreadcrumb( __('System'), __('System') ); - $this->renderLayout(); + $this->_view->renderLayout(); } public function setStoreAction() @@ -52,7 +52,7 @@ class System extends \Magento\Backend\Controller\AbstractAction if ($storeId) { $this->_session->setStoreId($storeId); } - $this->_redirectReferer(); + $this->getResponse()->setRedirect($this->_redirect->getRedirectUrl($this->getUrl('*'))); } protected function _isAllowed() diff --git a/app/code/Magento/Backend/Controller/Adminhtml/System/AbstractConfig.php b/app/code/Magento/Backend/Controller/Adminhtml/System/AbstractConfig.php index b85f4cdb54b1a0331abc460a38940b876b8e8f1a..0f61f7793815cc214a5bcc8a1a67fe6594e336b3 100644 --- a/app/code/Magento/Backend/Controller/Adminhtml/System/AbstractConfig.php +++ b/app/code/Magento/Backend/Controller/Adminhtml/System/AbstractConfig.php @@ -29,7 +29,9 @@ */ namespace Magento\Backend\Controller\Adminhtml\System; -abstract class AbstractConfig extends \Magento\Backend\Controller\AbstractAction +use Magento\App\Action\NotFoundException; + +abstract class AbstractConfig extends \Magento\Backend\App\AbstractAction { /** * @var \Magento\Backend\Model\Config\Structure @@ -37,11 +39,11 @@ abstract class AbstractConfig extends \Magento\Backend\Controller\AbstractAction protected $_configStructure; /** - * @param \Magento\Backend\Controller\Context $context + * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Backend\Model\Config\Structure $configStructure */ public function __construct( - \Magento\Backend\Controller\Context $context, + \Magento\Backend\App\Action\Context $context, \Magento\Backend\Model\Config\Structure $configStructure ) { parent::__construct($context); @@ -49,23 +51,21 @@ abstract class AbstractConfig extends \Magento\Backend\Controller\AbstractAction } /** - * Controller pre-dispatch method * Check if current section is found and is allowed * - * @return \Magento\Backend\Controller\AbstractAction + * @param \Magento\App\RequestInterface $request + * @return $this|mixed */ - public function preDispatch() + public function dispatch(\Magento\App\RequestInterface $request) { - parent::preDispatch(); - $section = null; - if (!$this->getRequest()->getParam('section')) { + if (!$request->getParam('section')) { $section = $this->_configStructure->getFirstSection(); - $this->getRequest()->setParam('section', $section->getId()); + $request->setParam('section', $section->getId()); } else { - $this->_isSectionAllowed($this->getRequest()->getParam('section')); + $this->_isSectionAllowed($request->getParam('section')); } - return $this; + return parent::dispatch($request); } /** @@ -86,6 +86,7 @@ abstract class AbstractConfig extends \Magento\Backend\Controller\AbstractAction * @param string $sectionId * @throws \Exception * @return bool + * @throws NotFoundException */ protected function _isSectionAllowed($sectionId) { @@ -95,12 +96,10 @@ abstract class AbstractConfig extends \Magento\Backend\Controller\AbstractAction } return true; } catch (\Zend_Acl_Exception $e) { - $this->norouteAction(); - $this->setFlag('', self::FLAG_NO_DISPATCH, true); - return false; + throw new NotFoundException(); } catch (\Exception $e) { $this->deniedAction(); - $this->setFlag('', self::FLAG_NO_DISPATCH, true); + $this->_actionFlag->set('', self::FLAG_NO_DISPATCH, true); return false; } } diff --git a/app/code/Magento/Backend/Controller/Adminhtml/System/Account.php b/app/code/Magento/Backend/Controller/Adminhtml/System/Account.php index 1a425ff8dab88709cfbb620ccdc5ff33f6bac7a1..6bab53bc587cd4c17b94d7d7488d05d29367983a 100644 --- a/app/code/Magento/Backend/Controller/Adminhtml/System/Account.php +++ b/app/code/Magento/Backend/Controller/Adminhtml/System/Account.php @@ -34,14 +34,14 @@ namespace Magento\Backend\Controller\Adminhtml\System; -class Account extends \Magento\Backend\Controller\Adminhtml\Action +class Account extends \Magento\Backend\App\Action { public function indexAction() { - $this->_title(__('My Account')); + $this->_title->add(__('My Account')); - $this->loadLayout(); - $this->renderLayout(); + $this->_view->loadLayout(); + $this->_view->renderLayout(); } /** diff --git a/app/code/Magento/Backend/Controller/Adminhtml/System/Backup.php b/app/code/Magento/Backend/Controller/Adminhtml/System/Backup.php index d0359eaf83fe1b6d9361bb43eae30caeaf7220b0..0bea7de81560fd51379fd6b36f5410934857ba68 100644 --- a/app/code/Magento/Backend/Controller/Adminhtml/System/Backup.php +++ b/app/code/Magento/Backend/Controller/Adminhtml/System/Backup.php @@ -33,7 +33,7 @@ */ namespace Magento\Backend\Controller\Adminhtml\System; -class Backup extends \Magento\Backend\Controller\Adminhtml\Action +class Backup extends \Magento\Backend\App\Action { /** * Core registry @@ -48,17 +48,25 @@ class Backup extends \Magento\Backend\Controller\Adminhtml\Action protected $_backupFactory; /** - * @param \Magento\Backend\Controller\Context $context + * @var \Magento\App\Response\Http\FileFactory + */ + protected $_fileFactory; + + /** + * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Core\Model\Registry $coreRegistry * @param \Magento\Backup\Factory $backupFactory + * @param \Magento\App\Response\Http\FileFactory $fileFactory */ public function __construct( - \Magento\Backend\Controller\Context $context, + \Magento\Backend\App\Action\Context $context, \Magento\Core\Model\Registry $coreRegistry, - \Magento\Backup\Factory $backupFactory + \Magento\Backup\Factory $backupFactory, + \Magento\App\Response\Http\FileFactory $fileFactory ) { $this->_coreRegistry = $coreRegistry; $this->_backupFactory = $backupFactory; + $this->_fileFactory = $fileFactory; parent::__construct($context); } @@ -67,20 +75,20 @@ class Backup extends \Magento\Backend\Controller\Adminhtml\Action */ public function indexAction() { - $this->_title(__('Backups')); + $this->_title->add(__('Backups')); if ($this->getRequest()->getParam('ajax')) { $this->_forward('grid'); return; } - $this->loadLayout(); + $this->_view->loadLayout(); $this->_setActiveMenu('Magento_Backup::system_tools_backup'); $this->_addBreadcrumb(__('System'), __('System')); $this->_addBreadcrumb(__('Tools'), __('Tools')); $this->_addBreadcrumb(__('Backups'), __('Backup')); - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -89,13 +97,13 @@ class Backup extends \Magento\Backend\Controller\Adminhtml\Action public function gridAction() { $this->renderLayot(false); - $this->renderLayout(); + $this->_view->renderLayout(); } /** * Create backup action * - * @return \Magento\Backend\Controller\Adminhtml\Action + * @return \Magento\Backend\App\Action */ public function createAction() { @@ -179,7 +187,7 @@ class Backup extends \Magento\Backend\Controller\Adminhtml\Action /** * Download backup action * - * @return \Magento\Backend\Controller\Adminhtml\Action + * @return \Magento\Backend\App\Action */ public function downloadAction() { @@ -196,9 +204,9 @@ class Backup extends \Magento\Backend\Controller\Adminhtml\Action $fileName = $this->_objectManager->get('Magento\Backup\Helper\Data') ->generateBackupDownloadName($backup); - $this->_prepareDownloadResponse($fileName, null, 'application/octet-stream', $backup->getSize()); + $response = $this->_fileFactory->create($fileName, null, 'application/octet-stream', $backup->getSize()); - $this->getResponse()->sendHeaders(); + $response->sendHeaders(); $backup->output(); exit(); @@ -207,7 +215,7 @@ class Backup extends \Magento\Backend\Controller\Adminhtml\Action /** * Rollback Action * - * @return \Magento\Backend\Controller\Adminhtml\Action + * @return \Magento\Backend\App\Action */ public function rollbackAction() { @@ -325,7 +333,7 @@ class Backup extends \Magento\Backend\Controller\Adminhtml\Action /** * Delete backups mass action * - * @return \Magento\Backend\Controller\Adminhtml\Action + * @return \Magento\Backend\App\Action */ public function massDeleteAction() { diff --git a/app/code/Magento/Backend/Controller/Adminhtml/System/Config.php b/app/code/Magento/Backend/Controller/Adminhtml/System/Config.php index 7ee8fb21bd01a03370b1d40d90bc9450c7da5368..0a3b13f40e2cec4c163814659606aa6de01a14c7 100644 --- a/app/code/Magento/Backend/Controller/Adminhtml/System/Config.php +++ b/app/code/Magento/Backend/Controller/Adminhtml/System/Config.php @@ -31,22 +31,30 @@ namespace Magento\Backend\Controller\Adminhtml\System; class Config extends \Magento\Backend\Controller\Adminhtml\System\AbstractConfig { + /** + * @var \Magento\App\Response\Http\FileFactory + */ + protected $_fileFactory; + /** * @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; /** - * @param \Magento\Backend\Controller\Context $context + * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Backend\Model\Config\Structure $configStructure + * @param \Magento\App\Response\Http\FileFactory $fileFactory * @param \Magento\Core\Model\StoreManagerInterface $storeManager */ public function __construct( - \Magento\Backend\Controller\Context $context, + \Magento\Backend\App\Action\Context $context, \Magento\Backend\Model\Config\Structure $configStructure, + \Magento\App\Response\Http\FileFactory $fileFactory, \Magento\Core\Model\StoreManagerInterface $storeManager ) { $this->_storeManager = $storeManager; + $this->_fileFactory = $fileFactory; parent::__construct($context, $configStructure); } @@ -65,7 +73,7 @@ class Config extends \Magento\Backend\Controller\Adminhtml\System\AbstractConfig */ public function editAction() { - $this->_title(__('Configuration')); + $this->_title->add(__('Configuration')); $current = $this->getRequest()->getParam('section'); $website = $this->getRequest()->getParam('website'); @@ -77,10 +85,10 @@ class Config extends \Magento\Backend\Controller\Adminhtml\System\AbstractConfig return $this->_redirect('adminhtml/*/', array('website' => $website, 'store' => $store)); } - $this->loadLayout(); + $this->_view->loadLayout(); $this->_setActiveMenu('Magento_Adminhtml::system_config'); - $this->getLayout()->getBlock('menu')->setAdditionalCacheKeyInfo(array($current)); + $this->_view->getLayout()->getBlock('menu')->setAdditionalCacheKeyInfo(array($current)); $this->_addBreadcrumb( __('System'), @@ -88,7 +96,7 @@ class Config extends \Magento\Backend\Controller\Adminhtml\System\AbstractConfig $this->getUrl('*\/system') ); - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -114,7 +122,8 @@ class Config extends \Magento\Backend\Controller\Adminhtml\System\AbstractConfig { $fileName = 'tablerates.csv'; /** @var $gridBlock \Magento\Adminhtml\Block\Shipping\Carrier\Tablerate\Grid */ - $gridBlock = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Shipping\Carrier\Tablerate\Grid'); + $gridBlock = $this->_view->getLayout() + ->createBlock('Magento\Adminhtml\Block\Shipping\Carrier\Tablerate\Grid'); $website = $this->_storeManager->getWebsite($this->getRequest()->getParam('website')); if ($this->getRequest()->getParam('conditionName')) { $conditionName = $this->getRequest()->getParam('conditionName'); @@ -123,6 +132,6 @@ class Config extends \Magento\Backend\Controller\Adminhtml\System\AbstractConfig } $gridBlock->setWebsiteId($website->getId())->setConditionName($conditionName); $content = $gridBlock->getCsvFile(); - $this->_prepareDownloadResponse($fileName, $content); + return $this->_fileFactory->create($fileName, $content); } } diff --git a/app/code/Magento/Backend/Controller/Adminhtml/System/Config/Save.php b/app/code/Magento/Backend/Controller/Adminhtml/System/Config/Save.php index e2794d4d203c9431c4be35aa3009cc77282b1088..ec6a87db567a5857ea5583c2d7ff852209219a5a 100644 --- a/app/code/Magento/Backend/Controller/Adminhtml/System/Config/Save.php +++ b/app/code/Magento/Backend/Controller/Adminhtml/System/Config/Save.php @@ -57,14 +57,14 @@ class Save extends \Magento\Backend\Controller\Adminhtml\System\AbstractConfig protected $string; /** - * @param \Magento\Backend\Controller\Context $context + * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Backend\Model\Config\Structure $configStructure * @param \Magento\Backend\Model\Config\Factory $configFactory * @param \Magento\Cache\FrontendInterface $cache * @param \Magento\Stdlib\String $string */ public function __construct( - \Magento\Backend\Controller\Context $context, + \Magento\Backend\App\Action\Context $context, \Magento\Backend\Model\Config\Structure $configStructure, \Magento\Backend\Model\Config\Factory $configFactory, \Magento\Cache\FrontendInterface $cache, diff --git a/app/code/Magento/Backend/Controller/Adminhtml/System/Config/System/Storage.php b/app/code/Magento/Backend/Controller/Adminhtml/System/Config/System/Storage.php index 74067e8c9618416f91b0066f0c6e95522af69572..caebd1ee74263872b2f5ddb3f70f1b025942b5be 100644 --- a/app/code/Magento/Backend/Controller/Adminhtml/System/Config/System/Storage.php +++ b/app/code/Magento/Backend/Controller/Adminhtml/System/Config/System/Storage.php @@ -33,7 +33,7 @@ */ namespace Magento\Backend\Controller\Adminhtml\System\Config\System; -class Storage extends \Magento\Backend\Controller\Adminhtml\Action +class Storage extends \Magento\Backend\App\Action { /** * Return file storage singleton diff --git a/app/code/Magento/Backend/Controller/Adminhtml/System/Design.php b/app/code/Magento/Backend/Controller/Adminhtml/System/Design.php index 71293d03c9529f1bb7859446ec8148a6eb70fb45..74e55caa5e7381e04895ddd94b4301011d927206 100644 --- a/app/code/Magento/Backend/Controller/Adminhtml/System/Design.php +++ b/app/code/Magento/Backend/Controller/Adminhtml/System/Design.php @@ -26,7 +26,7 @@ namespace Magento\Backend\Controller\Adminhtml\System; -class Design extends \Magento\Backend\Controller\Adminhtml\Action +class Design extends \Magento\Backend\App\Action { /** * Core registry @@ -36,11 +36,11 @@ class Design extends \Magento\Backend\Controller\Adminhtml\Action protected $_coreRegistry = null; /** - * @param \Magento\Backend\Controller\Context $context + * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Core\Model\Registry $coreRegistry */ public function __construct( - \Magento\Backend\Controller\Context $context, + \Magento\Backend\App\Action\Context $context, \Magento\Core\Model\Registry $coreRegistry ) { $this->_coreRegistry = $coreRegistry; @@ -49,16 +49,16 @@ class Design extends \Magento\Backend\Controller\Adminhtml\Action public function indexAction() { - $this->_title(__('Store Design')); - $this->loadLayout(); + $this->_title->add(__('Store Design')); + $this->_view->loadLayout(); $this->_setActiveMenu('Magento_Adminhtml::system_design_schedule'); - $this->renderLayout(); + $this->_view->renderLayout(); } public function gridAction() { - $this->loadLayout(false); - $this->renderLayout(); + $this->_view->loadLayout(false); + $this->_view->renderLayout(); } public function newAction() @@ -68,11 +68,11 @@ class Design extends \Magento\Backend\Controller\Adminhtml\Action public function editAction() { - $this->_title(__('Store Design')); + $this->_title->add(__('Store Design')); - $this->loadLayout(); + $this->_view->loadLayout(); $this->_setActiveMenu('Magento_Adminhtml::system_design_schedule'); - $this->getLayout()->getBlock('head')->setCanLoadExtJs(true); + $this->_view->getLayout()->getBlock('head')->setCanLoadExtJs(true); $id = (int)$this->getRequest()->getParam('id'); $design = $this->_objectManager->create('Magento\Core\Model\Design'); @@ -81,14 +81,14 @@ class Design extends \Magento\Backend\Controller\Adminhtml\Action $design->load($id); } - $this->_title($design->getId() ? __('Edit Store Design Change') : __('New Store Design Change')); + $this->_title->add($design->getId() ? __('Edit Store Design Change') : __('New Store Design Change')); $this->_coreRegistry->register('design', $design); - $this->_addContent($this->getLayout()->createBlock('Magento\Backend\Block\System\Design\Edit')); - $this->_addLeft($this->getLayout()->createBlock('Magento\Backend\Block\System\Design\Edit\Tabs', 'design_tabs')); + $this->_addContent($this->_view->getLayout()->createBlock('Magento\Backend\Block\System\Design\Edit')); + $this->_addLeft($this->_view->getLayout()->createBlock('Magento\Backend\Block\System\Design\Edit\Tabs', 'design_tabs')); - $this->renderLayout(); + $this->_view->renderLayout(); } public function saveAction() diff --git a/app/code/Magento/Backend/Controller/Adminhtml/System/Store.php b/app/code/Magento/Backend/Controller/Adminhtml/System/Store.php index 36fabb88e2e5c498e233874dc65da368d4f70191..d6ae70931e1f5a8a02634dabd8b5ae22298b7ea0 100644 --- a/app/code/Magento/Backend/Controller/Adminhtml/System/Store.php +++ b/app/code/Magento/Backend/Controller/Adminhtml/System/Store.php @@ -33,7 +33,7 @@ */ namespace Magento\Backend\Controller\Adminhtml\System; -class Store extends \Magento\Backend\Controller\Adminhtml\Action +class Store extends \Magento\Backend\App\Action { /** * Core registry @@ -48,12 +48,12 @@ class Store extends \Magento\Backend\Controller\Adminhtml\Action protected $filterManager; /** - * @param \Magento\Backend\Controller\Context $context + * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Core\Model\Registry $coreRegistry * @param \Magento\Filter\FilterManager $filterManager */ public function __construct( - \Magento\Backend\Controller\Context $context, + \Magento\Backend\App\Action\Context $context, \Magento\Core\Model\Registry $coreRegistry, \Magento\Filter\FilterManager $filterManager ) { @@ -70,8 +70,8 @@ class Store extends \Magento\Backend\Controller\Adminhtml\Action protected function _initAction() { // load layout, set active menu and breadcrumbs - $this->loadLayout() - ->_setActiveMenu('Magento_Adminhtml::system_store') + $this->_view->loadLayout(); + $this->_setActiveMenu('Magento_Adminhtml::system_store') ->_addBreadcrumb(__('System'), __('System')) ->_addBreadcrumb(__('Manage Stores'), __('Manage Stores')); return $this; @@ -79,9 +79,9 @@ class Store extends \Magento\Backend\Controller\Adminhtml\Action public function indexAction() { - $this->_title(__('Stores')); - $this->_initAction() - ->renderLayout(); + $this->_title->add(__('Stores')); + $this->_initAction(); + $this->_view->renderLayout(); } public function newWebsiteAction() @@ -119,7 +119,7 @@ class Store extends \Magento\Backend\Controller\Adminhtml\Action public function editStoreAction() { - $this->_title(__('Stores')); + $this->_title->add(__('Stores')); $session = $this->_getSession(); if ($session->getPostData()) { @@ -165,9 +165,9 @@ class Store extends \Magento\Backend\Controller\Adminhtml\Action $this->_coreRegistry->register('store_data', $model); if ($this->_coreRegistry->registry('store_action') == 'add') { - $this->_title(__('New ') . $title); + $this->_title->add(__('New ') . $title); } else { - $this->_title($model->getName()); + $this->_title->add($model->getName()); } if ($this->_coreRegistry->registry('store_action') == 'edit' && $codeBase && !$model->isReadOnly()) { @@ -175,8 +175,8 @@ class Store extends \Magento\Backend\Controller\Adminhtml\Action } $this->_initAction() - ->_addContent($this->getLayout()->createBlock('Magento\Backend\Block\System\Store\Edit')) - ->renderLayout(); + ->_addContent($this->_view->getLayout()->createBlock('Magento\Backend\Block\System\Store\Edit')); + $this->_view->renderLayout(); } else { $session->addError($notExists); $this->_redirect('adminhtml/*/'); @@ -263,7 +263,7 @@ class Store extends \Magento\Backend\Controller\Adminhtml\Action $session->addException($e, __('An error occurred while saving. Please review the error log.')); $session->setPostData($postData); } - $this->_redirectReferer(); + $this->getResponse()->setRedirect($this->_redirect->getRedirectUrl($this->getUrl('*'))); return; } $this->_redirect('adminhtml/*/'); @@ -271,7 +271,7 @@ class Store extends \Magento\Backend\Controller\Adminhtml\Action public function deleteWebsiteAction() { - $this->_title(__('Delete Web Site')); + $this->_title->add(__('Delete Web Site')); $session = $this->_getSession(); $itemId = $this->getRequest()->getParam('item_id', null); @@ -290,18 +290,18 @@ class Store extends \Magento\Backend\Controller\Adminhtml\Action $this->_initAction() ->_addBreadcrumb(__('Delete Web Site'), __('Delete Web Site')) - ->_addContent($this->getLayout()->createBlock('Magento\Backend\Block\System\Store\Delete') + ->_addContent($this->_view->getLayout()->createBlock('Magento\Backend\Block\System\Store\Delete') ->setFormActionUrl($this->getUrl('adminhtml/*/deleteWebsitePost')) ->setBackUrl($this->getUrl('adminhtml/*/editWebsite', array('website_id' => $itemId))) ->setStoreTypeTitle(__('Web Site')) ->setDataObject($model) - ) - ->renderLayout(); + ); + $this->_view->renderLayout(); } public function deleteGroupAction() { - $this->_title(__('Delete Store')); + $this->_title->add(__('Delete Store')); $session = $this->_getSession(); $itemId = $this->getRequest()->getParam('item_id', null); @@ -320,18 +320,18 @@ class Store extends \Magento\Backend\Controller\Adminhtml\Action $this->_initAction() ->_addBreadcrumb(__('Delete Store'), __('Delete Store')) - ->_addContent($this->getLayout()->createBlock('Magento\Backend\Block\System\Store\Delete') + ->_addContent($this->_view->getLayout()->createBlock('Magento\Backend\Block\System\Store\Delete') ->setFormActionUrl($this->getUrl('adminhtml/*/deleteGroupPost')) ->setBackUrl($this->getUrl('adminhtml/*/editGroup', array('group_id' => $itemId))) ->setStoreTypeTitle(__('Store')) ->setDataObject($model) - ) - ->renderLayout(); + ); + $this->_view->renderLayout(); } public function deleteStoreAction() { - $this->_title(__('Delete Store View')); + $this->_title->add(__('Delete Store View')); $session = $this->_getSession(); $itemId = $this->getRequest()->getParam('item_id', null); @@ -350,13 +350,13 @@ class Store extends \Magento\Backend\Controller\Adminhtml\Action $this->_initAction() ->_addBreadcrumb(__('Delete Store View'), __('Delete Store View')) - ->_addContent($this->getLayout()->createBlock('Magento\Backend\Block\System\Store\Delete') + ->_addContent($this->_view->getLayout()->createBlock('Magento\Backend\Block\System\Store\Delete') ->setFormActionUrl($this->getUrl('adminhtml/*/deleteStorePost')) ->setBackUrl($this->getUrl('adminhtml/*/editStore', array('store_id' => $itemId))) ->setStoreTypeTitle(__('Store View')) ->setDataObject($model) - ) - ->renderLayout(); + ); + $this->_view->renderLayout(); } public function deleteWebsitePostAction() diff --git a/app/code/Magento/Backend/Controller/Adminhtml/System/Variable.php b/app/code/Magento/Backend/Controller/Adminhtml/System/Variable.php index 1ddee1bd032b16a00df68964a1a6ed5d0985f404..47cba7c717e5b0f6659495a135016fee459f30ae 100644 --- a/app/code/Magento/Backend/Controller/Adminhtml/System/Variable.php +++ b/app/code/Magento/Backend/Controller/Adminhtml/System/Variable.php @@ -33,7 +33,7 @@ */ namespace Magento\Backend\Controller\Adminhtml\System; -class Variable extends \Magento\Backend\Controller\Adminhtml\Action +class Variable extends \Magento\Backend\App\Action { /** * Core registry @@ -43,11 +43,11 @@ class Variable extends \Magento\Backend\Controller\Adminhtml\Action protected $_coreRegistry = null; /** - * @param \Magento\Backend\Controller\Context $context + * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Core\Model\Registry $coreRegistry */ public function __construct( - \Magento\Backend\Controller\Context $context, + \Magento\Backend\App\Action\Context $context, \Magento\Core\Model\Registry $coreRegistry ) { $this->_coreRegistry = $coreRegistry; @@ -61,8 +61,8 @@ class Variable extends \Magento\Backend\Controller\Adminhtml\Action */ protected function _initLayout() { - $this->loadLayout() - ->_setActiveMenu('Magento_Adminhtml::system_variable') + $this->_view->loadLayout(); + $this->_setActiveMenu('Magento_Adminhtml::system_variable') ->_addBreadcrumb(__('Custom Variables'), __('Custom Variables')); return $this; } @@ -74,11 +74,11 @@ class Variable extends \Magento\Backend\Controller\Adminhtml\Action */ protected function _initVariable() { - $this->_title(__('Custom Variables')); + $this->_title->add(__('Custom Variables')); $variableId = $this->getRequest()->getParam('variable_id', null); $storeId = (int)$this->getRequest()->getParam('store', 0); - /* @var $emailVariable \Magento\Core\Model\Variable */ + /* @var $variable \Magento\Core\Model\Variable */ $variable = $this->_objectManager->create('Magento\Core\Model\Variable'); if ($variableId) { $variable->setStoreId($storeId) @@ -93,10 +93,10 @@ class Variable extends \Magento\Backend\Controller\Adminhtml\Action */ public function indexAction() { - $this->_title(__('Custom Variables')); + $this->_title->add(__('Custom Variables')); $this->_initLayout(); - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -114,14 +114,16 @@ class Variable extends \Magento\Backend\Controller\Adminhtml\Action { $variable = $this->_initVariable(); - $this->_title($variable->getId() ? $variable->getCode() : __('New Custom Variable')); + $this->_title->add($variable->getId() ? $variable->getCode() : __('New Custom Variable')); $this->_initLayout() - ->_addContent($this->getLayout()->createBlock('Magento\Backend\Block\System\Variable\Edit')) - ->_addJs($this->getLayout()->createBlock('Magento\Core\Block\Template', '', array( + ->_addContent( + $this->_view->getLayout()->createBlock('Magento\Backend\Block\System\Variable\Edit') + ) + ->_addJs($this->_view->getLayout()->createBlock('Magento\View\Block\Template', '', array( 'data' => array('template' => 'Magento_Backend::system/variable/js.phtml') - ))) - ->renderLayout(); + ))); + $this->_view->renderLayout(); } /** @@ -135,9 +137,9 @@ class Variable extends \Magento\Backend\Controller\Adminhtml\Action $result = $variable->validate(); if ($result !== true && is_string($result)) { $this->_getSession()->addError($result); - $this->_initLayoutMessages('Magento\Adminhtml\Model\Session'); + $this->_view->getLayout()->initMessages('Magento\Adminhtml\Model\Session'); $response->setError(true); - $response->setMessage($this->getLayout()->getMessagesBlock()->getGroupedHtml()); + $response->setMessage($this->_view->getLayout()->getMessagesBlock()->getGroupedHtml()); } $this->getResponse()->setBody($response->toJson()); } @@ -202,7 +204,7 @@ class Variable extends \Magento\Backend\Controller\Adminhtml\Action public function wysiwygPluginAction() { $customVariables = $this->_objectManager->create('Magento\Core\Model\Variable')->getVariablesOptionArray(true); - $storeContactVariabls = $this->_objectManager->create('Magento\Core\Model\Source\Email\Variables')->toOptionArray(true); + $storeContactVariabls = $this->_objectManager->create('Magento\Email\Model\Source\Variables')->toOptionArray(true); $variables = array($storeContactVariabls, $customVariables); $this->getResponse()->setBody(\Zend_Json::encode($variables)); } diff --git a/app/code/Magento/Backend/Helper/Dashboard/Data.php b/app/code/Magento/Backend/Helper/Dashboard/Data.php index b8f0a758abe318967e859a2df566620e32bddd94..c565f996d50568b121d638676a3f7e134a33526e 100644 --- a/app/code/Magento/Backend/Helper/Dashboard/Data.php +++ b/app/code/Magento/Backend/Helper/Dashboard/Data.php @@ -41,18 +41,18 @@ class Data extends \Magento\Core\Helper\Data protected $_installDate; /** - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\Store\Config $coreStoreConfig - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Locale $locale * @param \Magento\App\State $appState * @param $installDate * @param bool $dbCompatibleMode */ public function __construct( - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Core\Model\Store\Config $coreStoreConfig, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Locale $locale, \Magento\App\State $appState, $installDate, diff --git a/app/code/Magento/Backend/Helper/Dashboard/Order.php b/app/code/Magento/Backend/Helper/Dashboard/Order.php index d232dac346e3d51a06df50470749b8a06a621c86..3e1ce6b0af78e0144a21afeef78dea39b04fee4e 100644 --- a/app/code/Magento/Backend/Helper/Dashboard/Order.php +++ b/app/code/Magento/Backend/Helper/Dashboard/Order.php @@ -36,18 +36,18 @@ class Order extends \Magento\Backend\Helper\Dashboard\AbstractDashboard protected $_orderCollection; /** - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\Store\Config $coreStoreConfig - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Locale $locale * @param \Magento\App\State $appState * @param \Magento\Reports\Model\Resource\Order\Collection $orderCollection * @param bool $dbCompatibleMode */ public function __construct( - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Core\Model\Store\Config $coreStoreConfig, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Locale $locale, \Magento\App\State $appState, \Magento\Reports\Model\Resource\Order\Collection $orderCollection, diff --git a/app/code/Magento/Backend/Helper/Data.php b/app/code/Magento/Backend/Helper/Data.php index 5f0eaed22c82887e185c4e19e63ba2991f20d49b..4a0e86758ba109eaab0ac4643c3bd03708d62d80 100644 --- a/app/code/Magento/Backend/Helper/Data.php +++ b/app/code/Magento/Backend/Helper/Data.php @@ -29,7 +29,7 @@ namespace Magento\Backend\Helper; /** * @SuppressWarnings(PHPMD.LongVariable) */ -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { const XML_PATH_USE_CUSTOM_ADMIN_URL = 'admin/url/use_custom'; @@ -66,7 +66,7 @@ class Data extends \Magento\Core\Helper\AbstractHelper protected $mathRandom; /** - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\App\Route\Config $routeConfig * @param \Magento\Core\Model\AppInterface $app * @param \Magento\Backend\Model\Url $backendUrl @@ -75,7 +75,7 @@ class Data extends \Magento\Core\Helper\AbstractHelper * @param \Magento\Math\Random $mathRandom */ public function __construct( - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\App\Route\Config $routeConfig, \Magento\Core\Model\AppInterface $app, \Magento\Backend\Model\Url $backendUrl, 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 15a79417093dcebeabd4707caa820fda6b90bed9..9f1e1caf5a4f1c5390176082036dbc2d2a65b143 100644 --- a/app/code/Magento/Backend/Model/Config/Backend/Admin/Custom.php +++ b/app/code/Magento/Backend/Model/Config/Backend/Admin/Custom.php @@ -54,7 +54,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\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Config $config * @param \Magento\Core\Model\Config\Storage\WriterInterface $configWriter * @param \Magento\Core\Model\Resource\AbstractResource $resource @@ -64,7 +64,7 @@ class Custom extends \Magento\Core\Model\Config\Value public function __construct( \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Config $config, \Magento\Core\Model\Config\Storage\WriterInterface $configWriter, \Magento\Core\Model\Resource\AbstractResource $resource = 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 1da5b648850d4d583f2fd0c3237c07c3708f6457..43ab9de786556fb132cffad88462b91a96a18dc2 100644 --- a/app/code/Magento/Backend/Model/Config/Backend/Admin/Robots.php +++ b/app/code/Magento/Backend/Model/Config/Backend/Admin/Robots.php @@ -44,7 +44,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\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Config $config * @param \Magento\Filesystem $filesystem * @param \Magento\App\Dir $dir @@ -55,7 +55,7 @@ class Robots extends \Magento\Core\Model\Config\Value public function __construct( \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Config $config, \Magento\Filesystem $filesystem, \Magento\App\Dir $dir, 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 5291d8ef5f1bede520b24d48b28d3275e42eebc0..0211d4338bf4ed4f7e22ee54d34149f70fc224e5 100644 --- a/app/code/Magento/Backend/Model/Config/Backend/Admin/Usecustom.php +++ b/app/code/Magento/Backend/Model/Config/Backend/Admin/Usecustom.php @@ -42,7 +42,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\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Config $config * @param \Magento\Core\Model\Config\Storage\WriterInterface $configWriter * @param \Magento\Core\Model\Resource\AbstractResource $resource @@ -52,7 +52,7 @@ class Usecustom extends \Magento\Core\Model\Config\Value public function __construct( \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Config $config, \Magento\Core\Model\Config\Storage\WriterInterface $configWriter, \Magento\Core\Model\Resource\AbstractResource $resource = 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 c081f8ef31122be0651efb7457efafbfeb047191..5dcea3010bb5b13d0ddf27a83cf27fae29a2a064 100644 --- a/app/code/Magento/Backend/Model/Config/Backend/Admin/Usesecretkey.php +++ b/app/code/Magento/Backend/Model/Config/Backend/Admin/Usesecretkey.php @@ -39,7 +39,7 @@ class Usesecretkey extends \Magento\Core\Model\Config\Value /** * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Config $config * @param \Magento\Backend\Model\Url $backendUrl * @param \Magento\Core\Model\Resource\AbstractResource $resource @@ -49,7 +49,7 @@ class Usesecretkey extends \Magento\Core\Model\Config\Value public function __construct( \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Config $config, \Magento\Backend\Model\Url $backendUrl, \Magento\Core\Model\Resource\AbstractResource $resource = null, diff --git a/app/code/Magento/Backend/Model/Config/Backend/Baseurl.php b/app/code/Magento/Backend/Model/Config/Backend/Baseurl.php index 93d8f6ab4292370ab09984d3ab70ca4b7627a421..b8e152f162774d79a0e87969d7d19a067ca4248f 100644 --- a/app/code/Magento/Backend/Model/Config/Backend/Baseurl.php +++ b/app/code/Magento/Backend/Model/Config/Backend/Baseurl.php @@ -33,7 +33,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\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Config $config * @param \Magento\Core\Model\Page\Asset\MergeService $mergeService * @param \Magento\Core\Model\Resource\AbstractResource $resource @@ -43,7 +43,7 @@ class Baseurl extends \Magento\Core\Model\Config\Value public function __construct( \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Config $config, \Magento\Core\Model\Page\Asset\MergeService $mergeService, \Magento\Core\Model\Resource\AbstractResource $resource = 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 f446a33e46d168a852208055611a0104cd3ec6b9..2e009ec3444f5dba51a5e5a9cf24811582e612e4 100644 --- a/app/code/Magento/Backend/Model/Config/Backend/Currency/AbstractCurrency.php +++ b/app/code/Magento/Backend/Model/Config/Backend/Currency/AbstractCurrency.php @@ -50,7 +50,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\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Config $config * @param \Magento\Core\Model\Store\Config $coreStoreConfig * @param \Magento\Core\Model\Resource\AbstractResource $resource @@ -60,7 +60,7 @@ abstract class AbstractCurrency extends \Magento\Core\Model\Config\Value public function __construct( \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Config $config, \Magento\Core\Model\Store\Config $coreStoreConfig, \Magento\Core\Model\Resource\AbstractResource $resource = 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 a60491743f6436a06d5c0593f7469080a0b70375..7b0b566cad365f8b0f2df093e865b1dbd1aa0d5f 100644 --- a/app/code/Magento/Backend/Model/Config/Backend/Currency/Allow.php +++ b/app/code/Magento/Backend/Model/Config/Backend/Currency/Allow.php @@ -40,7 +40,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\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Config $config * @param \Magento\Core\Model\Store\Config $coreStoreConfig * @param \Magento\Core\Model\LocaleInterface $locale @@ -51,7 +51,7 @@ class Allow extends \Magento\Backend\Model\Config\Backend\Currency\AbstractCurre public function __construct( \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Config $config, \Magento\Core\Model\Store\Config $coreStoreConfig, \Magento\Core\Model\LocaleInterface $locale, 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 3ed511db85841b53032b5cd72ed9f1e66d10b969..d1f9a0da4b7e0f3582e85967697b6c440647856a 100644 --- a/app/code/Magento/Backend/Model/Config/Backend/Currency/Cron.php +++ b/app/code/Magento/Backend/Model/Config/Backend/Currency/Cron.php @@ -41,7 +41,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\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Config $config * @param \Magento\Core\Model\Config\ValueFactory $configValueFactory * @param \Magento\Core\Model\Resource\AbstractResource $resource @@ -51,7 +51,7 @@ class Cron extends \Magento\Core\Model\Config\Value public function __construct( \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Config $config, \Magento\Core\Model\Config\ValueFactory $configValueFactory, \Magento\Core\Model\Resource\AbstractResource $resource = null, diff --git a/app/code/Magento/Backend/Model/Config/Backend/Encrypted.php b/app/code/Magento/Backend/Model/Config/Backend/Encrypted.php index d2a2f9ad9f872a99a21b6e73ab7d659969bbbe4d..4d356830cc537241ed500961fca93edac738d427 100644 --- a/app/code/Magento/Backend/Model/Config/Backend/Encrypted.php +++ b/app/code/Magento/Backend/Model/Config/Backend/Encrypted.php @@ -39,7 +39,7 @@ class Encrypted /** * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Config $config * @param \Magento\Encryption\EncryptorInterface $encryptor * @param \Magento\Core\Model\Resource\AbstractResource $resource @@ -49,7 +49,7 @@ class Encrypted public function __construct( \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Config $config, \Magento\Encryption\EncryptorInterface $encryptor, \Magento\Core\Model\Resource\AbstractResource $resource = null, diff --git a/app/code/Magento/Backend/Model/Config/Backend/File.php b/app/code/Magento/Backend/Model/Config/Backend/File.php index 0c09afff08b7e90d61fdee9772ae59a763d3a81c..ad53e13aa4c20212c4b018512bd1947f4ac2a95f 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\File\UploaderFactory $uploaderFactory * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Config $config * @param \Magento\Backend\Model\Config\Backend\File\RequestData\RequestDataInterface $requestData * @param \Magento\Filesystem $filesystem @@ -79,7 +79,7 @@ class File extends \Magento\Core\Model\Config\Value \Magento\Core\Model\File\UploaderFactory $uploaderFactory, \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Config $config, \Magento\Backend\Model\Config\Backend\File\RequestData\RequestDataInterface $requestData, \Magento\Filesystem $filesystem, diff --git a/app/code/Magento/Backend/Model/Config/Backend/Locale.php b/app/code/Magento/Backend/Model/Config/Backend/Locale.php index c9a73d48c8c801c319274ccbc9a6efe472b80f58..22298756e3cd47e830c5820e2310e3b8a814adc4 100644 --- a/app/code/Magento/Backend/Model/Config/Backend/Locale.php +++ b/app/code/Magento/Backend/Model/Config/Backend/Locale.php @@ -54,7 +54,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\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Config $config * @param \Magento\Core\Model\Resource\Config\Data\CollectionFactory $configsFactory * @param \Magento\Core\Model\LocaleInterface $locale @@ -69,7 +69,7 @@ class Locale extends \Magento\Core\Model\Config\Value public function __construct( \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Config $config, \Magento\Core\Model\Resource\Config\Data\CollectionFactory $configsFactory, \Magento\Core\Model\LocaleInterface $locale, 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 17d86acf5047a460be31ecc4ad641ae853263e1f..76cdcf29c6cf29c458b3218cf5f9a414cdc36456 100644 --- a/app/code/Magento/Backend/Model/Config/Backend/Log/Cron.php +++ b/app/code/Magento/Backend/Model/Config/Backend/Log/Cron.php @@ -47,7 +47,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\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Config $config * @param \Magento\Core\Model\Config\ValueFactory $configValueFactory * @param \Magento\Core\Model\Resource\AbstractResource $resource @@ -58,7 +58,7 @@ class Cron extends \Magento\Core\Model\Config\Value public function __construct( \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Config $config, \Magento\Core\Model\Config\ValueFactory $configValueFactory, \Magento\Core\Model\Resource\AbstractResource $resource = 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 a743893c6fc8238ef5608803a2fc16aa7a646a63..ec624916431bb4d06e5e2a6fe17dbe2387d1c1e2 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\Helper\File\Storage $coreFileStorage * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Config $config * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection @@ -50,7 +50,7 @@ class Database extends \Magento\Core\Model\Config\Value \Magento\Core\Helper\File\Storage $coreFileStorage, \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Config $config, \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 7baf77350a4a79e5c7945a7d81dcd8a62054588c..7a1a877b2fed5ad06709bf55a43b95d0a4bb6be1 100644 --- a/app/code/Magento/Backend/Model/Config/Backend/Translate.php +++ b/app/code/Magento/Backend/Model/Config/Backend/Translate.php @@ -55,7 +55,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\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Config $config * @param \Magento\Core\Model\Store\Config $coreStoreConfig * @param \Magento\App\Cache\TypeListInterface $cacheTypeList @@ -66,7 +66,7 @@ class Translate extends \Magento\Core\Model\Config\Value public function __construct( \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Config $config, \Magento\Core\Model\Store\Config $coreStoreConfig, \Magento\App\Cache\TypeListInterface $cacheTypeList, diff --git a/app/code/Magento/Backend/Model/Config/Source/Email/Template.php b/app/code/Magento/Backend/Model/Config/Source/Email/Template.php index 876d2e8013c02df456b75f446d0fa64fbc77046f..2fbe58567cbb4ca3901449747068a50aea78e0e2 100644 --- a/app/code/Magento/Backend/Model/Config/Source/Email/Template.php +++ b/app/code/Magento/Backend/Model/Config/Source/Email/Template.php @@ -32,25 +32,25 @@ class Template extends \Magento\Object private $_coreRegistry; /** - * @var \Magento\Core\Model\Email\Template\Config + * @var \Magento\Email\Model\Template\Config */ private $_emailConfig; /** - * @var \Magento\Core\Model\Resource\Email\Template\CollectionFactory + * @var \Magento\Email\Model\Resource\Template\CollectionFactory */ protected $_templatesFactory; /** * @param \Magento\Core\Model\Registry $coreRegistry - * @param \Magento\Core\Model\Resource\Email\Template\CollectionFactory $templatesFactory - * @param \Magento\Core\Model\Email\Template\Config $emailConfig + * @param \Magento\Email\Model\Resource\Template\CollectionFactory $templatesFactory + * @param \Magento\Email\Model\Template\Config $emailConfig * @param array $data */ public function __construct( \Magento\Core\Model\Registry $coreRegistry, - \Magento\Core\Model\Resource\Email\Template\CollectionFactory $templatesFactory, - \Magento\Core\Model\Email\Template\Config $emailConfig, + \Magento\Email\Model\Resource\Template\CollectionFactory $templatesFactory, + \Magento\Email\Model\Template\Config $emailConfig, array $data = array() ) { parent::__construct($data); @@ -66,7 +66,7 @@ class Template extends \Magento\Object */ public function toOptionArray() { - /** @var $collection \Magento\Core\Model\Resource\Email\Template\Collection */ + /** @var $collection \Magento\Email\Model\Resource\Template\Collection */ if (!$collection = $this->_coreRegistry->registry('config_system_email_template')) { $collection = $this->_templatesFactory->create(); $collection->load(); diff --git a/app/code/Magento/Backend/Model/Locale.php b/app/code/Magento/Backend/Model/Locale.php index daf6c5259ebe93d63361e02979e4492e1cbccc90..f79c42fb435fe98307f93a13eb233fb3122e550a 100644 --- a/app/code/Magento/Backend/Model/Locale.php +++ b/app/code/Magento/Backend/Model/Locale.php @@ -62,7 +62,7 @@ class Locale extends \Magento\Core\Model\Locale * @param \Magento\Core\Helper\Translate $translate * @param \Magento\Core\Model\Store\Config $coreStoreConfig * @param \Magento\App\State $appState - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Locale\Config $config * @param \Magento\Core\Model\App $app * @param \Magento\Stdlib\DateTime $dateTime @@ -80,7 +80,7 @@ class Locale extends \Magento\Core\Model\Locale \Magento\Core\Helper\Translate $translate, \Magento\Core\Model\Store\Config $coreStoreConfig, \Magento\App\State $appState, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Locale\Config $config, \Magento\Core\Model\App $app, \Magento\Stdlib\DateTime $dateTime, diff --git a/app/code/Magento/Backend/Model/Menu/Item.php b/app/code/Magento/Backend/Model/Menu/Item.php index bade2870d2ea1122c86905131e42e3bace407762..7b3e40b63929b3f471d686c9830cfe8b77f88261 100644 --- a/app/code/Magento/Backend/Model/Menu/Item.php +++ b/app/code/Magento/Backend/Model/Menu/Item.php @@ -50,7 +50,7 @@ class Item /** * Module of menu item * - * @var \Magento\Core\Helper\AbstractHelper + * @var \Magento\App\Helper\AbstractHelper */ protected $_moduleHelper; @@ -171,7 +171,7 @@ class Item * @param \Magento\Core\Model\Store\Config $storeConfig * @param \Magento\Backend\Model\MenuFactory $menuFactory * @param \Magento\Backend\Model\Url $urlModel - * @param \Magento\Core\Helper\AbstractHelper $helper + * @param \Magento\App\Helper\AbstractHelper $helper * @param \Magento\Module\ModuleListInterface $moduleList * @param array $data */ @@ -181,7 +181,7 @@ class Item \Magento\Core\Model\Store\Config $storeConfig, \Magento\Backend\Model\MenuFactory $menuFactory, \Magento\Backend\Model\Url $urlModel, - \Magento\Core\Helper\AbstractHelper $helper, + \Magento\App\Helper\AbstractHelper $helper, \Magento\Module\ModuleListInterface $moduleList, array $data = array() ) { @@ -371,11 +371,11 @@ class Item /** * Set Item module * - * @param \Magento\Core\Helper\AbstractHelper $helper + * @param \Magento\App\Helper\AbstractHelper $helper * @return \Magento\Backend\Model\Menu\Item * @throws \InvalidArgumentException */ - public function setModuleHelper(\Magento\Core\Helper\AbstractHelper $helper) + public function setModuleHelper(\Magento\App\Helper\AbstractHelper $helper) { $this->_validator->validateParam('module', $helper); $this->_moduleHelper = $helper; diff --git a/app/code/Magento/Backend/Model/Menu/Item/Factory.php b/app/code/Magento/Backend/Model/Menu/Item/Factory.php index 96644749e16f232c16bfc518b2b35c8d69bfa34e..e9200060fb98406990ede644d04a8e764cd9c77b 100644 --- a/app/code/Magento/Backend/Model/Menu/Item/Factory.php +++ b/app/code/Magento/Backend/Model/Menu/Item/Factory.php @@ -33,17 +33,17 @@ class Factory protected $_objectManager; /** - * @var \Magento\Core\Model\Factory\Helper + * @var \Magento\App\Helper\HelperFactory */ protected $_helperFactory; /** * @param \Magento\ObjectManager $objectManager - * @param \Magento\Core\Model\Factory\Helper $helperFactory + * @param \Magento\App\Helper\HelperFactory $helperFactory */ public function __construct( \Magento\ObjectManager $objectManager, - \Magento\Core\Model\Factory\Helper $helperFactory + \Magento\App\Helper\HelperFactory $helperFactory ) { $this->_objectManager = $objectManager; $this->_helperFactory = $helperFactory; diff --git a/app/code/Magento/Backend/Model/Observer.php b/app/code/Magento/Backend/Model/Observer.php index 6f8e5428160986ee8d5602c7c31928c84247cf58..9540ef8df74eab6949f86ee5f49cdaeea33cdd5a 100644 --- a/app/code/Magento/Backend/Model/Observer.php +++ b/app/code/Magento/Backend/Model/Observer.php @@ -79,22 +79,6 @@ class Observer return $this; } - /** - * Prepare mass action separated data - * - * @return \Magento\Backend\Model\Observer - */ - public function massactionPrepareKey() - { - $key = $this->_request->getPost('massaction_prepare_key'); - if ($key) { - $postData = $this->_request->getPost($key); - $value = is_array($postData) ? $postData : explode(',', $postData); - $this->_request->setPost($key, $value ? $value : null); - } - return $this; - } - /** * Clear result of configuration files access level verification in system cache * diff --git a/app/code/Magento/Backend/Model/Url.php b/app/code/Magento/Backend/Model/Url.php index f55622f52b0742cc874c87592248626528041a59..240914ab0d22ab84a3642480dca15f1bb2295bc5 100644 --- a/app/code/Magento/Backend/Model/Url.php +++ b/app/code/Magento/Backend/Model/Url.php @@ -94,13 +94,13 @@ class Url extends \Magento\Core\Model\Url /** * @param \Magento\App\Route\ConfigInterface $routeConfig * @param \Magento\App\RequestInterface $request - * @param \Magento\Core\Model\Url\SecurityInfoInterface $securityInfo + * @param \Magento\Core\Model\Url\SecurityInfoInterface $urlSecurityInfo * @param \Magento\Core\Model\Store\Config $coreStoreConfig * @param \Magento\Backend\Helper\Data $backendHelper * @param \Magento\Core\Model\Session $session * @param Menu\Config $menuConfig * @param \Magento\Core\Model\App $app - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\App\CacheInterface $cache * @param Auth\Session $authSession * @param \Magento\Encryption\EncryptorInterface $encryptor @@ -110,13 +110,13 @@ class Url extends \Magento\Core\Model\Url public function __construct( \Magento\App\Route\ConfigInterface $routeConfig, \Magento\App\RequestInterface $request, - \Magento\Core\Model\Url\SecurityInfoInterface $securityInfo, + \Magento\Core\Model\Url\SecurityInfoInterface $urlSecurityInfo, \Magento\Core\Model\Store\Config $coreStoreConfig, \Magento\Backend\Helper\Data $backendHelper, \Magento\Core\Model\Session $session, \Magento\Backend\Model\Menu\Config $menuConfig, \Magento\Core\Model\App $app, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\App\CacheInterface $cache, \Magento\Backend\Model\Auth\Session $authSession, \Magento\Encryption\EncryptorInterface $encryptor, @@ -125,7 +125,7 @@ class Url extends \Magento\Core\Model\Url ) { $this->_encryptor = $encryptor; parent::__construct( - $routeConfig, $request, $securityInfo, $coreStoreConfig, + $routeConfig, $request, $urlSecurityInfo, $coreStoreConfig, $app, $storeManager, $session, $areaCode, $data ); $this->_startupMenuItemId = $coreStoreConfig->getConfig(self::XML_PATH_STARTUP_MENU_ITEM); diff --git a/app/code/Magento/Backend/Model/View.php b/app/code/Magento/Backend/Model/View.php new file mode 100644 index 0000000000000000000000000000000000000000..394ae973d1ea7bfb7335753b6a658b57bde69d1a --- /dev/null +++ b/app/code/Magento/Backend/Model/View.php @@ -0,0 +1,74 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Backend\Model; + +class View extends \Magento\App\View +{ + /** + * @var \Magento\Core\Model\Layout\Filter\Acl + */ + protected $_aclFilter; + + /** + * @param \Magento\View\LayoutInterface $layout + * @param \Magento\App\RequestInterface $request + * @param \Magento\App\ResponseInterface $response + * @param \Magento\Config\ScopeInterface $configScope + * @param \Magento\Event\ManagerInterface $eventManager + * @param \Magento\Core\Model\Translate $translator + * @param \Magento\App\ActionFlag $actionFlag + * @param \Magento\Core\Model\Layout\Filter\Acl $aclFilter + */ + public function __construct( + \Magento\View\LayoutInterface $layout, + \Magento\App\RequestInterface $request, + \Magento\App\ResponseInterface $response, + \Magento\Config\ScopeInterface $configScope, + \Magento\Event\ManagerInterface $eventManager, + \Magento\Core\Model\Translate $translator, + \Magento\App\ActionFlag $actionFlag, + \Magento\Core\Model\Layout\Filter\Acl $aclFilter + ) { + $this->_aclFilter = $aclFilter; + parent::__construct($layout, $request, $response, $configScope, $eventManager, $translator, $actionFlag); + } + + + /** + * {@inheritdoc} + */ + public function loadLayout($handles = null, $generateBlocks = true, $generateXml = true) + { + parent::loadLayout($handles, false, $generateXml); + $this->_aclFilter->filterAclNodes($this->getLayout()->getNode()); + if ($generateBlocks) { + $this->generateLayoutBlocks(); + $this->_isLayoutLoaded = true; + } + $this->getLayout()->initMessages('Magento\Backend\Model\Session'); + return $this; + } + +} \ No newline at end of file diff --git a/app/code/Magento/Backend/etc/adminhtml/di.xml b/app/code/Magento/Backend/etc/adminhtml/di.xml index ab4b298d5a8ae38cf04dbc3d08d2cc09e6495583..57d29fca271a782aaa3d703d107e1efcd15a2026 100644 --- a/app/code/Magento/Backend/etc/adminhtml/di.xml +++ b/app/code/Magento/Backend/etc/adminhtml/di.xml @@ -27,13 +27,20 @@ <preference for="Magento\Authorization\Policy" type="Magento\Authorization\Policy\Acl" /> <preference for="Magento\Authorization\RoleLocator" type="Magento\Backend\Model\Authorization\RoleLocator" /> <preference for="Magento\Core\Model\LocaleInterface" type="Magento\Backend\Model\Locale" /> - <preference for="Magento\Core\Controller\Varien\Action\Context" type="Magento\Backend\Controller\Context" /> + <preference for="Magento\App\Action\Context" type="Magento\Backend\App\Action\Context" /> <preference for="Magento\UrlInterface" type="Magento\Backend\Model\Url" /> <preference for="Magento\Backend\Model\Auth\StorageInterface" type="Magento\Backend\Model\Auth\Session" /> <preference for="Magento\Backend\Model\Config\Structure\SearchInterface" type="Magento\Backend\Model\Config\Structure" /> <preference for="Magento\Backend\Model\Config\Backend\File\RequestData\RequestDataInterface" type="Magento\Backend\Model\Config\Backend\File\RequestData" /> <preference for="Magento\Acl\Resource\ProviderInterface" type="Magento\Acl\Resource\Provider" /> <preference for="Magento\App\DefaultPathInterface" type="Magento\Backend\App\DefaultPath" /> + <preference for="Magento\App\Response\Http\FileFactory" type="Magento\Backend\App\Response\Http\FileFactory" /> + <preference for="Magento\App\View" type="Magento\Backend\Model\View" /> + <type name="Magento\Backend\App\Action\Context"> + <param name="helper"> + <instance type="Magento\Backend\Helper\Data" /> + </param> + </type> <type name="Magento\Backend\Model\Auth\Session"> <param name="backendUrl"> <instance type="Magento\Backend\Model\Url\Proxy" /> @@ -124,4 +131,19 @@ </value> </param> </type> + <type name="Magento\Core\App\Action\Plugin\Session"> + <param name="sessionNamespace"> + <value type="const">Magento\Backend\App\AbstractAction::SESSION_NAMESPACE</value> + </param> + </type> + <type name="Magento\Backend\App\AbstractAction"> + <plugin name="adminAuthentication" type="Magento\Backend\App\Action\Plugin\Authentication" sortOrder="100" /> + <plugin name="adminStore" type="Magento\Backend\App\Action\Plugin\Store" sortOrder="10" /> + <plugin name="adminMassactionKey" type="Magento\Backend\App\Action\Plugin\MassactionKey" sortOrder="11" /> + </type> + <type name="Magento\Core\App\Response\Redirect"> + <param name="canUseSessionIdInParam"> + <value type="bool">false</value> + </param> + </type> </config> diff --git a/app/code/Magento/Backend/etc/adminhtml/menu.xml b/app/code/Magento/Backend/etc/adminhtml/menu.xml index 126f3323af44dcb12117ddac35203b9933647c0f..b054038fd6c1d04efaf2538fe71eeec870205a17 100644 --- a/app/code/Magento/Backend/etc/adminhtml/menu.xml +++ b/app/code/Magento/Backend/etc/adminhtml/menu.xml @@ -29,7 +29,6 @@ <menu> <add id="Magento_Adminhtml::system_design_schedule" title="Schedule" module="Magento_Adminhtml" sortOrder="30" parent="Magento_Adminhtml::system_design" action="adminhtml/system_design" resource="Magento_Adminhtml::schedule"/> <add id="Magento_Adminhtml::system_currency" title="Currency" module="Magento_Adminhtml" sortOrder="30" parent="Magento_Adminhtml::stores" action="adminhtml/system_currency" resource="Magento_CurrencySymbol::system_currency"/> - <add id="Magento_Adminhtml::system_email_template" title="Email Templates" module="Magento_Adminhtml" sortOrder="10" parent="Magento_Adminhtml::marketing_communications" action="adminhtml/system_email_template" resource="Magento_Adminhtml::email_template"/> <add id="Magento_Adminhtml::system_variable" title="Custom Variables" module="Magento_Adminhtml" sortOrder="20" parent="Magento_Adminhtml::system_other_settings" action="adminhtml/system_variable" resource="Magento_Adminhtml::variable"/> <add id="Magento_Adminhtml::system_store" title="All Stores" module="Magento_Core" sortOrder="10" parent="Magento_Adminhtml::stores_settings" action="adminhtml/system_store/" resource="Magento_Adminhtml::store"/> <add id="Magento_Adminhtml::system_config" title="Configuration" module="Magento_Adminhtml" sortOrder="20" parent="Magento_Adminhtml::stores_settings" action="adminhtml/system_config" resource="Magento_Adminhtml::config"/> diff --git a/app/code/Magento/Backend/etc/di.xml b/app/code/Magento/Backend/etc/di.xml index 927fd0ad1fd8de95e69d48a386c32d73b1c85262..25a442ebb201eabace88eb9389ad095ae9ea4efe 100644 --- a/app/code/Magento/Backend/etc/di.xml +++ b/app/code/Magento/Backend/etc/di.xml @@ -36,11 +36,6 @@ </value> </param> </type> - <type name="Magento\Backend\Controller\Context"> - <param name="translator"> - <instance type="Magento\Core\Model\Translate\Proxy" /> - </param> - </type> <type name="Magento\Backend\App\Router\DefaultRouter"> <param name="routerId"> <value>admin</value> diff --git a/app/code/Magento/Backend/view/adminhtml/admin/login.phtml b/app/code/Magento/Backend/view/adminhtml/admin/login.phtml index 1c295f207b9d90aca692cce40ba9ec6b9e38f439..5a63d7d2737d534b82b7244ae0e9706f0e3ea435 100644 --- a/app/code/Magento/Backend/view/adminhtml/admin/login.phtml +++ b/app/code/Magento/Backend/view/adminhtml/admin/login.phtml @@ -38,9 +38,8 @@ <link rel="stylesheet" href="<?php echo $this->getViewFileUrl('mui/base.css') ?>" media="all" /> <link rel="stylesheet" href="<?php echo $this->getViewFileUrl('mui/elements.css') ?>" media="all" /> <link rel="stylesheet" href="<?php echo $this->getViewFileUrl('mui/form.css') ?>" media="all" /> - <link rel="stylesheet" href="<?php echo $this->getViewFileUrl('css/admin.css') ?>" media="all" /> + <link rel="stylesheet" href="<?php echo $this->getViewFileUrl('css/styles.css') ?>" media="all" /> <link rel="stylesheet" href="<?php echo $this->getViewFileUrl('mui/utils.css') ?>" media="all" /> - <link rel="stylesheet" href="<?php echo $this->getViewFileUrl('css/debug.css') ?>" media="all" /> <script src="<?php echo $this->getViewFileUrl('jquery/jquery.js') ?>"></script> diff --git a/app/code/Magento/Backup/Helper/Data.php b/app/code/Magento/Backup/Helper/Data.php index 9a4b3614acbf3d94b120a013c54485508940c8af..88f8134bf35d33d511dea21b6c361b405cbc98c0 100644 --- a/app/code/Magento/Backup/Helper/Data.php +++ b/app/code/Magento/Backup/Helper/Data.php @@ -27,7 +27,7 @@ */ namespace Magento\Backup\Helper; -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { /** * Backup type constant for database backup @@ -64,11 +64,6 @@ class Data extends \Magento\Core\Helper\AbstractHelper */ protected $_authorization; - /** - * @var \Magento\Cache\ConfigInterface - */ - protected $_cacheConfig; - /** * @var \Magento\App\Cache\TypeListInterface */ @@ -91,19 +86,17 @@ class Data extends \Magento\Core\Helper\AbstractHelper /** * Construct * - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Filesystem $filesystem * @param \Magento\AuthorizationInterface $authorization - * @param \Magento\Cache\ConfigInterface $cacheConfig * @param \Magento\App\Cache\TypeListInterface $cacheTypeList * @param \Magento\App\Dir $dir * @param \Magento\Index\Model\Resource\Process\CollectionFactory $processFactory */ public function __construct( - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Filesystem $filesystem, \Magento\AuthorizationInterface $authorization, - \Magento\Cache\ConfigInterface $cacheConfig, \Magento\App\Cache\TypeListInterface $cacheTypeList, \Magento\App\Dir $dir, \Magento\Index\Model\Resource\Process\CollectionFactory $processFactory @@ -111,7 +104,6 @@ class Data extends \Magento\Core\Helper\AbstractHelper parent::__construct($context); $this->_authorization = $authorization; $this->_filesystem = $filesystem; - $this->_cacheConfig = $cacheConfig; $this->_cacheTypeList = $cacheTypeList; $this->_dir = $dir; } diff --git a/app/code/Magento/Backup/Model/Config/Backend/Cron.php b/app/code/Magento/Backup/Model/Config/Backend/Cron.php index 783b49ebb6e97fdae8b2b6e94980106956b3f317..486d39ab74ba03db1d84ae2342c0939874d44707 100644 --- a/app/code/Magento/Backup/Model/Config/Backend/Cron.php +++ b/app/code/Magento/Backup/Model/Config/Backend/Cron.php @@ -51,7 +51,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\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Config $config * @param \Magento\Core\Model\Config\ValueFactory $configValueFactory * @param \Magento\Core\Model\Resource\AbstractResource $resource @@ -62,7 +62,7 @@ class Cron extends \Magento\Core\Model\Config\Value public function __construct( \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Config $config, \Magento\Core\Model\Config\ValueFactory $configValueFactory, \Magento\Core\Model\Resource\AbstractResource $resource = null, diff --git a/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes/Extend.php b/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes/Extend.php index 13f44331cf24dd87faf508511765b567239e69a7..bb9c72242752e889cce4926ca40e3d6f1f61cd6c 100644 --- a/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes/Extend.php +++ b/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes/Extend.php @@ -46,20 +46,20 @@ class Extend */ protected $_coreRegistry = null; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle.php b/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle.php index ca30197c6356c4e2e18e072d23fb3a7881ceeb0e..fd4b662c7ca37cbdf2fd4a8b59703d14111cd087 100644 --- a/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle.php +++ b/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle.php @@ -47,20 +47,20 @@ class Bundle extends \Magento\Adminhtml\Block\Widget */ protected $_coreRegistry = null; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } public function getTabUrl() diff --git a/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option.php b/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option.php index 93546494311d96802a7413f9c891d190f4635d4b..d0637627f1826c79f863c5189270084010d69a05 100644 --- a/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option.php +++ b/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option.php @@ -74,11 +74,6 @@ class Option extends \Magento\Backend\Block\Widget */ protected $_coreRegistry = null; - /** - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - /** * @var \Magento\Bundle\Model\Source\Option\Type */ @@ -90,28 +85,25 @@ class Option extends \Magento\Backend\Block\Widget protected $_yesno; /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Backend\Model\Config\Source\Yesno $yesno * @param \Magento\Bundle\Model\Source\Option\Type $optionTypes - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context * @param \Magento\Core\Model\Registry $registry * @param array $data */ public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Backend\Model\Config\Source\Yesno $yesno, \Magento\Bundle\Model\Source\Option\Type $optionTypes, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, \Magento\Core\Model\Registry $registry, array $data = array() ) { $this->_coreRegistry = $registry; - $this->_storeManager = $storeManager; $this->_optionTypes = $optionTypes; $this->_yesno = $yesno; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** 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 2abcf375ae4f158d83cf3b6567648e00763e8b44..b7cf851e8b8ba9714d3e097c92493d0bc8ce1ecd 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 @@ -48,27 +48,25 @@ class Grid */ protected $_productFactory; - /** - * @param \Magento\Catalog\Model\ProductFactory $productFactory - * @param \Magento\Bundle\Helper\Data $bundleData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Catalog\Model\ProductFactory $productFactory + * @param \Magento\Bundle\Helper\Data $bundleData + * @param array $data */ - public function __construct( - \Magento\Catalog\Model\ProductFactory $productFactory, - \Magento\Bundle\Helper\Data $bundleData, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Catalog\Model\ProductFactory $productFactory, + \Magento\Bundle\Helper\Data $bundleData, + array $data = array() + ) { $this->_bundleData = $bundleData; $this->_productFactory = $productFactory; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $data); } protected function _construct() diff --git a/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Selection.php b/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Selection.php index 65e6b9ce0ad0191770f66299e2f171a78f4a3112..e546a89210085a1c0d08476f233ab6d73d5f6067 100644 --- a/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Selection.php +++ b/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Selection.php @@ -62,29 +62,29 @@ class Selection */ protected $_yesno; - /** - * @param \Magento\Backend\Model\Config\Source\Yesno $yesno - * @param \Magento\Bundle\Model\Source\Option\Selection\Price\Type $priceType - * @param \Magento\Catalog\Helper\Data $catalogData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Backend\Model\Config\Source\Yesno $yesno + * @param \Magento\Bundle\Model\Source\Option\Selection\Price\Type $priceType + * @param \Magento\Catalog\Helper\Data $catalogData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Backend\Model\Config\Source\Yesno $yesno, - \Magento\Bundle\Model\Source\Option\Selection\Price\Type $priceType, - \Magento\Catalog\Helper\Data $catalogData, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Backend\Model\Config\Source\Yesno $yesno, + \Magento\Bundle\Model\Source\Option\Selection\Price\Type $priceType, + \Magento\Catalog\Helper\Data $catalogData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_catalogData = $catalogData; $this->_coreRegistry = $registry; $this->_priceType = $priceType; $this->_yesno = $yesno; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/Items/Renderer.php b/app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/Items/Renderer.php index df74c4341ae8437973cbd0b2cd1b250a46331ead..9d6ff7d2c3a8d320b96e6a6e2199609aaee22bf2 100644 --- a/app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/Items/Renderer.php +++ b/app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/Items/Renderer.php @@ -31,33 +31,6 @@ namespace Magento\Bundle\Block\Adminhtml\Sales\Order\Items; */ class Renderer extends \Magento\Sales\Block\Adminhtml\Items\Renderer\DefaultRenderer { - /** - * Filter manager - * - * @var \Magento\Filter\FilterManager - */ - protected $filter; - - /** - * @param \Magento\Catalog\Model\ProductFactory $productFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Filter\FilterManager $filter - * @param array $data - */ - public function __construct( - \Magento\Catalog\Model\ProductFactory $productFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - \Magento\Filter\FilterManager $filter, - array $data = array() - ) { - $this->filter = $filter; - parent::__construct($productFactory, $coreData, $context, $registry, $data); - } - /** * Truncate string * @@ -70,7 +43,7 @@ class Renderer extends \Magento\Sales\Block\Adminhtml\Items\Renderer\DefaultRend */ public function truncateString($value, $length = 80, $etc = '...', &$remainder = '', $breakWords = true) { - return $this->filter->truncate($value, array( + return $this->filterManager->truncate($value, array( 'length' => $length, 'etc' => $etc, 'remainder' => $remainder, diff --git a/app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/View/Items/Renderer.php b/app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/View/Items/Renderer.php index 8a232551c3d5e65e8a1a3d6965afaf465815838d..bf4b2d54b9965fcbd34fbc454edf8bf88222f62d 100644 --- a/app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/View/Items/Renderer.php +++ b/app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/View/Items/Renderer.php @@ -31,33 +31,6 @@ namespace Magento\Bundle\Block\Adminhtml\Sales\Order\View\Items; */ class Renderer extends \Magento\Sales\Block\Adminhtml\Order\View\Items\Renderer\DefaultRenderer { - /** - * Core string - * - * @var \Magento\Filter\FilterManager - */ - protected $filter; - - /** - * @param \Magento\Catalog\Model\ProductFactory $productFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Filter\FilterManager $filter - * @param array $data - */ - public function __construct( - \Magento\Catalog\Model\ProductFactory $productFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - \Magento\Filter\FilterManager $filter, - array $data = array() - ) { - $this->filter = $filter; - parent::__construct($productFactory, $coreData, $context, $registry, $data); - } - /** * Truncate string * @@ -70,7 +43,7 @@ class Renderer extends \Magento\Sales\Block\Adminhtml\Order\View\Items\Renderer\ */ public function truncateString($value, $length = 80, $etc = '...', &$remainder = '', $breakWords = true) { - return $this->filter->truncate($value, array( + return $this->filterManager->truncate($value, array( 'length' => $length, 'etc' => $etc, 'remainder' => $remainder, diff --git a/app/code/Magento/Bundle/Block/Catalog/Product/Price.php b/app/code/Magento/Bundle/Block/Catalog/Product/Price.php index e1a517d51e4513bc38cf8bba614816f0e3a7163f..1ab8e943a7b9478e156f1fddefd6981dcf344a7b 100644 --- a/app/code/Magento/Bundle/Block/Catalog/Product/Price.php +++ b/app/code/Magento/Bundle/Block/Catalog/Product/Price.php @@ -41,11 +41,10 @@ class Price extends \Magento\Catalog\Block\Product\Price protected $_taxCalc; /** - * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\View\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Catalog\Helper\Data $catalogData * @param \Magento\Tax\Helper\Data $taxData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Core\Model\Registry $registry * @param \Magento\Stdlib\String $string * @param \Magento\Math\Random $mathRandom @@ -53,28 +52,17 @@ class Price extends \Magento\Catalog\Block\Product\Price * @param array $data */ public function __construct( - \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\View\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Catalog\Helper\Data $catalogData, \Magento\Tax\Helper\Data $taxData, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Core\Model\Registry $registry, \Magento\Stdlib\String $string, \Magento\Math\Random $mathRandom, \Magento\Tax\Model\Calculation $taxCalc, array $data = array() ) { - parent::__construct( - $storeManager, - $catalogData, - $taxData, - $coreData, - $context, - $registry, - $string, - $mathRandom, - $data - ); + parent::__construct($context, $coreData, $catalogData, $taxData, $registry, $string, $mathRandom, $data); $this->_taxCalc = $taxCalc; } diff --git a/app/code/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle.php b/app/code/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle.php index 15fbec6ea4d11e25aea4e3a67c556a1bade86391..59eb3b11820824020177292b3a6b45ad60934af3 100644 --- a/app/code/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle.php +++ b/app/code/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle.php @@ -58,55 +58,40 @@ class Bundle extends \Magento\Catalog\Block\Product\View\AbstractView protected $_productPrice; /** - * @var \Magento\Core\Model\LocaleInterface - */ - protected $_locale; - - /** - * Construct - * - * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\View\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Catalog\Model\Config $catalogConfig - * @param \Magento\Core\Model\Registry $coreRegistry + * @param \Magento\Core\Model\Registry $registry * @param \Magento\Tax\Helper\Data $taxData * @param \Magento\Catalog\Helper\Data $catalogData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Math\Random $mathRandom * @param \Magento\Stdlib\ArrayUtils $arrayUtils * @param \Magento\Catalog\Helper\Product $catalogProduct - * @param \Magento\Core\Model\LocaleInterface $locale * @param \Magento\Bundle\Model\Product\PriceFactory $productPrice * @param array $data - * - * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( - \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\View\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Catalog\Model\Config $catalogConfig, - \Magento\Core\Model\Registry $coreRegistry, + \Magento\Core\Model\Registry $registry, \Magento\Tax\Helper\Data $taxData, \Magento\Catalog\Helper\Data $catalogData, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Math\Random $mathRandom, \Magento\Stdlib\ArrayUtils $arrayUtils, \Magento\Catalog\Helper\Product $catalogProduct, - \Magento\Core\Model\LocaleInterface $locale, \Magento\Bundle\Model\Product\PriceFactory $productPrice, array $data = array() ) { $this->_catalogProduct = $catalogProduct; $this->_productPrice = $productPrice; - $this->_locale = $locale; parent::__construct( - $storeManager, + $context, + $coreData, $catalogConfig, - $coreRegistry, + $registry, $taxData, $catalogData, - $coreData, - $context, $mathRandom, $arrayUtils, $data diff --git a/app/code/Magento/Bundle/Block/Checkout/Cart/Item/Renderer.php b/app/code/Magento/Bundle/Block/Checkout/Cart/Item/Renderer.php index 121adb787aa73bda489e4b1a1b1e5b7997f9d356..07f609cfde27a581265d7c36fbb88c1b7a2be245 100644 --- a/app/code/Magento/Bundle/Block/Checkout/Cart/Item/Renderer.php +++ b/app/code/Magento/Bundle/Block/Checkout/Cart/Item/Renderer.php @@ -45,23 +45,23 @@ class Renderer extends \Magento\Checkout\Block\Cart\Item\Renderer protected $_bundleProdConfigur = null; /** - * @param \Magento\Catalog\Helper\Product\Configuration $ctlgProdConfigur + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context + * @param \Magento\Catalog\Helper\Product\Configuration $productConfig * @param \Magento\Checkout\Model\Session $checkoutSession * @param \Magento\Bundle\Helper\Catalog\Product\Configuration $bundleProdConfigur * @param array $data */ public function __construct( - \Magento\Catalog\Helper\Product\Configuration $ctlgProdConfigur, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, + \Magento\Catalog\Helper\Product\Configuration $productConfig, \Magento\Checkout\Model\Session $checkoutSession, \Magento\Bundle\Helper\Catalog\Product\Configuration $bundleProdConfigur, array $data = array() ) { $this->_bundleProdConfigur = $bundleProdConfigur; - parent::__construct($ctlgProdConfigur, $coreData, $context, $checkoutSession, $data); + parent::__construct($context, $coreData, $productConfig, $checkoutSession, $data); } protected function _construct() diff --git a/app/code/Magento/Bundle/Controller/Adminhtml/Bundle/Product/Edit.php b/app/code/Magento/Bundle/Controller/Adminhtml/Bundle/Product/Edit.php index 7ac58a5e53dba84c2e46bed30504d055efb8131c..c4e233917c3b93cef83af17df45cb893127769bb 100644 --- a/app/code/Magento/Bundle/Controller/Adminhtml/Bundle/Product/Edit.php +++ b/app/code/Magento/Bundle/Controller/Adminhtml/Bundle/Product/Edit.php @@ -39,7 +39,7 @@ class Edit extends \Magento\Catalog\Controller\Adminhtml\Product { $product = $this->_initProduct(); $this->getResponse()->setBody( - $this->getLayout() + $this->_view->getLayout() ->createBlock('Magento\Bundle\Block\Adminhtml\Catalog\Product\Edit\Tab\Bundle', 'admin.product.bundle.items') ->setProductId($product->getId()) diff --git a/app/code/Magento/Bundle/Controller/Adminhtml/Bundle/Selection.php b/app/code/Magento/Bundle/Controller/Adminhtml/Bundle/Selection.php index 5821cd8790c93ab08d55beac918094f1da3de40d..3d32189f63fc64969127ab2e182f3f2902c7c6ef 100644 --- a/app/code/Magento/Bundle/Controller/Adminhtml/Bundle/Selection.php +++ b/app/code/Magento/Bundle/Controller/Adminhtml/Bundle/Selection.php @@ -33,12 +33,12 @@ */ namespace Magento\Bundle\Controller\Adminhtml\Bundle; -class Selection extends \Magento\Backend\Controller\Adminhtml\Action +class Selection extends \Magento\Backend\App\Action { public function searchAction() { return $this->getResponse()->setBody( - $this->getLayout() + $this->_view->getLayout() ->createBlock('Magento\Bundle\Block\Adminhtml\Catalog\Product\Edit\Tab\Bundle\Option\Search') ->setIndex($this->getRequest()->getParam('index')) ->setFirstShow(true) @@ -49,7 +49,7 @@ class Selection extends \Magento\Backend\Controller\Adminhtml\Action public function gridAction() { return $this->getResponse()->setBody( - $this->getLayout() + $this->_view->getLayout() ->createBlock('Magento\Bundle\Block\Adminhtml\Catalog\Product\Edit\Tab\Bundle\Option\Search\Grid', 'adminhtml.catalog.product.edit.tab.bundle.option.search.grid') ->setIndex($this->getRequest()->getParam('index')) diff --git a/app/code/Magento/Bundle/Helper/Catalog/Product/Configuration.php b/app/code/Magento/Bundle/Helper/Catalog/Product/Configuration.php index 8cdd59bb70929844791a33f45e3eca7964b01c0f..5e15017a597766b299bf5b503f3ce744aa8e2d4a 100644 --- a/app/code/Magento/Bundle/Helper/Catalog/Product/Configuration.php +++ b/app/code/Magento/Bundle/Helper/Catalog/Product/Configuration.php @@ -33,7 +33,7 @@ */ namespace Magento\Bundle\Helper\Catalog\Product; -class Configuration extends \Magento\Core\Helper\AbstractHelper +class Configuration extends \Magento\App\Helper\AbstractHelper implements \Magento\Catalog\Helper\Product\Configuration\ConfigurationInterface { /** @@ -58,13 +58,13 @@ class Configuration extends \Magento\Core\Helper\AbstractHelper /** * @param \Magento\Catalog\Helper\Product\Configuration $ctlgProdConfigur * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Escaper $escaper */ public function __construct( \Magento\Catalog\Helper\Product\Configuration $ctlgProdConfigur, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Escaper $escaper ) { $this->_ctlgProdConfigur = $ctlgProdConfigur; diff --git a/app/code/Magento/Bundle/Helper/Data.php b/app/code/Magento/Bundle/Helper/Data.php index 75494e422e341f8cc657bc6d6010242242caae0b..9a05a8c0e3759c46f98c70419597a7bc590cb575 100644 --- a/app/code/Magento/Bundle/Helper/Data.php +++ b/app/code/Magento/Bundle/Helper/Data.php @@ -33,7 +33,7 @@ */ namespace Magento\Bundle\Helper; -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { /** * @var \Magento\Catalog\Model\ProductTypes\ConfigInterface @@ -41,11 +41,11 @@ class Data extends \Magento\Core\Helper\AbstractHelper protected $_config; /** - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Catalog\Model\ProductTypes\ConfigInterface $config */ public function __construct( - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Catalog\Model\ProductTypes\ConfigInterface $config ) { $this->_config = $config; diff --git a/app/code/Magento/Bundle/Model/Option.php b/app/code/Magento/Bundle/Model/Option.php index f3779afbd438753bd8a8d055ab666327cfdc69b9..f54b1b858b40863b839d1f57bb565593756defb0 100644 --- a/app/code/Magento/Bundle/Model/Option.php +++ b/app/code/Magento/Bundle/Model/Option.php @@ -74,10 +74,8 @@ class Option extends \Magento\Core\Model\AbstractModel if (!$selection) { return false; } - if (!$selections = $this->getData('selections')) { - $selections = array(); - } - array_push($selections, $selection); + $selections = $this->getDataSetDefault('selections', array()); + $selections[] = $selection; $this->setSelections($selections); return $this; } diff --git a/app/code/Magento/Bundle/Model/Price/Index.php b/app/code/Magento/Bundle/Model/Price/Index.php index dc2d778e9a8b2672094b4c08ed7e015a77d39490..1cd7e914e5c2afcdc9d803f24299aec7d4c5ea95 100644 --- a/app/code/Magento/Bundle/Model/Price/Index.php +++ b/app/code/Magento/Bundle/Model/Price/Index.php @@ -53,12 +53,12 @@ class Index extends \Magento\Core\Model\AbstractModel protected $_customerSession; /** - * @var \Magento\Core\Model\StoreManager + * @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; /** - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry @@ -67,7 +67,7 @@ class Index extends \Magento\Core\Model\AbstractModel * @param array $data */ public function __construct( - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Customer\Model\Session $customerSession, \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, diff --git a/app/code/Magento/Bundle/Model/Product/Type.php b/app/code/Magento/Bundle/Model/Product/Type.php index 8cb10c5d352c21a166430dda1c87f94c2e8baec5..f5a80005dd3ff69c525b2eb486a1cf3fcec78167 100644 --- a/app/code/Magento/Bundle/Model/Product/Type.php +++ b/app/code/Magento/Bundle/Model/Product/Type.php @@ -848,10 +848,10 @@ class Type extends \Magento\Catalog\Model\Product\Type\AbstractType ->addFilterByRequiredOptions() ->setSelectionIdsFilter($selectionIds); - if (!$this->_catalogData->isPriceGlobal() && $storeId) { + if (!$this->_catalogData->isPriceGlobal() && $storeId) { $websiteId = $this->_storeManager->getStore($storeId)->getWebsiteId(); $usedSelections->joinPrices($websiteId); - } + } $product->setData($this->_keyUsedSelections, $usedSelections); $product->setData($this->_keyUsedSelectionsIds, $selectionIds); } diff --git a/app/code/Magento/Captcha/Block/Captcha.php b/app/code/Magento/Captcha/Block/Captcha.php index 3b6128c8818fc3249c99a42c98993b23c66d2edc..7b5596960bf6f7e2320dfd590204cc86be5b2a27 100644 --- a/app/code/Magento/Captcha/Block/Captcha.php +++ b/app/code/Magento/Captcha/Block/Captcha.php @@ -33,7 +33,7 @@ */ namespace Magento\Captcha\Block; -class Captcha extends \Magento\Core\Block\Template +class Captcha extends \Magento\View\Block\Template { /** * Captcha data @@ -43,19 +43,19 @@ class Captcha extends \Magento\Core\Block\Template protected $_captchaData = null; /** - * @param \Magento\Captcha\Helper\Data $captchaData + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context + * @param \Magento\Captcha\Helper\Data $captchaData * @param array $data */ public function __construct( - \Magento\Captcha\Helper\Data $captchaData, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, + \Magento\Captcha\Helper\Data $captchaData, array $data = array() ) { $this->_captchaData = $captchaData; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Captcha/Block/Captcha/DefaultCaptcha.php b/app/code/Magento/Captcha/Block/Captcha/DefaultCaptcha.php index 280f1e8398d161b26247ab5bfddf84b6e9d50d32..d351063c5d9386c02ba865200376aded8b07076e 100644 --- a/app/code/Magento/Captcha/Block/Captcha/DefaultCaptcha.php +++ b/app/code/Magento/Captcha/Block/Captcha/DefaultCaptcha.php @@ -33,7 +33,7 @@ */ namespace Magento\Captcha\Block\Captcha; -class DefaultCaptcha extends \Magento\Core\Block\Template +class DefaultCaptcha extends \Magento\View\Block\Template { protected $_template = 'default.phtml'; @@ -48,27 +48,19 @@ class DefaultCaptcha extends \Magento\Core\Block\Template protected $_captchaData; /** - * @var \Magento\Core\Model\StoreManager - */ - protected $_storeManager; - - /** - * @param \Magento\Captcha\Helper\Data $captchaData + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Captcha\Helper\Data $captchaData * @param array $data */ public function __construct( - \Magento\Captcha\Helper\Data $captchaData, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Captcha\Helper\Data $captchaData, array $data = array() ) { - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); $this->_captchaData = $captchaData; - $this->_storeManager = $storeManager; } /** diff --git a/app/code/Magento/Captcha/Controller/Adminhtml/Refresh.php b/app/code/Magento/Captcha/Controller/Adminhtml/Refresh.php index 62e7149993fa58272b78053e35a9263dd3b0015e..cb474b8933fec6f369486069a022ca9c236de281 100644 --- a/app/code/Magento/Captcha/Controller/Adminhtml/Refresh.php +++ b/app/code/Magento/Captcha/Controller/Adminhtml/Refresh.php @@ -33,7 +33,7 @@ */ namespace Magento\Captcha\Controller\Adminhtml; -class Refresh extends \Magento\Backend\Controller\Adminhtml\Action +class Refresh extends \Magento\Backend\App\Action { /** * Refreshes captcha and returns JSON encoded URL to image (AJAX action) @@ -45,8 +45,12 @@ class Refresh extends \Magento\Backend\Controller\Adminhtml\Action { $formId = $this->getRequest()->getPost('formId'); $captchaModel = $this->_objectManager->get('Magento\Captcha\Helper\Data')->getCaptcha($formId); - $this->getLayout()->createBlock($captchaModel->getBlockName())->setFormId($formId)->setIsAjax(true)->toHtml(); + $this->_view->getLayout() + ->createBlock($captchaModel->getBlockName()) + ->setFormId($formId) + ->setIsAjax(true) + ->toHtml(); $this->getResponse()->setBody(json_encode(array('imgSrc' => $captchaModel->getImgSrc()))); - $this->setFlag('', self::FLAG_NO_POST_DISPATCH, true); + $this->_actionFlag->set('', self::FLAG_NO_POST_DISPATCH, true); } } diff --git a/app/code/Magento/Captcha/Controller/Refresh.php b/app/code/Magento/Captcha/Controller/Refresh.php index 85853acf47056a9e32ee030031507abe744f5974..ee85eb4fca22a950c12b97f42ebd26133df505d4 100644 --- a/app/code/Magento/Captcha/Controller/Refresh.php +++ b/app/code/Magento/Captcha/Controller/Refresh.php @@ -33,7 +33,7 @@ */ namespace Magento\Captcha\Controller; -class Refresh extends \Magento\Core\Controller\Front\Action +class Refresh extends \Magento\App\Action\Action { /** * Refreshes captcha and returns JSON encoded URL to image (AJAX action) @@ -45,8 +45,12 @@ class Refresh extends \Magento\Core\Controller\Front\Action { $formId = $this->getRequest()->getPost('formId'); $captchaModel = $this->_objectManager->get('Magento\Captcha\Helper\Data')->getCaptcha($formId); - $this->getLayout()->createBlock($captchaModel->getBlockName())->setFormId($formId)->setIsAjax(true)->toHtml(); + $this->_view->getLayout() + ->createBlock($captchaModel->getBlockName()) + ->setFormId($formId) + ->setIsAjax(true) + ->toHtml(); $this->getResponse()->setBody(json_encode(array('imgSrc' => $captchaModel->getImgSrc()))); - $this->setFlag('', self::FLAG_NO_POST_DISPATCH, true); + $this->_actionFlag->set('', self::FLAG_NO_POST_DISPATCH, true); } } diff --git a/app/code/Magento/Captcha/Helper/Data.php b/app/code/Magento/Captcha/Helper/Data.php index e045e0d151ab5aa237513b47d634dc998fefed4f..5c0e6ddaa007543d64dbb242f7b0a31731b412ff 100644 --- a/app/code/Magento/Captcha/Helper/Data.php +++ b/app/code/Magento/Captcha/Helper/Data.php @@ -33,7 +33,7 @@ */ namespace Magento\Captcha\Helper; -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { /** * Used for "name" attribute of captcha's input field @@ -82,7 +82,7 @@ class Data extends \Magento\Core\Helper\AbstractHelper protected $_dirs = null; /** - * @var \Magento\Core\Model\StoreManager + * @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; @@ -92,17 +92,17 @@ class Data extends \Magento\Core\Helper\AbstractHelper protected $_factory; /** - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\App\Dir $dirs - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Config $config * @param \Magento\Filesystem $filesystem * @param \Magento\Captcha\Model\CaptchaFactory $factory */ public function __construct( - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\App\Dir $dirs, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Config $config, \Magento\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 225083f4a26029f35ecb86ed321cbf9639c94bfd..28c0ece35a832fb38045f4b106162264d38dddec 100644 --- a/app/code/Magento/Captcha/Model/Observer.php +++ b/app/code/Magento/Captcha/Model/Observer.php @@ -74,7 +74,7 @@ class Observer protected $_request; /** - * @var \Magento\Core\Model\StoreManager + * @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; @@ -94,7 +94,12 @@ class Observer protected $_resLogFactory; /** - * @param \Magento\Captcha\Model\Resource\LogFactory $resLogFactory + * @var \Magento\App\ActionFlag + */ + protected $_actionFlag; + + /** + * @param Resource\LogFactory $resLogFactory * @param \Magento\Core\Model\Session\AbstractSession $session * @param \Magento\Checkout\Model\Type\Onepage $typeOnepage * @param \Magento\Core\Helper\Data $coreData @@ -103,7 +108,8 @@ class Observer * @param \Magento\Core\Model\Url $urlManager * @param \Magento\Filesystem $filesystem * @param \Magento\App\RequestInterface $request - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\App\ActionFlag $actionFlag */ public function __construct( \Magento\Captcha\Model\Resource\LogFactory $resLogFactory, @@ -115,7 +121,8 @@ class Observer \Magento\Core\Model\Url $urlManager, \Magento\Filesystem $filesystem, \Magento\App\RequestInterface $request, - \Magento\Core\Model\StoreManager $storeManager + \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\App\ActionFlag $actionFlag ) { $this->_resLogFactory = $resLogFactory; $this->_session = $session; @@ -127,6 +134,7 @@ class Observer $this->_filesystem = $filesystem; $this->_request = $request; $this->_storeManager = $storeManager; + $this->_actionFlag = $actionFlag; } /** @@ -140,10 +148,11 @@ class Observer $formId = 'user_forgotpassword'; $captchaModel = $this->_helper->getCaptcha($formId); if ($captchaModel->isRequired()) { + /** @var \Magento\App\Action\Action $controller */ $controller = $observer->getControllerAction(); if (!$captchaModel->isCorrect($this->_getCaptchaString($controller->getRequest(), $formId))) { $this->_session->addError(__('Incorrect CAPTCHA')); - $controller->setFlag('', \Magento\Core\Controller\Varien\Action::FLAG_NO_DISPATCH, true); + $this->_actionFlag->set('', \Magento\App\Action\Action::FLAG_NO_DISPATCH, true); $controller->getResponse()->setRedirect($this->_urlManager->getUrl('*/*/forgotpassword')); } } @@ -163,7 +172,7 @@ class Observer $controller = $observer->getControllerAction(); if (!$captcha->isCorrect($this->_getCaptchaString($controller->getRequest(), $formId))) { $this->_session->addError(__('Incorrect CAPTCHA.')); - $controller->setFlag('', \Magento\Core\Controller\Varien\Action::FLAG_NO_DISPATCH, true); + $this->_actionFlag->set('', \Magento\App\Action\Action::FLAG_NO_DISPATCH, true); $controller->getResponse()->setRedirect($this->_urlManager->getUrl('contacts/index/index')); } } @@ -186,7 +195,7 @@ class Observer $word = $this->_getCaptchaString($controller->getRequest(), $formId); if (!$captchaModel->isCorrect($word)) { $this->_session->addError(__('Incorrect CAPTCHA')); - $controller->setFlag('', \Magento\Core\Controller\Varien\Action::FLAG_NO_DISPATCH, true); + $this->_actionFlag->set('', \Magento\App\Action\Action::FLAG_NO_DISPATCH, true); $this->_session->setUsername($login); $beforeUrl = $this->_session->getBeforeAuthUrl(); $url = $beforeUrl ? $beforeUrl : $this->_customerData->getLoginUrl(); @@ -211,7 +220,7 @@ class Observer $controller = $observer->getControllerAction(); if (!$captchaModel->isCorrect($this->_getCaptchaString($controller->getRequest(), $formId))) { $this->_session->addError(__('Incorrect CAPTCHA')); - $controller->setFlag('', \Magento\Core\Controller\Varien\Action::FLAG_NO_DISPATCH, true); + $this->_actionFlag->set('', \Magento\App\Action\Action::FLAG_NO_DISPATCH, true); $this->_session->setCustomerFormData($controller->getRequest()->getPost()); $controller->getResponse()->setRedirect($this->_urlManager->getUrl('*/*/create')); } @@ -234,7 +243,7 @@ class Observer if ($captchaModel->isRequired()) { $controller = $observer->getControllerAction(); if (!$captchaModel->isCorrect($this->_getCaptchaString($controller->getRequest(), $formId))) { - $controller->setFlag('', \Magento\Core\Controller\Varien\Action::FLAG_NO_DISPATCH, true); + $this->_actionFlag->set('', \Magento\App\Action\Action::FLAG_NO_DISPATCH, true); $result = array('error' => 1, 'message' => __('Incorrect CAPTCHA')); $controller->getResponse()->setBody($this->_coreData->jsonEncode($result)); } @@ -258,7 +267,7 @@ class Observer if ($captchaModel->isRequired()) { $controller = $observer->getControllerAction(); if (!$captchaModel->isCorrect($this->_getCaptchaString($controller->getRequest(), $formId))) { - $controller->setFlag('', \Magento\Core\Controller\Varien\Action::FLAG_NO_DISPATCH, true); + $this->_actionFlag->set('', \Magento\App\Action\Action::FLAG_NO_DISPATCH, true); $result = array('error' => 1, 'message' => __('Incorrect CAPTCHA')); $controller->getResponse()->setBody($this->_coreData->jsonEncode($result)); } @@ -309,7 +318,7 @@ class Observer if ($captchaModel->isRequired()) { if (!$captchaModel->isCorrect($this->_getCaptchaString($controller->getRequest(), $formId))) { $this->_session->setEmail((string) $controller->getRequest()->getPost('email')); - $controller->setFlag('', \Magento\Core\Controller\Varien\Action::FLAG_NO_DISPATCH, true); + $this->_actionFlag->set('', \Magento\App\Action\Action::FLAG_NO_DISPATCH, true); $this->_session->addError(__('Incorrect CAPTCHA')); $controller->getResponse() ->setRedirect($controller->getUrl('*/*/forgotpassword', array('_nosecret' => true))); diff --git a/app/code/Magento/Captcha/etc/events.xml b/app/code/Magento/Captcha/etc/events.xml index dc8c14352923f29173f2bbba1e7b4ae6c4de5322..1f10660d1a4ae7b085b1702593f7e24526b4e439 100644 --- a/app/code/Magento/Captcha/etc/events.xml +++ b/app/code/Magento/Captcha/etc/events.xml @@ -30,6 +30,9 @@ <event name="controller_action_predispatch_customer_account_createpost"> <observer name="captcha" instance="Magento\Captcha\Model\Observer" method="checkUserCreate" /> </event> + <event name="controller_action_predispatch_customer_account_forgotpasswordpost"> + <observer name="captcha" instance="Magento\Captcha\Model\Observer" method="checkForgotpassword"/> + </event> <event name="admin_user_authenticate_before"> <observer name="captcha" instance="Magento\Captcha\Model\Observer" method="checkUserLoginBackend" /> </event> diff --git a/app/code/Magento/Captcha/view/adminhtml/default.phtml b/app/code/Magento/Captcha/view/adminhtml/default.phtml index 74546ec24f7670f60be1f2acaa4cee325d81c667..fbed441fcf830aad36e9e8cb7cfda604ddf85fe6 100644 --- a/app/code/Magento/Captcha/view/adminhtml/default.phtml +++ b/app/code/Magento/Captcha/view/adminhtml/default.phtml @@ -18,14 +18,13 @@ * 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_Captcha * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> +<?php /* @var $captcha \Magento\Captcha\Model\DefaultModel */ ?> +<?php /* @var $this \Magento\Captcha\Block\Captcha\DefaultCaptcha */ ?> <?php $captcha = $this->getCaptchaModel() ?> -<?php /* @var $this \Magento\Core\Block_Captcha_Default */ ?> <div class="clear"></div> <div class="captcha"> <div class="captcha-input input-box input-left"> diff --git a/app/code/Magento/Captcha/view/frontend/default.phtml b/app/code/Magento/Captcha/view/frontend/default.phtml index 86746491042cd6a584b1cb563e281e83333f9607..0972ed6b57f48504db65749753d544def25ecc0d 100644 --- a/app/code/Magento/Captcha/view/frontend/default.phtml +++ b/app/code/Magento/Captcha/view/frontend/default.phtml @@ -23,9 +23,8 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> +<?php /* @var $captcha \Magento\Captcha\Model\DefaultModel */ ?> <?php /* @var $this \Magento\Captcha\Block\Captcha\DefaultCaptcha */ ?> - -<?php /* @var $captcha \Magento\Captcha\Model\ModelInterface */ ?> <?php $captcha = $this->getCaptchaModel() ?> <div class="field captcha required" role="<?php echo $this->getFormId()?>"> <label for="captcha_<?php echo $this->getFormId() ?>" class="label"><span><?php echo __('Please type the letters below')?></span></label> diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Category/AbstractCategory.php b/app/code/Magento/Catalog/Block/Adminhtml/Category/AbstractCategory.php index 19d4b52f364c1f06e28b730e31d29807efe25176..19db3f966ca289b23f61b0b512d64d3b248c2fc1 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Category/AbstractCategory.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Category/AbstractCategory.php @@ -47,23 +47,23 @@ class AbstractCategory extends \Magento\Backend\Block\Template */ protected $_categoryTree; - /** - * @param \Magento\Catalog\Model\Resource\Category\Tree $categoryTree - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Catalog\Model\Resource\Category\Tree $categoryTree + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Catalog\Model\Resource\Category\Tree $categoryTree, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Catalog\Model\Resource\Category\Tree $categoryTree, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_categoryTree = $categoryTree; $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** 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 cc5e2ffd7faa8e678dbca3a1c6caffddbf5b86d3..1164f299018f6675d9f452f2fbcaa98426261985 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Category/Helper/Image.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Category/Helper/Image.php @@ -36,12 +36,12 @@ namespace Magento\Catalog\Block\Adminhtml\Category\Helper; class Image extends \Magento\Data\Form\Element\Image { /** - * @var \Magento\Core\Model\StoreManager + * @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; /** - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Escaper $escaper * @param \Magento\Data\Form\Element\Factory $factoryElement * @param \Magento\Data\Form\Element\CollectionFactory $factoryCollection @@ -49,7 +49,7 @@ class Image extends \Magento\Data\Form\Element\Image * @param array $attributes */ public function __construct( - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Escaper $escaper, \Magento\Data\Form\Element\Factory $factoryElement, \Magento\Data\Form\Element\CollectionFactory $factoryCollection, diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Category/Tab/Attributes.php b/app/code/Magento/Catalog/Block/Adminhtml/Category/Tab/Attributes.php index 4b5167e61b5d4658fb9e86fda967f5370923ef4a..6ff20d407aefbd9786ad4b819ffdf8f33e5b73d9 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Category/Tab/Attributes.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Category/Tab/Attributes.php @@ -41,24 +41,24 @@ class Attributes extends \Magento\Backend\Block\Widget\Form\Generic */ protected $_wysiwygConfig; - /** - * @param \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig + * @param array $data */ - public function __construct( - \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig, + array $data = array() + ) { $this->_wysiwygConfig = $wysiwygConfig; - parent::__construct($registry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); } /** 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 402212ca660cd835c733cf39853574f9167e1f12..e073a3782af50f7cef44bc0d02326ca58137012b 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Category/Tab/Product.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Category/Tab/Product.php @@ -47,27 +47,25 @@ class Product extends \Magento\Backend\Block\Widget\Grid\Extended */ protected $_productFactory; - /** - * @param \Magento\Catalog\Model\ProductFactory $productFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param \Magento\Core\Model\Registry $coreRegistry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Catalog\Model\ProductFactory $productFactory + * @param \Magento\Core\Model\Registry $coreRegistry + * @param array $data */ - public function __construct( - \Magento\Catalog\Model\ProductFactory $productFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - \Magento\Core\Model\Registry $coreRegistry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Catalog\Model\ProductFactory $productFactory, + \Magento\Core\Model\Registry $coreRegistry, + array $data = array() + ) { $this->_productFactory = $productFactory; $this->_coreRegistry = $coreRegistry; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $data); } protected function _construct() diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Category/Tabs.php b/app/code/Magento/Catalog/Block/Adminhtml/Category/Tabs.php index d3bf8962556374a795030b1e3f4df006d46426a1..3c8f365f731d7b3767f554388a588cf3b6886db4 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Category/Tabs.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Category/Tabs.php @@ -59,28 +59,28 @@ class Tabs extends \Magento\Backend\Block\Widget\Tabs */ protected $_collectionFactory; - /** - * @param \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory $collectionFactory - * @param \Magento\Catalog\Helper\Catalog $helperCatalog - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Backend\Model\Auth\Session $authSession - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Backend\Model\Auth\Session $authSession + * @param \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory $collectionFactory + * @param \Magento\Catalog\Helper\Catalog $helperCatalog + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory $collectionFactory, - \Magento\Catalog\Helper\Catalog $helperCatalog, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Backend\Model\Auth\Session $authSession, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Backend\Model\Auth\Session $authSession, + \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory $collectionFactory, + \Magento\Catalog\Helper\Catalog $helperCatalog, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_collectionFactory = $collectionFactory; $this->_coreRegistry = $registry; $this->_helperCatalog = $helperCatalog; - parent::__construct($coreData, $context, $authSession, $data); + parent::__construct($context, $coreData, $authSession, $data); } /** diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Category/Tree.php b/app/code/Magento/Catalog/Block/Adminhtml/Category/Tree.php index 02a82ea70deee4a2437549991fd56f075f2fc945..8d50e246bb59bdcfb366d5da216bda61c9410d80 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Category/Tree.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Category/Tree.php @@ -55,30 +55,30 @@ class Tree extends \Magento\Catalog\Block\Adminhtml\Category\AbstractCategory */ protected $_helperPool; - /** - * @param \Magento\Core\Model\Resource\HelperPool $helperPool - * @param \Magento\Backend\Model\Auth\Session $backendSession - * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory - * @param \Magento\Catalog\Model\Resource\Category\Tree $categoryTree - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Catalog\Model\Resource\Category\Tree $categoryTree + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Core\Model\Resource\HelperPool $helperPool + * @param \Magento\Backend\Model\Auth\Session $backendSession + * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory + * @param array $data */ - public function __construct( - \Magento\Core\Model\Resource\HelperPool $helperPool, - \Magento\Backend\Model\Auth\Session $backendSession, - \Magento\Catalog\Model\CategoryFactory $categoryFactory, - \Magento\Catalog\Model\Resource\Category\Tree $categoryTree, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Catalog\Model\Resource\Category\Tree $categoryTree, + \Magento\Core\Model\Registry $registry, + \Magento\Core\Model\Resource\HelperPool $helperPool, + \Magento\Backend\Model\Auth\Session $backendSession, + \Magento\Catalog\Model\CategoryFactory $categoryFactory, + array $data = array() + ) { $this->_helperPool = $helperPool; $this->_backendSession = $backendSession; $this->_categoryFactory = $categoryFactory; - parent::__construct($categoryTree, $coreData, $context, $registry, $data); + parent::__construct($context, $coreData, $categoryTree, $registry, $data); } protected function _construct() diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Form/Renderer/Attribute/Urlkey.php b/app/code/Magento/Catalog/Block/Adminhtml/Form/Renderer/Attribute/Urlkey.php index 2f1c035d736746a1e1fd891c796b74020af19157..a1cf464d6d051e399b6583ed34bcdff41f58aeb3 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Form/Renderer/Attribute/Urlkey.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Form/Renderer/Attribute/Urlkey.php @@ -50,23 +50,23 @@ class Urlkey */ protected $_elementFactory; - /** - * @param \Magento\Data\Form\Element\Factory $elementFactory - * @param \Magento\Catalog\Helper\Data $catalogData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Data\Form\Element\Factory $elementFactory + * @param \Magento\Catalog\Helper\Data $catalogData + * @param array $data */ - public function __construct( - \Magento\Data\Form\Element\Factory $elementFactory, - \Magento\Catalog\Helper\Data $catalogData, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Data\Form\Element\Factory $elementFactory, + \Magento\Catalog\Helper\Data $catalogData, + array $data = array() + ) { $this->_elementFactory = $elementFactory; $this->_catalogData = $catalogData; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } public function getElementHtml() diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Helper/Form/Wysiwyg/Content.php b/app/code/Magento/Catalog/Block/Adminhtml/Helper/Form/Wysiwyg/Content.php index 1f7482f935bc04612a8576fac9e7efc8036e472a..c5b898f710ddbc2c307ec0c332cc5f9bd1f24c1d 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Helper/Form/Wysiwyg/Content.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Helper/Form/Wysiwyg/Content.php @@ -41,24 +41,24 @@ class Content */ protected $_wysiwygConfig; - /** - * @param \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig + * @param array $data */ - public function __construct( - \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig, + array $data = array() + ) { $this->_wysiwygConfig = $wysiwygConfig; - parent::__construct($registry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); } /** diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product.php b/app/code/Magento/Catalog/Block/Adminhtml/Product.php index 3fccf671cb533650ae5d274c692d51ffd62a3d95..f7aac690456ba119cac43ece28b22b8b429a65ea 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product.php @@ -47,24 +47,24 @@ class Product extends \Magento\Adminhtml\Block\Widget\Container */ protected $_productFactory; - /** - * @param \Magento\Catalog\Model\Product\TypeFactory $typeFactory - * @param \Magento\Catalog\Model\ProductFactory $productFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Catalog\Model\Product\TypeFactory $typeFactory + * @param \Magento\Catalog\Model\ProductFactory $productFactory + * @param array $data */ - public function __construct( - \Magento\Catalog\Model\Product\TypeFactory $typeFactory, - \Magento\Catalog\Model\ProductFactory $productFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Catalog\Model\Product\TypeFactory $typeFactory, + \Magento\Catalog\Model\ProductFactory $productFactory, + array $data = array() + ) { $this->_productFactory = $productFactory; $this->_typeFactory = $typeFactory; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit.php index a4f227816cc7f57beea4699147d040930f5738c9..b4f277ec399623eb5643ecf66858a429d06aee37 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit.php @@ -46,20 +46,20 @@ class Edit extends \Magento\Backend\Block\Widget\Form\Container */ protected $_coreRegistry = null; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _construct() diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Advanced.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Advanced.php index 2201dece316de755ccf0bc3eff1a7b9021b1ae96..baa0d5a08c1071c2509e520b0bf6d83db7ca9e58 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Advanced.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Advanced.php @@ -49,27 +49,27 @@ class Advanced */ protected $_yesNo; - /** - * @param \Magento\Backend\Model\Config\Source\Yesno $yesNo - * @param \Magento\Eav\Helper\Data $eavData - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Backend\Model\Config\Source\Yesno $yesNo + * @param \Magento\Eav\Helper\Data $eavData + * @param array $data */ - public function __construct( - \Magento\Backend\Model\Config\Source\Yesno $yesNo, - \Magento\Eav\Helper\Data $eavData, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Backend\Model\Config\Source\Yesno $yesNo, + \Magento\Eav\Helper\Data $eavData, + array $data = array() + ) { $this->_yesNo = $yesNo; $this->_eavData = $eavData; - parent::__construct($registry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); } /** diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Front.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Front.php index c9cf6f1571e7c42a1534a1202bae434de6f17860..dc181e2577447f179ab1c17197ecd4f2ab44f8f5 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Front.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Front.php @@ -42,24 +42,24 @@ class Front */ protected $_yesNo; - /** - * @param \Magento\Backend\Model\Config\Source\Yesno $yesNo - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Backend\Model\Config\Source\Yesno $yesNo + * @param array $data */ - public function __construct( - \Magento\Backend\Model\Config\Source\Yesno $yesNo, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Backend\Model\Config\Source\Yesno $yesNo, + array $data = array() + ) { $this->_yesNo = $yesNo; - parent::__construct($registry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); } /** 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 3ddc8d332631204542326b3a65e5c35201750db3..b53a3bf69a674aca016a946b4d0211ea95534c11 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Grid.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Grid.php @@ -40,25 +40,23 @@ class Grid extends \Magento\Eav\Block\Adminhtml\Attribute\Grid\AbstractGrid */ protected $_collectionFactory; - /** - * @param \Magento\Catalog\Model\Resource\Product\Attribute\CollectionFactory $collectionFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Catalog\Model\Resource\Product\Attribute\CollectionFactory $collectionFactory + * @param array $data */ - public function __construct( - \Magento\Catalog\Model\Resource\Product\Attribute\CollectionFactory $collectionFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Catalog\Model\Resource\Product\Attribute\CollectionFactory $collectionFactory, + array $data = array() + ) { $this->_collectionFactory = $collectionFactory; $this->_module = 'catalog'; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $data); } /** diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/NewAttribute/Product/Created.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/NewAttribute/Product/Created.php index ef822d317db1dbbbef3a2a44e5749fbe0cd0693f..cc3d422af242c99bff38db5b61d0dea3e279e389 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/NewAttribute/Product/Created.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/NewAttribute/Product/Created.php @@ -55,26 +55,26 @@ class Created extends \Magento\Backend\Block\Widget */ protected $_setFactory; - /** - * @param \Magento\Eav\Model\Entity\Attribute\SetFactory $setFactory - * @param \Magento\Eav\Model\Entity\AttributeFactory $attributeFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Eav\Model\Entity\Attribute\SetFactory $setFactory + * @param \Magento\Eav\Model\Entity\AttributeFactory $attributeFactory + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Eav\Model\Entity\Attribute\SetFactory $setFactory, - \Magento\Eav\Model\Entity\AttributeFactory $attributeFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Eav\Model\Entity\Attribute\SetFactory $setFactory, + \Magento\Eav\Model\Entity\AttributeFactory $attributeFactory, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_setFactory = $setFactory; $this->_attributeFactory = $attributeFactory; $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main.php index 97c20a3d2b5f95876761905e63a947f24fecb71c..5b12d7246000980bcec929d19b69e4712b8250a5 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main.php @@ -71,35 +71,35 @@ class Main extends \Magento\Backend\Block\Template */ protected $_attributeFactory; - /** - * @param \Magento\Eav\Model\Entity\TypeFactory $typeFactory - * @param \Magento\Eav\Model\Entity\Attribute\GroupFactory $groupFactory - * @param \Magento\Catalog\Model\Resource\Product\Type\Configurable\AttributeFactory $attributeFactory - * @param \Magento\Catalog\Model\Resource\Product\Attribute\CollectionFactory $collectionFactory - * @param \Magento\Catalog\Helper\Product $catalogProduct - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Eav\Model\Entity\TypeFactory $typeFactory + * @param \Magento\Eav\Model\Entity\Attribute\GroupFactory $groupFactory + * @param \Magento\Catalog\Model\Resource\Product\Type\Configurable\AttributeFactory $attributeFactory + * @param \Magento\Catalog\Model\Resource\Product\Attribute\CollectionFactory $collectionFactory + * @param \Magento\Catalog\Helper\Product $catalogProduct + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Eav\Model\Entity\TypeFactory $typeFactory, - \Magento\Eav\Model\Entity\Attribute\GroupFactory $groupFactory, - \Magento\Catalog\Model\Resource\Product\Type\Configurable\AttributeFactory $attributeFactory, - \Magento\Catalog\Model\Resource\Product\Attribute\CollectionFactory $collectionFactory, - \Magento\Catalog\Helper\Product $catalogProduct, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Eav\Model\Entity\TypeFactory $typeFactory, + \Magento\Eav\Model\Entity\Attribute\GroupFactory $groupFactory, + \Magento\Catalog\Model\Resource\Product\Type\Configurable\AttributeFactory $attributeFactory, + \Magento\Catalog\Model\Resource\Product\Attribute\CollectionFactory $collectionFactory, + \Magento\Catalog\Helper\Product $catalogProduct, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_typeFactory = $typeFactory; $this->_groupFactory = $groupFactory; $this->_attributeFactory = $attributeFactory; $this->_collectionFactory = $collectionFactory; $this->_coreRegistry = $registry; $this->_catalogProduct = $catalogProduct; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main/Formgroup.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main/Formgroup.php index e283eb0ff0984a6ce727360321b6e07e6a13ec48..59a0ab8609e818955e66986fe3d88af1d9e8dbad 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main/Formgroup.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main/Formgroup.php @@ -40,24 +40,24 @@ class Formgroup */ protected $_typeFactory; - /** - * @param \Magento\Eav\Model\Entity\TypeFactory $typeFactory - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Eav\Model\Entity\TypeFactory $typeFactory + * @param array $data */ - public function __construct( - \Magento\Eav\Model\Entity\TypeFactory $typeFactory, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Eav\Model\Entity\TypeFactory $typeFactory, + array $data = array() + ) { $this->_typeFactory = $typeFactory; - parent::__construct($registry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); } protected function _prepareForm() diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main/Formset.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main/Formset.php index b7d1f94d04d7455bbca42e122cb32c0832d5d25e..0828ebbab7885209886562e8d5a15ab21d1fdd11 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main/Formset.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main/Formset.php @@ -34,24 +34,24 @@ class Formset */ protected $_setFactory; - /** - * @param \Magento\Eav\Model\Entity\Attribute\SetFactory $setFactory - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Eav\Model\Entity\Attribute\SetFactory $setFactory + * @param array $data */ - public function __construct( - \Magento\Eav\Model\Entity\Attribute\SetFactory $setFactory, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Eav\Model\Entity\Attribute\SetFactory $setFactory, + array $data = array() + ) { $this->_setFactory = $setFactory; - parent::__construct($registry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); } /** diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Toolbar/Main/Filter.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Toolbar/Main/Filter.php index 31f542e8be672a6320b51b7c57eb49936b701816..2cf4226a935b1ede04fe296c41ab839aefb12705 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Toolbar/Main/Filter.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Toolbar/Main/Filter.php @@ -40,24 +40,24 @@ class Filter */ protected $_setFactory; - /** - * @param \Magento\Eav\Model\Entity\Attribute\SetFactory $setFactory - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Eav\Model\Entity\Attribute\SetFactory $setFactory + * @param array $data */ - public function __construct( - \Magento\Eav\Model\Entity\Attribute\SetFactory $setFactory, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Eav\Model\Entity\Attribute\SetFactory $setFactory, + array $data = array() + ) { $this->_setFactory = $setFactory; - parent::__construct($registry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); } protected function _prepareForm() diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Composite/Configure.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Composite/Configure.php index 667e8196b3554809b3de428ab7f35b0e7c9c4cb0..2dc36feddfbdc11c0c375a097db1bca8cbb8a9d7 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Composite/Configure.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Composite/Configure.php @@ -54,23 +54,23 @@ class Configure extends \Magento\Adminhtml\Block\Widget */ protected $_catalogProduct; - /** - * @param \Magento\Catalog\Model\Product $product - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Catalog\Model\Product $product + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Catalog\Model\Product $product, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Catalog\Model\Product $product, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_catalogProduct = $product; $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Composite/Error.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Composite/Error.php index 7bab6937961b28f778c6a1a09cef3a9850454e13..d005b8634784ae9a24f3650e97175463a049bced 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Composite/Error.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Composite/Error.php @@ -33,7 +33,7 @@ */ namespace Magento\Catalog\Block\Adminhtml\Product\Composite; -class Error extends \Magento\Core\Block\Template +class Error extends \Magento\View\Block\Template { /** * Core registry @@ -42,20 +42,20 @@ class Error extends \Magento\Core\Block\Template */ protected $_coreRegistry = null; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Composite/Fieldset.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Composite/Fieldset.php index 55f915ebac8b136561fca41ad713b23055111c6b..bb81640b271ccb6bb6aab5483003e126c0daf479 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Composite/Fieldset.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Composite/Fieldset.php @@ -33,7 +33,7 @@ */ namespace Magento\Catalog\Block\Adminhtml\Product\Composite; -class Fieldset extends \Magento\Core\Block\Text\ListText +class Fieldset extends \Magento\View\Block\Text\ListText { /** * @@ -47,7 +47,7 @@ class Fieldset extends \Magento\Core\Block\Text\ListText $total = count($children); $i = 0; $this->setText(''); - /** @var $block \Magento\Core\Block\AbstractBlock */ + /** @var $block \Magento\View\Block\AbstractBlock */ foreach ($children as $block) { $i++; $block->setIsLastFieldset($i == $total); diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Composite/Fieldset/Grouped.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Composite/Fieldset/Grouped.php index 57dd6fe48ba3c41dafebcca53f22f9caa4e37e14..ed712a68f64c141f454b828856b3d08e35b6d452 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Composite/Fieldset/Grouped.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Composite/Fieldset/Grouped.php @@ -40,26 +40,24 @@ class Grouped protected $_priceBlockDefaultTemplate = 'catalog/product/price.phtml'; /** - * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\View\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Catalog\Model\Config $catalogConfig - * @param \Magento\Core\Model\Registry $coreRegistry + * @param \Magento\Core\Model\Registry $registry * @param \Magento\Tax\Helper\Data $taxData * @param \Magento\Catalog\Helper\Data $catalogData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Math\Random $mathRandom * @param \Magento\Stdlib\ArrayUtils $arrayUtils * @param \Magento\Tax\Model\Calculation $taxCalculation * @param array $data */ public function __construct( - \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\View\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Catalog\Model\Config $catalogConfig, - \Magento\Core\Model\Registry $coreRegistry, + \Magento\Core\Model\Registry $registry, \Magento\Tax\Helper\Data $taxData, \Magento\Catalog\Helper\Data $catalogData, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Math\Random $mathRandom, \Magento\Stdlib\ArrayUtils $arrayUtils, \Magento\Tax\Model\Calculation $taxCalculation, @@ -67,16 +65,7 @@ class Grouped ) { $this->_taxCalculation = $taxCalculation; parent::__construct( - $storeManager, - $catalogConfig, - $coreRegistry, - $taxData, - $catalogData, - $coreData, - $context, - $mathRandom, - $arrayUtils, - $data + $context, $coreData, $catalogConfig, $registry, $taxData, $catalogData, $mathRandom, $arrayUtils, $data ); } diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Composite/Fieldset/Qty.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Composite/Fieldset/Qty.php index 5ad377bfe6a780da30dc8359cc2e9644c62e96bd..10318696be4f4daf0c8e3e322b0aeec17c4f3b97 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Composite/Fieldset/Qty.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Composite/Fieldset/Qty.php @@ -29,7 +29,7 @@ */ namespace Magento\Catalog\Block\Adminhtml\Product\Composite\Fieldset; -class Qty extends \Magento\Core\Block\Template +class Qty extends \Magento\View\Block\Template { /** * Core registry @@ -38,20 +38,20 @@ class Qty extends \Magento\Core\Block\Template */ protected $_coreRegistry = null; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Composite/Update/Result.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Composite/Update/Result.php index 34d75a06bbd1d8c2b01e45da555b160acd0b21f4..dde58155e8055bae661e4b9a6b0b3a5c50a22411 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Composite/Update/Result.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Composite/Update/Result.php @@ -35,7 +35,7 @@ */ namespace Magento\Catalog\Block\Adminhtml\Product\Composite\Update; -class Result extends \Magento\Core\Block\Template +class Result extends \Magento\View\Block\Template { /** * Adminhtml js @@ -51,23 +51,23 @@ class Result extends \Magento\Core\Block\Template */ protected $_coreRegistry = null; - /** - * @param \Magento\Adminhtml\Helper\Js $adminhtmlJs - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Adminhtml\Helper\Js $adminhtmlJs + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Adminhtml\Helper\Js $adminhtmlJs, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Adminhtml\Helper\Js $adminhtmlJs, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_adminhtmlJs = $adminhtmlJs; $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Created.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Created.php index 9f593f53a8580245665e23f8ab870b88f08f9b69..94993e6faf3f11ef319c759cfe72de4913c8a30a 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Created.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Created.php @@ -48,20 +48,20 @@ class Created extends \Magento\Adminhtml\Block\Widget */ protected $_productFactory; - /** - * @param \Magento\Catalog\Model\ProductFactory $productFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Catalog\Model\ProductFactory $productFactory + * @param array $data */ - public function __construct( - \Magento\Catalog\Model\ProductFactory $productFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Catalog\Model\ProductFactory $productFactory, + array $data = array() + ) { $this->_productFactory = $productFactory; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _prepareLayout() diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit.php index fefd6246b43626c0657c9e75132c2e9c692aae54..3f4a8026e08e666dac392b6df2fceddca40fae35 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit.php @@ -49,23 +49,23 @@ class Edit extends \Magento\Backend\Block\Widget */ protected $_attributeSetFactory; - /** - * @param \Magento\Eav\Model\Entity\Attribute\SetFactory $attributeSetFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Eav\Model\Entity\Attribute\SetFactory $attributeSetFactory + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Eav\Model\Entity\Attribute\SetFactory $attributeSetFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Eav\Model\Entity\Attribute\SetFactory $attributeSetFactory, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_attributeSetFactory = $attributeSetFactory; $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _construct() diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Action/Attribute.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Action/Attribute.php index 35cc3d1dd58d9731507385168f50aecfa996ce6b..a3518827035d6e4d34977c35d44b9ebf9b72c9fe 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Action/Attribute.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Action/Attribute.php @@ -44,20 +44,20 @@ class Attribute extends \Magento\Adminhtml\Block\Widget */ protected $_helperActionAttribute = null; - /** - * @param \Magento\Catalog\Helper\Product\Edit\Action\Attribute $helperActionAttribute - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Catalog\Helper\Product\Edit\Action\Attribute $helperActionAttribute + * @param array $data */ - public function __construct( - \Magento\Catalog\Helper\Product\Edit\Action\Attribute $helperActionAttribute, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Catalog\Helper\Product\Edit\Action\Attribute $helperActionAttribute, + array $data = array() + ) { $this->_helperActionAttribute = $helperActionAttribute; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _prepareLayout() diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Action/Attribute/Tab/Attributes.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Action/Attribute/Tab/Attributes.php index 63a3b96a4427e5b64571a91a631ad247134ce4c7..bbf5f15c66d969736cb6b29b360e0bb1c8fed466 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Action/Attribute/Tab/Attributes.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Action/Attribute/Tab/Attributes.php @@ -43,24 +43,24 @@ class Attributes */ protected $_productFactory; - /** - * @param \Magento\Catalog\Model\ProductFactory $productFactory - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Catalog\Model\ProductFactory $productFactory + * @param array $data */ - public function __construct( - \Magento\Catalog\Model\ProductFactory $productFactory, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Catalog\Model\ProductFactory $productFactory, + array $data = array() + ) { $this->_productFactory = $productFactory; - parent::__construct($registry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); } protected function _construct() diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Action/Attribute/Tab/Inventory.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Action/Attribute/Tab/Inventory.php index 85cb43ba9dc46920af8ae009e480e674abb987ca..16707d06ac980c584718692f80e9cd4d18d86164 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Action/Attribute/Tab/Inventory.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Action/Attribute/Tab/Inventory.php @@ -42,20 +42,20 @@ class Inventory */ protected $_backorders; - /** - * @param \Magento\CatalogInventory\Model\Source\Backorders $backorders - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\CatalogInventory\Model\Source\Backorders $backorders + * @param array $data */ - public function __construct( - \Magento\CatalogInventory\Model\Source\Backorders $backorders, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\CatalogInventory\Model\Source\Backorders $backorders, + array $data = array() + ) { $this->_backorders = $backorders; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/AttributeSet.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/AttributeSet.php index a6a76c898ab7810d20358eeabdd303ff806b1e99..480a1f8e60f4528c222e3e470eae7f6ae1348cb0 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/AttributeSet.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/AttributeSet.php @@ -42,20 +42,20 @@ class AttributeSet extends \Magento\Backend\Block\Widget\Form */ protected $_coreRegistry = null; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Js.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Js.php index 4888ebc2875fd428d37965c4fa40b2aee3c92de9..f18d195891e5b56add094c4a3d985dc0112ae27a 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Js.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Js.php @@ -35,20 +35,20 @@ class Js extends \Magento\Adminhtml\Block\Template */ protected $_coreRegistry = null; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/NewCategory.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/NewCategory.php index 4045d0db1f74090cd52dfc9b14754d6fdf93fe01..ce1b092e0ab312dd6151f54c68cff172f573c13a 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/NewCategory.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/NewCategory.php @@ -38,23 +38,23 @@ namespace Magento\Catalog\Block\Adminhtml\Product\Edit; */ class NewCategory extends \Magento\Backend\Block\Widget\Form\Generic { - /** - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory + * @param array $data */ - public function __construct( - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Catalog\Model\CategoryFactory $categoryFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { - parent::__construct($registry, $formFactory, $coreData, $context, $data); + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Catalog\Model\CategoryFactory $categoryFactory, + array $data = array() + ) { + parent::__construct($context, $coreData, $registry, $formFactory, $data); $this->setUseContainer(true); $this->_categoryFactory = $categoryFactory; } diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Ajax/Serializer.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Ajax/Serializer.php index 044371b065423edf3558d5fc387366d6b005c710..9e62dda5b001bfaec91521f12e2e8f8f89dae79b 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Ajax/Serializer.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Ajax/Serializer.php @@ -25,7 +25,7 @@ */ namespace Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Ajax; -class Serializer extends \Magento\Core\Block\Template +class Serializer extends \Magento\View\Block\Template { public function _construct() { 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 3c0bdf702a98873a581379cac7f433b1d5ad3d62..e705bb1ceb3c7e5c761cf03d3e912c13e0ee48f4 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 @@ -48,27 +48,25 @@ class Price extends \Magento\Adminhtml\Block\Widget\Grid */ protected $_priceFactory; - /** - * @param \Magento\ProductAlert\Model\PriceFactory $priceFactory - * @param \Magento\Catalog\Helper\Data $catalogData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\ProductAlert\Model\PriceFactory $priceFactory + * @param \Magento\Catalog\Helper\Data $catalogData + * @param array $data */ - public function __construct( - \Magento\ProductAlert\Model\PriceFactory $priceFactory, - \Magento\Catalog\Helper\Data $catalogData, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\ProductAlert\Model\PriceFactory $priceFactory, + \Magento\Catalog\Helper\Data $catalogData, + array $data = array() + ) { $this->_priceFactory = $priceFactory; $this->_catalogData = $catalogData; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $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 ff9081f8f5c5bd86c3e82ebf51972eca746a0caf..7460e9d1fbb134b75a18658fe6d16843de68a1d7 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 @@ -48,27 +48,25 @@ class Stock extends \Magento\Adminhtml\Block\Widget\Grid */ protected $_stockFactory; - /** - * @param \Magento\ProductAlert\Model\StockFactory $stockFactory - * @param \Magento\Catalog\Helper\Data $catalogData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\ProductAlert\Model\StockFactory $stockFactory + * @param \Magento\Catalog\Helper\Data $catalogData + * @param array $data */ - public function __construct( - \Magento\ProductAlert\Model\StockFactory $stockFactory, - \Magento\Catalog\Helper\Data $catalogData, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\ProductAlert\Model\StockFactory $stockFactory, + \Magento\Catalog\Helper\Data $catalogData, + array $data = array() + ) { $this->_stockFactory = $stockFactory; $this->_catalogData = $catalogData; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $data); } protected function _construct() diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Attributes.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Attributes.php index d00d21075d6c0ffbb0ffa7a518fe806e32023668..f2960deaa20887bd8aadeccb96b118da9eb42c02 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Attributes.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Attributes.php @@ -47,27 +47,27 @@ class Attributes extends \Magento\Catalog\Block\Adminhtml\Form */ protected $_wysiwygConfig; - /** - * @param \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Catalog\Helper\Data $catalogData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig + * @param \Magento\Catalog\Helper\Data $catalogData + * @param array $data */ - public function __construct( - \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig, - \Magento\Data\FormFactory $formFactory, - \Magento\Catalog\Helper\Data $catalogData, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig, + \Magento\Catalog\Helper\Data $catalogData, + array $data = array() + ) { $this->_wysiwygConfig = $wysiwygConfig; $this->_catalogData = $catalogData; - parent::__construct($registry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); } /** diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Attributes/Search.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Attributes/Search.php index ceebf65883d119c8d711305f4863ede30bdad147..9fa51ea9b55c7e349cf35938ac3c1b8474a3222f 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Attributes/Search.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Attributes/Search.php @@ -52,26 +52,26 @@ class Search extends \Magento\Backend\Block\Widget */ protected $_helperPool; - /** - * @param \Magento\Core\Model\Resource\HelperPool $helperPool - * @param \Magento\Catalog\Model\Resource\Product\Attribute\CollectionFactory $collectionFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Resource\HelperPool $helperPool + * @param \Magento\Catalog\Model\Resource\Product\Attribute\CollectionFactory $collectionFactory + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Model\Resource\HelperPool $helperPool, - \Magento\Catalog\Model\Resource\Product\Attribute\CollectionFactory $collectionFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Resource\HelperPool $helperPool, + \Magento\Catalog\Model\Resource\Product\Attribute\CollectionFactory $collectionFactory, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_helperPool = $helperPool; $this->_collectionFactory = $collectionFactory; $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** 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 f4cd6aedeac7afe2b7c9ddba51556d14101365d3..f5220902e9b689c47b4e3ba54497d7d45115e31a 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 @@ -72,36 +72,32 @@ class Crosssell extends \Magento\Adminhtml\Block\Widget\Grid */ protected $_visibility; - /** - * @param \Magento\Catalog\Model\Product\LinkFactory $linkFactory - * @param \Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory $setsFactory - * @param \Magento\Catalog\Model\ProductFactory $productFactory - * @param \Magento\Catalog\Model\Product\Type $type - * @param \Magento\Catalog\Model\Product\Status $status - * @param \Magento\Catalog\Model\Product\Visibility $visibility - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param \Magento\Core\Model\Registry $coreRegistry - * @param array $data - * - * @SuppressWarnings(PHPMD.ExcessiveParameterList) + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Catalog\Model\Product\LinkFactory $linkFactory + * @param \Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory $setsFactory + * @param \Magento\Catalog\Model\ProductFactory $productFactory + * @param \Magento\Catalog\Model\Product\Type $type + * @param \Magento\Catalog\Model\Product\Status $status + * @param \Magento\Catalog\Model\Product\Visibility $visibility + * @param \Magento\Core\Model\Registry $coreRegistry + * @param array $data */ - public function __construct( - \Magento\Catalog\Model\Product\LinkFactory $linkFactory, - \Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory $setsFactory, - \Magento\Catalog\Model\ProductFactory $productFactory, - \Magento\Catalog\Model\Product\Type $type, - \Magento\Catalog\Model\Product\Status $status, - \Magento\Catalog\Model\Product\Visibility $visibility, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - \Magento\Core\Model\Registry $coreRegistry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Catalog\Model\Product\LinkFactory $linkFactory, + \Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory $setsFactory, + \Magento\Catalog\Model\ProductFactory $productFactory, + \Magento\Catalog\Model\Product\Type $type, + \Magento\Catalog\Model\Product\Status $status, + \Magento\Catalog\Model\Product\Visibility $visibility, + \Magento\Core\Model\Registry $coreRegistry, + array $data = array() + ) { $this->_linkFactory = $linkFactory; $this->_setsFactory = $setsFactory; $this->_productFactory = $productFactory; @@ -109,7 +105,7 @@ class Crosssell extends \Magento\Adminhtml\Block\Widget\Grid $this->_status = $status; $this->_visibility = $visibility; $this->_coreRegistry = $coreRegistry; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $data); } /** diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Inventory.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Inventory.php index 9a7a7dd7d6dce46c087cafc5f66da89e95718809..613b4b31b2de5db027c620214d4f9ffdb5419023 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Inventory.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Inventory.php @@ -42,11 +42,6 @@ class Inventory extends \Magento\Adminhtml\Block\Widget */ protected $_catalogData = null; - /** - * @var \Magento\Core\Model\StoreManager - */ - protected $_storeManager; - /** * @param \Magento\Catalog\Helper\Data $catalogData * @param \Magento\Core\Helper\Data $coreData @@ -66,32 +61,29 @@ class Inventory extends \Magento\Adminhtml\Block\Widget */ protected $_backorders; - /** - * @param \Magento\CatalogInventory\Model\Source\Backorders $backorders - * @param \Magento\CatalogInventory\Model\Source\Stock $stock - * @param \Magento\Catalog\Helper\Data $catalogData - * @param \Magento\Core\Model\StoreManager $storeManager - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $coreRegistry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\CatalogInventory\Model\Source\Backorders $backorders + * @param \Magento\CatalogInventory\Model\Source\Stock $stock + * @param \Magento\Catalog\Helper\Data $catalogData + * @param \Magento\Core\Model\Registry $coreRegistry + * @param array $data */ - public function __construct( - \Magento\CatalogInventory\Model\Source\Backorders $backorders, - \Magento\CatalogInventory\Model\Source\Stock $stock, - \Magento\Catalog\Helper\Data $catalogData, - \Magento\Core\Model\StoreManager $storeManager, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $coreRegistry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\CatalogInventory\Model\Source\Backorders $backorders, + \Magento\CatalogInventory\Model\Source\Stock $stock, + \Magento\Catalog\Helper\Data $catalogData, + \Magento\Core\Model\Registry $coreRegistry, + array $data = array() + ) { $this->_stock = $stock; $this->_backorders = $backorders; $this->_catalogData = $catalogData; $this->_coreRegistry = $coreRegistry; - $this->_storeManager = $storeManager; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } public function getBackordersOption() diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Option.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Option.php index b10e34625fd0236e493408f50522d13ea8e5bb1a..288e9b821639713ac8d6b66b235e06061d170be2 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Option.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Option.php @@ -66,32 +66,32 @@ class Option extends \Magento\Adminhtml\Block\Widget */ protected $_optionType; - /** - * @param \Magento\Backend\Model\Config\Source\Yesno $configYesNo - * @param \Magento\Catalog\Model\Config\Source\Product\Options\Type $optionType - * @param \Magento\Catalog\Model\Product $product - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Catalog\Model\ProductOptions\ConfigInterface $productOptionConfig - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Backend\Model\Config\Source\Yesno $configYesNo + * @param \Magento\Catalog\Model\Config\Source\Product\Options\Type $optionType + * @param \Magento\Catalog\Model\Product $product + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Catalog\Model\ProductOptions\ConfigInterface $productOptionConfig + * @param array $data */ - public function __construct( - \Magento\Backend\Model\Config\Source\Yesno $configYesNo, - \Magento\Catalog\Model\Config\Source\Product\Options\Type $optionType, - \Magento\Catalog\Model\Product $product, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - \Magento\Catalog\Model\ProductOptions\ConfigInterface $productOptionConfig, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Backend\Model\Config\Source\Yesno $configYesNo, + \Magento\Catalog\Model\Config\Source\Product\Options\Type $optionType, + \Magento\Catalog\Model\Product $product, + \Magento\Core\Model\Registry $registry, + \Magento\Catalog\Model\ProductOptions\ConfigInterface $productOptionConfig, + array $data = array() + ) { $this->_optionType = $optionType; $this->_configYesNo = $configYesNo; $this->_product = $product; $this->_productOptionConfig = $productOptionConfig; $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Type/AbstractType.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Type/AbstractType.php index d8b94b774f76e4be9425412826c1d3b999c747ca..7d0065a0ac285a993ac5b2d93165a0ae78b1b385 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Type/AbstractType.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Type/AbstractType.php @@ -43,20 +43,20 @@ class AbstractType extends \Magento\Adminhtml\Block\Widget */ protected $_optionPrice; - /** - * @param \Magento\Catalog\Model\Config\Source\Product\Options\Price $optionPrice - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Catalog\Model\Config\Source\Product\Options\Price $optionPrice + * @param array $data */ - public function __construct( - \Magento\Catalog\Model\Config\Source\Product\Options\Price $optionPrice, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Catalog\Model\Config\Source\Product\Options\Price $optionPrice, + array $data = array() + ) { $this->_optionPrice = $optionPrice; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _prepareLayout() diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Price/Group/AbstractGroup.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Price/Group/AbstractGroup.php index 33352b03936e8ceeceaf93167fe13e3366bb1975..a834234f5426dba241dfe5a626e923c7c516ec5a 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Price/Group/AbstractGroup.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Price/Group/AbstractGroup.php @@ -82,29 +82,29 @@ abstract class AbstractGroup */ protected $_groupFactory; - /** - * @param \Magento\Customer\Model\GroupFactory $groupFactory - * @param \Magento\Directory\Helper\Data $directoryHelper - * @param \Magento\Catalog\Helper\Data $catalogData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Customer\Model\GroupFactory $groupFactory + * @param \Magento\Directory\Helper\Data $directoryHelper + * @param \Magento\Catalog\Helper\Data $catalogData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Customer\Model\GroupFactory $groupFactory, - \Magento\Directory\Helper\Data $directoryHelper, - \Magento\Catalog\Helper\Data $catalogData, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Customer\Model\GroupFactory $groupFactory, + \Magento\Directory\Helper\Data $directoryHelper, + \Magento\Catalog\Helper\Data $catalogData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_groupFactory = $groupFactory; $this->_directoryHelper = $directoryHelper; $this->_catalogData = $catalogData; $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Price/Recurring.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Price/Recurring.php index be02daf35d755ef05325a73963e566bfdae8996d..8d6a526a33e774cdafea8ad606c328f79a3a1521 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Price/Recurring.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Price/Recurring.php @@ -39,20 +39,20 @@ class Recurring */ protected $_coreRegistry = null; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $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 84f15aff7516936dd9ef5d8e4f55d02ffe4897c3..118da106ba3626501e9cadf5a723a250b2178201 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 @@ -72,36 +72,32 @@ class Related extends \Magento\Adminhtml\Block\Widget\Grid */ protected $_visibility; - /** - * @param \Magento\Catalog\Model\Product\LinkFactory $linkFactory - * @param \Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory $setsFactory - * @param \Magento\Catalog\Model\ProductFactory $productFactory - * @param \Magento\Catalog\Model\Product\Type $type - * @param \Magento\Catalog\Model\Product\Status $status - * @param \Magento\Catalog\Model\Product\Visibility $visibility - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param \Magento\Core\Model\Registry $coreRegistry - * @param array $data - * - * @SuppressWarnings(PHPMD.ExcessiveParameterList) + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Catalog\Model\Product\LinkFactory $linkFactory + * @param \Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory $setsFactory + * @param \Magento\Catalog\Model\ProductFactory $productFactory + * @param \Magento\Catalog\Model\Product\Type $type + * @param \Magento\Catalog\Model\Product\Status $status + * @param \Magento\Catalog\Model\Product\Visibility $visibility + * @param \Magento\Core\Model\Registry $coreRegistry + * @param array $data */ - public function __construct( - \Magento\Catalog\Model\Product\LinkFactory $linkFactory, - \Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory $setsFactory, - \Magento\Catalog\Model\ProductFactory $productFactory, - \Magento\Catalog\Model\Product\Type $type, - \Magento\Catalog\Model\Product\Status $status, - \Magento\Catalog\Model\Product\Visibility $visibility, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - \Magento\Core\Model\Registry $coreRegistry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Catalog\Model\Product\LinkFactory $linkFactory, + \Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory $setsFactory, + \Magento\Catalog\Model\ProductFactory $productFactory, + \Magento\Catalog\Model\Product\Type $type, + \Magento\Catalog\Model\Product\Status $status, + \Magento\Catalog\Model\Product\Visibility $visibility, + \Magento\Core\Model\Registry $coreRegistry, + array $data = array() + ) { $this->_linkFactory = $linkFactory; $this->_setsFactory = $setsFactory; $this->_productFactory = $productFactory; @@ -109,7 +105,7 @@ class Related extends \Magento\Adminhtml\Block\Widget\Grid $this->_status = $status; $this->_visibility = $visibility; $this->_coreRegistry = $coreRegistry; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $data); } /** diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Super/Config.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Super/Config.php index 4e7c7a1b709c531b802e4a2ef80507646860112d..90bb3fd6c7e1d2241c7f5b5511d0f5e31154a84a 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Super/Config.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Super/Config.php @@ -46,16 +46,6 @@ class Config */ protected $_catalogData = null; - /** - * @var \Magento\Core\Model\App - */ - protected $_storeManager; - - /** - * @var \Magento\Core\Model\LocaleInterface - */ - protected $_locale; - /** * Core registry * @@ -69,31 +59,25 @@ class Config protected $_configurableType; /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Catalog\Model\Product\Type\Configurable $configurableType * @param \Magento\Catalog\Helper\Data $catalogData - * @param \Magento\Core\Model\App $app - * @param \Magento\Core\Model\LocaleInterface $locale - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context * @param \Magento\Core\Model\Registry $coreRegistry * @param array $data */ public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Catalog\Model\Product\Type\Configurable $configurableType, \Magento\Catalog\Helper\Data $catalogData, - \Magento\Core\Model\App $app, - \Magento\Core\Model\LocaleInterface $locale, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, \Magento\Core\Model\Registry $coreRegistry, array $data = array() ) { $this->_configurableType = $configurableType; $this->_coreRegistry = $coreRegistry; $this->_catalogData = $catalogData; - $this->_storeManager = $app; - $this->_locale = $locale; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** @@ -165,20 +149,6 @@ class Config )); $this->addChild('super_settings', 'Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Super\Settings'); -// @todo: Remove unused code and blocks -// if ($this->getProduct()->getId()) { -// $this->setChild('simple', -// $this->getLayout()->createBlock('Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Super\Config\Simple', -// 'catalog.product.edit.tab.super.config.simple') -// ); -// -// $this->addChild('create_from_configurable', 'Magento\Adminhtml\Block\Widget\Button', array( -// 'label' => __('Copy From Configurable'), -// 'class' => 'add', -// 'onclick' => 'superProduct.createNewProduct()' -// )); -// } - $this->addChild( 'generate', 'Magento\Backend\Block\Widget\Button', @@ -489,7 +459,7 @@ class Config */ public function getApp() { - return $this->_storeManager; + return $this->_app; } /** diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Super/Config/Grid/Renderer/Checkbox.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Super/Config/Grid/Renderer/Checkbox.php index 5da7411049b318b99b24dd5b49e6a6e38e91b82c..d5a2e2e2da69d4b5854db9a7b9b2258b1105f088 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Super/Config/Grid/Renderer/Checkbox.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Super/Config/Grid/Renderer/Checkbox.php @@ -43,18 +43,18 @@ class Checkbox extends \Magento\Adminhtml\Block\Widget\Grid\Column\Renderer\Chec */ protected $_coreData = null; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Context $context - * @param \Magento\Backend\Block\Widget\Grid\Column\Renderer\Options\Converter $converter - * @param array $data + /** + * @param \Magento\Backend\Block\Context $context + * @param \Magento\Backend\Block\Widget\Grid\Column\Renderer\Options\Converter $converter + * @param \Magento\Core\Helper\Data $coreData + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Context $context, - \Magento\Backend\Block\Widget\Grid\Column\Renderer\Options\Converter $converter, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Context $context, + \Magento\Backend\Block\Widget\Grid\Column\Renderer\Options\Converter $converter, + \Magento\Core\Helper\Data $coreData, + array $data = array() + ) { $this->_coreData = $coreData; parent::__construct($context, $converter, $data); } diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Super/Config/Matrix.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Super/Config/Matrix.php index e1dcda84f92631508aef95b887ab53c6601011ce..f8bc14458e7b9dca30322b4a6fb86f8493131aa0 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Super/Config/Matrix.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Super/Config/Matrix.php @@ -36,12 +36,6 @@ namespace Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Super\Config; class Matrix extends \Magento\Backend\Block\Template { - /** @var \Magento\Core\Model\App */ - protected $_application; - - /** @var \Magento\Core\Model\LocaleInterface */ - protected $_locale; - /** * @param \Magento\Core\Helper\Data $coreData * Core registry @@ -65,35 +59,29 @@ class Matrix */ protected $_config; - /** - * @param \Magento\Catalog\Model\Product\Type\Configurable $configurableType - * @param \Magento\Catalog\Model\Config $config - * @param \Magento\Catalog\Model\ProductFactory $productFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\App $application - * @param \Magento\Core\Model\LocaleInterface $locale - * @param \Magento\Core\Model\Registry $coreRegistry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Catalog\Model\Product\Type\Configurable $configurableType + * @param \Magento\Catalog\Model\Config $config + * @param \Magento\Catalog\Model\ProductFactory $productFactory + * @param \Magento\Core\Model\Registry $coreRegistry + * @param array $data */ - public function __construct( - \Magento\Catalog\Model\Product\Type\Configurable $configurableType, - \Magento\Catalog\Model\Config $config, - \Magento\Catalog\Model\ProductFactory $productFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\App $application, - \Magento\Core\Model\LocaleInterface $locale, - \Magento\Core\Model\Registry $coreRegistry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Catalog\Model\Product\Type\Configurable $configurableType, + \Magento\Catalog\Model\Config $config, + \Magento\Catalog\Model\ProductFactory $productFactory, + \Magento\Core\Model\Registry $coreRegistry, + array $data = array() + ) { $this->_configurableType = $configurableType; $this->_productFactory = $productFactory; $this->_config = $config; $this->_coreRegistry = $coreRegistry; - parent::__construct($coreData, $context, $data); - $this->_application = $application; - $this->_locale = $locale; + parent::__construct($context, $coreData, $data); } /** @@ -104,7 +92,7 @@ class Matrix */ public function renderPrice($price) { - return $this->_locale->currency($this->_application->getBaseCurrencyCode())->toCurrency(sprintf('%f', $price)); + return $this->_locale->currency($this->_app->getBaseCurrencyCode())->toCurrency(sprintf('%f', $price)); } /** diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Super/Config/Simple.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Super/Config/Simple.php index 0f7993bcc1f84a3193ebb31c495353c319ce4a3d..54c0fa632e82b797c2214e95894fd957bf8dc072 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Super/Config/Simple.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Super/Config/Simple.php @@ -48,28 +48,28 @@ class Simple */ protected $_productFactory; - /** - * @param \Magento\Catalog\Model\ProductFactory $productFactory - * @param \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Catalog\Helper\Data $catalogData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig + * @param \Magento\Catalog\Helper\Data $catalogData + * @param \Magento\Catalog\Model\ProductFactory $productFactory + * @param array $data */ - public function __construct( - \Magento\Catalog\Model\ProductFactory $productFactory, - \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig, - \Magento\Data\FormFactory $formFactory, - \Magento\Catalog\Helper\Data $catalogData, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig, + \Magento\Catalog\Helper\Data $catalogData, + \Magento\Catalog\Model\ProductFactory $productFactory, + array $data = array() + ) { $this->_productFactory = $productFactory; - parent::__construct($wysiwygConfig, $formFactory, $catalogData, $coreData, $context, $registry, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $wysiwygConfig, $catalogData, $data); } protected function _prepareForm() diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Super/Settings.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Super/Settings.php index 192a12d363ff4b3e9ca8d62aada25757193b729a..977eb645793313255c2d81dd8db8bb4c8ee2075d 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Super/Settings.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Super/Settings.php @@ -40,24 +40,24 @@ class Settings extends \Magento\Backend\Block\Widget\Form\Generic */ protected $_configurableType; - /** - * @param \Magento\Catalog\Model\Product\Type\Configurable $configurableType - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Catalog\Model\Product\Type\Configurable $configurableType + * @param array $data */ - public function __construct( - \Magento\Catalog\Model\Product\Type\Configurable $configurableType, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Catalog\Model\Product\Type\Configurable $configurableType, + array $data = array() + ) { $this->_configurableType = $configurableType; - parent::__construct($registry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $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 ddecd88716bce5597b6c29d808d49f21dc76a017..1b983bc8448917a022fdd6b051a54fe4c8d71d4b 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 @@ -72,36 +72,32 @@ class Upsell extends \Magento\Adminhtml\Block\Widget\Grid */ protected $_visibility; - /** - * @param \Magento\Catalog\Model\Product\LinkFactory $linkFactory - * @param \Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory $setsFactory - * @param \Magento\Catalog\Model\ProductFactory $productFactory - * @param \Magento\Catalog\Model\Product\Type $type - * @param \Magento\Catalog\Model\Product\Status $status - * @param \Magento\Catalog\Model\Product\Visibility $visibility - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param \Magento\Core\Model\Registry $coreRegistry - * @param array $data - * - * @SuppressWarnings(PHPMD.ExcessiveParameterList) + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Catalog\Model\Product\LinkFactory $linkFactory + * @param \Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory $setsFactory + * @param \Magento\Catalog\Model\ProductFactory $productFactory + * @param \Magento\Catalog\Model\Product\Type $type + * @param \Magento\Catalog\Model\Product\Status $status + * @param \Magento\Catalog\Model\Product\Visibility $visibility + * @param \Magento\Core\Model\Registry $coreRegistry + * @param array $data */ - public function __construct( - \Magento\Catalog\Model\Product\LinkFactory $linkFactory, - \Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory $setsFactory, - \Magento\Catalog\Model\ProductFactory $productFactory, - \Magento\Catalog\Model\Product\Type $type, - \Magento\Catalog\Model\Product\Status $status, - \Magento\Catalog\Model\Product\Visibility $visibility, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - \Magento\Core\Model\Registry $coreRegistry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Catalog\Model\Product\LinkFactory $linkFactory, + \Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory $setsFactory, + \Magento\Catalog\Model\ProductFactory $productFactory, + \Magento\Catalog\Model\Product\Type $type, + \Magento\Catalog\Model\Product\Status $status, + \Magento\Catalog\Model\Product\Visibility $visibility, + \Magento\Core\Model\Registry $coreRegistry, + array $data = array() + ) { $this->_linkFactory = $linkFactory; $this->_setsFactory = $setsFactory; $this->_productFactory = $productFactory; @@ -109,7 +105,7 @@ class Upsell extends \Magento\Adminhtml\Block\Widget\Grid $this->_status = $status; $this->_visibility = $visibility; $this->_coreRegistry = $coreRegistry; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $data); } /** diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Websites.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Websites.php index ea8e21ac25c06d9dfb84e853bc7ec50c9ddfdaf4..0091dc7b01d001e268a1bea7e3d8252b3555749d 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Websites.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Websites.php @@ -46,32 +46,26 @@ class Websites extends \Magento\Backend\Block\Store\Switcher */ protected $_coreRegistry = null; - /** - * Constructor - * - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\App $application - * @param \Magento\Core\Model\Website\Factory $websiteFactory - * @param \Magento\Core\Model\Store\Group\Factory $storeGroupFactory - * @param \Magento\Core\Model\StoreFactory $storeFactory - * @param \Magento\Core\Model\Registry $coreRegistry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Website\Factory $websiteFactory + * @param \Magento\Core\Model\Store\Group\Factory $storeGroupFactory + * @param \Magento\Core\Model\StoreFactory $storeFactory + * @param \Magento\Core\Model\Registry $coreRegistry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\App $application, - \Magento\Core\Model\Website\Factory $websiteFactory, - \Magento\Core\Model\Store\Group\Factory $storeGroupFactory, - \Magento\Core\Model\StoreFactory $storeFactory, - \Magento\Core\Model\Registry $coreRegistry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Website\Factory $websiteFactory, + \Magento\Core\Model\Store\Group\Factory $storeGroupFactory, + \Magento\Core\Model\StoreFactory $storeFactory, + \Magento\Core\Model\Registry $coreRegistry, + array $data = array() + ) { $this->_coreRegistry = $coreRegistry; - parent::__construct( - $coreData, $context, $application, $websiteFactory, $storeGroupFactory, $storeFactory, $data - ); + parent::__construct($context, $coreData, $websiteFactory, $storeGroupFactory, $storeFactory, $data); } /** diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tabs.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tabs.php index 0ce48e8f4c60d234db8e0ef3486c4c312cf3aa39..915f01943f02a1fa95a20b2e8fc20563b6b3b4eb 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tabs.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tabs.php @@ -66,31 +66,31 @@ class Tabs extends \Magento\Backend\Block\Widget\Tabs */ protected $_collectionFactory; - /** - * @param \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory $collectionFactory - * @param \Magento\Catalog\Helper\Catalog $helperCatalog - * @param \Magento\Catalog\Helper\Data $catalogData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Backend\Model\Auth\Session $authSession - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Backend\Model\Auth\Session $authSession + * @param \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory $collectionFactory + * @param \Magento\Catalog\Helper\Catalog $helperCatalog + * @param \Magento\Catalog\Helper\Data $catalogData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory $collectionFactory, - \Magento\Catalog\Helper\Catalog $helperCatalog, - \Magento\Catalog\Helper\Data $catalogData, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Backend\Model\Auth\Session $authSession, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Backend\Model\Auth\Session $authSession, + \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory $collectionFactory, + \Magento\Catalog\Helper\Catalog $helperCatalog, + \Magento\Catalog\Helper\Data $catalogData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_collectionFactory = $collectionFactory; $this->_helperCatalog = $helperCatalog; $this->_catalogData = $catalogData; $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $authSession, $data); + parent::__construct($context, $coreData, $authSession, $data); } protected function _construct() diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Frontend/Product/Watermark.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Frontend/Product/Watermark.php index e0fe599ae81151b49cf41456e49cbd373c256725..e18930377acf8cdaa193e5e5731641ff85bb4388 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Frontend/Product/Watermark.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Frontend/Product/Watermark.php @@ -57,22 +57,22 @@ class Watermark */ protected $_imageTypes; - /** - * @param \Magento\Catalog\Model\Config\Source\Watermark\Position $watermarkPosition - * @param \Magento\Backend\Block\System\Config\Form\Field $formField - * @param \Magento\Data\Form\Element\Factory $elementFactory - * @param \Magento\Backend\Block\Context $context - * @param array $imageTypes - * @param array $data + /** + * @param \Magento\Backend\Block\Context $context + * @param \Magento\Catalog\Model\Config\Source\Watermark\Position $watermarkPosition + * @param \Magento\Backend\Block\System\Config\Form\Field $formField + * @param \Magento\Data\Form\Element\Factory $elementFactory + * @param array $data + * @param array $imageTypes */ - public function __construct( - \Magento\Catalog\Model\Config\Source\Watermark\Position $watermarkPosition, - \Magento\Backend\Block\System\Config\Form\Field $formField, - \Magento\Data\Form\Element\Factory $elementFactory, - \Magento\Backend\Block\Context $context, - array $imageTypes = array(), - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Context $context, + \Magento\Catalog\Model\Config\Source\Watermark\Position $watermarkPosition, + \Magento\Backend\Block\System\Config\Form\Field $formField, + \Magento\Data\Form\Element\Factory $elementFactory, + array $data = array(), + array $imageTypes = array() + ) { $this->_watermarkPosition = $watermarkPosition; $this->_formField = $formField; $this->_elementFactory = $elementFactory; diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Grid.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Grid.php index 1d7683e48298506713ff8bcc6797d347811f8f45..306e7bff497931b9b80ac4f0e7ea1b9fd0c38447 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Grid.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Grid.php @@ -72,36 +72,32 @@ class Grid extends \Magento\Backend\Block\Widget\Grid\Extended */ protected $_websiteFactory; - /** - * @param \Magento\Core\Model\WebsiteFactory $websiteFactory - * @param \Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory $setsFactory - * @param \Magento\Catalog\Model\ProductFactory $productFactory - * @param \Magento\Catalog\Model\Product\Type $type - * @param \Magento\Catalog\Model\Product\Status $status - * @param \Magento\Catalog\Model\Product\Visibility $visibility - * @param \Magento\Catalog\Helper\Data $catalogData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param array $data - * - * @SuppressWarnings(PHPMD.ExcessiveParameterList) + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Core\Model\WebsiteFactory $websiteFactory + * @param \Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory $setsFactory + * @param \Magento\Catalog\Model\ProductFactory $productFactory + * @param \Magento\Catalog\Model\Product\Type $type + * @param \Magento\Catalog\Model\Product\Status $status + * @param \Magento\Catalog\Model\Product\Visibility $visibility + * @param \Magento\Catalog\Helper\Data $catalogData + * @param array $data */ - public function __construct( - \Magento\Core\Model\WebsiteFactory $websiteFactory, - \Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory $setsFactory, - \Magento\Catalog\Model\ProductFactory $productFactory, - \Magento\Catalog\Model\Product\Type $type, - \Magento\Catalog\Model\Product\Status $status, - \Magento\Catalog\Model\Product\Visibility $visibility, - \Magento\Catalog\Helper\Data $catalogData, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Core\Model\WebsiteFactory $websiteFactory, + \Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory $setsFactory, + \Magento\Catalog\Model\ProductFactory $productFactory, + \Magento\Catalog\Model\Product\Type $type, + \Magento\Catalog\Model\Product\Status $status, + \Magento\Catalog\Model\Product\Visibility $visibility, + \Magento\Catalog\Helper\Data $catalogData, + array $data = array() + ) { $this->_websiteFactory = $websiteFactory; $this->_setsFactory = $setsFactory; $this->_productFactory = $productFactory; @@ -109,7 +105,7 @@ class Grid extends \Magento\Backend\Block\Widget\Grid\Extended $this->_status = $status; $this->_visibility = $visibility; $this->_catalogData = $catalogData; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $data); } protected function _construct() diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery.php index 45bb07ea552e7bd3aa371378401bfa6f63bb3be9..98e85e6076ef8ec78855118511914c49174ce1a3 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery.php @@ -37,7 +37,7 @@ namespace Magento\Catalog\Block\Adminhtml\Product\Helper\Form; class Gallery extends \Magento\Data\Form\Element\AbstractElement { /** - * @var \Magento\Core\Model\StoreManager + * @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; @@ -48,7 +48,7 @@ class Gallery extends \Magento\Data\Form\Element\AbstractElement /** * @param \Magento\View\LayoutInterface $layout - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Escaper $escaper * @param \Magento\Data\Form\Element\Factory $factoryElement * @param \Magento\Data\Form\Element\CollectionFactory $factoryCollection @@ -56,7 +56,7 @@ class Gallery extends \Magento\Data\Form\Element\AbstractElement */ public function __construct( \Magento\View\LayoutInterface $layout, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Escaper $escaper, \Magento\Data\Form\Element\Factory $factoryElement, \Magento\Data\Form\Element\CollectionFactory $factoryCollection, diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/Content.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/Content.php index bed0f7f924507e55a386604a75830da6d284cfb9..51c2f9046c1e06e6e0dd29d4e79247c288d0e0ca 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/Content.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/Content.php @@ -45,20 +45,20 @@ class Content extends \Magento\Backend\Block\Widget */ protected $_mediaConfig; - /** - * @param \Magento\Catalog\Model\Product\Media\Config $mediaConfig - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Catalog\Model\Product\Media\Config $mediaConfig + * @param array $data */ - public function __construct( - \Magento\Catalog\Model\Product\Media\Config $mediaConfig, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Catalog\Model\Product\Media\Config $mediaConfig, + array $data = array() + ) { $this->_mediaConfig = $mediaConfig; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _prepareLayout() diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Price.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Price.php index d3c52d75425f406aa6c12162aaa2d20cb01f6a6d..c4c19bab144781604efaf7677441718c03b73b7f 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Price.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Price.php @@ -53,7 +53,7 @@ class Price extends \Magento\Data\Form\Element\Text protected $_locale; /** - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\LocaleInterface $locale * @param \Magento\Escaper $escaper * @param \Magento\Data\Form\Element\Factory $factoryElement @@ -62,7 +62,7 @@ class Price extends \Magento\Data\Form\Element\Text * @param array $attributes */ public function __construct( - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\LocaleInterface $locale, \Magento\Escaper $escaper, \Magento\Data\Form\Element\Factory $factoryElement, diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Options/Ajax.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Options/Ajax.php index c8bfb58fc8554411f252bcfffe9dab1b9bfb61e3..477426fa37044a79f07e0d3def0cdd115a4d2fd9 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Options/Ajax.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Options/Ajax.php @@ -54,20 +54,20 @@ class Ajax extends \Magento\Backend\Block\AbstractBlock */ protected $_productFactory; - /** - * @param \Magento\Catalog\Model\ProductFactory $productFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Context $context + * @param \Magento\Catalog\Model\ProductFactory $productFactory + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Catalog\Model\ProductFactory $productFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Context $context, + \Magento\Catalog\Model\ProductFactory $productFactory, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; $this->_coreData = $coreData; $this->_productFactory = $productFactory; 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 72fee2023700a48304069f6e424ebc2de01d6d60..79cdc85bc810f93f0facd62feca82db77184cf77 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Widget/Chooser.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Widget/Chooser.php @@ -57,33 +57,31 @@ class Chooser extends \Magento\Adminhtml\Block\Widget\Grid */ protected $_categoryFactory; - /** - * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory - * @param \Magento\Catalog\Model\Resource\Product\CollectionFactory $collectionFactory - * @param \Magento\Catalog\Model\Resource\Category $resourceCategory - * @param \Magento\Catalog\Model\Resource\Product $resourceProduct - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory + * @param \Magento\Catalog\Model\Resource\Product\CollectionFactory $collectionFactory + * @param \Magento\Catalog\Model\Resource\Category $resourceCategory + * @param \Magento\Catalog\Model\Resource\Product $resourceProduct + * @param array $data */ - public function __construct( - \Magento\Catalog\Model\CategoryFactory $categoryFactory, - \Magento\Catalog\Model\Resource\Product\CollectionFactory $collectionFactory, - \Magento\Catalog\Model\Resource\Category $resourceCategory, - \Magento\Catalog\Model\Resource\Product $resourceProduct, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Catalog\Model\CategoryFactory $categoryFactory, + \Magento\Catalog\Model\Resource\Product\CollectionFactory $collectionFactory, + \Magento\Catalog\Model\Resource\Category $resourceCategory, + \Magento\Catalog\Model\Resource\Product $resourceProduct, + array $data = array() + ) { $this->_categoryFactory = $categoryFactory; $this->_collectionFactory = $collectionFactory; $this->_resourceCategory = $resourceCategory; $this->_resourceProduct = $resourceProduct; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $data); } /** diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Search/Edit.php b/app/code/Magento/Catalog/Block/Adminhtml/Search/Edit.php index 02738604f83075568c045f463a3b5775830a4465..d5e8538e586399e77e53c498046a9adb4d2845b5 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Search/Edit.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Search/Edit.php @@ -39,20 +39,20 @@ class Edit extends \Magento\Adminhtml\Block\Widget\Form\Container */ protected $_coreRegistry = null; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _construct() diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Search/Edit/Form.php b/app/code/Magento/Catalog/Block/Adminhtml/Search/Edit/Form.php index 739307f67232a3fbebce281d2f49da2d929c923f..e1eb0d9aac5485b6762eb5b479c4d63a0f214347 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Search/Edit/Form.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Search/Edit/Form.php @@ -41,24 +41,24 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic */ protected $_systemStore; - /** - * @param \Magento\Core\Model\System\Store $systemStore - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Core\Model\System\Store $systemStore + * @param array $data */ - public function __construct( - \Magento\Core\Model\System\Store $systemStore, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Core\Model\System\Store $systemStore, + array $data = array() + ) { $this->_systemStore = $systemStore; - parent::__construct($registry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); } /** diff --git a/app/code/Magento/Catalog/Block/Breadcrumbs.php b/app/code/Magento/Catalog/Block/Breadcrumbs.php index b9434101fdec74ac6b4ed179a5c5dc7fa12994b1..f2a9fb0b0d35b50017aaa2d2dc912e0c24d618a8 100644 --- a/app/code/Magento/Catalog/Block/Breadcrumbs.php +++ b/app/code/Magento/Catalog/Block/Breadcrumbs.php @@ -33,7 +33,7 @@ */ namespace Magento\Catalog\Block; -class Breadcrumbs extends \Magento\Core\Block\Template +class Breadcrumbs extends \Magento\View\Block\Template { /** * Catalog data @@ -43,31 +43,19 @@ class Breadcrumbs extends \Magento\Core\Block\Template protected $_catalogData = null; /** - * Store manager - * - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - - /** - * Construct - * - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Catalog\Helper\Data $catalogData + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context + * @param \Magento\Catalog\Helper\Data $catalogData * @param array $data */ public function __construct( - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Catalog\Helper\Data $catalogData, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, + \Magento\Catalog\Helper\Data $catalogData, array $data = array() ) { - $this->_storeManager = $storeManager; $this->_catalogData = $catalogData; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Catalog/Block/Category/View.php b/app/code/Magento/Catalog/Block/Category/View.php index 60a8d233fa24a32297367a4d095cd45959ea76f3..e7434c4d7827c11147b714dd560c3029b24f871f 100644 --- a/app/code/Magento/Catalog/Block/Category/View.php +++ b/app/code/Magento/Catalog/Block/Category/View.php @@ -33,7 +33,7 @@ */ namespace Magento\Catalog\Block\Category; -class View extends \Magento\Core\Block\Template +class View extends \Magento\View\Block\Template { /** * Core registry @@ -50,34 +50,22 @@ class View extends \Magento\Core\Block\Template protected $_catalogLayer; /** - * Store manager - * - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - - /** - * Construct - * - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Catalog\Model\Layer $catalogLayer + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context + * @param \Magento\Catalog\Model\Layer $catalogLayer * @param \Magento\Core\Model\Registry $registry * @param array $data */ public function __construct( - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Catalog\Model\Layer $catalogLayer, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, + \Magento\Catalog\Model\Layer $catalogLayer, \Magento\Core\Model\Registry $registry, array $data = array() ) { - $this->_storeManager = $storeManager; $this->_catalogLayer = $catalogLayer; $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _prepareLayout() diff --git a/app/code/Magento/Catalog/Block/Category/Widget/Link.php b/app/code/Magento/Catalog/Block/Category/Widget/Link.php index ef7cbf1ed6e36e867dd41dd5b34e466feb50ad77..a89e445717e124639b3eb3a2992050234678edf4 100644 --- a/app/code/Magento/Catalog/Block/Category/Widget/Link.php +++ b/app/code/Magento/Catalog/Block/Category/Widget/Link.php @@ -38,24 +38,20 @@ class Link extends \Magento\Catalog\Block\Widget\Link { /** - * Construct - * + * @param \Magento\View\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Core\Model\Resource\Url\Rewrite $urlRewrite * @param \Magento\Catalog\Model\Resource\Category $resourceCategory - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Core\Model\Resource\Url\Rewrite $urlRewrite, \Magento\Catalog\Model\Resource\Category $resourceCategory, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, array $data = array() ) { - parent::__construct($urlRewrite, $storeManager, $coreData, $context, $data); + parent::__construct($context, $coreData, $urlRewrite, $data); $this->_entityResource = $resourceCategory; } } diff --git a/app/code/Magento/Catalog/Block/Layer/Filter/AbstractFilter.php b/app/code/Magento/Catalog/Block/Layer/Filter/AbstractFilter.php index cfe62c714e22de9cce6dd85051b1cde686eae46c..69f5eda44bf4fe51036478408b6dda49dcfe1ad9 100644 --- a/app/code/Magento/Catalog/Block/Layer/Filter/AbstractFilter.php +++ b/app/code/Magento/Catalog/Block/Layer/Filter/AbstractFilter.php @@ -33,7 +33,7 @@ */ namespace Magento\Catalog\Block\Layer\Filter; -abstract class AbstractFilter extends \Magento\Core\Block\Template +abstract class AbstractFilter extends \Magento\View\Block\Template { /** * Catalog Layer Filter Attribute model @@ -77,24 +77,22 @@ abstract class AbstractFilter extends \Magento\Core\Block\Template protected $_layerFilterFactory; /** - * Construct - * - * @param \Magento\Catalog\Helper\Data $catalogData + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context + * @param \Magento\Catalog\Helper\Data $catalogData * @param \Magento\Catalog\Model\Layer\Filter\Factory $layerFilterFactory * @param array $data */ public function __construct( - \Magento\Catalog\Helper\Data $catalogData, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, + \Magento\Catalog\Helper\Data $catalogData, \Magento\Catalog\Model\Layer\Filter\Factory $layerFilterFactory, array $data = array() ) { $this->_catalogData = $catalogData; $this->_layerFilterFactory = $layerFilterFactory; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Catalog/Block/Layer/State.php b/app/code/Magento/Catalog/Block/Layer/State.php index 0dc30be6f23281acd3e81b532c704906e0ac02ee..095bb93785136c791a5ea6be4905def4294c65b8 100644 --- a/app/code/Magento/Catalog/Block/Layer/State.php +++ b/app/code/Magento/Catalog/Block/Layer/State.php @@ -33,7 +33,7 @@ */ namespace Magento\Catalog\Block\Layer; -class State extends \Magento\Core\Block\Template +class State extends \Magento\View\Block\Template { protected $_template = 'layer/state.phtml'; @@ -45,21 +45,19 @@ class State extends \Magento\Core\Block\Template protected $_catalogLayer; /** - * Construct - * - * @param \Magento\Catalog\Model\Layer $catalogLayer + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context + * @param \Magento\Catalog\Model\Layer $catalogLayer * @param array $data */ public function __construct( - \Magento\Catalog\Model\Layer $catalogLayer, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, + \Magento\Catalog\Model\Layer $catalogLayer, array $data = array() ) { $this->_catalogLayer = $catalogLayer; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Catalog/Block/Layer/View.php b/app/code/Magento/Catalog/Block/Layer/View.php index a1b6c7cd26aa43cf94ed418ff8c2079c3e86ea26..6be814a2a5dbb2240bfc67ef85a6c65cc659fcea 100644 --- a/app/code/Magento/Catalog/Block/Layer/View.php +++ b/app/code/Magento/Catalog/Block/Layer/View.php @@ -33,7 +33,7 @@ */ namespace Magento\Catalog\Block\Layer; -class View extends \Magento\Core\Block\Template +class View extends \Magento\View\Block\Template { /** * State block name @@ -78,21 +78,19 @@ class View extends \Magento\Core\Block\Template protected $_catalogLayer; /** - * Construct - * - * @param \Magento\Catalog\Model\Layer $catalogLayer + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context + * @param \Magento\Catalog\Model\Layer $catalogLayer * @param array $data */ public function __construct( - \Magento\Catalog\Model\Layer $catalogLayer, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, + \Magento\Catalog\Model\Layer $catalogLayer, array $data = array() ) { $this->_catalogLayer = $catalogLayer; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Catalog/Block/Navigation.php b/app/code/Magento/Catalog/Block/Navigation.php index 04ee7fa90c8f60402032b3e79040dff454821cc1..1554da667a327284cba3031f5867509b213f38e7 100644 --- a/app/code/Magento/Catalog/Block/Navigation.php +++ b/app/code/Magento/Catalog/Block/Navigation.php @@ -31,7 +31,7 @@ namespace Magento\Catalog\Block; * * @SuppressWarnings(PHPMD.LongVariable) */ -class Navigation extends \Magento\Core\Block\Template +class Navigation extends \Magento\View\Block\Template { protected $_categoryInstance = null; @@ -82,13 +82,6 @@ class Navigation extends \Magento\Core\Block\Template */ protected $_catalogLayer; - /** - * Store manager - * - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - /** * Product collection factory * @@ -97,42 +90,37 @@ class Navigation extends \Magento\Core\Block\Template protected $_productCollectionFactory; /** - * Construct - * + * @param \Magento\View\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory * @param \Magento\Catalog\Model\Resource\Product\CollectionFactory $productCollectionFactory - * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Catalog\Model\Layer $catalogLayer * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Catalog\Helper\Category\Flat $catalogCategoryFlat * @param \Magento\Catalog\Helper\Category $catalogCategory * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Catalog\Model\CategoryFactory $categoryFactory, \Magento\Catalog\Model\Resource\Product\CollectionFactory $productCollectionFactory, - \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Catalog\Model\Layer $catalogLayer, \Magento\Customer\Model\Session $customerSession, \Magento\Catalog\Helper\Category\Flat $catalogCategoryFlat, \Magento\Catalog\Helper\Category $catalogCategory, \Magento\Core\Model\Registry $registry, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, array $data = array() ) { $this->_productCollectionFactory = $productCollectionFactory; - $this->_storeManager = $storeManager; $this->_catalogLayer = $catalogLayer; $this->_customerSession = $customerSession; $this->_catalogCategoryFlat = $catalogCategoryFlat; $this->_catalogCategory = $catalogCategory; $this->_registry = $registry; $this->_categoryInstance = $categoryFactory->create(); - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _construct() diff --git a/app/code/Magento/Catalog/Block/Product.php b/app/code/Magento/Catalog/Block/Product.php index 891a183dcf1e275dd2ce07e23ad974e1cc2c80d5..e104a80f49d60600b4b971885c7720839f1025b1 100644 --- a/app/code/Magento/Catalog/Block/Product.php +++ b/app/code/Magento/Catalog/Block/Product.php @@ -24,10 +24,9 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ - namespace Magento\Catalog\Block; -class Product extends \Magento\Core\Block\Template +class Product extends \Magento\View\Block\Template { protected $_finalPrice = array(); @@ -39,21 +38,19 @@ class Product extends \Magento\Core\Block\Template protected $_productFactory; /** - * Construct - * - * @param \Magento\Catalog\Model\ProductFactory $productFactory + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context + * @param \Magento\Catalog\Model\ProductFactory $productFactory * @param array $data */ public function __construct( - \Magento\Catalog\Model\ProductFactory $productFactory, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, + \Magento\Catalog\Model\ProductFactory $productFactory, array $data = array() ) { $this->_productFactory = $productFactory; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } public function getProduct() diff --git a/app/code/Magento/Catalog/Block/Product/AbstractProduct.php b/app/code/Magento/Catalog/Block/Product/AbstractProduct.php index bf01e61be60d4c2e86a760168950c3700f108ec8..502efcdf9d069b900d65310adf90a2c1de11d6a0 100644 --- a/app/code/Magento/Catalog/Block/Product/AbstractProduct.php +++ b/app/code/Magento/Catalog/Block/Product/AbstractProduct.php @@ -34,7 +34,7 @@ */ namespace Magento\Catalog\Block\Product; -abstract class AbstractProduct extends \Magento\Core\Block\Template +abstract class AbstractProduct extends \Magento\View\Block\Template { protected $_priceBlock = array(); @@ -109,49 +109,37 @@ abstract class AbstractProduct extends \Magento\Core\Block\Template */ protected $_catalogConfig; - /** - * Store manager - * - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - /** * @var \Magento\Math\Random */ protected $mathRandom; /** - * Construct - * - * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\View\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Catalog\Model\Config $catalogConfig - * @param \Magento\Core\Model\Registry $coreRegistry + * @param \Magento\Core\Model\Registry $registry * @param \Magento\Tax\Helper\Data $taxData * @param \Magento\Catalog\Helper\Data $catalogData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Math\Random $mathRandom * @param array $data */ public function __construct( - \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\View\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Catalog\Model\Config $catalogConfig, - \Magento\Core\Model\Registry $coreRegistry, + \Magento\Core\Model\Registry $registry, \Magento\Tax\Helper\Data $taxData, \Magento\Catalog\Helper\Data $catalogData, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Math\Random $mathRandom, array $data = array() ) { - $this->_storeManager = $storeManager; $this->_catalogConfig = $catalogConfig; - $this->_coreRegistry = $coreRegistry; + $this->_coreRegistry = $registry; $this->_taxData = $taxData; $this->_catalogData = $catalogData; $this->mathRandom = $mathRandom; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** @@ -267,7 +255,7 @@ abstract class AbstractProduct extends \Magento\Core\Block\Template * Prepares and returns block to render some product type * * @param string $productType - * @return \Magento\Core\Block\Template + * @return \Magento\View\Block\Template */ public function _preparePriceRenderer($productType) { diff --git a/app/code/Magento/Catalog/Block/Product/Compare/AbstractCompare.php b/app/code/Magento/Catalog/Block/Product/Compare/AbstractCompare.php index 5cf07ba9f17a058576eb61286e9bc1eb39fd7609..4fb668446a6b284e4d11c8a76b7782fc82bc9f3e 100644 --- a/app/code/Magento/Catalog/Block/Product/Compare/AbstractCompare.php +++ b/app/code/Magento/Catalog/Block/Product/Compare/AbstractCompare.php @@ -44,41 +44,29 @@ abstract class AbstractCompare extends \Magento\Catalog\Block\Product\AbstractPr protected $_catalogProductCompare = null; /** - * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\View\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Catalog\Model\Config $catalogConfig - * @param \Magento\Core\Model\Registry $coreRegistry + * @param \Magento\Core\Model\Registry $registry * @param \Magento\Tax\Helper\Data $taxData * @param \Magento\Catalog\Helper\Data $catalogData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Math\Random $mathRandom * @param \Magento\Catalog\Helper\Product\Compare $catalogProductCompare * @param array $data */ public function __construct( - \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\View\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Catalog\Model\Config $catalogConfig, - \Magento\Core\Model\Registry $coreRegistry, + \Magento\Core\Model\Registry $registry, \Magento\Tax\Helper\Data $taxData, \Magento\Catalog\Helper\Data $catalogData, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Math\Random $mathRandom, \Magento\Catalog\Helper\Product\Compare $catalogProductCompare, array $data = array() ) { $this->_catalogProductCompare = $catalogProductCompare; - parent::__construct( - $storeManager, - $catalogConfig, - $coreRegistry, - $taxData, - $catalogData, - $coreData, - $context, - $mathRandom, - $data - ); + parent::__construct($context, $coreData, $catalogConfig, $registry, $taxData, $catalogData, $mathRandom, $data); } /** diff --git a/app/code/Magento/Catalog/Block/Product/Compare/ListCompare.php b/app/code/Magento/Catalog/Block/Product/Compare/ListCompare.php index fea4805604a3926dbee86501fead407dbec00d55..41aa1b04033b3fcd63016b04df34b416c700fd0c 100644 --- a/app/code/Magento/Catalog/Block/Product/Compare/ListCompare.php +++ b/app/code/Magento/Catalog/Block/Product/Compare/ListCompare.php @@ -100,13 +100,12 @@ class ListCompare extends \Magento\Catalog\Block\Product\Compare\AbstractCompare protected $_itemCollectionFactory; /** - * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\View\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Catalog\Model\Config $catalogConfig - * @param \Magento\Core\Model\Registry $coreRegistry + * @param \Magento\Core\Model\Registry $registry * @param \Magento\Tax\Helper\Data $taxData * @param \Magento\Catalog\Helper\Data $catalogData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Math\Random $mathRandom * @param \Magento\Catalog\Helper\Product\Compare $catalogProductCompare * @param \Magento\Catalog\Model\Resource\Product\Compare\Item\CollectionFactory $itemCollectionFactory @@ -116,13 +115,12 @@ class ListCompare extends \Magento\Catalog\Block\Product\Compare\AbstractCompare * @param array $data */ public function __construct( - \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\View\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Catalog\Model\Config $catalogConfig, - \Magento\Core\Model\Registry $coreRegistry, + \Magento\Core\Model\Registry $registry, \Magento\Tax\Helper\Data $taxData, \Magento\Catalog\Helper\Data $catalogData, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Math\Random $mathRandom, \Magento\Catalog\Helper\Product\Compare $catalogProductCompare, \Magento\Catalog\Model\Resource\Product\Compare\Item\CollectionFactory $itemCollectionFactory, @@ -136,13 +134,12 @@ class ListCompare extends \Magento\Catalog\Block\Product\Compare\AbstractCompare $this->_logVisitor = $logVisitor; $this->_customerSession = $customerSession; parent::__construct( - $storeManager, + $context, + $coreData, $catalogConfig, - $coreRegistry, + $registry, $taxData, $catalogData, - $coreData, - $context, $mathRandom, $catalogProductCompare, $data @@ -158,7 +155,7 @@ class ListCompare extends \Magento\Catalog\Block\Product\Compare\AbstractCompare public function getAddToWishlistUrl($product) { $continueUrl = $this->_coreData->urlEncode($this->getUrl('customer/account')); - $urlParamName = \Magento\Core\Controller\Front\Action::PARAM_NAME_URL_ENCODED; + $urlParamName = \Magento\App\Action\Action::PARAM_NAME_URL_ENCODED; $params = array( $urlParamName => $continueUrl diff --git a/app/code/Magento/Catalog/Block/Product/Configurable/AssociatedSelector/Backend/Grid/ColumnSet.php b/app/code/Magento/Catalog/Block/Product/Configurable/AssociatedSelector/Backend/Grid/ColumnSet.php index c2dbc46494e8439e2e5e4237ac7bb267d13fe5ad..db7c4a8f09908cec5039c72f5aa7419e9eb5507d 100644 --- a/app/code/Magento/Catalog/Block/Product/Configurable/AssociatedSelector/Backend/Grid/ColumnSet.php +++ b/app/code/Magento/Catalog/Block/Product/Configurable/AssociatedSelector/Backend/Grid/ColumnSet.php @@ -55,8 +55,8 @@ class ColumnSet protected $_productType; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Backend\Model\Widget\Grid\Row\UrlGeneratorFactory $generatorFactory * @param \Magento\Backend\Model\Widget\Grid\SubTotals $subtotals * @param \Magento\Backend\Model\Widget\Grid\Totals $totals @@ -65,8 +65,8 @@ class ColumnSet * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Backend\Model\Widget\Grid\Row\UrlGeneratorFactory $generatorFactory, \Magento\Backend\Model\Widget\Grid\SubTotals $subtotals, \Magento\Backend\Model\Widget\Grid\Totals $totals, @@ -74,7 +74,7 @@ class ColumnSet \Magento\Core\Model\Registry $registryManager, array $data = array() ) { - parent::__construct($coreData, $context, $generatorFactory, $subtotals, $totals, $data); + parent::__construct($context, $coreData, $generatorFactory, $subtotals, $totals, $data); $this->_registryManager = $registryManager; $this->_productType = $productType; diff --git a/app/code/Magento/Catalog/Block/Product/Configurable/AttributeSelector.php b/app/code/Magento/Catalog/Block/Product/Configurable/AttributeSelector.php index 83d510c0702d7a774cbead010b9f9df0461d5ef9..e39b31cc2ac24260d6fa35e37e80f898388063e0 100644 --- a/app/code/Magento/Catalog/Block/Product/Configurable/AttributeSelector.php +++ b/app/code/Magento/Catalog/Block/Product/Configurable/AttributeSelector.php @@ -47,25 +47,23 @@ class AttributeSelector extends \Magento\Backend\Block\Template */ protected $_resourceHelper; - /** - * Construct - * - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Catalog\Model\Resource\Product\Attribute\CollectionFactory $attributeColFactory - * @param \Magento\Catalog\Model\Resource\Helper $resourceHelper - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Catalog\Model\Resource\Product\Attribute\CollectionFactory $attributeColFactory + * @param \Magento\Catalog\Model\Resource\Helper $resourceHelper + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Catalog\Model\Resource\Product\Attribute\CollectionFactory $attributeColFactory, - \Magento\Catalog\Model\Resource\Helper $resourceHelper, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Catalog\Model\Resource\Product\Attribute\CollectionFactory $attributeColFactory, + \Magento\Catalog\Model\Resource\Helper $resourceHelper, + array $data = array() + ) { $this->_attributeColFactory = $attributeColFactory; $this->_resourceHelper = $resourceHelper; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Catalog/Block/Product/Gallery.php b/app/code/Magento/Catalog/Block/Product/Gallery.php index d3166820fa4b4fe7b2bf5d6c1e448abf0aa92d0e..077d15f1f874bc917c52032168852e5ef8f215ce 100644 --- a/app/code/Magento/Catalog/Block/Product/Gallery.php +++ b/app/code/Magento/Catalog/Block/Product/Gallery.php @@ -33,7 +33,7 @@ */ namespace Magento\Catalog\Block\Product; -class Gallery extends \Magento\Core\Block\Template +class Gallery extends \Magento\View\Block\Template { /** * Core registry @@ -43,19 +43,19 @@ class Gallery extends \Magento\Core\Block\Template protected $_coreRegistry = null; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Core\Model\Registry $registry * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Core\Model\Registry $registry, array $data = array() ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _prepareLayout() diff --git a/app/code/Magento/Catalog/Block/Product/Grouped/AssociatedProducts/ListAssociatedProducts.php b/app/code/Magento/Catalog/Block/Product/Grouped/AssociatedProducts/ListAssociatedProducts.php index af8253484943788e2914ccca12e84a1411b1afc7..8a540fbfbb5652f4130e9cdba359de81f1dd21b8 100644 --- a/app/code/Magento/Catalog/Block/Product/Grouped/AssociatedProducts/ListAssociatedProducts.php +++ b/app/code/Magento/Catalog/Block/Product/Grouped/AssociatedProducts/ListAssociatedProducts.php @@ -35,13 +35,6 @@ namespace Magento\Catalog\Block\Product\Grouped\AssociatedProducts; class ListAssociatedProducts extends \Magento\Backend\Block\Template { - /** - * Store manager - * - * @var \Magento\Core\Model\StoreManager - */ - protected $_storeManager; - /** * Registry * @@ -49,22 +42,19 @@ class ListAssociatedProducts extends \Magento\Backend\Block\Template */ protected $_registry; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManager $storeManager - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManager $storeManager, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { - parent::__construct($coreData, $context, $data); - $this->_storeManager = $storeManager; + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { + parent::__construct($context, $coreData, $data); $this->_registry = $registry; } diff --git a/app/code/Magento/Catalog/Block/Product/Image.php b/app/code/Magento/Catalog/Block/Product/Image.php index a39de76390574a70c4dc19ffec232df82bff9c05..7489db03a246f157f799af3cf327b7ebce740d84 100644 --- a/app/code/Magento/Catalog/Block/Product/Image.php +++ b/app/code/Magento/Catalog/Block/Product/Image.php @@ -46,7 +46,7 @@ namespace Magento\Catalog\Block\Product; * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ -class Image extends \Magento\Core\Block\Template +class Image extends \Magento\View\Block\Template { /** * Template image only @@ -68,19 +68,19 @@ class Image extends \Magento\Core\Block\Template protected $_productImageView; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Catalog\Model\Product\Image\View $productImageView * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Catalog\Model\Product\Image\View $productImageView, array $data = array() ) { $this->_productImageView = $productImageView; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Catalog/Block/Product/ListProduct.php b/app/code/Magento/Catalog/Block/Product/ListProduct.php index 091d98690afa5c2b5388331f411fcb67431afbf1..ab704a3459a3bf5ee8d5e13aa9bc67af8b02364a 100644 --- a/app/code/Magento/Catalog/Block/Product/ListProduct.php +++ b/app/code/Magento/Catalog/Block/Product/ListProduct.php @@ -65,26 +65,24 @@ class ListProduct extends \Magento\Catalog\Block\Product\AbstractProduct protected $_categoryFactory; /** - * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\View\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Catalog\Model\Config $catalogConfig - * @param \Magento\Core\Model\Registry $coreRegistry + * @param \Magento\Core\Model\Registry $registry * @param \Magento\Tax\Helper\Data $taxData * @param \Magento\Catalog\Helper\Data $catalogData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Math\Random $mathRandom * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory * @param \Magento\Catalog\Model\Layer $catalogLayer * @param array $data */ public function __construct( - \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\View\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Catalog\Model\Config $catalogConfig, - \Magento\Core\Model\Registry $coreRegistry, + \Magento\Core\Model\Registry $registry, \Magento\Tax\Helper\Data $taxData, \Magento\Catalog\Helper\Data $catalogData, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Math\Random $mathRandom, \Magento\Catalog\Model\CategoryFactory $categoryFactory, \Magento\Catalog\Model\Layer $catalogLayer, @@ -92,17 +90,7 @@ class ListProduct extends \Magento\Catalog\Block\Product\AbstractProduct ) { $this->_categoryFactory = $categoryFactory; $this->_catalogLayer = $catalogLayer; - parent::__construct( - $storeManager, - $catalogConfig, - $coreRegistry, - $taxData, - $catalogData, - $coreData, - $context, - $mathRandom, - $data - ); + parent::__construct($context, $coreData, $catalogConfig, $registry, $taxData, $catalogData, $mathRandom, $data); } /** diff --git a/app/code/Magento/Catalog/Block/Product/NewProduct.php b/app/code/Magento/Catalog/Block/Product/NewProduct.php index 88b192da14b21beb3792f7f6fed774fbfd998cd6..34e581214ba6720c353f154241331c3d0935fa3c 100644 --- a/app/code/Magento/Catalog/Block/Product/NewProduct.php +++ b/app/code/Magento/Catalog/Block/Product/NewProduct.php @@ -59,13 +59,6 @@ class NewProduct extends \Magento\Catalog\Block\Product\AbstractProduct */ protected $_catalogProductVisibility; - /** - * Locale - * - * @var \Magento\Core\Model\LocaleInterface - */ - protected $_locale; - /** * Product collection factory * @@ -74,52 +67,35 @@ class NewProduct extends \Magento\Catalog\Block\Product\AbstractProduct protected $_productCollectionFactory; /** - * Construct - * - * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\View\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Catalog\Model\Config $catalogConfig - * @param \Magento\Core\Model\Registry $coreRegistry + * @param \Magento\Core\Model\Registry $registry * @param \Magento\Tax\Helper\Data $taxData * @param \Magento\Catalog\Helper\Data $catalogData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Math\Random $mathRandom * @param \Magento\Catalog\Model\Resource\Product\CollectionFactory $productCollectionFactory - * @param \Magento\Core\Model\LocaleInterface $locale * @param \Magento\Catalog\Model\Product\Visibility $catalogProductVisibility * @param \Magento\Customer\Model\Session $customerSession * @param array $data */ public function __construct( - \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\View\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Catalog\Model\Config $catalogConfig, - \Magento\Core\Model\Registry $coreRegistry, + \Magento\Core\Model\Registry $registry, \Magento\Tax\Helper\Data $taxData, \Magento\Catalog\Helper\Data $catalogData, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Math\Random $mathRandom, \Magento\Catalog\Model\Resource\Product\CollectionFactory $productCollectionFactory, - \Magento\Core\Model\LocaleInterface $locale, \Magento\Catalog\Model\Product\Visibility $catalogProductVisibility, \Magento\Customer\Model\Session $customerSession, array $data = array() ) { $this->_productCollectionFactory = $productCollectionFactory; - $this->_locale = $locale; $this->_catalogProductVisibility = $catalogProductVisibility; $this->_customerSession = $customerSession; - parent::__construct( - $storeManager, - $catalogConfig, - $coreRegistry, - $taxData, - $catalogData, - $coreData, - $context, - $mathRandom, - $data - ); + parent::__construct($context, $coreData, $catalogConfig, $registry, $taxData, $catalogData, $mathRandom, $data); } /** @@ -205,7 +181,7 @@ class NewProduct extends \Magento\Catalog\Block\Product\AbstractProduct /** * Prepare collection with new products * - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ protected function _beforeToHtml() { diff --git a/app/code/Magento/Catalog/Block/Product/Price.php b/app/code/Magento/Catalog/Block/Product/Price.php index dd7f339d96967d0c810729b67acd8f6642701fb8..4bd748c9f2ad4faed2060d77201bf911b6ddead6 100644 --- a/app/code/Magento/Catalog/Block/Product/Price.php +++ b/app/code/Magento/Catalog/Block/Product/Price.php @@ -33,7 +33,7 @@ */ namespace Magento\Catalog\Block\Product; -class Price extends \Magento\Core\Block\Template +class Price extends \Magento\View\Block\Template { protected $_priceDisplayType = null; protected $_idSuffix = ''; @@ -59,13 +59,6 @@ class Price extends \Magento\Core\Block\Template */ protected $_catalogData = null; - /** - * Store manager - * - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - /** * @var \Magento\Stdlib\String */ @@ -77,36 +70,31 @@ class Price extends \Magento\Core\Block\Template protected $mathRandom; /** - * Construct - * - * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\View\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Catalog\Helper\Data $catalogData * @param \Magento\Tax\Helper\Data $taxData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Core\Model\Registry $registry * @param \Magento\Stdlib\String $string * @param \Magento\Math\Random $mathRandom * @param array $data */ public function __construct( - \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\View\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Catalog\Helper\Data $catalogData, \Magento\Tax\Helper\Data $taxData, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Core\Model\Registry $registry, \Magento\Stdlib\String $string, \Magento\Math\Random $mathRandom, array $data = array() ) { - $this->_storeManager = $storeManager; $this->_coreRegistry = $registry; $this->_catalogData = $catalogData; $this->_taxData = $taxData; $this->string = $string; $this->mathRandom = $mathRandom; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Catalog/Block/Product/Price/Template.php b/app/code/Magento/Catalog/Block/Product/Price/Template.php index 284b103e3755b85b45cf3312717d40cd935fe86d..5e349ea57fba13cd554ab3e251b1352fd2bfcbcc 100644 --- a/app/code/Magento/Catalog/Block/Product/Price/Template.php +++ b/app/code/Magento/Catalog/Block/Product/Price/Template.php @@ -34,7 +34,7 @@ */ namespace Magento\Catalog\Block\Product\Price; -class Template extends \Magento\Core\Block\AbstractBlock +class Template extends \Magento\View\Block\AbstractBlock { /** * Product Price block types cache diff --git a/app/code/Magento/Catalog/Block/Product/ProductList/Promotion.php b/app/code/Magento/Catalog/Block/Product/ProductList/Promotion.php index 71097bd8b7caec8641cc5f3d5a933cd7e638e00e..5467c63158cfcd2d1133336a047f84ff70428c54 100644 --- a/app/code/Magento/Catalog/Block/Product/ProductList/Promotion.php +++ b/app/code/Magento/Catalog/Block/Product/ProductList/Promotion.php @@ -42,13 +42,12 @@ class Promotion extends \Magento\Catalog\Block\Product\ListProduct protected $_layerFactory; /** - * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\View\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Catalog\Model\Config $catalogConfig - * @param \Magento\Core\Model\Registry $coreRegistry + * @param \Magento\Core\Model\Registry $registry * @param \Magento\Tax\Helper\Data $taxData * @param \Magento\Catalog\Helper\Data $catalogData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Math\Random $mathRandom * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory * @param \Magento\Catalog\Model\Layer $catalogLayer @@ -57,13 +56,12 @@ class Promotion extends \Magento\Catalog\Block\Product\ListProduct * @param array $data */ public function __construct( - \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\View\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Catalog\Model\Config $catalogConfig, - \Magento\Core\Model\Registry $coreRegistry, + \Magento\Core\Model\Registry $registry, \Magento\Tax\Helper\Data $taxData, \Magento\Catalog\Helper\Data $catalogData, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Math\Random $mathRandom, \Magento\Catalog\Model\CategoryFactory $categoryFactory, \Magento\Catalog\Model\Layer $catalogLayer, @@ -74,13 +72,12 @@ class Promotion extends \Magento\Catalog\Block\Product\ListProduct $this->_layerFactory = $layerFactory; $this->_productCollectionFactory = $productCollectionFactory; parent::__construct( - $storeManager, + $context, + $coreData, $catalogConfig, - $coreRegistry, + $registry, $taxData, $catalogData, - $coreData, - $context, $mathRandom, $categoryFactory, $catalogLayer, @@ -94,7 +91,7 @@ class Promotion extends \Magento\Catalog\Block\Product\ListProduct /** @var \Magento\Catalog\Model\Resource\Product\Collection $collection */ $collection = $this->_productCollectionFactory->create(); $this->_layerFactory->create()->prepareProductCollection($collection); -// your custom filter + $collection->addAttributeToFilter('promotion', 1) ->addStoreFilter(); diff --git a/app/code/Magento/Catalog/Block/Product/ProductList/Random.php b/app/code/Magento/Catalog/Block/Product/ProductList/Random.php index 51a99f2d9738b55cc10c3f01d1062a1585e1288d..d14df1a7d4bb1fb4f8e3ec3169d00e075b111ee2 100644 --- a/app/code/Magento/Catalog/Block/Product/ProductList/Random.php +++ b/app/code/Magento/Catalog/Block/Product/ProductList/Random.php @@ -48,13 +48,12 @@ class Random extends \Magento\Catalog\Block\Product\ListProduct protected $_layerFactory; /** - * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\View\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Catalog\Model\Config $catalogConfig - * @param \Magento\Core\Model\Registry $coreRegistry + * @param \Magento\Core\Model\Registry $registry * @param \Magento\Tax\Helper\Data $taxData * @param \Magento\Catalog\Helper\Data $catalogData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Math\Random $mathRandom * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory * @param \Magento\Catalog\Model\Layer $catalogLayer @@ -63,13 +62,12 @@ class Random extends \Magento\Catalog\Block\Product\ListProduct * @param array $data */ public function __construct( - \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\View\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Catalog\Model\Config $catalogConfig, - \Magento\Core\Model\Registry $coreRegistry, + \Magento\Core\Model\Registry $registry, \Magento\Tax\Helper\Data $taxData, \Magento\Catalog\Helper\Data $catalogData, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Math\Random $mathRandom, \Magento\Catalog\Model\CategoryFactory $categoryFactory, \Magento\Catalog\Model\Layer $catalogLayer, @@ -80,13 +78,12 @@ class Random extends \Magento\Catalog\Block\Product\ListProduct $this->_layerFactory = $layerFactory; $this->_productCollectionFactory = $productCollectionFactory; parent::__construct( - $storeManager, + $context, + $coreData, $catalogConfig, - $coreRegistry, + $registry, $taxData, $catalogData, - $coreData, - $context, $mathRandom, $categoryFactory, $catalogLayer, diff --git a/app/code/Magento/Catalog/Block/Product/ProductList/Related.php b/app/code/Magento/Catalog/Block/Product/ProductList/Related.php index 8d0ee404e5f131e34118674f790e582f570f7615..cbbbefec796738c0521c1c82d2264229afd967fd 100644 --- a/app/code/Magento/Catalog/Block/Product/ProductList/Related.php +++ b/app/code/Magento/Catalog/Block/Product/ProductList/Related.php @@ -64,28 +64,25 @@ class Related extends \Magento\Catalog\Block\Product\AbstractProduct protected $_checkoutCart; /** - * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\View\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Catalog\Model\Config $catalogConfig - * @param \Magento\Core\Model\Registry $coreRegistry + * @param \Magento\Core\Model\Registry $registry * @param \Magento\Tax\Helper\Data $taxData * @param \Magento\Catalog\Helper\Data $catalogData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Math\Random $mathRandom * @param \Magento\Checkout\Model\Resource\Cart $checkoutCart * @param \Magento\Catalog\Model\Product\Visibility $catalogProductVisibility * @param \Magento\Checkout\Model\Session $checkoutSession - * @param \Magento\Core\Model\Registry $coreRegistry * @param array $data */ public function __construct( - \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\View\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Catalog\Model\Config $catalogConfig, - \Magento\Core\Model\Registry $coreRegistry, + \Magento\Core\Model\Registry $registry, \Magento\Tax\Helper\Data $taxData, \Magento\Catalog\Helper\Data $catalogData, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Math\Random $mathRandom, \Magento\Checkout\Model\Resource\Cart $checkoutCart, \Magento\Catalog\Model\Product\Visibility $catalogProductVisibility, @@ -95,17 +92,7 @@ class Related extends \Magento\Catalog\Block\Product\AbstractProduct $this->_checkoutCart = $checkoutCart; $this->_catalogProductVisibility = $catalogProductVisibility; $this->_checkoutSession = $checkoutSession; - parent::__construct( - $storeManager, - $catalogConfig, - $coreRegistry, - $taxData, - $catalogData, - $coreData, - $context, - $mathRandom, - $data - ); + parent::__construct($context, $coreData, $catalogConfig, $registry, $taxData, $catalogData, $mathRandom, $data); } protected function _prepareData() diff --git a/app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php b/app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php index c3849bc439fba7f68b2b7768f3af306bb6f4eca6..b5c72df453abea0754f50307a7f5077780269c05 100644 --- a/app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php +++ b/app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php @@ -34,7 +34,7 @@ */ namespace Magento\Catalog\Block\Product\ProductList; -class Toolbar extends \Magento\Core\Block\Template +class Toolbar extends \Magento\View\Block\Template { /** * Products collection @@ -158,24 +158,22 @@ class Toolbar extends \Magento\Core\Block\Template protected $_catalogSession; /** - * Construct - * + * @param \Magento\View\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Catalog\Model\Session $catalogSession * @param \Magento\Catalog\Model\Config $catalogConfig - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Catalog\Model\Session $catalogSession, \Magento\Catalog\Model\Config $catalogConfig, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, array $data = array() ) { $this->_catalogSession = $catalogSession; $this->_catalogConfig = $catalogConfig; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Catalog/Block/Product/ProductList/Upsell.php b/app/code/Magento/Catalog/Block/Product/ProductList/Upsell.php index f8a15b1914511d1a7a3d51de0076d89dd41e683c..8e53a409ae0859ba1ce0e65ab239052ed03c14dc 100644 --- a/app/code/Magento/Catalog/Block/Product/ProductList/Upsell.php +++ b/app/code/Magento/Catalog/Block/Product/ProductList/Upsell.php @@ -70,47 +70,37 @@ class Upsell extends \Magento\Catalog\Block\Product\AbstractProduct protected $_checkoutCart; /** - * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\View\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Catalog\Model\Config $catalogConfig - * @param \Magento\Core\Model\Registry $coreRegistry + * @param \Magento\Core\Model\Registry $registry * @param \Magento\Tax\Helper\Data $taxData * @param \Magento\Catalog\Helper\Data $catalogData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Math\Random $mathRandom * @param \Magento\Checkout\Model\Resource\Cart $checkoutCart * @param \Magento\Catalog\Model\Product\Visibility $catalogProductVisibility * @param \Magento\Checkout\Model\Session $checkoutSession + * @param \Magento\Core\Model\Registry $coreRegistry * @param array $data */ public function __construct( - \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\View\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Catalog\Model\Config $catalogConfig, - \Magento\Core\Model\Registry $coreRegistry, + \Magento\Core\Model\Registry $registry, \Magento\Tax\Helper\Data $taxData, \Magento\Catalog\Helper\Data $catalogData, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Math\Random $mathRandom, \Magento\Checkout\Model\Resource\Cart $checkoutCart, \Magento\Catalog\Model\Product\Visibility $catalogProductVisibility, \Magento\Checkout\Model\Session $checkoutSession, + \Magento\Core\Model\Registry $coreRegistry, array $data = array() ) { $this->_checkoutCart = $checkoutCart; $this->_catalogProductVisibility = $catalogProductVisibility; $this->_checkoutSession = $checkoutSession; - parent::__construct( - $storeManager, - $catalogConfig, - $coreRegistry, - $taxData, - $catalogData, - $coreData, - $context, - $mathRandom, - $data - ); + parent::__construct($context, $coreData, $catalogConfig, $registry, $taxData, $catalogData, $mathRandom, $data); } protected function _prepareData() diff --git a/app/code/Magento/Catalog/Block/Product/Send.php b/app/code/Magento/Catalog/Block/Product/Send.php index c86c541b6b5ba875fc6dadb36fce9283f632b1d0..35d31e0bcef2e2dca016a3a069657b9115976498 100644 --- a/app/code/Magento/Catalog/Block/Product/Send.php +++ b/app/code/Magento/Catalog/Block/Product/Send.php @@ -44,41 +44,29 @@ class Send extends \Magento\Catalog\Block\Product\AbstractProduct protected $_customerSession; /** - * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\View\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Catalog\Model\Config $catalogConfig - * @param \Magento\Core\Model\Registry $coreRegistry + * @param \Magento\Core\Model\Registry $registry * @param \Magento\Tax\Helper\Data $taxData * @param \Magento\Catalog\Helper\Data $catalogData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Math\Random $mathRandom * @param \Magento\Customer\Model\Session $customerSession * @param array $data */ public function __construct( - \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\View\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Catalog\Model\Config $catalogConfig, - \Magento\Core\Model\Registry $coreRegistry, + \Magento\Core\Model\Registry $registry, \Magento\Tax\Helper\Data $taxData, \Magento\Catalog\Helper\Data $catalogData, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Math\Random $mathRandom, \Magento\Customer\Model\Session $customerSession, array $data = array() ) { $this->_customerSession = $customerSession; - parent::__construct( - $storeManager, - $catalogConfig, - $coreRegistry, - $taxData, - $catalogData, - $coreData, - $context, - $mathRandom, - $data - ); + parent::__construct($context, $coreData, $catalogConfig, $registry, $taxData, $catalogData, $mathRandom, $data); } /** diff --git a/app/code/Magento/Catalog/Block/Product/TemplateSelector.php b/app/code/Magento/Catalog/Block/Product/TemplateSelector.php index c2a3524f14b7b58f895c45a7ac9ded1fcc2f4ef2..758c6c51e9e4ff0a9aa652a94abbab08636bee34 100644 --- a/app/code/Magento/Catalog/Block/Product/TemplateSelector.php +++ b/app/code/Magento/Catalog/Block/Product/TemplateSelector.php @@ -31,7 +31,7 @@ namespace Magento\Catalog\Block\Product; * * @SuppressWarnings(PHPMD.LongVariable) */ -class TemplateSelector extends \Magento\Core\Block\Template +class TemplateSelector extends \Magento\View\Block\Template { /** * Core registry @@ -55,19 +55,17 @@ class TemplateSelector extends \Magento\Core\Block\Template protected $_resourceHelper; /** - * Construct - * - * @param \Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory $setColFactory + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context + * @param \Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory $setColFactory * @param \Magento\Core\Model\Registry $registry * @param \Magento\Catalog\Model\Resource\Helper $resourceHelper * @param array $data */ public function __construct( - \Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory $setColFactory, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, + \Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory $setColFactory, \Magento\Core\Model\Registry $registry, \Magento\Catalog\Model\Resource\Helper $resourceHelper, array $data = array() @@ -75,7 +73,7 @@ class TemplateSelector extends \Magento\Core\Block\Template $this->_setColFactory = $setColFactory; $this->_coreRegistry = $registry; $this->_resourceHelper = $resourceHelper; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Catalog/Block/Product/View.php b/app/code/Magento/Catalog/Block/Product/View.php index 8323b9cc02db7423e95731bd772ae19d179a839a..91c0c05399b3539aaffe52cfd350bd9a0061d483 100644 --- a/app/code/Magento/Catalog/Block/Product/View.php +++ b/app/code/Magento/Catalog/Block/Product/View.php @@ -52,13 +52,6 @@ class View extends \Magento\Catalog\Block\Product\AbstractProduct */ protected $_taxCalculation; - /** - * Locale - * - * @var \Magento\Core\Model\LocaleInterface - */ - protected $_locale; - /** * Product factory * @@ -67,52 +60,35 @@ class View extends \Magento\Catalog\Block\Product\AbstractProduct protected $_productFactory; /** - * Construct - * - * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\View\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Catalog\Model\Config $catalogConfig - * @param \Magento\Catalog\Model\ProductFactory $productFactory - * @param \Magento\Core\Model\LocaleInterface $locale - * @param \Magento\Tax\Model\Calculation $taxCalculation - * @param \Magento\Core\Model\Registry $coreRegistry - * @param \Magento\Stdlib\String $string + * @param \Magento\Core\Model\Registry $registry * @param \Magento\Tax\Helper\Data $taxData * @param \Magento\Catalog\Helper\Data $catalogData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Math\Random $mathRandom + * @param \Magento\Catalog\Model\ProductFactory $productFactory + * @param \Magento\Tax\Model\Calculation $taxCalculation + * @param \Magento\Stdlib\String $string * @param array $data */ public function __construct( - \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\View\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Catalog\Model\Config $catalogConfig, - \Magento\Catalog\Model\ProductFactory $productFactory, - \Magento\Core\Model\LocaleInterface $locale, - \Magento\Tax\Model\Calculation $taxCalculation, - \Magento\Core\Model\Registry $coreRegistry, - \Magento\Stdlib\String $string, + \Magento\Core\Model\Registry $registry, \Magento\Tax\Helper\Data $taxData, \Magento\Catalog\Helper\Data $catalogData, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Math\Random $mathRandom, + \Magento\Catalog\Model\ProductFactory $productFactory, + \Magento\Tax\Model\Calculation $taxCalculation, + \Magento\Stdlib\String $string, array $data = array() ) { $this->_productFactory = $productFactory; - $this->_locale = $locale; $this->_taxCalculation = $taxCalculation; $this->string = $string; - parent::__construct( - $storeManager, - $catalogConfig, - $coreRegistry, - $taxData, - $catalogData, - $coreData, - $context, - $mathRandom, - $data - ); + parent::__construct($context, $coreData, $catalogConfig, $registry, $taxData, $catalogData, $mathRandom, $data); } /** @@ -208,7 +184,7 @@ class View extends \Magento\Catalog\Block\Product\AbstractProduct $additional['wishlist_next'] = 1; } - $addUrlKey = \Magento\Core\Controller\Front\Action::PARAM_NAME_URL_ENCODED; + $addUrlKey = \Magento\App\Action\Action::PARAM_NAME_URL_ENCODED; $addUrlValue = $this->_urlBuilder->getUrl('*/*/*', array('_use_rewrite' => true, '_current' => true)); $additional[$addUrlKey] = $this->_coreData->urlEncode($addUrlValue); diff --git a/app/code/Magento/Catalog/Block/Product/View/AbstractView.php b/app/code/Magento/Catalog/Block/Product/View/AbstractView.php index 7543e612f480cca7be78554a86570c14516c087e..0d684a721a8a36536da85c74c60b14592bbf4593 100644 --- a/app/code/Magento/Catalog/Block/Product/View/AbstractView.php +++ b/app/code/Magento/Catalog/Block/Product/View/AbstractView.php @@ -41,43 +41,32 @@ abstract class AbstractView extends \Magento\Catalog\Block\Product\AbstractProdu protected $arrayUtils; /** - * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\View\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Catalog\Model\Config $catalogConfig - * @param \Magento\Core\Model\Registry $coreRegistry + * @param \Magento\Core\Model\Registry $registry * @param \Magento\Tax\Helper\Data $taxData * @param \Magento\Catalog\Helper\Data $catalogData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Math\Random $mathRandom * @param \Magento\Stdlib\ArrayUtils $arrayUtils * @param array $data */ public function __construct( - \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\View\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Catalog\Model\Config $catalogConfig, - \Magento\Core\Model\Registry $coreRegistry, + \Magento\Core\Model\Registry $registry, \Magento\Tax\Helper\Data $taxData, \Magento\Catalog\Helper\Data $catalogData, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Math\Random $mathRandom, \Magento\Stdlib\ArrayUtils $arrayUtils, array $data = array() ) { $this->arrayUtils = $arrayUtils; - parent::__construct( - $storeManager, - $catalogConfig, - $coreRegistry, - $taxData, - $catalogData, - $coreData, - $context, - $mathRandom, - $data - ); + parent::__construct($context, $coreData, $catalogConfig, $registry, $taxData, $catalogData, $mathRandom, $data); } + /** * Retrive product * diff --git a/app/code/Magento/Catalog/Block/Product/View/Additional.php b/app/code/Magento/Catalog/Block/Product/View/Additional.php index 613da7aca3187dde139ec526a73bc0baac5f06a9..a9d07f23c1f744f115282925fe8df171f19ee8cc 100644 --- a/app/code/Magento/Catalog/Block/Product/View/Additional.php +++ b/app/code/Magento/Catalog/Block/Product/View/Additional.php @@ -34,7 +34,7 @@ */ namespace Magento\Catalog\Block\Product\View; -class Additional extends \Magento\Core\Block\Template +class Additional extends \Magento\View\Block\Template { protected $_list; diff --git a/app/code/Magento/Catalog/Block/Product/View/Attributes.php b/app/code/Magento/Catalog/Block/Product/View/Attributes.php index ed1397ff8df2288f88689c53f86a96ab97c02e3f..6576cae55bac8aabe31eeefc11ecebd0d7656f9d 100644 --- a/app/code/Magento/Catalog/Block/Product/View/Attributes.php +++ b/app/code/Magento/Catalog/Block/Product/View/Attributes.php @@ -34,7 +34,7 @@ */ namespace Magento\Catalog\Block\Product\View; -class Attributes extends \Magento\Core\Block\Template +class Attributes extends \Magento\View\Block\Template { protected $_product = null; @@ -46,31 +46,19 @@ class Attributes extends \Magento\Core\Block\Template protected $_coreRegistry = null; /** - * Store manager - * - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - - /** - * Construct - * - * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Core\Model\Registry $registry * @param array $data */ public function __construct( - \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Core\Model\Registry $registry, array $data = array() ) { - $this->_storeManager = $storeManager; $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } function getProduct() diff --git a/app/code/Magento/Catalog/Block/Product/View/Description.php b/app/code/Magento/Catalog/Block/Product/View/Description.php index da7448dba01d2ce2c5dbc17c5e769c59da821a5f..6e7c0fdae58a60a0193fb214439a4f6e247365a5 100644 --- a/app/code/Magento/Catalog/Block/Product/View/Description.php +++ b/app/code/Magento/Catalog/Block/Product/View/Description.php @@ -34,7 +34,7 @@ */ namespace Magento\Catalog\Block\Product\View; -class Description extends \Magento\Core\Block\Template +class Description extends \Magento\View\Block\Template { protected $_product = null; @@ -46,19 +46,19 @@ class Description extends \Magento\Core\Block\Template protected $_coreRegistry = null; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Core\Model\Registry $registry * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Core\Model\Registry $registry, array $data = array() ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } public function getProduct() diff --git a/app/code/Magento/Catalog/Block/Product/View/Options.php b/app/code/Magento/Catalog/Block/Product/View/Options.php index a31b562e3f3352dd5b535cd9031d8edf141fd66d..b9f791510f48d3442c59fc2a8a4f8bf3ddccfcd1 100644 --- a/app/code/Magento/Catalog/Block/Product/View/Options.php +++ b/app/code/Magento/Catalog/Block/Product/View/Options.php @@ -34,7 +34,7 @@ */ namespace Magento\Catalog\Block\Product\View; -class Options extends \Magento\Core\Block\Template +class Options extends \Magento\View\Block\Template { protected $_product; @@ -67,38 +67,31 @@ class Options extends \Magento\Core\Block\Template protected $_catalogProduct; /** - * @var \Magento\Stdlib\ArrayUtils - */ - protected $arrayUtils; - - /** - * Construct - * + * @param \Magento\View\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Catalog\Model\Product $catalogProduct * @param \Magento\Tax\Helper\Data $taxData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Catalog\Model\Product\Option $option * @param \Magento\Core\Model\Registry $registry * @param \Magento\Stdlib\ArrayUtils $arrayUtils * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Catalog\Model\Product $catalogProduct, \Magento\Tax\Helper\Data $taxData, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Catalog\Model\Product\Option $option, \Magento\Core\Model\Registry $registry, \Magento\Stdlib\ArrayUtils $arrayUtils, array $data = array() ) { $this->_catalogProduct = $catalogProduct; - parent::__construct($coreData, $context, $data); $this->_registry = $registry; $this->_option = $option; $this->_taxData = $taxData; $this->arrayUtils = $arrayUtils; + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Catalog/Block/Product/View/Options/AbstractOptions.php b/app/code/Magento/Catalog/Block/Product/View/Options/AbstractOptions.php index 48bda570b90bec92fe99a1d22e883ea5ef08d7cf..50693fb405530e6c16891e4fbe5e929c90b94780 100644 --- a/app/code/Magento/Catalog/Block/Product/View/Options/AbstractOptions.php +++ b/app/code/Magento/Catalog/Block/Product/View/Options/AbstractOptions.php @@ -34,7 +34,7 @@ */ namespace Magento\Catalog\Block\Product\View\Options; -abstract class AbstractOptions extends \Magento\Core\Block\Template +abstract class AbstractOptions extends \Magento\View\Block\Template { /** * Product object @@ -58,19 +58,19 @@ abstract class AbstractOptions extends \Magento\Core\Block\Template protected $_taxData = null; /** - * @param \Magento\Tax\Helper\Data $taxData + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context + * @param \Magento\Tax\Helper\Data $taxData * @param array $data */ public function __construct( - \Magento\Tax\Helper\Data $taxData, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, + \Magento\Tax\Helper\Data $taxData, array $data = array() ) { $this->_taxData = $taxData; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Catalog/Block/Product/View/Options/Type/Date.php b/app/code/Magento/Catalog/Block/Product/View/Options/Type/Date.php index c613f2a5afa6caf4b61e1ec0693929090029ecaa..6867d3546ed6b856b4486d1fa155affacb511c49 100644 --- a/app/code/Magento/Catalog/Block/Product/View/Options/Type/Date.php +++ b/app/code/Magento/Catalog/Block/Product/View/Options/Type/Date.php @@ -49,34 +49,21 @@ class Date extends \Magento\Catalog\Block\Product\View\Options\AbstractOptions protected $_catalogProductOptionTypeDate; /** - * Locale - * - * @var \Magento\Core\Model\LocaleInterface - */ - protected $_locale; - - /** - * Construct - * - * @param \Magento\Core\Model\LocaleInterface $locale - * @param \Magento\Catalog\Model\Product\Option\Type\Date - * $catalogProductOptionTypeDate - * @param \Magento\Tax\Helper\Data $taxData + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context + * @param \Magento\Tax\Helper\Data $taxData + * @param \Magento\Catalog\Model\Product\Option\Type\Date $catalogProductOptionTypeDate * @param array $data */ public function __construct( - \Magento\Core\Model\LocaleInterface $locale, - \Magento\Catalog\Model\Product\Option\Type\Date $catalogProductOptionTypeDate, - \Magento\Tax\Helper\Data $taxData, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, + \Magento\Tax\Helper\Data $taxData, + \Magento\Catalog\Model\Product\Option\Type\Date $catalogProductOptionTypeDate, array $data = array() ) { - $this->_locale = $locale; $this->_catalogProductOptionTypeDate = $catalogProductOptionTypeDate; - parent::__construct($taxData, $coreData, $context, $data); + parent::__construct($context, $coreData, $taxData, $data); } protected function _prepareLayout() @@ -125,7 +112,7 @@ class Date extends \Magento\Catalog\Block\Product\View\Options\AbstractOptions $yearEnd = $this->_catalogProductOptionTypeDate->getYearEnd(); $calendar = $this->getLayout() - ->createBlock('Magento\Core\Block\Html\Date') + ->createBlock('Magento\View\Block\Html\Date') ->setId('options_'.$this->getOption()->getId().'_date') ->setName('options['.$this->getOption()->getId().'][date]') ->setClass('product-custom-option datetime-picker input-text') @@ -216,7 +203,7 @@ class Date extends \Magento\Catalog\Block\Product\View\Options\AbstractOptions * HTML select element * * @param string $name Id/name of html select element - * @return \Magento\Core\Block\Html\Select + * @return \Magento\View\Block\Html\Select */ protected function _getHtmlSelect($name, $value = null) { @@ -226,7 +213,7 @@ class Date extends \Magento\Catalog\Block\Product\View\Options\AbstractOptions // $require = $this->getOption()->getIsRequire() ? ' required-entry' : ''; $require = ''; - $select = $this->getLayout()->createBlock('Magento\Core\Block\Html\Select') + $select = $this->getLayout()->createBlock('Magento\View\Block\Html\Select') ->setId('options_' . $this->getOption()->getId() . '_' . $name) ->setClass('product-custom-option datetime-picker' . $require) ->setExtraParams() diff --git a/app/code/Magento/Catalog/Block/Product/View/Options/Type/Select.php b/app/code/Magento/Catalog/Block/Product/View/Options/Type/Select.php index 3b287f383f284a2dfbb3ba87ecf47b9778d07c11..2f6b0a0cae5867f338b685630544a251beb89211 100644 --- a/app/code/Magento/Catalog/Block/Product/View/Options/Type/Select.php +++ b/app/code/Magento/Catalog/Block/Product/View/Options/Type/Select.php @@ -54,7 +54,7 @@ class Select || $_option->getType() == \Magento\Catalog\Model\Product\Option::OPTION_TYPE_MULTIPLE) { $require = ($_option->getIsRequire()) ? ' required' : ''; $extraParams = ''; - $select = $this->getLayout()->createBlock('Magento\Core\Block\Html\Select') + $select = $this->getLayout()->createBlock('Magento\View\Block\Html\Select') ->setData(array( 'id' => 'select_'.$_option->getId(), 'class' => $require.' product-custom-option' diff --git a/app/code/Magento/Catalog/Block/Product/View/Price.php b/app/code/Magento/Catalog/Block/Product/View/Price.php index ac1e5860d50d7a3f767145ad6e7ffe8043bee29a..c7ee886d324796c0ed5735fb6435517a34b5435b 100644 --- a/app/code/Magento/Catalog/Block/Product/View/Price.php +++ b/app/code/Magento/Catalog/Block/Product/View/Price.php @@ -29,7 +29,7 @@ */ namespace Magento\Catalog\Block\Product\View; -class Price extends \Magento\Core\Block\Template +class Price extends \Magento\View\Block\Template { /** * Core registry @@ -39,19 +39,19 @@ class Price extends \Magento\Core\Block\Template protected $_coreRegistry = null; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Core\Model\Registry $registry * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Core\Model\Registry $registry, array $data = array() ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } public function getPrice() diff --git a/app/code/Magento/Catalog/Block/Product/View/Tabs.php b/app/code/Magento/Catalog/Block/Product/View/Tabs.php index 6ae02f5d6805e170ebde388a9a4da1a7ba1a30d5..c4384e1a69194eb0927852e094b2ed2b6abe89fb 100644 --- a/app/code/Magento/Catalog/Block/Product/View/Tabs.php +++ b/app/code/Magento/Catalog/Block/Product/View/Tabs.php @@ -29,7 +29,7 @@ */ namespace Magento\Catalog\Block\Product\View; -class Tabs extends \Magento\Core\Block\Template +class Tabs extends \Magento\View\Block\Template { /** * Configured tabs diff --git a/app/code/Magento/Catalog/Block/Product/View/Type/Configurable.php b/app/code/Magento/Catalog/Block/Product/View/Type/Configurable.php index 47ce73a86ce0e337552a820d7f2e98c17c0e330b..eaab4c369e2f1072bd0b872981043372a4c0643b 100644 --- a/app/code/Magento/Catalog/Block/Product/View/Type/Configurable.php +++ b/app/code/Magento/Catalog/Block/Product/View/Type/Configurable.php @@ -65,13 +65,12 @@ class Configurable extends \Magento\Catalog\Block\Product\View\AbstractView protected $_taxCalculation; /** - * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\View\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Catalog\Model\Config $catalogConfig - * @param \Magento\Core\Model\Registry $coreRegistry + * @param \Magento\Core\Model\Registry $registry * @param \Magento\Tax\Helper\Data $taxData * @param \Magento\Catalog\Helper\Data $catalogData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Math\Random $mathRandom * @param \Magento\Stdlib\ArrayUtils $arrayUtils * @param \Magento\Tax\Model\Calculation $taxCalculation @@ -79,13 +78,12 @@ class Configurable extends \Magento\Catalog\Block\Product\View\AbstractView * @param array $data */ public function __construct( - \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\View\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Catalog\Model\Config $catalogConfig, - \Magento\Core\Model\Registry $coreRegistry, + \Magento\Core\Model\Registry $registry, \Magento\Tax\Helper\Data $taxData, \Magento\Catalog\Helper\Data $catalogData, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Math\Random $mathRandom, \Magento\Stdlib\ArrayUtils $arrayUtils, \Magento\Tax\Model\Calculation $taxCalculation, @@ -95,16 +93,7 @@ class Configurable extends \Magento\Catalog\Block\Product\View\AbstractView $this->_taxCalculation = $taxCalculation; $this->_catalogProduct = $catalogProduct; parent::__construct( - $storeManager, - $catalogConfig, - $coreRegistry, - $taxData, - $catalogData, - $coreData, - $context, - $mathRandom, - $arrayUtils, - $data + $context, $coreData, $catalogConfig, $registry, $taxData, $catalogData, $mathRandom, $arrayUtils, $data ); } diff --git a/app/code/Magento/Catalog/Block/Product/Widget/Link.php b/app/code/Magento/Catalog/Block/Product/Widget/Link.php index 445e4304a17857724f0823a911caa1892ca04984..c5033970afa4cdd942ca43bf2133d592e1b1d311 100644 --- a/app/code/Magento/Catalog/Block/Product/Widget/Link.php +++ b/app/code/Magento/Catalog/Block/Product/Widget/Link.php @@ -38,24 +38,20 @@ class Link extends \Magento\Catalog\Block\Widget\Link { /** - * Construct - * - * @param \Magento\Catalog\Model\Resource\Product $catalogProduct - * @param \Magento\Core\Model\Resource\Url\Rewrite $urlRewrite - * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context + * @param \Magento\Core\Model\Resource\Url\Rewrite $urlRewrite + * @param \Magento\Catalog\Model\Resource\Product $catalogProduct * @param array $data */ public function __construct( - \Magento\Catalog\Model\Resource\Product $catalogProduct, - \Magento\Core\Model\Resource\Url\Rewrite $urlRewrite, - \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, + \Magento\Core\Model\Resource\Url\Rewrite $urlRewrite, + \Magento\Catalog\Model\Resource\Product $catalogProduct, array $data = array() ) { - parent::__construct($urlRewrite, $storeManager, $coreData, $context, $data); + parent::__construct($context, $coreData, $urlRewrite, $data); $this->_entityResource = $catalogProduct; } } diff --git a/app/code/Magento/Catalog/Block/Product/Widget/NewWidget.php b/app/code/Magento/Catalog/Block/Product/Widget/NewWidget.php index b0b3b4866b9679b8d03e363f5898288e444c5da7..af3a3c62c0bf8c1a48194652861b9bc2c1ecdb4e 100644 --- a/app/code/Magento/Catalog/Block/Product/Widget/NewWidget.php +++ b/app/code/Magento/Catalog/Block/Product/Widget/NewWidget.php @@ -201,7 +201,7 @@ class NewWidget extends \Magento\Catalog\Block\Product\NewProduct ->setTotalLimit($this->getProductsCount()) ->setCollection($this->getProductCollection()); } - if ($this->_pager instanceof \Magento\Core\Block\AbstractBlock) { + if ($this->_pager instanceof \Magento\View\Block\AbstractBlock) { return $this->_pager->toHtml(); } } diff --git a/app/code/Magento/Catalog/Block/Widget/Link.php b/app/code/Magento/Catalog/Block/Widget/Link.php index 29db4ed58b696ee274a79bd6d8de0666bc1f9591..6479a6f52c7ca73d84c49fb8f60e1bc0ee82ce6c 100644 --- a/app/code/Magento/Catalog/Block/Widget/Link.php +++ b/app/code/Magento/Catalog/Block/Widget/Link.php @@ -35,7 +35,7 @@ namespace Magento\Catalog\Block\Widget; class Link - extends \Magento\Core\Block\Html\Link + extends \Magento\View\Block\Html\Link implements \Magento\Widget\Block\BlockInterface { /** @@ -58,13 +58,6 @@ class Link */ protected $_anchorText; - /** - * Store manager - * - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - /** * Url rewrite * @@ -73,24 +66,19 @@ class Link protected $_urlRewrite; /** - * Construct - * - * @param \Magento\Core\Model\Resource\Url\Rewrite $urlRewrite - * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context + * @param \Magento\Core\Model\Resource\Url\Rewrite $urlRewrite * @param array $data */ public function __construct( - \Magento\Core\Model\Resource\Url\Rewrite $urlRewrite, - \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, + \Magento\Core\Model\Resource\Url\Rewrite $urlRewrite, array $data = array() ) { $this->_urlRewrite = $urlRewrite; - $this->_storeManager = $storeManager; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Category.php b/app/code/Magento/Catalog/Controller/Adminhtml/Category.php index 61a0934b9653defac1454f4927589366379f156d..4b71aba1147853cf575ff46664aed9f720638275 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Category.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Category.php @@ -29,7 +29,7 @@ */ namespace Magento\Catalog\Controller\Adminhtml; -class Category extends \Magento\Backend\Controller\Adminhtml\Action +class Category extends \Magento\Backend\App\Action { /** * Initialize requested category and put it into registry. @@ -40,7 +40,7 @@ class Category extends \Magento\Backend\Controller\Adminhtml\Action */ protected function _initCategory($getRootInstead = false) { - $this->_title(__('Categories')); + $this->_title->add(__('Categories')); $categoryId = (int)$this->getRequest()->getParam('id', false); $storeId = (int)$this->getRequest()->getParam('store'); @@ -135,7 +135,7 @@ class Category extends \Magento\Backend\Controller\Adminhtml\Action return; } - $this->_title($categoryId ? $category->getName() : __('Categories')); + $this->_title->add($categoryId ? $category->getName() : __('Categories')); /** * Check if we have data in session (if during category save was exception) @@ -170,13 +170,13 @@ class Category extends \Magento\Backend\Controller\Adminhtml\Action ->setLastViewedStore($this->getRequest()->getParam('store')); $this->_objectManager->get('Magento\Backend\Model\Auth\Session') ->setLastEditedCategory($category->getId()); - $this->loadLayout(); + $this->_view->loadLayout(); $eventResponse = new \Magento\Object(array( - 'content' => $this->getLayout()->getBlock('category.edit')->getFormHtml() - . $this->getLayout()->getBlock('category.tree') + 'content' => $this->_view->getLayout()->getBlock('category.edit')->getFormHtml() + . $this->_view->getLayout()->getBlock('category.tree') ->getBreadcrumbsJavascript($breadcrumbsPath, 'editingCategoryBreadcrumbs'), - 'messages' => $this->getLayout()->getMessagesBlock()->getGroupedHtml(), + 'messages' => $this->_view->getLayout()->getMessagesBlock()->getGroupedHtml(), )); $this->_eventManager->dispatch( 'category_prepare_ajax_response', @@ -191,18 +191,18 @@ class Category extends \Magento\Backend\Controller\Adminhtml\Action return; } - $this->loadLayout(); + $this->_view->loadLayout(); $this->_setActiveMenu('Magento_Catalog::catalog_categories'); - $this->getLayout()->getBlock('head')->setCanLoadExtJs(true)->setContainerCssClass('catalog-categories'); + $this->_view->getLayout()->getBlock('head')->setCanLoadExtJs(true)->setContainerCssClass('catalog-categories'); $this->_addBreadcrumb(__('Manage Catalog Categories'), __('Manage Categories')); - $block = $this->getLayout()->getBlock('catalog.wysiwyg.js'); + $block = $this->_view->getLayout()->getBlock('catalog.wysiwyg.js'); if ($block) { $block->setStoreId($storeId); } - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -216,7 +216,7 @@ class Category extends \Magento\Backend\Controller\Adminhtml\Action $storeMediaUrl = $this->_objectManager->get('Magento\Core\Model\StoreManagerInterface')->getStore($storeId) ->getBaseUrl(\Magento\Core\Model\Store::URL_TYPE_MEDIA); - $content = $this->getLayout()->createBlock( + $content = $this->_view->getLayout()->createBlock( 'Magento\Catalog\Block\Adminhtml\Helper\Form\Wysiwyg\Content', '', array( @@ -249,7 +249,7 @@ class Category extends \Magento\Backend\Controller\Adminhtml\Action return; } $this->getResponse()->setBody( - $this->getLayout()->createBlock('Magento\Catalog\Block\Adminhtml\Category\Tree') + $this->_view->getLayout()->createBlock('Magento\Catalog\Block\Adminhtml\Category\Tree') ->getTreeJson($category) ); } @@ -363,8 +363,8 @@ class Category extends \Magento\Backend\Controller\Adminhtml\Action if ($this->getRequest()->getPost('return_session_messages_only')) { $category->load($category->getId()); // to obtain truncated category name - /** @var $block \Magento\Core\Block\Messages */ - $block = $this->_objectManager->get('Magento\Core\Block\Messages'); + /** @var $block \Magento\View\Block\Messages */ + $block = $this->_objectManager->get('Magento\View\Block\Messages'); $block->setMessages($this->_getSession()->getMessages(true)); $body = $this->_objectManager->get('Magento\Core\Helper\Data')->jsonEncode(array( 'messages' => $block->getGroupedHtml(), @@ -468,7 +468,7 @@ class Category extends \Magento\Backend\Controller\Adminhtml\Action if (!$category) { return; } - $this->getResponse()->setBody($this->getLayout()->createBlock( + $this->getResponse()->setBody($this->_view->getLayout()->createBlock( 'Magento\Catalog\Block\Adminhtml\Category\Tab\Product', 'category.product.grid' )->toHtml()); } @@ -492,7 +492,7 @@ class Category extends \Magento\Backend\Controller\Adminhtml\Action $category = $this->_initCategory(true); - $block = $this->getLayout()->createBlock('Magento\Catalog\Block\Adminhtml\Category\Tree'); + $block = $this->_view->getLayout()->createBlock('Magento\Catalog\Block\Adminhtml\Category\Tree'); $root = $block->getRoot(); $this->getResponse()->setBody($this->_objectManager->get('Magento\Core\Helper\Data')->jsonEncode(array( 'data' => $block->getTree(), @@ -530,7 +530,7 @@ class Category extends \Magento\Backend\Controller\Adminhtml\Action */ public function suggestCategoriesAction() { - $this->getResponse()->setBody($this->getLayout()->createBlock('Magento\Catalog\Block\Adminhtml\Category\Tree') + $this->getResponse()->setBody($this->_view->getLayout()->createBlock('Magento\Catalog\Block\Adminhtml\Category\Tree') ->getSuggestedCategoriesJson($this->getRequest()->getParam('label_part'))); } diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Category/Widget.php b/app/code/Magento/Catalog/Controller/Adminhtml/Category/Widget.php index 25e08961c82e23c600f86686af791635261d511d..8731437136b3327d9f35008eb909d341ad2b5041 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Category/Widget.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Category/Widget.php @@ -33,7 +33,7 @@ */ namespace Magento\Catalog\Controller\Adminhtml\Category; -class Widget extends \Magento\Backend\Controller\Adminhtml\Action +class Widget extends \Magento\Backend\App\Action { /** * Core registry @@ -43,11 +43,11 @@ class Widget extends \Magento\Backend\Controller\Adminhtml\Action protected $_coreRegistry = null; /** - * @param \Magento\Backend\Controller\Context $context + * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Core\Model\Registry $coreRegistry */ public function __construct( - \Magento\Backend\Controller\Context $context, + \Magento\Backend\App\Action\Context $context, \Magento\Core\Model\Registry $coreRegistry ) { $this->_coreRegistry = $coreRegistry; @@ -85,7 +85,7 @@ class Widget extends \Magento\Backend\Controller\Adminhtml\Action protected function _getCategoryTreeBlock() { - return $this->getLayout()->createBlock('Magento\Catalog\Block\Adminhtml\Category\Widget\Chooser', '', array( + return $this->_view->getLayout()->createBlock('Magento\Catalog\Block\Adminhtml\Category\Widget\Chooser', '', array( 'data' => array( 'id' => $this->getRequest()->getParam('uniq_id'), 'use_massaction' => $this->getRequest()->getParam('use_massaction', false) diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product.php index 9a7d1518d3f33c6a30d3215a644b210115b94e04..4ac2ac629160541367baf4b40bc1fdd9a0206f48 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product.php @@ -33,7 +33,9 @@ */ namespace Magento\Catalog\Controller\Adminhtml; -class Product extends \Magento\Backend\Controller\Adminhtml\Action +use Magento\Backend\App\Action; + +class Product extends \Magento\Backend\App\Action { /** * The greatest value which could be stored in CatalogInventory Qty field @@ -55,14 +57,22 @@ class Product extends \Magento\Backend\Controller\Adminhtml\Action protected $_coreRegistry = null; /** - * @param \Magento\Backend\Controller\Context $context + * @var \Magento\Core\Filter\Date + */ + protected $_dateFilter; + + /** + * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Core\Model\Registry $coreRegistry + * @param \Magento\Core\Filter\Date $dateFilter */ public function __construct( - \Magento\Backend\Controller\Context $context, - \Magento\Core\Model\Registry $coreRegistry + \Magento\Backend\App\Action\Context $context, + \Magento\Core\Model\Registry $coreRegistry, + \Magento\Core\Filter\Date $dateFilter ) { $this->_coreRegistry = $coreRegistry; + $this->_dateFilter = $dateFilter; parent::__construct($context); } @@ -73,7 +83,7 @@ class Product extends \Magento\Backend\Controller\Adminhtml\Action */ protected function _initProduct() { - $this->_title(__('Products')); + $this->_title->add(__('Products')); $productId = (int)$this->getRequest()->getParam('id'); /** @var $product \Magento\Catalog\Model\Product */ @@ -171,7 +181,7 @@ class Product extends \Magento\Backend\Controller\Adminhtml\Action \Magento\Adminhtml\Block\Widget\Grid $gridBlock, $productsArray ) { - return $this->getLayout()->createBlock('Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Ajax\Serializer') + return $this->_view->getLayout()->createBlock('Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Ajax\Serializer') ->setGridBlock($gridBlock) ->setProducts($productsArray) ->setInputElementName($inputName); @@ -183,7 +193,7 @@ class Product extends \Magento\Backend\Controller\Adminhtml\Action protected function _outputBlocks() { $blocks = func_get_args(); - $output = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Text\ListText'); + $output = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Text\ListText'); foreach ($blocks as $block) { $output->insert($block, '', true); } @@ -195,10 +205,10 @@ class Product extends \Magento\Backend\Controller\Adminhtml\Action */ public function indexAction() { - $this->_title(__('Products')); - $this->loadLayout(); + $this->_title->add(__('Products')); + $this->_view->loadLayout(); $this->_setActiveMenu('Magento_Catalog::catalog_products'); - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -219,12 +229,12 @@ class Product extends \Magento\Backend\Controller\Adminhtml\Action $product->addData($productData); } - $this->_title(__('New Product')); + $this->_title->add(__('New Product')); $this->_eventManager->dispatch('catalog_product_new_action', array('product' => $product)); if ($this->getRequest()->getParam('popup')) { - $this->loadLayout('popup'); + $this->_view->loadLayout('popup'); } else { $_additionalLayoutPart = ''; if ($product->getTypeId() == \Magento\Catalog\Model\Product\Type::TYPE_CONFIGURABLE @@ -232,22 +242,22 @@ class Product extends \Magento\Backend\Controller\Adminhtml\Action ) { $_additionalLayoutPart = '_new'; } - $this->loadLayout(array( + $this->_view->loadLayout(array( 'default', - strtolower($this->getFullActionName()), + strtolower($this->_request->getFullActionName()), 'catalog_product_' . $product->getTypeId() . $_additionalLayoutPart )); $this->_setActiveMenu('Magento_Catalog::catalog_products'); } - $this->getLayout()->getBlock('head')->setCanLoadExtJs(true); + $this->_view->getLayout()->getBlock('head')->setCanLoadExtJs(true); - $block = $this->getLayout()->getBlock('catalog.wysiwyg.js'); + $block = $this->_view->getLayout()->getBlock('catalog.wysiwyg.js'); if ($block) { $block->setStoreId($product->getStoreId()); } - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -266,7 +276,7 @@ class Product extends \Magento\Backend\Controller\Adminhtml\Action return; } - $this->_title($product->getName()); + $this->_title->add($product->getName()); $this->_eventManager->dispatch('catalog_product_edit_action', array('product' => $product)); @@ -277,9 +287,9 @@ class Product extends \Magento\Backend\Controller\Adminhtml\Action $additionalLayoutPart = '_new'; } - $this->loadLayout(array( + $this->_view->loadLayout(array( 'default', - strtolower($this->getFullActionName()), + strtolower($this->_request->getFullActionName()), 'catalog_product_'.$product->getTypeId() . $additionalLayoutPart )); @@ -287,7 +297,7 @@ class Product extends \Magento\Backend\Controller\Adminhtml\Action if ( !$this->_objectManager->get('Magento\Core\Model\StoreManagerInterface')->isSingleStoreMode() - && ($switchBlock = $this->getLayout()->getBlock('store_switcher')) + && ($switchBlock = $this->_view->getLayout()->getBlock('store_switcher')) ) { $switchBlock->setDefaultStoreName(__('Default Values')) ->setWebsiteIds($product->getWebsiteIds()) @@ -300,14 +310,14 @@ class Product extends \Magento\Backend\Controller\Adminhtml\Action ))); } - $this->getLayout()->getBlock('head')->setCanLoadExtJs(true); + $this->_view->getLayout()->getBlock('head')->setCanLoadExtJs(true); - $block = $this->getLayout()->getBlock('catalog.wysiwyg.js'); + $block = $this->_view->getLayout()->getBlock('catalog.wysiwyg.js'); if ($block) { $block->setStoreId($product->getStoreId()); } - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -321,7 +331,7 @@ class Product extends \Magento\Backend\Controller\Adminhtml\Action $storeMediaUrl = $this->_objectManager->get('Magento\Core\Model\StoreManagerInterface') ->getStore($storeId)->getBaseUrl(\Magento\Core\Model\Store::URL_TYPE_MEDIA); - $content = $this->getLayout()->createBlock( + $content = $this->_view->getLayout()->createBlock( 'Magento\Catalog\Block\Adminhtml\Helper\Form\Wysiwyg\Content', '', array( @@ -340,8 +350,8 @@ class Product extends \Magento\Backend\Controller\Adminhtml\Action */ public function gridAction() { - $this->loadLayout(); - $this->renderLayout(); + $this->_view->loadLayout(); + $this->_view->renderLayout(); } /** @@ -350,13 +360,13 @@ class Product extends \Magento\Backend\Controller\Adminhtml\Action public function gridOnlyAction() { $this->_initProduct(); - $this->loadLayout(); + $this->_view->loadLayout(); $block = $this->getRequest()->getParam('gridOnlyBlock'); $blockClassSuffix = str_replace(' ', '_', ucwords(str_replace('_', ' ', $block))); $this->getResponse()->setBody( - $this->getLayout() + $this->_view->getLayout() ->createBlock('Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\\' . $blockClassSuffix) ->toHtml() ); @@ -369,8 +379,8 @@ class Product extends \Magento\Backend\Controller\Adminhtml\Action { $this->_saveAttributeOptions(); $this->_initProductSave($this->_initProduct()); - $this->loadLayout(); - $this->renderLayout(); + $this->_view->loadLayout(); + $this->_view->renderLayout(); } /** @@ -429,8 +439,8 @@ class Product extends \Magento\Backend\Controller\Adminhtml\Action public function categoriesAction() { $this->_initProduct(); - $this->loadLayout(); - $this->renderLayout(); + $this->_view->loadLayout(); + $this->_view->renderLayout(); } /** @@ -440,8 +450,8 @@ class Product extends \Magento\Backend\Controller\Adminhtml\Action public function optionsAction() { $this->_initProduct(); - $this->loadLayout(); - $this->renderLayout(); + $this->_view->loadLayout(); + $this->_view->renderLayout(); } /** @@ -450,10 +460,10 @@ class Product extends \Magento\Backend\Controller\Adminhtml\Action public function relatedAction() { $this->_initProduct(); - $this->loadLayout(); - $this->getLayout()->getBlock('catalog.product.edit.tab.related') + $this->_view->loadLayout(); + $this->_view->getLayout()->getBlock('catalog.product.edit.tab.related') ->setProductsRelated($this->getRequest()->getPost('products_related', null)); - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -462,10 +472,10 @@ class Product extends \Magento\Backend\Controller\Adminhtml\Action public function upsellAction() { $this->_initProduct(); - $this->loadLayout(); - $this->getLayout()->getBlock('catalog.product.edit.tab.upsell') + $this->_view->loadLayout(); + $this->_view->getLayout()->getBlock('catalog.product.edit.tab.upsell') ->setProductsUpsell($this->getRequest()->getPost('products_upsell', null)); - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -474,10 +484,10 @@ class Product extends \Magento\Backend\Controller\Adminhtml\Action public function crosssellAction() { $this->_initProduct(); - $this->loadLayout(); - $this->getLayout()->getBlock('catalog.product.edit.tab.crosssell') + $this->_view->loadLayout(); + $this->_view->getLayout()->getBlock('catalog.product.edit.tab.crosssell') ->setProductsCrossSell($this->getRequest()->getPost('products_crosssell', null)); - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -486,10 +496,10 @@ class Product extends \Magento\Backend\Controller\Adminhtml\Action public function relatedGridAction() { $this->_initProduct(); - $this->loadLayout(); - $this->getLayout()->getBlock('catalog.product.edit.tab.related') + $this->_view->loadLayout(); + $this->_view->getLayout()->getBlock('catalog.product.edit.tab.related') ->setProductsRelated($this->getRequest()->getPost('products_related', null)); - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -498,10 +508,10 @@ class Product extends \Magento\Backend\Controller\Adminhtml\Action public function upsellGridAction() { $this->_initProduct(); - $this->loadLayout(); - $this->getLayout()->getBlock('catalog.product.edit.tab.upsell') + $this->_view->loadLayout(); + $this->_view->getLayout()->getBlock('catalog.product.edit.tab.upsell') ->setProductsRelated($this->getRequest()->getPost('products_upsell', null)); - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -510,10 +520,10 @@ class Product extends \Magento\Backend\Controller\Adminhtml\Action public function crosssellGridAction() { $this->_initProduct(); - $this->loadLayout(); - $this->getLayout()->getBlock('catalog.product.edit.tab.crosssell') + $this->_view->loadLayout(); + $this->_view->getLayout()->getBlock('catalog.product.edit.tab.crosssell') ->setProductsRelated($this->getRequest()->getPost('products_crosssell', null)); - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -522,8 +532,8 @@ class Product extends \Magento\Backend\Controller\Adminhtml\Action public function superGroupAction() { $this->_initProduct(); - $this->loadLayout(false); - $this->renderLayout(); + $this->_view->loadLayout(false); + $this->_view->renderLayout(); } /** @@ -532,8 +542,8 @@ class Product extends \Magento\Backend\Controller\Adminhtml\Action public function superGroupPopupAction() { $this->_initProduct(); - $this->loadLayout(false); - $this->renderLayout(); + $this->_view->loadLayout(false); + $this->_view->renderLayout(); } /** @@ -543,11 +553,11 @@ class Product extends \Magento\Backend\Controller\Adminhtml\Action public function reviewsAction() { $this->_initProduct(); - $this->loadLayout(); - $this->getLayout()->getBlock('admin.product.reviews') + $this->_view->loadLayout(); + $this->_view->getLayout()->getBlock('admin.product.reviews') ->setProductId($this->_coreRegistry->registry('product')->getId()) ->setUseAjax(true); - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -557,8 +567,8 @@ class Product extends \Magento\Backend\Controller\Adminhtml\Action public function superConfigAction() { $this->_initProduct(); - $this->loadLayout(false); - $this->renderLayout(); + $this->_view->loadLayout(false); + $this->_view->renderLayout(); } /** @@ -596,16 +606,17 @@ class Product extends \Magento\Backend\Controller\Adminhtml\Action $product->load($productId); } - $dateFields = array(); + $dateFieldFilters = array(); $attributes = $product->getAttributes(); foreach ($attributes as $attrKey => $attribute) { if ($attribute->getBackend()->getType() == 'datetime') { if (array_key_exists($attrKey, $productData) && $productData[$attrKey] != '') { - $dateFields[] = $attrKey; + $dateFieldFilters[$attrKey] = $this->_dateFilter; } } } - $productData = $this->_filterDates($productData, $dateFields); + $inputFilter = new \Zend_Filter_Input($dateFieldFilters, array(), $productData); + $productData = $inputFilter->getUnescaped(); $product->addData($productData); /* set restrictions for date ranges */ @@ -636,9 +647,9 @@ class Product extends \Magento\Backend\Controller\Adminhtml\Action $response->setMessage($e->getMessage()); } catch (\Exception $e) { $this->_getSession()->addError($e->getMessage()); - $this->_initLayoutMessages('Magento\Adminhtml\Model\Session'); + $this->_view->getLayout()->initMessages('Magento\Adminhtml\Model\Session'); $response->setError(true); - $response->setMessage($this->getLayout()->getMessagesBlock()->getGroupedHtml()); + $response->setMessage($this->_view->getLayout()->getMessagesBlock()->getGroupedHtml()); } $this->getResponse()->setBody($response->toJson()); @@ -963,8 +974,8 @@ class Product extends \Magento\Backend\Controller\Adminhtml\Action */ public function alertsPriceGridAction() { - $this->loadLayout(false); - $this->renderLayout(); + $this->_view->loadLayout(false); + $this->_view->renderLayout(); } /** @@ -972,27 +983,27 @@ class Product extends \Magento\Backend\Controller\Adminhtml\Action */ public function alertsStockGridAction() { - $this->loadLayout(false); - $this->renderLayout(); + $this->_view->loadLayout(false); + $this->_view->renderLayout(); } public function addAttributeAction() { - $this->loadLayout('popup'); + $this->_view->loadLayout('popup'); $this->_initProduct(); $this->_addContent( - $this->getLayout()->createBlock('Magento\Catalog\Block\Adminhtml\Product\Attribute\NewAttribute\Product\Created') + $this->_view->getLayout()->createBlock('Magento\Catalog\Block\Adminhtml\Product\Attribute\NewAttribute\Product\Created') ); - $this->renderLayout(); + $this->_view->renderLayout(); } public function createdAction() { - $this->loadLayout('popup'); + $this->_view->loadLayout('popup'); $this->_addContent( - $this->getLayout()->createBlock('Magento\Catalog\Block\Adminhtml\Product\Created') + $this->_view->getLayout()->createBlock('Magento\Catalog\Block\Adminhtml\Product\Created') ); - $this->renderLayout(); + $this->_view->renderLayout(); } public function massDeleteAction() @@ -1088,7 +1099,7 @@ class Product extends \Magento\Backend\Controller\Adminhtml\Action if ($session->hasCompositeProductResult() && $session->getCompositeProductResult() instanceof \Magento\Object) { $this->_objectManager->get('Magento\Catalog\Helper\Product\Composite') - ->renderUpdateResult($this, $session->getCompositeProductResult()); + ->renderUpdateResult($session->getCompositeProductResult()); $session->unsCompositeProductResult(); } else { $session->unsCompositeProductResult(); @@ -1101,8 +1112,8 @@ class Product extends \Magento\Backend\Controller\Adminhtml\Action */ public function optionsImportGridAction() { - $this->loadLayout(); - $this->renderLayout(); + $this->_view->loadLayout(); + $this->_view->renderLayout(); } /** @@ -1111,8 +1122,8 @@ class Product extends \Magento\Backend\Controller\Adminhtml\Action public function customOptionsAction() { $this->_coreRegistry->register('import_option_products', $this->getRequest()->getPost('products')); - $this->loadLayout(); - $this->renderLayout(); + $this->_view->loadLayout(); + $this->_view->renderLayout(); } /** @@ -1122,7 +1133,7 @@ class Product extends \Magento\Backend\Controller\Adminhtml\Action { $this->_initProduct(); $this->getResponse()->setBody($this->_objectManager->get('Magento\Core\Helper\Data')->jsonEncode( - $this->getLayout()->createBlock('Magento\Catalog\Block\Product\TemplateSelector') + $this->_view->getLayout()->createBlock('Magento\Catalog\Block\Product\TemplateSelector') ->getSuggestedTemplates($this->getRequest()->getParam('label_part')) )); } @@ -1133,7 +1144,7 @@ class Product extends \Magento\Backend\Controller\Adminhtml\Action public function suggestAttributesAction() { $this->getResponse()->setBody($this->_objectManager->get('Magento\Core\Helper\Data')->jsonEncode( - $this->getLayout()->createBlock('Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Attributes\Search') + $this->_view->getLayout()->createBlock('Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Attributes\Search') ->getSuggestedAttributes($this->getRequest()->getParam('label_part')) )); } diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Action/Attribute.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Action/Attribute.php index b52ae646b1fea84af7a8199c569afabcb89dff8d..eb937b0f854865b929f86c337a2cc479be068142 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Action/Attribute.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Action/Attribute.php @@ -34,16 +34,30 @@ */ namespace Magento\Catalog\Controller\Adminhtml\Product\Action; -class Attribute extends \Magento\Backend\Controller\Adminhtml\Action +use Magento\Backend\App\Action; + +class Attribute extends \Magento\Backend\App\Action { + /** + * @param Action\Context $context + * @param \Magento\Catalog\Helper\Product\Edit\Action\Attribute $helper + */ + public function __construct( + Action\Context $context, + \Magento\Catalog\Helper\Product\Edit\Action\Attribute $helper + ) { + parent::__construct($context); + $this->_helper = $helper; + } + public function editAction() { if (!$this->_validateProducts()) { return; } - $this->loadLayout(); - $this->renderLayout(); + $this->_view->loadLayout(); + $this->_view->renderLayout(); } /** @@ -73,7 +87,7 @@ class Attribute extends \Magento\Backend\Controller\Adminhtml\Action if ($attributesData) { $dateFormat = $this->_objectManager->get('Magento\Core\Model\LocaleInterface') ->getDateFormat(\Magento\Core\Model\LocaleInterface::FORMAT_TYPE_SHORT); - $storeId = $this->_getHelper()->getSelectedStoreId(); + $storeId = $this->_helper->getSelectedStoreId(); foreach ($attributesData as $attributeCode => $value) { $attribute = $this->_objectManager->get('Magento\Eav\Model\Config') @@ -110,14 +124,14 @@ class Attribute extends \Magento\Backend\Controller\Adminhtml\Action } $this->_objectManager->get('Magento\Catalog\Model\Product\Action') - ->updateAttributes($this->_getHelper()->getProductIds(), $attributesData, $storeId); + ->updateAttributes($this->_helper->getProductIds(), $attributesData, $storeId); } if ($inventoryData) { $stockItem = $this->_objectManager->create('Magento\CatalogInventory\Model\Stock\Item'); $stockItem->setProcessIndexEvents(false); $stockItemSaved = false; - foreach ($this->_getHelper()->getProductIds() as $productId) { + foreach ($this->_helper->getProductIds() as $productId) { $stockItem->setData(array()); $stockItem->loadByProduct($productId) ->setProductId($productId); @@ -146,7 +160,7 @@ class Attribute extends \Magento\Backend\Controller\Adminhtml\Action if ($websiteAddData || $websiteRemoveData) { /* @var $actionModel \Magento\Catalog\Model\Product\Action */ $actionModel = $this->_objectManager->get('Magento\Catalog\Model\Product\Action'); - $productIds = $this->_getHelper()->getProductIds(); + $productIds = $this->_helper->getProductIds(); if ($websiteRemoveData) { $actionModel->updateWebsites($productIds, $websiteRemoveData, 'remove'); @@ -166,7 +180,7 @@ class Attribute extends \Magento\Backend\Controller\Adminhtml\Action } $this->_getSession()->addSuccess( - __('A total of %1 record(s) were updated.', count($this->_getHelper()->getProductIds())) + __('A total of %1 record(s) were updated.', count($this->_helper->getProductIds())) ); } catch (\Magento\Core\Exception $e) { @@ -177,7 +191,7 @@ class Attribute extends \Magento\Backend\Controller\Adminhtml\Action ->addException($e, __('Something went wrong while updating the product(s) attributes.')); } - $this->_redirect('catalog/product/', array('store'=>$this->_getHelper()->getSelectedStoreId())); + $this->_redirect('catalog/product/', array('store'=>$this->_helper->getSelectedStoreId())); } /** @@ -188,7 +202,7 @@ class Attribute extends \Magento\Backend\Controller\Adminhtml\Action protected function _validateProducts() { $error = false; - $productIds = $this->_getHelper()->getProductIds(); + $productIds = $this->_helper->getProductIds(); if (!is_array($productIds)) { $error = __('Please select products for attributes update.'); } else if (!$this->_objectManager->create('Magento\Catalog\Model\Product')->isProductsHasSku($productIds)) { @@ -203,16 +217,6 @@ class Attribute extends \Magento\Backend\Controller\Adminhtml\Action return !$error; } - /** - * Rertive data manipulation helper - * - * @return \Magento\Catalog\Helper\Product\Edit\Action\Attribute - */ - protected function _getHelper() - { - return $this->_objectManager->get('Magento\Catalog\Helper\Product\Edit\Action\Attribute'); - } - protected function _isAllowed() { return $this->_authorization->isAllowed('Magento_Catalog::update_attributes'); @@ -252,9 +256,9 @@ class Attribute extends \Magento\Backend\Controller\Adminhtml\Action } catch (\Exception $e) { $this->_getSession() ->addException($e, __('Something went wrong while updating the product(s) attributes.')); - $this->_initLayoutMessages('Magento\Adminhtml\Model\Session'); + $this->_view->getLayout()->initMessages('Magento\Adminhtml\Model\Session'); $response->setError(true); - $response->setMessage($this->getLayout()->getMessagesBlock()->getGroupedHtml()); + $response->setMessage($this->_view->getLayout()->getMessagesBlock()->getGroupedHtml()); } $this->getResponse()->setBody($response->toJson()); diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute.php index 30bfb070fbaf9379a44150fa9022ad2ec3fdaf2f..3118f6faf97162353193e67ba0789e6bf47eaf98 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute.php @@ -29,7 +29,7 @@ */ namespace Magento\Catalog\Controller\Adminhtml\Product; -class Attribute extends \Magento\Backend\Controller\Adminhtml\Action +class Attribute extends \Magento\Backend\App\Action { /** * @var \Magento\Cache\FrontendInterface @@ -49,38 +49,46 @@ class Attribute extends \Magento\Backend\Controller\Adminhtml\Action protected $_coreRegistry = null; /** - * @param \Magento\Backend\Controller\Context $context + * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Cache\FrontendInterface $attributeLabelCache * @param \Magento\Core\Model\Registry $coreRegistry */ public function __construct( - \Magento\Backend\Controller\Context $context, + \Magento\Backend\App\Action\Context $context, \Magento\Cache\FrontendInterface $attributeLabelCache, \Magento\Core\Model\Registry $coreRegistry ) { $this->_coreRegistry = $coreRegistry; - parent::__construct($context); $this->_attributeLabelCache = $attributeLabelCache; + parent::__construct($context); } - public function preDispatch() + /** + * Dispatch request + * + * @param \Magento\App\RequestInterface $request + * @return $this|mixed + */ + public function dispatch(\Magento\App\RequestInterface $request) { - parent::preDispatch(); $this->_entityTypeId = $this->_objectManager->create('Magento\Eav\Model\Entity') ->setType(\Magento\Catalog\Model\Product::ENTITY) ->getTypeId(); + return parent::dispatch($request); } protected function _initAction() { - $this->_title(__('Product Attributes')); + $this->_title->add(__('Product Attributes')); if ($this->getRequest()->getParam('popup')) { - $this->loadLayout(array('popup', $this->getDefaultLayoutHandle() . '_popup')); - $this->getLayout()->getBlock('root')->addBodyClass('attribute-popup'); + $this->_view->loadLayout( + array('popup', $this->_view->getDefaultLayoutHandle() . '_popup') + ); + $this->_view->getLayout()->getBlock('root')->addBodyClass('attribute-popup'); } else { - $this->loadLayout() - ->_addBreadcrumb( + $this->_view->loadLayout(); + $this->_addBreadcrumb( __('Catalog'), __('Catalog') ) @@ -97,8 +105,10 @@ class Attribute extends \Magento\Backend\Controller\Adminhtml\Action public function indexAction() { $this->_initAction() - ->_addContent($this->getLayout()->createBlock('Magento\Catalog\Block\Adminhtml\Product\Attribute')) - ->renderLayout(); + ->_addContent( + $this->_view->getLayout()->createBlock('Magento\Catalog\Block\Adminhtml\Product\Attribute') + ); + $this->_view->renderLayout(); } public function newAction() @@ -145,17 +155,17 @@ class Attribute extends \Magento\Backend\Controller\Adminhtml\Action $this->_initAction(); - $this->_title($id ? $model->getName() : __('New Product Attribute')); + $this->_title->add($id ? $model->getName() : __('New Product Attribute')); $item = $id ? __('Edit Product Attribute') : __('New Product Attribute'); $this->_addBreadcrumb($item, $item); - $this->getLayout()->getBlock('attribute_edit_js') + $this->_view->getLayout()->getBlock('attribute_edit_js') ->setIsPopup((bool)$this->getRequest()->getParam('popup')); - $this->renderLayout(); + $this->_view->renderLayout(); } @@ -198,9 +208,9 @@ class Attribute extends \Magento\Backend\Controller\Adminhtml\Action __('Attribute Set with name \'%1\' already exists.', $setName) ); - $this->_initLayoutMessages('Magento\Adminhtml\Model\Session'); + $this->_view->getLayout()->initMessages('Magento\Adminhtml\Model\Session'); $response->setError(true); - $response->setMessage($this->getLayout()->getMessagesBlock()->getGroupedHtml()); + $response->setMessage($this->_view->getLayout()->getMessagesBlock()->getGroupedHtml()); } } $this->getResponse()->setBody($response->toJson()); @@ -446,7 +456,7 @@ class Attribute extends \Magento\Backend\Controller\Adminhtml\Action public function suggestConfigurableAttributesAction() { $this->getResponse()->setBody($this->_objectManager->get('Magento\Core\Helper\Data')->jsonEncode( - $this->getLayout()->createBlock('Magento\Catalog\Block\Product\Configurable\AttributeSelector') + $this->_view->getLayout()->createBlock('Magento\Catalog\Block\Product\Configurable\AttributeSelector') ->getSuggestedAttributes($this->getRequest()->getParam('label_part')) )); } diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Datafeeds.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Datafeeds.php index 9044049c7f6bf13b31bffdf1d08e9de1b05403a4..00b48769325929db808222da4d1bc7126f2983fc 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Datafeeds.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Datafeeds.php @@ -27,7 +27,7 @@ namespace Magento\Catalog\Controller\Adminhtml\Product; -class Datafeeds extends \Magento\Backend\Controller\Adminhtml\Action +class Datafeeds extends \Magento\Backend\App\Action { public function indexAction() diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Gallery.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Gallery.php index ea9b0fd8b929815cb1a07f2589261a452cb74dcb..7123f488ce09a3e1ab7c4f5168f1d94e7789d9d1 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Gallery.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Gallery.php @@ -33,7 +33,7 @@ */ namespace Magento\Catalog\Controller\Adminhtml\Product; -class Gallery extends \Magento\Backend\Controller\Adminhtml\Action +class Gallery extends \Magento\Backend\App\Action { public function uploadAction() { diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Group.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Group.php index 4ac83da48294741c20419d85829fef582596a7a9..a31e87935f2131994a61f64e3a149caa07485197 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Group.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Group.php @@ -26,7 +26,7 @@ namespace Magento\Catalog\Controller\Adminhtml\Product; -class Group extends \Magento\Backend\Controller\Adminhtml\Action +class Group extends \Magento\Backend\App\Action { public function saveAction() { diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Review.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Review.php index 42b4be117442cd0aec04c2e496ae6d48c8b71719..805a9fc234016221bc392cb9df69b4ba6b943072 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Review.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Review.php @@ -29,7 +29,7 @@ */ namespace Magento\Catalog\Controller\Adminhtml\Product; -class Review extends \Magento\Backend\Controller\Adminhtml\Action +class Review extends \Magento\Backend\App\Action { /** * Array of actions which can be processed without secret key validation @@ -46,11 +46,11 @@ class Review extends \Magento\Backend\Controller\Adminhtml\Action protected $_coreRegistry = null; /** - * @param \Magento\Backend\Controller\Context $context + * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Core\Model\Registry $coreRegistry */ public function __construct( - \Magento\Backend\Controller\Context $context, + \Magento\Backend\App\Action\Context $context, \Magento\Core\Model\Registry $coreRegistry ) { $this->_coreRegistry = $coreRegistry; @@ -59,70 +59,70 @@ class Review extends \Magento\Backend\Controller\Adminhtml\Action public function indexAction() { - $this->_title(__('Customer Reviews')); + $this->_title->add(__('Customer Reviews')); - $this->_title(__('Reviews')); + $this->_title->add(__('Reviews')); if ($this->getRequest()->getParam('ajax')) { return $this->_forward('reviewGrid'); } - $this->loadLayout(); + $this->_view->loadLayout(); $this->_setActiveMenu('Magento_Review::catalog_reviews_ratings_reviews_all'); - $this->_addContent($this->getLayout()->createBlock('Magento\Adminhtml\Block\Review\Main')); + $this->_addContent($this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Review\Main')); - $this->renderLayout(); + $this->_view->renderLayout(); } public function pendingAction() { - $this->_title(__('Customer Reviews')); + $this->_title->add(__('Customer Reviews')); - $this->_title(__('Pending Reviews')); + $this->_title->add(__('Pending Reviews')); if ($this->getRequest()->getParam('ajax')) { $this->_coreRegistry->register('usePendingFilter', true); return $this->_forward('reviewGrid'); } - $this->loadLayout(); + $this->_view->loadLayout(); $this->_coreRegistry->register('usePendingFilter', true); - $this->_addContent($this->getLayout()->createBlock('Magento\Adminhtml\Block\Review\Main')); + $this->_addContent($this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Review\Main')); - $this->renderLayout(); + $this->_view->renderLayout(); } public function editAction() { - $this->_title(__('Customer Reviews')); + $this->_title->add(__('Customer Reviews')); - $this->_title(__('Edit Review')); + $this->_title->add(__('Edit Review')); - $this->loadLayout(); + $this->_view->loadLayout(); $this->_setActiveMenu('Magento_Review::catalog_reviews_ratings_reviews_all'); - $this->_addContent($this->getLayout()->createBlock('Magento\Adminhtml\Block\Review\Edit')); + $this->_addContent($this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Review\Edit')); - $this->renderLayout(); + $this->_view->renderLayout(); } public function newAction() { - $this->_title(__('Customer Reviews')); + $this->_title->add(__('Customer Reviews')); - $this->_title(__('New Review')); + $this->_title->add(__('New Review')); - $this->loadLayout(); + $this->_view->loadLayout(); $this->_setActiveMenu('Magento_Review::catalog_reviews_ratings_reviews_all'); - $this->getLayout()->getBlock('head')->setCanLoadExtJs(true); + $this->_view->getLayout()->getBlock('head')->setCanLoadExtJs(true); - $this->_addContent($this->getLayout()->createBlock('Magento\Adminhtml\Block\Review\Add')); - $this->_addContent($this->getLayout()->createBlock('Magento\Adminhtml\Block\Review\Product\Grid')); + $this->_addContent($this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Review\Add')); + $this->_addContent($this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Review\Product\Grid')); - $this->renderLayout(); + $this->_view->renderLayout(); } public function saveAction() @@ -292,14 +292,14 @@ class Review extends \Magento\Backend\Controller\Adminhtml\Action public function productGridAction() { $this->getResponse()->setBody( - $this->getLayout()->createBlock('Magento\Adminhtml\Block\Review\Product\Grid')->toHtml() + $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Review\Product\Grid')->toHtml() ); } public function reviewGridAction() { $this->getResponse()->setBody( - $this->getLayout()->createBlock('Magento\Adminhtml\Block\Review\Grid')->toHtml() + $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Review\Grid')->toHtml() ); } @@ -379,7 +379,7 @@ class Review extends \Magento\Backend\Controller\Adminhtml\Action public function ratingItemsAction() { $this->getResponse()->setBody( - $this->getLayout() + $this->_view->getLayout() ->createBlock('Magento\Adminhtml\Block\Review\Rating\Detailed') ->setIndependentMode() ->toHtml() diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Set.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Set.php index 5049846135668461e19fc360a2b1079ef6d70e51..a84b6d9afc72edb6bf7524daaeb41e9bcbc63e17 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Set.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Set.php @@ -34,7 +34,7 @@ namespace Magento\Catalog\Controller\Adminhtml\Product; -class Set extends \Magento\Backend\Controller\Adminhtml\Action +class Set extends \Magento\Backend\App\Action { /** * Core registry @@ -44,11 +44,11 @@ class Set extends \Magento\Backend\Controller\Adminhtml\Action protected $_coreRegistry; /** - * @param \Magento\Backend\Controller\Context $context + * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Core\Model\Registry $coreRegistry */ public function __construct( - \Magento\Backend\Controller\Context $context, + \Magento\Backend\App\Action\Context $context, \Magento\Core\Model\Registry $coreRegistry ) { $this->_coreRegistry = $coreRegistry; @@ -57,11 +57,11 @@ class Set extends \Magento\Backend\Controller\Adminhtml\Action public function indexAction() { - $this->_title(__('Product Templates')); + $this->_title->add(__('Product Templates')); $this->_setTypeId(); - $this->loadLayout(); + $this->_view->loadLayout(); $this->_setActiveMenu('Magento_Catalog::catalog_attributes_sets'); $this->_addBreadcrumb(__('Catalog'), __('Catalog')); @@ -69,12 +69,12 @@ class Set extends \Magento\Backend\Controller\Adminhtml\Action __('Manage Attribute Sets'), __('Manage Attribute Sets')); - $this->renderLayout(); + $this->_view->renderLayout(); } public function editAction() { - $this->_title(__('Product Templates')); + $this->_title->add(__('Product Templates')); $this->_setTypeId(); $attributeSet = $this->_objectManager->create('Magento\Eav\Model\Entity\Attribute\Set') @@ -85,13 +85,13 @@ class Set extends \Magento\Backend\Controller\Adminhtml\Action return; } - $this->_title($attributeSet->getId() ? $attributeSet->getAttributeSetName() : __('New Set')); + $this->_title->add($attributeSet->getId() ? $attributeSet->getAttributeSetName() : __('New Set')); $this->_coreRegistry->register('current_attribute_set', $attributeSet); - $this->loadLayout(); + $this->_view->loadLayout(); $this->_setActiveMenu('Magento_Catalog::catalog_attributes_sets'); - $this->getLayout()->getBlock('head')->setCanLoadExtJs(true); + $this->_view->getLayout()->getBlock('head')->setCanLoadExtJs(true); $this->_addBreadcrumb(__('Catalog'), __('Catalog')); $this->_addBreadcrumb( @@ -99,17 +99,17 @@ class Set extends \Magento\Backend\Controller\Adminhtml\Action __('Manage Product Sets')); $this->_addContent( - $this->getLayout()->createBlock('Magento\Catalog\Block\Adminhtml\Product\Attribute\Set\Main') + $this->_view->getLayout()->createBlock('Magento\Catalog\Block\Adminhtml\Product\Attribute\Set\Main') ); - $this->renderLayout(); + $this->_view->renderLayout(); } public function setGridAction() { $this->_setTypeId(); - $this->loadLayout(false); - $this->renderLayout(); + $this->_view->loadLayout(false); + $this->_view->renderLayout(); } /** @@ -172,8 +172,8 @@ class Set extends \Magento\Backend\Controller\Adminhtml\Action if ($isNewSet) { if ($this->getRequest()->getPost('return_session_messages_only')) { - /** @var $block \Magento\Core\Block\Messages */ - $block = $this->_objectManager->get('Magento\Core\Block\Messages'); + /** @var $block \Magento\View\Block\Messages */ + $block = $this->_objectManager->get('Magento\View\Block\Messages'); $block->setMessages($this->_getSession()->getMessages(true)); $body = $this->_objectManager->get('Magento\Core\Helper\Data')->jsonEncode(array( 'messages' => $block->getGroupedHtml(), @@ -191,9 +191,9 @@ class Set extends \Magento\Backend\Controller\Adminhtml\Action } else { $response = array(); if ($hasError) { - $this->_initLayoutMessages('Magento\Adminhtml\Model\Session'); + $this->_view->getLayout()->initMessages('Magento\Adminhtml\Model\Session'); $response['error'] = 1; - $response['message'] = $this->getLayout()->getMessagesBlock()->getGroupedHtml(); + $response['message'] = $this->_view->getLayout()->getMessagesBlock()->getGroupedHtml(); } else { $response['error'] = 0; $response['url'] = $this->getUrl('catalog/*/'); @@ -205,19 +205,19 @@ class Set extends \Magento\Backend\Controller\Adminhtml\Action public function addAction() { - $this->_title(__('New Product Template')); + $this->_title->add(__('New Product Template')); $this->_setTypeId(); - $this->loadLayout(); + $this->_view->loadLayout(); $this->_setActiveMenu('Magento_Catalog::catalog_attributes_sets'); $this->_addContent( - $this->getLayout()->createBlock('Magento\Catalog\Block\Adminhtml\Product\Attribute\Set\Toolbar\Add') + $this->_view->getLayout()->createBlock('Magento\Catalog\Block\Adminhtml\Product\Attribute\Set\Toolbar\Add') ); - $this->renderLayout(); + $this->_view->renderLayout(); } public function deleteAction() @@ -232,7 +232,7 @@ class Set extends \Magento\Backend\Controller\Adminhtml\Action $this->getResponse()->setRedirect($this->getUrl('catalog/*/')); } catch (\Exception $e) { $this->_getSession()->addError(__('An error occurred while deleting this set.')); - $this->_redirectReferer(); + $this->getResponse()->setRedirect($this->_redirect->getRedirectUrl($this->getUrl('*'))); } } diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Widget.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Widget.php index 06ebd6ffd58425101c5f4efadc62cc65728c5ba1..b843922736335fff76771211071c647fd667d79f 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Widget.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Widget.php @@ -34,7 +34,7 @@ */ namespace Magento\Catalog\Controller\Adminhtml\Product; -class Widget extends \Magento\Backend\Controller\Adminhtml\Action +class Widget extends \Magento\Backend\App\Action { /** * Chooser Source action @@ -45,7 +45,7 @@ class Widget extends \Magento\Backend\Controller\Adminhtml\Action $massAction = $this->getRequest()->getParam('use_massaction', false); $productTypeId = $this->getRequest()->getParam('product_type_id', null); - $productsGrid = $this->getLayout()->createBlock( + $productsGrid = $this->_view->getLayout()->createBlock( 'Magento\Catalog\Block\Adminhtml\Product\Widget\Chooser', '', array( @@ -61,7 +61,7 @@ class Widget extends \Magento\Backend\Controller\Adminhtml\Action $html = $productsGrid->toHtml(); if (!$this->getRequest()->getParam('products_grid')) { - $categoriesTree = $this->getLayout()->createBlock( + $categoriesTree = $this->_view->getLayout()->createBlock( 'Magento\Catalog\Block\Adminhtml\Category\Widget\Chooser', '', array( @@ -73,7 +73,7 @@ class Widget extends \Magento\Backend\Controller\Adminhtml\Action ) ); - $html = $this->getLayout()->createBlock('Magento\Catalog\Block\Adminhtml\Product\Widget\Chooser\Container') + $html = $this->_view->getLayout()->createBlock('Magento\Catalog\Block\Adminhtml\Product\Widget\Chooser\Container') ->setTreeHtml($categoriesTree->toHtml()) ->setGridHtml($html) ->toHtml(); diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Search.php b/app/code/Magento/Catalog/Controller/Adminhtml/Search.php index 18954bfc8f22111c9d8d01191852fe7e70e86838..0ff8a401edb91a7728fb29d33ade9d4e4ecc5972 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Search.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Search.php @@ -26,7 +26,9 @@ namespace Magento\Catalog\Controller\Adminhtml; -class Search extends \Magento\Backend\Controller\Adminhtml\Action +use Magento\Backend\App\Action; + +class Search extends \Magento\Backend\App\Action { /** * Core registry @@ -36,11 +38,11 @@ class Search extends \Magento\Backend\Controller\Adminhtml\Action protected $_coreRegistry = null; /** - * @param \Magento\Backend\Controller\Context $context + * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Core\Model\Registry $coreRegistry */ public function __construct( - \Magento\Backend\Controller\Context $context, + \Magento\Backend\App\Action\Context $context, \Magento\Core\Model\Registry $coreRegistry ) { $this->_coreRegistry = $coreRegistry; @@ -49,8 +51,8 @@ class Search extends \Magento\Backend\Controller\Adminhtml\Action protected function _initAction() { - $this->loadLayout() - ->_setActiveMenu('Magento_CatalogSearch::catalog_search') + $this->_view->loadLayout(); + $this->_setActiveMenu('Magento_CatalogSearch::catalog_search') ->_addBreadcrumb(__('Search'), __('Search')) ; return $this; @@ -58,11 +60,11 @@ class Search extends \Magento\Backend\Controller\Adminhtml\Action public function indexAction() { - $this->_title(__('Search Terms')); + $this->_title->add(__('Search Terms')); $this->_initAction() ->_addBreadcrumb(__('Catalog'), __('Catalog')); - $this->renderLayout(); + $this->_view->renderLayout(); } public function newAction() @@ -72,7 +74,7 @@ class Search extends \Magento\Backend\Controller\Adminhtml\Action public function editAction() { - $this->_title(__('Search Terms')); + $this->_title->add(__('Search Terms')); $id = $this->getRequest()->getParam('id'); $model = $this->_objectManager->create('Magento\CatalogSearch\Model\Query'); @@ -96,17 +98,17 @@ class Search extends \Magento\Backend\Controller\Adminhtml\Action $this->_initAction(); - $this->_title($id ? $model->getQueryText() : __('New Search')); + $this->_title->add($id ? $model->getQueryText() : __('New Search')); - $this->getLayout()->getBlock('head')->setCanLoadRulesJs(true); + $this->_view->getLayout()->getBlock('head')->setCanLoadRulesJs(true); - $this->getLayout()->getBlock('adminhtml.catalog.search.edit') + $this->_view->getLayout()->getBlock('adminhtml.catalog.search.edit') ->setData('action', $this->getUrl('catalog/search/save')); $this ->_addBreadcrumb($id ? __('Edit Search') : __('New Search'), $id ? __('Edit Search') : __('New Search')); - $this->renderLayout(); + $this->_view->renderLayout(); } /** diff --git a/app/code/Magento/Catalog/Controller/Category.php b/app/code/Magento/Catalog/Controller/Category.php index 5666b5a7879e74b27a5b35ddd70a059bcad32aa0..cac91bfe806714d9d06302cdc7cb6a5470d25732 100644 --- a/app/code/Magento/Catalog/Controller/Category.php +++ b/app/code/Magento/Catalog/Controller/Category.php @@ -33,7 +33,7 @@ */ namespace Magento\Catalog\Controller; -class Category extends \Magento\Core\Controller\Front\Action +class Category extends \Magento\App\Action\Action { /** * Core registry @@ -56,13 +56,6 @@ class Category extends \Magento\Core\Controller\Front\Action */ protected $_catalogDesign; - /** - * Store manager - * - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - /** * Category factory * @@ -71,25 +64,28 @@ class Category extends \Magento\Core\Controller\Front\Action protected $_categoryFactory; /** - * Construct - * + * @var \Magento\Core\Model\StoreManagerInterface + */ + protected $_storeManager; + + /** + * @param \Magento\App\Action\Context $context * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory - * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Catalog\Model\Design $catalogDesign * @param \Magento\Catalog\Model\Session $catalogSession - * @param \Magento\Core\Controller\Varien\Action\Context $context * @param \Magento\Core\Model\Registry $coreRegistry + * @param \Magento\Core\Model\StoreManagerInterface $storeManager */ public function __construct( + \Magento\App\Action\Context $context, \Magento\Catalog\Model\CategoryFactory $categoryFactory, - \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Catalog\Model\Design $catalogDesign, \Magento\Catalog\Model\Session $catalogSession, - \Magento\Core\Controller\Varien\Action\Context $context, - \Magento\Core\Model\Registry $coreRegistry + \Magento\Core\Model\Registry $coreRegistry, + \Magento\Core\Model\StoreManagerInterface $storeManager ) { - $this->_categoryFactory = $categoryFactory; $this->_storeManager = $storeManager; + $this->_categoryFactory = $categoryFactory; $this->_catalogDesign = $catalogDesign; $this->_catalogSession = $catalogSession; $this->_coreRegistry = $coreRegistry; @@ -150,7 +146,7 @@ class Category extends \Magento\Core\Controller\Front\Action $this->_catalogSession->setLastViewedCategoryId($category->getId()); - $update = $this->getLayout()->getUpdate(); + $update = $this->_view->getLayout()->getUpdate(); $update->addHandle('default'); if ($category->getIsAnchor()) { $type = $category->hasChildren() ? 'layered' : 'layered_without_children'; @@ -161,10 +157,10 @@ class Category extends \Magento\Core\Controller\Front\Action if (!$category->hasChildren()) { // Two levels removed from parent. Need to add default page type. $parentType = strtok($type, '_'); - $this->addPageLayoutHandles(array('type' => $parentType)); + $this->_view->addPageLayoutHandles(array('type' => $parentType)); } - $this->addPageLayoutHandles(array('type' => $type, 'id' => $category->getId())); - $this->loadLayoutUpdates(); + $this->_view->addPageLayoutHandles(array('type' => $type, 'id' => $category->getId())); + $this->_view->loadLayoutUpdates(); // apply custom layout update once layout is loaded $layoutUpdates = $settings->getLayoutUpdates(); @@ -174,23 +170,23 @@ class Category extends \Magento\Core\Controller\Front\Action } } - $this->generateLayoutXml()->generateLayoutBlocks(); + $this->_view->generateLayoutXml(); + $this->_view->generateLayoutBlocks(); // apply custom layout (page) template once the blocks are generated if ($settings->getPageLayout()) { $this->_objectManager->get('Magento\Page\Helper\Layout')->applyTemplate($settings->getPageLayout()); } - $root = $this->getLayout()->getBlock('root'); + $root = $this->_view->getLayout()->getBlock('root'); if ($root) { $root->addBodyClass('categorypath-' . $category->getUrlPath()) ->addBodyClass('category-' . $category->getUrlKey()); } - $this->_initLayoutMessages('Magento\Catalog\Model\Session'); - $this->_initLayoutMessages('Magento\Checkout\Model\Session'); - $this->renderLayout(); + $this->_view->getLayout()->initMessages(array('Magento\Catalog\Model\Session', 'Magento\Checkout\Model\Session')); + $this->_view->renderLayout(); } elseif (!$this->getResponse()->isRedirect()) { - $this->_forward('noRoute'); + $this->_forward('noroute'); } } } diff --git a/app/code/Magento/Catalog/Controller/Index.php b/app/code/Magento/Catalog/Controller/Index.php index c73e30f543f94530e637a42c40deb879a93ff5cb..450d3203e41803d27160586c8e23b578f4117fe0 100644 --- a/app/code/Magento/Catalog/Controller/Index.php +++ b/app/code/Magento/Catalog/Controller/Index.php @@ -26,7 +26,7 @@ namespace Magento\Catalog\Controller; -class Index extends \Magento\Core\Controller\Front\Action +class Index extends \Magento\App\Action\Action { /** * Index action diff --git a/app/code/Magento/Catalog/Controller/Product.php b/app/code/Magento/Catalog/Controller/Product.php index b28bf4a5513f4c2eaf2b047fb3e47eaff95793ee..7f36f5cbee4820c49005063adaae1cd6c126c0d3 100644 --- a/app/code/Magento/Catalog/Controller/Product.php +++ b/app/code/Magento/Catalog/Controller/Product.php @@ -27,7 +27,7 @@ namespace Magento\Catalog\Controller; class Product - extends \Magento\Core\Controller\Front\Action + extends \Magento\App\Action\Action implements \Magento\Catalog\Controller\Product\View\ViewInterface { /** @@ -84,11 +84,11 @@ class Product if (isset($_GET['store']) && !$this->getResponse()->isRedirect()) { $this->_redirect(''); } elseif (!$this->getResponse()->isRedirect()) { - $this->_forward('noRoute'); + $this->_forward('noroute'); } } else { $this->_objectManager->get('Magento\Logger')->logException($e); - $this->_forward('noRoute'); + $this->_forward('noroute'); } } } @@ -102,11 +102,11 @@ class Product if (isset($_GET['store']) && !$this->getResponse()->isRedirect()) { $this->_redirect(''); } elseif (!$this->getResponse()->isRedirect()) { - $this->_forward('noRoute'); + $this->_forward('noroute'); } return; } - $this->loadLayout(); - $this->renderLayout(); + $this->_view->loadLayout(); + $this->_view->renderLayout(); } } diff --git a/app/code/Magento/Catalog/Controller/Product/Compare.php b/app/code/Magento/Catalog/Controller/Product/Compare.php index 5350c991094969ae76b638fc3b54de7ad3fe1842..3c202c60e6925d6622747720a196cb5a31b2572c 100644 --- a/app/code/Magento/Catalog/Controller/Product/Compare.php +++ b/app/code/Magento/Catalog/Controller/Product/Compare.php @@ -31,15 +31,8 @@ namespace Magento\Catalog\Controller\Product; * * @SuppressWarnings(PHPMD.LongVariable) */ -class Compare extends \Magento\Core\Controller\Front\Action +class Compare extends \Magento\App\Action\Action { - /** - * Action list where need check enabled cookie - * - * @var array - */ - protected $_cookieCheckActions = array('add'); - /** * Customer id * @@ -75,13 +68,6 @@ class Compare extends \Magento\Core\Controller\Front\Action */ protected $_customerSession; - /** - * Store manager - * - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - /** * Item collection factory * @@ -111,36 +97,39 @@ class Compare extends \Magento\Core\Controller\Front\Action protected $_customerFactory; /** - * Construct - * + * @var \Magento\Core\Model\StoreManagerInterface + */ + protected $_storeManager; + + /** + * @param \Magento\App\Action\Context $context * @param \Magento\Customer\Model\CustomerFactory $customerFactory * @param \Magento\Catalog\Model\Product\Compare\ItemFactory $compareItemFactory * @param \Magento\Catalog\Model\ProductFactory $productFactory * @param \Magento\Catalog\Model\Resource\Product\Compare\Item\CollectionFactory $itemCollectionFactory - * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Log\Model\Visitor $logVisitor * @param \Magento\Catalog\Model\Product\Compare\ListCompare $catalogProductCompareList * @param \Magento\Catalog\Model\Session $catalogSession - * @param \Magento\Core\Controller\Varien\Action\Context $context + * @param \Magento\Core\Model\StoreManagerInterface $storeManager */ public function __construct( + \Magento\App\Action\Context $context, \Magento\Customer\Model\CustomerFactory $customerFactory, \Magento\Catalog\Model\Product\Compare\ItemFactory $compareItemFactory, \Magento\Catalog\Model\ProductFactory $productFactory, \Magento\Catalog\Model\Resource\Product\Compare\Item\CollectionFactory $itemCollectionFactory, - \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Customer\Model\Session $customerSession, \Magento\Log\Model\Visitor $logVisitor, \Magento\Catalog\Model\Product\Compare\ListCompare $catalogProductCompareList, \Magento\Catalog\Model\Session $catalogSession, - \Magento\Core\Controller\Varien\Action\Context $context + \Magento\Core\Model\StoreManagerInterface $storeManager ) { + $this->_storeManager = $storeManager; $this->_customerFactory = $customerFactory; $this->_compareItemFactory = $compareItemFactory; $this->_productFactory = $productFactory; $this->_itemCollectionFactory = $itemCollectionFactory; - $this->_storeManager = $storeManager; $this->_customerSession = $customerSession; $this->_logVisitor = $logVisitor; $this->_catalogProductCompareList = $catalogProductCompareList; @@ -170,8 +159,8 @@ class Compare extends \Magento\Core\Controller\Front\Action return; } - $this->loadLayout(); - $this->renderLayout(); + $this->_view->loadLayout(); + $this->_view->renderLayout(); } /** @@ -200,8 +189,7 @@ class Compare extends \Magento\Core\Controller\Front\Action $this->_objectManager->get('Magento\Catalog\Helper\Product\Compare')->calculate(); } - - $this->_redirectReferer(); + $this->getResponse()->setRedirect($this->_redirect->getRedirectUrl()); } /** @@ -245,7 +233,7 @@ class Compare extends \Magento\Core\Controller\Front\Action } if (!$this->getRequest()->getParam('isAjax', false)) { - $this->_redirectReferer(); + $this->getResponse()->setRedirect($this->_redirect->getRedirectUrl()); } } @@ -275,7 +263,7 @@ class Compare extends \Magento\Core\Controller\Front\Action $this->_catalogSession->addException($e, __('Something went wrong clearing the comparison list.')); } - $this->_redirectReferer(); + $this->getResponse()->setRedirect($this->_redirect->getRedirectUrl()); } /** diff --git a/app/code/Magento/Catalog/Controller/Product/View/ViewInterface.php b/app/code/Magento/Catalog/Controller/Product/View/ViewInterface.php index d56a5802a323d6b56259f9355a0e779dc8ac01f7..eaa21b89ebac307d2e745af4f0654ba2a80b3597 100644 --- a/app/code/Magento/Catalog/Controller/Product/View/ViewInterface.php +++ b/app/code/Magento/Catalog/Controller/Product/View/ViewInterface.php @@ -25,17 +25,8 @@ */ /** - * Interface needed to be implemented by controller that wants to - * show product view page + * Marker interface for controllers on product view page */ namespace Magento\Catalog\Controller\Product\View; -interface ViewInterface -{ - /** - * Loads layout messages from message storage - * - * @param string $messagesStorage - */ - public function initLayoutMessages($messagesStorage); -} +interface ViewInterface{} diff --git a/app/code/Magento/Catalog/Helper/Catalog.php b/app/code/Magento/Catalog/Helper/Catalog.php index 81ff721c7f9531a1594b92c582b8705b0391f4d4..0ccce4bf22d545c18f8e66fe34ceffb6cf458d5c 100644 --- a/app/code/Magento/Catalog/Helper/Catalog.php +++ b/app/code/Magento/Catalog/Helper/Catalog.php @@ -33,7 +33,7 @@ */ namespace Magento\Catalog\Helper; -class Catalog extends \Magento\Core\Helper\AbstractHelper +class Catalog extends \Magento\App\Helper\AbstractHelper { /** * Config path to valid file paths @@ -68,12 +68,12 @@ class Catalog extends \Magento\Core\Helper\AbstractHelper /** * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\Store\Config $coreStoreConfig */ public function __construct( \Magento\Core\Helper\Data $coreData, - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Core\Model\Store\Config $coreStoreConfig ) { $this->_coreStoreConfig = $coreStoreConfig; diff --git a/app/code/Magento/Catalog/Helper/Category.php b/app/code/Magento/Catalog/Helper/Category.php index 463bd3d3888c2d2fe08be9bf9e9c5921c95c2409..d416c2459e2df73a6b5b1277001fb7a9eef2cfb9 100644 --- a/app/code/Magento/Catalog/Helper/Category.php +++ b/app/code/Magento/Catalog/Helper/Category.php @@ -31,7 +31,7 @@ namespace Magento\Catalog\Helper; * * @SuppressWarnings(PHPMD.LongVariable) */ -class Category extends \Magento\Core\Helper\AbstractHelper +class Category extends \Magento\App\Helper\AbstractHelper { const XML_PATH_CATEGORY_URL_SUFFIX = 'catalog/seo/category_url_suffix'; const XML_PATH_USE_CATEGORY_CANONICAL_TAG = 'catalog/seo/category_canonical_tag'; @@ -84,14 +84,14 @@ class Category extends \Magento\Core\Helper\AbstractHelper * * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\Store\Config $coreStoreConfig * @param \Magento\Data\CollectionFactory $dataCollectionFactory */ public function __construct( \Magento\Catalog\Model\CategoryFactory $categoryFactory, \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Core\Model\Store\Config $coreStoreConfig, \Magento\Data\CollectionFactory $dataCollectionFactory ) { diff --git a/app/code/Magento/Catalog/Helper/Category/Flat.php b/app/code/Magento/Catalog/Helper/Category/Flat.php index 07b776abe6091d628b7e54241276aa1289e7696e..d73c9ec0d2095dc58e0fd465a6ca40aa647dca2f 100644 --- a/app/code/Magento/Catalog/Helper/Category/Flat.php +++ b/app/code/Magento/Catalog/Helper/Category/Flat.php @@ -78,13 +78,13 @@ class Flat extends \Magento\Catalog\Helper\Flat\AbstractFlat * * @param \Magento\Index\Model\ProcessFactory $processFactory * @param \Magento\Catalog\Model\Resource\Category\Flat $catalogCategoryFlat - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\Store\Config $coreStoreConfig */ public function __construct( \Magento\Index\Model\ProcessFactory $processFactory, \Magento\Catalog\Model\Resource\Category\Flat $catalogCategoryFlat, - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Core\Model\Store\Config $coreStoreConfig ) { $this->_catalogCategoryFlat = $catalogCategoryFlat; diff --git a/app/code/Magento/Catalog/Helper/Data.php b/app/code/Magento/Catalog/Helper/Data.php index 1184ad2eb566f327c8e740e165ce20a88c7b196f..50238607c49e160421a0c010b12f9beba0531379 100644 --- a/app/code/Magento/Catalog/Helper/Data.php +++ b/app/code/Magento/Catalog/Helper/Data.php @@ -34,7 +34,7 @@ */ namespace Magento\Catalog\Helper; -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { const PRICE_SCOPE_GLOBAL = 0; const PRICE_SCOPE_WEBSITE = 1; @@ -164,7 +164,7 @@ class Data extends \Magento\Core\Helper\AbstractHelper * @param \Magento\Stdlib\String $string * @param \Magento\Catalog\Helper\Category $catalogCategory * @param \Magento\Catalog\Helper\Product $catalogProduct - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\Registry $coreRegistry * @param \Magento\Core\Model\Store\Config $coreStoreConfig * @param \Magento\Catalog\Model\Template\Filter\Factory $templateFilterFactory @@ -180,7 +180,7 @@ class Data extends \Magento\Core\Helper\AbstractHelper \Magento\Stdlib\String $string, \Magento\Catalog\Helper\Category $catalogCategory, \Magento\Catalog\Helper\Product $catalogProduct, - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Core\Model\Registry $coreRegistry, \Magento\Core\Model\Store\Config $coreStoreConfig, \Magento\Catalog\Model\Template\Filter\Factory $templateFilterFactory, diff --git a/app/code/Magento/Catalog/Helper/Flat/AbstractFlat.php b/app/code/Magento/Catalog/Helper/Flat/AbstractFlat.php index accbcd03852b00175438bf45d017c7c9097809a1..a1256ab513cd4979bc998d329e80d4121030b070 100644 --- a/app/code/Magento/Catalog/Helper/Flat/AbstractFlat.php +++ b/app/code/Magento/Catalog/Helper/Flat/AbstractFlat.php @@ -33,7 +33,7 @@ */ namespace Magento\Catalog\Helper\Flat; -abstract class AbstractFlat extends \Magento\Core\Helper\AbstractHelper +abstract class AbstractFlat extends \Magento\App\Helper\AbstractHelper { /** * Catalog Flat index process code @@ -76,11 +76,11 @@ abstract class AbstractFlat extends \Magento\Core\Helper\AbstractHelper * Construct * * @param \Magento\Index\Model\ProcessFactory $processFactory - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context */ public function __construct( \Magento\Index\Model\ProcessFactory $processFactory, - \Magento\Core\Helper\Context $context + \Magento\App\Helper\Context $context ) { $this->_processFactory = $processFactory; parent::__construct($context); diff --git a/app/code/Magento/Catalog/Helper/Image.php b/app/code/Magento/Catalog/Helper/Image.php index d11173db0b1a75074095a116939410f644eee15f..2e2813525e4657cd0cbe62a4c3bed0812b8cd15f 100644 --- a/app/code/Magento/Catalog/Helper/Image.php +++ b/app/code/Magento/Catalog/Helper/Image.php @@ -31,7 +31,7 @@ */ namespace Magento\Catalog\Helper; -class Image extends \Magento\Core\Helper\AbstractHelper +class Image extends \Magento\App\Helper\AbstractHelper { /** * Current model @@ -133,13 +133,13 @@ class Image extends \Magento\Core\Helper\AbstractHelper * Construct * * @param \Magento\Catalog\Model\Product\ImageFactory $productImageFactory - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\View\Url $viewUrl * @param \Magento\Core\Model\Store\Config $coreStoreConfig */ public function __construct( \Magento\Catalog\Model\Product\ImageFactory $productImageFactory, - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\View\Url $viewUrl, \Magento\Core\Model\Store\Config $coreStoreConfig ) { diff --git a/app/code/Magento/Catalog/Helper/Output.php b/app/code/Magento/Catalog/Helper/Output.php index 5aa52bcf820ffc02786b9b2ad8d0c4642e376c2f..dd1d38c31c8b56890274570df73b78759151c12e 100644 --- a/app/code/Magento/Catalog/Helper/Output.php +++ b/app/code/Magento/Catalog/Helper/Output.php @@ -26,7 +26,7 @@ namespace Magento\Catalog\Helper; -class Output extends \Magento\Core\Helper\AbstractHelper +class Output extends \Magento\App\Helper\AbstractHelper { /** * Array of existing handlers @@ -66,13 +66,13 @@ class Output extends \Magento\Core\Helper\AbstractHelper * * @param \Magento\Eav\Model\Config $eavConfig * @param \Magento\Catalog\Helper\Data $catalogData - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Escaper $escaper */ public function __construct( \Magento\Eav\Model\Config $eavConfig, \Magento\Catalog\Helper\Data $catalogData, - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Escaper $escaper ) { $this->_eavConfig = $eavConfig; diff --git a/app/code/Magento/Catalog/Helper/Product.php b/app/code/Magento/Catalog/Helper/Product.php index 4c183bbff418a9207f9edaf31e4e3f05fb86c78b..ebbd9c129374027b86d06188fbd2c192104cdefd 100644 --- a/app/code/Magento/Catalog/Helper/Product.php +++ b/app/code/Magento/Catalog/Helper/Product.php @@ -64,13 +64,6 @@ class Product extends \Magento\Core\Helper\Url */ protected $_viewUrl; - /** - * Core event manager proxy - * - * @var \Magento\Event\ManagerInterface - */ - protected $_eventManager = null; - /** * Core registry * @@ -127,21 +120,18 @@ class Product extends \Magento\Core\Helper\Url protected $_categoryFactory; /** - * Construct - * * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory * @param \Magento\Catalog\Model\ProductFactory $productFactory * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Catalog\Model\Session $catalogSession - * @param \Magento\Event\ManagerInterface $eventManager - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\View\Url $viewUrl * @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 string $typeSwitcherLabel - * + * @param $typeSwitcherLabel + * * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( @@ -149,8 +139,7 @@ class Product extends \Magento\Core\Helper\Url \Magento\Catalog\Model\ProductFactory $productFactory, \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Catalog\Model\Session $catalogSession, - \Magento\Event\ManagerInterface $eventManager, - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\View\Url $viewUrl, \Magento\Core\Model\Registry $coreRegistry, \Magento\Catalog\Model\Attribute\Config $attributeConfig, @@ -164,7 +153,6 @@ class Product extends \Magento\Core\Helper\Url $this->_typeSwitcherLabel = $typeSwitcherLabel; $this->_attributeConfig = $attributeConfig; $this->_coreRegistry = $coreRegistry; - $this->_eventManager = $eventManager; $this->_coreRegistry = $coreRegistry; $this->_coreStoreConfig = $coreStoreConfig; $this->_viewUrl = $viewUrl; @@ -408,7 +396,7 @@ class Product extends \Magento\Core\Helper\Url * If empty (except FALSE) - will be guessed (e.g. from last visited) to load as current. * * @param int $productId - * @param \Magento\Core\Controller\Front\Action $controller + * @param \Magento\App\Action\Action $controller * @param \Magento\Object $params * * @return false|\Magento\Catalog\Model\Product diff --git a/app/code/Magento/Catalog/Helper/Product/Compare.php b/app/code/Magento/Catalog/Helper/Product/Compare.php index f7573eb245b819b249a969058b5ff4dd2bd7fe3e..a11835d619bd0d29e2301bbadc3ec20a78c707c8 100644 --- a/app/code/Magento/Catalog/Helper/Product/Compare.php +++ b/app/code/Magento/Catalog/Helper/Product/Compare.php @@ -105,7 +105,7 @@ class Compare extends \Magento\Core\Helper\Url * @param \Magento\Log\Model\Visitor $logVisitor * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Catalog\Model\Session $catalogSession - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context */ public function __construct( \Magento\Catalog\Model\Resource\Product\Compare\Item\CollectionFactory $itemCollectionFactory, @@ -114,7 +114,7 @@ class Compare extends \Magento\Core\Helper\Url \Magento\Log\Model\Visitor $logVisitor, \Magento\Customer\Model\Session $customerSession, \Magento\Catalog\Model\Session $catalogSession, - \Magento\Core\Helper\Context $context + \Magento\App\Helper\Context $context ) { $this->_itemCollectionFactory = $itemCollectionFactory; $this->_catalogProductVisibility = $catalogProductVisibility; @@ -138,7 +138,7 @@ class Compare extends \Magento\Core\Helper\Url $params = array( 'items'=>implode(',', $itemIds), - \Magento\Core\Controller\Front\Action::PARAM_NAME_URL_ENCODED => $this->getEncodedUrl() + \Magento\App\Action\Action::PARAM_NAME_URL_ENCODED => $this->getEncodedUrl() ); return $this->_getUrl('catalog/product_compare', $params); @@ -154,7 +154,7 @@ class Compare extends \Magento\Core\Helper\Url { return array( 'product' => $product->getId(), - \Magento\Core\Controller\Front\Action::PARAM_NAME_URL_ENCODED => $this->getEncodedUrl() + \Magento\App\Action\Action::PARAM_NAME_URL_ENCODED => $this->getEncodedUrl() ); } @@ -181,7 +181,7 @@ class Compare extends \Magento\Core\Helper\Url $params = array( 'product'=>$product->getId(), - \Magento\Core\Controller\Front\Action::PARAM_NAME_URL_ENCODED => $this->getEncodedUrl($beforeCompareUrl) + \Magento\App\Action\Action::PARAM_NAME_URL_ENCODED => $this->getEncodedUrl($beforeCompareUrl) ); return $this->_getUrl('wishlist/index/add', $params); @@ -198,7 +198,7 @@ class Compare extends \Magento\Core\Helper\Url $beforeCompareUrl = $this->_catalogSession->getBeforeCompareUrl(); $params = array( 'product'=>$product->getId(), - \Magento\Core\Controller\Front\Action::PARAM_NAME_URL_ENCODED => $this->getEncodedUrl($beforeCompareUrl) + \Magento\App\Action\Action::PARAM_NAME_URL_ENCODED => $this->getEncodedUrl($beforeCompareUrl) ); return $this->_getUrl('checkout/cart/add', $params); @@ -214,7 +214,7 @@ class Compare extends \Magento\Core\Helper\Url { $params = array( 'product'=>$item->getId(), - \Magento\Core\Controller\Front\Action::PARAM_NAME_URL_ENCODED => $this->getEncodedUrl() + \Magento\App\Action\Action::PARAM_NAME_URL_ENCODED => $this->getEncodedUrl() ); return $this->_getUrl('catalog/product_compare/remove', $params); } @@ -227,7 +227,7 @@ class Compare extends \Magento\Core\Helper\Url public function getClearListUrl() { $params = array( - \Magento\Core\Controller\Front\Action::PARAM_NAME_URL_ENCODED => $this->getEncodedUrl() + \Magento\App\Action\Action::PARAM_NAME_URL_ENCODED => $this->getEncodedUrl() ); return $this->_getUrl('catalog/product_compare/clear', $params); } diff --git a/app/code/Magento/Catalog/Helper/Product/Composite.php b/app/code/Magento/Catalog/Helper/Product/Composite.php index aa1eb73efe70fefb377f1a90abdf74ef85706893..bbafd2addca6255a0b19cb9c42d0f7a2aa6326fc 100644 --- a/app/code/Magento/Catalog/Helper/Product/Composite.php +++ b/app/code/Magento/Catalog/Helper/Product/Composite.php @@ -33,7 +33,7 @@ */ namespace Magento\Catalog\Helper\Product; -class Composite extends \Magento\Core\Helper\AbstractHelper +class Composite extends \Magento\App\Helper\AbstractHelper { /** * Core registry @@ -50,7 +50,7 @@ class Composite extends \Magento\Core\Helper\AbstractHelper protected $_catalogProduct = null; /** - * @var \Magento\Core\Model\StoreManager + * @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; @@ -64,41 +64,49 @@ class Composite extends \Magento\Core\Helper\AbstractHelper */ protected $_customerFactory; + /** + * @var \Magento\App\ViewInterface + */ + protected $_view; + /** * @param \Magento\Customer\Model\CustomerFactory $customerFactory * @param \Magento\Catalog\Model\ProductFactory $productFactory - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Catalog\Helper\Product $catalogProduct - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\Registry $coreRegistry + * @param \Magento\App\ViewInterface $view */ public function __construct( \Magento\Customer\Model\CustomerFactory $customerFactory, \Magento\Catalog\Model\ProductFactory $productFactory, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Catalog\Helper\Product $catalogProduct, - \Magento\Core\Helper\Context $context, - \Magento\Core\Model\Registry $coreRegistry + \Magento\App\Helper\Context $context, + \Magento\Core\Model\Registry $coreRegistry, + \Magento\App\ViewInterface $view ) { $this->_customerFactory = $customerFactory; $this->_productFactory = $productFactory; $this->_storeManager = $storeManager; $this->_coreRegistry = $coreRegistry; $this->_catalogProduct = $catalogProduct; + $this->_view = $view; parent::__construct($context); } /** * Init layout of product configuration update result * - * @param \Magento\Backend\Controller\Adminhtml\Action $controller * @return \Magento\Catalog\Helper\Product\Composite */ - protected function _initUpdateResultLayout($controller) + protected function _initUpdateResultLayout() { - $controller->getLayout()->getUpdate() - ->addHandle('CATALOG_PRODUCT_COMPOSITE_UPDATE_RESULT'); - $controller->loadLayoutUpdates()->generateLayoutXml()->generateLayoutBlocks(); + $this->_view->getLayout()->getUpdate()->addHandle('CATALOG_PRODUCT_COMPOSITE_UPDATE_RESULT'); + $this->_view->loadLayoutUpdates(); + $this->_view->generateLayoutXml(); + $this->_view->generateLayoutBlocks(); return $this; } @@ -106,16 +114,15 @@ class Composite extends \Magento\Core\Helper\AbstractHelper * Prepares and render result of composite product configuration update for a case * when single configuration submitted * - * @param \Magento\Backend\Controller\Adminhtml\Action $controller * @param \Magento\Object $updateResult * @return \Magento\Catalog\Helper\Product\Composite */ - public function renderUpdateResult($controller, \Magento\Object $updateResult) + public function renderUpdateResult(\Magento\Object $updateResult) { $this->_coreRegistry->register('composite_update_result', $updateResult); - $this->_initUpdateResultLayout($controller); - $controller->renderLayout(); + $this->_initUpdateResultLayout(); + $this->_view->renderLayout(); } /** @@ -124,21 +131,22 @@ class Composite extends \Magento\Core\Helper\AbstractHelper * $isOk - true or false, whether action was completed nicely or with some error * If $isOk is FALSE (some error during configuration), so $productType must be null * - * @param \Magento\Backend\Controller\Adminhtml\Action $controller * @param bool $isOk * @param string $productType * @return \Magento\Catalog\Helper\Product\Composite */ - protected function _initConfigureResultLayout($controller, $isOk, $productType) + protected function _initConfigureResultLayout($isOk, $productType) { - $update = $controller->getLayout()->getUpdate(); + $update = $this->_view->getLayout()->getUpdate(); if ($isOk) { $update->addHandle('CATALOG_PRODUCT_COMPOSITE_CONFIGURE') ->addHandle('catalog_product_view_type_' . $productType); } else { $update->addHandle('CATALOG_PRODUCT_COMPOSITE_CONFIGURE_ERROR'); } - $controller->loadLayoutUpdates()->generateLayoutXml()->generateLayoutBlocks(); + $this->_view->loadLayoutUpdates(); + $this->_view->generateLayoutXml(); + $this->_view->generateLayoutBlocks(); return $this; } @@ -149,11 +157,10 @@ class Composite extends \Magento\Core\Helper\AbstractHelper * - 'ok' = true, and 'product_id', 'buy_request', 'current_store_id', 'current_customer' or 'current_customer_id' * - 'error' = true, and 'message' to show * - * @param \Magento\Backend\Controller\Adminhtml\Action $controller * @param \Magento\Object $configureResult * @return \Magento\Catalog\Helper\Product\Composite */ - public function renderConfigureResult($controller, \Magento\Object $configureResult) + public function renderConfigureResult(\Magento\Object $configureResult) { try { if (!$configureResult->getOk()) { @@ -200,7 +207,7 @@ class Composite extends \Magento\Core\Helper\AbstractHelper $this->_coreRegistry->register('composite_configure_result_error_message', $e->getMessage()); } - $this->_initConfigureResultLayout($controller, $isOk, $productType); - $controller->renderLayout(); + $this->_initConfigureResultLayout($isOk, $productType); + $this->_view->renderLayout(); } } diff --git a/app/code/Magento/Catalog/Helper/Product/Configuration.php b/app/code/Magento/Catalog/Helper/Product/Configuration.php index 07bf007fbddb145da5ffd3a626670ba35224f29c..3a413ce38f5a097e9f4d5b0f1d1f87740e10228b 100644 --- a/app/code/Magento/Catalog/Helper/Product/Configuration.php +++ b/app/code/Magento/Catalog/Helper/Product/Configuration.php @@ -31,7 +31,7 @@ namespace Magento\Catalog\Helper\Product; * * @SuppressWarnings(PHPMD.LongVariable) */ -class Configuration extends \Magento\Core\Helper\AbstractHelper +class Configuration extends \Magento\App\Helper\AbstractHelper implements \Magento\Catalog\Helper\Product\Configuration\ConfigurationInterface { /** @@ -64,14 +64,14 @@ class Configuration extends \Magento\Core\Helper\AbstractHelper /** * @param \Magento\Catalog\Model\Product\OptionFactory $productOptionFactory * @param \Magento\Filter\FilterManager $filter - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Catalog\Model\ProductTypes\ConfigInterface $config * @param \Magento\Stdlib\String $string */ public function __construct( \Magento\Catalog\Model\Product\OptionFactory $productOptionFactory, \Magento\Filter\FilterManager $filter, - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Catalog\Model\ProductTypes\ConfigInterface $config, \Magento\Stdlib\String $string ) { 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 c6bcb4f01a9e02d57ac9cbf6e1c17073ce366e87..c7f2c748d53c01bd8e0fbd023b1ea33f01fc6c7b 100644 --- a/app/code/Magento/Catalog/Helper/Product/Edit/Action/Attribute.php +++ b/app/code/Magento/Catalog/Helper/Product/Edit/Action/Attribute.php @@ -68,7 +68,7 @@ class Attribute extends \Magento\Backend\Helper\Data protected $_eavConfig; /** - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\App\Route\Config $routeConfig * @param \Magento\Core\Model\AppInterface $app * @param \Magento\Backend\Model\Url $backendUrl @@ -80,7 +80,7 @@ class Attribute extends \Magento\Backend\Helper\Data * @param \Magento\Catalog\Model\Resource\Product\CollectionFactory $productsFactory */ public function __construct( - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\App\Route\Config $routeConfig, \Magento\Core\Model\AppInterface $app, \Magento\Backend\Model\Url $backendUrl, diff --git a/app/code/Magento/Catalog/Helper/Product/Flat.php b/app/code/Magento/Catalog/Helper/Product/Flat.php index 43b6888ecc11c95d5ac1095dc2db0fecbde3dc3e..41317bc6a3267c51e0072b92731e91363945c2c4 100644 --- a/app/code/Magento/Catalog/Helper/Product/Flat.php +++ b/app/code/Magento/Catalog/Helper/Product/Flat.php @@ -96,7 +96,7 @@ class Flat extends \Magento\Catalog\Helper\Flat\AbstractFlat * Construct * * @param \Magento\Index\Model\ProcessFactory $processFactory - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\Store\Config $coreStoreConfig * @param \Magento\Catalog\Model\Product\Flat\Flag $flatFlag * @param $addFilterableAttrs @@ -104,7 +104,7 @@ class Flat extends \Magento\Catalog\Helper\Flat\AbstractFlat */ public function __construct( \Magento\Index\Model\ProcessFactory $processFactory, - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Core\Model\Store\Config $coreStoreConfig, \Magento\Catalog\Model\Product\Flat\Flag $flatFlag, $addFilterableAttrs, diff --git a/app/code/Magento/Catalog/Helper/Product/Options.php b/app/code/Magento/Catalog/Helper/Product/Options.php index 40291d5012ca59c2c4bb2ccc1337a88176b29365..0520e2ebe7203997fd56270dd683ea4c6098d8bc 100644 --- a/app/code/Magento/Catalog/Helper/Product/Options.php +++ b/app/code/Magento/Catalog/Helper/Product/Options.php @@ -34,7 +34,7 @@ */ namespace Magento\Catalog\Helper\Product; -class Options extends \Magento\Core\Helper\AbstractHelper +class Options extends \Magento\App\Helper\AbstractHelper { /** * @var \Magento\Filesystem @@ -42,10 +42,10 @@ class Options extends \Magento\Core\Helper\AbstractHelper protected $_filesystem; /** - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Filesystem $filesystem */ - public function __construct(\Magento\Core\Helper\Context $context, \Magento\Filesystem $filesystem) + public function __construct(\Magento\App\Helper\Context $context, \Magento\Filesystem $filesystem) { parent::__construct($context); $this->_filesystem = $filesystem; diff --git a/app/code/Magento/Catalog/Helper/Product/Url.php b/app/code/Magento/Catalog/Helper/Product/Url.php index ed198dc39e86ae3c595443aaf1f9ee188f9faa15..ff31c375d0a88f3482438630fe642c6b8bd56b89 100644 --- a/app/code/Magento/Catalog/Helper/Product/Url.php +++ b/app/code/Magento/Catalog/Helper/Product/Url.php @@ -100,14 +100,14 @@ class Url extends \Magento\Core\Helper\Url /** * Check additional instruction for convertation table in configuration * - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\Config $config - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager */ public function __construct( - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Core\Model\Config $config, - \Magento\Core\Model\StoreManager $storeManager + \Magento\Core\Model\StoreManagerInterface $storeManager ) { 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 3e86645fd98ae19a4a5a069d3d0313cf6526a7d2..65b796af3e249727d671db4691171e3a6113d7b8 100644 --- a/app/code/Magento/Catalog/Helper/Product/View.php +++ b/app/code/Magento/Catalog/Helper/Product/View.php @@ -33,7 +33,7 @@ */ namespace Magento\Catalog\Helper\Product; -class View extends \Magento\Core\Helper\AbstractHelper +class View extends \Magento\App\Helper\AbstractHelper { // List of exceptions throwable during prepareAndRender() method public $ERR_NO_PRODUCT_LOADED = 1; @@ -67,13 +67,6 @@ class View extends \Magento\Core\Helper\AbstractHelper */ protected $_pageLayout = null; - /** - * Core event manager proxy - * - * @var \Magento\Event\ManagerInterface - */ - protected $_eventManager = null; - /** * Catalog design * @@ -89,33 +82,36 @@ class View extends \Magento\Core\Helper\AbstractHelper protected $_catalogSession; /** - * Construct - * + * @var \Magento\App\ViewInterface + */ + protected $_view; + + /** * @param \Magento\Catalog\Model\Session $catalogSession * @param \Magento\Catalog\Model\Design $catalogDesign - * @param \Magento\Event\ManagerInterface $eventManager * @param \Magento\Catalog\Helper\Product $catalogProduct * @param \Magento\Page\Helper\Layout $pageLayout - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\Registry $coreRegistry + * @param \Magento\App\ViewInterface $view * @param array $messageModels */ public function __construct( \Magento\Catalog\Model\Session $catalogSession, \Magento\Catalog\Model\Design $catalogDesign, - \Magento\Event\ManagerInterface $eventManager, \Magento\Catalog\Helper\Product $catalogProduct, \Magento\Page\Helper\Layout $pageLayout, - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Core\Model\Registry $coreRegistry, + \Magento\App\ViewInterface $view, array $messageModels = array() ) { $this->_catalogSession = $catalogSession; $this->_catalogDesign = $catalogDesign; - $this->_eventManager = $eventManager; $this->_catalogProduct = $catalogProduct; $this->_pageLayout = $pageLayout; $this->_coreRegistry = $coreRegistry; + $this->_view = $view; parent::__construct($context); $this->_messageModels = $messageModels; } @@ -124,7 +120,7 @@ class View extends \Magento\Core\Helper\AbstractHelper * Inits layout for viewing product page * * @param \Magento\Catalog\Model\Product $product - * @param \Magento\Core\Controller\Front\Action $controller + * @param \Magento\App\Action\Action $controller * * @return \Magento\Catalog\Helper\Product\View */ @@ -136,12 +132,12 @@ class View extends \Magento\Core\Helper\AbstractHelper $this->_catalogDesign->applyCustomDesign($settings->getCustomDesign()); } - $update = $controller->getLayout()->getUpdate(); + $update = $this->_view->getLayout()->getUpdate(); $update->addHandle('default'); - $controller->addPageLayoutHandles( + $this->_view->addPageLayoutHandles( array('id' => $product->getId(), 'sku' => $product->getSku(), 'type' => $product->getTypeId()) ); - $controller->loadLayoutUpdates(); + $this->_view->loadLayoutUpdates(); // Apply custom layout update once layout is loaded $layoutUpdates = $settings->getLayoutUpdates(); if ($layoutUpdates) { @@ -152,7 +148,8 @@ class View extends \Magento\Core\Helper\AbstractHelper } } - $controller->generateLayoutXml()->generateLayoutBlocks(); + $this->_view->generateLayoutXml(); + $this->_view->generateLayoutBlocks(); // Apply custom layout (page) template once the blocks are generated if ($settings->getPageLayout()) { @@ -160,9 +157,9 @@ class View extends \Magento\Core\Helper\AbstractHelper } $currentCategory = $this->_coreRegistry->registry('current_category'); - $root = $controller->getLayout()->getBlock('root'); + $root = $this->_view->getLayout()->getBlock('root'); if ($root) { - $controllerClass = $controller->getFullActionName(); + $controllerClass = $this->_request->getFullActionName(); if ($controllerClass != 'catalog-product-view') { $root->addBodyClass('catalog-product-view'); } @@ -186,7 +183,7 @@ class View extends \Magento\Core\Helper\AbstractHelper * - 'configure_mode' - boolean, whether we're in Configure-mode to edit product configuration * * @param int $productId - * @param \Magento\Core\Controller\Front\Action $controller + * @param \Magento\App\Action\Action $controller * @param null|\Magento\Object $params * * @return \Magento\Catalog\Helper\Product\View @@ -200,7 +197,7 @@ class View extends \Magento\Core\Helper\AbstractHelper $params = new \Magento\Object(); } - // Standard algorithm to prepare and rendern product view page + // Standard algorithm to prepare and render product view page $product = $productHelper->initProduct($productId, $controller, $params); if (!$product) { throw new \Magento\Core\Exception(__('Product is not loaded'), $this->ERR_NO_PRODUCT_LOADED); @@ -228,7 +225,7 @@ class View extends \Magento\Core\Helper\AbstractHelper if ($controller instanceof \Magento\Catalog\Controller\Product\View\ViewInterface) { foreach ($this->_messageModels as $sessionModel) { - $controller->initLayoutMessages($sessionModel); + $this->_view->getLayout()->initMessages($sessionModel); } } else { throw new \Magento\Core\Exception( @@ -236,7 +233,7 @@ class View extends \Magento\Core\Helper\AbstractHelper $this->ERR_BAD_CONTROLLER_INTERFACE ); } - $controller->renderLayout(); + $this->_view->renderLayout(); return $this; } diff --git a/app/code/Magento/Catalog/Model/Category.php b/app/code/Magento/Catalog/Model/Category.php index bda04ca32e754454da792f4e035b6f8d8e05168a..ee6c2ed06743d85d33cfa7f26f749f84343ba01a 100644 --- a/app/code/Magento/Catalog/Model/Category.php +++ b/app/code/Magento/Catalog/Model/Category.php @@ -125,13 +125,6 @@ class Category extends \Magento\Catalog\Model\AbstractModel */ protected $filter; - /** - * Core event manager proxy - * - * @var \Magento\Event\ManagerInterface - */ - protected $_eventManager = null; - /** * Index indexer * @@ -194,7 +187,6 @@ class Category extends \Magento\Catalog\Model\AbstractModel * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Catalog\Model\Config $catalogConfig * @param \Magento\Index\Model\Indexer $indexIndexer - * @param \Magento\Event\ManagerInterface $eventManager * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Catalog\Helper\Category\Flat $catalogCategoryFlat * @param \Magento\Core\Model\Context $context @@ -217,7 +209,6 @@ class Category extends \Magento\Catalog\Model\AbstractModel \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Catalog\Model\Config $catalogConfig, \Magento\Index\Model\Indexer $indexIndexer, - \Magento\Event\ManagerInterface $eventManager, \Magento\Core\Helper\Data $coreData, \Magento\Catalog\Helper\Category\Flat $catalogCategoryFlat, \Magento\Core\Model\Context $context, @@ -235,7 +226,6 @@ class Category extends \Magento\Catalog\Model\AbstractModel $this->_productCollectionFactory = $productCollectionFactory; $this->_catalogConfig = $catalogConfig; $this->_indexIndexer = $indexIndexer; - $this->_eventManager = $eventManager; $this->filter = $filter; $this->_catalogCategoryFlat = $catalogCategoryFlat; $this->_treeModel = $categoryTreeResource; diff --git a/app/code/Magento/Catalog/Model/Config/Backend/Category.php b/app/code/Magento/Catalog/Model/Config/Backend/Category.php index 3ec920d9e61a597c0d7d81a019b26c851f0b9a15..b8e4d570b9cc1fe10a9a32bf13b6bf2320e66ede 100644 --- a/app/code/Magento/Catalog/Model/Config/Backend/Category.php +++ b/app/code/Magento/Catalog/Model/Config/Backend/Category.php @@ -48,7 +48,7 @@ class Category extends \Magento\Core\Model\Config\Value * @param \Magento\Catalog\Model\Category $catalogCategory * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Config $config * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection @@ -58,7 +58,7 @@ class Category extends \Magento\Core\Model\Config\Value \Magento\Catalog\Model\Category $catalogCategory, \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Config $config, \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 f7011d4cea7ba31e7890cfa216a665357785cbd0..0c1572225bfc1e0a440aa278c4dc45afc15fa7a3 100644 --- a/app/code/Magento/Catalog/Model/Config/CatalogClone/Media/Image.php +++ b/app/code/Magento/Catalog/Model/Config/CatalogClone/Media/Image.php @@ -54,7 +54,7 @@ class Image extends \Magento\Core\Model\Config\Value * @param \Magento\Eav\Model\Config $eavConfig * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Config $config * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection @@ -65,7 +65,7 @@ class Image extends \Magento\Core\Model\Config\Value \Magento\Eav\Model\Config $eavConfig, \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Config $config, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, diff --git a/app/code/Magento/Catalog/Model/Entity/Attribute.php b/app/code/Magento/Catalog/Model/Entity/Attribute.php index 3cd8024135f0283dcbfad023451b7badf508f4ba..76a29cbdfe9cd90718fd4b45d12360d543bb58c6 100644 --- a/app/code/Magento/Catalog/Model/Entity/Attribute.php +++ b/app/code/Magento/Catalog/Model/Entity/Attribute.php @@ -86,7 +86,7 @@ class Attribute extends \Magento\Eav\Model\Entity\Attribute * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Eav\Model\Config $eavConfig * @param \Magento\Eav\Model\Entity\TypeFactory $eavTypeFactory - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Eav\Model\Resource\Helper $resourceHelper * @param \Magento\Validator\UniversalFactory $universalFactory * @param \Magento\Core\Model\LocaleInterface $locale @@ -101,7 +101,7 @@ class Attribute extends \Magento\Eav\Model\Entity\Attribute \Magento\Core\Helper\Data $coreData, \Magento\Eav\Model\Config $eavConfig, \Magento\Eav\Model\Entity\TypeFactory $eavTypeFactory, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Eav\Model\Resource\Helper $resourceHelper, \Magento\Validator\UniversalFactory $universalFactory, \Magento\Core\Model\LocaleInterface $locale, diff --git a/app/code/Magento/Catalog/Model/Layer/Filter/Category.php b/app/code/Magento/Catalog/Model/Layer/Filter/Category.php index 52930b3b25c63a27c0bd0280afa28362a680820e..c900032becbb89f50498896aeae204ede418d717 100644 --- a/app/code/Magento/Catalog/Model/Layer/Filter/Category.php +++ b/app/code/Magento/Catalog/Model/Layer/Filter/Category.php @@ -121,7 +121,7 @@ class Category extends \Magento\Catalog\Model\Layer\Filter\AbstractFilter * Apply category filter to layer * * @param \Zend_Controller_Request_Abstract $request - * @param \Magento\Core\Block\AbstractBlock $filterBlock + * @param \Magento\View\Block\AbstractBlock $filterBlock * @return \Magento\Catalog\Model\Layer\Filter\Category */ public function apply(\Zend_Controller_Request_Abstract $request, $filterBlock) diff --git a/app/code/Magento/Catalog/Model/Product.php b/app/code/Magento/Catalog/Model/Product.php index 16ba34b0e779ee07c73969332b3029540d2b04b1..de01c1491b720ebaf712e5a7936e219649630c14 100644 --- a/app/code/Magento/Catalog/Model/Product.php +++ b/app/code/Magento/Catalog/Model/Product.php @@ -32,7 +32,6 @@ * @method \Magento\Catalog\Model\Product setHasError(bool $value) * @method null|bool getHasError() * @method \Magento\Catalog\Model\Product setTypeId(string $typeId) - * @method string \Magento\Catalog\Model\Product getTypeId() * @method \Magento\Catalog\Model\Product setAssociatedProductIds(array $productIds) * @method array getAssociatedProductIds() * @method \Magento\Catalog\Model\Product setNewVariationsAttributeSetId(int $value) @@ -138,13 +137,6 @@ class Product extends \Magento\Catalog\Model\AbstractModel */ protected $_catalogImage = null; - /** - * Core event manager proxy - * - * @var \Magento\Event\ManagerInterface - */ - protected $_eventManager = null; - /** * @var \Magento\Data\CollectionFactory */ @@ -229,7 +221,6 @@ class Product extends \Magento\Catalog\Model\AbstractModel * @param \Magento\Catalog\Model\Product\Media\Config $catalogProductMediaConfig * @param \Magento\Index\Model\Indexer $indexIndexer * @param \Magento\Catalog\Model\Product\Type $catalogProductType - * @param \Magento\Event\ManagerInterface $eventManager * @param \Magento\Catalog\Helper\Image $catalogImage * @param \Magento\Catalog\Helper\Data $catalogData * @param \Magento\Catalog\Helper\Product $catalogProduct @@ -256,7 +247,6 @@ class Product extends \Magento\Catalog\Model\AbstractModel \Magento\Catalog\Model\Product\Media\Config $catalogProductMediaConfig, \Magento\Index\Model\Indexer $indexIndexer, \Magento\Catalog\Model\Product\Type $catalogProductType, - \Magento\Event\ManagerInterface $eventManager, \Magento\Catalog\Helper\Image $catalogImage, \Magento\Catalog\Helper\Data $catalogData, \Magento\Catalog\Helper\Product $catalogProduct, @@ -277,7 +267,6 @@ class Product extends \Magento\Catalog\Model\AbstractModel $this->_catalogProductMediaConfig = $catalogProductMediaConfig; $this->_indexIndexer = $indexIndexer; $this->_catalogProductType = $catalogProductType; - $this->_eventManager = $eventManager; $this->_catalogImage = $catalogImage; $this->_catalogData = $catalogData; $this->_catalogProduct = $catalogProduct; @@ -356,9 +345,9 @@ class Product extends \Magento\Catalog\Model\AbstractModel } /** - * Get product price throught type instance + * Get product price through type instance * - * @return unknown + * @return float */ public function getPrice() { @@ -441,7 +430,7 @@ class Product extends \Magento\Catalog\Model\AbstractModel } /** - * Retrive product id by sku + * Retrieve product id by sku * * @param string $sku * @return integer @@ -670,7 +659,7 @@ class Product extends \Magento\Catalog\Model\AbstractModel } /** - * Clear chache related with product and protect delete from not admin + * Clear cache related with product and protect delete from not admin * Register indexing event before delete product * * @return \Magento\Catalog\Model\Product @@ -877,7 +866,7 @@ class Product extends \Magento\Catalog\Model\AbstractModel ** Linked products API */ /** - * Retrieve array of related roducts + * Retrieve array of related products * * @return array */ @@ -1089,7 +1078,7 @@ class Product extends \Magento\Catalog\Model\AbstractModel ** Media API */ /** - * Retrive attributes for media gallery + * Retrieve attributes for media gallery * * @return array */ @@ -1108,7 +1097,7 @@ class Product extends \Magento\Catalog\Model\AbstractModel } /** - * Retrive media gallery images + * Retrieve media gallery images * * @return \Magento\Data\Collection */ @@ -1154,7 +1143,7 @@ class Product extends \Magento\Catalog\Model\AbstractModel } /** - * Retrive product media config + * Retrieve product media config * * @return \Magento\Catalog\Model\Product\Media\Config */ @@ -1335,7 +1324,7 @@ class Product extends \Magento\Catalog\Model\AbstractModel } /** - * Check Product visilbe in catalog + * Check Product visible in catalog * * @return bool */ @@ -1685,9 +1674,9 @@ class Product extends \Magento\Catalog\Model\AbstractModel } /** - * Retrieve weight throught type instance + * Retrieve weight through type instance * - * @return unknown + * @return float */ public function getWeight() { @@ -1942,7 +1931,7 @@ class Product extends \Magento\Catalog\Model\AbstractModel } /** - * Get cahce tags associated with object id + * Get cache tags associated with object id * * @return array */ diff --git a/app/code/Magento/Catalog/Model/Product/Action.php b/app/code/Magento/Catalog/Model/Product/Action.php index 87243c33104a2e9d068e110939a306e72120516f..b8422eb2678b21a1cca5a844b3179004a87280b7 100644 --- a/app/code/Magento/Catalog/Model/Product/Action.php +++ b/app/code/Magento/Catalog/Model/Product/Action.php @@ -36,13 +36,6 @@ namespace Magento\Catalog\Model\Product; class Action extends \Magento\Core\Model\AbstractModel { - /** - * Core event manager proxy - * - * @var \Magento\Event\ManagerInterface - */ - protected $_eventManager = null; - /** * Index indexer * @@ -62,7 +55,6 @@ class Action extends \Magento\Core\Model\AbstractModel * * @param \Magento\Catalog\Model\Product\WebsiteFactory $productWebsiteFactory * @param \Magento\Index\Model\Indexer $indexIndexer - * @param \Magento\Event\ManagerInterface $eventManager * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry * @param \Magento\Core\Model\Resource\AbstractResource $resource @@ -72,7 +64,6 @@ class Action extends \Magento\Core\Model\AbstractModel public function __construct( \Magento\Catalog\Model\Product\WebsiteFactory $productWebsiteFactory, \Magento\Index\Model\Indexer $indexIndexer, - \Magento\Event\ManagerInterface $eventManager, \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, \Magento\Core\Model\Resource\AbstractResource $resource = null, @@ -81,7 +72,6 @@ class Action extends \Magento\Core\Model\AbstractModel ) { $this->_productWebsiteFactory = $productWebsiteFactory; $this->_indexIndexer = $indexIndexer; - $this->_eventManager = $eventManager; parent::__construct($context, $registry, $resource, $resourceCollection, $data); } diff --git a/app/code/Magento/Catalog/Model/Product/Status.php b/app/code/Magento/Catalog/Model/Product/Status.php index eeb654e054ca37aa97475baae4677f23c26cc72c..0ff9a0683d74f30bfd749a0de519ee6a32e00453 100644 --- a/app/code/Magento/Catalog/Model/Product/Status.php +++ b/app/code/Magento/Catalog/Model/Product/Status.php @@ -54,13 +54,6 @@ class Status extends \Magento\Core\Model\AbstractModel */ protected $_attribute; - /** - * Core event manager proxy - * - * @var \Magento\Event\ManagerInterface - */ - protected $_eventManager = null; - /** * Catalog product action * @@ -80,7 +73,6 @@ class Status extends \Magento\Core\Model\AbstractModel * * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Catalog\Model\Product\Action $catalogProductAction - * @param \Magento\Event\ManagerInterface $eventManager * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry * @param \Magento\Core\Model\Resource\AbstractResource $resource @@ -90,7 +82,6 @@ class Status extends \Magento\Core\Model\AbstractModel public function __construct( \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Catalog\Model\Product\Action $catalogProductAction, - \Magento\Event\ManagerInterface $eventManager, \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, \Magento\Core\Model\Resource\AbstractResource $resource = null, @@ -99,7 +90,6 @@ class Status extends \Magento\Core\Model\AbstractModel ) { $this->_storeManager = $storeManager; $this->_catalogProductAction = $catalogProductAction; - $this->_eventManager = $eventManager; parent::__construct($context, $registry, $resource, $resourceCollection, $data); } diff --git a/app/code/Magento/Catalog/Model/Product/Type/Configurable.php b/app/code/Magento/Catalog/Model/Product/Type/Configurable.php index 2cdec88051be0ae49f456005117da25783bdc78e..fc53f62519a6277eae89011d7677c4989ff8ac13 100644 --- a/app/code/Magento/Catalog/Model/Product/Type/Configurable.php +++ b/app/code/Magento/Catalog/Model/Product/Type/Configurable.php @@ -98,7 +98,7 @@ class Configurable extends \Magento\Catalog\Model\Product\Type\AbstractType /** * Store manager * - * @var \Magento\Core\Model\StoreManager + * @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; @@ -177,7 +177,7 @@ class Configurable extends \Magento\Catalog\Model\Product\Type\AbstractType * @param \Magento\Catalog\Model\Resource\Product\Type\Configurable\Product\CollectionFactory $productCollectionFactory * @param \Magento\Catalog\Model\Resource\Product\Type\Configurable\Attribute\CollectionFactory $attributeCollectionFactory * @param \Magento\Catalog\Model\Resource\Product\Type\Configurable $catalogProductTypeConfigurable - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Event\ManagerInterface $eventManager * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Core\Helper\File\Storage\Database $fileStorageDb @@ -201,7 +201,7 @@ class Configurable extends \Magento\Catalog\Model\Product\Type\AbstractType \Magento\Catalog\Model\Resource\Product\Type\Configurable\Product\CollectionFactory $productCollectionFactory, \Magento\Catalog\Model\Resource\Product\Type\Configurable\Attribute\CollectionFactory $attributeCollectionFactory, \Magento\Catalog\Model\Resource\Product\Type\Configurable $catalogProductTypeConfigurable, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Event\ManagerInterface $eventManager, \Magento\Core\Helper\Data $coreData, \Magento\Core\Helper\File\Storage\Database $fileStorageDb, diff --git a/app/code/Magento/Catalog/Model/Resource/Collection/AbstractCollection.php b/app/code/Magento/Catalog/Model/Resource/Collection/AbstractCollection.php index 7dd01c133ec54de47ef6668b2b6f1b66cdbe9c44..4f6f16c47a79b7911b953f731a5aa8b117347be6 100644 --- a/app/code/Magento/Catalog/Model/Resource/Collection/AbstractCollection.php +++ b/app/code/Magento/Catalog/Model/Resource/Collection/AbstractCollection.php @@ -59,7 +59,7 @@ class AbstractCollection extends \Magento\Eav\Model\Entity\Collection\AbstractCo * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy * @param \Magento\Core\Model\EntityFactory $entityFactory * @param \Magento\Eav\Model\Config $eavConfig - * @param \Magento\App\Resource $coreResource + * @param \Magento\App\Resource $resource * @param \Magento\Eav\Model\EntityFactory $eavEntityFactory * @param \Magento\Eav\Model\Resource\Helper $resourceHelper * @param \Magento\Validator\UniversalFactory $universalFactory @@ -71,14 +71,14 @@ class AbstractCollection extends \Magento\Eav\Model\Entity\Collection\AbstractCo \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, \Magento\Core\Model\EntityFactory $entityFactory, \Magento\Eav\Model\Config $eavConfig, - \Magento\App\Resource $coreResource, + \Magento\App\Resource $resource, \Magento\Eav\Model\EntityFactory $eavEntityFactory, \Magento\Eav\Model\Resource\Helper $resourceHelper, \Magento\Validator\UniversalFactory $universalFactory, \Magento\Core\Model\StoreManagerInterface $storeManager ) { $this->_storeManager = $storeManager; - parent::__construct($eventManager, $logger, $fetchStrategy, $entityFactory, $eavConfig, $coreResource, + parent::__construct($eventManager, $logger, $fetchStrategy, $entityFactory, $eavConfig, $resource, $eavEntityFactory, $resourceHelper, $universalFactory); } diff --git a/app/code/Magento/Catalog/Model/Resource/Eav/Attribute.php b/app/code/Magento/Catalog/Model/Resource/Eav/Attribute.php index 25cb201040928c9bb422de28d4742271df4651b9..a04381db6b43e108e9ffd828603a008c32120356 100644 --- a/app/code/Magento/Catalog/Model/Resource/Eav/Attribute.php +++ b/app/code/Magento/Catalog/Model/Resource/Eav/Attribute.php @@ -116,7 +116,7 @@ class Attribute extends \Magento\Eav\Model\Entity\Attribute * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Eav\Model\Config $eavConfig * @param \Magento\Eav\Model\Entity\TypeFactory $eavTypeFactory - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Eav\Model\Resource\Helper $resourceHelper * @param \Magento\Validator\UniversalFactory $universalFactory * @param \Magento\Core\Model\LocaleInterface $locale @@ -132,7 +132,7 @@ class Attribute extends \Magento\Eav\Model\Entity\Attribute \Magento\Core\Helper\Data $coreData, \Magento\Eav\Model\Config $eavConfig, \Magento\Eav\Model\Entity\TypeFactory $eavTypeFactory, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Eav\Model\Resource\Helper $resourceHelper, \Magento\Validator\UniversalFactory $universalFactory, \Magento\Core\Model\LocaleInterface $locale, diff --git a/app/code/Magento/Catalog/Model/Resource/Product/Collection.php b/app/code/Magento/Catalog/Model/Resource/Product/Collection.php index 6142b9caac26ed5c7522a4007a9da41b608908cc..e36de785d713c6332672df02ebc1f96a354b2a21 100644 --- a/app/code/Magento/Catalog/Model/Resource/Product/Collection.php +++ b/app/code/Magento/Catalog/Model/Resource/Product/Collection.php @@ -270,7 +270,7 @@ class Collection extends \Magento\Catalog\Model\Resource\Collection\AbstractColl * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy * @param \Magento\Core\Model\EntityFactory $entityFactory * @param \Magento\Eav\Model\Config $eavConfig - * @param \Magento\App\Resource $coreResource + * @param \Magento\App\Resource $resource * @param \Magento\Eav\Model\EntityFactory $eavEntityFactory * @param \Magento\Validator\UniversalFactory $universalFactory * @param \Magento\Core\Model\StoreManagerInterface $storeManager @@ -292,7 +292,7 @@ class Collection extends \Magento\Catalog\Model\Resource\Collection\AbstractColl \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, \Magento\Core\Model\EntityFactory $entityFactory, \Magento\Eav\Model\Config $eavConfig, - \Magento\App\Resource $coreResource, + \Magento\App\Resource $resource, \Magento\Eav\Model\EntityFactory $eavEntityFactory, \Magento\Validator\UniversalFactory $universalFactory, \Magento\Core\Model\StoreManagerInterface $storeManager, @@ -315,7 +315,7 @@ class Collection extends \Magento\Catalog\Model\Resource\Collection\AbstractColl $this->_customerSession = $customerSession; $this->_resourceHelper = $resourceHelper; $this->dateTime = $dateTime; - parent::__construct($eventManager, $logger, $fetchStrategy, $entityFactory, $eavConfig, $coreResource, + parent::__construct($eventManager, $logger, $fetchStrategy, $entityFactory, $eavConfig, $resource, $eavEntityFactory, $resourceHelper, $universalFactory, $storeManager); } diff --git a/app/code/Magento/Catalog/Model/Resource/Product/Collection/AssociatedProduct.php b/app/code/Magento/Catalog/Model/Resource/Product/Collection/AssociatedProduct.php index ab01778c8391edc2327a4da665d42a65c977125c..f6d3abd98be66b03a65713c64a93b3119f1b17aa 100644 --- a/app/code/Magento/Catalog/Model/Resource/Product/Collection/AssociatedProduct.php +++ b/app/code/Magento/Catalog/Model/Resource/Product/Collection/AssociatedProduct.php @@ -62,7 +62,7 @@ class AssociatedProduct * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy * @param \Magento\Core\Model\EntityFactory $entityFactory * @param \Magento\Eav\Model\Config $eavConfig - * @param \Magento\App\Resource $coreResource + * @param \Magento\App\Resource $resource * @param \Magento\Eav\Model\EntityFactory $eavEntityFactory * @param \Magento\Validator\UniversalFactory $universalFactory * @param \Magento\Core\Model\StoreManagerInterface $storeManager @@ -86,7 +86,7 @@ class AssociatedProduct \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, \Magento\Core\Model\EntityFactory $entityFactory, \Magento\Eav\Model\Config $eavConfig, - \Magento\App\Resource $coreResource, + \Magento\App\Resource $resource, \Magento\Eav\Model\EntityFactory $eavEntityFactory, \Magento\Validator\UniversalFactory $universalFactory, \Magento\Core\Model\StoreManagerInterface $storeManager, @@ -106,7 +106,7 @@ class AssociatedProduct $this->_registryManager = $registryManager; $this->_productType = $productType; $this->_configurationHelper = $configurationHelper; - parent::__construct($eventManager, $logger, $fetchStrategy, $entityFactory, $eavConfig, $coreResource, + parent::__construct($eventManager, $logger, $fetchStrategy, $entityFactory, $eavConfig, $resource, $eavEntityFactory, $universalFactory, $storeManager, $catalogData, $catalogProductFlat, $coreStoreConfig, $productOptionFactory, $catalogUrl, $locale, $customerSession, $resourceHelper, $dateTime ); diff --git a/app/code/Magento/Catalog/Model/Resource/Product/Compare/Item/Collection.php b/app/code/Magento/Catalog/Model/Resource/Product/Compare/Item/Collection.php index 8dc2d65adfc5f59e0c453d41d4c083b14b924d6b..0d5287f8809fe9cd588228e8dc4e282e97361621 100644 --- a/app/code/Magento/Catalog/Model/Resource/Product/Compare/Item/Collection.php +++ b/app/code/Magento/Catalog/Model/Resource/Product/Compare/Item/Collection.php @@ -78,7 +78,7 @@ class Collection * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy * @param \Magento\Core\Model\EntityFactory $entityFactory * @param \Magento\Eav\Model\Config $eavConfig - * @param \Magento\App\Resource $coreResource + * @param \Magento\App\Resource $resource * @param \Magento\Eav\Model\EntityFactory $eavEntityFactory * @param \Magento\Validator\UniversalFactory $universalFactory * @param \Magento\Core\Model\StoreManagerInterface $storeManager @@ -102,7 +102,7 @@ class Collection \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, \Magento\Core\Model\EntityFactory $entityFactory, \Magento\Eav\Model\Config $eavConfig, - \Magento\App\Resource $coreResource, + \Magento\App\Resource $resource, \Magento\Eav\Model\EntityFactory $eavEntityFactory, \Magento\Validator\UniversalFactory $universalFactory, \Magento\Core\Model\StoreManagerInterface $storeManager, @@ -121,7 +121,7 @@ class Collection $this->_catalogProductCompareItem = $catalogProductCompareItem; $this->_catalogProductCompare = $catalogProductCompare; parent::__construct($eventManager, $logger, $fetchStrategy, $entityFactory, $eavConfig, - $coreResource, $eavEntityFactory, $universalFactory, $storeManager, $catalogData, $catalogProductFlat, + $resource, $eavEntityFactory, $universalFactory, $storeManager, $catalogData, $catalogProductFlat, $coreStoreConfig, $productOptionFactory, $catalogUrl, $locale, $customerSession, $resourceHelper, $dateTime ); } diff --git a/app/code/Magento/Catalog/Model/Resource/Product/Type/Grouped/AssociatedProductsCollection.php b/app/code/Magento/Catalog/Model/Resource/Product/Type/Grouped/AssociatedProductsCollection.php index f7c9281ac2998ad2a4040e5e44f8372a0f77efe5..86cf51586bc22b43ff81f18682486c2efc4ab8c5 100644 --- a/app/code/Magento/Catalog/Model/Resource/Product/Type/Grouped/AssociatedProductsCollection.php +++ b/app/code/Magento/Catalog/Model/Resource/Product/Type/Grouped/AssociatedProductsCollection.php @@ -58,7 +58,7 @@ class AssociatedProductsCollection * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy * @param \Magento\Core\Model\EntityFactory $entityFactory * @param \Magento\Eav\Model\Config $eavConfig - * @param \Magento\App\Resource $coreResource + * @param \Magento\App\Resource $resource * @param \Magento\Eav\Model\EntityFactory $eavEntityFactory * @param \Magento\Validator\UniversalFactory $universalFactory * @param \Magento\Core\Model\StoreManagerInterface $storeManager @@ -82,7 +82,7 @@ class AssociatedProductsCollection \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, \Magento\Core\Model\EntityFactory $entityFactory, \Magento\Eav\Model\Config $eavConfig, - \Magento\App\Resource $coreResource, + \Magento\App\Resource $resource, \Magento\Eav\Model\EntityFactory $eavEntityFactory, \Magento\Validator\UniversalFactory $universalFactory, \Magento\Core\Model\StoreManagerInterface $storeManager, @@ -100,7 +100,7 @@ class AssociatedProductsCollection ) { $this->_coreRegistry = $coreRegistry; $this->_config = $config; - parent::__construct($eventManager, $logger, $fetchStrategy, $entityFactory, $eavConfig, $coreResource, + parent::__construct($eventManager, $logger, $fetchStrategy, $entityFactory, $eavConfig, $resource, $eavEntityFactory, $universalFactory, $storeManager, $catalogData, $catalogProductFlat, $coreStoreConfig, $productOptionFactory, $catalogUrl, $locale, $customerSession, $resourceHelper, $dateTime ); diff --git a/app/code/Magento/Catalog/Model/Resource/Setup.php b/app/code/Magento/Catalog/Model/Resource/Setup.php index 50200f13d17964e365ae405ce964f2961e13875e..de6dee60c64ec83e546cdd54ee536b04fa798db0 100755 --- a/app/code/Magento/Catalog/Model/Resource/Setup.php +++ b/app/code/Magento/Catalog/Model/Resource/Setup.php @@ -50,13 +50,6 @@ class Setup extends \Magento\Eav\Model\Entity\Setup */ protected $_indexerFactory; - /** - * Migration setup model factory - * - * @var \Magento\Core\Model\Resource\Setup\MigrationFactory - */ - protected $_resourceMigrationFactory; - /** * Attribute resource model factory * @@ -73,7 +66,6 @@ class Setup extends \Magento\Eav\Model\Entity\Setup * @param string $resourceName * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory * @param \Magento\Index\Model\IndexerFactory $indexerFactory - * @param \Magento\Core\Model\Resource\Setup\MigrationFactory $resourceMigrationFactory * @param \Magento\Catalog\Model\Resource\Eav\AttributeFactory $eavAttributeResourceFactory * @param string $moduleName * @param string $connectionName @@ -85,14 +77,12 @@ class Setup extends \Magento\Eav\Model\Entity\Setup $resourceName, \Magento\Catalog\Model\CategoryFactory $categoryFactory, \Magento\Index\Model\IndexerFactory $indexerFactory, - \Magento\Core\Model\Resource\Setup\MigrationFactory $resourceMigrationFactory, \Magento\Catalog\Model\Resource\Eav\AttributeFactory $eavAttributeResourceFactory, $moduleName = 'Magento_Catalog', $connectionName = '' ) { $this->_categoryFactory = $categoryFactory; $this->_indexerFactory = $indexerFactory; - $this->_resourceMigrationFactory = $resourceMigrationFactory; $this->_eavAttributeResourceFactory = $eavAttributeResourceFactory; parent::__construct($context, $cache, $attrGrCollFactory, $resourceName, $moduleName, $connectionName); } @@ -128,7 +118,7 @@ class Setup extends \Magento\Eav\Model\Entity\Setup */ public function createSetupMigration($data = array()) { - return $this->_resourceMigrationFactory->create($data); + return $this->_migrationFactory->create($data); } /** 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 279ca9e74130f2909b7ab44bb851fc7491b28add..5ac15b549c2f20b088ac957667322285674464af 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 @@ -44,7 +44,7 @@ class Flat extends \Magento\Core\Model\Config\Value * @param \Magento\Index\Model\IndexerFactory $indexerFactory * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Config $config * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection @@ -54,7 +54,7 @@ class Flat extends \Magento\Core\Model\Config\Value \Magento\Index\Model\IndexerFactory $indexerFactory, \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Config $config, \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 1fe3962b10a8a309d2bfda7cbc7c61c897246089..ce40ff299b3050466c1a528b0b06627e8c0f353f 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 @@ -44,7 +44,7 @@ class Flat extends \Magento\Core\Model\Config\Value * @param \Magento\Index\Model\Indexer $indexIndexer * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Config $config * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection @@ -54,7 +54,7 @@ class Flat extends \Magento\Core\Model\Config\Value \Magento\Index\Model\Indexer $indexIndexer, \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Config $config, \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 5169d9d955c7bf81d7491ca6be0e261e2186386d..73227bc59ac823b4eff7acbdebdc89f0ecbd0ef1 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\Helper\Url\Rewrite $coreUrlRewrite * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Config $config * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection @@ -52,7 +52,7 @@ class Suffix extends \Magento\Core\Model\Config\Value \Magento\Core\Helper\Url\Rewrite $coreUrlRewrite, \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Config $config, \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 c7f84b5d594c5f8a5945a81381cb7ec4d89eed0a..5b52d053f4e3be47ce46b8c3842ba652581b306e 100644 --- a/app/code/Magento/Catalog/Model/Template/Filter.php +++ b/app/code/Magento/Catalog/Model/Template/Filter.php @@ -84,7 +84,7 @@ class Filter extends \Magento\Filter\Template * Set use absolute links flag * * @param bool $flag - * @return \Magento\Core\Model\Email\Template\Filter + * @return \Magento\Email\Model\Template\Filter */ public function setUseAbsoluteLinks($flag) { @@ -97,7 +97,7 @@ class Filter extends \Magento\Filter\Template * Doesn't set anything intentionally, since SID is not allowed in any kind of emails * * @param bool $flag - * @return \Magento\Core\Model\Email\Template\Filter + * @return \Magento\Email\Model\Template\Filter */ public function setUseSessionInUrl($flag) { @@ -110,7 +110,7 @@ class Filter extends \Magento\Filter\Template * * @param array $construction * @return string - * @see \Magento\Core\Model\Email\Template\Filter::viewDirective() method has been copypasted + * @see \Magento\Email\Model\Template\Filter::viewDirective() method has been copypasted */ public function viewDirective($construction) { @@ -127,7 +127,7 @@ class Filter extends \Magento\Filter\Template * * @param array $construction * @return string - * @see \Magento\Core\Model\Email\Template\Filter::mediaDirective() method has been copypasted + * @see \Magento\Email\Model\Template\Filter::mediaDirective() method has been copypasted */ public function mediaDirective($construction) { @@ -141,7 +141,7 @@ class Filter extends \Magento\Filter\Template * * @param array $construction * @return string - * @see \Magento\Core\Model\Email\Template\Filter::storeDirective() method has been copypasted + * @see \Magento\Email\Model\Template\Filter::storeDirective() method has been copypasted */ public function storeDirective($construction) { diff --git a/app/code/Magento/Catalog/etc/frontend/di.xml b/app/code/Magento/Catalog/etc/frontend/di.xml index 1bf37d9d6c7af67182d8d1c0b61d1fde37750076..2946fd33dff22c7b6e9cd264543cff676a6436df 100644 --- a/app/code/Magento/Catalog/etc/frontend/di.xml +++ b/app/code/Magento/Catalog/etc/frontend/di.xml @@ -37,4 +37,14 @@ <type name="Magento\Sales\Model\Convert\Quote"> <plugin name="copy_quote_files_to_order" type="Magento\Catalog\Model\Plugin\QuoteItemProductOption"/> </type> + <virtualType name="compareProductInitSession" type="Magento\Core\App\Action\Plugin\Session"> + <param name="cookieCheckActions"> + <value> + <compareProductAdd>add</compareProductAdd> + </value> + </param> + </virtualType> + <type name="Magento\Catalog\Controller\Product\Compare"> + <plugin name="sessionInitializer" type="compareProductInitSession" /> + </type> </config> diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/product/edit/super/attribute-js-template.phtml b/app/code/Magento/Catalog/view/adminhtml/catalog/product/edit/super/attribute-js-template.phtml index 88a97b6e89aecbb4928c7c99ddb378e00c7ee929..8d2019790962c8a93b4f97e027d112a8180b8268 100644 --- a/app/code/Magento/Catalog/view/adminhtml/catalog/product/edit/super/attribute-js-template.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/catalog/product/edit/super/attribute-js-template.phtml @@ -23,7 +23,7 @@ * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ -/* @var $this \Magento\Core\Block\Template */ +/* @var $this \Magento\View\Block\Template */ ?> <script data-template-for="configurable-attribute" type="text/x-jquery-tmpl"> <div class="entry-edit" data-role="configurable-attribute" data-attribute="${JSON.stringify(attribute)}"> diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/product/edit/super/attribute-template.phtml b/app/code/Magento/Catalog/view/adminhtml/catalog/product/edit/super/attribute-template.phtml index c9eb23e8d37f32879cec0ac63ec95ff490379332..d1c5bfdaedaff75880baedd1bb594b9eac8742b4 100644 --- a/app/code/Magento/Catalog/view/adminhtml/catalog/product/edit/super/attribute-template.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/catalog/product/edit/super/attribute-template.phtml @@ -23,7 +23,7 @@ * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ -/* @var $this \Magento\Core\Block\Template */ +/* @var $this \Magento\View\Block\Template */ $havePriceVariation = array_reduce( $attribute['values'], diff --git a/app/code/Magento/Catalog/view/adminhtml/layout/CATALOG_PRODUCT_COMPOSITE_CONFIGURE.xml b/app/code/Magento/Catalog/view/adminhtml/layout/CATALOG_PRODUCT_COMPOSITE_CONFIGURE.xml index e3ff5b3eb0f78b30387c2effd399963d4b205d92..e62be5fd5b3562ce48c8815ae108593c4e71a261 100644 --- a/app/code/Magento/Catalog/view/adminhtml/layout/CATALOG_PRODUCT_COMPOSITE_CONFIGURE.xml +++ b/app/code/Magento/Catalog/view/adminhtml/layout/CATALOG_PRODUCT_COMPOSITE_CONFIGURE.xml @@ -31,7 +31,7 @@ <block class="Magento\Catalog\Block\Product\View\Options\Type\File" as="file" template="Magento_Catalog::catalog/product/composite/fieldset/options/type/file.phtml"/> <block class="Magento\Catalog\Block\Product\View\Options\Type\Select" as="select" template="Magento_Catalog::catalog/product/composite/fieldset/options/type/select.phtml"/> <block class="Magento\Catalog\Block\Product\View\Options\Type\Date" as="date" template="Magento_Catalog::catalog/product/composite/fieldset/options/type/date.phtml"/> - <block class="Magento\Core\Block\Template" name="product.composite.fieldset.options.js" as="options_js" template="Magento_Catalog::catalog/product/composite/fieldset/options/js.phtml"/> + <block class="Magento\View\Block\Template" name="product.composite.fieldset.options.js" as="options_js" template="Magento_Catalog::catalog/product/composite/fieldset/options/js.phtml"/> </block> <block class="Magento\Catalog\Block\Adminhtml\Product\Composite\Fieldset\Qty" name="product.composite.fieldset.qty" template="catalog/product/composite/fieldset/qty.phtml"/> </block> diff --git a/app/code/Magento/Catalog/view/adminhtml/layout/catalog_category_edit.xml b/app/code/Magento/Catalog/view/adminhtml/layout/catalog_category_edit.xml index cc8a9ef12d535870501a8d6fd50c642ff0f3260b..24494575ce1b71a21203f91c65478572201346b5 100644 --- a/app/code/Magento/Catalog/view/adminhtml/layout/catalog_category_edit.xml +++ b/app/code/Magento/Catalog/view/adminhtml/layout/catalog_category_edit.xml @@ -64,6 +64,6 @@ <block class="Magento\Catalog\Block\Adminhtml\Category\Edit" name="category.edit" template="catalog/category/edit.phtml"/> </referenceContainer> <referenceContainer name="js"> - <block class="Magento\Core\Block\Template" template="Magento_Catalog::catalog/wysiwyg/js.phtml" name="catalog.wysiwyg.js"/> + <block class="Magento\View\Block\Template" template="Magento_Catalog::catalog/wysiwyg/js.phtml" name="catalog.wysiwyg.js"/> </referenceContainer> </layout> diff --git a/app/code/Magento/Catalog/view/adminhtml/layout/catalog_product_grouped.xml b/app/code/Magento/Catalog/view/adminhtml/layout/catalog_product_grouped.xml index ad8fc3e54c592b40b7e5c98c566c46303bacab7b..9ded2b173953ab0762987af7aa60826d0deee1d3 100644 --- a/app/code/Magento/Catalog/view/adminhtml/layout/catalog_product_grouped.xml +++ b/app/code/Magento/Catalog/view/adminhtml/layout/catalog_product_grouped.xml @@ -27,10 +27,10 @@ <update handle="catalog_product_grouped_grid_popup"/> <referenceBlock name="product_tabs"> <block class="Magento\Catalog\Block\Product\Grouped\AssociatedProducts" name="catalog.product.edit.grouped.container" template="Magento_Catalog::product/grouped/container.phtml"> - <block class="Magento\Core\Block\Template" name="catalog.product.edit.tab.super.container" template="Magento_Catalog::product/grouped/grouped.phtml"> + <block class="Magento\View\Block\Template" name="catalog.product.edit.tab.super.container" template="Magento_Catalog::product/grouped/grouped.phtml"> <block class="Magento\Catalog\Block\Product\Grouped\AssociatedProducts\ListAssociatedProducts" name="catalog.product.edit.tab.super.list" as="list" template="Magento_Catalog::product/grouped/list.phtml"> </block> - <block class="Magento\Core\Block\Template" name="catalog.product.edit.tab.super.grid.popup.container" as="catalog.product.group.grid.popup.container"/> + <block class="Magento\View\Block\Template" name="catalog.product.edit.tab.super.grid.popup.container" as="catalog.product.group.grid.popup.container"/> </block> </block> <action method="addTab"> diff --git a/app/code/Magento/Catalog/view/adminhtml/layout/catalog_product_new.xml b/app/code/Magento/Catalog/view/adminhtml/layout/catalog_product_new.xml index 9f2bb088b3bc62296378bc1d509ee0586f48cda1..e73c7363a464a08eb9354f60166c279c8afaab72 100644 --- a/app/code/Magento/Catalog/view/adminhtml/layout/catalog_product_new.xml +++ b/app/code/Magento/Catalog/view/adminhtml/layout/catalog_product_new.xml @@ -119,14 +119,14 @@ </block> <block class="Magento\Catalog\Block\Adminhtml\Product\Edit\AttributeSet" name="attribute-set-info" template="Magento_Catalog::catalog/product/edit/attribute_set.phtml"/> <block class="Magento\Catalog\Block\Adminhtml\Product\Edit\NewCategory" name="new-category" template="Magento_Catalog::catalog/product/edit/category/new/form.phtml"/> - <block class="Magento\Core\Block\Template" name="affected-attribute-set-form" template="Magento_Catalog::product/configurable/affected-attribute-set-selector/form.phtml"/> + <block class="Magento\View\Block\Template" name="affected-attribute-set-form" template="Magento_Catalog::product/configurable/affected-attribute-set-selector/form.phtml"/> </referenceContainer> <referenceContainer name="left"> <block class="Magento\Catalog\Block\Adminhtml\Product\Edit\Tabs" name="product_tabs"/> </referenceContainer> <referenceContainer name="js"> <block class="Magento\Catalog\Block\Adminhtml\Product\Edit\Js" name="catalog_product_js" template="catalog/product/js.phtml"/> - <block class="Magento\Core\Block\Template" template="Magento_Catalog::catalog/wysiwyg/js.phtml"/> + <block class="Magento\View\Block\Template" template="Magento_Catalog::catalog/wysiwyg/js.phtml"/> <block class="Magento\Catalog\Block\Product\Configurable\AttributeSelector" template="Magento_Catalog::product/configurable/attribute-selector/js.phtml"/> <block class="Magento\Catalog\Block\Product\Configurable\AttributeSelector" template="Magento_Catalog::product/configurable/affected-attribute-set-selector/js.phtml"/> </referenceContainer> diff --git a/app/code/Magento/Catalog/view/adminhtml/product/configurable/affected-attribute-set-selector/form.phtml b/app/code/Magento/Catalog/view/adminhtml/product/configurable/affected-attribute-set-selector/form.phtml index bb858af020cf4198caeb267df42489cadb80a5bd..7d4961b562b9743567e932da492d6e2eb660da7c 100644 --- a/app/code/Magento/Catalog/view/adminhtml/product/configurable/affected-attribute-set-selector/form.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/product/configurable/affected-attribute-set-selector/form.phtml @@ -24,7 +24,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ -/* @var $this \Magento\Core\Block\Template */ +/* @var $this \Magento\View\Block\Template */ ?> <div id="<?php echo $this->getNameInLayout() ?>" style="display:none" data-role="dialog" data-id="affected-attribute-set-selector"> <form action=""> diff --git a/app/code/Magento/Catalog/view/adminhtml/product/grouped/grouped.phtml b/app/code/Magento/Catalog/view/adminhtml/product/grouped/grouped.phtml index 3705d876b8cfb46978a216e964268614d34b0b5c..5942d7449dbb74f1ced569495d483bc486bda5a2 100644 --- a/app/code/Magento/Catalog/view/adminhtml/product/grouped/grouped.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/product/grouped/grouped.phtml @@ -24,9 +24,9 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ -/** @var $this \Magento\Core\Block\Template */ +/** @var $this \Magento\View\Block\Template */ -/** @var $this \Magento\Core\Block\Template */ +/** @var $this \Magento\View\Block\Template */ $_gridPopupBlock = $this->getChildBlock('catalog.product.group.grid.popup.container')->getChildBlock('grid'); $_gridPopupBlock->setRowClickCallback('function(){}'); /** @var $_helper \Magento\Core\Helper\Data */ diff --git a/app/code/Magento/Catalog/view/frontend/layout/MAP_popup.xml b/app/code/Magento/Catalog/view/frontend/layout/MAP_popup.xml index 5d6fd295277e2678327c1bfd1dadd7defcb27953..3fc59ceed7a28f6b6acc048ceeae79968057d355 100644 --- a/app/code/Magento/Catalog/view/frontend/layout/MAP_popup.xml +++ b/app/code/Magento/Catalog/view/frontend/layout/MAP_popup.xml @@ -25,6 +25,6 @@ --> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <referenceContainer name="content"> - <block class="Magento\Core\Block\Template" template="Magento_Catalog::msrp/popup.phtml" name="product.tooltip"/> + <block class="Magento\View\Block\Template" template="Magento_Catalog::msrp/popup.phtml" name="product.tooltip"/> </referenceContainer> </layout> diff --git a/app/code/Magento/Catalog/view/frontend/layout/catalog_product_view.xml b/app/code/Magento/Catalog/view/frontend/layout/catalog_product_view.xml index 48129b08946e61a02156a9c644a8bb7a8af39287..c625607f9b2e7c13d37959803c9028d1b90b5d33 100644 --- a/app/code/Magento/Catalog/view/frontend/layout/catalog_product_view.xml +++ b/app/code/Magento/Catalog/view/frontend/layout/catalog_product_view.xml @@ -65,7 +65,7 @@ <block class="Magento\Catalog\Block\Product\View" name="product.info.addto" as="addto" template="product/view/addto.phtml"/> <block class="Magento\Catalog\Block\Product\View" name="product.info.addtocart" as="addtocart" template="product/view/addtocart.phtml"/> <container name="product.info.extrahint" as="extrahint" label="Product View Extra Hint"/> - <block class="Magento\Core\Block\Template" name="product.info.container" as="options_container"> + <block class="Magento\View\Block\Template" name="product.info.container" as="options_container"> <block class="Magento\Catalog\Block\Product\View" name="product.info.options.wrapper" as="product_options_wrapper" template="product/view/options/wrapper.phtml"> <block class="Magento\Catalog\Block\Product\View\Options" name="product.info.options" as="product_options" template="product/view/options.phtml"> <block class="Magento\Catalog\Block\Product\View\Options\Type\DefaultType" as="default" template="product/view/options/type/default.phtml"/> @@ -74,7 +74,7 @@ <block class="Magento\Catalog\Block\Product\View\Options\Type\Select" as="select" template="product/view/options/type/select.phtml"/> <block class="Magento\Catalog\Block\Product\View\Options\Type\Date" as="date" template="product/view/options/type/date.phtml"/> </block> - <block class="Magento\Core\Block\Html\Calendar" name="html_calendar" as="html_calendar" template="Magento_Page::js/calendar.phtml"/> + <block class="Magento\View\Block\Html\Calendar" name="html_calendar" as="html_calendar" template="Magento_Page::js/calendar.phtml"/> </block> <block class="Magento\Catalog\Block\Product\View" name="product.info.options.wrapper.bottom" as="product_options_wrapper_bottom" template="product/view/options/wrapper/bottom.phtml"> <block class="Magento\Catalog\Block\Product\View" name="product.tierprices.additional" as="product.tierprices" template="product/view/tierprices.phtml"/> diff --git a/app/code/Magento/Catalog/view/frontend/layout/default.xml b/app/code/Magento/Catalog/view/frontend/layout/default.xml index fd2c0e84c01aa77234a91deec8a1032b4a12a843..61dce0450f1e8433c01dfd560cf8bd357763bfb7 100644 --- a/app/code/Magento/Catalog/view/frontend/layout/default.xml +++ b/app/code/Magento/Catalog/view/frontend/layout/default.xml @@ -32,7 +32,7 @@ </block> </referenceBlock> <referenceContainer name="left"> - <block class="Magento\Core\Block\Template" name="left.permanent.callout" template="Magento_Page::callouts/left_col.phtml"> + <block class="Magento\View\Block\Template" name="left.permanent.callout" template="Magento_Page::callouts/left_col.phtml"> <action method="setImgSrc"> <argument name="src" xsi:type="string">Magento_Catalog::images/media/col_left_callout.jpg</argument> </action> @@ -46,7 +46,7 @@ </referenceContainer> <referenceContainer name="right"> <block class="Magento\Catalog\Block\Product\Compare\Sidebar" before="cart_sidebar" name="catalog.compare.sidebar" template="product/compare/sidebar.phtml"/> - <block class="Magento\Core\Block\Template" name="right.permanent.callout" template="Magento_Page::callouts/right_col.phtml"> + <block class="Magento\View\Block\Template" name="right.permanent.callout" template="Magento_Page::callouts/right_col.phtml"> <action method="setImgSrc"> <argument name="src" xsi:type="string">Magento_Catalog::images/media/col_right_callout.jpg</argument> </action> diff --git a/app/code/Magento/Catalog/view/frontend/product/price.phtml b/app/code/Magento/Catalog/view/frontend/product/price.phtml index 1c699dfca1fbb9701b4d41474d10be0c7c6f9c21..6f0701b2f2bf62b1fbf403965f2148fa5ae46f5a 100644 --- a/app/code/Magento/Catalog/view/frontend/product/price.phtml +++ b/app/code/Magento/Catalog/view/frontend/product/price.phtml @@ -403,7 +403,7 @@ } ?> <?php if ($price): ?> - <div class="price-box"> + <div class="price-box" itemprop="offers" itemscope itemtype="http://schema.org/Offer"> <p<?php if ($showMinPrice): ?> class="minimal-price"<?php endif ?>> <?php if ($showMinPrice): ?> <span class="price-label"><?php echo __('Starting at:') ?></span> @@ -411,7 +411,7 @@ <?php if ($_taxHelper->displayBothPrices()): ?> <span class="price-excluding-tax"> <span class="label"><?php echo __('Excl. Tax:') ?></span> - <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> + <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>" itemprop="price"> <?php echo $_coreHelper->currency($_exclTax, true, false) ?> </span> </span> @@ -428,7 +428,7 @@ $_showPrice = $_exclTax; } ?> - <span class="price" id="product-minimal-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> + <span class="price" id="product-minimal-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>" itemprop="price"> <?php echo $_coreHelper->currency($_showPrice, true, false) ?> </span> <?php endif; ?> diff --git a/app/code/Magento/Catalog/view/frontend/product/view.phtml b/app/code/Magento/Catalog/view/frontend/product/view.phtml index ce313ef81c4f418623869db08bf5639e51291520..ffee792efe996a26b45ce0610b9156655045b339 100644 --- a/app/code/Magento/Catalog/view/frontend/product/view.phtml +++ b/app/code/Magento/Catalog/view/frontend/product/view.phtml @@ -41,7 +41,7 @@ })(jQuery); </script> <div id="messages_product_view"><?php echo $this->getMessagesBlock()->getGroupedHtml() ?></div> -<div class="product-view"> +<div class="product-view" itemscope itemtype="http://schema.org/Product"> <div class="product-essential"> <form action="<?php echo $this->getSubmitUrl($_product) ?>" method="post" id="product_addtocart_form"<?php if ($_product->getOptions()): ?> @@ -53,7 +53,7 @@ <div class="product-shop"> <div class="product-name"> - <h1><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></h1> + <h1 itemprop="name"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></h1> </div> <?php if ($this->canEmailToFriend()): ?> @@ -89,8 +89,7 @@ <div class="short-description"> <h2><?php echo __('Quick Overview') ?></h2> - <div - class="std"><?php echo $_helper->productAttribute($_product, nl2br($_product->getShortDescription()), 'short_description') ?></div> + <div class="std" itemprop="description"><?php echo $_helper->productAttribute($_product, nl2br($_product->getShortDescription()), 'short_description') ?></div> </div> <?php endif;?> diff --git a/app/code/Magento/Catalog/view/frontend/product/view/base-image.phtml b/app/code/Magento/Catalog/view/frontend/product/view/base-image.phtml index 9b1df0e979dfe47e56ec19f03b0d917d014d0558..fb701a64ef767f423cf28a333566903fb5dcb272 100644 --- a/app/code/Magento/Catalog/view/frontend/product/view/base-image.phtml +++ b/app/code/Magento/Catalog/view/frontend/product/view/base-image.phtml @@ -37,7 +37,7 @@ <?php if ($_product->getImage() != 'no_selection' && $_product->getImage()): ?> <p class="product-image product-image-zoom"> <?php - $_img = '<img data-role="base-image" id="image" src="'.$this->helper('Magento\Catalog\Helper\Image')->init($_product, 'image').'" alt="'.$this->escapeHtml($this->getImageLabel()).'" title="'.$this->escapeHtml($this->getImageLabel()).'" />'; + $_img = '<img data-role="base-image" id="image" itemprop="image" src="'.$this->helper('Magento\Catalog\Helper\Image')->init($_product, 'image').'" alt="'.$this->escapeHtml($this->getImageLabel()).'" title="'.$this->escapeHtml($this->getImageLabel()).'" />'; echo $_helper->productAttribute($_product, $_img, 'image'); ?> </p> @@ -60,7 +60,7 @@ <?php else: ?> <p class="product-image"> <?php - $_img = '<img data-role="base-image" src="'.$this->getBaseImageUrl($_product).'" alt="'.$this->escapeHtml($this->getImageLabel()).'" title="'.$this->escapeHtml($this->getImageLabel()).'" />'; + $_img = '<img data-role="base-image" itemprop="image" src="'.$this->getBaseImageUrl($_product).'" alt="'.$this->escapeHtml($this->getImageLabel()).'" title="'.$this->escapeHtml($this->getImageLabel()).'" />'; echo $_helper->productAttribute($_product, $_img, 'image'); ?> </p> diff --git a/app/code/Magento/CatalogInventory/Block/Adminhtml/Form/Field/Customergroup.php b/app/code/Magento/CatalogInventory/Block/Adminhtml/Form/Field/Customergroup.php index 7c8a448c646bf4a47400704fb87a4385fe0ab63b..e7adb5187b5ea17fdfac603a3e56700747dfba59 100644 --- a/app/code/Magento/CatalogInventory/Block/Adminhtml/Form/Field/Customergroup.php +++ b/app/code/Magento/CatalogInventory/Block/Adminhtml/Form/Field/Customergroup.php @@ -28,7 +28,7 @@ */ namespace Magento\CatalogInventory\Block\Adminhtml\Form\Field; -class Customergroup extends \Magento\Core\Block\Html\Select +class Customergroup extends \Magento\View\Block\Html\Select { /** * Customer groups cache @@ -54,12 +54,12 @@ class Customergroup extends \Magento\Core\Block\Html\Select /** * Construct * - * @param \Magento\Core\Block\Context $context + * @param \Magento\View\Block\Context $context * @param \Magento\Customer\Model\Resource\Group\CollectionFactory $groupCollectionFactory * @param array $data */ public function __construct( - \Magento\Core\Block\Context $context, + \Magento\View\Block\Context $context, \Magento\Customer\Model\Resource\Group\CollectionFactory $groupCollectionFactory, array $data = array() ) { diff --git a/app/code/Magento/CatalogInventory/Block/Qtyincrements.php b/app/code/Magento/CatalogInventory/Block/Qtyincrements.php index a7aa292ca44b722ce909f035c133549aba60acb6..398d9d663f8cd52d4d73899f848c7f63eb747190 100644 --- a/app/code/Magento/CatalogInventory/Block/Qtyincrements.php +++ b/app/code/Magento/CatalogInventory/Block/Qtyincrements.php @@ -34,7 +34,7 @@ */ namespace Magento\CatalogInventory\Block; -class Qtyincrements extends \Magento\Core\Block\Template +class Qtyincrements extends \Magento\View\Block\Template { /** * Qty Increments cache @@ -51,19 +51,19 @@ class Qtyincrements extends \Magento\Core\Block\Template protected $_coreRegistry = null; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Core\Model\Registry $registry * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Core\Model\Registry $registry, array $data = array() ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/CatalogInventory/Block/Stockqty/AbstractStockqty.php b/app/code/Magento/CatalogInventory/Block/Stockqty/AbstractStockqty.php index 4ec0e4f2edae571e8f9b5f7ea69c1caffb044eca..17f6471e7b4fae77f8f90709512e553e837e3f57 100644 --- a/app/code/Magento/CatalogInventory/Block/Stockqty/AbstractStockqty.php +++ b/app/code/Magento/CatalogInventory/Block/Stockqty/AbstractStockqty.php @@ -34,7 +34,7 @@ */ namespace Magento\CatalogInventory\Block\Stockqty; -abstract class AbstractStockqty extends \Magento\Core\Block\Template +abstract class AbstractStockqty extends \Magento\View\Block\Template { const XML_PATH_STOCK_THRESHOLD_QTY = 'cataloginventory/options/stock_threshold_qty'; @@ -46,19 +46,19 @@ abstract class AbstractStockqty extends \Magento\Core\Block\Template protected $_coreRegistry = null; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Core\Model\Registry $registry * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Core\Model\Registry $registry, array $data = array() ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/CatalogInventory/Helper/Data.php b/app/code/Magento/CatalogInventory/Helper/Data.php index a5b57b2261761e73d08b59c1b23b7ab4d123fc3f..6f577396939a6f6d43b5672e7deae017aeb8dbff 100644 --- a/app/code/Magento/CatalogInventory/Helper/Data.php +++ b/app/code/Magento/CatalogInventory/Helper/Data.php @@ -29,7 +29,7 @@ */ namespace Magento\CatalogInventory\Helper; -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { const XML_PATH_SHOW_OUT_OF_STOCK = 'cataloginventory/options/show_out_of_stock'; const XML_PATH_ITEM_AUTO_RETURN = 'cataloginventory/item_options/auto_return'; @@ -64,12 +64,12 @@ class Data extends \Magento\Core\Helper\AbstractHelper protected $_coreStoreConfig; /** - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\Store\Config $coreStoreConfig * @param \Magento\Catalog\Model\ProductTypes\ConfigInterface $config */ public function __construct( - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Core\Model\Store\Config $coreStoreConfig, \Magento\Catalog\Model\ProductTypes\ConfigInterface $config ) { diff --git a/app/code/Magento/CatalogInventory/Model/Config/Backend/Managestock.php b/app/code/Magento/CatalogInventory/Model/Config/Backend/Managestock.php index eb5b2b4103a5b7da972d89f16723d5bc023fd9d6..ff62f4ffb26708c11e3f871065c380d8b62eb382 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\CatalogInventory\Model\Stock\Status $stockStatus * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Config $config * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection @@ -56,7 +56,7 @@ class Managestock \Magento\CatalogInventory\Model\Stock\Status $stockStatus, \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Config $config, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, diff --git a/app/code/Magento/CatalogInventory/Model/Resource/Stock/Item/Collection.php b/app/code/Magento/CatalogInventory/Model/Resource/Stock/Item/Collection.php index 169aac951024f9f9d97efd72c22caa0fcbfb4117..a98821e53c6c87514a14df33d70d27b578044873 100644 --- a/app/code/Magento/CatalogInventory/Model/Resource/Stock/Item/Collection.php +++ b/app/code/Magento/CatalogInventory/Model/Resource/Stock/Item/Collection.php @@ -30,8 +30,6 @@ namespace Magento\CatalogInventory\Model\Resource\Stock\Item; class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractCollection { /** - * Store model manager - * * @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; @@ -42,7 +40,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy * @param \Magento\Core\Model\EntityFactory $entityFactory * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Resource\Db\Abstract $resource + * @param \Magento\Core\Model\Resource\Db\AbstractDb $resource */ public function __construct( \Magento\Event\ManagerInterface $eventManager, @@ -52,9 +50,8 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Resource\Db\AbstractDb $resource = null ) { - parent::__construct($eventManager, $logger, $fetchStrategy, $entityFactory, $resource); - $this->_storeManager = $storeManager; + parent::__construct($eventManager, $logger, $fetchStrategy, $entityFactory, $resource); } /** 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 566168b80691295b997dae6e9b0a73505ef83014..f03cbf87ef5b7de765c413f0dad3f2b8d518cb4a 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\CatalogInventory\Helper\Minsaleqty $catalogInventoryMinsaleqty * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Config $config * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection @@ -53,7 +53,7 @@ class Minsaleqty extends \Magento\Core\Model\Config\Value \Magento\CatalogInventory\Helper\Minsaleqty $catalogInventoryMinsaleqty, \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Config $config, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, diff --git a/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit.php b/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit.php index bfd977961fa853a3a0adbc12115fe1592ea46411..c326a78bf8341f96574d2ebca3419231f59cc45d 100644 --- a/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit.php +++ b/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit.php @@ -39,20 +39,20 @@ class Edit extends \Magento\Adminhtml\Block\Widget\Form\Container */ protected $_coreRegistry = null; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit/Tab/Conditions.php b/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit/Tab/Conditions.php index b6a95b26c6cefa4dd3d8fc33c1ad05c3a09fc576..1057fd89fba15a4331d8603889f415b91db4d0ab 100644 --- a/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit/Tab/Conditions.php +++ b/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit/Tab/Conditions.php @@ -40,27 +40,27 @@ class Conditions */ protected $_conditions; - /** - * @param \Magento\Rule\Block\Conditions $conditions - * @param \Magento\Backend\Block\Widget\Form\Renderer\Fieldset $rendererFieldset - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Rule\Block\Conditions $conditions + * @param \Magento\Backend\Block\Widget\Form\Renderer\Fieldset $rendererFieldset + * @param array $data */ - public function __construct( - \Magento\Rule\Block\Conditions $conditions, - \Magento\Backend\Block\Widget\Form\Renderer\Fieldset $rendererFieldset, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Rule\Block\Conditions $conditions, + \Magento\Backend\Block\Widget\Form\Renderer\Fieldset $rendererFieldset, + array $data = array() + ) { $this->_rendererFieldset = $rendererFieldset; $this->_conditions = $conditions; - parent::__construct($registry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); } /** diff --git a/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit/Tab/Main.php b/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit/Tab/Main.php index c028300cb3cfa10e4e8bef71011176cb5e5db519..80da91b789841277a7d3c093e1e0c133db14e29c 100644 --- a/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit/Tab/Main.php +++ b/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit/Tab/Main.php @@ -37,11 +37,6 @@ class Main extends \Magento\Backend\Block\Widget\Form\Generic implements \Magento\Backend\Block\Widget\Tab\TabInterface { - /** - * @var \Magento\Core\Model\StoreManager - */ - protected $_storeManager; - /** * @var \Magento\Core\Model\System\Store */ @@ -53,27 +48,26 @@ class Main protected $_customerGroup; /** - * @param \Magento\Customer\Model\Resource\Group\CollectionFactory $customerGroup - * @param \Magento\Core\Model\System\Store $systemStore + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Core\Model\Registry $registry * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Customer\Model\Resource\Group\CollectionFactory $customerGroup + * @param \Magento\Core\Model\System\Store $systemStore * @param array $data */ public function __construct( - \Magento\Customer\Model\Resource\Group\CollectionFactory $customerGroup, - \Magento\Core\Model\System\Store $systemStore, + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Core\Model\Registry $registry, \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, + \Magento\Customer\Model\Resource\Group\CollectionFactory $customerGroup, + \Magento\Core\Model\System\Store $systemStore, array $data = array() ) { - $this->_storeManager = $context->getStoreManager(); $this->_systemStore = $systemStore; $this->_customerGroup = $customerGroup; - parent::__construct($registry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); } /** diff --git a/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Widget/Chooser.php b/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Widget/Chooser.php index 16710323f8a5ae34982ca2732f750a4f4abd0f3a..b902561416dd416caac6fd22620762df3436f421 100644 --- a/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Widget/Chooser.php +++ b/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Widget/Chooser.php @@ -36,24 +36,22 @@ class Chooser extends \Magento\Backend\Block\Widget\Grid\Extended */ protected $_salesRule; - /** - * @param \Magento\SalesRule\Model\RuleFactory $salesRule - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\SalesRule\Model\RuleFactory $salesRule + * @param array $data */ - public function __construct( - \Magento\SalesRule\Model\RuleFactory $salesRule, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\SalesRule\Model\RuleFactory $salesRule, + array $data = array() + ) { $this->_salesRule = $salesRule; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $data); } /** diff --git a/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Widget/Chooser/Daterange.php b/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Widget/Chooser/Daterange.php index 287054dc7b3c51e32c8977b466b0cf67bd22fd61..5d06461672e3817b1143baeddc64808d23aac792 100644 --- a/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Widget/Chooser/Daterange.php +++ b/app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Widget/Chooser/Daterange.php @@ -63,18 +63,18 @@ class Daterange extends \Magento\Backend\Block\AbstractBlock */ protected $mathRandom; - /** - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Backend\Block\Context $context - * @param \Magento\Math\Random $mathRandom - * @param array $data + /** + * @param \Magento\Backend\Block\Context $context + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Math\Random $mathRandom + * @param array $data */ - public function __construct( - \Magento\Data\FormFactory $formFactory, - \Magento\Backend\Block\Context $context, - \Magento\Math\Random $mathRandom, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Context $context, + \Magento\Data\FormFactory $formFactory, + \Magento\Math\Random $mathRandom, + array $data = array() + ) { $this->_formFactory = $formFactory; $this->mathRandom = $mathRandom; parent::__construct($context, $data); 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 3455e82fbe68092416094d4437eeff311068d116..aa54e2e677c6d91a1e58e240d3a1bc716bf7997a 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 @@ -55,33 +55,31 @@ class Sku extends \Magento\Backend\Block\Widget\Grid\Extended */ protected $_catalogProduct; - /** - * @param \Magento\Catalog\Model\ProductFactory $catalogProduct - * @param \Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory $eavAttSetCollection - * @param \Magento\Catalog\Model\Resource\Product\CollectionFactory $cpCollection - * @param \Magento\Catalog\Model\Product\Type $catalogType - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Catalog\Model\ProductFactory $catalogProduct + * @param \Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory $eavAttSetCollection + * @param \Magento\Catalog\Model\Resource\Product\CollectionFactory $cpCollection + * @param \Magento\Catalog\Model\Product\Type $catalogType + * @param array $data */ - public function __construct( - \Magento\Catalog\Model\ProductFactory $catalogProduct, - \Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory $eavAttSetCollection, - \Magento\Catalog\Model\Resource\Product\CollectionFactory $cpCollection, - \Magento\Catalog\Model\Product\Type $catalogType, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Catalog\Model\ProductFactory $catalogProduct, + \Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory $eavAttSetCollection, + \Magento\Catalog\Model\Resource\Product\CollectionFactory $cpCollection, + \Magento\Catalog\Model\Product\Type $catalogType, + array $data = array() + ) { $this->_catalogType = $catalogType; $this->_cpCollection = $cpCollection; $this->_eavAttSetCollection = $eavAttSetCollection; $this->_catalogProduct = $catalogProduct; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $data); } protected function _construct() diff --git a/app/code/Magento/CatalogRule/Controller/Adminhtml/Promo.php b/app/code/Magento/CatalogRule/Controller/Adminhtml/Promo.php index e6b307b05f8f41cf3618fb6a1167efb288e3eb73..36e77611703c21ce4ee07a64af434c9d231be6e3 100644 --- a/app/code/Magento/CatalogRule/Controller/Adminhtml/Promo.php +++ b/app/code/Magento/CatalogRule/Controller/Adminhtml/Promo.php @@ -33,15 +33,15 @@ */ namespace Magento\CatalogRule\Controller\Adminhtml; -class Promo extends \Magento\Backend\Controller\Adminhtml\Action +class Promo extends \Magento\Backend\App\Action { public function indexAction() { - $this->loadLayout(); + $this->_view->loadLayout(); $this->_setActiveMenu('Magento_CatalogRule::promo'); $this->_addBreadcrumb(__('Promotions'), __('Promo')); - $this->renderLayout(); + $this->_view->renderLayout(); } protected function _isAllowed() diff --git a/app/code/Magento/CatalogRule/Controller/Adminhtml/Promo/Catalog.php b/app/code/Magento/CatalogRule/Controller/Adminhtml/Promo/Catalog.php index 67323e46926206cff4ba2e60630da3451be3ef0c..a308eb102a6a54fb90db1587186c74660cd6c074 100644 --- a/app/code/Magento/CatalogRule/Controller/Adminhtml/Promo/Catalog.php +++ b/app/code/Magento/CatalogRule/Controller/Adminhtml/Promo/Catalog.php @@ -33,7 +33,7 @@ */ namespace Magento\CatalogRule\Controller\Adminhtml\Promo; -class Catalog extends \Magento\Backend\Controller\Adminhtml\Action +class Catalog extends \Magento\Backend\App\Action { /** * Dirty rules notice message @@ -50,22 +50,30 @@ class Catalog extends \Magento\Backend\Controller\Adminhtml\Action */ protected $_coreRegistry = null; + /* + * @var \Magento\Core\Filter\Date + */ + protected $_dateFilter; + /** - * @param \Magento\Backend\Controller\Context $context + * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Core\Model\Registry $coreRegistry + * @param \Magento\Core\Filter\Date $dateFilter */ public function __construct( - \Magento\Backend\Controller\Context $context, - \Magento\Core\Model\Registry $coreRegistry + \Magento\Backend\App\Action\Context $context, + \Magento\Core\Model\Registry $coreRegistry, + \Magento\Core\Filter\Date $dateFilter ) { - $this->_coreRegistry = $coreRegistry; parent::__construct($context); + $this->_coreRegistry = $coreRegistry; + $this->_dateFilter = $dateFilter; } protected function _initAction() { - $this->loadLayout() - ->_setActiveMenu('Magento_CatalogRule::promo_catalog') + $this->_view->loadLayout(); + $this->_setActiveMenu('Magento_CatalogRule::promo_catalog') ->_addBreadcrumb( __('Promotions'), __('Promotions') @@ -75,7 +83,7 @@ class Catalog extends \Magento\Backend\Controller\Adminhtml\Action public function indexAction() { - $this->_title(__('Catalog Price Rules')); + $this->_title->add(__('Catalog Price Rules')); $dirtyRules = $this->_objectManager->create('Magento\CatalogRule\Model\Flag')->loadSelf(); if ($dirtyRules->getState()) { @@ -86,8 +94,8 @@ class Catalog extends \Magento\Backend\Controller\Adminhtml\Action ->_addBreadcrumb( __('Catalog'), __('Catalog') - ) - ->renderLayout(); + ); + $this->_view->renderLayout(); } public function newAction() @@ -97,7 +105,7 @@ class Catalog extends \Magento\Backend\Controller\Adminhtml\Action public function editAction() { - $this->_title(__('Catalog Price Rules')); + $this->_title->add(__('Catalog Price Rules')); $id = $this->getRequest()->getParam('id'); $model = $this->_objectManager->create('Magento\CatalogRule\Model\Rule'); @@ -113,7 +121,7 @@ class Catalog extends \Magento\Backend\Controller\Adminhtml\Action } } - $this->_title($model->getRuleId() ? $model->getName() : __('New Catalog Price Rule')); + $this->_title->add($model->getRuleId() ? $model->getName() : __('New Catalog Price Rule')); // set entered data if was error when we do save $data = $this->_objectManager->get('Magento\Adminhtml\Model\Session')->getPageData(true); @@ -124,11 +132,13 @@ class Catalog extends \Magento\Backend\Controller\Adminhtml\Action $this->_coreRegistry->register('current_promo_catalog_rule', $model); - $this->_initAction()->getLayout()->getBlock('promo_catalog_edit') + $this->_initAction(); + $this->_view->getLayout()->getBlock('promo_catalog_edit') ->setData('action', $this->getUrl('catalog_rule/promo_catalog/save')); $breadcrumb = $id ? __('Edit Rule') : __('New Rule'); - $this->_addBreadcrumb($breadcrumb, $breadcrumb)->renderLayout(); + $this->_addBreadcrumb($breadcrumb, $breadcrumb); + $this->_view->renderLayout(); } public function saveAction() @@ -141,7 +151,9 @@ class Catalog extends \Magento\Backend\Controller\Adminhtml\Action array('request' => $this->getRequest()) ); $data = $this->getRequest()->getPost(); - $data = $this->_filterDates($data, array('from_date', 'to_date')); + $inputFilter = new \Zend_Filter_Input( + array('from_date' => $this->_dateFilter, 'to_date' => $this->_dateFilter), array(), $data); + $data = $inputFilter->getUnescaped(); $id = $this->getRequest()->getParam('rule_id'); if ($id) { $model->load($id); @@ -152,7 +164,7 @@ class Catalog extends \Magento\Backend\Controller\Adminhtml\Action $validateResult = $model->validateData(new \Magento\Object($data)); if ($validateResult !== true) { - foreach($validateResult as $errorMessage) { + foreach ($validateResult as $errorMessage) { $this->_getSession()->addError($errorMessage); } $this->_getSession()->setPageData($data); @@ -265,7 +277,7 @@ class Catalog extends \Magento\Backend\Controller\Adminhtml\Action $type = 'Magento\CatalogRule\Block\Adminhtml\Promo\Widget\Chooser\Sku'; } if (!empty($type)) { - $block = $this->getLayout()->createBlock($type); + $block = $this->_view->getLayout()->createBlock($type); if ($block) { $this->getResponse()->setBody($block->toHtml()); } diff --git a/app/code/Magento/CatalogRule/Controller/Adminhtml/Promo/Widget.php b/app/code/Magento/CatalogRule/Controller/Adminhtml/Promo/Widget.php index 69a377fc0cc7bf632cf087a56f9a2d8f26526a85..170cbd4e273ae22481b4598c9cf048175ed2ed7f 100644 --- a/app/code/Magento/CatalogRule/Controller/Adminhtml/Promo/Widget.php +++ b/app/code/Magento/CatalogRule/Controller/Adminhtml/Promo/Widget.php @@ -26,7 +26,7 @@ namespace Magento\CatalogRule\Controller\Adminhtml\Promo; -class Widget extends \Magento\Backend\Controller\Adminhtml\Action +class Widget extends \Magento\Backend\App\Action { /** * Core registry @@ -36,11 +36,11 @@ class Widget extends \Magento\Backend\Controller\Adminhtml\Action protected $_coreRegistry = null; /** - * @param \Magento\Backend\Controller\Context $context + * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Core\Model\Registry $coreRegistry */ public function __construct( - \Magento\Backend\Controller\Context $context, + \Magento\Backend\App\Action\Context $context, \Magento\Core\Model\Registry $coreRegistry ) { $this->_coreRegistry = $coreRegistry; @@ -58,7 +58,7 @@ class Widget extends \Magento\Backend\Controller\Adminhtml\Action switch ($request->getParam('attribute')) { case 'sku': - $block = $this->getLayout()->createBlock( + $block = $this->_view->getLayout()->createBlock( 'Magento\CatalogRule\Block\Adminhtml\Promo\Widget\Chooser\Sku', 'promo_widget_chooser_sku', array('data' => array('js_form_object' => $request->getParam('form')), )); @@ -80,7 +80,7 @@ class Widget extends \Magento\Backend\Controller\Adminhtml\Action } - $block = $this->getLayout()->createBlock( + $block = $this->_view->getLayout()->createBlock( 'Magento\Catalog\Block\Adminhtml\Category\Checkboxes\Tree', 'promo_widget_chooser_category_ids', array('data' => array('js_form_object' => $request->getParam('form'))) ) @@ -116,7 +116,7 @@ class Widget extends \Magento\Backend\Controller\Adminhtml\Action return; } $this->getResponse()->setBody( - $this->getLayout()->createBlock('Magento\Catalog\Block\Adminhtml\Category\Tree') + $this->_view->getLayout()->createBlock('Magento\Catalog\Block\Adminhtml\Category\Tree') ->getTreeJson($category) ); } diff --git a/app/code/Magento/CatalogRule/Helper/Data.php b/app/code/Magento/CatalogRule/Helper/Data.php index 9f130791341e468f2e9d5820c022264069273379..ddc89877d8cd912cfd08a4ed7779932e1a29abae 100644 --- a/app/code/Magento/CatalogRule/Helper/Data.php +++ b/app/code/Magento/CatalogRule/Helper/Data.php @@ -29,7 +29,7 @@ */ namespace Magento\CatalogRule\Helper; -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { /** * Algorithm for calculating price rule diff --git a/app/code/Magento/CatalogSearch/Block/Advanced/Form.php b/app/code/Magento/CatalogSearch/Block/Advanced/Form.php index 2313f1e350828aa226aa4e208080323e44a60c25..6b92f27f4fe0b433f27be9490e7cfc5242101564 100644 --- a/app/code/Magento/CatalogSearch/Block/Advanced/Form.php +++ b/app/code/Magento/CatalogSearch/Block/Advanced/Form.php @@ -33,22 +33,8 @@ */ namespace Magento\CatalogSearch\Block\Advanced; -class Form extends \Magento\Core\Block\Template +class Form extends \Magento\View\Block\Template { - /** - * Locale - * - * @var \Magento\Core\Model\LocaleInterface - */ - protected $_locale; - - /** - * Store manager - * - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - /** * Currency factory * @@ -64,30 +50,22 @@ class Form extends \Magento\Core\Block\Template protected $_catalogSearchAdvanced; /** - * Construct - * + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\CatalogSearch\Model\Advanced $catalogSearchAdvanced * @param \Magento\Directory\Model\CurrencyFactory $currencyFactory - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\LocaleInterface $locale * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\CatalogSearch\Model\Advanced $catalogSearchAdvanced, \Magento\Directory\Model\CurrencyFactory $currencyFactory, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\LocaleInterface $locale, array $data = array() ) { $this->_catalogSearchAdvanced = $catalogSearchAdvanced; $this->_currencyFactory = $currencyFactory; - $this->_storeManager = $storeManager; - $this->_locale = $locale; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } public function _prepareLayout() @@ -308,7 +286,7 @@ class Form extends \Magento\Core\Block\Template { $block = $this->getData('_select_block'); if (is_null($block)) { - $block = $this->getLayout()->createBlock('Magento\Core\Block\Html\Select'); + $block = $this->getLayout()->createBlock('Magento\View\Block\Html\Select'); $this->setData('_select_block', $block); } return $block; @@ -318,7 +296,7 @@ class Form extends \Magento\Core\Block\Template { $block = $this->getData('_date_block'); if (is_null($block)) { - $block = $this->getLayout()->createBlock('Magento\Core\Block\Html\Date'); + $block = $this->getLayout()->createBlock('Magento\View\Block\Html\Date'); $this->setData('_date_block', $block); } return $block; diff --git a/app/code/Magento/CatalogSearch/Block/Advanced/Result.php b/app/code/Magento/CatalogSearch/Block/Advanced/Result.php index 5ee0294f767e4feeaae00bdc130571854f3fecf3..2115c0642a8da2687842cd7a6ee30e69030b9709 100644 --- a/app/code/Magento/CatalogSearch/Block/Advanced/Result.php +++ b/app/code/Magento/CatalogSearch/Block/Advanced/Result.php @@ -33,7 +33,7 @@ */ namespace Magento\CatalogSearch\Block\Advanced; -class Result extends \Magento\Core\Block\Template +class Result extends \Magento\View\Block\Template { /** * Url factory @@ -42,13 +42,6 @@ class Result extends \Magento\Core\Block\Template */ protected $_urlFactory; - /** - * Store manager - * - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - /** * Catalog layer * @@ -64,30 +57,25 @@ class Result extends \Magento\Core\Block\Template protected $_catalogSearchAdvanced; /** - * Construct - * + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\CatalogSearch\Model\Advanced $catalogSearchAdvanced * @param \Magento\Catalog\Model\Layer $catalogLayer - * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\UrlFactory $urlFactory * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\CatalogSearch\Model\Advanced $catalogSearchAdvanced, \Magento\Catalog\Model\Layer $catalogLayer, - \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\UrlFactory $urlFactory, array $data = array() ) { $this->_catalogSearchAdvanced = $catalogSearchAdvanced; $this->_catalogLayer = $catalogLayer; - $this->_storeManager = $storeManager; $this->_urlFactory = $urlFactory; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _prepareLayout() diff --git a/app/code/Magento/CatalogSearch/Block/Autocomplete.php b/app/code/Magento/CatalogSearch/Block/Autocomplete.php index 818a8e5968aad71e1e48ea4bc8771b209b3a385d..966fb71c73592b64f86dc7e73e93ba2a1970075e 100644 --- a/app/code/Magento/CatalogSearch/Block/Autocomplete.php +++ b/app/code/Magento/CatalogSearch/Block/Autocomplete.php @@ -29,7 +29,7 @@ */ namespace Magento\CatalogSearch\Block; -class Autocomplete extends \Magento\Core\Block\AbstractBlock +class Autocomplete extends \Magento\View\Block\AbstractBlock { protected $_suggestData = null; diff --git a/app/code/Magento/CatalogSearch/Block/Layer.php b/app/code/Magento/CatalogSearch/Block/Layer.php index 112326586fda21628fedf73c4743787072e34d2a..b0d90f5de38584476f20837d50ffee316aed5918 100644 --- a/app/code/Magento/CatalogSearch/Block/Layer.php +++ b/app/code/Magento/CatalogSearch/Block/Layer.php @@ -51,13 +51,6 @@ class Layer extends \Magento\Catalog\Block\Layer\View */ protected $_catalogSearchData = null; - /** - * Store manager - * - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - /** * Catalog search layer * @@ -66,26 +59,22 @@ class Layer extends \Magento\Catalog\Block\Layer\View protected $_catalogSearchLayer; /** - * Construct - * - * @param \Magento\CatalogSearch\Model\Layer $layer + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context + * @param \Magento\CatalogSearch\Model\Layer $catalogLayer * @param \Magento\CatalogSearch\Model\Resource\EngineProvider $engineProvider * @param \Magento\CatalogSearch\Helper\Data $catalogSearchData * @param \Magento\CatalogSearch\Model\Layer $catalogSearchLayer - * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Registry $registry * @param array $data */ public function __construct( - \Magento\CatalogSearch\Model\Layer $layer, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, + \Magento\CatalogSearch\Model\Layer $catalogLayer, \Magento\CatalogSearch\Model\Resource\EngineProvider $engineProvider, \Magento\CatalogSearch\Helper\Data $catalogSearchData, \Magento\CatalogSearch\Model\Layer $catalogSearchLayer, - \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Registry $registry, array $data = array() ) { @@ -93,8 +82,7 @@ class Layer extends \Magento\Catalog\Block\Layer\View $this->_coreRegistry = $registry; $this->_catalogSearchData = $catalogSearchData; $this->_catalogSearchLayer = $catalogSearchLayer; - $this->_storeManager = $storeManager; - parent::__construct($layer, $coreData, $context, $data); + parent::__construct($context, $coreData, $catalogLayer, $data); } /** diff --git a/app/code/Magento/CatalogSearch/Block/Result.php b/app/code/Magento/CatalogSearch/Block/Result.php index b6559296ef6d9cbaaa538a85ff8d0a4e4e61da7e..f1d047b6ef934cc42b221be30d44febde8264fee 100644 --- a/app/code/Magento/CatalogSearch/Block/Result.php +++ b/app/code/Magento/CatalogSearch/Block/Result.php @@ -34,7 +34,7 @@ */ namespace Magento\CatalogSearch\Block; -class Result extends \Magento\Core\Block\Template +class Result extends \Magento\View\Block\Template { /** * Catalog Product collection @@ -50,13 +50,6 @@ class Result extends \Magento\Core\Block\Template */ protected $_catalogSearchData = null; - /** - * Store manager - * - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - /** * Catalog layer * @@ -65,27 +58,22 @@ class Result extends \Magento\Core\Block\Template protected $_catalogLayer; /** - * Construct - * + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Catalog\Model\Layer $catalogLayer - * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\CatalogSearch\Helper\Data $catalogSearchData * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Catalog\Model\Layer $catalogLayer, - \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\CatalogSearch\Helper\Data $catalogSearchData, array $data = array() ) { $this->_catalogLayer = $catalogLayer; - $this->_storeManager = $storeManager; $this->_catalogSearchData = $catalogSearchData; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/CatalogSearch/Block/Term.php b/app/code/Magento/CatalogSearch/Block/Term.php index 3b3bb6f30225d374d266fa3c9c2beda680628bd1..30031df9e58f7a3ed22f07c656c25f06e5d113e1 100644 --- a/app/code/Magento/CatalogSearch/Block/Term.php +++ b/app/code/Magento/CatalogSearch/Block/Term.php @@ -33,19 +33,12 @@ */ namespace Magento\CatalogSearch\Block; -class Term extends \Magento\Core\Block\Template +class Term extends \Magento\View\Block\Template { protected $_terms; protected $_minPopularity; protected $_maxPopularity; - /** - * Store manager - * - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - /** * Url factory * @@ -61,27 +54,22 @@ class Term extends \Magento\Core\Block\Template protected $_queryCollectionFactory; /** - * Construct - * + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\CatalogSearch\Model\Resource\Query\CollectionFactory $queryCollectionFactory * @param \Magento\Core\Model\UrlFactory $urlFactory - * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\CatalogSearch\Model\Resource\Query\CollectionFactory $queryCollectionFactory, \Magento\Core\Model\UrlFactory $urlFactory, - \Magento\Core\Model\StoreManagerInterface $storeManager, array $data = array() ) { $this->_queryCollectionFactory = $queryCollectionFactory; $this->_urlFactory = $urlFactory; - $this->_storeManager = $storeManager; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/CatalogSearch/Controller/Advanced.php b/app/code/Magento/CatalogSearch/Controller/Advanced.php index 2885540a810dec832b914226d4e1d179885afbe9..79e66db657cd28d761b67a41d0bccc39766856e5 100644 --- a/app/code/Magento/CatalogSearch/Controller/Advanced.php +++ b/app/code/Magento/CatalogSearch/Controller/Advanced.php @@ -33,7 +33,7 @@ */ namespace Magento\CatalogSearch\Controller; -class Advanced extends \Magento\Core\Controller\Front\Action +class Advanced extends \Magento\App\Action\Action { /** @@ -60,13 +60,13 @@ class Advanced extends \Magento\Core\Controller\Front\Action /** * Construct * - * @param \Magento\Core\Controller\Varien\Action\Context $context + * @param \Magento\App\Action\Context $context * @param \Magento\Core\Model\Session\Generic $catalogSearchSession * @param \Magento\CatalogSearch\Model\Advanced $catalogSearchAdvanced * @param \Magento\Core\Model\UrlFactory $urlFactory */ public function __construct( - \Magento\Core\Controller\Varien\Action\Context $context, + \Magento\App\Action\Context $context, \Magento\Core\Model\Session\Generic $catalogSearchSession, \Magento\CatalogSearch\Model\Advanced $catalogSearchAdvanced, \Magento\Core\Model\UrlFactory $urlFactory @@ -79,25 +79,24 @@ class Advanced extends \Magento\Core\Controller\Front\Action public function indexAction() { - $this->loadLayout(); - $this->_initLayoutMessages('Magento\CatalogSearch\Model\Session'); - $this->renderLayout(); + $this->_view->loadLayout(); + $this->_view->getLayout()->initMessages('Magento\CatalogSearch\Model\Session'); + $this->_view->renderLayout(); } public function resultAction() { - $this->loadLayout(); + $this->_view->loadLayout(); try { $this->_catalogSearchAdvanced->addFilters($this->getRequest()->getQuery()); } catch (\Magento\Core\Exception $e) { $this->_catalogSearchSession->addError($e->getMessage()); - $this->_redirectError( - $this->_urlFactory->create() - ->setQueryParams($this->getRequest()->getQuery()) - ->getUrl('*/*/') - ); + $defaultUrl = $this->_urlFactory->create() + ->setQueryParams($this->getRequest()->getQuery()) + ->getUrl('*/*/'); + $this->getResponse()->setRedirect($this->_redirect->error($defaultUrl)); } - $this->_initLayoutMessages('Magento\Catalog\Model\Session'); - $this->renderLayout(); + $this->_view->getLayout()->initMessages('Magento\Catalog\Model\Session'); + $this->_view->renderLayout(); } } diff --git a/app/code/Magento/CatalogSearch/Controller/Ajax.php b/app/code/Magento/CatalogSearch/Controller/Ajax.php index 04dc8405498bb3daac674869325f43be0aaab948..fdd3dbfea6990f016f0e1dc97b59066769a5f5d0 100644 --- a/app/code/Magento/CatalogSearch/Controller/Ajax.php +++ b/app/code/Magento/CatalogSearch/Controller/Ajax.php @@ -33,36 +33,16 @@ */ namespace Magento\CatalogSearch\Controller; -class Ajax extends \Magento\Core\Controller\Front\Action +class Ajax extends \Magento\App\Action\Action { - /** - * Url - * - * @var \Magento\Core\Model\Url - */ - protected $_url; - - /** - * Construct - * - * @param \Magento\Core\Controller\Varien\Action\Context $context - * @param \Magento\Core\Model\Url $url - */ - public function __construct( - \Magento\Core\Controller\Varien\Action\Context $context, - \Magento\Core\Model\Url $url - ) { - $this->_url = $url; - parent::__construct($context); - } - public function suggestAction() { if (!$this->getRequest()->getParam('q', false)) { $this->getResponse()->setRedirect($this->_url->getBaseUrl()); } - $this->addPageLayoutHandles(); - $this->loadLayout(false)->renderLayout(); + $this->_view->addPageLayoutHandles(); + $this->_view->loadLayout(false); + $this->_view->renderLayout(); } } diff --git a/app/code/Magento/CatalogSearch/Controller/Result.php b/app/code/Magento/CatalogSearch/Controller/Result.php index 6036637a28bf73a00733c7de4aea08496d4550d4..0fe3a2ac61546b4665037cecd133ea91889d4726 100644 --- a/app/code/Magento/CatalogSearch/Controller/Result.php +++ b/app/code/Magento/CatalogSearch/Controller/Result.php @@ -29,14 +29,8 @@ */ namespace Magento\CatalogSearch\Controller; -class Result extends \Magento\Core\Controller\Front\Action +class Result extends \Magento\App\Action\Action { - /** - * Store manager - * - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; /** * Catalog session @@ -46,19 +40,22 @@ class Result extends \Magento\Core\Controller\Front\Action protected $_catalogSession; /** - * Construct - * - * @param \Magento\Core\Controller\Varien\Action\Context $context + * @var \Magento\Core\Model\StoreManagerInterface + */ + protected $_storeManager; + + /** + * @param \Magento\App\Action\Context $context * @param \Magento\Catalog\Model\Session $catalogSession * @param \Magento\Core\Model\StoreManagerInterface $storeManager */ public function __construct( - \Magento\Core\Controller\Varien\Action\Context $context, + \Magento\App\Action\Context $context, \Magento\Catalog\Model\Session $catalogSession, \Magento\Core\Model\StoreManagerInterface $storeManager ) { - $this->_catalogSession = $catalogSession; $this->_storeManager = $storeManager; + $this->_catalogSession = $catalogSession; parent::__construct($context); } @@ -86,38 +83,34 @@ class Result extends \Magento\Core\Controller\Front\Action $query->setId(0) ->setIsActive(1) ->setIsProcessed(1); - } - else { + } else { if ($query->getId()) { $query->setPopularity($query->getPopularity()+1); - } - else { + } else { $query->setPopularity(1); } - if ($query->getRedirect()){ + if ($query->getRedirect()) { $query->save(); $this->getResponse()->setRedirect($query->getRedirect()); return; - } - else { + } else { $query->prepare(); } } $this->_objectManager->get('Magento\CatalogSearch\Helper\Data')->checkNotes(); - $this->loadLayout(); - $this->_initLayoutMessages('Magento\Catalog\Model\Session'); - $this->_initLayoutMessages('Magento\Checkout\Model\Session'); - $this->renderLayout(); + $this->_view->loadLayout(); + $this->_view->getLayout() + ->initMessages(array('Magento\Catalog\Model\Session', 'Magento\Checkout\Model\Session')); + $this->_view->renderLayout(); if (!$this->_objectManager->get('Magento\CatalogSearch\Helper\Data')->isMinQueryLength()) { $query->save(); } - } - else { - $this->_redirectReferer(); + } else { + $this->getResponse()->setRedirect($this->_redirect->getRedirectUrl()); } } } diff --git a/app/code/Magento/CatalogSearch/Controller/Term.php b/app/code/Magento/CatalogSearch/Controller/Term.php index 2d4ee9a26b309c7ababd5424da01823d3cd89cd7..23c2cacddfb30a249062d02fce2d7aa6b08e7a99 100644 --- a/app/code/Magento/CatalogSearch/Controller/Term.php +++ b/app/code/Magento/CatalogSearch/Controller/Term.php @@ -27,20 +27,27 @@ namespace Magento\CatalogSearch\Controller; -class Term extends \Magento\Core\Controller\Front\Action { +use Magento\App\Action\NotFoundException; +use Magento\App\RequestInterface; - public function preDispatch(){ - parent::preDispatch(); - if(!$this->_objectManager->get('Magento\Core\Model\Store\Config')->getConfig('catalog/seo/search_terms')){ - $this->_redirect('noroute'); - $this->setFlag('',self::FLAG_NO_DISPATCH,true); +class Term extends \Magento\App\Action\Action +{ + /** + * @param RequestInterface $request + * @return mixed + */ + public function dispatch(RequestInterface $request) + { + if (!$this->_objectManager->get('Magento\Core\Model\Store\Config')->getConfig('catalog/seo/search_terms')) { + $this->_redirect('noroute'); + $this->_actionFlag->set('', self::FLAG_NO_DISPATCH, true); } - return $this; - + return parent::dispatch($request); } + public function popularAction() { - $this->loadLayout(); - $this->renderLayout(); + $this->_view->loadLayout(); + $this->_view->renderLayout(); } } diff --git a/app/code/Magento/CatalogSearch/Helper/Data.php b/app/code/Magento/CatalogSearch/Helper/Data.php index 93e59294c7777f963a45f6fb3902d3c50dd95137..29c7c8ff4e00d0d79001598d090683514754c1ab 100644 --- a/app/code/Magento/CatalogSearch/Helper/Data.php +++ b/app/code/Magento/CatalogSearch/Helper/Data.php @@ -29,7 +29,7 @@ namespace Magento\CatalogSearch\Helper; /** * Catalog search helper */ -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { /** * Query variable @@ -110,7 +110,7 @@ class Data extends \Magento\Core\Helper\AbstractHelper /** * Construct * - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Stdlib\String $string * @param \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig * @param \Magento\CatalogSearch\Model\QueryFactory $queryFactory @@ -118,7 +118,7 @@ class Data extends \Magento\Core\Helper\AbstractHelper * @param \Magento\Filter\FilterManager $filter */ public function __construct( - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Stdlib\String $string, \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig, \Magento\CatalogSearch\Model\QueryFactory $queryFactory, 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 c029880c65d6bd65e1eaf84ab10d7ac67fecaa1d..53fbae7e7b84ca5b01275b2c7c6a18748f61104d 100644 --- a/app/code/Magento/CatalogSearch/Model/Config/Backend/Search/Type.php +++ b/app/code/Magento/CatalogSearch/Model/Config/Backend/Search/Type.php @@ -48,7 +48,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\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Config $config * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection @@ -59,7 +59,7 @@ class Type extends \Magento\Core\Model\Config\Value \Magento\CatalogSearch\Model\Fulltext $catalogSearchFulltext, \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Config $config, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, diff --git a/app/code/Magento/CatalogSearch/Model/Fulltext.php b/app/code/Magento/CatalogSearch/Model/Fulltext.php index dd544df5bba92335e976639dcc16e22918242510..75d67d04c13db9753e4e5914fd66a9877d8ebb2f 100644 --- a/app/code/Magento/CatalogSearch/Model/Fulltext.php +++ b/app/code/Magento/CatalogSearch/Model/Fulltext.php @@ -56,13 +56,6 @@ class Fulltext extends \Magento\Core\Model\AbstractModel */ protected $_catalogSearchData = null; - /** - * Core event manager proxy - * - * @var \Magento\Event\ManagerInterface - */ - protected $_eventManager = null; - /** * Core store config * @@ -71,7 +64,6 @@ class Fulltext extends \Magento\Core\Model\AbstractModel protected $_coreStoreConfig; /** - * @param \Magento\Event\ManagerInterface $eventManager * @param \Magento\CatalogSearch\Helper\Data $catalogSearchData * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry @@ -81,7 +73,6 @@ class Fulltext extends \Magento\Core\Model\AbstractModel * @param array $data */ public function __construct( - \Magento\Event\ManagerInterface $eventManager, \Magento\CatalogSearch\Helper\Data $catalogSearchData, \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, @@ -90,7 +81,6 @@ class Fulltext extends \Magento\Core\Model\AbstractModel \Magento\Data\Collection\Db $resourceCollection = null, array $data = array() ) { - $this->_eventManager = $eventManager; $this->_catalogSearchData = $catalogSearchData; $this->_coreStoreConfig = $coreStoreConfig; parent::__construct($context, $registry, $resource, $resourceCollection, $data); diff --git a/app/code/Magento/CatalogSearch/Model/Resource/Advanced/Collection.php b/app/code/Magento/CatalogSearch/Model/Resource/Advanced/Collection.php index 7fda440d4cb15a18e30134884dc54e0f6c60366e..87af424704bde75a7c2d4ae0148b8d6a8398b416 100644 --- a/app/code/Magento/CatalogSearch/Model/Resource/Advanced/Collection.php +++ b/app/code/Magento/CatalogSearch/Model/Resource/Advanced/Collection.php @@ -49,7 +49,7 @@ class Collection extends \Magento\Catalog\Model\Resource\Product\Collection * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy * @param \Magento\Core\Model\EntityFactory $entityFactory * @param \Magento\Eav\Model\Config $eavConfig - * @param \Magento\App\Resource $coreResource + * @param \Magento\App\Resource $resource * @param \Magento\Eav\Model\EntityFactory $eavEntityFactory * @param \Magento\Validator\UniversalFactory $universalFactory * @param \Magento\Core\Model\StoreManagerInterface $storeManager @@ -72,7 +72,7 @@ class Collection extends \Magento\Catalog\Model\Resource\Product\Collection \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, \Magento\Core\Model\EntityFactory $entityFactory, \Magento\Eav\Model\Config $eavConfig, - \Magento\App\Resource $coreResource, + \Magento\App\Resource $resource, \Magento\Eav\Model\EntityFactory $eavEntityFactory, \Magento\Validator\UniversalFactory $universalFactory, \Magento\Core\Model\StoreManagerInterface $storeManager, @@ -89,7 +89,7 @@ class Collection extends \Magento\Catalog\Model\Resource\Product\Collection ) { $this->_date = $date; parent::__construct($eventManager, $logger, $fetchStrategy, $entityFactory, $eavConfig, - $coreResource, $eavEntityFactory, $universalFactory, $storeManager, $catalogData, + $resource, $eavEntityFactory, $universalFactory, $storeManager, $catalogData, $catalogProductFlat, $coreStoreConfig, $productOptionFactory, $catalogUrl, $locale, $customerSession, $resourceHelper, $dateTime ); diff --git a/app/code/Magento/CatalogSearch/Model/Resource/Fulltext/Collection.php b/app/code/Magento/CatalogSearch/Model/Resource/Fulltext/Collection.php index 25fbbb41914178e3499e405c436de4edb45a9c28..988b07c29ae76b708b8e014c1cec91c955d186c6 100644 --- a/app/code/Magento/CatalogSearch/Model/Resource/Fulltext/Collection.php +++ b/app/code/Magento/CatalogSearch/Model/Resource/Fulltext/Collection.php @@ -56,7 +56,7 @@ class Collection extends \Magento\Catalog\Model\Resource\Product\Collection * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy * @param \Magento\Core\Model\EntityFactory $entityFactory * @param \Magento\Eav\Model\Config $eavConfig - * @param \Magento\App\Resource $coreResource + * @param \Magento\App\Resource $resource * @param \Magento\Eav\Model\EntityFactory $eavEntityFactory * @param \Magento\Validator\UniversalFactory $universalFactory * @param \Magento\Core\Model\StoreManagerInterface $storeManager @@ -80,7 +80,7 @@ class Collection extends \Magento\Catalog\Model\Resource\Product\Collection \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, \Magento\Core\Model\EntityFactory $entityFactory, \Magento\Eav\Model\Config $eavConfig, - \Magento\App\Resource $coreResource, + \Magento\App\Resource $resource, \Magento\Eav\Model\EntityFactory $eavEntityFactory, \Magento\Validator\UniversalFactory $universalFactory, \Magento\Core\Model\StoreManagerInterface $storeManager, @@ -99,7 +99,7 @@ class Collection extends \Magento\Catalog\Model\Resource\Product\Collection $this->_catalogSearchFulltext = $catalogSearchFulltext; $this->_catalogSearchData = $catalogSearchData; parent::__construct($eventManager, $logger, $fetchStrategy, $entityFactory, $eavConfig, - $coreResource, $eavEntityFactory, $universalFactory, $storeManager, $catalogData, + $resource, $eavEntityFactory, $universalFactory, $storeManager, $catalogData, $catalogProductFlat, $coreStoreConfig, $productOptionFactory, $catalogUrl, $locale, $customerSession, $resourceHelper, $dateTime ); diff --git a/app/code/Magento/CatalogSearch/etc/di.xml b/app/code/Magento/CatalogSearch/etc/di.xml index cad205dce5f672f3eaad988542c686c5c451a8f6..43d80ea34b4f888f6ce448f402c528225c73a2ac 100644 --- a/app/code/Magento/CatalogSearch/etc/di.xml +++ b/app/code/Magento/CatalogSearch/etc/di.xml @@ -25,7 +25,7 @@ --> <config> <type name="Magento\CatalogSearch\Block\Layer"> - <param name="layer"> + <param name="catalogLayer"> <instance type="Magento\CatalogSearch\Model\Layer\Proxy" /> </param> </type> diff --git a/app/code/Magento/CatalogSearch/view/frontend/form.mini.phtml b/app/code/Magento/CatalogSearch/view/frontend/form.mini.phtml index 6b161cc0461a04a3a3943123734c18466229c81c..34325028b58f51cb8d91be80927ea4edb48aaa21 100644 --- a/app/code/Magento/CatalogSearch/view/frontend/form.mini.phtml +++ b/app/code/Magento/CatalogSearch/view/frontend/form.mini.phtml @@ -25,7 +25,7 @@ */ ?> <?php -/** @var $this \Magento\Core\Block\Template */ +/** @var $this \Magento\View\Block\Template */ /** @var $helper \Magento\CatalogSearch\Helper\Data */ $helper = $this->helper('Magento\CatalogSearch\Helper\Data'); ?> diff --git a/app/code/Magento/CatalogSearch/view/frontend/layout/catalogsearch_advanced_index.xml b/app/code/Magento/CatalogSearch/view/frontend/layout/catalogsearch_advanced_index.xml index 6027719a58da0751da4030d117a47fc649f061c9..5dc716342e983a54e9de6ef3d418c4c1e7a62cb6 100644 --- a/app/code/Magento/CatalogSearch/view/frontend/layout/catalogsearch_advanced_index.xml +++ b/app/code/Magento/CatalogSearch/view/frontend/layout/catalogsearch_advanced_index.xml @@ -37,6 +37,6 @@ <update handle="page_calendar"/> <referenceContainer name="content"> <block class="Magento\CatalogSearch\Block\Advanced\Form" name="catalogsearch_advanced_form" template="advanced/form.phtml"/> - <block class="Magento\Core\Block\Html\Calendar" name="html_calendar" as="html_calendar" template="Magento_Page::js/calendar.phtml"/> + <block class="Magento\View\Block\Html\Calendar" name="html_calendar" as="html_calendar" template="Magento_Page::js/calendar.phtml"/> </referenceContainer> </layout> diff --git a/app/code/Magento/CatalogSearch/view/frontend/layout/default.xml b/app/code/Magento/CatalogSearch/view/frontend/layout/default.xml index e4b5d8f6a49e774049b2700f03250ddc2a0e9d6b..8454bb6d813c9c21afc174420617199a2ae76311 100644 --- a/app/code/Magento/CatalogSearch/view/frontend/layout/default.xml +++ b/app/code/Magento/CatalogSearch/view/frontend/layout/default.xml @@ -25,7 +25,7 @@ --> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <referenceBlock name="header"> - <block class="Magento\Core\Block\Template" name="top.search" as="topSearch" template="Magento_CatalogSearch::form.mini.phtml"/> + <block class="Magento\View\Block\Template" name="top.search" as="topSearch" template="Magento_CatalogSearch::form.mini.phtml"/> </referenceBlock> <referenceBlock name="footer_links"> <block class="Magento\Page\Block\Link\Current" ifconfig="catalog/seo/search_terms" name="catalog-search-term-popular-link"> diff --git a/app/code/Magento/Centinel/Block/Authentication.php b/app/code/Magento/Centinel/Block/Authentication.php index 73dfb7cc9b7b37176fedbaa76ec2a19988cc9afa..075de9e727de4f223b1b0de0597514dc4bf955db 100644 --- a/app/code/Magento/Centinel/Block/Authentication.php +++ b/app/code/Magento/Centinel/Block/Authentication.php @@ -29,7 +29,7 @@ */ namespace Magento\Centinel\Block; -class Authentication extends \Magento\Core\Block\Template +class Authentication extends \Magento\View\Block\Template { /** * Checkout session @@ -54,19 +54,19 @@ class Authentication extends \Magento\Core\Block\Template protected $_authenticationStartMode = false; /** - * @param \Magento\Checkout\Model\Session $checkoutSession + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context + * @param \Magento\Checkout\Model\Session $checkoutSession * @param array $data */ public function __construct( - \Magento\Checkout\Model\Session $checkoutSession, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, + \Magento\Checkout\Model\Session $checkoutSession, array $data = array() ) { $this->_checkoutSession = $checkoutSession; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Centinel/Block/Authentication/Complete.php b/app/code/Magento/Centinel/Block/Authentication/Complete.php index 690ef669d988fd948342a7b68fc43cdf2c8e28f4..f3bb56bbe3af39135e679d7dd25da7540f0c9561 100644 --- a/app/code/Magento/Centinel/Block/Authentication/Complete.php +++ b/app/code/Magento/Centinel/Block/Authentication/Complete.php @@ -30,7 +30,7 @@ */ namespace Magento\Centinel\Block\Authentication; -class Complete extends \Magento\Core\Block\Template +class Complete extends \Magento\View\Block\Template { /** * Core registry @@ -40,19 +40,19 @@ class Complete extends \Magento\Core\Block\Template protected $_coreRegistry = null; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Core\Model\Registry $registry * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Core\Model\Registry $registry, array $data = array() ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Centinel/Block/Authentication/Start.php b/app/code/Magento/Centinel/Block/Authentication/Start.php index 42bb3f4f65a48e2b2a8187816518306d001412ab..7c0b164ca8a45d90bd18f39380b8ea6dcd824af0 100644 --- a/app/code/Magento/Centinel/Block/Authentication/Start.php +++ b/app/code/Magento/Centinel/Block/Authentication/Start.php @@ -30,7 +30,7 @@ */ namespace Magento\Centinel\Block\Authentication; -class Start extends \Magento\Core\Block\Template +class Start extends \Magento\View\Block\Template { /** * Core registry @@ -40,19 +40,19 @@ class Start extends \Magento\Core\Block\Template protected $_coreRegistry = null; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Core\Model\Registry $registry * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Core\Model\Registry $registry, array $data = array() ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Centinel/Block/Logo.php b/app/code/Magento/Centinel/Block/Logo.php index 8762c61ed98af854bedac889c8c1cba9e2c44c20..311c649eb79f72d9050f2d8d66853694551ef2f1 100644 --- a/app/code/Magento/Centinel/Block/Logo.php +++ b/app/code/Magento/Centinel/Block/Logo.php @@ -29,7 +29,7 @@ */ namespace Magento\Centinel\Block; -class Logo extends \Magento\Core\Block\Template +class Logo extends \Magento\View\Block\Template { protected $_template = 'logo.phtml'; diff --git a/app/code/Magento/Centinel/Controller/Adminhtml/Centinel/Index.php b/app/code/Magento/Centinel/Controller/Adminhtml/Centinel/Index.php index d7460f27cb09be133a7bd4ff0935ae78e26251df..a529ad5bfb57748654c85f0dbb9337afda7cdbdf 100644 --- a/app/code/Magento/Centinel/Controller/Adminhtml/Centinel/Index.php +++ b/app/code/Magento/Centinel/Controller/Adminhtml/Centinel/Index.php @@ -33,7 +33,7 @@ */ namespace Magento\Centinel\Controller\Adminhtml\Centinel; -class Index extends \Magento\Backend\Controller\Adminhtml\Action +class Index extends \Magento\Backend\App\Action { /** * Core registry @@ -43,11 +43,11 @@ class Index extends \Magento\Backend\Controller\Adminhtml\Action protected $_coreRegistry = null; /** - * @param \Magento\Backend\Controller\Context $context + * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Core\Model\Registry $coreRegistry */ public function __construct( - \Magento\Backend\Controller\Context $context, + \Magento\Backend\App\Action\Context $context, \Magento\Core\Model\Registry $coreRegistry ) { $this->_coreRegistry = $coreRegistry; @@ -89,7 +89,7 @@ class Index extends \Magento\Backend\Controller\Adminhtml\Action if ($validator) { $this->_coreRegistry->register('current_centinel_validator', $validator); } - $this->loadLayout()->renderLayout(); + $this->_view->loadLayout()->renderLayout(); } /** @@ -113,7 +113,7 @@ class Index extends \Magento\Backend\Controller\Adminhtml\Action } catch (\Exception $e) { $this->_coreRegistry->register('current_centinel_validator', false); } - $this->loadLayout()->renderLayout(); + $this->_view->loadLayout()->renderLayout(); } /** diff --git a/app/code/Magento/Centinel/Controller/Index.php b/app/code/Magento/Centinel/Controller/Index.php index 14518848bc828771abad95ecafdf101aa19d8a6c..c0e335118fda4106af8858a1e15e947e16af2f6c 100644 --- a/app/code/Magento/Centinel/Controller/Index.php +++ b/app/code/Magento/Centinel/Controller/Index.php @@ -30,7 +30,7 @@ */ namespace Magento\Centinel\Controller; -class Index extends \Magento\Core\Controller\Front\Action +class Index extends \Magento\App\Action\Action { /** * Core registry @@ -40,11 +40,11 @@ class Index extends \Magento\Core\Controller\Front\Action protected $_coreRegistry = null; /** - * @param \Magento\Core\Controller\Varien\Action\Context $context + * @param \Magento\App\Action\Context $context * @param \Magento\Core\Model\Registry $coreRegistry */ public function __construct( - \Magento\Core\Controller\Varien\Action\Context $context, + \Magento\App\Action\Context $context, \Magento\Core\Model\Registry $coreRegistry ) { $this->_coreRegistry = $coreRegistry; @@ -61,7 +61,7 @@ class Index extends \Magento\Core\Controller\Front\Action if ($validator) { $this->_coreRegistry->register('current_centinel_validator', $validator); } - $this->loadLayout()->renderLayout(); + $this->_view->loadLayout()->renderLayout(); } /** @@ -85,7 +85,7 @@ class Index extends \Magento\Core\Controller\Front\Action } catch (\Exception $e) { $this->_coreRegistry->register('current_centinel_validator', false); } - $this->loadLayout()->renderLayout(); + $this->_view->loadLayout()->renderLayout(); } /** diff --git a/app/code/Magento/Centinel/Helper/Data.php b/app/code/Magento/Centinel/Helper/Data.php index 146401eadf074a684c74c6dbe16af5880d27b4db..763e4ac8f74bc58cf85ab60baa35b23a47e27ed9 100644 --- a/app/code/Magento/Centinel/Helper/Data.php +++ b/app/code/Magento/Centinel/Helper/Data.php @@ -31,7 +31,7 @@ */ namespace Magento\Centinel\Helper; -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { /** * Layout factory @@ -41,11 +41,11 @@ class Data extends \Magento\Core\Helper\AbstractHelper protected $_layout; /** - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\View\LayoutInterface $layout */ public function __construct( - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\View\LayoutInterface $layout ) { $this->_layout = $layout; diff --git a/app/code/Magento/Centinel/view/frontend/logo.phtml b/app/code/Magento/Centinel/view/frontend/logo.phtml index 599835fc3f79a8d547d5bf1e2049cd6af1fea46c..8ab95a76afa968c4249d8145a3ac3b2a44aae81d 100644 --- a/app/code/Magento/Centinel/view/frontend/logo.phtml +++ b/app/code/Magento/Centinel/view/frontend/logo.phtml @@ -24,10 +24,12 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -<li class="centinel-logos" id="<?php echo $this->getCode() ?>_centinel_logo"> - <label><?php echo __('To ensure the security of your transactions') ?></label> - <div class="input-box"> - <a href="#" title="<?php echo __('Verified by Visa') ?> " data-mage-init="{popupWindow: {windowURL:'<?php echo $this->helper('Magento\Centinel\Helper\Data')->getVisaLearnMorePageUrl()?>',windowName:'verifiedByVisa',width:815,height:600,centerScreen:1,location:0,status:1,scrollbars:1,resizable:1}}"><img src="<?php echo $this->getViewFileUrl('Magento_Centinel::images/vbv_ltbg_71x57.gif'); ?>" alt="<?php echo __('Verified by Visa') ?>" /></a> - <a href="#" title="<?php echo __('MasterCard SecureCode'); ?>" data-mage-init="{popupWindow: {windowURL:'<?php echo $this->helper('Magento\Centinel\Helper\Data')->getMastercardLearnMorePageUrl()?>',windowName:'secureCode',width:600,height:403,centerScreen:1,location:0,status:1,scrollbars:1,resizable:1}}"><img src="<?php echo $this->getViewFileUrl('Magento_Centinel::images/sc_learn_62x34.gif'); ?>" alt="<?php echo __('MasterCard SecureCode') ?>" /></a> +<div class="field note <?php echo $this->getCode() ?> logos" id="<?php echo $this->getCode() ?>_centinel_logo"> + <label class="label"><span><?php echo __('To ensure the security of your transactions') ?></span></label> + <div class="control"> + <div class="nested"> + <a href="#" title="<?php echo __('Verified by Visa') ?> " data-mage-init="{popupWindow: {windowURL:'<?php echo $this->helper('Magento\Centinel\Helper\Data')->getVisaLearnMorePageUrl()?>',windowName:'verifiedByVisa',width:815,height:600,centerScreen:1,location:0,status:1,scrollbars:1,resizable:1}}"><img src="<?php echo $this->getViewFileUrl('Magento_Centinel::images/vbv_ltbg_71x57.gif'); ?>" alt="<?php echo __('Verified by Visa') ?>" /></a> + <a href="#" title="<?php echo __('MasterCard SecureCode'); ?>" data-mage-init="{popupWindow: {windowURL:'<?php echo $this->helper('Magento\Centinel\Helper\Data')->getMastercardLearnMorePageUrl()?>',windowName:'secureCode',width:600,height:403,centerScreen:1,location:0,status:1,scrollbars:1,resizable:1}}"><img src="<?php echo $this->getViewFileUrl('Magento_Centinel::images/sc_learn_62x34.gif'); ?>" alt="<?php echo __('MasterCard SecureCode') ?>" /></a> + </div> </div> -</li> +</div> diff --git a/app/code/Magento/Checkout/Block/Adminhtml/Agreement/Edit.php b/app/code/Magento/Checkout/Block/Adminhtml/Agreement/Edit.php index 2654b64b9c5415602c25eef82cf0174bef13a6a6..607d7dfb1eb53da363c76f0f188c91ea7844b9ed 100644 --- a/app/code/Magento/Checkout/Block/Adminhtml/Agreement/Edit.php +++ b/app/code/Magento/Checkout/Block/Adminhtml/Agreement/Edit.php @@ -35,20 +35,20 @@ class Edit extends \Magento\Adminhtml\Block\Widget\Form\Container */ protected $_coreRegistry = null; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Checkout/Block/Adminhtml/Agreement/Edit/Form.php b/app/code/Magento/Checkout/Block/Adminhtml/Agreement/Edit/Form.php index 340071531db3b098e1c0688dc5ab47773ade6d87..c5d49f12aa2f7fd082f5517c85942d79a6f7aa82 100644 --- a/app/code/Magento/Checkout/Block/Adminhtml/Agreement/Edit/Form.php +++ b/app/code/Magento/Checkout/Block/Adminhtml/Agreement/Edit/Form.php @@ -33,24 +33,24 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic */ protected $_systemStore; - /** - * @param \Magento\Core\Model\System\Store $systemStore - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Core\Model\System\Store $systemStore + * @param array $data */ - public function __construct( - \Magento\Core\Model\System\Store $systemStore, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Core\Model\System\Store $systemStore, + array $data = array() + ) { $this->_systemStore = $systemStore; - parent::__construct($registry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); } /** diff --git a/app/code/Magento/Checkout/Block/Adminhtml/Agreement/Grid.php b/app/code/Magento/Checkout/Block/Adminhtml/Agreement/Grid.php index 7b28d430ac14e1703117517591ae567c57f494bd..fcd958b73ea4c958cf4d9f2f272587c7129a067a 100644 --- a/app/code/Magento/Checkout/Block/Adminhtml/Agreement/Grid.php +++ b/app/code/Magento/Checkout/Block/Adminhtml/Agreement/Grid.php @@ -32,24 +32,22 @@ class Grid extends \Magento\Adminhtml\Block\Widget\Grid */ protected $_collectionFactory; - /** - * @param \Magento\Checkout\Model\Resource\Agreement\CollectionFactory $collectionFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Checkout\Model\Resource\Agreement\CollectionFactory $collectionFactory + * @param array $data */ - public function __construct( - \Magento\Checkout\Model\Resource\Agreement\CollectionFactory $collectionFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Checkout\Model\Resource\Agreement\CollectionFactory $collectionFactory, + array $data = array() + ) { $this->_collectionFactory = $collectionFactory; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $data); } protected function _construct() diff --git a/app/code/Magento/Checkout/Block/Agreements.php b/app/code/Magento/Checkout/Block/Agreements.php index c97b092d521b3fccdd1da69ad7bf5b9826a48520..4060adf6b2e0d94f248463b1208307e1b6f410a7 100644 --- a/app/code/Magento/Checkout/Block/Agreements.php +++ b/app/code/Magento/Checkout/Block/Agreements.php @@ -25,7 +25,7 @@ */ namespace Magento\Checkout\Block; -class Agreements extends \Magento\Core\Block\Template +class Agreements extends \Magento\View\Block\Template { /** * @var \Magento\Checkout\Model\Resource\Agreement\CollectionFactory @@ -33,27 +33,19 @@ class Agreements extends \Magento\Core\Block\Template protected $_agreementCollFactory; /** - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - - /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Checkout\Model\Resource\Agreement\CollectionFactory $agreementCollFactory * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Checkout\Model\Resource\Agreement\CollectionFactory $agreementCollFactory, array $data = array() ) { - $this->_storeManager = $storeManager; $this->_agreementCollFactory = $agreementCollFactory; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Checkout/Block/Cart.php b/app/code/Magento/Checkout/Block/Cart.php index f7db27f48211787e52f33c8ab05fb5308a9883cf..92a7e85da4413cd7b33acbdc925b8ab29733fed4 100644 --- a/app/code/Magento/Checkout/Block/Cart.php +++ b/app/code/Magento/Checkout/Block/Cart.php @@ -35,47 +35,31 @@ namespace Magento\Checkout\Block; class Cart extends \Magento\Checkout\Block\Cart\AbstractCart { - /** - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - /** * @var \Magento\Catalog\Model\Resource\Url */ protected $_catalogUrlBuilder; /** - * @var \Magento\UrlInterface - */ - protected $_urlBuilder; - - /** - * @param \Magento\Catalog\Helper\Data $catalogData + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Catalog\Model\Resource\Url $catalogUrlBuilder - * @param \Magento\UrlInterface $urlBuilder + * @param \Magento\Catalog\Helper\Data $catalogData * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Checkout\Model\Session $checkoutSession + * @param \Magento\Catalog\Model\Resource\Url $catalogUrlBuilder * @param array $data */ public function __construct( - \Magento\Catalog\Helper\Data $catalogData, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, + \Magento\Catalog\Helper\Data $catalogData, \Magento\Customer\Model\Session $customerSession, \Magento\Checkout\Model\Session $checkoutSession, - \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Catalog\Model\Resource\Url $catalogUrlBuilder, - \Magento\UrlInterface $urlBuilder, array $data = array() ) { - $this->_storeManager = $storeManager; $this->_catalogUrlBuilder = $catalogUrlBuilder; - $this->_urlBuilder = $urlBuilder; - parent::__construct($catalogData, $coreData, $context, $customerSession, $checkoutSession, $data); + parent::__construct($context, $coreData, $catalogData, $customerSession, $checkoutSession, $data); } /** diff --git a/app/code/Magento/Checkout/Block/Cart/AbstractCart.php b/app/code/Magento/Checkout/Block/Cart/AbstractCart.php index 19183c6d6ba13a40d096f6d563ec965db24e1f2b..bf11f7db07ecd5585b2cc729d9719b088b8fc33c 100644 --- a/app/code/Magento/Checkout/Block/Cart/AbstractCart.php +++ b/app/code/Magento/Checkout/Block/Cart/AbstractCart.php @@ -33,7 +33,7 @@ */ namespace Magento\Checkout\Block\Cart; -class AbstractCart extends \Magento\Core\Block\Template +class AbstractCart extends \Magento\View\Block\Template { /** * Block alias fallback @@ -63,17 +63,17 @@ class AbstractCart extends \Magento\Core\Block\Template protected $_checkoutSession; /** - * @param \Magento\Catalog\Helper\Data $catalogData + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context + * @param \Magento\Catalog\Helper\Data $catalogData * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Checkout\Model\Session $checkoutSession * @param array $data */ public function __construct( - \Magento\Catalog\Helper\Data $catalogData, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, + \Magento\Catalog\Helper\Data $catalogData, \Magento\Customer\Model\Session $customerSession, \Magento\Checkout\Model\Session $checkoutSession, array $data = array() @@ -81,7 +81,7 @@ class AbstractCart extends \Magento\Core\Block\Template $this->_customerSession = $customerSession; $this->_checkoutSession = $checkoutSession; $this->_catalogData = $catalogData; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** @@ -104,7 +104,7 @@ class AbstractCart extends \Magento\Core\Block\Template * * @param string $type * @throws \RuntimeException - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ public function getItemRenderer($type) { diff --git a/app/code/Magento/Checkout/Block/Cart/Crosssell.php b/app/code/Magento/Checkout/Block/Cart/Crosssell.php index 7d1e9736b88421b3d9cd3226d8c5041c3cd42adc..1bb998b973b5be746fa8f936590a047be793d2ba 100644 --- a/app/code/Magento/Checkout/Block/Cart/Crosssell.php +++ b/app/code/Magento/Checkout/Block/Cart/Crosssell.php @@ -63,32 +63,28 @@ class Crosssell extends \Magento\Catalog\Block\Product\AbstractProduct protected $_productLinkFactory; /** - * Construct - * - * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\View\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Catalog\Model\Config $catalogConfig - * @param \Magento\Core\Model\Registry $coreRegistry + * @param \Magento\Core\Model\Registry $registry * @param \Magento\Tax\Helper\Data $taxData * @param \Magento\Catalog\Helper\Data $catalogData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Math\Random $mathRandom * @param \Magento\Checkout\Model\Session $checkoutSession * @param \Magento\Catalog\Model\Product\Visibility $productVisibility * @param \Magento\CatalogInventory\Model\Stock $stock * @param \Magento\Catalog\Model\Product\LinkFactory $productLinkFactory * @param array $data - * + * * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( - \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\View\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Catalog\Model\Config $catalogConfig, - \Magento\Core\Model\Registry $coreRegistry, + \Magento\Core\Model\Registry $registry, \Magento\Tax\Helper\Data $taxData, \Magento\Catalog\Helper\Data $catalogData, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Math\Random $mathRandom, \Magento\Checkout\Model\Session $checkoutSession, \Magento\Catalog\Model\Product\Visibility $productVisibility, @@ -100,17 +96,7 @@ class Crosssell extends \Magento\Catalog\Block\Product\AbstractProduct $this->_productVisibility = $productVisibility; $this->_stock = $stock; $this->_productLinkFactory = $productLinkFactory; - parent::__construct( - $storeManager, - $catalogConfig, - $coreRegistry, - $taxData, - $catalogData, - $coreData, - $context, - $mathRandom, - $data - ); + parent::__construct($context, $coreData, $catalogConfig, $registry, $taxData, $catalogData, $mathRandom, $data); } /** diff --git a/app/code/Magento/Checkout/Block/Cart/Item/Configure.php b/app/code/Magento/Checkout/Block/Cart/Item/Configure.php index fa23e487259402f1925ec1fe7821b94658144934..6be0c50ea0a4c2c93e8d0769ae2a7da3b23b3a53 100644 --- a/app/code/Magento/Checkout/Block/Cart/Item/Configure.php +++ b/app/code/Magento/Checkout/Block/Cart/Item/Configure.php @@ -35,7 +35,7 @@ */ namespace Magento\Checkout\Block\Cart\Item; -class Configure extends \Magento\Core\Block\Template +class Configure extends \Magento\View\Block\Template { /** diff --git a/app/code/Magento/Checkout/Block/Cart/Item/Renderer.php b/app/code/Magento/Checkout/Block/Cart/Item/Renderer.php index bca0f9052ac70a6d10de9c86ee9ad14655435abd..2dda9fd8b153bc3373c1df774b4762dc05877d46 100644 --- a/app/code/Magento/Checkout/Block/Cart/Item/Renderer.php +++ b/app/code/Magento/Checkout/Block/Cart/Item/Renderer.php @@ -36,7 +36,7 @@ */ namespace Magento\Checkout\Block\Cart\Item; -class Renderer extends \Magento\Core\Block\Template +class Renderer extends \Magento\View\Block\Template { /** @var \Magento\Checkout\Model\Session */ protected $_checkoutSession; @@ -63,25 +63,25 @@ class Renderer extends \Magento\Core\Block\Template * * @var \Magento\Catalog\Helper\Product\Configuration */ - protected $_productConfigur = null; + protected $_productConfig = null; /** - * @param \Magento\Catalog\Helper\Product\Configuration $productConfigur + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context + * @param \Magento\Catalog\Helper\Product\Configuration $productConfig * @param \Magento\Checkout\Model\Session $checkoutSession * @param array $data */ public function __construct( - \Magento\Catalog\Helper\Product\Configuration $productConfigur, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, + \Magento\Catalog\Helper\Product\Configuration $productConfig, \Magento\Checkout\Model\Session $checkoutSession, array $data = array() ) { - $this->_productConfigur = $productConfigur; + $this->_productConfig = $productConfig; $this->_checkoutSession = $checkoutSession; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** @@ -273,7 +273,7 @@ class Renderer extends \Magento\Core\Block\Template public function getProductOptions() { /* @var $helper \Magento\Catalog\Helper\Product\Configuration */ - $helper = $this->_productConfigur; + $helper = $this->_productConfig; return $helper->getCustomOptions($this->getItem()); } @@ -316,7 +316,7 @@ class Renderer extends \Magento\Core\Block\Template 'checkout/cart/delete', array( 'id'=>$this->getItem()->getId(), - \Magento\Core\Controller\Front\Action::PARAM_NAME_URL_ENCODED => $encodedUrl + \Magento\App\Action\Action::PARAM_NAME_URL_ENCODED => $encodedUrl ) ); } @@ -372,15 +372,15 @@ class Renderer extends \Magento\Core\Block\Template // Add messages saved previously in checkout session $checkoutSession = $this->getCheckoutSession(); if ($checkoutSession) { - /* @var $collection \Magento\Core\Model\Message\Collection */ + /* @var $collection \Magento\Message\Collection */ $collection = $checkoutSession->getQuoteItemMessages($quoteItem->getId(), true); if ($collection) { $additionalMessages = $collection->getItems(); foreach ($additionalMessages as $message) { - /* @var $message \Magento\Core\Model\Message\AbstractMessage */ + /* @var $message \Magento\Message\AbstractMessage */ $messages[] = array( 'text' => $message->getCode(), - 'type' => ($message->getType() == \Magento\Core\Model\Message::ERROR) ? 'error' : 'notice' + 'type' => ($message->getType() == \Magento\Message\Factory::ERROR) ? 'error' : 'notice' ); } } @@ -412,7 +412,7 @@ class Renderer extends \Magento\Core\Block\Template public function getFormatedOptionValue($optionValue) { /* @var $helper \Magento\Catalog\Helper\Product\Configuration */ - $helper = $this->_productConfigur; + $helper = $this->_productConfig; $params = array( 'max_length' => 55, 'cut_replacer' => ' <a href="#" class="dots" onclick="return false">...</a>' @@ -433,7 +433,7 @@ class Renderer extends \Magento\Core\Block\Template /** * Return product additional information block * - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ public function getProductAdditionalInformationBlock() { diff --git a/app/code/Magento/Checkout/Block/Cart/Item/Renderer/Configurable.php b/app/code/Magento/Checkout/Block/Cart/Item/Renderer/Configurable.php index 1ce40228c922cd378ddf1da52d85cc8f339cd77a..9e68d55c65ba893845c5b1d59936b3a5675b5843 100644 --- a/app/code/Magento/Checkout/Block/Cart/Item/Renderer/Configurable.php +++ b/app/code/Magento/Checkout/Block/Cart/Item/Renderer/Configurable.php @@ -109,6 +109,6 @@ class Configurable extends \Magento\Checkout\Block\Cart\Item\Renderer */ public function getOptionList() { - return $this->_productConfigur->getConfigurableOptions($this->getItem()); + return $this->_productConfig->getConfigurableOptions($this->getItem()); } } diff --git a/app/code/Magento/Checkout/Block/Cart/Link.php b/app/code/Magento/Checkout/Block/Cart/Link.php index 597cdeddc2feeab19a7ce2f738a98c43a67c9684..c9fd4c0ce92ed7c94f6412dbe3aa26d14b22638e 100644 --- a/app/code/Magento/Checkout/Block/Cart/Link.php +++ b/app/code/Magento/Checkout/Block/Cart/Link.php @@ -35,18 +35,18 @@ class Link extends \Magento\Page\Block\Link protected $_moduleManager; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Module\Manager $moduleManager * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Module\Manager $moduleManager, array $data = array() ) { - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); $this->_moduleManager = $moduleManager; } diff --git a/app/code/Magento/Checkout/Block/Cart/Shipping.php b/app/code/Magento/Checkout/Block/Cart/Shipping.php index 5abc237102569bc5886f4eba78d53fcf7a9592ca..9f2de88b2b6cc7d90d87169df0b8bc1c06737436 100644 --- a/app/code/Magento/Checkout/Block/Cart/Shipping.php +++ b/app/code/Magento/Checkout/Block/Cart/Shipping.php @@ -53,25 +53,25 @@ class Shipping extends \Magento\Checkout\Block\Cart\AbstractCart protected $_directoryBlock; /** - * @param \Magento\Catalog\Helper\Data $catalogData + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context + * @param \Magento\Catalog\Helper\Data $catalogData * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Checkout\Model\Session $checkoutSession * @param \Magento\Directory\Block\Data $directoryBlock * @param array $data */ public function __construct( - \Magento\Catalog\Helper\Data $catalogData, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, + \Magento\Catalog\Helper\Data $catalogData, \Magento\Customer\Model\Session $customerSession, \Magento\Checkout\Model\Session $checkoutSession, \Magento\Directory\Block\Data $directoryBlock, array $data = array() ) { $this->_directoryBlock = $directoryBlock; - parent::__construct($catalogData, $coreData, $context, $customerSession, $checkoutSession, $data); + parent::__construct($context, $coreData, $catalogData, $customerSession, $checkoutSession, $data); } /** diff --git a/app/code/Magento/Checkout/Block/Cart/Sidebar.php b/app/code/Magento/Checkout/Block/Cart/Sidebar.php index cb38717271b7c66ba531ba548a3d8df14c864bcb..c7eb59e7c4576ae8baa3bca976ad4c56ca50c3a4 100644 --- a/app/code/Magento/Checkout/Block/Cart/Sidebar.php +++ b/app/code/Magento/Checkout/Block/Cart/Sidebar.php @@ -50,11 +50,6 @@ class Sidebar extends \Magento\Checkout\Block\Cart\AbstractCart */ protected $_catalogUrl; - /** - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - /** * @var \Magento\Tax\Model\Config */ @@ -66,37 +61,34 @@ class Sidebar extends \Magento\Checkout\Block\Cart\AbstractCart protected $_checkoutCart; /** - * @param \Magento\Tax\Helper\Data $taxData - * @param \Magento\Catalog\Helper\Data $catalogData + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context + * @param \Magento\Catalog\Helper\Data $catalogData * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Checkout\Model\Session $checkoutSession + * @param \Magento\Tax\Helper\Data $taxData * @param \Magento\Catalog\Model\Resource\Url $catalogUrl - * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Tax\Model\Config $taxConfig * @param \Magento\Checkout\Model\Cart $checkoutCart * @param array $data */ public function __construct( - \Magento\Tax\Helper\Data $taxData, - \Magento\Catalog\Helper\Data $catalogData, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, + \Magento\Catalog\Helper\Data $catalogData, \Magento\Customer\Model\Session $customerSession, \Magento\Checkout\Model\Session $checkoutSession, + \Magento\Tax\Helper\Data $taxData, \Magento\Catalog\Model\Resource\Url $catalogUrl, - \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Tax\Model\Config $taxConfig, \Magento\Checkout\Model\Cart $checkoutCart, array $data = array() ) { $this->_taxData = $taxData; $this->_catalogUrl = $catalogUrl; - $this->_storeManager = $storeManager; $this->_taxConfig = $taxConfig; $this->_checkoutCart = $checkoutCart; - parent::__construct($catalogData, $coreData, $context, $customerSession, $checkoutSession, $data); + parent::__construct($context, $coreData, $catalogData, $customerSession, $checkoutSession, $data); } /** @@ -333,7 +325,7 @@ class Sidebar extends \Magento\Checkout\Block\Cart\AbstractCart { $result = array(); foreach ($this->getLayout()->getChildBlocks($this->getNameInLayout()) as $block) { - /** @var $block \Magento\Core\Block\Template */ + /** @var $block \Magento\View\Block\Template */ $result[] = implode('|', array( // skip $this->getNameInLayout() and '.' substr($block->getNameInLayout(), strlen($this->getNameInLayout()) + 1), diff --git a/app/code/Magento/Checkout/Block/Cart/Totals.php b/app/code/Magento/Checkout/Block/Cart/Totals.php index cae238ed8823a4344d1cbaf08670ab1acbd9c039..6a18cfecf9653ef1e80e794b7bf6519aaf6f3508 100644 --- a/app/code/Magento/Checkout/Block/Cart/Totals.php +++ b/app/code/Magento/Checkout/Block/Cart/Totals.php @@ -38,40 +38,25 @@ class Totals extends \Magento\Checkout\Block\Cart\AbstractCart protected $_salesConfig; /** - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - - /** - * @param \Magento\Catalog\Helper\Data $catalogData + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context - * @param \Magento\Sales\Model\Config $salesConfig + * @param \Magento\Catalog\Helper\Data $catalogData * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Checkout\Model\Session $checkoutSession - * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\Sales\Model\Config $salesConfig * @param array $data */ public function __construct( - \Magento\Catalog\Helper\Data $catalogData, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, - \Magento\Sales\Model\Config $salesConfig, + \Magento\Catalog\Helper\Data $catalogData, \Magento\Customer\Model\Session $customerSession, \Magento\Checkout\Model\Session $checkoutSession, - \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\Sales\Model\Config $salesConfig, array $data = array() ) { $this->_salesConfig = $salesConfig; - $this->_storeManager = $storeManager; - parent::__construct( - $catalogData, - $coreData, - $context, - $customerSession, - $checkoutSession, - $data - ); + parent::__construct($context, $coreData, $catalogData, $customerSession, $checkoutSession, $data); } diff --git a/app/code/Magento/Checkout/Block/Link.php b/app/code/Magento/Checkout/Block/Link.php index ec77a89541abf9eef56144d41bd879913df70de9..e830d7d8156fe2e6b7b198fa41c8178163850e58 100644 --- a/app/code/Magento/Checkout/Block/Link.php +++ b/app/code/Magento/Checkout/Block/Link.php @@ -35,18 +35,18 @@ class Link extends \Magento\Page\Block\Link protected $_moduleManager; /** - * @param \Magento\Core\Block\Template\Context $context - * @param \Magento\Module\Manager $moduleManager + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Module\Manager $moduleManager * @param array $data */ public function __construct( - \Magento\Core\Block\Template\Context $context, - \Magento\Module\Manager $moduleManager, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, + \Magento\Module\Manager $moduleManager, array $data = array() ) { - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); $this->_moduleManager = $moduleManager; } diff --git a/app/code/Magento/Checkout/Block/Multishipping/AbstractMultishipping.php b/app/code/Magento/Checkout/Block/Multishipping/AbstractMultishipping.php index 29e2d24f34d1f172edcc740cf67c70272840ba5c..e7c36860c30e7baa026f802813a424d5c0e84a7a 100644 --- a/app/code/Magento/Checkout/Block/Multishipping/AbstractMultishipping.php +++ b/app/code/Magento/Checkout/Block/Multishipping/AbstractMultishipping.php @@ -33,7 +33,7 @@ */ namespace Magento\Checkout\Block\Multishipping; -class AbstractMultishipping extends \Magento\Core\Block\Template +class AbstractMultishipping extends \Magento\View\Block\Template { /** * @var \Magento\Checkout\Model\Type\Multishipping @@ -41,19 +41,19 @@ class AbstractMultishipping extends \Magento\Core\Block\Template protected $_multishipping; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Checkout\Model\Type\Multishipping $multishipping * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Checkout\Model\Type\Multishipping $multishipping, array $data = array() ) { $this->_multishipping = $multishipping; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Checkout/Block/Multishipping/Addresses.php b/app/code/Magento/Checkout/Block/Multishipping/Addresses.php index 6cc7b3e2933637d86d5df0cf26c6e61601885922..ca5d94b845235129ce90699d4158196b6cdb08dc 100644 --- a/app/code/Magento/Checkout/Block/Multishipping/Addresses.php +++ b/app/code/Magento/Checkout/Block/Multishipping/Addresses.php @@ -46,22 +46,22 @@ class Addresses extends \Magento\Sales\Block\Items\AbstractItems protected $_multishipping; /** - * @param \Magento\Filter\Object\GridFactory $filterGridFactory + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context + * @param \Magento\Filter\Object\GridFactory $filterGridFactory * @param \Magento\Checkout\Model\Type\Multishipping $multishipping * @param array $data */ public function __construct( - \Magento\Filter\Object\GridFactory $filterGridFactory, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, + \Magento\Filter\Object\GridFactory $filterGridFactory, \Magento\Checkout\Model\Type\Multishipping $multishipping, array $data = array() ) { $this->_filterGridFactory = $filterGridFactory; $this->_multishipping = $multishipping; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** @@ -107,7 +107,7 @@ class Addresses extends \Magento\Sales\Block\Items\AbstractItems */ public function getAddressesHtmlSelect($item, $index) { - $select = $this->getLayout()->createBlock('Magento\Core\Block\Html\Select') + $select = $this->getLayout()->createBlock('Magento\View\Block\Html\Select') ->setName('ship['.$index.']['.$item->getQuoteItemId().'][address]') ->setId('ship_'.$index.'_'.$item->getQuoteItemId().'_address') ->setValue($item->getCustomerAddressId()) diff --git a/app/code/Magento/Checkout/Block/Multishipping/Billing.php b/app/code/Magento/Checkout/Block/Multishipping/Billing.php index 657aa88b884a96a97afc6a276f90df6159877a73..7acc228644469f43900cf9560482b978c769236f 100644 --- a/app/code/Magento/Checkout/Block/Multishipping/Billing.php +++ b/app/code/Magento/Checkout/Block/Multishipping/Billing.php @@ -46,22 +46,22 @@ class Billing extends \Magento\Payment\Block\Form\Container protected $_checkoutSession; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Checkout\Model\Type\Multishipping $multishipping * @param \Magento\Checkout\Model\Session $checkoutSession * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Checkout\Model\Type\Multishipping $multishipping, \Magento\Checkout\Model\Session $checkoutSession, array $data = array() ) { $this->_multishipping = $multishipping; $this->_checkoutSession = $checkoutSession; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Checkout/Block/Multishipping/Billing/Items.php b/app/code/Magento/Checkout/Block/Multishipping/Billing/Items.php index b917018a4bfa78008c4d4aa140a9c107eeb91484..374dc895e4e6794a7011a7a0fd048ab1f33eabeb 100644 --- a/app/code/Magento/Checkout/Block/Multishipping/Billing/Items.php +++ b/app/code/Magento/Checkout/Block/Multishipping/Billing/Items.php @@ -46,22 +46,22 @@ class Items extends \Magento\Sales\Block\Items\AbstractItems protected $_checkoutSession; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Checkout\Model\Type\Multishipping $multishipping * @param \Magento\Checkout\Model\Session $checkoutSession * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Checkout\Model\Type\Multishipping $multishipping, \Magento\Checkout\Model\Session $checkoutSession, array $data = array() ) { $this->_multishipping = $multishipping; $this->_checkoutSession = $checkoutSession; - parent::__construct($coreData, $context); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Checkout/Block/Multishipping/Link.php b/app/code/Magento/Checkout/Block/Multishipping/Link.php index 570c54deb0d16895e7faa848899509eb9b65cf23..c46940f9017bff56905b4ff5bce680c12b9ba0fd 100644 --- a/app/code/Magento/Checkout/Block/Multishipping/Link.php +++ b/app/code/Magento/Checkout/Block/Multishipping/Link.php @@ -29,7 +29,7 @@ */ namespace Magento\Checkout\Block\Multishipping; -class Link extends \Magento\Core\Block\Template +class Link extends \Magento\View\Block\Template { /** * Checkout data @@ -44,22 +44,22 @@ class Link extends \Magento\Core\Block\Template protected $_checkoutSession; /** - * @param \Magento\Checkout\Helper\Data $checkoutData + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context + * @param \Magento\Checkout\Helper\Data $checkoutData * @param \Magento\Checkout\Model\Session $checkoutSession * @param array $data */ public function __construct( - \Magento\Checkout\Helper\Data $checkoutData, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, + \Magento\Checkout\Helper\Data $checkoutData, \Magento\Checkout\Model\Session $checkoutSession, array $data = array() ) { $this->_checkoutData = $checkoutData; $this->_checkoutSession = $checkoutSession; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Checkout/Block/Multishipping/Overview.php b/app/code/Magento/Checkout/Block/Multishipping/Overview.php index e9219bdbae1a7515839169b9c735c731f872cc70..240ba98ec05a9b0258e5b7ece54ab979c8d436ab 100644 --- a/app/code/Magento/Checkout/Block/Multishipping/Overview.php +++ b/app/code/Magento/Checkout/Block/Multishipping/Overview.php @@ -46,19 +46,19 @@ class Overview extends \Magento\Sales\Block\Items\AbstractItems protected $_multishipping; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Checkout\Model\Type\Multishipping $multishipping * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Checkout\Model\Type\Multishipping $multishipping, array $data = array() ) { $this->_multishipping = $multishipping; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** @@ -362,7 +362,7 @@ class Overview extends \Magento\Sales\Block\Items\AbstractItems * Retrieve renderer block for row-level item output * * @param string $type - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ protected function _getRowItemRenderer($type) { diff --git a/app/code/Magento/Checkout/Block/Multishipping/Payment/Info.php b/app/code/Magento/Checkout/Block/Multishipping/Payment/Info.php index 33d9374bd16f2aaa186ace5aeaeeab34690b256c..ecd73a13d10726119084afddcf8eb961e746b84e 100644 --- a/app/code/Magento/Checkout/Block/Multishipping/Payment/Info.php +++ b/app/code/Magento/Checkout/Block/Multishipping/Payment/Info.php @@ -41,21 +41,21 @@ class Info extends \Magento\Payment\Block\Info\AbstractContainer protected $_multishipping; /** - * @param \Magento\Payment\Helper\Data $paymentData + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context + * @param \Magento\Payment\Helper\Data $paymentData * @param \Magento\Checkout\Model\Type\Multishipping $multishipping * @param array $data */ public function __construct( - \Magento\Payment\Helper\Data $paymentData, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, + \Magento\Payment\Helper\Data $paymentData, \Magento\Checkout\Model\Type\Multishipping $multishipping, array $data = array() ) { $this->_multishipping = $multishipping; - parent::__construct($paymentData, $coreData, $context, $data); + parent::__construct($context, $coreData, $paymentData, $data); } /** diff --git a/app/code/Magento/Checkout/Block/Multishipping/Shipping.php b/app/code/Magento/Checkout/Block/Multishipping/Shipping.php index a2a58b8fdd22db48d13bd940f4b120bdea5595d8..3c729003c0516acf16d67f4175d8d4200b4141c0 100644 --- a/app/code/Magento/Checkout/Block/Multishipping/Shipping.php +++ b/app/code/Magento/Checkout/Block/Multishipping/Shipping.php @@ -41,22 +41,22 @@ class Shipping extends \Magento\Sales\Block\Items\AbstractItems protected $_filterGridFactory; /** - * @param \Magento\Filter\Object\GridFactory $filterGridFactory + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context + * @param \Magento\Filter\Object\GridFactory $filterGridFactory * @param \Magento\Checkout\Model\Type\Multishipping $multishipping * @param array $data */ public function __construct( - \Magento\Filter\Object\GridFactory $filterGridFactory, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, + \Magento\Filter\Object\GridFactory $filterGridFactory, \Magento\Checkout\Model\Type\Multishipping $multishipping, array $data = array() ) { $this->_filterGridFactory = $filterGridFactory; $this->_multishipping = $multishipping; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Checkout/Block/Multishipping/State.php b/app/code/Magento/Checkout/Block/Multishipping/State.php index 9a1a5fb7a65613dbd0aa6cc7b234f8028fa9667a..c6eae8c6bd3403f4c989eec3d7c34ce5ee7fdfcc 100644 --- a/app/code/Magento/Checkout/Block/Multishipping/State.php +++ b/app/code/Magento/Checkout/Block/Multishipping/State.php @@ -33,7 +33,7 @@ */ namespace Magento\Checkout\Block\Multishipping; -class State extends \Magento\Core\Block\Template +class State extends \Magento\View\Block\Template { /** * @var \Magento\Checkout\Model\Type\Multishipping\State @@ -41,19 +41,19 @@ class State extends \Magento\Core\Block\Template protected $_multishippingState; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Checkout\Model\Type\Multishipping\State $multishippingState * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Checkout\Model\Type\Multishipping\State $multishippingState, array $data = array() ) { $this->_multishippingState = $multishippingState; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Checkout/Block/Multishipping/Success.php b/app/code/Magento/Checkout/Block/Multishipping/Success.php index 3f1ae6f5937c154b112d29838f7fdfbc5dd1817a..245f1fa0b67609b0d9f9eb07d5b9cb97ac83ce6b 100644 --- a/app/code/Magento/Checkout/Block/Multishipping/Success.php +++ b/app/code/Magento/Checkout/Block/Multishipping/Success.php @@ -36,26 +36,18 @@ namespace Magento\Checkout\Block\Multishipping; class Success extends \Magento\Checkout\Block\Multishipping\AbstractMultishipping { /** - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - - /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Checkout\Model\Type\Multishipping $multishipping - * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Checkout\Model\Type\Multishipping $multishipping, - \Magento\Core\Model\StoreManagerInterface $storeManager, array $data = array() ) { - $this->_storeManager = $storeManager; - parent::__construct($coreData, $context, $multishipping,$data); + parent::__construct($context, $coreData, $multishipping, $data); } /** diff --git a/app/code/Magento/Checkout/Block/Onepage/AbstractOnepage.php b/app/code/Magento/Checkout/Block/Onepage/AbstractOnepage.php index d71b70adf7be3f8623064ab1bf7d901641fbf465..b8bc7e5e727de6daa8b0882ac579d5c9cb22fc30 100644 --- a/app/code/Magento/Checkout/Block/Onepage/AbstractOnepage.php +++ b/app/code/Magento/Checkout/Block/Onepage/AbstractOnepage.php @@ -31,7 +31,7 @@ */ namespace Magento\Checkout\Block\Onepage; -abstract class AbstractOnepage extends \Magento\Core\Block\Template +abstract class AbstractOnepage extends \Magento\View\Block\Template { /** * @var \Magento\App\Cache\Type\Config @@ -44,11 +44,6 @@ abstract class AbstractOnepage extends \Magento\Core\Block\Template protected $_regionCollection; protected $_addressesCollection; - /** - * @var \Magento\Customer\Model\Session - */ - protected $_customerSession; - /** * @var \Magento\Checkout\Model\Session */ @@ -65,30 +60,23 @@ abstract class AbstractOnepage extends \Magento\Core\Block\Template protected $_countryCollFactory; /** - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - - /** - * @param \Magento\App\Cache\Type\Config $configCacheType + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context + * @param \Magento\App\Cache\Type\Config $configCacheType * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Checkout\Model\Session $resourceSession * @param \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollFactory * @param \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollFactory - * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param array $data */ public function __construct( - \Magento\App\Cache\Type\Config $configCacheType, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, + \Magento\App\Cache\Type\Config $configCacheType, \Magento\Customer\Model\Session $customerSession, \Magento\Checkout\Model\Session $resourceSession, \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollFactory, \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollFactory, - \Magento\Core\Model\StoreManagerInterface $storeManager, array $data = array() ) { $this->_configCacheType = $configCacheType; @@ -96,8 +84,7 @@ abstract class AbstractOnepage extends \Magento\Core\Block\Template $this->_checkoutSession = $resourceSession; $this->_countryCollFactory = $countryCollFactory; $this->_regionCollFactory = $regionCollFactory; - $this->_storeManager = $storeManager; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** @@ -198,7 +185,7 @@ abstract class AbstractOnepage extends \Magento\Core\Block\Template } } - $select = $this->getLayout()->createBlock('Magento\Core\Block\Html\Select') + $select = $this->getLayout()->createBlock('Magento\View\Block\Html\Select') ->setName($type.'_address_id') ->setId($type.'-address-select') ->setClass('address-select') @@ -220,7 +207,7 @@ abstract class AbstractOnepage extends \Magento\Core\Block\Template if (is_null($countryId)) { $countryId = $this->_coreData->getDefaultCountry(); } - $select = $this->getLayout()->createBlock('Magento\Core\Block\Html\Select') + $select = $this->getLayout()->createBlock('Magento\View\Block\Html\Select') ->setName($type.'[country_id]') ->setId($type.':country_id') ->setTitle(__('Country')) @@ -233,7 +220,7 @@ abstract class AbstractOnepage extends \Magento\Core\Block\Template public function getRegionHtmlSelect($type) { - $select = $this->getLayout()->createBlock('Magento\Core\Block\Html\Select') + $select = $this->getLayout()->createBlock('Magento\View\Block\Html\Select') ->setName($type.'[region]') ->setId($type.':region') ->setTitle(__('State/Province')) diff --git a/app/code/Magento/Checkout/Block/Onepage/Billing.php b/app/code/Magento/Checkout/Block/Onepage/Billing.php index d06a8dab64033298ec465e639482ed575e9faece..416c6de0ffb6ac4afe3f58d3ff45cfcb6a09bf0d 100644 --- a/app/code/Magento/Checkout/Block/Onepage/Billing.php +++ b/app/code/Magento/Checkout/Block/Onepage/Billing.php @@ -56,32 +56,38 @@ class Billing extends \Magento\Checkout\Block\Onepage\AbstractOnepage protected $_addressFactory; /** - * @param \Magento\App\Cache\Type\Config $configCacheType + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context + * @param \Magento\App\Cache\Type\Config $configCacheType * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Checkout\Model\Session $resourceSession * @param \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollFactory * @param \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollFactory - * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Sales\Model\Quote\AddressFactory $addressFactory * @param array $data */ public function __construct( - \Magento\App\Cache\Type\Config $configCacheType, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, + \Magento\App\Cache\Type\Config $configCacheType, \Magento\Customer\Model\Session $customerSession, \Magento\Checkout\Model\Session $resourceSession, \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollFactory, \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollFactory, - \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Sales\Model\Quote\AddressFactory $addressFactory, array $data = array() ) { $this->_addressFactory = $addressFactory; - parent::__construct($configCacheType, $coreData, $context, $customerSession, $resourceSession, - $countryCollFactory, $regionCollFactory, $storeManager, $data); + parent::__construct( + $context, + $coreData, + $configCacheType, + $customerSession, + $resourceSession, + $countryCollFactory, + $regionCollFactory, + $data + ); } /** diff --git a/app/code/Magento/Checkout/Block/Onepage/Failure.php b/app/code/Magento/Checkout/Block/Onepage/Failure.php index 8832a192ddbc9c0049f7f5ebf2fda58f7f9c3c18..eb2d74dd9f045565946d742f74eae3cfd8f7fb6b 100644 --- a/app/code/Magento/Checkout/Block/Onepage/Failure.php +++ b/app/code/Magento/Checkout/Block/Onepage/Failure.php @@ -27,7 +27,7 @@ namespace Magento\Checkout\Block\Onepage; -class Failure extends \Magento\Core\Block\Template +class Failure extends \Magento\View\Block\Template { /** * @var \Magento\Checkout\Model\Session @@ -35,19 +35,19 @@ class Failure extends \Magento\Core\Block\Template protected $_checkoutSession; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Checkout\Model\Session $checkoutSession * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Checkout\Model\Session $checkoutSession, array $data = array() ) { $this->_checkoutSession = $checkoutSession; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } public function getRealOrderId() diff --git a/app/code/Magento/Checkout/Block/Onepage/Link.php b/app/code/Magento/Checkout/Block/Onepage/Link.php index 17e2215e6e1762a78d7d5dd9f4b78e960caf67d5..ae1c190e0607e9b02848ebe7984f31260fdab847 100644 --- a/app/code/Magento/Checkout/Block/Onepage/Link.php +++ b/app/code/Magento/Checkout/Block/Onepage/Link.php @@ -33,7 +33,7 @@ */ namespace Magento\Checkout\Block\Onepage; -class Link extends \Magento\Core\Block\Template +class Link extends \Magento\View\Block\Template { /** * @var \Magento\Checkout\Model\Session @@ -41,19 +41,19 @@ class Link extends \Magento\Core\Block\Template protected $_checkoutSession; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Checkout\Model\Session $checkoutSession * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Checkout\Model\Session $checkoutSession, array $data = array() ) { $this->_checkoutSession = $checkoutSession; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Checkout/Block/Onepage/Login.php b/app/code/Magento/Checkout/Block/Onepage/Login.php index 7c9f0e46a8ec135ffb18e865f4c0e3136a6a0d36..082db96ccc128668ed1ecb6a04a949a638f94a8a 100644 --- a/app/code/Magento/Checkout/Block/Onepage/Login.php +++ b/app/code/Magento/Checkout/Block/Onepage/Login.php @@ -44,33 +44,39 @@ class Login extends \Magento\Checkout\Block\Onepage\AbstractOnepage protected $_checkoutData = null; /** - * @param \Magento\App\Cache\Type\Config $configCacheType + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context + * @param \Magento\App\Cache\Type\Config $configCacheType * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Checkout\Model\Session $resourceSession * @param \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollFactory * @param \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollFactory - * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Checkout\Helper\Data $checkoutData * @param array $data */ public function __construct( - \Magento\App\Cache\Type\Config $configCacheType, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, + \Magento\App\Cache\Type\Config $configCacheType, \Magento\Customer\Model\Session $customerSession, \Magento\Checkout\Model\Session $resourceSession, \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollFactory, \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollFactory, - \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Checkout\Helper\Data $checkoutData, array $data = array() ) { $this->_checkoutData = $checkoutData; - parent::__construct($configCacheType, $coreData, $context, $customerSession, $resourceSession, - $countryCollFactory, $regionCollFactory, $storeManager, $data); + parent::__construct( + $context, + $coreData, + $configCacheType, + $customerSession, + $resourceSession, + $countryCollFactory, + $regionCollFactory, + $data + ); } protected function _construct() diff --git a/app/code/Magento/Checkout/Block/Onepage/Payment/Info.php b/app/code/Magento/Checkout/Block/Onepage/Payment/Info.php index a44351c4e74dabc11c35d2c474979ad5577fea78..1f38720086d38497fb87387900d29d8cc4d00f86 100644 --- a/app/code/Magento/Checkout/Block/Onepage/Payment/Info.php +++ b/app/code/Magento/Checkout/Block/Onepage/Payment/Info.php @@ -41,21 +41,21 @@ class Info extends \Magento\Payment\Block\Info\AbstractContainer protected $_checkoutSession; /** - * @param \Magento\Payment\Helper\Data $paymentData + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context + * @param \Magento\Payment\Helper\Data $paymentData * @param \Magento\Checkout\Model\Session $checkoutSession * @param array $data */ public function __construct( - \Magento\Payment\Helper\Data $paymentData, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, + \Magento\Payment\Helper\Data $paymentData, \Magento\Checkout\Model\Session $checkoutSession, array $data = array() ) { $this->_checkoutSession = $checkoutSession; - parent::__construct($paymentData, $coreData, $context,$data); + parent::__construct($context, $coreData, $paymentData, $data); } /** diff --git a/app/code/Magento/Checkout/Block/Onepage/Payment/Methods.php b/app/code/Magento/Checkout/Block/Onepage/Payment/Methods.php index 5dae3261a291b433d0875a4393da5262b25c4b54..4615084fab167c4766e4aabbedfc66e010633a08 100644 --- a/app/code/Magento/Checkout/Block/Onepage/Payment/Methods.php +++ b/app/code/Magento/Checkout/Block/Onepage/Payment/Methods.php @@ -42,19 +42,19 @@ class Methods extends \Magento\Payment\Block\Form\Container protected $_checkoutSession; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Checkout\Model\Session $checkoutSession * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Checkout\Model\Session $checkoutSession, array $data = array() ) { $this->_checkoutSession = $checkoutSession; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Checkout/Block/Onepage/Review/Info.php b/app/code/Magento/Checkout/Block/Onepage/Review/Info.php index 4eabc4048ca48a23d4fe9575e853b083bb55151e..935cc6b89df4b8962aab32fa835e50a9b9dc4a31 100644 --- a/app/code/Magento/Checkout/Block/Onepage/Review/Info.php +++ b/app/code/Magento/Checkout/Block/Onepage/Review/Info.php @@ -37,19 +37,19 @@ class Info extends \Magento\Sales\Block\Items\AbstractItems protected $_checkoutSession; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Checkout\Model\Session $checkoutSession * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Checkout\Model\Session $checkoutSession, array $data = array() ) { $this->_checkoutSession = $checkoutSession; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Checkout/Block/Onepage/Shipping.php b/app/code/Magento/Checkout/Block/Onepage/Shipping.php index 113a0ea8e7a2ac38895788399de4e345cdcc1cfc..01a26f747670c316172be0eb162a05e834161770 100644 --- a/app/code/Magento/Checkout/Block/Onepage/Shipping.php +++ b/app/code/Magento/Checkout/Block/Onepage/Shipping.php @@ -44,32 +44,38 @@ class Shipping extends \Magento\Checkout\Block\Onepage\AbstractOnepage protected $_addressFactory; /** - * @param \Magento\App\Cache\Type\Config $configCacheType + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context + * @param \Magento\App\Cache\Type\Config $configCacheType * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Checkout\Model\Session $resourceSession * @param \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollFactory * @param \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollFactory - * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Sales\Model\Quote\AddressFactory $addressFactory * @param array $data */ public function __construct( - \Magento\App\Cache\Type\Config $configCacheType, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, + \Magento\App\Cache\Type\Config $configCacheType, \Magento\Customer\Model\Session $customerSession, \Magento\Checkout\Model\Session $resourceSession, \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollFactory, \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollFactory, - \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Sales\Model\Quote\AddressFactory $addressFactory, array $data = array() ) { $this->_addressFactory = $addressFactory; - parent::__construct($configCacheType, $coreData, $context, $customerSession, $resourceSession, - $countryCollFactory, $regionCollFactory, $storeManager, $data); + parent::__construct( + $context, + $coreData, + $configCacheType, + $customerSession, + $resourceSession, + $countryCollFactory, + $regionCollFactory, + $data + ); } /** diff --git a/app/code/Magento/Checkout/Block/Onepage/Shipping/Method/Available.php b/app/code/Magento/Checkout/Block/Onepage/Shipping/Method/Available.php index d6886091e36ed305ce4638634ef89e2e91be2b76..42d925dd3da540a87255468f910227142143b37e 100644 --- a/app/code/Magento/Checkout/Block/Onepage/Shipping/Method/Available.php +++ b/app/code/Magento/Checkout/Block/Onepage/Shipping/Method/Available.php @@ -47,32 +47,38 @@ class Available extends \Magento\Checkout\Block\Onepage\AbstractOnepage protected $_taxData = null; /** - * @param \Magento\App\Cache\Type\Config $configCacheType + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context + * @param \Magento\App\Cache\Type\Config $configCacheType * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Checkout\Model\Session $resourceSession * @param \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollFactory * @param \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollFactory - * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Tax\Helper\Data $taxData * @param array $data */ public function __construct( - \Magento\App\Cache\Type\Config $configCacheType, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, + \Magento\App\Cache\Type\Config $configCacheType, \Magento\Customer\Model\Session $customerSession, \Magento\Checkout\Model\Session $resourceSession, \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollFactory, \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollFactory, - \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Tax\Helper\Data $taxData, array $data = array() ) { $this->_taxData = $taxData; - parent::__construct($configCacheType, $coreData, $context, $customerSession, $resourceSession, - $countryCollFactory, $regionCollFactory, $storeManager, $data); + parent::__construct( + $context, + $coreData, + $configCacheType, + $customerSession, + $resourceSession, + $countryCollFactory, + $regionCollFactory, + $data + ); } public function getShippingRates() diff --git a/app/code/Magento/Checkout/Block/Onepage/Success.php b/app/code/Magento/Checkout/Block/Onepage/Success.php index 48f6474e6b1e3e7290d9b8a494fccd1e561fb8c8..a5e27ecd562e3f7df1aca6c9941c60c55697c810 100644 --- a/app/code/Magento/Checkout/Block/Onepage/Success.php +++ b/app/code/Magento/Checkout/Block/Onepage/Success.php @@ -33,7 +33,7 @@ */ namespace Magento\Checkout\Block\Onepage; -class Success extends \Magento\Core\Block\Template +class Success extends \Magento\View\Block\Template { /** * @var \Magento\Checkout\Model\Session @@ -66,8 +66,8 @@ class Success extends \Magento\Core\Block\Template protected $_orderConfig; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Checkout\Model\Session $checkoutSession * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Sales\Model\OrderFactory $orderFactory @@ -77,8 +77,8 @@ class Success extends \Magento\Core\Block\Template * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Checkout\Model\Session $checkoutSession, \Magento\Customer\Model\Session $customerSession, \Magento\Sales\Model\OrderFactory $orderFactory, @@ -93,7 +93,7 @@ class Success extends \Magento\Core\Block\Template $this->_agreementFactory = $agreementFactory; $this->_profileCollFactory = $profileCollFactory; $this->_orderConfig = $orderConfig; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Checkout/Block/Success.php b/app/code/Magento/Checkout/Block/Success.php index 426bf4d2d5f8553752e2142185a7eb294b3f104a..efead2fd444ae689ebbfc743e2d63899378415f5 100644 --- a/app/code/Magento/Checkout/Block/Success.php +++ b/app/code/Magento/Checkout/Block/Success.php @@ -24,10 +24,9 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ - namespace Magento\Checkout\Block; -class Success extends \Magento\Core\Block\Template +class Success extends \Magento\View\Block\Template { /** * @var \Magento\Sales\Model\OrderFactory @@ -35,19 +34,19 @@ class Success extends \Magento\Core\Block\Template protected $_orderFactory; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Sales\Model\OrderFactory $orderFactory * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Sales\Model\OrderFactory $orderFactory, array $data = array() ) { $this->_orderFactory = $orderFactory; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Checkout/Controller/Action.php b/app/code/Magento/Checkout/Controller/Action.php index cfce1fb1133959c323507ddeb97d2e45c6ffa50a..134ef1794b111c0accde114e8b7b9e72ceb05f9d 100644 --- a/app/code/Magento/Checkout/Controller/Action.php +++ b/app/code/Magento/Checkout/Controller/Action.php @@ -30,7 +30,7 @@ */ namespace Magento\Checkout\Controller; -abstract class Action extends \Magento\Core\Controller\Front\Action +abstract class Action extends \Magento\App\Action\Action { /** * @var \Magento\Customer\Model\Session @@ -38,11 +38,11 @@ abstract class Action extends \Magento\Core\Controller\Front\Action protected $_customerSession; /** - * @param \Magento\Core\Controller\Varien\Action\Context $context + * @param \Magento\App\Action\Context $context * @param \Magento\Customer\Model\Session $customerSession */ public function __construct( - \Magento\Core\Controller\Varien\Action\Context $context, + \Magento\App\Action\Context $context, \Magento\Customer\Model\Session $customerSession ) { $this->_customerSession = $customerSession; @@ -70,7 +70,7 @@ abstract class Action extends \Magento\Core\Controller\Front\Action } if ($redirect) { $this->_redirect('customer/account/edit'); - $this->setFlag('', self::FLAG_NO_DISPATCH, true); + $this->_actionFlag->set('', self::FLAG_NO_DISPATCH, true); } return false; } diff --git a/app/code/Magento/Checkout/Controller/Adminhtml/Agreement.php b/app/code/Magento/Checkout/Controller/Adminhtml/Agreement.php index 8deba3850f3b0d972ad4cfa91bd944235333234b..533ad31afa8ae9c69d5051254b7b1c27261e2dcd 100644 --- a/app/code/Magento/Checkout/Controller/Adminhtml/Agreement.php +++ b/app/code/Magento/Checkout/Controller/Adminhtml/Agreement.php @@ -26,7 +26,7 @@ namespace Magento\Checkout\Controller\Adminhtml; -class Agreement extends \Magento\Backend\Controller\Adminhtml\Action +class Agreement extends \Magento\Backend\App\Action { /** * Core registry @@ -36,11 +36,11 @@ class Agreement extends \Magento\Backend\Controller\Adminhtml\Action protected $_coreRegistry = null; /** - * @param \Magento\Backend\Controller\Context $context + * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Core\Model\Registry $coreRegistry */ public function __construct( - \Magento\Backend\Controller\Context $context, + \Magento\Backend\App\Action\Context $context, \Magento\Core\Model\Registry $coreRegistry ) { $this->_coreRegistry = $coreRegistry; @@ -49,11 +49,13 @@ class Agreement extends \Magento\Backend\Controller\Adminhtml\Action public function indexAction() { - $this->_title(__('Terms and Conditions')); + $this->_title->add(__('Terms and Conditions')); $this->_initAction() - ->_addContent($this->getLayout()->createBlock('Magento\Checkout\Block\Adminhtml\Agreement')) - ->renderLayout(); + ->_addContent( + $this->_view->getLayout()->createBlock('Magento\Checkout\Block\Adminhtml\Agreement') + ); + $this->_view->renderLayout(); return $this; } @@ -64,7 +66,7 @@ class Agreement extends \Magento\Backend\Controller\Adminhtml\Action public function editAction() { - $this->_title(__('Terms and Conditions')); + $this->_title->add(__('Terms and Conditions')); $id = $this->getRequest()->getParam('id'); $agreementModel = $this->_objectManager->create('Magento\Checkout\Model\Agreement'); @@ -80,7 +82,7 @@ class Agreement extends \Magento\Backend\Controller\Adminhtml\Action } } - $this->_title($agreementModel->getId() ? $agreementModel->getName() : __('New Condition')); + $this->_title->add($agreementModel->getId() ? $agreementModel->getName() : __('New Condition')); $data = $this->_objectManager->get('Magento\Adminhtml\Model\Session')->getAgreementData(true); if (!empty($data)) { @@ -95,11 +97,11 @@ class Agreement extends \Magento\Backend\Controller\Adminhtml\Action $id ? __('Edit Condition') : __('New Condition') ) ->_addContent( - $this->getLayout() + $this->_view->getLayout() ->createBlock('Magento\Checkout\Block\Adminhtml\Agreement\Edit') ->setData('action', $this->getUrl('checkout/*/save')) - ) - ->renderLayout(); + ); + $this->_view->renderLayout(); } public function saveAction() @@ -123,7 +125,7 @@ class Agreement extends \Magento\Backend\Controller\Adminhtml\Action } $this->_objectManager->get('Magento\Adminhtml\Model\Session')->setAgreementData($postData); - $this->_redirectReferer(); + $this->getResponse()->setRedirect($this->_redirect->getRedirectUrl($this->getUrl('*'))); } } @@ -149,18 +151,18 @@ class Agreement extends \Magento\Backend\Controller\Adminhtml\Action $this->_objectManager->get('Magento\Adminhtml\Model\Session')->addError(__('Something went wrong while deleting this condition.')); } - $this->_redirectReferer(); + $this->getResponse()->setRedirect($this->_redirect->getRedirectUrl($this->getUrl('*'))); } /** * Initialize action * - * @return \Magento\Backend\Controller\Adminhtml\Action + * @return \Magento\Backend\App\Action */ protected function _initAction() { - $this->loadLayout() - ->_setActiveMenu('Magento_Checkout::sales_checkoutagreement') + $this->_view->loadLayout(); + $this->_setActiveMenu('Magento_Checkout::sales_checkoutagreement') ->_addBreadcrumb(__('Sales'), __('Sales')) ->_addBreadcrumb(__('Checkout Conditions'), __('Checkout Terms and Conditions')); return $this; diff --git a/app/code/Magento/Checkout/Controller/Cart.php b/app/code/Magento/Checkout/Controller/Cart.php index 9d439f87b2abf3dcfb9fba378be8780d329f6e9b..abc32c9735e44cbc199e6fe55e3cd6f389dd0a8e 100644 --- a/app/code/Magento/Checkout/Controller/Cart.php +++ b/app/code/Magento/Checkout/Controller/Cart.php @@ -30,16 +30,9 @@ namespace Magento\Checkout\Controller; class Cart - extends \Magento\Core\Controller\Front\Action + extends \Magento\App\Action\Action implements \Magento\Catalog\Controller\Product\View\ViewInterface { - /** - * Action list where need check enabled cookie - * - * @var array - */ - protected $_cookieCheckActions = array('add'); - /** * @var \Magento\Core\Model\Store\ConfigInterface */ @@ -51,18 +44,26 @@ class Cart protected $_checkoutSession; /** - * @param \Magento\Core\Controller\Varien\Action\Context $context + * @var \Magento\Core\Model\StoreManagerInterface + */ + protected $_storeManager; + + /** + * @param \Magento\App\Action\Context $context * @param \Magento\Core\Model\Store\ConfigInterface $storeConfig * @param \Magento\Checkout\Model\Session $checkoutSession + * @param \Magento\Core\Model\StoreManagerInterface $storeManager */ public function __construct( - \Magento\Core\Controller\Varien\Action\Context $context, + \Magento\App\Action\Context $context, \Magento\Core\Model\Store\ConfigInterface $storeConfig, - \Magento\Checkout\Model\Session $checkoutSession + \Magento\Checkout\Model\Session $checkoutSession, + \Magento\Core\Model\StoreManagerInterface $storeManager ) { - parent::__construct($context); $this->_storeConfig = $storeConfig; $this->_checkoutSession = $checkoutSession; + $this->_storeManager = $storeManager; + parent::__construct($context); } /** @@ -93,17 +94,17 @@ class Cart protected function _goBack() { $returnUrl = $this->getRequest()->getParam('return_url'); - if ($returnUrl && $this->_isUrlInternal($returnUrl)) { + if ($returnUrl && $this->_isInternalUrl($returnUrl)) { $this->_checkoutSession->getMessages(true); $this->getResponse()->setRedirect($returnUrl); } elseif (!$this->_storeConfig->getConfig('checkout/cart/redirect_to_cart') && !$this->getRequest()->getParam('in_cart') - && $backUrl = $this->_getRefererUrl() + && $backUrl = $this->_redirect->getRefererUrl() ) { $this->getResponse()->setRedirect($backUrl); } else { if (($this->getRequest()->getActionName() == 'add') && !$this->getRequest()->getParam('in_cart')) { - $this->_checkoutSession->setContinueShoppingUrl($this->_getRefererUrl()); + $this->_checkoutSession->setContinueShoppingUrl($this->_redirect->getRefererUrl()); } $this->_redirect('checkout/cart'); } @@ -173,12 +174,13 @@ class Cart $this->_checkoutSession->setCartWasUpdated(true); \Magento\Profiler::start(__METHOD__ . 'cart_display'); - $this - ->loadLayout() - ->_initLayoutMessages('Magento\Checkout\Model\Session') - ->_initLayoutMessages('Magento\Catalog\Model\Session') - ->getLayout()->getBlock('head')->setTitle(__('Shopping Cart')); - $this->renderLayout(); + $messageStores = array('Magento\Checkout\Model\Session', 'Magento\Catalog\Model\Session'); + + $this->_view->loadLayout(); + $layout = $this->_view->getLayout(); + $layout->initMessages($messageStores); + $layout->getBlock('head')->setTitle(__('Shopping Cart')); + $this->_view->renderLayout(); \Magento\Profiler::stop(__METHOD__ . 'cart_display'); } @@ -237,7 +239,9 @@ class Cart } else { $messages = array_unique(explode("\n", $e->getMessage())); foreach ($messages as $message) { - $this->_checkoutSession->addError($this->_objectManager->get('Magento\Escaper')->escapeHtml($message)); + $this->_checkoutSession->addError( + $this->_objectManager->get('Magento\Escaper')->escapeHtml($message) + ); } } @@ -245,7 +249,8 @@ class Cart if ($url) { $this->getResponse()->setRedirect($url); } else { - $this->_redirectReferer($this->_objectManager->get('Magento\Checkout\Helper\Cart')->getCartUrl()); + $cartUrl = $this->_objectManager->get('Magento\Checkout\Helper\Cart')->getCartUrl(); + $this->getResponse()->setRedirect($this->_redirect->getRedirectUrl($cartUrl)); } } catch (\Exception $e) { $this->_checkoutSession->addException($e, __('We cannot add this item to your shopping cart')); @@ -387,7 +392,8 @@ class Cart if ($url) { $this->getResponse()->setRedirect($url); } else { - $this->_redirectReferer($this->_objectManager->get('Magento\Checkout\Helper\Cart')->getCartUrl()); + $cartUrl = $this->_objectManager->get('Magento\Checkout\Helper\Cart')->getCartUrl(); + $this->getResponse()->setRedirect($this->_redirect->getRedirectUrl($cartUrl)); } } catch (\Exception $e) { $this->_checkoutSession->addException($e, __('We cannot update the item.')); @@ -468,7 +474,7 @@ class Cart } /** - * Delete shoping cart item action + * Delete shopping cart item action */ public function deleteAction() { @@ -482,7 +488,8 @@ class Cart $this->_objectManager->get('Magento\Logger')->logException($e); } } - $this->_redirectReferer($this->_objectManager->create('Magento\UrlInterface')->getUrl('*/*')); + $defaultUrl = $this->_objectManager->create('Magento\UrlInterface')->getUrl('*/*'); + $this->getResponse()->setRedirect($this->_redirect->getRedirectUrl($defaultUrl)); } /** @@ -529,10 +536,9 @@ class Cart return; } - $couponCode = (string) $this->getRequest()->getParam('coupon_code'); - if ($this->getRequest()->getParam('remove') == 1) { - $couponCode = ''; - } + $couponCode = $this->getRequest()->getParam('remove') == 1 + ? '' + : trim($this->getRequest()->getParam('coupon_code')); $oldCouponCode = $this->_getQuote()->getCouponCode(); if (!strlen($couponCode) && !strlen($oldCouponCode)) { @@ -572,4 +578,26 @@ class Cart $this->_goBack(); } + + /** + * check if URL corresponds store + * + * @param string $url + * @return bool + */ + protected function _isInternalUrl($url) + { + if (strpos($url, 'http') === false) { + return false; + } + + /** + * Url must start from base secure or base unsecure url + */ + /** @var $store \Magento\Core\Model\Store */ + $store = $this->_storeManager->getStore(); + $unsecure = (strpos($url, $store->getBaseUrl()) === 0); + $secure = (strpos($url, $store->getBaseUrl($store::URL_TYPE_LINK, true)) === 0); + return $unsecure || $secure; + } } diff --git a/app/code/Magento/Checkout/Controller/Index.php b/app/code/Magento/Checkout/Controller/Index.php index 848da112a7369a6156ad42796cb915496e3d432d..a11df22a6d7f773679f3577b6db5df6750225acf 100644 --- a/app/code/Magento/Checkout/Controller/Index.php +++ b/app/code/Magento/Checkout/Controller/Index.php @@ -26,7 +26,7 @@ namespace Magento\Checkout\Controller; -class Index extends \Magento\Core\Controller\Front\Action +class Index extends \Magento\App\Action\Action { function indexAction() { diff --git a/app/code/Magento/Checkout/Controller/Multishipping.php b/app/code/Magento/Checkout/Controller/Multishipping.php index 29da8e0daf564f8f93fad914989555172145c489..740efd0d365214f9cc4f4f212c849e25b8258abd 100644 --- a/app/code/Magento/Checkout/Controller/Multishipping.php +++ b/app/code/Magento/Checkout/Controller/Multishipping.php @@ -31,6 +31,9 @@ */ namespace Magento\Checkout\Controller; +use Magento\App\Action\NotFoundException; +use Magento\App\RequestInterface; + class Multishipping extends \Magento\Checkout\Controller\Action { /** @@ -74,21 +77,19 @@ class Multishipping extends \Magento\Checkout\Controller\Action } /** - * Action predispatch - * - * Check customer authentication for some actions + * Dispatch request * - * @return \Magento\Checkout\Controller\Multishipping + * @param RequestInterface $request + * @return $this|mixed */ - public function preDispatch() + public function dispatch(RequestInterface $request) { - parent::preDispatch(); - - if ($this->getFlag('', 'redirectLogin')) { - return $this; + $this->_request = $request; + if ($this->_actionFlag->get('', 'redirectLogin')) { + return parent::dispatch($request); } - $action = $this->getRequest()->getActionName(); + $action = $request->getActionName(); $checkoutSessionQuote = $this->_getCheckoutSession()->getQuote(); /** @@ -103,22 +104,22 @@ class Multishipping extends \Magento\Checkout\Controller\Action && !in_array($action, array('login', 'register', 'success')) ) { $this->_redirect('*/*/index'); - $this->setFlag('', self::FLAG_NO_DISPATCH, true); - return $this; + $this->_actionFlag->set('', self::FLAG_NO_DISPATCH, true); + return parent::dispatch($request); } if (!in_array($action, array('login', 'register'))) { $customerSession = $this->_objectManager->get('Magento\Customer\Model\Session'); if (!$customerSession->authenticate($this, $this->_getHelper()->getMSLoginUrl())) { - $this->setFlag('', self::FLAG_NO_DISPATCH, true); + $this->_actionFlag->set('', self::FLAG_NO_DISPATCH, true); } if (!$this->_objectManager->get('Magento\Checkout\Helper\Data')->isMultishippingCheckoutAvailable()) { $error = $this->_getCheckout()->getMinimumAmountError(); $this->_getCheckoutSession()->addError($error); - $this->_redirectUrl($this->_getHelper()->getCartUrl()); - $this->setFlag('', self::FLAG_NO_DISPATCH, true); - return $this; + $this->getResponse()->setRedirect($this->_getHelper()->getCartUrl()); + $this->_actionFlag->set('', self::FLAG_NO_DISPATCH, true); + return parent::dispatch($request); } } @@ -129,22 +130,22 @@ class Multishipping extends \Magento\Checkout\Controller\Action if ($this->_getCheckoutSession()->getCartWasUpdated(true) && !in_array($action, array('index', 'login', 'register', 'addresses', 'success')) ) { - $this->_redirectUrl($this->_getHelper()->getCartUrl()); - $this->setFlag('', self::FLAG_NO_DISPATCH, true); + $this->getResponse()->setRedirect($this->_getHelper()->getCartUrl()); + $this->_actionFlag->set('', self::FLAG_NO_DISPATCH, true); + return parent::dispatch($request); } if ($action == 'success' && $this->_getCheckout()->getCheckoutSession()->getDisplaySuccess(true)) { - return $this; + return parent::dispatch($request); } $quote = $this->_getCheckout()->getQuote(); if (!$quote->hasItems() || $quote->getHasError() || $quote->isVirtual()) { - $this->_redirectUrl($this->_getHelper()->getCartUrl()); - $this->setFlag('', self::FLAG_NO_DISPATCH, true); - return; + $this->getResponse()->setRedirect($this->_getHelper()->getCartUrl()); + $this->_actionFlag->set('', self::FLAG_NO_DISPATCH, true); } - return $this; + return parent::dispatch($request); } /** @@ -166,15 +167,15 @@ class Multishipping extends \Magento\Checkout\Controller\Action return; } - $this->loadLayout(); - $this->_initLayoutMessages('Magento\Customer\Model\Session'); + $this->_view->loadLayout(); + $this->_view->getLayout()->initMessages('Magento\Customer\Model\Session'); // set account create url - $loginForm = $this->getLayout()->getBlock('customer_form_login'); + $loginForm = $this->_view->getLayout()->getBlock('customer_form_login'); if ($loginForm) { $loginForm->setCreateAccountUrl($this->_getHelper()->getMSRegisterUrl()); } - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -183,14 +184,14 @@ class Multishipping extends \Magento\Checkout\Controller\Action public function registerAction() { if ($this->_objectManager->get('Magento\Customer\Model\Session')->isLoggedIn()) { - $this->_redirectUrl($this->_getHelper()->getMSCheckoutUrl()); + $this->getResponse()->setRedirect($this->_getHelper()->getMSCheckoutUrl()); return; } - $this->loadLayout(); - $this->_initLayoutMessages('Magento\Customer\Model\Session'); + $this->_view->loadLayout(); + $this->_view->getLayout()->initMessages('Magento\Customer\Model\Session'); - $registerForm = $this->getLayout()->getBlock('customer_form_register'); + $registerForm = $this->_view->getLayout()->getBlock('customer_form_register'); if ($registerForm) { $registerForm->setShowAddressFields(true) ->setBackUrl($this->_getHelper()->getMSLoginUrl()) @@ -198,7 +199,7 @@ class Multishipping extends \Magento\Checkout\Controller\Action ->setErrorUrl($this->_getHelper()->getCurrentUrl()); } - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -223,10 +224,10 @@ class Multishipping extends \Magento\Checkout\Controller\Action $message = $this->_getCheckout()->getMinimumAmountDescription(); $this->_getCheckout()->getCheckoutSession()->addNotice($message); } - $this->loadLayout(); - $this->_initLayoutMessages('Magento\Customer\Model\Session'); - $this->_initLayoutMessages('Magento\Checkout\Model\Session'); - $this->renderLayout(); + $this->_view->loadLayout(); + $messageStores = array('Magento\Customer\Model\Session', 'Magento\Checkout\Model\Session'); + $this->_view->getLayout()->initMessages($messageStores); + $this->_view->renderLayout(); } /** @@ -326,10 +327,10 @@ class Multishipping extends \Magento\Checkout\Controller\Action $this->_getState()->setActiveStep( \Magento\Checkout\Model\Type\Multishipping\State::STEP_SHIPPING ); - $this->loadLayout(); - $this->_initLayoutMessages('Magento\Customer\Model\Session'); - $this->_initLayoutMessages('Magento\Checkout\Model\Session'); - $this->renderLayout(); + $this->_view->loadLayout(); + $messageStores = array('Magento\Customer\Model\Session', 'Magento\Checkout\Model\Session'); + $this->_view->getLayout()->initMessages($messageStores); + $this->_view->renderLayout(); } public function backToShippingAction() @@ -387,10 +388,10 @@ class Multishipping extends \Magento\Checkout\Controller\Action \Magento\Checkout\Model\Type\Multishipping\State::STEP_BILLING ); - $this->loadLayout(); - $this->_initLayoutMessages('Magento\Customer\Model\Session'); - $this->_initLayoutMessages('Magento\Checkout\Model\Session'); - $this->renderLayout(); + $this->_view->loadLayout(); + $messageStores = array('Magento\Customer\Model\Session', 'Magento\Checkout\Model\Session'); + $this->_view->getLayout()->initMessages($messageStores); + $this->_view->renderLayout(); } /** @@ -445,10 +446,10 @@ class Multishipping extends \Magento\Checkout\Controller\Action \Magento\Checkout\Model\Type\Multishipping\State::STEP_BILLING ); - $this->loadLayout(); - $this->_initLayoutMessages('Magento\Checkout\Model\Session'); - $this->_initLayoutMessages('Magento\Customer\Model\Session'); - $this->renderLayout(); + $this->_view->loadLayout(); + $messageStores = array('Magento\Customer\Model\Session', 'Magento\Checkout\Model\Session'); + $this->_view->getLayout()->initMessages($messageStores); + $this->_view->renderLayout(); } catch (\Magento\Core\Exception $e) { $this->_getCheckoutSession()->addError($e->getMessage()); $this->_redirect('*/*/billing'); @@ -536,11 +537,11 @@ class Multishipping extends \Magento\Checkout\Controller\Action return $this; } - $this->loadLayout(); - $this->_initLayoutMessages('Magento\Checkout\Model\Session'); + $this->_view->loadLayout(); + $this->_view->getLayout()->initMessages('Magento\Checkout\Model\Session'); $ids = $this->_getCheckout()->getOrderIds(); $this->_eventManager->dispatch('checkout_multishipping_controller_success_action', array('order_ids' => $ids)); - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -549,7 +550,7 @@ class Multishipping extends \Magento\Checkout\Controller\Action */ public function redirectLogin() { - $this->setFlag('', 'no-dispatch', true); + $this->_actionFlag->set('', 'no-dispatch', true); $url = $this->_objectManager->create('Magento\UrlInterface') ->getUrl('*/*', array('_secure' => true)); $this->_objectManager->get('Magento\Customer\Model\Session')->setBeforeAuthUrl($url); @@ -561,6 +562,6 @@ class Multishipping extends \Magento\Checkout\Controller\Action ) ); - $this->setFlag('', 'redirectLogin', true); + $this->_actionFlag->set('', 'redirectLogin', true); } } diff --git a/app/code/Magento/Checkout/Controller/Multishipping/Address.php b/app/code/Magento/Checkout/Controller/Multishipping/Address.php index cebec53488063838b38a3e0708820b6430574f46..7bf410342f9a89d44e7d8a3b99ca098d47527e83 100644 --- a/app/code/Magento/Checkout/Controller/Multishipping/Address.php +++ b/app/code/Magento/Checkout/Controller/Multishipping/Address.php @@ -33,25 +33,8 @@ */ namespace Magento\Checkout\Controller\Multishipping; -class Address extends \Magento\Core\Controller\Front\Action +class Address extends \Magento\App\Action\Action { - /** - * @var \Magento\UrlInterface - */ - protected $_urlBuilder; - - /** - * @param \Magento\Core\Controller\Varien\Action\Context $context - * @param \Magento\UrlInterface $urlBuilder - */ - public function __construct( - \Magento\Core\Controller\Varien\Action\Context $context, - \Magento\UrlInterface $urlBuilder - ) { - $this->_urlBuilder = $urlBuilder; - parent::__construct($context); - } - /** * Retrieve multishipping checkout model * @@ -79,25 +62,24 @@ class Address extends \Magento\Core\Controller\Front\Action public function newShippingAction() { $this->_getState()->setActiveStep(\Magento\Checkout\Model\Type\Multishipping\State::STEP_SELECT_ADDRESSES); - $this->loadLayout(); - $this->_initLayoutMessages('Magento\Customer\Model\Session'); - if ($addressForm = $this->getLayout()->getBlock('customer_address_edit')) { + $this->_view->loadLayout(); + $this->_view->getLayout()->initMessages('Magento\Customer\Model\Session'); + if ($addressForm = $this->_view->getLayout()->getBlock('customer_address_edit')) { $addressForm->setTitle(__('Create Shipping Address')) - ->setSuccessUrl($this->_urlBuilder->getUrl('*/*/shippingSaved')) - ->setErrorUrl($this->_urlBuilder->getUrl('*/*/*')); + ->setSuccessUrl($this->_url->getUrl('*/*/shippingSaved')) + ->setErrorUrl($this->_url->getUrl('*/*/*')); - if ($headBlock = $this->getLayout()->getBlock('head')) { + if ($headBlock = $this->_view->getLayout()->getBlock('head')) { $headBlock->setTitle($addressForm->getTitle() . ' - ' . $headBlock->getDefaultTitle()); } if ($this->_getCheckout()->getCustomerDefaultShippingAddress()) { - $addressForm->setBackUrl($this->_urlBuilder->getUrl('*/multishipping/addresses')); - } - else { - $addressForm->setBackUrl($this->_urlBuilder->getUrl('*/cart/')); + $addressForm->setBackUrl($this->_url->getUrl('*/multishipping/addresses')); + } else { + $addressForm->setBackUrl($this->_url->getUrl('*/cart/')); } } - $this->renderLayout(); + $this->_view->renderLayout(); } public function shippingSavedAction() @@ -114,22 +96,22 @@ class Address extends \Magento\Core\Controller\Front\Action public function editShippingAction() { $this->_getState()->setActiveStep(\Magento\Checkout\Model\Type\Multishipping\State::STEP_SHIPPING); - $this->loadLayout(); - $this->_initLayoutMessages('Magento\Customer\Model\Session'); - if ($addressForm = $this->getLayout()->getBlock('customer_address_edit')) { + $this->_view->loadLayout(); + $this->_view->getLayout()->initMessages('Magento\Customer\Model\Session'); + if ($addressForm = $this->_view->getLayout()->getBlock('customer_address_edit')) { $addressForm->setTitle(__('Edit Shipping Address')) - ->setSuccessUrl($this->_urlBuilder->getUrl('*/*/editShippingPost', array('id'=>$this->getRequest()->getParam('id')))) - ->setErrorUrl($this->_urlBuilder->getUrl('*/*/*')); + ->setSuccessUrl($this->_url->getUrl('*/*/editShippingPost', array('id'=>$this->getRequest()->getParam('id')))) + ->setErrorUrl($this->_url->getUrl('*/*/*')); - if ($headBlock = $this->getLayout()->getBlock('head')) { + if ($headBlock = $this->_view->getLayout()->getBlock('head')) { $headBlock->setTitle($addressForm->getTitle() . ' - ' . $headBlock->getDefaultTitle()); } if ($this->_getCheckout()->getCustomerDefaultShippingAddress()) { - $addressForm->setBackUrl($this->_urlBuilder->getUrl('*/multishipping/shipping')); + $addressForm->setBackUrl($this->_url->getUrl('*/multishipping/shipping')); } } - $this->renderLayout(); + $this->_view->renderLayout(); } public function editShippingPostAction() @@ -144,44 +126,44 @@ class Address extends \Magento\Core\Controller\Front\Action public function selectBillingAction() { $this->_getState()->setActiveStep(\Magento\Checkout\Model\Type\Multishipping\State::STEP_BILLING); - $this->loadLayout(); - $this->_initLayoutMessages('Magento\Customer\Model\Session'); - $this->_initLayoutMessages('Magento\Checkout\Model\Session'); - $this->renderLayout(); + $this->_view->loadLayout(); + $messageStores = array('Magento\Customer\Model\Session', 'Magento\Catalog\Model\Session'); + $this->_view->getLayout()->initMessages($messageStores); + $this->_view->renderLayout(); } public function newBillingAction() { - $this->loadLayout(); - $this->_initLayoutMessages('Magento\Customer\Model\Session'); - if ($addressForm = $this->getLayout()->getBlock('customer_address_edit')) { + $this->_view->loadLayout(); + $this->_view->getLayout()->initMessages('Magento\Customer\Model\Session'); + if ($addressForm = $this->_view->getLayout()->getBlock('customer_address_edit')) { $addressForm->setTitle(__('Create Billing Address')) - ->setSuccessUrl($this->_urlBuilder->getUrl('*/*/selectBilling')) - ->setErrorUrl($this->_urlBuilder->getUrl('*/*/*')) - ->setBackUrl($this->_urlBuilder->getUrl('*/*/selectBilling')); + ->setSuccessUrl($this->_url->getUrl('*/*/selectBilling')) + ->setErrorUrl($this->_url->getUrl('*/*/*')) + ->setBackUrl($this->_url->getUrl('*/*/selectBilling')); - if ($headBlock = $this->getLayout()->getBlock('head')) { + if ($headBlock = $this->_view->getLayout()->getBlock('head')) { $headBlock->setTitle($addressForm->getTitle() . ' - ' . $headBlock->getDefaultTitle()); } } - $this->renderLayout(); + $this->_view->renderLayout(); } public function editAddressAction() { - $this->loadLayout(); - $this->_initLayoutMessages('Magento\Customer\Model\Session'); - if ($addressForm = $this->getLayout()->getBlock('customer_address_edit')) { + $this->_view->loadLayout(); + $this->_view->getLayout()->initMessages('Magento\Customer\Model\Session'); + if ($addressForm = $this->_view->getLayout()->getBlock('customer_address_edit')) { $addressForm->setTitle(__('Edit Address')) - ->setSuccessUrl($this->_urlBuilder->getUrl('*/*/selectBilling')) - ->setErrorUrl($this->_urlBuilder->getUrl('*/*/*', array('id'=>$this->getRequest()->getParam('id')))) - ->setBackUrl($this->_urlBuilder->getUrl('*/*/selectBilling')); + ->setSuccessUrl($this->_url->getUrl('*/*/selectBilling')) + ->setErrorUrl($this->_url->getUrl('*/*/*', array('id'=>$this->getRequest()->getParam('id')))) + ->setBackUrl($this->_url->getUrl('*/*/selectBilling')); - if ($headBlock = $this->getLayout()->getBlock('head')) { + if ($headBlock = $this->_view->getLayout()->getBlock('head')) { $headBlock->setTitle($addressForm->getTitle() . ' - ' . $headBlock->getDefaultTitle()); } } - $this->renderLayout(); + $this->_view->renderLayout(); } public function editBillingAction() @@ -189,18 +171,18 @@ class Address extends \Magento\Core\Controller\Front\Action $this->_getState()->setActiveStep( \Magento\Checkout\Model\Type\Multishipping\State::STEP_BILLING ); - $this->loadLayout(); - $this->_initLayoutMessages('Magento\Customer\Model\Session'); - if ($addressForm = $this->getLayout()->getBlock('customer_address_edit')) { + $this->_view->loadLayout(); + $this->_view->getLayout()->initMessages('Magento\Customer\Model\Session'); + if ($addressForm = $this->_view->getLayout()->getBlock('customer_address_edit')) { $addressForm->setTitle(__('Edit Billing Address')) - ->setSuccessUrl($this->_urlBuilder->getUrl('*/*/saveBilling', array('id'=>$this->getRequest()->getParam('id')))) - ->setErrorUrl($this->_urlBuilder->getUrl('*/*/*', array('id'=>$this->getRequest()->getParam('id')))) - ->setBackUrl($this->_urlBuilder->getUrl('*/multishipping/overview')); - if ($headBlock = $this->getLayout()->getBlock('head')) { + ->setSuccessUrl($this->_url->getUrl('*/*/saveBilling', array('id'=>$this->getRequest()->getParam('id')))) + ->setErrorUrl($this->_url->getUrl('*/*/*', array('id'=>$this->getRequest()->getParam('id')))) + ->setBackUrl($this->_url->getUrl('*/multishipping/overview')); + if ($headBlock = $this->_view->getLayout()->getBlock('head')) { $headBlock->setTitle($addressForm->getTitle() . ' - ' . $headBlock->getDefaultTitle()); } } - $this->renderLayout(); + $this->_view->renderLayout(); } public function setBillingAction() diff --git a/app/code/Magento/Checkout/Controller/Onepage.php b/app/code/Magento/Checkout/Controller/Onepage.php index 0a538f3918e5817a08b4fcc8c54dec8d6930b714..f74a3a11743ea06535c70e0cfbddd026df9b907d 100644 --- a/app/code/Magento/Checkout/Controller/Onepage.php +++ b/app/code/Magento/Checkout/Controller/Onepage.php @@ -26,6 +26,9 @@ namespace Magento\Checkout\Controller; +use Magento\App\Action\NotFoundException; +use Magento\App\RequestInterface; + class Onepage extends \Magento\Checkout\Controller\Action { /** @@ -50,12 +53,12 @@ class Onepage extends \Magento\Checkout\Controller\Action protected $_coreRegistry = null; /** - * @param \Magento\Core\Controller\Varien\Action\Context $context + * @param \Magento\App\Action\Context $context * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Core\Model\Registry $coreRegistry */ public function __construct( - \Magento\Core\Controller\Varien\Action\Context $context, + \Magento\App\Action\Context $context, \Magento\Customer\Model\Session $customerSession, \Magento\Core\Model\Registry $coreRegistry ) { @@ -64,11 +67,15 @@ class Onepage extends \Magento\Checkout\Controller\Action } /** - * @return \Magento\Checkout\Controller\Onepage|null + * Dispatch request + * + * @param RequestInterface $request + * @return mixed + * @throws \Magento\App\Action\NotFoundException */ - public function preDispatch() + public function dispatch(RequestInterface $request) { - parent::preDispatch(); + $this->_request = $request; $this->_preDispatchValidateCustomer(); $checkoutSessionQuote = $this->_objectManager->get('Magento\Checkout\Model\Session')->getQuote(); @@ -78,12 +85,9 @@ class Onepage extends \Magento\Checkout\Controller\Action } if (!$this->_canShowForUnregisteredUsers()) { - $this->norouteAction(); - $this->setFlag('', self::FLAG_NO_DISPATCH, true); - return null; + throw new NotFoundException(); } - - return $this; + return parent::dispatch($request); } /** @@ -129,7 +133,7 @@ class Onepage extends \Magento\Checkout\Controller\Action */ protected function _getHtmlByHandle($handle) { - $layout = $this->getLayout(); + $layout = $this->_view->getLayout(); $layout->getUpdate()->addPageHandles(array($handle)); $layout->getUpdate()->load(); $layout->generateXml(); @@ -217,10 +221,11 @@ class Onepage extends \Magento\Checkout\Controller\Action ->getUrl('*/*/*', array('_secure'=>true)); $this->_objectManager->get('Magento\Customer\Model\Session')->setBeforeAuthUrl($currentUrl); $this->getOnepage()->initCheckout(); - $this->loadLayout(); - $this->_initLayoutMessages('Magento\Customer\Model\Session'); - $this->getLayout()->getBlock('head')->setTitle(__('Checkout')); - $this->renderLayout(); + $this->_view->loadLayout(); + $layout = $this->_view->getLayout(); + $layout->initMessages('Magento\Customer\Model\Session'); + $layout->getBlock('head')->setTitle(__('Checkout')); + $this->_view->renderLayout(); } /** @@ -231,9 +236,9 @@ class Onepage extends \Magento\Checkout\Controller\Action if ($this->_expireAjax()) { return; } - $this->addPageLayoutHandles(); - $this->loadLayout(false); - $this->renderLayout(); + $this->_view->addPageLayoutHandles(); + $this->_view->loadLayout(false); + $this->_view->renderLayout(); } public function shippingMethodAction() @@ -241,9 +246,9 @@ class Onepage extends \Magento\Checkout\Controller\Action if ($this->_expireAjax()) { return; } - $this->addPageLayoutHandles(); - $this->loadLayout(false); - $this->renderLayout(); + $this->_view->addPageLayoutHandles(); + $this->_view->loadLayout(false); + $this->_view->renderLayout(); } public function reviewAction() @@ -251,9 +256,9 @@ class Onepage extends \Magento\Checkout\Controller\Action if ($this->_expireAjax()) { return; } - $this->addPageLayoutHandles(); - $this->loadLayout(false); - $this->renderLayout(); + $this->_view->addPageLayoutHandles(); + $this->_view->loadLayout(false); + $this->_view->renderLayout(); } /** @@ -276,12 +281,12 @@ class Onepage extends \Magento\Checkout\Controller\Action } $session->clear(); - $this->loadLayout(); - $this->_initLayoutMessages('Magento\Checkout\Model\Session'); + $this->_view->loadLayout(); + $this->_view->getLayout()->initMessages('Magento\Checkout\Model\Session'); $this->_eventManager->dispatch( 'checkout_onepage_controller_success_action', array('order_ids' => array($lastOrderId)) ); - $this->renderLayout(); + $this->_view->renderLayout(); } public function failureAction() @@ -294,8 +299,8 @@ class Onepage extends \Magento\Checkout\Controller\Action return; } - $this->loadLayout(); - $this->renderLayout(); + $this->_view->loadLayout(); + $this->_view->renderLayout(); } @@ -620,18 +625,6 @@ class Onepage extends \Magento\Checkout\Controller\Action $this->getResponse()->setBody($this->_objectManager->get('Magento\Core\Helper\Data')->jsonEncode($result)); } - /** - * Filtering posted data. Converting localized data if needed - * - * @param array - * @return array - */ - protected function _filterPostData($data) - { - $data = $this->_filterDates($data, array('dob')); - return $data; - } - /** * Check can page show for unregistered users * diff --git a/app/code/Magento/Checkout/Helper/Cart.php b/app/code/Magento/Checkout/Helper/Cart.php index f25f095da6bd24b4f76ae71357a7e8ec6560bcb3..eef0d2f0c9425e85e3c280a7a0a0b8d70561a8c5 100644 --- a/app/code/Magento/Checkout/Helper/Cart.php +++ b/app/code/Magento/Checkout/Helper/Cart.php @@ -65,16 +65,16 @@ class Cart extends \Magento\Core\Helper\Url protected $_checkoutSession; /** - * @param \Magento\Core\Helper\Context $context - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\App\Helper\Context $context + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Core\Model\Store\Config $coreStoreConfig * @param \Magento\Checkout\Model\Cart $checkoutCart * @param \Magento\Checkout\Model\Session $checkoutSession */ public function __construct( - \Magento\Core\Helper\Context $context, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\App\Helper\Context $context, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Helper\Data $coreData, \Magento\Core\Model\Store\Config $coreStoreConfig, \Magento\Checkout\Model\Cart $checkoutCart, @@ -107,7 +107,7 @@ class Cart extends \Magento\Core\Helper\Url public function getAddUrl($product, $additional = array()) { $continueUrl = $this->_coreData->urlEncode($this->getCurrentUrl()); - $urlParamName = \Magento\Core\Controller\Front\Action::PARAM_NAME_URL_ENCODED; + $urlParamName = \Magento\App\Action\Action::PARAM_NAME_URL_ENCODED; $routeParams = array( $urlParamName => $continueUrl, @@ -141,7 +141,7 @@ class Cart extends \Magento\Core\Helper\Url { $params = array( 'id'=>$item->getId(), - \Magento\Core\Controller\Front\Action::PARAM_NAME_BASE64_URL => $this->getCurrentBase64Url() + \Magento\App\Action\Action::PARAM_NAME_BASE64_URL => $this->getCurrentBase64Url() ); return $this->_getUrl('checkout/cart/delete', $params); } diff --git a/app/code/Magento/Checkout/Helper/Data.php b/app/code/Magento/Checkout/Helper/Data.php index ba27c5b1dc1e2d29a8764336eaec876a05f6465d..531760bba5ff2f142d6ad10a66ba03c4ed566c6f 100644 --- a/app/code/Magento/Checkout/Helper/Data.php +++ b/app/code/Magento/Checkout/Helper/Data.php @@ -31,20 +31,13 @@ */ namespace Magento\Checkout\Helper; -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { const XML_PATH_GUEST_CHECKOUT = 'checkout/options/guest_checkout'; const XML_PATH_CUSTOMER_MUST_BE_LOGGED = 'checkout/options/customer_must_be_logged'; protected $_agreements = null; - /** - * Core event manager proxy - * - * @var \Magento\Event\ManagerInterface - */ - protected $_eventManager = null; - /** * Core store config * @@ -73,31 +66,28 @@ class Data extends \Magento\Core\Helper\AbstractHelper protected $_agreementCollFactory; /** - * @var \Magento\Core\Model\Email\TemplateFactory + * @var \Magento\Email\Model\TemplateFactory */ protected $_emailTemplFactory; /** - * @param \Magento\Event\ManagerInterface $eventManager - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\Store\Config $coreStoreConfig * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Checkout\Model\Session $checkoutSession * @param \Magento\Core\Model\LocaleInterface $locale * @param \Magento\Checkout\Model\Resource\Agreement\CollectionFactory $agreementCollFactory - * @param \Magento\Core\Model\Email\TemplateFactory $emailTemplFactory + * @param \Magento\Email\Model\TemplateFactory $emailTemplFactory */ public function __construct( - \Magento\Event\ManagerInterface $eventManager, - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Core\Model\Store\Config $coreStoreConfig, \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Checkout\Model\Session $checkoutSession, \Magento\Core\Model\LocaleInterface $locale, \Magento\Checkout\Model\Resource\Agreement\CollectionFactory $agreementCollFactory, - \Magento\Core\Model\Email\TemplateFactory $emailTemplFactory + \Magento\Email\Model\TemplateFactory $emailTemplFactory ) { - $this->_eventManager = $eventManager; $this->_coreStoreConfig = $coreStoreConfig; $this->_storeManager = $storeManager; $this->_checkoutSession = $checkoutSession; @@ -221,14 +211,15 @@ class Data extends \Magento\Core\Helper\AbstractHelper /* @var $translate \Magento\Core\Model\Translate */ $this->_translator->setTranslateInline(false); - /** @var \Magento\Core\Model\Email\Template $mailTemplate */ + /** @var \Magento\Email\Model\Template $mailTemplate */ $mailTemplate = $this->_emailTemplFactory->create(); - /* @var $mailTemplate \Magento\Core\Model\Email\Template */ $template = $this->_coreStoreConfig->getConfig('checkout/payment_failed/template', $checkout->getStoreId()); $copyTo = $this->_getEmails('checkout/payment_failed/copy_to', $checkout->getStoreId()); - $copyMethod = $this->_coreStoreConfig->getConfig('checkout/payment_failed/copy_method', $checkout->getStoreId()); + $copyMethod = $this->_coreStoreConfig->getConfig( + 'checkout/payment_failed/copy_method', $checkout->getStoreId() + ); if ($copyTo && $copyMethod == 'bcc') { $mailTemplate->addBcc($copyTo); } @@ -236,8 +227,12 @@ class Data extends \Magento\Core\Helper\AbstractHelper $_receiver = $this->_coreStoreConfig->getConfig('checkout/payment_failed/receiver', $checkout->getStoreId()); $sendTo = array( array( - 'email' => $this->_coreStoreConfig->getConfig('trans_email/ident_'.$_receiver.'/email', $checkout->getStoreId()), - 'name' => $this->_coreStoreConfig->getConfig('trans_email/ident_'.$_receiver.'/name', $checkout->getStoreId()) + 'email' => $this->_coreStoreConfig->getConfig( + 'trans_email/ident_' . $_receiver . '/email', $checkout->getStoreId() + ), + 'name' => $this->_coreStoreConfig->getConfig( + 'trans_email/ident_' . $_receiver . '/name', $checkout->getStoreId() + ) ) ); diff --git a/app/code/Magento/Checkout/Model/Cart.php b/app/code/Magento/Checkout/Model/Cart.php index 667ecd068aee07b1cf86fd56efe72ae99c658a84..8ec67fb6c1d488e020a4949a10a80be99cc461ec 100644 --- a/app/code/Magento/Checkout/Model/Cart.php +++ b/app/code/Magento/Checkout/Model/Cart.php @@ -89,9 +89,9 @@ class Cart extends \Magento\Object implements \Magento\Checkout\Model\Cart\CartI protected $_customerSession; /** - * @var \Magento\Core\Model\Message + * @var \Magento\Message\Factory */ - protected $_message; + protected $messageFactory; /** * @param \Magento\Event\ManagerInterface $eventManager @@ -101,7 +101,7 @@ class Cart extends \Magento\Object implements \Magento\Checkout\Model\Cart\CartI * @param \Magento\Checkout\Model\Resource\Cart $resourceCart * @param \Magento\Checkout\Model\Session $checkoutSession * @param \Magento\Customer\Model\Session $customerSession - * @param \Magento\Core\Model\Message $message + * @param \Magento\Message\Factory $messageFactory * @param array $data */ public function __construct( @@ -112,7 +112,7 @@ class Cart extends \Magento\Object implements \Magento\Checkout\Model\Cart\CartI \Magento\Checkout\Model\Resource\Cart $resourceCart, \Magento\Checkout\Model\Session $checkoutSession, \Magento\Customer\Model\Session $customerSession, - \Magento\Core\Model\Message $message, + \Magento\Message\Factory $messageFactory, array $data = array() ) { $this->_eventManager = $eventManager; @@ -122,7 +122,7 @@ class Cart extends \Magento\Object implements \Magento\Checkout\Model\Cart\CartI $this->_resourceCart = $resourceCart; $this->_checkoutSession = $checkoutSession; $this->_customerSession = $customerSession; - $this->_message = $message; + $this->messageFactory = $messageFactory; parent::__construct($data); } @@ -499,7 +499,9 @@ class Cart extends \Magento\Object implements \Magento\Checkout\Model\Cart\CartI if (isset($itemInfo['before_suggest_qty']) && ($itemInfo['before_suggest_qty'] != $qty)) { $qtyRecalculatedFlag = true; - $message = $this->_message->notice(__('Quantity was recalculated from %1 to %2', $itemInfo['before_suggest_qty'], $qty)); + $message = $this->messageFactory->notice( + __('Quantity was recalculated from %1 to %2', $itemInfo['before_suggest_qty'], $qty) + ); $session->addQuoteItemMessage($item->getId(), $message); } } diff --git a/app/code/Magento/Checkout/Model/Session.php b/app/code/Magento/Checkout/Model/Session.php index de136ca5222da903f1590265cb23cf03c0ff61dc..b67a58eaed30cf1e5fc0ef9c97a1a55b8c690830 100644 --- a/app/code/Magento/Checkout/Model/Session.php +++ b/app/code/Magento/Checkout/Model/Session.php @@ -64,31 +64,16 @@ class Session extends \Magento\Core\Model\Session\AbstractSession */ protected $_orderFactory; - /** - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - /** * @var \Magento\Customer\Model\Session */ protected $_customerSession; - /** - * @var \Magento\Core\Model\Message\CollectionFactory - */ - protected $_messageCollFactory; - /** * @var \Magento\Sales\Model\QuoteFactory */ protected $_quoteFactory; - /** - * @var \Magento\App\RequestInterface - */ - protected $_request; - /** * @var \Magento\HTTP\PhpEnvironment\RemoteAddress */ @@ -97,9 +82,7 @@ class Session extends \Magento\Core\Model\Session\AbstractSession /** * @param \Magento\Core\Model\Session\Context $context * @param \Magento\Sales\Model\OrderFactory $orderFactory - * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Customer\Model\Session $customerSession - * @param \Magento\Core\Model\Message\CollectionFactory $messageCollFactory * @param \Magento\Sales\Model\QuoteFactory $quoteFactory * @param \Magento\HTTP\PhpEnvironment\RemoteAddress $remoteAddress * @param null $sessionName @@ -108,18 +91,14 @@ class Session extends \Magento\Core\Model\Session\AbstractSession public function __construct( \Magento\Core\Model\Session\Context $context, \Magento\Sales\Model\OrderFactory $orderFactory, - \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Customer\Model\Session $customerSession, - \Magento\Core\Model\Message\CollectionFactory $messageCollFactory, \Magento\Sales\Model\QuoteFactory $quoteFactory, \Magento\HTTP\PhpEnvironment\RemoteAddress $remoteAddress, $sessionName = null, array $data = array() ) { $this->_orderFactory = $orderFactory; - $this->_storeManager = $storeManager; $this->_customerSession = $customerSession; - $this->_messageCollFactory = $messageCollFactory; $this->_quoteFactory = $quoteFactory; $this->_remoteAddress = $remoteAddress; parent::__construct($context, $data); @@ -360,7 +339,7 @@ class Session extends \Magento\Core\Model\Session\AbstractSession * @param string $itemKey * @param bool $clear * - * @return null|\Magento\Core\Model\Message\Collection + * @return null|\Magento\Message\Collection */ public function getItemAdditionalMessages($itemKey, $clear = false) { @@ -382,7 +361,7 @@ class Session extends \Magento\Core\Model\Session\AbstractSession * itemKey is a unique hash (e.g 'quote_item17') to distinguish item messages among message collections * * @param string $itemKey - * @param \Magento\Core\Model\Message $message + * @param \Magento\Message\AbstractMessage $message * * @return \Magento\Checkout\Model\Session */ @@ -390,7 +369,7 @@ class Session extends \Magento\Core\Model\Session\AbstractSession { $allMessages = $this->getAdditionalMessages(); if (!isset($allMessages[$itemKey])) { - $allMessages[$itemKey] = $this->_messageCollFactory->create(); + $allMessages[$itemKey] = $this->messagesFactory->create(); } $allMessages[$itemKey]->add($message); $this->setAdditionalMessages($allMessages); @@ -403,7 +382,7 @@ class Session extends \Magento\Core\Model\Session\AbstractSession * @param int $itemId * @param bool $clear * - * @return null|\Magento\Core\Model\Message\Collection + * @return null|\Magento\Message\Collection */ public function getQuoteItemMessages($itemId, $clear = false) { @@ -414,11 +393,11 @@ class Session extends \Magento\Core\Model\Session\AbstractSession * Adds new message to a list of quote item messages, saved in this session * * @param int $itemId - * @param \Magento\Core\Model\Message $message + * @param \Magento\Message\AbstractMessage $message * * @return \Magento\Checkout\Model\Session */ - function addQuoteItemMessage($itemId, $message) + public function addQuoteItemMessage($itemId, $message) { return $this->addItemAdditionalMessage('quote_item' . $itemId, $message); } diff --git a/app/code/Magento/Checkout/etc/frontend/di.xml b/app/code/Magento/Checkout/etc/frontend/di.xml index 75935756987a837d9727c1d4923686844fe4beb8..7339df75782a94f8cc2ec0d33e6e37587c143cd5 100644 --- a/app/code/Magento/Checkout/etc/frontend/di.xml +++ b/app/code/Magento/Checkout/etc/frontend/di.xml @@ -37,4 +37,14 @@ </value> </param> </type> + <virtualType name="checkoutCartInitSession" type="Magento\Core\App\Action\Plugin\Session"> + <param name="cookieCheckActions"> + <value> + <checkoutCartAdd>add</checkoutCartAdd> + </value> + </param> + </virtualType> + <type name="Magento\Checkout\Controller\Cart"> + <plugin name="sessionInitializer" type="checkoutCartInitSession" /> + </type> </config> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/multishipping/agreements.phtml b/app/code/Magento/Checkout/view/frontend/agreements.phtml similarity index 74% rename from app/design/frontend/magento_plushe/Magento_Checkout/multishipping/agreements.phtml rename to app/code/Magento/Checkout/view/frontend/agreements.phtml index c2d5797a9f64653b437b54b9d564e554ce60b7d3..5550fb0fd730b30cc26cfa16e030c0ac3f1c13b6 100644 --- a/app/design/frontend/magento_plushe/Magento_Checkout/multishipping/agreements.phtml +++ b/app/code/Magento/Checkout/view/frontend/agreements.phtml @@ -26,23 +26,23 @@ ?> <?php /** - * @see \Magento\Checkout\Block\Agreements + * @var $this \Magento\Checkout\Block\Agreements */ ?> -<?php if (!$this->getAgreements()) return; ?> -<ol id="checkout-agreements" class="checkout agreements"> +<?php if (!$this->getAgreements()) return; ?> +<ol id="checkout-agreements" class="agreements checkout items"> <?php foreach ($this->getAgreements() as $_a): ?> <li class="item"> - <div class="agreement"<?php echo ($_a->getContentHeight() ? ' style="height:' . $_a->getContentHeight() . '"' : '')?>> + <div class="agreement content"<?php echo ($_a->getContentHeight() ? ' style="height:' . $_a->getContentHeight() . '"' : '')?>> <?php if ($_a->getIsHtml()):?> <?php echo $_a->getContent() ?> <?php else:?> <?php echo nl2br($this->escapeHtml($_a->getContent())) ?> <?php endif; ?> </div> - <div class="field choice"> + <div class="field choice agree required"> <input type="checkbox" id="agreement-<?php echo $_a->getId()?>" name="agreement[<?php echo $_a->getId()?>]" value="1" title="<?php echo $this->escapeHtml($_a->getCheckboxText()) ?>" class="checkbox" /> - <label for="agreement-<?php echo $_a->getId()?>" class="label"><?php echo $_a->getIsHtml() ? $_a->getCheckboxText() : $this->escapeHtml($_a->getCheckboxText()) ?></label> + <label class="label" for="agreement-<?php echo $_a->getId()?>"><span><?php echo $_a->getIsHtml() ? $_a->getCheckboxText() : $this->escapeHtml($_a->getCheckboxText()) ?></span></label> </div> </li> <?php endforeach ?> diff --git a/app/code/Magento/Checkout/view/frontend/cart.phtml b/app/code/Magento/Checkout/view/frontend/cart.phtml index 2931540d95f4714dc5564cb95fb40995c191c057..2725134f1311a3752fed80946b999c98a73311b8 100644 --- a/app/code/Magento/Checkout/view/frontend/cart.phtml +++ b/app/code/Magento/Checkout/view/frontend/cart.phtml @@ -19,7 +19,6 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design - * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ @@ -28,145 +27,11 @@ /** * Shopping cart template * - * @see \Magento\Checkout\Block\Cart + * @var $this \Magento\Checkout\Block\Cart */ -?> -<?php if ($this->getItemsCount()): ?> -<div class="cart"> - <div class="page-title title-buttons"> - <h1><?php echo __('Shopping Cart') ?></h1> - <?php if(!$this->hasError()): ?> - <ul class="checkout-types"> - <?php foreach ($this->getMethods('top_methods') as $method): ?> - <?php if ($methodHtml = $this->getMethodHtml($method)): ?> - <li><?php echo $methodHtml; ?></li> - <?php endif; ?> - <?php endforeach; ?> - </ul> - <?php endif; ?> - </div> - <?php echo $this->getMessagesBlock()->getGroupedHtml() ?> - <?php echo $this->getChildHtml('form_before') ?> - <form action="<?php echo $this->getUrl('checkout/cart/updatePost') ?>" method="post" id="form-validate" data-mage-init="{validation: []}"> - <fieldset> - <table id="shopping-cart-table" class="data-table cart-table"> - <col width="1" /> - <col /> - <col width="1" /> - <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllowInCart()) : ?> - <col width="1" /> - <?php endif ?> - <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartPriceExclTax() || $this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> - <col width="1" /> - <?php endif; ?> - <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartPriceInclTax() || $this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> - <col width="1" /> - <?php endif; ?> - <col width="1" /> - <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartPriceExclTax() || $this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> - <col width="1" /> - <?php endif; ?> - <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartPriceInclTax() || $this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> - <col width="1" /> - <?php endif; ?> - <col width="1" /> - <?php $mergedCells = ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices() ? 2 : 1); ?> - <thead> - <tr> - <th rowspan="<?php echo $mergedCells; ?>"> </th> - <th rowspan="<?php echo $mergedCells; ?>"><span class="nobr"><?php echo __('Product Name') ?></span></th> - <th rowspan="<?php echo $mergedCells; ?>"></th> - <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllowInCart()) : ?> - <th rowspan="<?php echo $mergedCells; ?>" class="a-center"><span class="nobr"><?php echo __('Move to Wish List') ?></span></th> - <?php endif ?> - <th class="a-center" colspan="<?php echo $mergedCells; ?>"><span class="nobr"><?php echo __('Unit Price') ?></span></th> - <th rowspan="<?php echo $mergedCells; ?>" class="a-center"><?php echo __('Qty') ?></th> - <th class="a-center" colspan="<?php echo $mergedCells; ?>"><?php echo __('Subtotal') ?></th> - <th rowspan="<?php echo $mergedCells; ?>" class="a-center"> </th> - </tr> - <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> - <tr> - <th class="a-right"><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(false) ?></th> - <th><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(true) ?></th> - <th class="a-right"><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(false) ?></th> - <th><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(true) ?></th> - </tr> - <?php endif; ?> - </thead> - <tfoot> - <tr> - <td colspan="50" class="a-right"> - <?php if($this->getContinueShoppingUrl()): ?> - <button type="button" title="<?php echo __('Continue Shopping') ?>" class="button btn-continue"><span><span><?php echo __('Continue Shopping') ?></span></span></button> - <?php endif; ?> - <button type="submit" name="update_cart_action" value="update_qty" title="<?php echo __('Update Shopping Cart'); ?>" class="button btn-update"><span><span><?php echo __('Update Shopping Cart'); ?></span></span></button> - <button type="submit" name="update_cart_action" value="empty_cart" title="<?php echo __('Clear Shopping Cart'); ?>" class="button btn-empty" id="empty_cart_button"><span><span><?php echo __('Clear Shopping Cart'); ?></span></span></button> - <!--[if lt IE 8]> - <input type="hidden" value="" id="update_cart_action_container" /> - <![endif]--> - <script type="text/javascript"> - //<![CDATA[ - (function($) { - head.js("<?php echo $this->getViewFileUrl('Magento_Checkout::js/shopping-cart.js')?>", - function() { - // Internet Explorer (lt 8) does not support value attribute in button elements - $('#shopping-cart-table').shoppingCart({ - continueShoppingButton: 'button.btn-continue', - continueShoppingUrl: '<?php echo $this->getContinueShoppingUrl() ?>', - emptyCartButton: 'button.btn-empty', - updateCartActionContainer: '#update_cart_action_container' - }); - }); - })(jQuery); - //]]> - </script> - </td> - </tr> - </tfoot> - <tbody> - <?php foreach($this->getItems() as $_item): ?> - <?php echo $this->getItemHtml($_item) ?> - <?php endforeach ?> - </tbody> - </table> - <script type="text/javascript">(function($) {$('#shopping-cart-table').decorate('table')})(jQuery)</script> - </fieldset> - </form> - <div class="cart-collaterals"> - <div class="col2-set"> - <div class="col-1"> - <?php echo $this->getChildHtml('crosssell') ?> - </div> - <div class="col-2"> - <?php /* Extensions placeholder */ ?> - <?php echo $this->getChildHtml('checkout.cart.extra') ?> - <?php if (!$this->getIsVirtual()): echo $this->getChildHtml('shipping'); endif; ?> - </div> - </div> - <div class="totals"> - <?php echo $this->getChildHtml('totals'); ?> - <?php if(!$this->hasError()): ?> - <ul class="checkout-types"> - <?php foreach ($this->getMethods('methods') as $method): ?> - <?php if ($methodHtml = $this->getMethodHtml($method)): ?> - <li><?php echo $methodHtml; ?></li> - <?php endif; ?> - <?php endforeach; ?> - </ul> - <?php endif; ?> - </div> - </div> -</div> -<?php else: ?> -<div class="page-title"> - <h1><?php echo __('Shopping Cart is Empty') ?></h1> -</div> -<div class="cart-empty"> - <?php echo $this->getMessagesBlock()->getGroupedHtml() ?> - <?php echo $this->getChildHtml('checkout_cart_empty_widget'); ?> - <p><?php echo __('You have no items in your shopping cart.') ?></p> - <p><?php echo __('Click <a href="%1">here</a> to continue shopping.', $this->getContinueShoppingUrl()) ?></p> - <?php echo $this->getChildHtml('shopping.cart.table.after'); ?> -</div> -<?php endif; ?> +if ($this->getItemsCount()) { + echo $this->getChildHtml('with-items'); +} else { + echo $this->getChildHtml('no-items'); +} diff --git a/app/code/Magento/Checkout/view/frontend/cart/coupon.phtml b/app/code/Magento/Checkout/view/frontend/cart/coupon.phtml index 9386430baa075ad710322dcb1a5fa508286e4e3d..9bd1430c089ac0f129c4e1516fa8e323bd6fecf1 100644 --- a/app/code/Magento/Checkout/view/frontend/cart/coupon.phtml +++ b/app/code/Magento/Checkout/view/frontend/cart/coupon.phtml @@ -19,31 +19,38 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design - * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -<form id="discount-coupon-form" action="<?php echo $this->getUrl('checkout/cart/couponPost') ?>" method="post"> - <div class="discount"> - <h2><?php echo __('Discount Codes') ?></h2> - <div class="discount-form"> - <label for="coupon_code"><?php echo __('Enter your coupon code if you have one.') ?></label> - <input type="hidden" name="remove" id="remove-coupon" value="0" /> - <div class="input-box"> - <input class="input-text" id="coupon_code" name="coupon_code" value="<?php echo $this->escapeHtml($this->getCouponCode()) ?>" /> - </div> - <div class="buttons-set"> - <button type="button" title="<?php echo __('Apply Coupon') ?>" class="button apply-coupon" value="<?php echo __('Apply Coupon') ?>"><span><span><?php echo __('Apply Coupon') ?></span></span></button> - <?php if(strlen($this->getCouponCode())): ?> - <button type="button" title="<?php echo __('Cancel Coupon') ?>" class="button cancel-coupon" value="<?php echo __('Cancel Coupon') ?>"><span><span><?php echo __('Cancel Coupon') ?></span></span></button> - <?php endif;?> - </div> - </div> - </div> -</form> -<script type="text/javascript"> -//<![CDATA[ +<div class="block discount"> + <div class="title"><strong><?php echo __('Discount Codes') ?></strong></div> + <div class="content"> + <form id="discount-coupon-form" action="<?php echo $this->getUrl('checkout/cart/couponPost') ?>" method="post"> + <fieldset class="fieldset coupon<?php strlen($this->getCouponCode()) ? ' applied' : ''?>"> + <input type="hidden" name="remove" id="remove-coupon" value="0" /> + <div class="field"> + <label for="coupon_code" class="label"><span><?php echo __('Enter your coupon code if you have one.') ?></span></label> + <div class="control"> + <input type="text" class="input-text" id="coupon_code" name="coupon_code" value="<?php echo $this->escapeHtml($this->getCouponCode()) ?>" /> + </div> + </div> + <div class="actions"> + <div class="primary"> + <button class="action apply" type="button" value="<?php echo __('Apply Coupon') ?>"> + <span><?php echo __('Apply Coupon') ?></span> + </button> + </div> + <?php if(strlen($this->getCouponCode())): ?> + <div class="secondary"> + <button type="button" class="action cancel" value="<?php echo __('Cancel Coupon') ?>"><span><?php echo __('Cancel Coupon') ?></span></button> + </div> + <?php endif; ?> + </div> + </fieldset> + </form> + <script type="text/javascript"> + //<![CDATA[ (function($) { head.js("<?php echo $this->getViewFileUrl('jquery/jquery.validate.js')?>", "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js')?>", @@ -52,9 +59,11 @@ "<?php echo $this->getViewFileUrl('Magento_Checkout::js/discount-codes.js')?>", function() { $('#discount-coupon-form').discountCode({ couponCodeSelector: '#coupon_code', removeCouponSelector: '#remove-coupon', - applyButton: 'button.apply-coupon', cancelButton: 'button.cancel-coupon' + applyButton: 'button.action.apply', cancelButton: 'button.action.cancel' }); }); })(jQuery); -//]]> -</script> + //]]> + </script> + </div> +</div> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/cart/form.phtml b/app/code/Magento/Checkout/view/frontend/cart/form.phtml similarity index 96% rename from app/design/frontend/magento_plushe/Magento_Checkout/cart/form.phtml rename to app/code/Magento/Checkout/view/frontend/cart/form.phtml index 4efca67cfb04e0de9f41855b52ab889ccef7c669..e139a2d49049ed7bf58634d63d04b2c5eae4ed5c 100644 --- a/app/design/frontend/magento_plushe/Magento_Checkout/cart/form.phtml +++ b/app/code/Magento/Checkout/view/frontend/cart/form.phtml @@ -18,17 +18,11 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * - * @category design * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ -?> -<?php -/** - * Shopping cart template - * - * @see \Magento\Checkout\Block\Cart - */ + +/** @var $this \Magento\Checkout\Block\Cart */ ?> <?php $mergedCells = ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices() ? 2 : 1); ?> <div class="cart table wrapper<?php echo $mergedCells == 2 ? ' detailed' : ''; ?>"> @@ -39,7 +33,7 @@ <tr> <th class="col item" rowspan="<?php echo $mergedCells; ?>"><span><?php echo __('Item') ?></span></th> <th class="col price" colspan="<?php echo $mergedCells; ?>"><span><?php echo __('Unit Price') ?></span></th> - <th class="col qty" rowspan="<?php echo $mergedCells; ?>" class="a-center"><span><?php echo __('Qty') ?></span></th> + <th class="col qty" rowspan="<?php echo $mergedCells; ?>"><span><?php echo __('Qty') ?></span></th> <th class="col subtotal" colspan="<?php echo $mergedCells; ?>"><span><?php echo __('Subtotal') ?></span></th> </tr> <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> diff --git a/app/code/Magento/Checkout/view/frontend/cart/item/configure/updatecart.phtml b/app/code/Magento/Checkout/view/frontend/cart/item/configure/updatecart.phtml index e24f55d04aea4a74711e05b4f80b15e9e37c34ca..1c13b896e1479756f4b815c43e97b09a79eee140 100644 --- a/app/code/Magento/Checkout/view/frontend/cart/item/configure/updatecart.phtml +++ b/app/code/Magento/Checkout/view/frontend/cart/item/configure/updatecart.phtml @@ -19,27 +19,25 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design - * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> - <?php $_product = $this->getProduct(); ?> <?php $buttonTitle = __('Update Cart'); ?> <?php if ($_product->isSaleable()): ?> - <div class="add-to-cart"> + <div class="box tocart update"> <?php if (!$_product->isGrouped()): ?> - <label for="qty"><?php echo __('Qty:') ?></label> - <input type="text" name="qty" id="qty" maxlength="12" value="<?php echo $this->getProductDefaultQty() * 1 ?>" - title="<?php echo __('Qty') ?>" class="input-text qty" - <?php if ($_product->getStockItem() && $_product->getStockItem()->getIsQtyDecimal()) : ?> - data-validate="{required:true, 'validate-greater-than-zero':true}"/> - <?php else: ?> - data-validate="{required:true, digits:true}"/> - <?php endif; ?> + <div class="field qty"> + <label class="label" for="qty"><span><?php echo __('Qty') ?></span></label> + <div class="control"> + <input type="text" name="qty" id="qty" maxlength="12" value="<?php echo $this->getProductDefaultQty() * 1 ?>" title="<?php echo __('Qty') ?>" class="input-text qty" data-validate="{required:true,digits:true}"/> + </div> + </div> <?php endif; ?> - <button type="button" title="<?php echo $buttonTitle ?>" class="button btn-cart" id="product-updatecart-button"><span><span><?php echo $buttonTitle ?></span></span></button> + <div class="actions"> + <button type="button" class="action primary tocart" title="<?php echo $buttonTitle ?>" id="product-updatecart-button"><span><?php echo $buttonTitle ?></span></button> + </div> <?php echo $this->getChildHtml('', true) ?> </div> diff --git a/app/code/Magento/Checkout/view/frontend/cart/item/default.phtml b/app/code/Magento/Checkout/view/frontend/cart/item/default.phtml index 1c3fff9ed0a2b45d28fdc44109e6726736c2005b..faf4f01808d9eb8f263d74ed7f9d79faa5f945b5 100644 --- a/app/code/Magento/Checkout/view/frontend/cart/item/default.phtml +++ b/app/code/Magento/Checkout/view/frontend/cart/item/default.phtml @@ -18,75 +18,70 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * - * @category design - * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ -?> -<?php -/** @var $_item \Magento\Sales\Model\Quote\Item */ + +/** @var $this \Magento\Checkout\Block\Cart\Item\Renderer */ + $_item = $this->getItem(); $isVisibleProduct = $_item->getProduct()->isVisibleInSiteVisibility(); $canApplyMsrp = $this->helper('Magento\Catalog\Helper\Data')->canApplyMsrp($_item->getProduct(), \Magento\Catalog\Model\Product\Attribute\Source\Msrp\Type::TYPE_BEFORE_ORDER_CONFIRM); ?> -<tr> - <td><?php if ($this->hasProductUrl()):?><a href="<?php echo $this->getProductUrl() ?>" title="<?php echo $this->escapeHtml($this->getProductName()) ?>" class="product-image"><?php endif;?><img src="<?php echo $this->getProductThumbnailUrl() ?>" width="<?php echo $this->getThumbnailSize()?>" height="<?php echo $this->getThumbnailSize()?>" alt="<?php echo $this->escapeHtml($this->getProductName()) ?>" /><?php if ($this->hasProductUrl()):?></a><?php endif;?></td> - <td> - <h2 class="product-name"> - <?php if ($this->hasProductUrl()):?> - <a href="<?php echo $this->getProductUrl() ?>"><?php echo $this->escapeHtml($this->getProductName()) ?></a> - <?php else: ?> - <?php echo $this->escapeHtml($this->getProductName()) ?> - <?php endif; ?> - </h2> - <?php if ($_options = $this->getOptionList()):?> - <dl class="item-options"> - <?php foreach ($_options as $_option) : ?> - <?php $_formatedOptionValue = $this->getFormatedOptionValue($_option) ?> - <dt><?php echo $this->escapeHtml($_option['label']) ?></dt> - <dd<?php if (isset($_formatedOptionValue['full_view'])): ?> class="truncated" data-mage-init="{truncateOptions:[]}"<?php endif; ?>><?php echo $_formatedOptionValue['value'] ?> - <?php if (isset($_formatedOptionValue['full_view'])): ?> - <div class="truncated_full_value"> - <dl class="item-options"> - <dt><?php echo $this->escapeHtml($_option['label']) ?></dt> - <dd><?php echo $_formatedOptionValue['full_view'] ?></dd> - </dl> - </div> - <?php endif; ?> - </dd> - <?php endforeach; ?> - </dl> - <?php endif;?> - <?php if ($messages = $this->getMessages()): ?> - <?php foreach ($messages as $message): ?> - <p class="item-msg <?php echo $message['type'] ?>">* <?php echo $this->escapeHtml($message['text']) ?></p> - <?php endforeach; ?> - <?php endif; ?> - <?php $addInfoBlock = $this->getProductAdditionalInformationBlock(); ?> - <?php if ($addInfoBlock): ?> - <?php echo $addInfoBlock->setItem($_item)->toHtml() ?> +<tbody class="cart item"> +<tr class="item info"> + <td class="col item"> + <?php if ($this->hasProductUrl()):?><a href="<?php echo $this->getProductUrl() ?>" title="<?php echo $this->escapeHtml($this->getProductName()) ?>" class="product photo"> + <?php else:?> + <span class="product photo"> <?php endif;?> + <?php echo $this->getLayout()->createBlock('Magento\Catalog\Block\Product\Image')->init($_item->getProduct(), 'cart_page_product_thumbnail')->toHtml(); ?> + <?php if ($this->hasProductUrl()):?></a><?php else: ?></span><?php endif; ?> + <div class="product details"> + <strong class="product name"> + <?php if ($this->hasProductUrl()):?> + <a href="<?php echo $this->getProductUrl() ?>"><?php echo $this->escapeHtml($this->getProductName()) ?></a> + <?php else: ?> + <?php echo $this->escapeHtml($this->getProductName()) ?> + <?php endif; ?> + </strong> + <?php if ($_options = $this->getOptionList()):?> + <dl class="cart item options"> + <?php foreach ($_options as $_option) : ?> + <?php $_formatedOptionValue = $this->getFormatedOptionValue($_option) ?> + <dt><?php echo $this->escapeHtml($_option['label']) ?></dt> + <dd<?php if (isset($_formatedOptionValue['full_view'])): ?> class="truncated" data-mage-init="{truncateOptions:[]}"<?php endif; ?>><?php echo $_formatedOptionValue['value'] ?> + <?php if (isset($_formatedOptionValue['full_view'])): ?> + <div class="truncated full value"> + <dl class="item options"> + <dt><?php echo $this->escapeHtml($_option['label']) ?></dt> + <dd><?php echo $_formatedOptionValue['full_view'] ?></dd> + </dl> + </div> + <?php endif; ?> + </dd> + <?php endforeach; ?> + </dl> + <?php endif;?> + <?php if ($messages = $this->getMessages()): ?> + <?php foreach ($messages as $message): ?> + <div class="cart item message <?php echo $message['type'] ?>"><div>* <?php echo $this->escapeHtml($message['text']) ?></div></div> + <?php endforeach; ?> + <?php endif; ?> + <?php $addInfoBlock = $this->getProductAdditionalInformationBlock(); ?> + <?php if ($addInfoBlock): ?> + <?php echo $addInfoBlock->setItem($_item)->toHtml() ?> + <?php endif;?> + </div> + <?php $cols = 1; ?> </td> - <td class="a-center"> - <?php if ($isVisibleProduct): ?> - <a href="<?php echo $this->getConfigureUrl() ?>" title="<?php echo __('Edit item parameters') ?>"><?php echo __('Edit') ?></a> - <?php endif ?> - </td> - <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllowInCart()) : ?> - <td class="a-center"> - <?php if ($isVisibleProduct): ?> - <a href="<?php echo $this->helper('Magento\Wishlist\Helper\Data')->getMoveFromCartUrl($_item->getId()); ?>" class="link-wishlist use-ajax"><?php echo __('Move'); ?></a> - <?php endif ?> - </td> - <?php endif ?> <?php if ($canApplyMsrp): ?> - <td class="a-right"<?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> colspan="2"<?php endif; ?>> - <span class="cart-price"> - <span class="cart-msrp-unit"><?php echo __('See price before order confirmation.'); ?></span> + <td class="col msrp"<?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> colspan="2"<?php endif; ?>> + <span class="pricing msrp"> + <span class="msrp notice"><?php echo __('See price before order confirmation.'); ?></span> <?php $helpLinkId = 'cart-msrp-help-' . $_item->getId(); ?> - <a id="<?php echo $helpLinkId ?>" href="#" class="map-help-link"><?php echo __("What's this?"); ?></a> + <a id="<?php echo $helpLinkId ?>" href="#" class="action help map"><span><?php echo __("What's this?"); ?></span></a> <?php $_product = $_item->getProduct(); ?> <script type="text/javascript"> (function ($) { @@ -103,28 +98,27 @@ $canApplyMsrp = $this->helper('Magento\Catalog\Helper\Data')->canApplyMsrp($_ite })(jQuery); </script> </span> + <?php $cols++; ?> </td> <?php else: ?> <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartPriceExclTax() || $this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> - <td class="a-right"> + <td class="col price excl tax"> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - <span class="cart-tax-total" data-tax-toggle='{"itemTaxId" : "#eunit-item-tax-details<?php echo $_item->getId(); ?>"}'> + <span class="cart tax total" data-tax-toggle='{"itemTaxId" : "#eunit-item-tax-details<?php echo $_item->getId(); ?>"}'> <?php else: ?> - <span class="cart-price"> + <span class="cart price"> <?php endif; ?> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?> <?php else: ?> <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_item->getCalculationPrice()) ?> <?php endif; ?> - </span> - <?php if ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item)): ?> - <div class="cart-tax-info" id="eunit-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;"> + <div class="cart tax info" id="eunit-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;"> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> <span class="weee"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount'],true,true); ?></span> @@ -141,20 +135,22 @@ $canApplyMsrp = $this->helper('Magento\Catalog\Helper\Data')->canApplyMsrp($_ite </div> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - <div class="cart-tax-total" data-tax-toggle='{"itemTaxId" : "#eunit-item-tax-details<?php echo $_item->getId(); ?>"}'> + <div class="cart tax total" data-tax-toggle='{"itemTaxId" : "#eunit-item-tax-details<?php echo $_item->getId(); ?>"}'> <span class="weee"><?php echo __('Total'); ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?></span> </div> <?php endif; ?> <?php endif; ?> + <?php $cols++; ?> </td> + <?php endif; ?> <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartPriceInclTax() || $this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> - <td> + <td class="col price incl tax"> <?php $_incl = $this->helper('Magento\Checkout\Helper\Data')->getPriceInclTax($_item); ?> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - <span class="cart-tax-total" data-tax-toggle='{"itemTaxId" : "#unit-item-tax-details<?php echo $_item->getId(); ?>"}'> + <span class="cart tax total" data-tax-toggle='{"itemTaxId" : "#unit-item-tax-details<?php echo $_item->getId(); ?>"}'> <?php else: ?> - <span class="cart-price"> + <span class="cart price"> <?php endif; ?> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> @@ -166,7 +162,7 @@ $canApplyMsrp = $this->helper('Magento\Catalog\Helper\Data')->canApplyMsrp($_ite </span> <?php if ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item)): ?> - <div class="cart-tax-info" id="unit-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;"> + <div class="cart tax info" id="unit-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;"> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> <span class="weee"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount'],true,true); ?></span> @@ -183,27 +179,31 @@ $canApplyMsrp = $this->helper('Magento\Catalog\Helper\Data')->canApplyMsrp($_ite </div> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - <div class="cart-tax-total" data-tax-toggle='{"itemTaxId" : "#unit-item-tax-details<?php echo $_item->getId(); ?>"}'> + <div class="cart tax total" data-tax-toggle='{"itemTaxId" : "#unit-item-tax-details<?php echo $_item->getId(); ?>"}'> <span class="weee"><?php echo __('Total incl. tax'); ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?></span> </div> <?php endif; ?> <?php endif; ?> + <?php $cols++; ?> </td> <?php endif; ?> <?php endif; ?> - <td class="a-center"> - <input name="cart[<?php echo $_item->getId() ?>][qty]" value="<?php echo $this->getQty() ?>" size="4" title="<?php echo __('Qty') ?>" class="input-text qty" maxlength="12" data-validate="{required:true,'validate-greater-than-zero':true}"/> + <td class="col qty"> + <div class="control qty"> + <input name="cart[<?php echo $_item->getId() ?>][qty]" value="<?php echo $this->getQty() ?>" type="text" size="4" title="<?php echo __('Qty') ?>" class="input-text qty" maxlength="12" data-validate="{required:true,'validate-greater-than-zero':true}"/> + </div> + <?php $cols++; ?> </td> <?php if (($this->helper('Magento\Tax\Helper\Data')->displayCartPriceExclTax() || $this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()) && !$_item->getNoSubtotal()): ?> - <td class="a-right"> + <td class="col subtotal excl tax"> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - <span class="cart-tax-total" data-tax-toggle='{"itemTaxId" : "#esubtotal-item-tax-details<?php echo $_item->getId(); ?>"}'> + <span class="cart tax total" data-tax-toggle='{"itemTaxId" : "#esubtotal-item-tax-details<?php echo $_item->getId(); ?>"}'> <?php else: ?> - <span class="cart-price"> + <span class="cart price"> <?php endif; ?> <?php if ($canApplyMsrp): ?> - <span class="cart-msrp-subtotal">--</span> + <span class="cart msrp subtotal">--</span> <?php else: ?> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?> @@ -215,7 +215,7 @@ $canApplyMsrp = $this->helper('Magento\Catalog\Helper\Data')->canApplyMsrp($_ite </span> <?php if ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item)): ?> - <div class="cart-tax-info" id="esubtotal-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;"> + <div class="cart tax info" id="esubtotal-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;"> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> <span class="weee"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['row_amount'],true,true); ?></span> @@ -232,24 +232,25 @@ $canApplyMsrp = $this->helper('Magento\Catalog\Helper\Data')->canApplyMsrp($_ite </div> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - <div class="cart-tax-total" data-tax-toggle='{"itemTaxId" : "#esubtotal-item-tax-details<?php echo $_item->getId(); ?>"}'> + <div class="cart tax total" data-tax-toggle='{"itemTaxId" : "#esubtotal-item-tax-details<?php echo $_item->getId(); ?>"}'> <span class="weee"><?php echo __('Total'); ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?></span> </div> <?php endif; ?> <?php endif; ?> + <?php $cols++; ?> </td> <?php endif; ?> <?php if (($this->helper('Magento\Tax\Helper\Data')->displayCartPriceInclTax() || $this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()) && !$_item->getNoSubtotal()): ?> - <td> + <td class="col subtotal incl tax"> <?php $_incl = $this->helper('Magento\Checkout\Helper\Data')->getSubtotalInclTax($_item); ?> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - <span class="cart-tax-total" data-tax-toggle='{"itemTaxId" : "#subtotal-item-tax-details<?php echo $_item->getId(); ?>"}'> + <span class="cart tax total" data-tax-toggle='{"itemTaxId" : "#subtotal-item-tax-details<?php echo $_item->getId(); ?>"}'> <?php else: ?> - <span class="cart-price"> + <span class="cart price"> <?php endif; ?> <?php if ($canApplyMsrp): ?> - <span class="cart-msrp-subtotal">--</span> + <span class="cart msrp subtotal">--</span> <?php else: ?> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?> @@ -263,7 +264,7 @@ $canApplyMsrp = $this->helper('Magento\Catalog\Helper\Data')->canApplyMsrp($_ite <?php if ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item)): ?> - <div class="cart-tax-info" id="subtotal-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;"> + <div class="cart tax info" id="subtotal-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;"> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> <span class="weee"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['row_amount'],true,true); ?></span> @@ -280,12 +281,33 @@ $canApplyMsrp = $this->helper('Magento\Catalog\Helper\Data')->canApplyMsrp($_ite </div> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - <div class="cart-tax-total" data-tax-toggle='{"itemTaxId" : "#subtotal-item-tax-details<?php echo $_item->getId(); ?>"}'> + <div class="cart tax total" data-tax-toggle='{"itemTaxId" : "#subtotal-item-tax-details<?php echo $_item->getId(); ?>"}'> <span class="weee"><?php echo __('Total incl. tax'); ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?></span> </div> <?php endif; ?> <?php endif; ?> + <?php $cols++; ?> </td> <?php endif; ?> - <td class="a-center"><a href="<?php echo $this->getDeleteUrl()?>" title="<?php echo __('Remove item')?>" class="btn-remove btn-remove2"><?php echo __('Remove item')?></a></td> </tr> +<tr class="item actions"> + <td colspan="<?php echo $cols;?>"> + <div class="actions"> + + <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllowInCart()) : ?> + <?php if ($isVisibleProduct): ?> + <a href="<?php echo $this->helper('Magento\Wishlist\Helper\Data')->getMoveFromCartUrl($_item->getId()); ?>" class="use-ajax action towishlist"> + <span><?php echo __('Move to Wishlist'); ?></span> + </a> + <?php endif ?> + <?php endif ?> + + <?php if ($isVisibleProduct): ?> + <a class="action edit" href="<?php echo $this->getConfigureUrl() ?>" title="<?php echo __('Edit item parameters') ?>"><span><?php echo __('Edit') ?></span></a> + <?php endif ?> + + <a href="<?php echo $this->getDeleteUrl()?>" title="<?php echo __('Remove item')?>" class="action delete"><span><?php echo __('Remove item')?></span></a> + </div> + </td> +</tr> +</tbody> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/cart/methods.phtml b/app/code/Magento/Checkout/view/frontend/cart/methods.phtml similarity index 94% rename from app/design/frontend/magento_plushe/Magento_Checkout/cart/methods.phtml rename to app/code/Magento/Checkout/view/frontend/cart/methods.phtml index 8c71d1ff0738ac42164b0d4b1d7eacc82acdce4c..591d3cd8e4bb37204dc39b37796d99fd2d618248 100644 --- a/app/design/frontend/magento_plushe/Magento_Checkout/cart/methods.phtml +++ b/app/code/Magento/Checkout/view/frontend/cart/methods.phtml @@ -24,11 +24,7 @@ */ ?> <?php -/** - * Shopping cart template - * - * @see \Magento\Checkout\Block\Cart - */ +/** @var $this \Magento\Checkout\Block\Cart */ ?> <?php if(!$this->hasError()): ?> <?php $methods = $this->getMethods('methods') ? : $this->getMethods('top_methods') ?> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/cart/minicart.phtml b/app/code/Magento/Checkout/view/frontend/cart/minicart.phtml similarity index 97% rename from app/design/frontend/magento_plushe/Magento_Checkout/cart/minicart.phtml rename to app/code/Magento/Checkout/view/frontend/cart/minicart.phtml index 6614e01c4fa7fc7c365f1608613e0dfa78f6058d..6bcc918c8b41bcc758031d60f4faa620f74074a2 100644 --- a/app/design/frontend/magento_plushe/Magento_Checkout/cart/minicart.phtml +++ b/app/code/Magento/Checkout/view/frontend/cart/minicart.phtml @@ -23,11 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ -/** - * Shoping cart sidebar - * - * @see \Magento\Checkout\Block\Cart\Sidebar - */ +/** @var $this \Magento\Checkout\Block\Cart\Sidebar */ ?> <?php if ($this->getInList()): ?> <li data-block="minicart" class="minicart wrapper"> @@ -80,7 +76,7 @@ <div class="subtotal"> <?php if ($this->canApplyMsrp()): ?> <span class="mark msrp"> - <?php echo __('ORDER TOTAL WILL BE DISPLAYED BEFORE YOU SUBMIT THE ORDER'); ?> + <?php echo __('Order total will be displayed before you submit the order'); ?> </span> <?php else: ?> <span class="mark"> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/cart/noItems.phtml b/app/code/Magento/Checkout/view/frontend/cart/noItems.phtml similarity index 96% rename from app/design/frontend/magento_plushe/Magento_Checkout/cart/noItems.phtml rename to app/code/Magento/Checkout/view/frontend/cart/noItems.phtml index 1b41606e3f00be97495078884ec8bd4a32a0ca49..4060ad8457c2c22d84636fb30e82a518d21628c9 100644 --- a/app/design/frontend/magento_plushe/Magento_Checkout/cart/noItems.phtml +++ b/app/code/Magento/Checkout/view/frontend/cart/noItems.phtml @@ -22,6 +22,8 @@ * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ + +/** @var $this \Magento\Checkout\Block\Cart */ ?> <div class="cart empty"> <?php echo $this->getChildHtml('checkout_cart_empty_widget'); ?> diff --git a/app/code/Magento/Checkout/view/frontend/cart/shipping.phtml b/app/code/Magento/Checkout/view/frontend/cart/shipping.phtml index 89aa5e352ffd5cb16516a746448430b46595c65c..35caee43ceebecf3572512850c505ef190228e76 100644 --- a/app/code/Magento/Checkout/view/frontend/cart/shipping.phtml +++ b/app/code/Magento/Checkout/view/frontend/cart/shipping.phtml @@ -19,109 +19,108 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design - * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> <?php /** @var $this \Magento\Checkout\Block\Cart\Shipping */ ?> -<div class="shipping"> - <h2><?php echo __('Estimate Shipping and Tax') ?></h2> - <div class="shipping-form"> - <form action="<?php echo $this->getUrl('checkout/cart/estimatePost') ?>" method="post" id="shipping-zip-form"> - <p><?php echo __('Enter your destination to get a shipping estimate.') ?></p> - <ul class="form-list"> - <li> - <label for="country" class="required"><em>*</em><?php echo __('Country') ?></label> - <div class="input-box"> - <?php echo $this->getDirectoryBlock()->getCountryHtmlSelect($this->getEstimateCountryId()) ?> - </div> - </li> +<div class="block shipping"> + <div class="title"><strong><?php echo __('Estimate Shipping and Tax') ?></strong></div> + <div class="content"> + <form action="<?php echo $this->getUrl('checkout/cart/estimatePost') ?>" method="post" id="shipping-zip-form"> + <fieldset class="fieldset estimate"> + <p class="field note"><?php echo __('Enter your destination to get a shipping estimate.') ?></p> + <div class="field country"> + <label for="country" class="label"><span><?php echo __('Country') ?></span></label> + <div class="control"> + <?php echo $this->getDirectoryBlock()->getCountryHtmlSelect($this->getEstimateCountryId()) ?> + </div> + </div> <?php //if($this->getStateActive()): ?> - <li> - <label for="region_id"<?php if ($this->isStateProvinceRequired()) echo ' class="required"' ?>><?php if ($this->isStateProvinceRequired()) echo '<em>*</em>' ?><?php echo __('State/Province') ?></label> - <div class="input-box"> - <select id="region_id" name="region_id" title="<?php echo __('State/Province') ?>" style="display:none;"<?php echo ($this->isStateProvinceRequired() ? ' class="validate-select"' : '') ?>> - <option value=""><?php echo __('Please select a region, state or province.') ?></option> - </select> - <input type="text" id="region" name="region" value="<?php echo $this->escapeHtml($this->getEstimateRegion()) ?>" title="<?php echo __('State/Province') ?>" class="input-text" style="display:none;" /> - </div> - </li> + <div class="field region<?php if ($this->isStateProvinceRequired()) echo ' required' ?>"> + <label for="region_id" class="label"><span><?php echo __('State/Province') ?></span></label> + <div class="control"> + <select id="region_id" name="region_id" title="<?php echo __('State/Province') ?>" style="display:none;"<?php echo ($this->isStateProvinceRequired() ? ' class="validate-select"' : '') ?>> + <option value=""><?php echo __('Please select region, state or province') ?></option> + </select> + <input type="text" id="region" name="region" value="<?php echo $this->escapeHtml($this->getEstimateRegion()) ?>" title="<?php echo __('State/Province') ?>" class="input-text" style="display:none;" /> + </div> + </div> <?php //endif; ?> <?php if($this->getCityActive()): ?> - <li> - <label for="city"<?php if ($this->isCityRequired()) echo ' class="required"' ?>><?php if ($this->isCityRequired()) echo '<em>*</em>' ?><?php echo __('City') ?></label> - <div class="input-box"> - <input class="input-text<?php if ($this->isCityRequired()):?> required-entry<?php endif;?>" id="city" type="text" name="estimate_city" value="<?php echo $this->escapeHtml($this->getEstimateCity()) ?>" /> - </div> - </li> + <div class="field city<?php if ($this->isCityRequired()) echo ' required' ?>"> + <label for="city" class="label"><span><?php echo __('City') ?></span></label> + <div class="control"> + <input class="input-text<?php if ($this->isCityRequired()):?> required-entry<?php endif;?>" id="city" type="text" name="estimate_city" value="<?php echo $this->escapeHtml($this->getEstimateCity()) ?>" /> + </div> + </div> <?php endif; ?> - <li> - <label for="postcode"<?php if ($this->isZipCodeRequired()) echo ' class="required"' ?>><?php if ($this->isZipCodeRequired()) echo '<em>*</em>' ?><?php echo __('Zip/Postal Code') ?></label> - <div class="input-box"> - <input class="input-text validate-postcode<?php if ($this->isZipCodeRequired()):?> required-entry<?php endif;?>" type="text" id="postcode" name="estimate_postcode" value="<?php echo $this->escapeHtml($this->getEstimatePostcode()) ?>" /> - </div> - </li> - </ul> - <div class="buttons-set"> - <button type="submit" title="<?php echo __('Get a Quote') ?>" class="button"><span><span><?php echo __('Get a Quote') ?></span></span></button> + <div class="field postcode<?php if ($this->isZipCodeRequired()) echo ' required' ?>"> + <label for="postcode" class="label"><span><?php echo __('Zip/Postal Code') ?></span></label> + <div class="control"> + <input class="input-text validate-postcode<?php if ($this->isZipCodeRequired()):?> required-entry<?php endif;?>" type="text" id="postcode" name="estimate_postcode" value="<?php echo $this->escapeHtml($this->getEstimatePostcode()) ?>" /> + </div> + </div> + <div class="actions"> + <button type="submit" class="action quote"><span><?php echo __('Get a Quote') ?></span></button> </div> - </form> - <script type="text/javascript"> - (function($) { - head.js( - "<?php echo $this->getViewFileUrl('jquery/jquery.validate.js') ?>", - "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js') ?>", - "<?php echo $this->getViewFileUrl('mage/validation.js')?>", - "<?php echo $this->getViewFileUrl('mage/validation/validation.js') ?>", - "<?php echo $this->getViewFileUrl('Magento_Checkout::js/region-updater.js') ?>", - function() { - $('#country').regionUpdater({ - optionalRegionAllowed: <?php echo ($this->getConfig('general/region/display_all')? 'true' : 'false'); ?>, - regionListId: '#region_id', - regionInputId: '#region', - postcodeId: '#postcode', - form: $('#shipping-zip-form').validation(), - regionJson: <?php echo $this->helper('Magento\Directory\Helper\Data')->getRegionJson() ?>, - defaultRegion: "<?php echo $this->getEstimateRegionId() ?>", - countriesWithOptionalZip: <?php echo $this->helper('Magento\Directory\Helper\Data')->getCountriesWithOptionalZip(true) ?> - }); + </fieldset> + </form> + <script type="text/javascript"> + (function($) { + head.js( + "<?php echo $this->getViewFileUrl('jquery/jquery.validate.js') ?>", + "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js') ?>", + "<?php echo $this->getViewFileUrl('mage/validation.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation/validation.js') ?>", + "<?php echo $this->getViewFileUrl('Magento_Checkout::js/region-updater.js') ?>", + function() { + $('#country').regionUpdater({ + optionalRegionAllowed: <?php echo ($this->getConfig('general/region/display_all')? 'true' : 'false'); ?>, + regionListId: '#region_id', + regionInputId: '#region', + postcodeId: '#postcode', + form: $('#shipping-zip-form').validation(), + regionJson: <?php echo $this->helper('Magento\Directory\Helper\Data')->getRegionJson() ?>, + defaultRegion: "<?php echo $this->getEstimateRegionId() ?>", + countriesWithOptionalZip: <?php echo $this->helper('Magento\Directory\Helper\Data')->getCountriesWithOptionalZip(true) ?> }); - })(jQuery); - </script> - - <?php if (($_shippingRateGroups = $this->getEstimateRates())): ?> - <form id="co-shipping-method-form" action="<?php echo $this->getUrl('checkout/cart/estimateUpdatePost') ?>"> - <dl class="sp-methods"> + }); + })(jQuery); + </script> + <?php if (($_shippingRateGroups = $this->getEstimateRates())): ?> + <form id="co-shipping-method-form" action="<?php echo $this->getUrl('checkout/cart/estimateUpdatePost') ?>"> + <fieldset class="fieldset rates"> + <dl class="items methods"> <?php foreach ($_shippingRateGroups as $code => $_rates): ?> - <dt><?php echo $this->escapeHtml($this->getCarrierName($code)) ?></dt> - <dd> - <ul> - <?php foreach ($_rates as $_rate): ?> - <li<?php if ($_rate->getErrorMessage()) echo ' class="error-msg"';?>> - <?php if ($_rate->getErrorMessage()): ?> - <?php echo $this->escapeHtml($_rate->getErrorMessage()) ?> - <?php else: ?> - <input name="estimate_method" type="radio" value="<?php echo $this->escapeHtml($_rate->getCode()) ?>" id="s_method_<?php echo $_rate->getCode() ?>"<?php if($_rate->getCode()===$this->getAddressShippingMethod()) echo ' checked="checked"' ?> class="radio" /> - <label for="s_method_<?php echo $_rate->getCode() ?>"><?php echo $this->escapeHtml($_rate->getMethodTitle()) ?> + <dt class="item title"><span><?php echo $this->escapeHtml($this->getCarrierName($code)) ?></span></dt> + <dd class="item options"> + <?php foreach ($_rates as $_rate): ?> + <div class="field choice item<?php if ($_rate->getErrorMessage()) echo ' error-msg';?>"> + <?php if ($_rate->getErrorMessage()): ?> + <?php echo $this->escapeHtml($_rate->getErrorMessage()) ?> + <?php else: ?> + <input name="estimate_method" type="radio" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?>"<?php if($_rate->getCode()===$this->getAddressShippingMethod()) echo ' checked="checked"' ?> class="radio" /> + <label class="label" for="s_method_<?php echo $_rate->getCode() ?>"> + <span><?php echo $this->escapeHtml($_rate->getMethodTitle()) ?></span> <?php $_excl = $this->getShippingPrice($_rate->getPrice(), $this->helper('Magento\Tax\Helper\Data')->displayShippingPriceIncludingTax()); ?> <?php $_incl = $this->getShippingPrice($_rate->getPrice(), true); ?> <?php echo $_excl; ?> <?php if ($this->helper('Magento\Tax\Helper\Data')->displayShippingBothPrices() && $_incl != $_excl): ?> (<?php echo __('Incl. Tax'); ?> <?php echo $_incl; ?>) <?php endif; ?> - </label> - <?php endif ?> - </li> - <?php endforeach; ?> - </ul> + </label> + <?php endif ?> + </div> + <?php endforeach; ?> </dd> <?php endforeach; ?> </dl> - <div class="buttons-set"> - <button type="submit" title="<?php echo __('Update Total') ?>" class="button" name="do" value="<?php echo __('Update Total') ?>"><span><span><?php echo __('Update Total') ?></span></span></button> + <div class="actions"> + <button type="submit" class="action update" name="do" value="<?php echo __('Update Total') ?>"><span><?php echo __('Update Total') ?></span></button> </div> - </form> - <?php endif; ?> + </fieldset> + </form> + <?php endif; ?> </div> </div> diff --git a/app/code/Magento/Checkout/view/frontend/cart/sidebar/default.phtml b/app/code/Magento/Checkout/view/frontend/cart/sidebar/default.phtml index ca93d77ee3247a35e91836cc8754ff79736ba0bd..a0d912bd6467abeed6dbcfd9afb03304df701aca 100644 --- a/app/code/Magento/Checkout/view/frontend/cart/sidebar/default.phtml +++ b/app/code/Magento/Checkout/view/frontend/cart/sidebar/default.phtml @@ -19,127 +19,188 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design - * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -<?php - $_item = $this->getItem(); - $isVisibleProduct = $_item->getProduct()->isVisibleInSiteVisibility(); - $canApplyMsrp = $this->helper('Magento\Catalog\Helper\Data')->canApplyMsrp($_item->getProduct(), \Magento\Catalog\Model\Product\Attribute\Source\Msrp\Type::TYPE_BEFORE_ORDER_CONFIRM); -?> -<li class="item"> +<?php $_item = $this->getItem() ?> +<?php $canApplyMsrp = $this->helper('Magento\Catalog\Helper\Data')->canApplyMsrp($_item->getProduct(), \Magento\Catalog\Model\Product\Attribute\Source\Msrp\Type::TYPE_BEFORE_ORDER_CONFIRM); ?> +<?php $imageBlock = $this->getLayout()->createBlock('Magento\Catalog\Block\Product\Image')?> +<li class="item product"> +<div class="product"> <?php if ($this->hasProductUrl()): ?> - <a href="<?php echo $this->getProductUrl()?>" title="<?php echo $this->escapeHtml($this->getProductName()) ?>" class="product-image"><img src="<?php echo $this->getProductThumbnailSidebarUrl() ?>" width="<?php echo $this->getThumbnailSidebarSize()?>" height="<?php echo $this->getThumbnailSidebarSize()?>" alt="<?php echo $this->escapeHtml($this->getProductName()) ?>" /></a> + <a href="<?php echo $this->getProductUrl()?>" title="<?php echo $this->escapeHtml($this->getProductName()) ?>" class="product photo"> + <?php echo $imageBlock->init($_item->getProduct(), 'mini_cart_product_thumbnail')->toHtml() ?> + </a> <?php else: ?> - <span class="product-image"><img src="<?php echo $this->getProductThumbnailSidebarUrl() ?>" width="<?php echo $this->getThumbnailSidebarSize()?>" height="<?php echo $this->getThumbnailSidebarSize()?>" alt="<?php echo $this->escapeHtml($this->getProductName()) ?>" /></span> + <span class="product photo"> + <?php echo $imageBlock->init($_item->getProduct(), 'mini_cart_product_thumbnail')->toHtml() ?> + </span> <?php endif; ?> - <div class="product-details"> - <a href="<?php echo $this->getDeleteUrl() ?>" title="<?php echo __('Remove This Item') ?>" class="btn-remove"><?php echo __('Remove This Item') ?></a> - <?php if ($isVisibleProduct): ?> - <a href="<?php echo $this->getConfigureUrl() ?>" title="<?php echo __('Edit item') ?>" class="btn-edit"><?php echo __('Edit item')?></a> - <?php endif ?> - <p class="product-name"><?php if ($this->hasProductUrl()): ?><a href="<?php echo $this->getProductUrl() ?>"><?php endif; ?><?php echo $this->escapeHtml($this->getProductName()) ?><?php if ($this->hasProductUrl()): ?></a><?php endif; ?></p> - <strong><?php echo $this->getQty() ?></strong> x - <?php if ($canApplyMsrp): ?> + <div class="product details"> + <strong class="product name"> + <?php if ($this->hasProductUrl()): ?> + <a href="<?php echo $this->getProductUrl() ?>"><?php echo $this->escapeHtml($this->getProductName()) ?></a> + <?php else: ?> + <?php echo $this->escapeHtml($this->getProductName()) ?> + <?php endif; ?> + </strong> - <span class="map-cart-sidebar-item"><?php echo __('See price before order confirmation.'); ?></span> - <?php else: ?> + <?php if ($_options = $this->getOptionList()):?> + <div class="product options wrapper"> + <span class="more"><?php echo __('View Details') ?></span> - <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartPriceExclTax() || $this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> - <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> - <?php echo __('Excl. Tax'); ?>: - <?php endif; ?> - <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, array(0, 1, 4), 'sales')): ?> - <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?> - <?php else: ?> - <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_item->getCalculationPrice()) ?> - <?php endif; ?> - <?php if ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item)): ?> - <br /> - <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 1, 'sales')): ?> - <small> - <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount'],true,true); ?></span><br /> - <?php endforeach; ?> - </small> - <?php elseif ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 2, 'sales')): ?> - <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount_incl_tax'],true,true); ?></small></span><br /> - <?php endforeach; ?> - <?php elseif ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 4, 'sales')): ?> - <small> - <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount_incl_tax'],true,true); ?></span><br /> - <?php endforeach; ?> - </small> - <?php endif; ?> - <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 2, 'sales')): ?> - <span class="nobr"><?php echo __('Total'); ?>:<br /> <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?></span> + <div class="product options details"> + <strong class="title"><?php echo __('Options Details'); ?></strong> + <dl class="product options list"> + <?php foreach ($_options as $_option) : ?> + <dt><?php echo $this->escapeHtml($_option['label']) ?></dt> + <dd> + <?php if (is_array($_option['value'])): ?> + <?php echo nl2br(implode("\n", $_option['value'])) ?> + <?php else: ?> + <?php echo $_option['value'] ?> + <?php endif; ?> + </dd> + <?php endforeach; ?> + </dl> + </div> + </div> <?php endif; ?> - <?php endif; ?> - <?php endif; ?> + <?php if ($_item->getProduct()->isVisibleInSiteVisibility()):?> + <a href="<?php echo $this->getConfigureUrl() ?>" title="<?php echo __('Edit item') ?>" class="action edit"><span><?php echo __('Edit')?></span></a> + <?php endif ?> - <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartPriceInclTax() || $this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> - <?php $_incl = $this->helper('Magento\Checkout\Helper\Data')->getPriceInclTax($_item); ?> - <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> - <br /><?php echo __('Incl. Tax'); ?>: - <?php endif; ?> - <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, array(0, 1, 4), 'sales')): ?> - <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?> - <?php else: ?> - <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_incl-$_item->getWeeeTaxDisposition()) ?> - <?php endif; ?> - <?php if ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item)): ?> - <br /> - <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 1, 'sales')): ?> - <small> - <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount'],true,true); ?></span><br /> - <?php endforeach; ?> - </small> - <?php elseif ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 2, 'sales')): ?> - <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount_incl_tax'],true,true); ?></small></span><br /> - <?php endforeach; ?> - <?php elseif ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 4, 'sales')): ?> - <small> - <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount_incl_tax'],true,true); ?></span><br /> - <?php endforeach; ?> - </small> - <?php endif; ?> - <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 2, 'sales')): ?> - <span class="nobr"><?php echo __('Total incl. tax'); ?>:<br /> <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?></span> - <?php endif; ?> - <?php endif; ?> - <?php endif; ?> + <?php // Prices ?> + + <div class="pricing details<?php echo $this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices() ? ' complex' : ''; ?>"> + <?php if ($canApplyMsrp): ?> + + <div class="rate map"> + <span class="label"><?php echo __('Price'); ?></span> + <span class="value"><?php echo __('See price before order confirmation.'); ?></span> + </div> + + <?php else: ?> + + <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartPriceExclTax() || $this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> + <div class="rate"> + <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> + <span class="label excl tax"><?php echo __('Excl. Tax'); ?></span> + <?php else: ?> + <span class="label display"><?php echo __('Price'); ?></span> + <?php endif; ?> + <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, array(0, 1, 4), 'sales')): ?> + <span class="value excl tax"> + <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?> + </span> + <?php else: ?> + <span class="value display"> + <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_item->getCalculationPrice()) ?> + </span> + <?php endif; ?> + </div> + + <?php if ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item)): ?> + <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 1, 'sales')): ?> + + <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> + <div class="rate weee"> + <span class="label weee"><?php echo $tax['title']; ?></span> + <span class="value weee"><?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount'],true,true); ?></span> + </div> + <?php endforeach; ?> + + <?php elseif ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 2, 'sales')): ?> + <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> + <div class="rate weee"> + <span class="label weee"><?php echo $tax['title']; ?></span> + <span class="value weee"><?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount_incl_tax'],true,true); ?></span> + </div> + <?php endforeach; ?> + <?php elseif ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 4, 'sales')): ?> - <?php endif; //Can apply MSRP ?> - - <?php if ($_options = $this->getOptionList()):?> - <div class="truncated" data-mage-init="{truncateOptions:[]}"> - <div class="truncated_full_value"> - <dl class="item-options"> - <?php foreach ($_options as $_option) : ?> - <dt><?php echo $this->escapeHtml($_option['label']) ?></dt> - <dd> - <?php if (is_array($_option['value'])): ?> - <?php echo nl2br(implode("\n", $_option['value'])) ?> + <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> + <div class="rate weee"> + <span class="label weee"><?php echo $tax['title']; ?></span> + <span class="value weee"><?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount_incl_tax'],true,true); ?></span> + </div> + <?php endforeach; ?> + + <?php endif; ?> + <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 2, 'sales')): ?> + <div class="rate weee total"> + <span class="label weee"><?php echo __('Total:'); ?></span> + <span class="value weee"><?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?></span> + </div> + <?php endif; ?> + <?php endif; ?> + <?php endif; ?> + + <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartPriceInclTax() || $this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> + <?php $_incl = $this->helper('Magento\Checkout\Helper\Data')->getPriceInclTax($_item); ?> + <div class="rate"> + <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> + <span class="label tax incl"><?php echo __('Incl. Tax'); ?></span> <?php else: ?> - <?php echo $_option['value'] ?> + <span class="label display"><?php echo __('Price'); ?></span> <?php endif; ?> - </dd> - <?php endforeach; ?> - </dl> - </div> - <a href="#" onclick="return false;" class="details"><?php echo __('Details') ?></a> + <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, array(0, 1, 4), 'sales')): ?> + <span class="value tax incl"><?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?></span> + <?php else: ?> + <span class="value display"><?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_incl-$_item->getWeeeTaxDisposition()) ?></span> + <?php endif; ?> + </div> + <?php if ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item)): ?> + + <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 1, 'sales')): ?> + <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> + <div class="rate weee"> + <span class="label weee"><?php echo $tax['title']; ?></span> + <span class="value weee"><?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount'],true,true); ?></span> + </div> + <?php endforeach; ?> + <?php elseif ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 2, 'sales')): ?> + <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> + <div class="rate weee"> + <span class="label weee"><?php echo $tax['title']; ?></span> + <span class="value weee"><?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount_incl_tax'],true,true); ?></span> + </div> + <?php endforeach; ?> + <?php elseif ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 4, 'sales')): ?> + <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> + <div class="rate weee"> + <span class="label weee"><?php echo $tax['title']; ?></span> + <span class="value weee"><?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount_incl_tax'],true,true); ?></span> + </div> + <?php endforeach; ?> + <?php endif; ?> + <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 2, 'sales')): ?> + <div class="rate weee total"> + <span class="label weee tax incl"><?php echo __('Total incl. tax'); ?></span> + <span class="value weee"><?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?></span> + </div> + <?php endif; ?> + <?php endif; ?> + <?php endif; ?> + + <?php endif; //Can apply MSRP ?> + + <div class="details qty"> + <span class="label"><?php echo __('Qty'); ?></span> + <span class="value qty"><?php echo $this->getQty() ?></span> + </div> + </div> + + <div class="product actions"> + <a href="<?php echo $this->getDeleteUrl() ?>" title="<?php echo __('Remove item') ?>" class="action delete"> + <span><?php echo __('Remove')?></span> + </a> </div> - <?php endif; ?> </div> +</div> </li> diff --git a/app/code/Magento/Checkout/view/frontend/cart/totals.phtml b/app/code/Magento/Checkout/view/frontend/cart/totals.phtml index 53a0e844767325d825be65a7df87d18f394f4a54..605a230d6cbe707557320af593152b18051a7ce9 100644 --- a/app/code/Magento/Checkout/view/frontend/cart/totals.phtml +++ b/app/code/Magento/Checkout/view/frontend/cart/totals.phtml @@ -19,7 +19,6 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design - * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ @@ -27,22 +26,18 @@ <?php /** * Shopping cart totals template - * - * @see \Magento\Checkout\Block\Cart\Totals * @var $this \Magento\Checkout\Block\Cart\Totals */ ?> +<div class="cart totals"> <?php if ($this->canApplyMsrp()): ?> <div class="cart-msrp-totals"><?php echo __('You will see the order total before you submit the order.'); ?></div> <?php else: ?> - <table id="shopping-cart-totals-table"> - <col /> - <col width="1" /> + <table id="shopping-cart-totals-table" class="data table totals"> + <?php echo $this->renderTotals(); ?> <tfoot> <?php echo $this->renderTotals('footer'); ?> </tfoot> - <tbody> - <?php echo $this->renderTotals(); ?> - </tbody> </table> <?php endif; ?> +</div> diff --git a/app/code/Magento/Checkout/view/frontend/js/opcheckout.js b/app/code/Magento/Checkout/view/frontend/js/opcheckout.js index b9e20dd2b43ac369dfdc67cf8904fb73357cb3dd..1e2f48c7e8d62b7b0adcd4b6de9b6865d5dcf319 100644 --- a/app/code/Magento/Checkout/view/frontend/js/opcheckout.js +++ b/app/code/Magento/Checkout/view/frontend/js/opcheckout.js @@ -34,7 +34,7 @@ loginRegisterSelector: '#login\\:register', loginFormSelector: '#login-form', continueSelector: '#onepage-guest-register-button', - registerCustomerPasswordSelector: '#register-customer-password', + registerCustomerPasswordSelector: '#co-billing-form .field.password,#co-billing-form .field.confirm', suggestRegistration: false }, sectionSelectorPrefix: '#opc-', @@ -42,8 +42,12 @@ ajaxLoaderPlaceButton: false, updateSelectorPrefix: '#checkout-', updateSelectorSuffix: '-load', - backSelector: '.back-link', - minBalance: 0.0001 + backSelector: '.action.back', + minBalance: 0.0001, + methodsListContainer: 'dl', + methodContainer: 'dt', + methodDescription : 'dd ul', + methodOn: 'dt input:radio' }, _create: function() { @@ -83,6 +87,7 @@ * @private */ _ajaxSend: function() { + this.element.addClass('loading'); var loader = this.element.find('.section.active .please-wait').show(); if (this.options.ajaxLoaderPlaceButton) { loader.siblings('.button').hide(); @@ -94,6 +99,7 @@ * @private */ _ajaxComplete: function() { + this.element.removeClass('loading'); this.element.find('.please-wait').hide(); if (this.options.ajaxLoaderPlaceButton) { this.element.find('.button').show(); @@ -232,13 +238,13 @@ this._super(); this.element .on('change', this.options.billing.addressDropdownSelector, $.proxy(function(e) { - this.element.find(this.options.billing.newAddressFormSelector).toggle(!$(e.target).val()); - }, this)) + this.element.find(this.options.billing.newAddressFormSelector).toggle(!$(e.target).val()); + }, this)) .on('click', this.options.billing.continueSelector, $.proxy(function() { - if ($(this.options.billing.form).validation && $(this.options.billing.form).validation('isValid')) { - this._billingSave(); - } - }, this)) + if ($(this.options.billing.form).validation && $(this.options.billing.form).validation('isValid')) { + this._billingSave(); + } + }, this)) .find(this.options.billing.form).validation(); } , @@ -267,24 +273,24 @@ this._super(); this.element .on('change', this.options.shipping.addressDropdownSelector, $.proxy(function(e) { - $(this.options.shipping.newAddressFormSelector).toggle(!$(e.target).val()); - }, this)) + $(this.options.shipping.newAddressFormSelector).toggle(!$(e.target).val()); + }, this)) .on('input propertychange', this.options.shipping.form + ' :input[name]', $.proxy(function() { - $(this.options.shipping.copyBillingSelector).prop('checked', false); - }, this)) + $(this.options.shipping.copyBillingSelector).prop('checked', false); + }, this)) .on('click', this.options.shipping.copyBillingSelector, $.proxy(function(e) { - if ($(e.target).is(':checked')) { - this._billingToShipping(); - } - }, this)) + if ($(e.target).is(':checked')) { + this._billingToShipping(); + } + }, this)) .on('click', this.options.shipping.continueSelector, $.proxy(function() { - if ($(this.options.shipping.form).validation && $(this.options.shipping.form).validation('isValid')) { + if ($(this.options.shipping.form).validation && $(this.options.shipping.form).validation('isValid')) { this._ajaxContinue(this.options.shipping.saveUrl, $(this.options.shipping.form).serialize(), false, function() { //Trigger indicating shipping save. eg. GiftMessage listens to this to inject gift options this.element.trigger('shippingSave'); }); - } - }, this)) + } + }, this)) .find(this.options.shipping.form).validation(); }, @@ -318,12 +324,12 @@ var _this = this; this.element .on('click', this.options.shippingMethod.continueSelector, $.proxy(function() { - if (this._validateShippingMethod()&& - $(this.options.shippingMethod.form).validation && - $(this.options.shippingMethod.form).validation('isValid')) { - this._ajaxContinue(this.options.shippingMethod.saveUrl, $(this.options.shippingMethod.form).serialize()); - } - }, this)) + if (this._validateShippingMethod()&& + $(this.options.shippingMethod.form).validation && + $(this.options.shippingMethod.form).validation('isValid')) { + this._ajaxContinue(this.options.shippingMethod.saveUrl, $(this.options.shippingMethod.form).serialize()); + } + }, this)) .on('click', 'input[name="shipping_method"]', function() { var selectedPrice = _this.shippingCodePrice[$(this).val()] || 0, oldPrice = _this.shippingCodePrice[_this.currentShippingMethod] || 0; @@ -331,9 +337,9 @@ _this.currentShippingMethod = $(this).val(); }) .on('contentUpdated', $.proxy(function() { - this.currentShippingMethod = this.element.find('input[name="shipping_method"]:checked').val(); - this.shippingCodePrice = this.element.find('[data-shipping-code-price]').data('shipping-code-price'); - }, this)) + this.currentShippingMethod = this.element.find('input[name="shipping_method"]:checked').val(); + this.shippingCodePrice = this.element.find('[data-shipping-code-price]').data('shipping-code-price'); + }, this)) .find(this.options.shippingMethod.form).validation(); }, @@ -374,39 +380,39 @@ this._super(); this.element .on('click', this.options.payment.continueSelector, $.proxy(function() { - if (this._validatePaymentMethod() && - $(this.options.payment.form).validation && - $(this.options.payment.form).validation('isValid')) { - this._ajaxContinue(this.options.payment.saveUrl, $(this.options.payment.form).serialize()); - } - }, this)) + if (this._validatePaymentMethod() && + $(this.options.payment.form).validation && + $(this.options.payment.form).validation('isValid')) { + this._ajaxContinue(this.options.payment.saveUrl, $(this.options.payment.form).serialize()); + } + }, this)) .on('updateCheckoutPrice', $.proxy(function(event, data) { - if (data.price) { - this.checkoutPrice += data.price; - } - if (data.totalPrice) { - data.totalPrice = this.checkoutPrice; - } - if (this.checkoutPrice < this.options.minBalance) { - // Add free input field, hide and disable unchecked checkbox payment method and all radio button payment methods - this._disablePaymentMethods(); - } else { - // Remove free input field, show all payment method - this._enablePaymentMethods(); - } - }, this)) + if (data.price) { + this.checkoutPrice += data.price; + } + if (data.totalPrice) { + data.totalPrice = this.checkoutPrice; + } + if (this.checkoutPrice < this.options.minBalance) { + // Add free input field, hide and disable unchecked checkbox payment method and all radio button payment methods + this._disablePaymentMethods(); + } else { + // Remove free input field, show all payment method + this._enablePaymentMethods(); + } + }, this)) .on('contentUpdated', this.options.payment.form, $.proxy(function() { - $(this.options.payment.form).find('dd [name^="payment["]').prop('disabled', true); - var checkoutPrice = this.element.find(this.options.payment.form).find('[data-checkout-price]').data('checkout-price'); - if ($.isNumeric(checkoutPrice)) { - this.checkoutPrice = checkoutPrice; - } - if (this.checkoutPrice < this.options.minBalance) { - this._disablePaymentMethods(); - } else { - this._enablePaymentMethods(); - } - }, this)) + $(this.options.payment.form).find('dd [name^="payment["]').prop('disabled', true); + var checkoutPrice = this.element.find(this.options.payment.form).find('[data-checkout-price]').data('checkout-price'); + if ($.isNumeric(checkoutPrice)) { + this.checkoutPrice = checkoutPrice; + } + if (this.checkoutPrice < this.options.minBalance) { + this._disablePaymentMethods(); + } else { + this._enablePaymentMethods(); + } + }, this)) .on('click', this.options.payment.form + ' dt input:radio', $.proxy(this._paymentMethodHandler, this)) .find(this.options.payment.form).validation({ errorPlacement: function(error, element) { @@ -426,11 +432,11 @@ */ _paymentMethodHandler: function(e) { var _this = $(e.target), - parentsDl = _this.closest('dl'); - parentsDl.find('dt input:radio').prop('checked', false); + parentsDl = _this.closest(this.options.methodsListContainer); + parentsDl.find(this.options.methodOn).prop('checked', false); _this.prop('checked', true); - parentsDl.find('dd ul').hide().find('[name^="payment["]').prop('disabled', true); - _this.parent().nextUntil('dt').find('ul').show().find('[name^="payment["]').prop('disabled', false); + parentsDl.find(this.options.methodDescription).hide().find('[name^="payment["]').prop('disabled', true); + _this.parent().nextUntil(this.options.methodContainer).find(this.options.methodDescription).show().find('[name^="payment["]').prop('disabled', false); }, /** @@ -460,8 +466,8 @@ _disablePaymentMethods: function() { var paymentForm = $(this.options.payment.form); paymentForm.find('input[name="payment[method]"]').prop('disabled', true); - paymentForm.find(this.options.payment.methodsContainer).hide().find('[name^="payment["]').prop('disabled', true); - paymentForm.find('input[id^="use"][name^="payment[use"]:not(:checked)').prop('disabled', true).parent().hide(); + paymentForm.find(this.options.payment.methodsContainer).find('[name^="payment["]').prop('disabled', true); + paymentForm.find('input[id^="use"][name^="payment[use"]:not(:checked)').prop('disabled', true).parent(); paymentForm.find(this.options.payment.freeInput.selector).remove(); $.tmpl(this.options.payment.freeInput.tmpl).appendTo(paymentForm); }, @@ -486,7 +492,7 @@ review: { continueSelector: '#review-buttons-container .button', container: '#opc-review', - agreementFormSelector:'#checkout-agreements', + agreementFormSelector:'#checkout-agreements input[type="checkbox"]', submitContainer: '#checkout-review-submit' } }, @@ -507,12 +513,12 @@ }, _saveOrder: function() { - if ($(this.options.payment.form).validation && - $(this.options.payment.form).validation('isValid')) { - this._ajaxContinue( - this.options.review.saveUrl, + if ($(this.options.payment.form).validation && + $(this.options.payment.form).validation('isValid')) { + this._ajaxContinue( + this.options.review.saveUrl, $(this.options.payment.form).serialize() + '&' + $(this.options.review.agreementFormSelector).serialize()); - } + } } }); })(jQuery, window); diff --git a/app/code/Magento/Checkout/view/frontend/layout/checkout_cart_index.xml b/app/code/Magento/Checkout/view/frontend/layout/checkout_cart_index.xml index 72685dcf9048c5ec6f9ee0d2b271d5100ed56c67..e13f318ffbeacd92ca24883096d6e4da5b4080d4 100644 --- a/app/code/Magento/Checkout/view/frontend/layout/checkout_cart_index.xml +++ b/app/code/Magento/Checkout/view/frontend/layout/checkout_cart_index.xml @@ -24,33 +24,36 @@ */ --> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <referenceBlock name="root"> - <action method="setTemplate"> - <argument name="template" xsi:type="string">1column.phtml</argument> - </action> - </referenceBlock> <referenceContainer name="content"> <block class="Magento\Checkout\Block\Cart" name="checkout.cart" template="cart.phtml"> - <block class="Magento\Checkout\Block\Cart\Item\Renderer" as="simple" template="cart/item/default.phtml"/> - <block class="Magento\Checkout\Block\Cart\Item\Renderer\Grouped" as="grouped" template="cart/item/default.phtml"/> - <block class="Magento\Checkout\Block\Cart\Item\Renderer\Configurable" as="configurable" template="cart/item/default.phtml"/> - <container name="checkout.cart.empty.widget" as="checkout_cart_empty_widget" label="Empty Shopping Cart Content Before"/> - <container name="checkout.cart.top_methods" as="top_methods" label="Payment Methods Before Checkout Button"> - <block class="Magento\Checkout\Block\Onepage\Link" name="checkout.cart.methods.onepage.top" template="onepage/link.phtml"/> + <container name="checkout.cart.items" label="invisible" as="with-items"> + <block class="Magento\Checkout\Block\Cart" name="checkout.cart.form" as="cart-items" template="cart/form.phtml"> + <block class="Magento\Checkout\Block\Cart\Item\Renderer" as="simple" template="cart/item/default.phtml"/> + <block class="Magento\Checkout\Block\Cart\Item\Renderer\Grouped" as="grouped" template="cart/item/default.phtml"/> + <block class="Magento\Checkout\Block\Cart\Item\Renderer\Configurable" as="configurable" template="cart/item/default.phtml"/> + <container name="checkout.cart.form.before" as="form_before" label="Shopping Cart Items Before" htmlTag="div" htmlClass="rewards"/> + <container name="checkout.cart.widget" as="checkout_cart_widget" label="Shopping Cart Items After"/> + </block> + <block class="Magento\Checkout\Block\Cart\Shipping" name="checkout.cart.shipping" as="shipping" after="checkout.cart.summary.title" template="cart/shipping.phtml"/> + <block class="Magento\Checkout\Block\Cart\Coupon" name="checkout.cart.coupon" as="coupon" after="checkout.cart.shipping" template="cart/coupon.phtml"/> + <block class="Magento\Checkout\Block\Cart\Totals" name="checkout.cart.totals" as="totals" template="cart/totals.phtml"/> + <block class="Magento\Checkout\Block\Cart" name="checkout.cart.methods.bottom" template="cart/methods.phtml"> + <container name="checkout.cart.methods" as="methods" label="Payment Methods After Checkout Button"> + <block class="Magento\Checkout\Block\Onepage\Link" name="checkout.cart.methods.onepage.bottom" template="onepage/link.phtml"/> + <block class="Magento\Checkout\Block\Multishipping\Link" name="checkout.cart.methods.multishipping" template="multishipping/link.phtml"/> + </container> + </block> + <block class="Magento\Checkout\Block\Cart\Crosssell" name="checkout.cart.crosssell" template="Magento_Catalog::product/list/items.phtml" after="-"> + <arguments> + <argument name="type" xsi:type="string">crosssell</argument> + </arguments> + </block> </container> - <container name="checkout.cart.form.before" as="form_before" label="Shopping Cart Form Before"/> - <container name="checkout.cart.methods" as="methods" label="Payment Methods After Checkout Button"> - <block class="Magento\Checkout\Block\Onepage\Link" name="checkout.cart.methods.onepage.bottom" template="onepage/link.phtml"/> - <block class="Magento\Checkout\Block\Multishipping\Link" name="checkout.cart.methods.multishipping" template="multishipping/link.phtml"/> + <container name="checkout.cart.noitems" label="invisible" as="no-items"> + <block class="Magento\Checkout\Block\Cart" name="checkout.cart.empty" before="-" template="cart/noItems.phtml"/> + <container name="checkout.cart.empty.widget" as="checkout_cart_empty_widget" label="Empty Shopping Cart Content Before"/> </container> - <container name="checkout.cart.extra" label="Shopping Cart Extra Contents"> - <container name="checkout.cart.widget" as="checkout_cart_widget" before="-" label="Shopping Cart Items After"/> - <block class="Magento\Checkout\Block\Cart\Coupon" name="checkout.cart.coupon" as="coupon" template="cart/coupon.phtml"/> - </container> - <block class="Magento\Checkout\Block\Cart\Shipping" name="checkout.cart.shipping" as="shipping" template="cart/shipping.phtml"/> - <block class="Magento\Checkout\Block\Cart\Crosssell" name="checkout.cart.crosssell" as="crosssell" template="cart/crosssell.phtml"/> - <block class="Magento\Checkout\Block\Cart\Totals" name="checkout.cart.totals" as="totals" template="cart/totals.phtml"/> </block> </referenceContainer> - <container name="additional.product.info" label="Additional Product Info"/> + <!-- <block class="Magento\View\Block\Template" name="additional.product.info" template="Magento_Core::template.phtml"/> --> </layout> diff --git a/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_address_editaddress.xml b/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_address_editaddress.xml index 01155fca00b61a3a223960aeccda1a52c0f05ed8..b99353cee0e184ce30bbb9d17962b151844280f8 100644 --- a/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_address_editaddress.xml +++ b/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_address_editaddress.xml @@ -26,4 +26,9 @@ <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <update handle="checkout_multishipping"/> <update handle="checkout_multishipping_customer_address"/> + <referenceBlock name="page.main.title"> + <action method="setPageTitle"> + <argument translate="true" name="label" xsi:type="string">Edit Address</argument> + </action> + </referenceBlock> </layout> diff --git a/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_address_editbilling.xml b/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_address_editbilling.xml index 01155fca00b61a3a223960aeccda1a52c0f05ed8..024408703e3f6021981088ad69c3f23f861a2003 100644 --- a/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_address_editbilling.xml +++ b/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_address_editbilling.xml @@ -26,4 +26,9 @@ <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <update handle="checkout_multishipping"/> <update handle="checkout_multishipping_customer_address"/> + <referenceBlock name="page.main.title"> + <action method="setPageTitle"> + <argument translate="true" name="label" xsi:type="string">Change Billing Address</argument> + </action> + </referenceBlock> </layout> diff --git a/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_address_editshipping.xml b/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_address_editshipping.xml index 01155fca00b61a3a223960aeccda1a52c0f05ed8..6354c13f57ac58537621b9ac2b952af5d37309f9 100644 --- a/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_address_editshipping.xml +++ b/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_address_editshipping.xml @@ -26,4 +26,9 @@ <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <update handle="checkout_multishipping"/> <update handle="checkout_multishipping_customer_address"/> + <referenceBlock name="page.main.title"> + <action method="setPageTitle"> + <argument translate="true" name="label" xsi:type="string">Edit Shipping Address</argument> + </action> + </referenceBlock> </layout> diff --git a/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_address_newbilling.xml b/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_address_newbilling.xml index 01155fca00b61a3a223960aeccda1a52c0f05ed8..7830a2c990e7f6dc45054fe2fa242a99bef1aad1 100644 --- a/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_address_newbilling.xml +++ b/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_address_newbilling.xml @@ -26,4 +26,9 @@ <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <update handle="checkout_multishipping"/> <update handle="checkout_multishipping_customer_address"/> + <referenceBlock name="page.main.title"> + <action method="setPageTitle"> + <argument translate="true" name="label" xsi:type="string">Create Billing Address</argument> + </action> + </referenceBlock> </layout> diff --git a/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_address_newshipping.xml b/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_address_newshipping.xml index 01155fca00b61a3a223960aeccda1a52c0f05ed8..f9a3309971af37a910d2886d766c763015a6d27c 100644 --- a/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_address_newshipping.xml +++ b/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_address_newshipping.xml @@ -26,4 +26,9 @@ <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <update handle="checkout_multishipping"/> <update handle="checkout_multishipping_customer_address"/> + <referenceBlock name="page.main.title"> + <action method="setPageTitle"> + <argument translate="true" name="label" xsi:type="string">Create Shipping Address</argument> + </action> + </referenceBlock> </layout> diff --git a/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_address_selectbilling.xml b/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_address_selectbilling.xml index edbe6ce92e8a5de9ea4e21341d9db672b9eca134..c04545dfaeb51642aeb61444b481224d32d2dd3e 100644 --- a/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_address_selectbilling.xml +++ b/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_address_selectbilling.xml @@ -25,6 +25,11 @@ --> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <update handle="checkout_multishipping"/> + <referenceBlock name="page.main.title"> + <action method="setPageTitle"> + <argument name="label" translate="true" xsi:type="string">Change Billing Address</argument> + </action> + </referenceBlock> <referenceContainer name="content"> <block class="Magento\Checkout\Block\Multishipping\Address\Select" name="checkout_address_select" template="multishipping/address/select.phtml"/> </referenceContainer> diff --git a/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_addresses.xml b/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_addresses.xml index cb8f206e7354716af5da1032b29bac04c2b7baad..dacf3e65ab92a398effdbdae00d424d47483f6cd 100644 --- a/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_addresses.xml +++ b/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_addresses.xml @@ -25,6 +25,11 @@ --> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <update handle="checkout_multishipping"/> + <referenceBlock name="page.main.title"> + <action method="setPageTitle"> + <argument translate="true" name="label" xsi:type="string">Ship to Multiple Addresses</argument> + </action> + </referenceBlock> <referenceContainer name="content"> <block class="Magento\Checkout\Block\Multishipping\Addresses" name="checkout_addresses" template="multishipping/addresses.phtml"> <block class="Magento\Checkout\Block\Cart\Item\Renderer" as="default" template="multishipping/item/default.phtml"/> @@ -32,4 +37,5 @@ <block class="Magento\Checkout\Block\Cart\Item\Renderer\Configurable" as="configurable" template="multishipping/item/default.phtml"/> </block> </referenceContainer> + <block class="Magento\View\Block\Template" name="additional.product.info" template="Magento_Core::template.phtml"/> </layout> diff --git a/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_billing.xml b/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_billing.xml index 727670fe7b56bd7281e08ff961b94cadf5be183d..405c180c549cab80183aec2dd151ae2790264d2f 100644 --- a/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_billing.xml +++ b/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_billing.xml @@ -25,12 +25,19 @@ --> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <update handle="checkout_multishipping"/> + <referenceBlock name="page.main.title"> + <action method="setPageTitle"> + <argument translate="true" name="label" xsi:type="string">Billing Information</argument> + </action> + </referenceBlock> <referenceContainer name="content"> <block class="Magento\Checkout\Block\Multishipping\Billing" name="checkout_billing" template="multishipping/billing.phtml"> <action method="setMethodFormTemplate"> <argument name="method" xsi:type="string">purchaseorder</argument> <argument name="template" xsi:type="string">Magento_Payment::form/purchaseorder.phtml</argument> </action> + <container name="payment_methods_before" label="Payment Methods Before"/> + <container name="payment_methods_after" label="Payment Methods After"/> </block> </referenceContainer> </layout> diff --git a/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_customer_address.xml b/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_customer_address.xml index 8e46496c74a4abeae1308d37ec5d2d8b73abe645..dfb78250e9af3aa79ef57b4c18c266ec19ea69b2 100644 --- a/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_customer_address.xml +++ b/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_customer_address.xml @@ -27,4 +27,5 @@ <referenceContainer name="content"> <block class="Magento\Customer\Block\Address\Edit" name="customer_address_edit" template="address/edit.phtml"/> </referenceContainer> + <update handle="customer_form_template_handle"/> </layout> diff --git a/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_overview.xml b/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_overview.xml index 6fae4733fab34f677ddb6b62c02f9f764b3bc604..00fa8577451272eac678f95c9ea73202895377c7 100644 --- a/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_overview.xml +++ b/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_overview.xml @@ -25,6 +25,11 @@ --> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <update handle="checkout_multishipping"/> + <referenceBlock name="page.main.title"> + <action method="setPageTitle"> + <argument translate="true" name="label" xsi:type="string">Review Order</argument> + </action> + </referenceBlock> <referenceContainer name="content"> <block class="Magento\Checkout\Block\Multishipping\Overview" name="checkout_overview" template="multishipping/overview.phtml"> <block class="Magento\Checkout\Block\Cart\Item\Renderer" as="default" template="multishipping/item/default.phtml"/> @@ -38,9 +43,10 @@ <argument name="template" xsi:type="string"/> </action> </block> - <block class="Magento\Checkout\Block\Agreements" name="checkout.multishipping.agreements" as="agreements" template="multishipping/agreements.phtml"/> + <block class="Magento\Checkout\Block\Agreements" name="checkout.multishipping.agreements" as="agreements" template="agreements.phtml"/> <block class="Magento\Checkout\Block\Cart\Totals" name="totals"/> <container name="checkout.multishipping.overview.items.after" as="items_after" label="Overview Items After"/> </block> </referenceContainer> + <block class="Magento\View\Block\Template" name="additional.product.info" template="Magento_Core::template.phtml"/> </layout> diff --git a/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_shipping.xml b/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_shipping.xml index 09e49208bc08b01f172ffa7f34981237f598f9ef..d536294740351ea0d8ee99e118c918c9bc8423f4 100644 --- a/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_shipping.xml +++ b/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_shipping.xml @@ -25,6 +25,11 @@ --> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <update handle="checkout_multishipping"/> + <referenceBlock name="page.main.title"> + <action method="setPageTitle"> + <argument translate="true" name="title" xsi:type="string">Shipping Information</argument> + </action> + </referenceBlock> <referenceContainer name="content"> <block class="Magento\Checkout\Block\Multishipping\Shipping" name="checkout_shipping" template="multishipping/shipping.phtml"> <block class="Magento\Checkout\Block\Cart\Item\Renderer" as="default" template="multishipping/item/default.phtml"/> @@ -37,4 +42,5 @@ </block> </block> </referenceContainer> + <block class="Magento\View\Block\Template" name="additional.product.info" template="Magento_Core::template.phtml"/> </layout> diff --git a/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_success.xml b/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_success.xml index 6e453eef56b5c4d07809923cc7659816b670f26f..4d7829f661eda39b9bce32094376f06031824d59 100644 --- a/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_success.xml +++ b/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_success.xml @@ -25,6 +25,11 @@ --> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <update handle="checkout_multishipping"/> + <referenceBlock name="page.main.title"> + <action method="setPageTitle"> + <argument translate="true" name="title" xsi:type="string">Your order has been received.</argument> + </action> + </referenceBlock> <referenceContainer name="content"> <block class="Magento\Checkout\Block\Multishipping\Success" name="checkout_success" template="multishipping/success.phtml"/> </referenceContainer> diff --git a/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_additional.xml b/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_additional.xml index 7784b3f5619752cf1c1472400b48aeb1d0494e47..4502d9b80080794169e540a133fa10e682c7eda5 100644 --- a/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_additional.xml +++ b/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_additional.xml @@ -23,10 +23,10 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> +<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" type="page"> <block class="Magento\Checkout\Block\Onepage\Shipping\Method\Additional" name="shipping_method_additional" output="1" template="onepage/shipping_method/additional.phtml"> - <action method="setDontDisplayContainer"> - <argument name="param" xsi:type="string">1</argument> - </action> + <arguments> + <argument name="dontDisplayContainer" xsi:type="string">1</argument> + </arguments> </block> </layout> diff --git a/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_failure.xml b/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_failure.xml index fa508817825c5823e9f48ef086cec96b34cd79ec..f4a491f3acb67bdb34dcee15a4be63af559fbeb0 100644 --- a/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_failure.xml +++ b/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_failure.xml @@ -24,9 +24,10 @@ */ --> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <referenceBlock name="root"> - <action method="setTemplate"> - <argument name="template" xsi:type="string">2columns-right.phtml</argument> + <update handle="page_one_column"/> + <referenceBlock name="page.main.title"> + <action method="setPageTitle"> + <argument translate="true" name="title" xsi:type="string">Your order has been received.</argument> </action> </referenceBlock> <referenceContainer name="content"> diff --git a/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_index.xml b/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_index.xml index d50608564d235a2e7ded059555e01d0e1432b887..85128b7b94f3ec9d9f6bee5871890c764b039a28 100644 --- a/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_index.xml +++ b/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_index.xml @@ -24,12 +24,8 @@ */ --> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <referenceBlock name="root"> - <action method="setTemplate"> - <argument name="template" xsi:type="string">2columns-right.phtml</argument> - </action> - </referenceBlock> - <referenceContainer name="right"> + <update handle="page_one_column"/> + <referenceContainer name="content"> <container name="checkout.progress.wrapper" label="Checkout Progress Wrapper" htmlTag="div" htmlId="checkout-progress-wrapper"> <block class="Magento\Checkout\Block\Onepage\Progress" name="checkout.progress" before="-" template="onepage/progress.phtml"/> </container> @@ -38,9 +34,12 @@ <block class="Magento\Checkout\Block\Onepage" name="checkout.onepage" template="onepage.phtml"> <block class="Magento\Checkout\Block\Onepage\Login" name="checkout.onepage.login" as="login" template="onepage/login.phtml"> <container name="checkout.onepage.login.before" as="login_before" label="Login/Registration Before" htmlTag="div"/> + <container name="form.login.additional.info" label="invisible" as="form_additional_info"/> + </block> + <block class="Magento\Checkout\Block\Onepage\Billing" name="checkout.onepage.billing" as="billing" template="onepage/billing.phtml"> + <container name="form.billing.additional.info" label="invisible" as="form_additional_info"/> </block> - <block class="Magento\Checkout\Block\Onepage\Billing" name="checkout.onepage.billing" as="billing" template="onepage/billing.phtml"/> - <block class="Magento\Checkout\Block\Onepage\Shipping" name="checkout.onepage.shipping" as="shipping" template="onepage/shipping.phtml"/> + <block class="Magento\Checkout\Block\Onepage\Shipping" name="checkout.onepage.shipping" as="shipping" template="onepage/shipping.phtml" /> <block class="Magento\Checkout\Block\Onepage\Shipping\Method" name="checkout.onepage.shipping_method" as="shipping_method" template="onepage/shipping_method.phtml"> <block class="Magento\Checkout\Block\Onepage\Shipping\Method\Available" name="checkout.onepage.shipping_method.available" as="available" template="onepage/shipping_method/available.phtml"/> <block class="Magento\Checkout\Block\Onepage\Shipping\Method\Additional" name="checkout.onepage.shipping_method.additional" as="additional" template="onepage/shipping_method/additional.phtml"/> @@ -52,8 +51,11 @@ <argument name="template" xsi:type="string">Magento_Payment::form/purchaseorder.phtml</argument> </action> </block> + <block class="Magento\View\Block\Template" name="checkout.onepage.payment.additional" as="additional"/> + <block class="Magento\View\Block\Template" name="checkout.onepage.payment.methods_additional" as="methods_additional"/> </block> <block class="Magento\Checkout\Block\Onepage\Review" name="checkout.onepage.review" as="review" template="onepage/review.phtml"/> </block> </referenceContainer> + <update handle="customer_form_template_handle"/> </layout> diff --git a/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_paymentmethod.xml b/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_paymentmethod.xml index 25a577d24d14df99f07b1f58a672146bddd8273b..c5252ab70272800f200d8e5be60a634d215ce2ee 100644 --- a/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_paymentmethod.xml +++ b/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_paymentmethod.xml @@ -29,5 +29,7 @@ <argument name="method" xsi:type="string">purchaseorder</argument> <argument name="template" xsi:type="string">Magento_Payment::form/purchaseorder.phtml</argument> </action> + <block class="Magento\View\Block\Template" name="checkout.onepage.payment.methods.scripts" as="scripts"/> + <block class="Magento\View\Block\Template" name="checkout.onepage.payment.methods.additional" as="additional"/> </block> </layout> diff --git a/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_review.xml b/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_review.xml index d2f3c9f0fee390d987a91659c9a7c0967fea0345..ae8fae2ac76aeb29953962095de5aa3fddf5ffa5 100644 --- a/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_review.xml +++ b/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_review.xml @@ -31,7 +31,8 @@ <block class="Magento\Checkout\Block\Cart\Totals" name="checkout.onepage.review.info.totals" as="totals" template="onepage/review/totals.phtml"/> <container name="checkout.onepage.review.info.items.before" as="items_before" label="Items Before"/> <container name="checkout.onepage.review.info.items.after" as="items_after" label="Items After"/> - <block class="Magento\Checkout\Block\Agreements" name="checkout.onepage.agreements" as="agreements" template="onepage/agreements.phtml"/> - <block class="Magento\Core\Block\Template" name="checkout.onepage.review.button" as="button" template="Magento_Checkout::onepage/review/button.phtml"/> + <block class="Magento\Checkout\Block\Agreements" name="checkout.onepage.agreements" as="agreements" template="agreements.phtml"/> + <block class="Magento\View\Block\Template" name="checkout.onepage.review.button" as="button" template="Magento_Checkout::onepage/review/button.phtml"/> + <block class="Magento\View\Block\Template" name="additional.product.info" template="Magento_Core::template.phtml"/> </block> </layout> diff --git a/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_success.xml b/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_success.xml index ac8dc93f7f630c463afce9e137e14508e72e515c..65a3aea343b758204154d4afec64798e1566d69d 100644 --- a/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_success.xml +++ b/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_success.xml @@ -24,9 +24,10 @@ */ --> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <referenceBlock name="root"> - <action method="setTemplate"> - <argument name="template" xsi:type="string">2columns-right.phtml</argument> + <update handle="page_one_column"/> + <referenceBlock name="page.main.title"> + <action method="setPageTitle"> + <argument translate="true" name="title" xsi:type="string">Your order has been received.</argument> </action> </referenceBlock> <referenceContainer name="content"> diff --git a/app/code/Magento/Checkout/view/frontend/layout/default.xml b/app/code/Magento/Checkout/view/frontend/layout/default.xml index 942683120c65281a8055278185cc71d80b7f134e..1088c62a07678df3464d290dedb157bbc9b81d08 100644 --- a/app/code/Magento/Checkout/view/frontend/layout/default.xml +++ b/app/code/Magento/Checkout/view/frontend/layout/default.xml @@ -27,20 +27,13 @@ <referenceBlock name="head.components"> <block class="Magento\Page\Block\Js\Components" name="checkout_page_head_components" template="Magento_Checkout::js/components.phtml"/> </referenceBlock> - <referenceBlock name="top.links"> - <block class="Magento\Checkout\Block\Cart\Link" name="my-cart-link"/> - <block class="Magento\Checkout\Block\Link" name="onepage-checkout-link" after="my-cart-link"> - <arguments> - <argument name="label" xsi:type="string">Checkout</argument> - </arguments> - </block> - </referenceBlock> - <referenceContainer name="right"> - <block class="Magento\Checkout\Block\Cart\Sidebar" name="cart_sidebar" template="cart/sidebar.phtml" before="-"> + <referenceContainer name="header"> + <block class="Magento\Checkout\Block\Cart\Sidebar" name="minicart" as="minicart" after="logo" template="cart/minicart.phtml"> <block class="Magento\Checkout\Block\Cart\Item\Renderer" as="simple" template="cart/sidebar/default.phtml"/> <block class="Magento\Checkout\Block\Cart\Item\Renderer\Grouped" as="grouped" template="cart/sidebar/default.phtml"/> <block class="Magento\Checkout\Block\Cart\Item\Renderer\Configurable" as="configurable" template="cart/sidebar/default.phtml"/> - <container name="cart_sidebar.extra_actions" as="extra_actions" label="My Cart Extra Actions"/> + <container name="minicart.extra.info" as="minicart_info" label="My Cart Extra info"/> + <container name="topCart.extra_actions" as="extra_actions" label="My Cart Extra Actions"/> </block> </referenceContainer> </layout> diff --git a/app/code/Magento/Checkout/view/frontend/multishipping/address/select.phtml b/app/code/Magento/Checkout/view/frontend/multishipping/address/select.phtml index 4dea9b79df970b74ebce5326089d506aaae4986d..2cf9a8f46884725f713714279922936fd0fff627 100644 --- a/app/code/Magento/Checkout/view/frontend/multishipping/address/select.phtml +++ b/app/code/Magento/Checkout/view/frontend/multishipping/address/select.phtml @@ -19,40 +19,40 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design - * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -<div class="multiple-checkout"> - <div class="page-title title-buttons"> - <h1><?php echo __('Change Billing Address') ?></h1> - <button type="button" title="<?php echo __('Add New Address') ?>" class="button" onclick="setLocation('<?php echo $this->getAddNewUrl() ?>')"><span><span><?php echo __('Add New Address') ?></span></span></button> +<div class="multicheckout block change billing"> + <div class="actions"> + <button type="button" class="action add" role="add-address" title="<?php echo __('Add New Address') ?>"><span><?php echo __('Add New Address') ?></span></button> </div> - <?php echo $this->getMessagesBlock()->getGroupedHtml() ?> - <?php $_index=0 ?> <?php foreach ($this->getAddressCollection() as $_address): ?> - <?php if($_index%3==0): ?><div class="col3-set"><?php endif; ?> - <div class="col-<?php echo ($_index%3+1) ?>"> - <p class="actions"> - <a href="<?php echo $this->getEditAddressUrl($_address) ?>"><?php echo __('Edit Address') ?></a> <span class="separator">|</span> - <a href="<?php echo $this->getSetAddressUrl($_address) ?>"><strong><?php echo __('Select Address') ?></strong></a> - </p> - <address> - <?php echo $_address->format('html') ?> - </address> + <div class="box billing"> + <address> + <?php echo $_address->format('html') ?> <?php if($this->isAddressDefaultBilling($_address)): ?> - <strong><?php echo __('Default Billing') ?></strong> + <br /><strong><?php echo __('Default Billing') ?></strong> <?php endif; ?> <?php if($this->isAddressDefaultShipping($_address)): ?> <br /><strong><?php echo __('Default Shipping') ?></strong> <?php endif; ?> + </address> + <div class="actions"> + <a href="<?php echo $this->getEditAddressUrl($_address) ?>" class="action edit"><span><?php echo __('Edit Address') ?></span></a> + <a href="<?php echo $this->getSetAddressUrl($_address) ?>" class="action select"><span><?php echo __('Select Address') ?></span></a> + </div> </div> - <?php $_index++ ?> - <?php if($_index && $_index%3==0): ?></div><?php endif; ?> <?php endforeach; ?> - <?php if(!$_index || $_index%3!=0): ?></div><?php endif; ?> - <div class="buttons-set"> - <p class="back-link"><a href="<?php echo $this->getBackUrl() ?>"><small>« </small><?php echo __('Back to Billing Information') ?></a></p> + <div class="actions"> + <a href="<?php echo $this->getBackUrl() ?>" class="action back"><span><?php echo __('Back to Billing Information') ?></span></a> </div> </div> +<script type="text/javascript"> + head.js("<?php echo $this->getViewFileUrl('Magento_Customer::address.js'); ?>", function() { + jQuery('.actions').address({ + addAddress: "button[role='add-address']", + addAddressLocation: '<?php echo $this->getAddNewUrl() ?>' + }); + }); +</script> diff --git a/app/code/Magento/Checkout/view/frontend/multishipping/addresses.phtml b/app/code/Magento/Checkout/view/frontend/multishipping/addresses.phtml index 2b55e1349e1152425924194ce734e89578c4bd99..e91a5f250f130e755173fee623aaea17f18f469b 100644 --- a/app/code/Magento/Checkout/view/frontend/multishipping/addresses.phtml +++ b/app/code/Magento/Checkout/view/frontend/multishipping/addresses.phtml @@ -18,8 +18,6 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * - * @category design - * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ @@ -28,57 +26,61 @@ /** * Ship to multiple address template * - * @see \Magento\Checkout\Block\Multishipping\Addresses + * @var $this \Magento\Checkout\Block\Multishipping\Addresses */ ?> -<?php echo $this->getMessagesBlock()->getGroupedHtml() ?> -<form id="checkout_multishipping_form" action="<?php echo $this->getPostActionUrl() ?>" method="post"> - <div class="multiple-checkout"> - <div class="page-title title-buttons"> - <h1><?php echo __('Ship to Multiple Addresses') ?></h1> - <button type="button" title="<?php echo __('Enter a New Address') ?>" class="button" data-role="add-new-address"><span><span><?php echo __('Enter a New Address') ?></span></span></button> - </div> - <input type="hidden" name="continue" value="0" id="can_continue_flag" /> - <input type="hidden" name="new_address" value="0" id="add_new_address_flag" /> - <h2><?php echo __('Please select a shipping address for applicable items.') ?></h2> - <table class="data-table" id="multiship-addresses-table"> - <col /> - <col width="1" /> - <col width="1" /> - <col width="1" /> - <thead> - <tr> - <th><?php echo __('Product') ?></th> - <th class="a-center"><?php echo __('Qty') ?></th> - <th><?php echo __('Send To') ?></th> - <th> </th> - </tr> - </thead> - <tfoot> - <tr> - <td colspan="100" class="a-right"><button type="submit" title="<?php echo __('Update Qty & Addresses') ?>" class="button" data-role="can-continue" data-flag="0"><span><span><?php echo __('Update Qty & Addresses') ?></span></span></button></td> - </tr> - </tfoot> - <tbody> - <?php foreach ($this->getItems() as $_index => $_item): ?> - <?php if ($_item->getQuoteItem()) :?> +<form id="checkout_multishipping_form" action="<?php echo $this->getPostActionUrl() ?>" method="post" class="multicheckout address form"> + <div class="title"> + <strong><?php echo __('Please select a shipping address for applicable items.') ?></strong> + <button type="button" title="<?php echo __('Enter a New Address') ?>" class="action add" data-role="add-new-address"><span><?php echo __('Enter a New Address') ?></span></button> + </div> + <input type="hidden" name="continue" value="0" id="can_continue_flag"/> + <input type="hidden" name="new_address" value="0" id="add_new_address_flag"/> + <table class="items data" id="multiship-addresses-table"> + <thead> + <tr> + <th class="col product"><?php echo __('Product') ?></th> + <th class="col qty"><?php echo __('Qty') ?></th> + <th class="col address"><?php echo __('Send To') ?></th> + <th class="col delete"> </th> + </tr> + </thead> + <tbody> + <?php foreach ($this->getItems() as $_index => $_item): ?> + <?php if ($_item->getQuoteItem()) : ?> <tr> - <td><?php echo $this->getItemHtml($_item->getQuoteItem())?></td> - <td><input type="text" name="ship[<?php echo $_index ?>][<?php echo $_item->getQuoteItemId() ?>][qty]" value="<?php echo $this->escapeHtml($_item->getQty()) ?>" size="2" class="input-text qty" data-validate="{number: true}"/></td> - <td><?php if ($_item->getProduct()->getIsVirtual()): echo __('Shipping selection is not applicable.'); else: echo $this->getAddressesHtmlSelect($_item, $_index); endif; ?></td> - <td class="a-center"><a href="<?php echo $this->getItemDeleteUrl($_item) ?>" title="<?php echo __('Remove Item') ?>" class="btn-remove2"><?php echo __('Remove Item') ?></a></td> + <td class="col product"><?php echo $this->getItemHtml($_item->getQuoteItem()) ?></td> + <td class="col qty"> + <div class="control qty"> + <input type="text" name="ship[<?php echo $_index ?>][<?php echo $_item->getQuoteItemId() ?>][qty]" value="<?php echo $this->escapeHtml($_item->getQty()) ?>" size="2" class="input-text qty" data-validate="{number: true}"/> + </div> + </td> + <td class="col address"> + <?php if ($_item->getProduct()->getIsVirtual()): ?> + <div class="applicable"><?php echo __('Shipping selection is not applicable.'); ?></div> + <?php else: ?> + <div class="control address"> + <?php echo $this->getAddressesHtmlSelect($_item, $_index); ?> + </div> + <?php endif; ?> + </td> + <td class="col delete"> + <a href="<?php echo $this->getItemDeleteUrl($_item) ?>" title="<?php echo __('Remove Item') ?>" class="action delete"> + <span><?php echo __('Remove item') ?></span> + </a> + </td> </tr> - <?php endif; ?> - <?php endforeach; ?> - </tbody> - </table> - <script type="text/javascript">jQuery('#multiship-addresses-table').decorate('table')</script> - <div class="buttons-set"> - <p class="back-link"><a href="<?php echo $this->getBackUrl() ?>"><small>« </small><?php echo __('Back to Shopping Cart') ?></a></p> - <button type="submit" title="<?php echo __('Continue to Shipping Information') ?>" class="button<?php if ($this->isContinueDisabled()):?> disabled<?php endif; ?>" data-role="can-continue" data-flag="1"<?php if ($this->isContinueDisabled()):?> disabled="disabled"<?php endif; ?>><span><span><?php echo __('Continue to Shipping Information') ?></span></span></button> - </div> + <?php endif; ?> + <?php endforeach; ?> + </tbody> + </table> + <div class="actions"> + <a href="<?php echo $this->getBackUrl() ?>" class="action back"><span><?php echo __('Back to Shopping Cart') ?></span></a> + <button type="submit" class="action update" data-role="can-continue" data-flag="0"><span><?php echo __('Update Qty & Addresses') ?></span></button> + <button type="submit" title="<?php echo __('Continue to Shipping Information') ?>" class="action continue<?php if ($this->isContinueDisabled()):?> disabled<?php endif; ?>" data-role="can-continue" data-flag="1"<?php if ($this->isContinueDisabled()):?> disabled="disabled"<?php endif; ?>><span><?php echo __('Continue to Shipping Information') ?></span></button> </div> </form> + <script type="text/javascript"> head.js( "<?php echo $this->getViewFileUrl('jquery/jquery.validate.js') ?>", @@ -86,7 +88,7 @@ "<?php echo $this->getViewFileUrl('mage/validation.js')?>", "<?php echo $this->getViewFileUrl('mage/validation/validation.js') ?>", "<?php echo $this->getViewFileUrl('Magento_Checkout::js/multi-shipping.js') ?>", - function() { + function () { jQuery('#checkout_multishipping_form').multiShipping().validation(); } ); diff --git a/app/code/Magento/Checkout/view/frontend/multishipping/billing.phtml b/app/code/Magento/Checkout/view/frontend/multishipping/billing.phtml index faa48086693017829739d07da92ced10af5c685e..10086cb85412d16ce5bcab65c8d895acb0fc010b 100644 --- a/app/code/Magento/Checkout/view/frontend/multishipping/billing.phtml +++ b/app/code/Magento/Checkout/view/frontend/multishipping/billing.phtml @@ -18,8 +18,6 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * - * @category design - * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ @@ -28,84 +26,72 @@ /** * Multishipping checkout billing information * - * @see \Magento\Checkout\Block\Multishipping\Billing + * @var $this \Magento\Checkout\Block\Multishipping\Billing */ ?> -<div class="multiple-checkout"> - <div class="page-title"> - <h1><?php echo __('Billing Information') ?></h1> - </div> - <?php echo $this->getMessagesBlock()->getGroupedHtml() ?> - <form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="multishipping-billing-form"> - <div class="col2-set"> - <div class="col-1 col-narrow"> - <div class="box"> - <div class="box-title"> - <h2><?php echo __('Billing Address') ?> <span class="separator">|</span> <a href="<?php echo $this->getSelectAddressUrl() ?>"><?php echo __('Change') ?></a></h2> - </div> - <div class="box-content"> - <?php $_address=$this->getAddress() ?> - <address><?php echo $_address->format('html') ?></address> - </div> - </div> - </div> - <div class="col-2 col-wide"> - <div class="box"> - <div class="box-title"> - <h2><?php echo __('Payment Method') ?></h2> - </div> - <div class="box-content"> - <!-- Payment methods forms list --> - <dl class="sp-methods"> - <?php - $_methods = $this->getMethods(); - $_methodsCount = count($_methods); - ?> - <?php foreach ($_methods as $_method): $_code = $_method->getCode() ?> - <dt> - <?php if ($_methodsCount > 1): ?> - <input type="radio" id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" name="payment[method]" title="<?php echo $this->escapeHtml($_method->getTitle()) ?>" <?php if($this->getSelectedMethodCode()==$_code): ?> checked="checked"<?php endif; ?> class="radio" /> - <?php else :?> - <span class="no-display"><input type="radio" id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" name="payment[method]" checked="checked" class="radio" /></span> - <?php endif;?> - <label for="p_method_<?php echo $_code ?>"><?php echo $this->escapeHtml($_method->getTitle()) ?></label> - </dt> - <?php if($html = $this->getChildHtml('payment.method.'.$_code)) : ?> - <dd> - <?php echo $html; ?> - </dd> - <?php endif; ?> - <?php endforeach; ?> - </dl> - <?php echo $this->getChildHtml('checkout_billing_items') ?> - </div> - </div> - </div> +<form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="multishipping-billing-form" class="form multicheckout billing"> + <div class="block billing"> + <div class="box address"> + <strong class="subtitle"> + <span><?php echo __('Billing Address') ?></span> + <a href="<?php echo $this->getSelectAddressUrl() ?>" class="action"><span><?php echo __('Change') ?></span></a> + </strong> + <?php $_address = $this->getAddress() ?> + <address><?php echo $_address->format('html') ?></address> </div> - <div class="buttons-set"> - <p class="back-link"><a href="<?php echo $this->getBackUrl() ?>"><small>« </small><?php echo __('Back to Shipping Information') ?></a></p> - <button id="payment-continue" type="submit" title="<?php echo __('Continue to Review Your Order') ?>" class="button"><span><span><?php echo __('Continue to Review Your Order') ?></span></span></button> + <div class="box method"> + <strong class="subtitle"><span><?php echo __('Payment Method') ?></span></strong> + <?php echo $this->getChildHtml('payment_methods_before') ?> + <?php /* Payment methods forms list */ ?> + <dl class="sp-methods" id="payment-methods"> + <?php + $_methods = $this->getMethods(); + $_methodsCount = count($_methods); + ?> + <?php foreach ($_methods as $_method): $_code = $_method->getCode() ?> + <dt> + <?php if ($_methodsCount > 1): ?> + <input type="radio" id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" name="payment[method]" title="<?php echo $this->escapeHtml($_method->getTitle()) ?>" <?php if ($this->getSelectedMethodCode() == $_code): ?> checked="checked"<?php endif; ?> class="radio"/> + <?php else : ?> + <input type="radio" id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" name="payment[method]" checked="checked" class="radio solo method"/> + <?php endif; ?> + <label for="p_method_<?php echo $_code ?>"><?php echo $this->escapeHtml($_method->getTitle()) ?></label> + </dt> + <?php if ($html = $this->getChildHtml('payment.method.' . $_code)) : ?> + <dd> + <?php echo $html; ?> + </dd> + <?php endif; ?> + <?php endforeach; ?> + </dl> + <?php echo $this->getChildHtml('payment_methods_after') ?> + <?php echo $this->getChildHtml('checkout_billing_items') ?> </div> - </form> - <script type="text/javascript"> - head.js( - "<?php echo $this->getViewFileUrl('jquery/jquery.validate.js')?>", - "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js')?>", - "<?php echo $this->getViewFileUrl('mage/validation.js')?>", - "<?php echo $this->getViewFileUrl('mage/validation/validation.js')?>", - "<?php echo $this->getViewFileUrl('Magento_Checkout::js/payment.js') ?>", - function() { - jQuery('#multishipping-billing-form').payment({ - checkoutPrice: <?php echo (float)$this->getQuoteBaseGrandTotal(); ?> - }).validation({ - errorPlacement: function(error, element) { - if (element.attr('data-validate') && element.attr('data-validate').indexOf('validate-cc-ukss') >= 0) { - element.parents('form').find('[data-validation-msg="validate-cc-ukss"]').html(error); - } else { - element.after(error); - } - } - }); - }); - </script> -</div> + </div> + <div class="actions"> + <a href="<?php echo $this->getBackUrl() ?>" class="action back"><span><?php echo __('Back to Shipping Information') ?></span></a> + <button id="payment-continue" type="submit" class="action continue"><span><?php echo __('Continue to Review Your Order') ?></span></button> + </div> +</form> +<script type="text/javascript"> + head.js( + "<?php echo $this->getViewFileUrl('jquery/jquery.validate.js')?>", + "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation/validation.js')?>", + "<?php echo $this->getViewFileUrl('Magento_Checkout::js/payment.js') ?>", + function() { + jQuery('#multishipping-billing-form').payment({ + checkoutPrice: <?php echo (float)$this->getQuoteBaseGrandTotal(); ?> + }).validation({ + errorPlacement: function(error, element) { + if (element.attr('data-validate') && element.attr('data-validate').indexOf('validate-cc-ukss') >= 0) { + element.parents('form').find('[data-validation-msg="validate-cc-ukss"]').html(error); + } else { + element.after(error); + } + } + }); + }); +</script> + diff --git a/app/code/Magento/Checkout/view/frontend/multishipping/billing/items.phtml b/app/code/Magento/Checkout/view/frontend/multishipping/billing/items.phtml index 96d7e0a4e99542c3be17e5adfd3e7776dd6388b4..25a6d9d17e64e11322938fe02418e8037112bcc5 100644 --- a/app/code/Magento/Checkout/view/frontend/multishipping/billing/items.phtml +++ b/app/code/Magento/Checkout/view/frontend/multishipping/billing/items.phtml @@ -19,36 +19,34 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design - * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> <?php if ($this->getQuote()->hasVirtualItems()): ?> - <div class="col2-set"> - <h2 class="legend"><?php echo __('Other Items in Your Order') ?></h2> - <div class="col-1 col-narrow"></div> - <div class="col-2 col-wide"> - <h3><?php echo __('Items') ?> <span class="separator">|</span> <a href="<?php echo $this->getVirtualProductEditUrl() ?>"><?php echo __('Edit Items') ?></a></h3> - <table class="data-table" id="unavailable-shipping-table"> - <col /> - <col width="1" /> - <thead> - <tr> - <th><?php echo __('Product Name') ?></th> - <th class="a-center"><?php echo __('Qty') ?></th> - </tr> - </thead> - <tbody> - <?php foreach ($this->getVirtualQuoteItems() as $_item): ?> - <tr> - <td><?php echo $this->getItemHtml($_item) ?></td> - <td class="a-center"><?php echo $_item->getQty() ?></td> - </tr> - <?php endforeach; ?> - </tbody> - </table> - <script type="text/javascript">(function($) {$('#unavailable-shipping-table').decorate('table')})(jQuery)</script> - </div> +<div class="block other"> + <div class="title"><strong><?php echo __('Other items in your order') ?></strong></div> + <div class="content"> + <strong class="subtitle"> + <span><?php echo __('Items') ?></span> + <a href="<?php echo $this->getVirtualProductEditUrl() ?>" class="action edit"><span><?php echo __('Edit Items') ?></></a> + </strong> + <table class="items data" id="unavailable-shipping-table"> + <thead> + <tr> + <th class="col item"><?php echo __('Product Name') ?></th> + <th class="col qty"><?php echo __('Qty') ?></th> + </tr> + </thead> + <tbody> + <?php foreach ($this->getVirtualQuoteItems() as $_item): ?> + <tr> + <td class="col item"><?php echo $this->getItemHtml($_item) ?></td> + <td class="col qty"><?php echo $_item->getQty() ?></td> + </tr> + <?php endforeach; ?> + </tbody> + </table> </div> +</div> <?php endif; ?> diff --git a/app/code/Magento/Checkout/view/frontend/multishipping/item/default.phtml b/app/code/Magento/Checkout/view/frontend/multishipping/item/default.phtml index 9f29bfc973412e94b4a9b2fa7af944ebcb180449..3b4ffb1fea8db24bace4937af3b892b16a34c290 100644 --- a/app/code/Magento/Checkout/view/frontend/multishipping/item/default.phtml +++ b/app/code/Magento/Checkout/view/frontend/multishipping/item/default.phtml @@ -19,27 +19,29 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design - * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -<h3 class="product-name"><a href="<?php echo $this->getProductUrl() ?>"><?php echo $this->escapeHtml($this->getProductName()) ?></a></h3> -<?php if ($_options = $this->getOptionList()):?> -<dl class="item-options"> - <?php foreach ($_options as $_option) : ?> - <?php $_formatedOptionValue = $this->getFormatedOptionValue($_option) ?> - <dt><?php echo $this->escapeHtml($_option['label']) ?></dt> - <dd<?php if (isset($_formatedOptionValue['full_view'])): ?> class="truncated" data-mage-init="{truncateOptions:[]}"<?php endif; ?>><?php echo $_formatedOptionValue['value'] ?> - <?php if (isset($_formatedOptionValue['full_view'])): ?> - <div class="truncated_full_value"> - <dl class="item-options"> +<div class="product details"> + <strong class="product name"><a href="<?php echo $this->getProductUrl() ?>"><?php echo $this->escapeHtml($this->getProductName()) ?></a></strong> + <?php if ($_options = $this->getOptionList()): ?> + <dl class="item options"> + <?php foreach ($_options as $_option) : ?> + <?php $_formatedOptionValue = $this->getFormatedOptionValue($_option) ?> <dt><?php echo $this->escapeHtml($_option['label']) ?></dt> - <dd><?php echo $_formatedOptionValue['full_view'] ?></dd> - </dl> - </div> - <?php endif; ?> - </dd> - <?php endforeach; ?> -</dl> -<?php endif; ?> + <dd<?php if (isset($_formatedOptionValue['full_view'])): ?> class="truncated" data-mage-init="{truncateOptions:[]}"<?php endif; ?>><?php echo $_formatedOptionValue['value'] ?> + <?php if (isset($_formatedOptionValue['full_view'])): ?> + <dl class="item options"> + <dt><?php echo $this->escapeHtml($_option['label']) ?></dt> + <dd><?php echo $_formatedOptionValue['full_view'] ?></dd> + </dl> + <?php endif; ?> + </dd> + <?php endforeach; ?> + </dl> + <?php endif; ?> + <?php if ($addtInfoBlock = $this->getProductAdditionalInformationBlock()): ?> + <?php echo $addtInfoBlock->setItem($this->getItem())->toHtml() ?> + <?php endif; ?> +</div> diff --git a/app/code/Magento/Checkout/view/frontend/multishipping/link.phtml b/app/code/Magento/Checkout/view/frontend/multishipping/link.phtml index e141179eb76567af04b7515d9e753c0046fe51c1..6d72e1a90090547a0e6fbda69b7543eb5b823f71 100644 --- a/app/code/Magento/Checkout/view/frontend/multishipping/link.phtml +++ b/app/code/Magento/Checkout/view/frontend/multishipping/link.phtml @@ -19,9 +19,8 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design - * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -<a href="<?php echo $this->getCheckoutUrl()?>" title="<?php echo __('Checkout with Multiple Addresses');?>"><?php echo __('Checkout with Multiple Addresses');?></a> +<a class="action multicheckout" href="<?php echo $this->getCheckoutUrl()?>" title="<?php echo __('Checkout with Multiple Addresses');?>"><span><?php echo __('Checkout with Multiple Addresses');?></span></a> diff --git a/app/code/Magento/Checkout/view/frontend/multishipping/overview.phtml b/app/code/Magento/Checkout/view/frontend/multishipping/overview.phtml index 73b2f58a5c06abe3e9fc0f3105d1c29f61f521f5..c08dd2689cc79e46385ef45b104f933beb6455b4 100644 --- a/app/code/Magento/Checkout/view/frontend/multishipping/overview.phtml +++ b/app/code/Magento/Checkout/view/frontend/multishipping/overview.phtml @@ -19,199 +19,167 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design - * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> <?php /** @var $this \Magento\Checkout\Block\Multishipping\Overview */ ?> -<div class="multiple-checkout"> - <div class="page-title"> - <h1><?php echo __('Review Order') ?></h1> - </div> - <?php echo $this->getMessagesBlock()->getGroupedHtml() ?> - <form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="review-order-form"> - <div class="col2-set"> - <h2 class="legend"><?php echo __('Billing Information') ?></h2> - <div class="col-1"> - <div class="box"> - <?php $_address=$this->getBillingAddress() ?> - <div class="box-title"> - <h3><?php echo __('Billing Address') ?> <span class="separator">|</span> <a href="<?php echo $this->getEditBillingAddressUrl($_address) ?>"><?php echo __('Change') ?></a></h3> - </div> - <div class="box-content"> - <address> - <?php echo $_address->format('html') ?> - </address> - </div> - </div> - </div> - <div class="col-2"> - <div class="box"> - <div class="box-title"> - <h3><?php echo __('Payment Method') ?> <span class="separator">|</span> <a href="<?php echo $this->getEditBillingUrl() ?>"><?php echo __('Change') ?></a></h3> - </div> - <div class="box-content"> - <input type="hidden" name="payment[cc_number]" value="<?php echo $this->escapeHtml($this->getPayment()->getCcNumber())?>" /> - <input type="hidden" name="payment[cc_cid]" value="<?php echo $this->escapeHtml($this->getPayment()->getCcCid())?>" /> - <?php echo $this->getPaymentHtml() ?> - </div> - </div> +<form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="review-order-form" class="form multicheckout overview"> + <div class="block billing"> + <div class="title"><strong><?php echo __('Billing Information') ?></strong></div> + <div class="box address"> + <?php $_address=$this->getBillingAddress() ?> + <strong class="subtitle"> + <span><?php echo __('Billing Address') ?></span> + <a href="<?php echo $this->getEditBillingAddressUrl($_address) ?>" class="action edit"><span><?php echo __('Change') ?></span></a> + </strong> + <address> + <?php echo $_address->format('html') ?> + </address> + </div> + <div class="box method"> + <strong class="subtitle"> + <span><?php echo __('Payment Method') ?></span> + <a href="<?php echo $this->getEditBillingUrl() ?>" class="action edit"><span><?php echo __('Change') ?></span></a> + </strong> + <div class="content"> + <input type="hidden" name="payment[cc_number]" value="<?php echo $this->escapeHtml($this->getPayment()->getCcNumber())?>" /> + <input type="hidden" name="payment[cc_cid]" value="<?php echo $this->escapeHtml($this->getPayment()->getCcCid())?>" /> + <?php echo $this->getPaymentHtml() ?> </div> - </div> + </div> + </div> + <div class="block shipping"> + <div class="title"><strong><?php echo __('Shipping Information') ?></strong></div> <?php $mergedCells = ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices() ? 2 : 1); ?> - <div class="col2-set"> - <h2 class="legend"><?php echo __('Shipping Information') ?></h2> <?php foreach ($this->getShippingAddresses() as $_index => $_address): ?> - <h3 class="legend"><?php echo __('Address %1 of %2', ($_index+1), $this->getShippingAddressCount()) ?></h3> - <div class="col-1 col-narrow"> - <div class="box"> - <div class="box-title"> - <h4><?php echo __('Shipping To') ?> <span class="separator">|</span> <a href="<?php echo $this->getEditShippingAddressUrl($_address) ?>"><?php echo __('Change') ?></a></h4> - </div> - <div class="box-content"> - <address> - <?php echo $_address->format('html') ?> - </address> - </div> - </div> - <div class="box"> - <div class="box-title"> - <h4><?php echo __('Shipping Method') ?> <span class="separator">|</span> <a href="<?php echo $this->getEditShippingUrl() ?>"><?php echo __('Change') ?></a></h4> - </div> - <div class="box-content"> - <?php if($_rate=$this->getShippingAddressRate($_address)): ?> - <p> - <?php echo $this->escapeHtml($_rate->getCarrierTitle()) ?> - <?php echo $this->escapeHtml($_rate->getMethodTitle()) ?> - <?php $_excl = $this->getShippingPriceExclTax($_address); ?> - <?php $_incl = $this->getShippingPriceInclTax($_address); ?> - <?php echo $_excl; ?> - <?php if ($this->helper('Magento\Tax\Helper\Data')->displayShippingBothPrices() && $_incl != $_excl): ?> - (<?php echo __('Incl. Tax'); ?> <?php echo $_incl; ?>) - <?php endif; ?> - </p> - <?php endif; ?> - </div> - </div> - </div> - <div class="col-2 col-wide"> - <h4><?php echo __('Items') ?> <span class="separator">|</span> <a href="<?php echo $this->getAddressesEditUrl() ?>"><?php echo __('Edit Items') ?></a></h4> - <table class="data-table" id="overview-table-<?php echo $_address->getId() ?>"> - <col /> - <col width="1" /> - <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> - <col width="1" /> - <?php endif; ?> - <col width="1" /> - <col width="1" /> - <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> - <col width="1" /> + <div class="content"> + <div class="title"> + <strong><?php echo __('Address %1 of %2', ($_index+1), $this->getShippingAddressCount()) ?></strong> + </div> + <div class="box address"> + <strong class="subtitle"> + <span><?php echo __('Shipping To') ?></span> + <a href="<?php echo $this->getEditShippingAddressUrl($_address) ?>" class="action edit"><span><?php echo __('Change') ?></span></a> + </strong> + <address> + <?php echo $_address->format('html') ?> + </address> + </div> + <div class="box method"> + <strong class="subtitle"> + <span><?php echo __('Shipping Method') ?></span> + <a href="<?php echo $this->getEditShippingUrl() ?>" class="action edit"><span><?php echo __('Change') ?></span></a> + </strong> + <?php if($_rate=$this->getShippingAddressRate($_address)): ?> + <p> + <?php echo $this->escapeHtml($_rate->getCarrierTitle()) ?> (<?php echo $this->escapeHtml($_rate->getMethodTitle()) ?>) + <?php $_excl = $this->getShippingPriceExclTax($_address); ?> + <?php $_incl = $this->getShippingPriceInclTax($_address); ?> + + <?php echo $_excl; ?> + <?php if ($this->helper('Magento\Tax\Helper\Data')->displayShippingBothPrices() && $_incl != $_excl): ?> + (<?php echo __('Incl. Tax'); ?> <?php echo $_incl; ?>) <?php endif; ?> - <thead> - <tr> - <th rowspan="<?php echo $mergedCells; ?>"><?php echo __('Product Name') ?></th> - <th colspan="<?php echo $mergedCells; ?>" class="a-center"><?php echo __('Price') ?></th> - <th rowspan="<?php echo $mergedCells; ?>"><?php echo __('Qty') ?></th> - <th colspan="<?php echo $mergedCells; ?>" class="a-center"><?php echo __('Subtotal') ?></th> - </tr> - <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> - <tr> - <th class="a-right"><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(false) ?></th> - <th><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(true) ?></th> - <th class="a-right"><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(false) ?></th> - <th><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(true) ?></th> - </tr> - <?php endif; ?> - </thead> - <tfoot> - <?php echo $this->renderTotals($this->getShippingAddressTotals($_address)); ?> - </tfoot> - <tbody> - <?php foreach ($this->getShippingAddressItems($_address) as $_item): ?> - <?php echo $this->getRowItemHtml($_item); ?> - <?php endforeach; ?> - </tbody> - </table> - <script type="text/javascript">jQuery('#overview-table-<?php echo $_address->getId() ?>').decorate('table')</script> - </div> - <?php if($this->getShippingAddressCount()!=$_index+1): ?> - <div class="divider"></div> - <?php endif; ?> - <?php endforeach; ?> - </div> - <?php if ($this->getQuote()->hasVirtualItems()): ?> - <div class="col2-set"> - <h2 class="legend"><?php echo __('Other Items in Your Order') ?></h2> - <div class="col-1 col-narrow"></div> - <div class="col-2 col-wide"> - <h3><?php echo __('Items') ?> <span class="separator">|</span> <a href="<?php echo $this->getVirtualProductEditUrl() ?>"><?php echo __('Edit Items') ?></a></h3> - <?php $mergedCells = ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices() ? 2 : 1); ?> - <table class="data-table" id="virtual-overview-table"> - <col /> - <col width="1" /> - <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> - <col width="1" /> - <?php endif; ?> - <col width="1" /> - <col width="1" /> - <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> - <col width="70" /> - <?php endif; ?> + </p> + <?php endif; ?> + </div> + <div class="box items"> + <strong class="subtitle"> + <span><?php echo __('Items') ?></span> + <a href="<?php echo $this->getAddressesEditUrl() ?>" class="action edit"><span><?php echo __('Edit Items') ?></span></a> + </strong> + <table class="items data" id="overview-table-<?php echo $_address->getId() ?>"> <thead> + <tr> + <th rowspan="<?php echo $mergedCells; ?>" class="col item"><?php echo __('Product Name') ?></th> + <th colspan="<?php echo $mergedCells; ?>" class="col price"><?php echo __('Price') ?></th> + <th rowspan="<?php echo $mergedCells; ?>" class="col qty"><?php echo __('Qty') ?></th> + <th colspan="<?php echo $mergedCells; ?>" class="col subtotal"><?php echo __('Subtotal') ?></th> + </tr> + <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> <tr> - <th rowspan="<?php echo $mergedCells; ?>"><?php echo __('Product Name') ?></th> - <th colspan="<?php echo $mergedCells; ?>" class="a-center"><?php echo __('Price') ?></th> - <th rowspan="<?php echo $mergedCells; ?>"><?php echo __('Qty') ?></th> - <th colspan="<?php echo $mergedCells; ?>" class="a-center"><?php echo __('Subtotal') ?></th> - </tr> - <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> - <tr> - <th class="a-right"><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(false) ?></th> - <th><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(true) ?></th> - <th class="a-right"><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(false) ?></th> - <th><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(true) ?></th> + <th class="col price excl tax"><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(false) ?></th> + <th class="col price incl tax"><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(true) ?></th> + <th class="col subtotal excl tax"><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(false) ?></th> + <th class="col subtotal incl tax"><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(true) ?></th> </tr> - <?php endif; ?> + <?php endif; ?> </thead> <tfoot> - <?php echo $this->renderTotals($this->getBillinAddressTotals()); ?> + <?php echo $this->renderTotals($this->getShippingAddressTotals($_address)); ?> </tfoot> <tbody> + <?php foreach ($this->getShippingAddressItems($_address) as $_item): ?> + <?php echo $this->getRowItemHtml($_item); ?> + <?php endforeach; ?> + </tbody> + </table> + </div> + </div> + <?php if($this->getShippingAddressCount()!=$_index+1): ?> + <?php endif; ?> + <?php endforeach; ?> + </div> + + <?php if ($this->getQuote()->hasVirtualItems()): ?> + <div class="block other"> + <div class="title"><strong><?php echo __('Other items in your order') ?></strong></div> + <div class="content"> + <strong class="subtitle"> + <span><?php echo __('Items') ?></span> + <a href="<?php echo $this->getVirtualProductEditUrl() ?>" class="action edit"><span><?php echo __('Edit Items') ?></span></a> + </strong> + <?php $mergedCells = ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices() ? 2 : 1); ?> + <table class="items data" id="virtual-overview-table"> + <thead> + <tr> + <th rowspan="<?php echo $mergedCells; ?>" class="col item"><?php echo __('Product Name') ?></th> + <th colspan="<?php echo $mergedCells; ?>" class="col price"><?php echo __('Price') ?></th> + <th rowspan="<?php echo $mergedCells; ?>" class="col qty"><?php echo __('Qty') ?></th> + <th colspan="<?php echo $mergedCells; ?>" class="col subtotal"><?php echo __('Subtotal') ?></th> + </tr> + <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> + <tr> + <th class="col price excl tax"><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(false) ?></th> + <th class="col price incl tax"><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(true) ?></th> + <th class="col subtotal excl tax"><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(false) ?></th> + <th class="col subtotal incl tax"><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(true) ?></th> + </tr> + <?php endif; ?> + </thead> + <tfoot> + <?php echo $this->renderTotals($this->getBillinAddressTotals()); ?> + </tfoot> + <tbody> <?php foreach ($this->getVirtualItems() as $_item): ?> <?php echo $this->getRowItemHtml($_item); ?> <?php endforeach; ?> - </tbody> - </table> - <script type="text/javascript">jQuery('#virtual-overview-table').decorate('table')</script> - </div> + </tbody> + </table> </div> - <?php endif; ?> + </div> + <?php endif; ?> - <?php echo $this->getChildHtml('items_after'); ?> + <?php echo $this->getChildHtml('items_after'); ?> - <div id="checkout-review-submit" data-mage-init="{paymentAuthentication:{}}"> - <?php echo $this->getChildHtml('agreements') ?> - <div class="place-order"> - <div class="grand-total"> - <div class="inner"> - <big><?php echo __('Grand Total:') ?> <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($this->getTotal()) ?></big> - <div id="review-buttons-container"> - <button type="submit" title="<?php echo __('Place Order') ?>" class="button btn-checkout" id="review-button"><span><span><?php echo __('Place Order') ?></span></span></button> - </div> - </div> - </div> - <span class="please-wait" id="review-please-wait" style="display:none;"> - <img src="<?php echo $this->getViewFileUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo __('Submitting order information...') ?>" title="<?php echo __('Submitting order information...') ?>" class="v-middle" /> <?php echo __('Submitting order information...') ?> - </span> - </div> - </div> - <div class="buttons-set"> - <p class="back-link"><a href="<?php echo $this->getBackUrl() ?>"><small>« </small><?php echo __('Back to Billing Information') ?></a></p> - </div> - </form> - <script type="text/javascript"> - head.js("<?php echo $this->getViewFileUrl('Magento_Checkout::js/overview.js')?>", function() { - jQuery('#review-order-form').orderOverview(); - }); - </script> -</div> + <div id="checkout-review-submit" class="checkout review"> + <?php echo $this->getChildHtml('agreements') ?> + <div class="totals grand"> + <strong class="mark"><?php echo __('Grand Total:') ?></strong> + <strong class="amount"><?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($this->getTotal()) ?></strong> + </div> + <div class="actions" id="review-buttons-container"> + <a href="<?php echo $this->getBackUrl() ?>" class="action back"><span><?php echo __('Back to Billing Information') ?></span></a> + <button type="submit" class="action submit" id="review-button"><span><?php echo __('Place Order') ?></span></button> + <span id="review-please-wait" class="please-wait load indicator" style="display:none;"> + <span><?php echo __('Submitting order information...') ?></span> + </span> + </div> + </div> +</form> +<script type="text/javascript"> + head.js("<?php echo $this->getViewFileUrl('Magento_Checkout::js/overview.js')?>", function() { + jQuery('#review-order-form').orderOverview(); + }); +</script> diff --git a/app/code/Magento/Checkout/view/frontend/multishipping/overview/item.phtml b/app/code/Magento/Checkout/view/frontend/multishipping/overview/item.phtml index bc68ca43f9e8ef027261960f4724526541978f97..d7cb049a107c014e18046e15c7fdca1b7fa6340a 100644 --- a/app/code/Magento/Checkout/view/frontend/multishipping/overview/item.phtml +++ b/app/code/Magento/Checkout/view/frontend/multishipping/overview/item.phtml @@ -33,15 +33,14 @@ ?> <?php $_item = $this->getItem() ?> <tr> - <td><?php echo $this->getRenderedBlock()->getItemHtml($_item) ?></td> - - <!--- Excluding Tax --> + <td class="col item"><?php echo $this->getRenderedBlock()->getItemHtml($_item) ?></td> +<?php /* Excluding Tax */ ?> <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartPriceExclTax() || $this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> - <td class="a-right"> + <td class="col price excl tax"> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - <div class="cart-tax-total" data-tax-toggle='{"itemTaxId" : "#eunit-item-tax-details<?php echo $_item->getId(); ?>"}'> + <span class="cart-tax-total" data-tax-toggle='{"itemTaxId" : "#eunit-item-tax-details<?php echo $_item->getId(); ?>"}'> <?php else: ?> - <div class="cart-price"> + <span class="cart-price"> <?php endif; ?> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> @@ -49,27 +48,23 @@ <?php else: ?> <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_item->getCalculationPrice()) ?> <?php endif; ?> - - </div> - + </span> <?php if ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item)): ?> <div class="cart-tax-info" id="eunit-item-tax-details<?php echo $_item->getId(); ?>" style="display: none;"> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - <small> <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount'],true,true); ?></span><br /> + <span class="weee"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount'],true,true); ?></span> <?php endforeach; ?> - </small> <?php elseif ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount_incl_tax'],true,true); ?></small></span><br /> + <span class="weee"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount_incl_tax'],true,true); ?></span> <?php endforeach; ?> <?php elseif ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> <small> <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount_incl_tax'],true,true); ?></span><br /> + <span class="weee"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount_incl_tax'],true,true); ?></span> <?php endforeach; ?> </small> <?php endif; ?> @@ -83,16 +78,16 @@ <?php endif; ?> </td> <?php endif; ?> - <!--- // Excluding Tax --> +<?php /* // Excluding Tax */ ?> - <!--- Including Tax --> +<?php /* Including Tax */ ?> <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartPriceInclTax() || $this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> - <td> + <td class="col price incll tax"> <?php $_incl = $this->helper('Magento\Checkout\Helper\Data')->getPriceInclTax($_item); ?> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - <div class="cart-tax-total" data-tax-toggle='{"itemTaxId" : "#unit-item-tax-details<?php echo $_item->getId(); ?>"}'> + <span class="cart-tax-total" data-tax-toggle='{"itemTaxId" : "#unit-item-tax-details<?php echo $_item->getId(); ?>"}'> <?php else: ?> - <div class="cart-price"> + <span class="cart-price"> <?php endif; ?> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> @@ -100,27 +95,22 @@ <?php else: ?> <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_incl-$_item->getWeeeTaxDisposition()) ?> <?php endif; ?> - - </div> + </span> <?php if ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item)): ?> <div class="cart-tax-info" id="unit-item-tax-details<?php echo $_item->getId(); ?>" style="display: none;"> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - <small> <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount'],true,true); ?></span><br /> + <span class="weee"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount'],true,true); ?></span> <?php endforeach; ?> - </small> <?php elseif ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount_incl_tax'],true,true); ?></small></span><br /> + <span class="weee"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount_incl_tax'],true,true); ?></span> <?php endforeach; ?> <?php elseif ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - <small> <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount_incl_tax'],true,true); ?></span><br /> + <span class="weee"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount_incl_tax'],true,true); ?></span> <?php endforeach; ?> - </small> <?php endif; ?> </div> @@ -133,17 +123,15 @@ </td> <?php endif; ?> - <!--- // Including Tax --> - - <td class="a-center"><?php echo $_item->getQty()*1 ?></td> - - <!--- Excluding Tax Subtotal --> +<?php /* // Including Tax */ ?> + <td class="col qty"><?php echo $_item->getQty()*1 ?></td> +<?php /* Excluding Tax Subtotal */ ?> <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartPriceExclTax() || $this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> - <td class="a-right"> + <td class="col subtotal excl tax"> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - <div class="cart-tax-total" data-tax-toggle='{"itemTaxId" : "#esubtotal-item-tax-details<?php echo $_item->getId(); ?>"}'> + <span class="cart-tax-total" data-tax-toggle='{"itemTaxId" : "#esubtotal-item-tax-details<?php echo $_item->getId(); ?>"}'> <?php else: ?> - <div class="cart-price"> + <span class="cart-price"> <?php endif; ?> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> @@ -152,47 +140,43 @@ <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_item->getRowTotal()) ?> <?php endif; ?> - </div> + </span> <?php if ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item)): ?> <div class="cart-tax-info" id="esubtotal-item-tax-details<?php echo $_item->getId(); ?>" style="display: none;"> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - <small> <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['row_amount'],true,true); ?></span><br /> + <span class="weee"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['row_amount'],true,true); ?></span> <?php endforeach; ?> - </small> <?php elseif ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></small></span><br /> + <span class="weee"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span> <?php endforeach; ?> <?php elseif ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - <small> <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span><br /> + <span class="weee"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span> <?php endforeach; ?> - </small> <?php endif; ?> </div> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> <div class="cart-tax-total" data-tax-toggle='{"itemTaxId" : "#esubtotal-item-tax-details<?php echo $_item->getId(); ?>"}'> - <span class="nobr"><?php echo __('Total'); ?>:<br /> <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?></span> + <span class="weee"><?php echo __('Total'); ?>:<br /> <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?></span> </div> <?php endif; ?> <?php endif; ?> </td> <?php endif; ?> - <!--- //Excluding Tax Subtotal --> +<?php /* //Excluding Tax Subtotal */ ?> - <!--- Including Tax Subtotal --> +<?php /* Including Tax Subtotal */ ?> <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartPriceInclTax() || $this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> - <td> + <td class="col subtotal incl tax"> <?php $_incl = $this->helper('Magento\Checkout\Helper\Data')->getSubtotalInclTax($_item); ?> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - <div class="cart-tax-total" data-tax-toggle='{"itemTaxId" : "#subtotal-item-tax-details<?php echo $_item->getId(); ?>"}'> + <span class="cart-tax-total" data-tax-toggle='{"itemTaxId" : "#subtotal-item-tax-details<?php echo $_item->getId(); ?>"}'> <?php else: ?> - <div class="cart-price"> + <span class="cart-price"> <?php endif; ?> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> @@ -200,39 +184,33 @@ <?php else: ?> <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?> <?php endif; ?> - - </div> - + </span> <?php if ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item)): ?> <div class="cart-tax-info" id="subtotal-item-tax-details<?php echo $_item->getId(); ?>" style="display: none;"> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - <small> <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['row_amount'],true,true); ?></span><br /> + <span class="weee"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['row_amount'],true,true); ?></span> <?php endforeach; ?> - </small> <?php elseif ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></small></span><br /> + <span class="weee"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span> <?php endforeach; ?> <?php elseif ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - <small> <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span><br /> + <span class="weee"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span> <?php endforeach; ?> - </small> <?php endif; ?> </div> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> <div class="cart-tax-total" data-tax-toggle='{"itemTaxId" : "#subtotal-item-tax-details<?php echo $_item->getId(); ?>"}'> - <span class="nobr"><?php echo __('Total incl. tax'); ?>:<br /> <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?></span> + <span class="weee"><?php echo __('Total incl. tax'); ?>:<br /> <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?></span> </div> <?php endif; ?> <?php endif; ?> </td> <?php endif; ?> - <!--- //Including Tax Subtotal --> +<?php /* //Including Tax Subtotal */ ?> </tr> diff --git a/app/code/Magento/Checkout/view/frontend/multishipping/shipping.phtml b/app/code/Magento/Checkout/view/frontend/multishipping/shipping.phtml index 50bd5ae841cca7231d7bb24af81513d23956fab2..2c9bd1acf9659148cf0653ca74e3e7eca41bf38c 100644 --- a/app/code/Magento/Checkout/view/frontend/multishipping/shipping.phtml +++ b/app/code/Magento/Checkout/view/frontend/multishipping/shipping.phtml @@ -18,8 +18,6 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * - * @category design - * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ @@ -28,103 +26,91 @@ /** * Multishipping checkout shipping template * - * @see \Magento\Checkout\Block\Multishipping\Shipping * @var $this \Magento\Checkout\Block\Multishipping\Shipping */ ?> -<div class="multiple-checkout"> - <div class="page-title"> - <h1><?php echo __('Select Shipping Method') ?></h1> +<form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="shipping_method_form" class="form multicheckout shipping"> + <div class="title"> + <strong><?php echo __('Select Shipping Method') ?></strong> </div> - <?php echo $this->getMessagesBlock()->getGroupedHtml() ?> - <form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="shipping_method_form"> - <?php foreach ($this->getAddresses() as $_index => $_address): ?> - <div class="col2-set"> - <h2 class="legend"><?php echo __('Address %1 of %2', ($_index+1), $this->getAddressCount()) ?></h2> - <div class="col-1 col-narrow"> - <div class="box"> - <div class="box-title"> - <h3><?php echo __('Shipping To') ?> <span class="separator">|</span> <a href="<?php echo $this->getAddressEditUrl($_address) ?>"><?php echo __('Change') ?></a></h3> - </div> - <div class="box-content"> - <address><?php echo $_address->format('html') ?></address> - </div> - </div> - <div class="box box-sp-methods"> - <div class="pointer"></div> - <div class="box-title"> - <h3><?php echo __('Shipping Method') ?></h3> - </div> - <div class="box-content"> - <?php if (!($_shippingRateGroups = $this->getShippingRates($_address))): ?> - <p><?php echo __('Sorry, no quotes are available for this order.') ?></p> - <?php else: ?> - <dl class="sp-methods"> - <?php $_sole = count($_shippingRateGroups) == 1; foreach ($_shippingRateGroups as $code => $_rates): ?> - <dt><?php echo $this->escapeHtml($this->getCarrierName($code)) ?></dt> - <dd> - <ul> - <?php $_sole = $_sole && count($_rates) == 1; foreach ($_rates as $_rate): ?> - <li<?php if ($_rate->getErrorMessage()) echo ' class="error-msg"' ?>> - <?php if ($_rate->getErrorMessage()): ?> - <?php echo $this->escapeHtml($_rate->getCarrierTitle()) ?>: <?php echo $this->escapeHtml($_rate->getErrorMessage()) ?> - <?php else: ?> - <?php if ($_sole) : ?> - <span class="no-display"><input type="radio" name="shipping_method[<?php echo $_address->getId() ?>]" value="<?php echo $this->escapeHtml($_rate->getCode()) ?>" id="s_method_<?php echo $_address->getId() ?>_<?php echo $_rate->getCode() ?>" checked="checked"/></span> - <?php else: ?> - <input type="radio" name="shipping_method[<?php echo $_address->getId() ?>]" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_address->getId() ?>_<?php echo $_rate->getCode() ?>"<?php if($_rate->getCode()===$this->getAddressShippingMethod($_address)) echo ' checked="checked"' ?> class="radio" /> - <?php endif; ?> - <label for="s_method_<?php echo $_address->getId() ?>_<?php echo $_rate->getCode() ?>"><?php echo $this->escapeHtml($_rate->getMethodTitle()) ?> - <?php $_excl = $this->getShippingPrice($_address, $_rate->getPrice(), $this->helper('Magento\Tax\Helper\Data')->displayShippingPriceIncludingTax()); ?> - <?php $_incl = $this->getShippingPrice($_address, $_rate->getPrice(), true); ?> - <?php echo $_excl; ?> - <?php if ($this->helper('Magento\Tax\Helper\Data')->displayShippingBothPrices() && $_incl != $_excl): ?> - (<?php echo __('Incl. Tax'); ?> <?php echo $_incl; ?>) - <?php endif; ?> - </label> - <?php endif ?> - </li> - <?php endforeach; ?> - </ul> - </dd> + <?php foreach ($this->getAddresses() as $_index => $_address): ?> + <div class="block shipping"> + <div class="title"><strong><?php echo __('Address %1 of %2', ($_index+1), $this->getAddressCount()) ?></strong></div> + <div class="content"> + <div class="box address"> + <strong class="subtitle"> + <span><?php echo __('Shipping To') ?></span> + <a href="<?php echo $this->getAddressEditUrl($_address) ?>" class="action edit"><span><?php echo __('Change') ?></span></a> + </strong> + <address><?php echo $_address->format('html') ?></address> + </div> + <div class="box method"> + <strong class="subtitle"> + <span><?php echo __('Shipping Method') ?></span> + </strong> + <?php if (!($_shippingRateGroups = $this->getShippingRates($_address))): ?> + <p><?php echo __('Sorry, no quotes are available for this order at this time.') ?></p> + <?php else: ?> + <dl class="sp-methods items methods"> + <?php $_sole = count($_shippingRateGroups) == 1; foreach ($_shippingRateGroups as $code => $_rates): ?> + <dt class="item title"><?php echo $this->escapeHtml($this->getCarrierName($code)) ?></dt> + <dd class="item options"> + <?php $_sole = $_sole && count($_rates) == 1; foreach ($_rates as $_rate): ?> + <div class="field choice"> + <?php if ($_rate->getErrorMessage()): ?> + <strong><?php echo $this->escapeHtml($_rate->getCarrierTitle()) ?>: <?php echo $this->escapeHtml($_rate->getErrorMessage()) ?></strong> + <?php else: ?> + <?php if ($_sole) : ?> + <input type="radio" name="shipping_method[<?php echo $_address->getId() ?>]" value="<?php echo $this->escapeHtml($_rate->getCode()) ?>" id="s_method_<?php echo $_address->getId() ?>_<?php echo $_rate->getCode() ?>" class="radio solo method" checked="checked"/> + <?php else: ?> + <input type="radio" name="shipping_method[<?php echo $_address->getId() ?>]" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_address->getId() ?>_<?php echo $_rate->getCode() ?>"<?php if($_rate->getCode()===$this->getAddressShippingMethod($_address)) echo ' checked="checked"' ?> class="radio" /> + <?php endif; ?> + <label for="s_method_<?php echo $_address->getId() ?>_<?php echo $_rate->getCode() ?>"><?php echo $this->escapeHtml($_rate->getMethodTitle()) ?> + <?php $_excl = $this->getShippingPrice($_address, $_rate->getPrice(), $this->helper('Magento\Tax\Helper\Data')->displayShippingPriceIncludingTax()); ?> + <?php $_incl = $this->getShippingPrice($_address, $_rate->getPrice(), true); ?> + <?php echo $_excl; ?> + <?php if ($this->helper('Magento\Tax\Helper\Data')->displayShippingBothPrices() && $_incl != $_excl): ?> + (<?php echo __('Incl. Tax'); ?> <?php echo $_incl; ?>) + <?php endif; ?> + </label> + <?php endif ?> + </div> <?php endforeach; ?> - </dl> - <?php endif; ?> - </div> - </div> + </dd> + <?php endforeach; ?> + </dl> + <?php endif; ?> </div> - <div class="col-2 col-wide"> + <div class="box items"> <?php echo $this->helper('Magento\GiftMessage\Helper\Message')->getInline('multishipping_adress_checkbox', $_address); ?> - <h3><?php echo __('Items') ?> <span class="separator">|</span> <a href="<?php echo $this->getItemsEditUrl($_address) ?>"><?php echo __('Edit Items') ?></a></h3> - <table class="data-table" id="shipping-table-<?php echo $_address->getId() ?>"> - <col /> - <col width="1" /> + <strong class="subtitle"> + <span><?php echo __('Items') ?></span> + <a href="<?php echo $this->getItemsEditUrl($_address) ?>" class="action edit"><span><?php echo __('Edit Items') ?></span></a> + </strong> + <table class="items data" id="shipping-table-<?php echo $_address->getId() ?>"> <thead> <tr> - <th><?php echo __('Product Name') ?></th> - <th class="a-center"><?php echo __('Qty') ?></th> + <th class="col item"><?php echo __('Product Name') ?></th> + <th class="col qty"><?php echo __('Qty') ?></th> </tr> </thead> <tbody> <?php foreach ($this->getAddressItems($_address) as $_item): ?> <tr> - <td> - <?php echo $this->getItemHtml($_item->getQuoteItem()) ?> - </td> - <td class="a-center"><?php echo $_item->getQty() ?></td> + <td class="col item"><?php echo $this->getItemHtml($_item->getQuoteItem()) ?></td> + <td class="col qty"><?php echo $_item->getQty() ?></td> </tr> <?php endforeach; ?> </tbody> </table> - <script type="text/javascript">(function($) {$('#shipping-table-<?php echo $_address->getId()?>').decorate('table')})(jQuery)</script> <?php echo $this->helper('Magento\GiftMessage\Helper\Message')->getInline('multishipping_address', $_address); ?> </div> </div> - <?php endforeach; ?> - <?php echo $this->getChildHtml('checkout_billing_items') ?> - <div class="buttons-set"> - <p class="back-link"><a href="<?php echo $this->getBackUrl() ?>"><small>« </small><?php echo __('Back to Select Addresses') ?></a></p> - <button type="submit" title="<?php echo __('Continue to Billing Information') ?>" class="button"><span><span><?php echo __('Continue to Billing Information') ?></span></span></button> - </div> - </form> -</div> + </div> + <?php endforeach; ?> + <?php echo $this->getChildHtml('checkout_billing_items') ?> + <div class="actions"> + <a href="<?php echo $this->getBackUrl() ?>" class="action back"><span><?php echo __('Back to Select Addresses') ?></span></a> + <button class="action continue" type="submit"><span><?php echo __('Continue to Billing Information') ?></span></button> + </div> +</form> diff --git a/app/code/Magento/Checkout/view/frontend/multishipping/state.phtml b/app/code/Magento/Checkout/view/frontend/multishipping/state.phtml index 660d5fe126cc8c7922d7df0d52b375355e0137f9..e4a21f0e0378f436ed99d9d43deb916cb2da4e46 100644 --- a/app/code/Magento/Checkout/view/frontend/multishipping/state.phtml +++ b/app/code/Magento/Checkout/view/frontend/multishipping/state.phtml @@ -24,16 +24,15 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -<?php +<?php /** * Mustishipping state - * + * * @see \Magento\Checkout\Block\Multishipping\State */ ?> -<ul class="checkout-progress" id="checkout-progress-state"> -<?php foreach ($this->getSteps() as $_step): ?> - <li title="<?php echo $_step->getLabel() ?>"<?php if($_step->getIsActive()): ?> class="active"<?php endif; ?>><span><?php echo $_step->getLabel() ?></span></li> -<?php endforeach; ?> -</ul> -<script type="text/javascript">(function($) {$('#checkout-progress-state li').decorate('generic', ['first','last'])})(jQuery)</script> +<ol class="block multicheckout progress items" id="checkout-progress-state"> + <?php foreach ($this->getSteps() as $_step): ?> + <li title="<?php echo $_step->getLabel() ?>" class="item<?php echo ($_step->getIsActive()) ? ' active' : ''?>"><span><?php echo $_step->getLabel() ?></span></li> + <?php endforeach; ?> +</ol> diff --git a/app/code/Magento/Checkout/view/frontend/multishipping/success.phtml b/app/code/Magento/Checkout/view/frontend/multishipping/success.phtml index d666ec7ca0aa75422584ac4bf86972a3dd8451b2..51ef877cc16d55d41325f0686889d541da4a7250 100644 --- a/app/code/Magento/Checkout/view/frontend/multishipping/success.phtml +++ b/app/code/Magento/Checkout/view/frontend/multishipping/success.phtml @@ -24,27 +24,22 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -<div class="multiple-checkout"> - <div class="page-title"> - <h1><?php echo __('Order Success') ?></h1> - </div> - <h2 class="sub-title"><?php echo __('Thank you for your purchase!') ?></h2> +<div class="multicheckout success"> + <h2 class="subtitle"><?php echo __('Thank you for your purchase!') ?></h2> <p><?php echo __('Thanks for your order. We\'ll send you emails with order details and tracking information.') ?></p> <?php if($_orderIds = $this->getOrderIds()): ?> <p> <?php $flag = false ?> <?php echo __('Your order number is ') ?> <?php foreach ($_orderIds as $orderId=>$incrementId): ?> - <?php if ($flag): ?> - <?php echo ', ' ?> - <?php endif; ?> + <?php if ($flag): ?><?php echo ', ' ?><?php endif; ?> <?php $flag = true ?> <a href="<?php echo $this->getViewOrderUrl($orderId) ?>"><?php echo $incrementId ?></a> <?php endforeach; ?> </p> <?php endif; ?> <?php echo $this->getChildHtml() ?> - <div class="buttons-set"> - <button type="button" title="<?php echo __('Continue Shopping') ?>" class="button" onclick="window.location = '<?php echo $this->getContinueUrl() ?>';"><span><span><?php echo __('Continue Shopping') ?></span></span></button> + <div class="actions"> + <a class="action continue" title="<?php echo __('Continue Shopping') ?>" href="<?php echo $this->getContinueUrl() ?>"><span><?php echo __('Continue Shopping') ?></span></a> </div> </div> diff --git a/app/code/Magento/Checkout/view/frontend/onepage.phtml b/app/code/Magento/Checkout/view/frontend/onepage.phtml index 1ee814f2e6397be8fb595d4fa8546cd41ca052fe..de732fa6c424d747768b7b27bd906395ad0db6fd 100644 --- a/app/code/Magento/Checkout/view/frontend/onepage.phtml +++ b/app/code/Magento/Checkout/view/frontend/onepage.phtml @@ -19,7 +19,6 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design - * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ @@ -28,71 +27,69 @@ $_paymentBlock = $this->getLayout()->getBlock('checkout.onepage.payment'); $_registerParam = $this->getRequest()->getParam('register'); ?> -<div class="page-title"> - <h1><?php echo __('Checkout') ?></h1> +<div class="opc wrapper"> + <ol class="opc" id="checkoutSteps"> + <?php $i=0; foreach($this->getSteps() as $_stepId => $_stepInfo): ?> + <?php if (!$this->getChildBlock($_stepId) || !$this->getChildBlock($_stepId)->isShow()): continue; endif; $i++ ?> + <li id="opc-<?php echo $_stepId ?>" class="section<?php echo !empty($_stepInfo['allow'])?' allow':'' ?><?php echo !empty($_stepInfo['complete'])?' saved':'' ?>"> + <div class="step title"> + <span class="number"><?php echo $i ?></span> + <h2><?php echo $_stepInfo['label'] ?></h2> + </div> + <div id="checkout-step-<?php echo $_stepId ?>" class="step content" style="display:none;"> + <?php echo $this->getChildHtml($_stepId) ?> + </div> + </li> + <?php endforeach ?> + </ol> + <script type="text/javascript"> + (function($) { + head.js( + "<?php echo $this->getViewFileUrl('jquery/jquery.validate.js')?>", + "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation/validation.js')?>", + "<?php echo $this->getViewFileUrl('Magento_Checkout::js/opcheckout.js') ?>", + "<?php echo $this->getViewFileUrl('Magento_Checkout::js/accordion.js') ?>", + function() { + $('#checkoutSteps') + .accordion({ + activeSelector: '#opc-<?php echo $this->getActiveStep() ?>' + }) + .opcheckout({ + quoteBaseGrandTotal: <?php echo (float)$_paymentBlock->getQuoteBaseGrandTotal() ?>, + progressUrl: '<?php echo $this->getUrl('checkout/onepage/progress') ?>', + reviewUrl: '<?php echo $this->getUrl('checkout/onepage/review') ?>', + failureUrl: '<?php echo $this->getUrl('checkout/cart') ?>', + getAddressUrl: '<?php echo $this->getUrl('checkout/onepage/getAddress') ?>address/', + checkoutAgreements: '#checkout-agreements', + checkoutProgressContainer: '#checkout-progress-wrapper', + checkout: { + suggestRegistration: <?php echo ($_registerParam || $_registerParam === '') ? 'true' : 'false' ?>, + saveUrl: '<?php echo $this->getUrl('checkout/onepage/saveMethod') ?>' + }, + billing: { + saveUrl: '<?php echo $this->getUrl('checkout/onepage/saveBilling') ?>' + }, + shipping: { + saveUrl: '<?php echo $this->getUrl('checkout/onepage/saveShipping') ?>' + }, + shippingMethod: { + saveUrl: "<?php echo $this->getUrl('checkout/onepage/saveShippingMethod') ?>" + }, + payment: { + <?php if ($_paymentBlock->getChildBlock('methods')->getSelectedMethodCode()): ?> + defaultPaymentMethod: "<?php echo $_paymentBlock->getChildBlock('methods')->getSelectedMethodCode() ?>", + <?php endif ?> + saveUrl: '<?php echo $this->getUrl('checkout/onepage/savePayment') ?>' + }, + review: { + saveUrl: '<?php echo $this->getUrl('checkout/onepage/saveOrder') ?>', + successUrl: '<?php echo $this->getUrl('checkout/onepage/success') ?>' + }, + methodDescription : '.items' + }); + }); + })(jQuery); + </script> </div> -<ol class="opc" id="checkoutSteps"> -<?php $i=0; foreach($this->getSteps() as $_stepId => $_stepInfo): ?> -<?php if (!$this->getChildBlock($_stepId) || !$this->getChildBlock($_stepId)->isShow()): continue; endif; $i++ ?> - <li id="opc-<?php echo $_stepId ?>" class="section<?php echo !empty($_stepInfo['allow'])?' allow':'' ?><?php echo !empty($_stepInfo['complete'])?' saved':'' ?>"> - <div class="step-title"> - <span class="number"><?php echo $i ?></span> - <h2><?php echo $_stepInfo['label'] ?></h2> - <a href="#"><?php echo __('Edit') ?></a> - </div> - <div id="checkout-step-<?php echo $_stepId ?>" class="step a-item" style="display:none;"> - <?php echo $this->getChildHtml($_stepId) ?> - </div> - </li> -<?php endforeach ?> -</ol> -<script type="text/javascript"> - (function($) { - head.js( - "<?php echo $this->getViewFileUrl('jquery/jquery.validate.js')?>", - "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js')?>", - "<?php echo $this->getViewFileUrl('mage/validation.js')?>", - "<?php echo $this->getViewFileUrl('mage/validation/validation.js')?>", - "<?php echo $this->getViewFileUrl('Magento_Checkout::js/opcheckout.js') ?>", - "<?php echo $this->getViewFileUrl('Magento_Checkout::js/accordion.js') ?>", - function() { - $('#checkoutSteps') - .accordion({ - activeSelector: '#opc-<?php echo $this->getActiveStep() ?>' - }) - .opcheckout({ - quoteBaseGrandTotal: <?php echo (float)$_paymentBlock->getQuoteBaseGrandTotal() ?>, - progressUrl: '<?php echo $this->getUrl('checkout/onepage/progress') ?>', - reviewUrl: '<?php echo $this->getUrl('checkout/onepage/review') ?>', - failureUrl: '<?php echo $this->getUrl('checkout/cart') ?>', - getAddressUrl: '<?php echo $this->getUrl('checkout/onepage/getAddress') ?>address/', - checkoutAgreements: '#checkout-agreements', - checkoutProgressContainer: '#checkout-progress-wrapper', - ajaxLoaderPlaceButton: true, - checkout: { - suggestRegistration: <?php echo ($_registerParam || $_registerParam === '') ? 'true' : 'false' ?>, - saveUrl: '<?php echo $this->getUrl('checkout/onepage/saveMethod') ?>' - }, - billing: { - saveUrl: '<?php echo $this->getUrl('checkout/onepage/saveBilling') ?>' - }, - shipping: { - saveUrl: '<?php echo $this->getUrl('checkout/onepage/saveShipping') ?>' - }, - shippingMethod: { - saveUrl: "<?php echo $this->getUrl('checkout/onepage/saveShippingMethod') ?>" - }, - payment: { - <?php if ($_paymentBlock->getChildBlock('methods')->getSelectedMethodCode()): ?> - defaultPaymentMethod: "<?php echo $_paymentBlock->getChildBlock('methods')->getSelectedMethodCode() ?>", - <?php endif ?> - saveUrl: '<?php echo $this->getUrl('checkout/onepage/savePayment') ?>' - }, - review: { - saveUrl: '<?php echo $this->getUrl('checkout/onepage/saveOrder') ?>', - successUrl: '<?php echo $this->getUrl('checkout/onepage/success') ?>' - } - }); - }); - })(jQuery); -</script> diff --git a/app/code/Magento/Checkout/view/frontend/onepage/billing.phtml b/app/code/Magento/Checkout/view/frontend/onepage/billing.phtml index 35d3e9389cb7663e07ce5d3307fa465eb5882771..49eedbea9b0d4bc3cc0befd53493394bb8843dff 100644 --- a/app/code/Magento/Checkout/view/frontend/onepage/billing.phtml +++ b/app/code/Magento/Checkout/view/frontend/onepage/billing.phtml @@ -19,185 +19,191 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design - * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -<?php /** @var $this \Magento\Checkout\Block\Onepage\Billing */ ?> -<form id="co-billing-form" action=""> -<fieldset> - <ul class="form-list"> +<form class="form billing" id="co-billing-form" data-hasrequired="<?php echo __('* Required Fields') ?>"> + <?php if ($this->customerHasAddresses()): ?> - <li class="wide"> - <label for="billing-address-select"><?php echo __('Select a billing address from your address book or enter a new address.') ?></label> - <div class="input-box"> + <div class="field addresses"> + <label class="label" for="billing-address-select"><span><?php echo __('Select a billing address from your address book or enter a new address.') ?></span></label> + <div class="control"> <?php echo $this->getAddressesHtmlSelect('billing') ?> </div> - </li> + </div> <?php endif; ?> - <li id="billing-new-address-form"<?php if ($this->customerHasAddresses()): ?> style="display:none;"<?php endif; ?>> - <fieldset> - <input type="hidden" name="billing[address_id]" value="<?php echo $this->getAddress()->getId() ?>" id="billing:address_id" /> - <ul> - <li class="fields"><?php echo $this->getLayout()->createBlock('Magento\Customer\Block\Widget\Name')->setObject($this->getAddress()->getFirstname() ? $this->getAddress() : $this->getQuote()->getCustomer())->setForceUseCustomerRequiredAttributes(!$this->isCustomerLoggedIn())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?></li> - <li class="fields"> - <div class="field"> - <label for="billing:company"><?php echo __('Company') ?></label> - <div class="input-box"> - <input type="text" id="billing:company" name="billing[company]" value="<?php echo $this->escapeHtml($this->getAddress()->getCompany()) ?>" title="<?php echo __('Company') ?>" class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('company') ?>" /> - </div> - </div> - <?php if(!$this->isCustomerLoggedIn()): ?> - <div class="field"> - <label for="billing:email" class="required"><em>*</em><?php echo __('Email Address') ?></label> - <div class="input-box"> - <input type="text" name="billing[email]" id="billing:email" value="<?php echo $this->escapeHtml($this->getAddress()->getEmail()) ?>" title="<?php echo __('Email Address') ?>" class="input-text" data-validate="{required:true, 'validate-email':true}"/> - </div> + <fieldset class="fieldset address" id="billing-new-address-form"<?php if ($this->customerHasAddresses()): ?> style="display:none;"<?php endif; ?>> + <input type="hidden" name="billing[address_id]" value="<?php echo $this->getAddress()->getId() ?>" id="billing:address_id" /> + + <?php echo $this->getLayout()->createBlock('Magento\Customer\Block\Widget\Name')->setObject($this->getAddress()->getFirstname() ? $this->getAddress() : $this->getQuote()->getCustomer())->setForceUseCustomerRequiredAttributes(!$this->isCustomerLoggedIn())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?> + + <?php if (!$this->isCustomerLoggedIn()): ?> + <div class="field required email"> + <label class="label" for="billing:email"><span><?php echo __('Email Address') ?></span></label> + <div class="control"> + <input type="text" name="billing[email]" id="billing:email" value="<?php echo $this->escapeHtml($this->getAddress()->getEmail()) ?>" title="<?php echo __('Email Address') ?>" class="input-text" data-validate="{required:true, 'validate-email':true}"/> </div> + </div> + <?php endif; ?> + + <div class="field company"> + <label class="label" for="billing:company"><span><?php echo __('Company') ?></span></label> + <div class="control"> + <input type="text" id="billing:company" name="billing[company]" value="<?php echo $this->escapeHtml($this->getAddress()->getCompany()) ?>" title="<?php echo __('Company') ?>" class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('company') ?>" /> + </div> + </div> + + <?php if ($this->helper('Magento\Customer\Helper\Address')->isVatAttributeVisible()) : ?> + <div class="field taxvat"> + <label class="label" for="billing:vat_id"><span><?php echo __('VAT Number') ?></span></label> + <div class="control"> + <input type="text" id="billing:vat_id" name="billing[vat_id]" value="<?php echo $this->escapeHtml($this->getAddress()->getVatId()) ?>" title="<?php echo __('VAT Number') ?>" class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('vat_id') ?>" /> + </div> + </div> <?php endif; ?> - </li> + <?php $_streetValidationClass = $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('street'); ?> - <li class="wide"> - <label for="billing:street1" class="required"><em>*</em><?php echo __('Address') ?></label> - <div class="input-box"> - <input type="text" title="<?php echo __('Street Address') ?>" name="billing[street][]" id="billing:street1" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet(1)) ?>" class="input-text <?php echo $_streetValidationClass ?>" /> - </div> - </li> - <?php $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass)); ?> - <?php for ($_i = 2, $_n = $this->helper('Magento\Customer\Helper\Address')->getStreetLines(); $_i <= $_n; $_i++): ?> - <li class="wide"> - <div class="input-box"> - <input type="text" title="<?php echo __('Street Address %1', $_i) ?>" name="billing[street][]" id="billing:street<?php echo $_i ?>" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet($_i)) ?>" class="input-text <?php echo $_streetValidationClass ?>" /> - </div> - </li> - <?php endfor; ?> - <?php if ($this->helper('Magento\Customer\Helper\Address')->isVatAttributeVisible()) : ?> - <li class="wide"> - <label for="billing:vat_id"><?php echo __('VAT Number') ?></label> - <div class="input-box"> - <input type="text" id="billing:vat_id" name="billing[vat_id]" value="<?php echo $this->escapeHtml($this->getAddress()->getVatId()) ?>" title="<?php echo __('VAT Number') ?>" class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('vat_id') ?>" /> - </div> - </li> - <?php endif; ?> - <li class="fields"> - <div class="field"> - <label for="billing:city" class="required"><em>*</em><?php echo __('City') ?></label> - <div class="input-box"> - <input type="text" title="<?php echo __('City') ?>" name="billing[city]" value="<?php echo $this->escapeHtml($this->getAddress()->getCity()) ?>" class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('city') ?>" id="billing:city" /> + <div class="field street required"> + <label class="label" for="billing:street1"><span><?php echo __('Address') ?></span></label> + <div class="control"> + <input type="text" title="<?php echo __('Street Address') ?>" name="billing[street][]" id="billing:street1" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet(1)) ?>" class="input-text <?php echo $_streetValidationClass ?>" /> + <div class="nested"> + <?php $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass)); ?> + <?php for ($_i = 2, $_n = $this->helper('Magento\Customer\Helper\Address')->getStreetLines(); $_i <= $_n; $_i++): ?> + <div class="field additional no-label"> + <div class="control"> + <input type="text" title="<?php echo __('Street Address %1', $_i) ?>" name="billing[street][]" id="billing:street<?php echo $_i ?>" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet($_i)) ?>" class="input-text <?php echo $_streetValidationClass ?>" /> + </div> </div> - </div> - <div class="field"> - <label for="billing:region_id" class="required"><em>*</em><?php echo __('State/Province') ?></label> - <div class="input-box"> - <select id="billing:region_id" name="billing[region_id]" title="<?php echo __('State/Province') ?>" class="validate-select" style="display:none;" <?php if ($this->getConfig('general/region/display_all') === 0) { ?>disabled="disabled"<?php } ?>> - <option value=""><?php echo __('Please select region, state or province') ?></option> - </select> - <input type="text" id="billing:region" name="billing[region]" value="<?php echo $this->escapeHtml($this->getAddress()->getRegion()) ?>" title="<?php echo __('State/Province') ?>" class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('region') ?>" style="display:none;" <?php if ($this->getConfig('general/region/display_all') === 0) { ?>disabled="disabled"<?php } ?>/> - </div> - </div> - </li> - <li class="fields"> - <div class="field"> - <label for="billing:postcode" class="required"><em>*</em><?php echo __('Zip/Postal Code') ?></label> - <div class="input-box"> - <input type="text" title="<?php echo __('Zip/Postal Code') ?>" name="billing[postcode]" id="billing:postcode" value="<?php echo $this->escapeHtml($this->getAddress()->getPostcode()) ?>" class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('postcode') ?>" data-validate="{'validate-zip-international':true}"/> - </div> - </div> - <div class="field"> - <label for="billing:country_id" class="required"><em>*</em><?php echo __('Country') ?></label> - <div class="input-box"> - <?php echo $this->getCountryHtmlSelect('billing') ?> - </div> - </div> - </li> - <li class="fields"> - <div class="field"> - <label for="billing:telephone" class="required"><em>*</em><?php echo __('Telephone') ?></label> - <div class="input-box"> - <input type="text" name="billing[telephone]" value="<?php echo $this->escapeHtml($this->getAddress()->getTelephone()) ?>" title="<?php echo __('Telephone') ?>" class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('telephone') ?>" id="billing:telephone" /> - </div> - </div> - <div class="field"> - <label for="billing:fax"><?php echo __('Fax') ?></label> - <div class="input-box"> - <input type="text" name="billing[fax]" value="<?php echo $this->escapeHtml($this->getAddress()->getFax()) ?>" title="<?php echo __('Fax') ?>" class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('fax') ?>" id="billing:fax" /> - </div> - </div> - </li> - <?php if(!$this->isCustomerLoggedIn()): ?> + <?php endfor; ?> + </div> + </div> + </div> + + + <div class="field city required"> + <label class="label" for="billing:city"><span><?php echo __('City') ?></span></label> + <div class="control"> + <input type="text" title="<?php echo __('City') ?>" name="billing[city]" value="<?php echo $this->escapeHtml($this->getAddress()->getCity()) ?>" class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('city') ?>" id="billing:city" /> + </div> + </div> + + <div class="field region required"> + <label class="label" for="billing:region_id"><span><?php echo __('State/Province') ?></span></label> + <div class="control"> + <select id="billing:region_id" + name="billing[region_id]" + title="<?php echo __('State/Province') ?>" + data-validate="{'validate-select':true}" + <?php if ($this->getConfig('general/region/display_all') === 0):?>disabled="disabled"<?php endif; ?> + style="display:none;"> + <option value=""><?php echo __('Please select region, state or province') ?></option> + </select> + <input type="text" + id="billing:region" + name="billing[region]" + value="<?php echo $this->escapeHtml($this->getAddress()->getRegion()) ?>" + title="<?php echo __('State/Province') ?>" + class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('region') ?>" + <?php if ($this->getConfig('general/region/display_all') === 0):?>disabled="disabled"<?php endif; ?> + style="display:none;" /> + </div> + </div> + + <div class="field zip required"> + <label class="label" for="billing:postcode"><span><?php echo __('Zip/Postal Code') ?></span></label> + <div class="control"> + <input type="text" title="<?php echo __('Zip/Postal Code') ?>" name="billing[postcode]" id="billing:postcode" value="<?php echo $this->escapeHtml($this->getAddress()->getPostcode()) ?>" class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('postcode') ?>" data-validate="{'validate-zip-international':true}"/> + </div> + </div> + + <div class="field country required"> + <label class="label" for="billing:country_id"><span><?php echo __('Country') ?></span></label> + <div class="control"> + <?php echo $this->getCountryHtmlSelect('billing') ?> + </div> + </div> + + <div class="field telephone required"> + <label class="label" for="billing:telephone"><span><?php echo __('Telephone') ?></span></label> + <div class="control"> + <input type="text" name="billing[telephone]" value="<?php echo $this->escapeHtml($this->getAddress()->getTelephone()) ?>" title="<?php echo __('Telephone') ?>" class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('telephone') ?>" id="billing:telephone" /> + </div> + </div> + + <div class="field fax"> + <label class="label" for="billing:fax"><span><?php echo __('Fax') ?></span></label> + <div class="control"> + <input type="text" name="billing[fax]" value="<?php echo $this->escapeHtml($this->getAddress()->getFax()) ?>" title="<?php echo __('Fax') ?>" class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('fax') ?>" id="billing:fax" /> + </div> + </div> + <?php if(!$this->isCustomerLoggedIn()): ?> <?php $_dob = $this->getLayout()->createBlock('Magento\Customer\Block\Widget\Dob') ?> + <?php $_taxvat = $this->getLayout()->createBlock('Magento\Customer\Block\Widget\Taxvat') ?> <?php $_gender = $this->getLayout()->createBlock('Magento\Customer\Block\Widget\Gender') ?> - <?php if ($_dob->isEnabled() || $_gender->isEnabled()): ?> - <li class="fields"> - <?php if ($_dob->isEnabled()): ?> - <div class="field"> - <?php echo $_dob->setDate($this->getQuote()->getCustomerDob())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?> - </div> - <?php endif; ?> - <?php if ($_gender->isEnabled()): ?> - <div class="field"> - <?php echo $_gender->setGender($this->getQuote()->getCustomerGender())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?> - </div> - <?php endif ?> - </li> - <?php endif ?> - <?php $_taxvat = $this->getLayout()->createBlock('Magento\Customer\Block\Widget\Taxvat') ?> + <?php if ($_dob->isEnabled()): ?> + <?php echo $_dob->setDate($this->getQuote()->getCustomerDob())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?> + <?php endif; ?> <?php if ($_taxvat->isEnabled()): ?> - <li> - <?php echo $_taxvat->setTaxvat($this->getQuote()->getCustomerTaxvat())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?> - </li> + <?php echo $_taxvat->setTaxvat($this->getQuote()->getCustomerTaxvat())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?> <?php endif ?> - - <li class="fields" id="register-customer-password"> - <div class="field"> - <label for="billing:customer_password" class="required"><em>*</em><?php echo __('Password') ?></label> - <div class="input-box"> - <input type="password" name="billing[customer_password]" id="billing:customer_password" title="<?php echo __('Password') ?>" class="input-text" data-validate="{required:true, 'validate-password':true}"/> - </div> - </div> - <div class="field"> - <label for="billing:confirm_password" class="required"><em>*</em><?php echo __('Confirm Password') ?></label> - <div class="input-box"> - <input type="password" name="billing[confirm_password]" title="<?php echo __('Confirm Password') ?>" id="billing:confirm_password" class="input-text" data-validate="{required:true, 'validate-cpassword':true}"/> - </div> - </div> - </li> - <?php endif; ?> - <?php if ($this->isCustomerLoggedIn() && $this->customerHasAddresses()):?> - <li class="control"> - <input type="checkbox" name="billing[save_in_address_book]" value="1" title="<?php echo __('Save in address book') ?>" id="billing:save_in_address_book" <?php if ($this->getAddress()->getSaveInAddressBook()):?> checked="checked"<?php endif;?> class="checkbox" /><label for="billing:save_in_address_book"><?php echo __('Save in address book') ?></label> - </li> - <?php else:?> - <li class="no-display"><input type="hidden" name="billing[save_in_address_book]" value="1" /></li> - <?php endif; ?> - <?php echo $this->getChildHtml('form.additional.info'); ?> - </ul> - </fieldset> - </li> - <?php /* Extensions placeholder */ ?> - <?php echo $this->getChildHtml('checkout.onepage.billing.extra')?> - <?php if ($this->canShip()): ?> - <li class="control"> - <input type="radio" name="billing[use_for_shipping]" id="billing:use_for_shipping_yes" value="1"<?php if ($this->isUseBillingAddressForShipping()) {?> checked="checked"<?php }?> title="<?php echo __('Ship to this address') ?>" class="radio" /><label for="billing:use_for_shipping_yes"><?php echo __('Ship to this address') ?></label></li> - <li class="control"> - <input type="radio" name="billing[use_for_shipping]" id="billing:use_for_shipping_no" value="0"<?php if (!$this->isUseBillingAddressForShipping()) {?> checked="checked"<?php }?> title="<?php echo __('Ship to different address') ?>" class="radio" /><label for="billing:use_for_shipping_no"><?php echo __('Ship to different address') ?></label> - </li> - <?php endif; ?> - </ul> - <?php if (!$this->canShip()): ?> - <input type="hidden" name="billing[use_for_shipping]" value="1" /> - <?php endif; ?> - <div class="buttons-set" id="billing-buttons-container"> - <p class="required"><?php echo __('* Required Fields') ?></p> - <button type="button" title="<?php echo __('Continue') ?>" class="button"><span><span><?php echo __('Continue') ?></span></span></button> - <span class="please-wait" id="billing-please-wait" style="display:none;"> - <img src="<?php echo $this->getViewFileUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo __('Loading next step...') ?>" title="<?php echo __('Loading next step...') ?>" class="v-middle" /> <?php echo __('Loading next step...') ?> - </span> - </div> + <?php if ($_gender->isEnabled()): ?> + <?php echo $_gender->setGender($this->getQuote()->getCustomerGender())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?> + <?php endif ?> + <?php $customerAttributes = $this->getChildBlock('customer_form_customer_user_defined_attributes');?> + <?php if ($customerAttributes): ?> + <?php $customerAttributes->setEntityModelClass('Magento\Customer\Model\Customer')->setFieldIdFormat('billing:%1$s');?> + <?php $customerAttributes->setFieldNameFormat('billing[%1$s]')->setShowContainer(false);?> + <?php echo $customerAttributes->setExcludeFileAttributes(true)->toHtml()?> + <?php endif;?> + <div class="field password required"> + <label class="label" for="billing:customer_password"><span><?php echo __('Password') ?></span></label> + <div class="control"> + <input type="password" name="billing[customer_password]" id="billing:customer_password" title="<?php echo __('Password') ?>" class="input-text" data-validate="{required:true, 'validate-password':true}"/> + </div> + </div> + <div class="field confirm required"> + <label class="label" for="billing:confirm_password"><span><?php echo __('Confirm Password') ?></span></label> + <div class="control"> + <input type="password" name="billing[confirm_password]" title="<?php echo __('Confirm Password') ?>" id="billing:confirm_password" class="input-text" data-validate="{required:true, 'validate-cpassword':true}"/> + </div> + </div> + <?php endif; ?> + <?php echo $this->getChildHtml('form_additional_info'); ?> + <?php if ($this->isCustomerLoggedIn() && $this->customerHasAddresses()):?> + <div class="field save choice"> + <input type="checkbox" name="billing[save_in_address_book]" value="1" title="<?php echo __('Save in address book') ?>" id="billing:save_in_address_book" <?php if ($this->getAddress()->getSaveInAddressBook()):?> checked="checked"<?php endif;?> class="checkbox" /> + <label class="label" for="billing:save_in_address_book"><span><?php echo __('Save in address book') ?></span></label> + </div> + <?php else:?> + <input type="hidden" name="billing[save_in_address_book]" value="1" /> + <?php endif; ?> + <?php /* Extensions placeholder */ ?> + <?php echo $this->getChildHtml('checkout.onepage.billing.extra')?> </fieldset> +<?php if ($this->canShip()): ?> + <div class="field choice"> + <input type="radio" name="billing[use_for_shipping]" id="billing:use_for_shipping_yes" value="1"<?php if ($this->isUseBillingAddressForShipping()) {?> checked="checked"<?php }?> class="radio" /> + <label class="label" for="billing:use_for_shipping_yes"><span><?php echo __('Ship to this address') ?></span></label> + </div> + <div class="field choice"> + <input type="radio" name="billing[use_for_shipping]" id="billing:use_for_shipping_no" value="0"<?php if (!$this->isUseBillingAddressForShipping()) {?> checked="checked"<?php }?> class="radio" /> + <label class="label" for="billing:use_for_shipping_no"><span><?php echo __('Ship to different address') ?></span></label> + </div> +<?php endif; ?> + +<?php if (!$this->canShip()): ?> + <input type="hidden" name="billing[use_for_shipping]" value="1" /> +<?php endif; ?> +<div class="actions" id="billing-buttons-container"> + <div class="primary"><button type="button" class="button action continue"><span><?php echo __('Continue') ?></span></button></div> + <span id="billing-please-wait" class="please-wait load indicator" style="display:none;"> + <span><?php echo __('Loading next step...') ?></span> + </span> +</div> </form> <script type="text/javascript"> (function($) { diff --git a/app/code/Magento/Checkout/view/frontend/onepage/failure.phtml b/app/code/Magento/Checkout/view/frontend/onepage/failure.phtml index dfccd26f471f9e474cdca1e7574ec71987258f57..f0ccb4c1f26307d3e57e498db791fa467bb58cd1 100644 --- a/app/code/Magento/Checkout/view/frontend/onepage/failure.phtml +++ b/app/code/Magento/Checkout/view/frontend/onepage/failure.phtml @@ -19,14 +19,10 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design - * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -<div class="page-title"> - <h1><?php echo __('Something went wrong while processing your payment.') ?></h1> -</div> <?php if ($this->getRealOrderId()) : ?><p><?php echo __('Order #') . $this->getRealOrderId() ?></p><?php endif ?> <?php if ($error = $this->getErrorMessage()) : ?><p><?php echo $error ?></p><?php endif ?> <p><?php echo __('Click <a href="%1">here</a> to continue shopping.', $this->getContinueShoppingUrl()) ?></p> diff --git a/app/code/Magento/Checkout/view/frontend/onepage/link.phtml b/app/code/Magento/Checkout/view/frontend/onepage/link.phtml index e8cd3bda3e0324295c977f4973732458cd9e5b6e..6c899a495c58fd358b5928b04fba8f6718c89bb9 100644 --- a/app/code/Magento/Checkout/view/frontend/onepage/link.phtml +++ b/app/code/Magento/Checkout/view/frontend/onepage/link.phtml @@ -18,12 +18,16 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * - * @category design - * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> <?php if ($this->isPossibleOnepageCheckout()):?> - <button type="button" title="<?php echo __('Proceed to Checkout') ?>" class="button btn-proceed-checkout btn-checkout<?php if ($this->isDisabled()):?> no-checkout<?php endif; ?>"<?php if ($this->isDisabled()):?> disabled="disabled"<?php endif; ?> onclick="window.location='<?php echo $this->getCheckoutUrl() ?>';"><span><span><?php echo __('Proceed to Checkout') ?></span></span></button> + <button type="button" + title="<?php echo __('Proceed to Checkout') ?>" + class="action primary checkout<?php echo ($this->isDisabled()) ? ' disabled' : ''; ?>" + <?php if ($this->isDisabled()):?>disabled="disabled"<?php endif; ?> + onclick="window.location='<?php echo $this->getCheckoutUrl() ?>';"> + <span><?php echo __('Proceed to Checkout') ?></span> + </button> <?php endif?> diff --git a/app/code/Magento/Checkout/view/frontend/onepage/login.phtml b/app/code/Magento/Checkout/view/frontend/onepage/login.phtml index db2cb53047d07c70020145cce63565351ca36535..a66ba381e917a45404acee1c659a75fd2f068c33 100644 --- a/app/code/Magento/Checkout/view/frontend/onepage/login.phtml +++ b/app/code/Magento/Checkout/view/frontend/onepage/login.phtml @@ -19,91 +19,125 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design - * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -<?php /* Extensions placeholder */ ?> -<?php echo $this->getChildHtml('checkout.onepage.login.extra')?> -<div class="col2-set"> - <?php echo $this->getChildHtml('login_before')?> - <div class="col-1"> - <h3><?php if( $this->isAllowedGuestCheckout() ): ?><?php echo __('Checkout as a Guest or Register') ?><?php else: ?><?php echo __('Register to Create an Account') ?><?php endif; ?></h3> - <?php if( $this->isAllowedGuestCheckout() ): ?> - <p><?php echo __('Sign up with us to save time on your next checkout:') ?></p> +<?php +/** + * Customer onepage checkout login form template + * + */ +/** @var $this \Magento\Checkout\Block\Onepage\Login */ +?> +<div class="step login wrapper"> +<?php echo $this->getChildHtml('login_before')?> +<div class="block customer login"> + <div class="title"><strong><?php echo __('Login') ?></strong></div> + <div class="content"> + <form class="form login" id="login-form" action="<?php echo $this->getPostAction() ?>" method="post"> + <fieldset class="fieldset login" data-hasrequired="<?php echo __('* Required Fields') ?>"> + <p class="field note"><?php echo __('Already registered?') ?> <?php echo __('Please log in below:') ?></p> + <div class="field email required"> + <label class="label" for="login-email"><span><?php echo __('Email Address') ?></span></label> + <div class="control"> + <input type="text" class="input-text" id="login-email" name="login[username]" data-validate="{required:true, 'validate-email':true}" value="<?php echo $this->escapeHtml($this->getUsername()) ?>" /> + </div> + </div> + <div class="field password required"> + <label for="login-password" class="label"><span><?php echo __('Password') ?></span></label> + <div class="control"> + <input type="password" class="input-text" id="login-password" name="login[password]" data-validate="{required:true, 'validate-password':true}"/> + </div> + </div> + <?php echo $this->getChildHtml('form_additional_info'); ?> + <div class="actions"> + <input name="context" type="hidden" value="checkout" /> + <div class="primary"> + <button type="submit" class="action login"><span><?php echo __('Login') ?></span></button> + </div> + <div class="secondary"> + <a class="action remind" href="<?php echo $this->helper('Magento\Customer\Helper\Data')->getForgotPasswordUrl()?>"> + <span><?php echo __('Forgot Your Password?') ?></span> + </a> + </div> + </div> + </fieldset> + </form> + </div> + <script type="text/javascript"> + (function($) { + head.js( + "<?php echo $this->getViewFileUrl('jquery/jquery.validate.js') ?>", + "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js') ?>", + "<?php echo $this->getViewFileUrl('mage/validation.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation/validation.js') ?>", + function() { + $('#login-form').validation(); + }); + })(jQuery); + </script> +</div> +<?php if ( $this->isAllowedGuestCheckout() || $this->helper('Magento\Customer\Helper\Data')->isRegistrationAllowed() ): ?> +<div class="block guest"> + <div class="title"> + <strong> + <?php if( $this->isAllowedGuestCheckout() && $this->helper('Magento\Customer\Helper\Data')->isRegistrationAllowed() ): ?> + <?php echo __('Checkout as a Guest or Register') ?> + <?php elseif ( $this->isAllowedGuestCheckout() && !$this->helper('Magento\Customer\Helper\Data')->isRegistrationAllowed() ): ?> + <?php echo __('Checkout as a Guest') ?> <?php else: ?> + <?php echo __('Register to Create an Account') ?> + <?php endif; ?> + </strong> + </div> + <div class="content"> + <?php if( !$this->isAllowedGuestCheckout() && $this->helper('Magento\Customer\Helper\Data')->isRegistrationAllowed() ): ?> <p><strong><?php echo __('Register and save time!') ?></strong><br /> - <?php echo __('Sign up with us to save time on your next checkout:') ?></p> + <?php echo __('Register with us for future convenience:') ?></p> <ul> <li><?php echo __('Fast and easy check out') ?></li> - <li><?php echo __('Get easy access to your order history and status.') ?></li> + <li><?php echo __('Easy access to your order history and status') ?></li> </ul> - <?php endif; ?> + <?php elseif( $this->isAllowedGuestCheckout() && $this->helper('Magento\Customer\Helper\Data')->isRegistrationAllowed() ): ?> + <p class="note"><?php echo __('Register with us for future convenience:') ?></p> + <?php endif ?> + <?php if( $this->isAllowedGuestCheckout() ): ?> - <ul class="form-list"> + <fieldset class="fieldset guest"> <?php if( $this->isAllowedGuestCheckout() ): ?> - <li class="control"> - <input type="radio" name="checkout_method" id="login:guest" value="guest"<?php if($this->getQuote()->getCheckoutMethod()==\Magento\Checkout\Model\Type\Onepage::METHOD_GUEST): ?> checked="checked"<?php endif; ?> class="radio" /><label for="login:guest"><?php echo __('Checkout as Guest') ?></label> - </li> + <div class="field choice"> + <input type="radio" name="checkout_method" id="login:guest" value="guest"<?php if($this->getQuote()->getCheckoutMethod()==Magento\Checkout\Model\Type\Onepage::METHOD_GUEST): ?> checked="checked"<?php endif; ?> class="radio" /> + <label class="label" for="login:guest"><span><?php echo __('Checkout as Guest') ?></span></label> + </div> <?php endif; ?> - <li class="control"> - <input type="radio" name="checkout_method" id="login:register" value="register"<?php if($this->getQuote()->getCheckoutMethod()==\Magento\Checkout\Model\Type\Onepage::METHOD_REGISTER || !$this->isAllowedGuestCheckout()): ?> checked="checked"<?php endif ?> class="radio" /><label for="login:register"><?php echo __('Register') ?></label> - </li> - </ul> - <h4><?php echo __('Register and save time!') ?></h4> - <p><?php echo __('Sign up with us to save time on your next checkout:') ?></p> - <ul class="ul"> - <li><?php echo __('Fast and easy check out') ?></li> - <li><?php echo __('Get easy access to your order history and status.') ?></li> - </ul> + <?php if( $this->helper('Magento\Customer\Helper\Data')->isRegistrationAllowed() ): ?> + <div class="field choice"> + <input type="radio" name="checkout_method" id="login:register" value="register"<?php if($this->getQuote()->getCheckoutMethod()==Magento\Checkout\Model\Type\Onepage::METHOD_REGISTER || !$this->isAllowedGuestCheckout()): ?> checked="checked"<?php endif ?> class="radio" /> + <label class="label" for="login:register"><span><?php echo __('Register') ?></span></label> + </div> + <?php endif; ?> + </fieldset> <?php else: ?> <input type="hidden" name="checkout_method" id="login:register" value="register" checked="checked" /> <?php endif; ?> - </div> - <div class="col-2"> - <h3><?php echo __('Login') ?></h3> - <?php echo $this->getMessagesBlock()->getGroupedHtml() ?> - <form id="login-form" action="<?php echo $this->getPostAction() ?>" method="post"> - <fieldset> - <h4><?php echo __('Already registered?') ?></h4> - <p><?php echo __('Please log in below:') ?></p> - <ul class="form-list"> - <li> - <label for="login-email" class="required"><em>*</em><?php echo __('Email Address') ?></label> - <div class="input-box"> - <input type="text" class="input-text" id="login-email" name="login[username]" data-validate="{required:true, 'validate-email':true}" value="<?php echo $this->escapeHtml($this->getUsername()) ?>" /> - </div> - </li> - <li> - <label for="login-password" class="required"><em>*</em><?php echo __('Password') ?></label> - <div class="input-box"> - <input type="password" class="input-text" id="login-password" name="login[password]" data-validate="{required:true}"/> - </div> - </li> - <?php echo $this->getChildHtml('login.form.additional.info'); ?> - </ul> - </fieldset> - </form> - </div> -</div> -<div class="col2-set"> - <div class="col-1"> - <div class="buttons-set"> - <p class="required"> </p> - <button type="button" class="button" data-checkout='{"isGuestCheckoutAllowed":true}'><span><span><?php echo ($this->isAllowedGuestCheckout() ? __('Continue') : __('Register')) ?></span></span></button> - <span class="please-wait" style="display:none;"> - <img src="<?php echo $this->getViewFileUrl('images/opc-ajax-loader.gif') ?>" alt="" class="v-middle" /> <?php echo __('Loading next step...') ?> + <div class="actions"> + <span class="please-wait load indicator" style="display:none;"> + <span><?php echo __('Loading next step...') ?></span> </span> + <?php if ($this->isAllowedGuestCheckout()): ?> + <button id="onepage-guest-register-button" type="button" class="action continue" data-checkout='{"isGuestCheckoutAllowed":true}'><span><?php echo __('Continue') ?></span></button> + <?php elseif ($this->helper('Magento\Checkout\Helper\Data')->isCustomerMustBeLogged()): ?> + <button id="onepage-guest-register-button" type="button" class="action register" data-checkout='{"isGuestCheckoutAllowed":false, "registrationUrl":"<?php echo $this->helper('Magento\Checkout\Helper\Url')->getRegistrationUrl();?>"}'><span><?php echo __('Register') ?></span></button> + <?php else: ?> + <form action="<?php echo $this->getUrl('persistent/index/saveMethod'); ?>"> + <button id="onepage-guest-register-button" type="submit" class="action register"><span><?php echo __('Register') ?></span></button> + </form> + <?php endif; ?> </div> </div> - <div class="col-2"> - <div class="buttons-set"> - <p class="required"><?php echo __('* Required Fields') ?></p> - <a href="<?php echo $this->getUrl('customer/account/forgotpassword') ?>" class="f-left"><?php echo __('Forgot your password?') ?></a> - <button type="submit" class="button" data-action='login-form-submit'><span><span><?php echo __('Login') ?></span></span></button> - </div> - </div> +</div> +<?php endif; ?> </div> <script type="text/javascript"> (function($) { diff --git a/app/code/Magento/Checkout/view/frontend/onepage/payment.phtml b/app/code/Magento/Checkout/view/frontend/onepage/payment.phtml index 4a11e6f8b6cc90e792f9f0f944ab986d54a67179..c57b38b3a22c70d1724bd20bee47955a0ee3b3d3 100644 --- a/app/code/Magento/Checkout/view/frontend/onepage/payment.phtml +++ b/app/code/Magento/Checkout/view/frontend/onepage/payment.phtml @@ -18,22 +18,25 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * - * @category design - * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -<form action="" id="co-payment-form"> - <fieldset> - <?php echo $this->getChildHtml('methods') ?> +<form id="co-payment-form" class="form payments"> + <fieldset class="fieldset"> + <?php echo $this->getChildChildHtml('methods_additional') ?> + <div id="checkout-payment-method-load"><?php echo $this->getChildHtml('methods') ?></div> </fieldset> + <?php echo $this->getChildChildHtml('additional') ?> + <div class="actions" id="payment-buttons-container"> + <div class="primary"> + <button type="button" class="button action continue"><span><?php echo __('Continue') ?></span></button> + </div> + <div class="secondary"> + <a class="action back" href="#"><span><?php echo __('Back') ?></span></a> + </div> + <span id="payment-please-wait" class="please-wait load indicator" style="display:none"> + <span><?php echo __('Loading next step...') ?></span> + </span> + </div> </form> -<div class="buttons-set" id="payment-buttons-container"> - <p class="required"><?php echo __('* Required Fields') ?></p> - <p class="back-link"><a href="#"><small>« </small><?php echo __('Back') ?></a></p> - <button type="button" class="button"><span><span><?php echo __('Continue') ?></span></span></button> - <span class="please-wait" id="payment-please-wait" style="display:none;"> - <img src="<?php echo $this->getViewFileUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo __('Loading next step...') ?>" title="<?php echo __('Loading next step...') ?>" class="v-middle" /> <?php echo __('Loading next step...') ?> - </span> -</div> diff --git a/app/code/Magento/Checkout/view/frontend/onepage/payment/methods.phtml b/app/code/Magento/Checkout/view/frontend/onepage/payment/methods.phtml index 914206cc665cace5f5013dfa06b960e0f2eac313..c4894c62df7473a948cf1ee7a97a12f0597d3abc 100644 --- a/app/code/Magento/Checkout/view/frontend/onepage/payment/methods.phtml +++ b/app/code/Magento/Checkout/view/frontend/onepage/payment/methods.phtml @@ -18,8 +18,6 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * - * @category design - * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ @@ -28,23 +26,23 @@ /** * One page checkout payment methods * - * @see \Magento\Checkout\Block\Onepage\Payment\Methods + * @var $this \Magento\Checkout\Block\Onepage\Payment\Methods */ ?> -<dl class="sp-methods" id="checkout-payment-method-load"> +<dl class="items methods payment"> <?php $methods = $this->getMethods(); $oneMethod = count($methods) <= 1; ?> <?php if (empty($methods)): ?> - <dt> + <dt class="item title"> <?php echo __('No Payment Methods') ?> </dt> <?php else: foreach ($methods as $_method): $_code = $_method->getCode(); ?> - <dt> + <dt class="item title <?php echo $_code ?>"> <?php if(!$oneMethod): ?> <input id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" type="radio" name="payment[method]" title="<?php echo $this->escapeHtml($_method->getTitle()) ?>" <?php if($this->getSelectedMethodCode()==$_code): ?> checked="checked"<?php endif; ?> class="radio" /> <?php else: ?> @@ -54,7 +52,7 @@ <label for="p_method_<?php echo $_code ?>"><?php echo $this->escapeHtml($this->getMethodTitle($_method)) ?> <?php echo $this->getMethodLabelAfterHtml($_method) ?></label> </dt> <?php if ($html = $this->getPaymentMethodFormHtml($_method)): ?> - <dd> + <dd class="item content <?php echo $_code ?>"> <?php echo $html; ?> </dd> <?php endif; ?> @@ -62,5 +60,5 @@ endif; ?> </dl> -<div class="no-display" data-checkout-price="<?php echo (float)$this->getQuote()->getBaseGrandTotal(); ?>" /> +<div class="no-display" data-checkout-price="<?php echo (float)$this->getQuote()->getBaseGrandTotal(); ?>"></div> <?php echo $this->getChildChildHtml('additional'); ?> diff --git a/app/code/Magento/Checkout/view/frontend/onepage/progress.phtml b/app/code/Magento/Checkout/view/frontend/onepage/progress.phtml index c68bcf8d449b8e03f10967ad52094ca85ca009db..5719d1f996263d390f43aafc728e20ce66452ac5 100644 --- a/app/code/Magento/Checkout/view/frontend/onepage/progress.phtml +++ b/app/code/Magento/Checkout/view/frontend/onepage/progress.phtml @@ -19,17 +19,16 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design - * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /* @var $this \Magento\Checkout\Block\Onepage\Progress */ ?> -<div class="block block-progress opc-block-progress"> - <div class="block-title"> - <strong><span><?php echo __('Your Checkout Progress') ?></span></strong> +<div class="block progress onepage opc-block-progress"> + <div class="title"> + <strong><?php echo __('Your Checkout Progress') ?></strong> </div> - <div class="block-content"> + <div class="content"> <dl> <?php if ($this->getCheckout()->getStepData('billing', 'is_show')): ?> <?php if ($this->isStepComplete('billing')): ?> diff --git a/app/code/Magento/Checkout/view/frontend/onepage/review/button.phtml b/app/code/Magento/Checkout/view/frontend/onepage/review/button.phtml index 82172d3fe298aedbcbadf965685bf1012b90581d..19906996410079e4f7d6b89d9a63767f119315bb 100644 --- a/app/code/Magento/Checkout/view/frontend/onepage/review/button.phtml +++ b/app/code/Magento/Checkout/view/frontend/onepage/review/button.phtml @@ -18,10 +18,8 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * - * @category design - * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -<button data-role="review-save" type="submit" title="<?php echo __('Place Order') ?>" class="button btn-checkout"><span><span><?php echo __('Place Order') ?></span></span></button> +<button role='review-save' type="submit" title="<?php echo __('Place Order') ?>" class="button action checkout"><span><?php echo __('Place Order') ?></span></button> diff --git a/app/code/Magento/Checkout/view/frontend/onepage/review/info.phtml b/app/code/Magento/Checkout/view/frontend/onepage/review/info.phtml index 48f12caf1e4fb063d7fe560f04e2ecc8593ca6e4..700498e611ad85e470cef410e594cf87990918be 100644 --- a/app/code/Magento/Checkout/view/frontend/onepage/review/info.phtml +++ b/app/code/Magento/Checkout/view/frontend/onepage/review/info.phtml @@ -18,41 +18,35 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * - * @category design - * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ + +/** @var $this \Magento\Checkout\Block\Onepage\Review\Info */ ?> <?php echo $this->getChildHtml('items_before'); ?> -<div id="checkout-review-table-wrapper" data-mage-init="{paymentAuthentication:{}}"> - <table class="data-table" id="checkout-review-table"> - <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): $colspan = $rowspan = 2; else: $colspan = $rowspan = 1; endif; ?> - <col /> - <col width="1" /> - <col width="1" /> - <col width="1" /> - <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> - <col width="1" /> - <col width="1" /> - <?php endif; ?> +<div id="checkout-review-table-wrapper" class="review table wrapper"> + <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): $colspan = $rowspan = 2; else: $colspan = $rowspan = 1; endif; ?> + <table class="order review items data" id="checkout-review-table"> <thead> <tr> - <th rowspan="<?php echo $rowspan ?>"><?php echo __('Product Name') ?></th> - <th colspan="<?php echo $colspan ?>" class="a-center"><?php echo __('Price') ?></th> - <th rowspan="<?php echo $rowspan ?>" class="a-center"><?php echo __('Qty') ?></th> - <th colspan="<?php echo $colspan ?>" class="a-center"><?php echo __('Subtotal') ?></th> + <th rowspan="<?php echo $rowspan ?>" class="col item"><?php echo __('Product Name') ?></th> + <th colspan="<?php echo $colspan ?>" class="col price"><?php echo __('Price') ?></th> + <th rowspan="<?php echo $rowspan ?>" class="col qty"><?php echo __('Qty') ?></th> + <th colspan="<?php echo $colspan ?>" class="col subtotal"><?php echo __('Subtotal') ?></th> </tr> <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> <tr> - <th class="a-right"><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(false) ?></th> - <th><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(true) ?></th> - <th class="a-right"><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(false) ?></th> - <th><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(true) ?></th> + <th class="col price excl tax"><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(false) ?></th> + <th class="col price incl tax"><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(true) ?></th> + <th class="col subtotal excl tax"><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(false) ?></th> + <th class="col subtotal incl tax"><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(true) ?></th> </tr> <?php endif; ?> </thead> - <?php echo $this->getChildHtml('totals'); ?> + <tfoot> + <?php echo $this->getChildHtml('totals'); ?> + </tfoot> <tbody> <?php foreach($this->getItems() as $_item): ?> <?php echo $this->getItemHtml($_item)?> @@ -61,14 +55,13 @@ </table> </div> <?php echo $this->getChildHtml('items_after'); ?> -<script type="text/javascript">jQuery('#checkout-review-table').decorate('table')</script> -<div id="checkout-review-submit" data-mage-init="{paymentAuthentication:{}}"> +<div id="checkout-review-submit" data-mage-init="{paymentAuthentication:{}}" class="checkout submit order"> <?php echo $this->getChildHtml('agreements') ?> - <div class="buttons-set" id="review-buttons-container"> - <p class="f-left"><?php echo __('Forgot an Item?') ?> <a href="<?php echo $this->getUrl('checkout/cart') ?>"><?php echo __('Edit Your Cart') ?></a></p> - <?php echo $this->getChildHtml('button') ?> - <span class="please-wait" id="review-please-wait" style="display:none;"> - <img src="<?php echo $this->getViewFileUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo __('Submitting order information...') ?>" title="<?php echo __('Submitting order information...') ?>" class="v-middle" /> <?php echo __('Submitting order information...') ?> + <div class="actions" id="review-buttons-container"> + <div class="primary"><?php echo $this->getChildHtml('button') ?></div> + <div class="secondary"><?php echo __('Forgot an Item?') ?> <a href="<?php echo $this->getUrl('checkout/cart') ?>" class="action edit"><span><?php echo __('Edit Your Cart') ?></span></a></div> + <span class="please-wait load indicator" id="review-please-wait" style="display:none;"> + <span><?php echo __('Submitting order information...') ?></span> </span> </div> </div> diff --git a/app/code/Magento/Checkout/view/frontend/onepage/review/item.phtml b/app/code/Magento/Checkout/view/frontend/onepage/review/item.phtml index e3ea7b940b3b9f3b2c184c2db6791a5c2ae76c40..33405bd0c87f7019d88659fd7acbe26828256b3e 100644 --- a/app/code/Magento/Checkout/view/frontend/onepage/review/item.phtml +++ b/app/code/Magento/Checkout/view/frontend/onepage/review/item.phtml @@ -19,23 +19,25 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design - * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ + +/** @var $this Magento\Checkout\Block\Cart\Item\Renderer */ + +$_item = $this->getItem() ?> -<?php $_item = $this->getItem()?> <tr> - <td><h3 class="product-name"><?php echo $this->escapeHtml($this->getProductName()) ?></h3> + <td class="col item"><strong class="product name"><?php echo $this->escapeHtml($this->getProductName()) ?></strong> <?php if ($_options = $this->getOptionList()):?> - <dl class="item-options"> + <dl class="review item options"> <?php foreach ($_options as $_option) : ?> <?php $_formatedOptionValue = $this->getFormatedOptionValue($_option) ?> <dt><?php echo $this->escapeHtml($_option['label']) ?></dt> <dd<?php if (isset($_formatedOptionValue['full_view'])): ?> class="truncated" data-mage-init="{truncateOptions:[]}"<?php endif; ?>><?php echo $_formatedOptionValue['value'] ?> <?php if (isset($_formatedOptionValue['full_view'])): ?> - <div class="truncated_full_value"> - <dl class="item-options"> + <div class="truncated full value"> + <dl class="item options"> <dt><?php echo $this->escapeHtml($_option['label']) ?></dt> <dd><?php echo $_formatedOptionValue['full_view'] ?></dd> </dl> @@ -50,11 +52,11 @@ <?php endif;?> </td> <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartPriceExclTax() || $this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> - <td class="a-right"> + <td class="col price excl tax"> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - <span class="cart-tax-total" data-tax-toggle='{"itemTaxId" : "#eunit-item-tax-details<?php echo $_item->getId(); ?>"}'> + <span class="cart tax total" data-tax-toggle='{"itemTaxId" : "#eunit-item-tax-details<?php echo $_item->getId(); ?>"}'> <?php else: ?> - <span class="cart-price"> + <span class="cart price"> <?php endif; ?> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> @@ -68,41 +70,37 @@ <?php if ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item)): ?> - <div class="cart-tax-info" id="eunit-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;"> + <div class="cart tax info" id="eunit-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;"> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - <small> <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount'],true,true); ?></span><br /> + <span class="weee"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount'],true,true); ?></span> <?php endforeach; ?> - </small> <?php elseif ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount_incl_tax'],true,true); ?></small></span><br /> + <span class="weee"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount_incl_tax'],true,true); ?></span> <?php endforeach; ?> <?php elseif ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - <small> <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount_incl_tax'],true,true); ?></span><br /> + <span class="weee"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount_incl_tax'],true,true); ?></span> <?php endforeach; ?> - </small> <?php endif; ?> </div> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - <div class="cart-tax-total" data-tax-toggle='{"itemTaxId" : "#eunit-item-tax-details<?php echo $_item->getId(); ?>"}'> - <span class="nobr"><?php echo __('Total'); ?>:<br /> <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?></span> + <div class="cart tax total" data-tax-toggle='{"itemTaxId" : "#eunit-item-tax-details<?php echo $_item->getId(); ?>"}'> + <span class="weee"><?php echo __('Total'); ?><br /> <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?></span> </div> <?php endif; ?> <?php endif; ?> </td> <?php endif; ?> <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartPriceInclTax() || $this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> - <td> + <td class="col price incl tax"> <?php $_incl = $this->helper('Magento\Checkout\Helper\Data')->getPriceInclTax($_item); ?> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - <span class="cart-tax-total" data-tax-toggle='{"itemTaxId" : "#unit-item-tax-details<?php echo $_item->getId(); ?>"}'> + <span class="cart tax total" data-tax-toggle='{"itemTaxId" : "#unit-item-tax-details<?php echo $_item->getId(); ?>"}'> <?php else: ?> - <span class="cart-price"> + <span class="cart price"> <?php endif; ?> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> @@ -116,39 +114,35 @@ <div class="cart-tax-info" id="unit-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;"> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - <small> <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount'],true,true); ?></span><br /> + <span class="weee"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount'],true,true); ?></span> <?php endforeach; ?> - </small> <?php elseif ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount_incl_tax'],true,true); ?></small></span><br /> + <span class="weee"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount_incl_tax'],true,true); ?>></span> <?php endforeach; ?> <?php elseif ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - <small> <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount_incl_tax'],true,true); ?></span><br /> + <span class="weee"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount_incl_tax'],true,true); ?></span> <?php endforeach; ?> - </small> <?php endif; ?> </div> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - <div class="cart-tax-total" data-tax-toggle='{"itemTaxId" : "#unit-item-tax-details<?php echo $_item->getId(); ?>"}'> - <span class="nobr"><?php echo __('Total incl. tax'); ?>:<br /> <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?></span> + <div class="cart tax total" data-tax-toggle='{"itemTaxId" : "#unit-item-tax-details<?php echo $_item->getId(); ?>"}'> + <span class="weee"><?php echo __('Total incl. tax'); ?>:<br /> <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?></span> </div> <?php endif; ?> <?php endif; ?> </td> <?php endif; ?> - <td class="a-center"><?php echo $_item->getQty() ?></td> + <td class="col qty"><span class="qty"><?php echo $_item->getQty() ?></span></td> <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartPriceExclTax() || $this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> - <td class="a-right"> + <td class="col subtotal excl tax"> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - <span class="cart-tax-total" data-tax-toggle='{"itemTaxId" : "#esubtotal-item-tax-details<?php echo $_item->getId(); ?>"}'> + <span class="cart tax total" data-tax-toggle='{"itemTaxId" : "#esubtotal-item-tax-details<?php echo $_item->getId(); ?>"}'> <?php else: ?> - <span class="cart-price"> + <span class="cart price"> <?php endif; ?> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> @@ -160,41 +154,37 @@ </span> <?php if ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item)): ?> - <div class="cart-tax-info" id="esubtotal-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;"> + <div class="cart tax info" id="esubtotal-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;"> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - <small> <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['row_amount'],true,true); ?></span><br /> + <span class="weee"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['row_amount'],true,true); ?></span> <?php endforeach; ?> - </small> <?php elseif ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></small></span><br /> + <span class="weee"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span> <?php endforeach; ?> <?php elseif ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - <small> <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span><br /> + <span class="weee"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span> <?php endforeach; ?> - </small> <?php endif; ?> </div> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> <div class="cart-tax-total" data-tax-toggle='{"itemTaxId" : "#esubtotal-item-tax-details<?php echo $_item->getId(); ?>"}'> - <span class="nobr"><?php echo __('Total'); ?>:<br /> <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?></span> + <span class="weee"><?php echo __('Total'); ?>:<br /> <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?></span> </div> <?php endif; ?> <?php endif; ?> </td> <?php endif; ?> <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartPriceInclTax() || $this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> - <td> + <td class="col subtotal incl tax"> <?php $_incl = $this->helper('Magento\Checkout\Helper\Data')->getSubtotalInclTax($_item); ?> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - <span class="cart-tax-total" data-tax-toggle='{"itemTaxId" : "#subtotal-item-tax-details<?php echo $_item->getId(); ?>"}'> + <span class="cart tax total" data-tax-toggle='{"itemTaxId" : "#subtotal-item-tax-details<?php echo $_item->getId(); ?>"}'> <?php else: ?> - <span class="cart-price"> + <span class="cart price"> <?php endif; ?> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> @@ -208,29 +198,25 @@ <?php if ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item)): ?> - <div class="cart-tax-info" id="subtotal-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;"> + <div class="cart tax info" id="subtotal-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;"> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - <small> <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['row_amount'],true,true); ?></span><br /> + <span class="weee"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['row_amount'],true,true); ?></span> <?php endforeach; ?> - </small> <?php elseif ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></small></span><br /> + <span class="weee"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span> <?php endforeach; ?> <?php elseif ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - <small> <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span><br /> + <span class="weee"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span> <?php endforeach; ?> - </small> <?php endif; ?> </div> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - <div class="cart-tax-total" data-tax-toggle='{"itemTaxId" : "#subtotal-item-tax-details<?php echo $_item->getId(); ?>"}'> - <span class="nobr"><?php echo __('Total incl. tax'); ?>:<br /> <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?></span> + <div class="cart tax total" data-tax-toggle='{"itemTaxId" : "#subtotal-item-tax-details<?php echo $_item->getId(); ?>"}'> + <span class="weee"><?php echo __('Total incl. tax'); ?>:<br /> <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?></span> </div> <?php endif; ?> <?php endif; ?> diff --git a/app/code/Magento/Checkout/view/frontend/onepage/review/totals.phtml b/app/code/Magento/Checkout/view/frontend/onepage/review/totals.phtml index 9479a681acc26c13612de4271303442c4e2e55cd..716dc4f01c8651ef2261e3cfdefb050b4e73cc3c 100644 --- a/app/code/Magento/Checkout/view/frontend/onepage/review/totals.phtml +++ b/app/code/Magento/Checkout/view/frontend/onepage/review/totals.phtml @@ -19,7 +19,6 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design - * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ @@ -29,19 +28,17 @@ */ ?> <?php if ($this->getTotals()): ?> -<tfoot> <?php $_colspan = $this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices() ? 5 : 3; ?> <?php echo $this->renderTotals(null, $_colspan); ?> <?php echo $this->renderTotals('footer', $_colspan); ?> <?php if ($this->needDisplayBaseGrandtotal()):?> - <tr> - <td class="a-right" colspan="<?php echo $_colspan; ?>"> - <small><?php echo __('Your credit card will be charged for') ?></small> + <tr class="totals charge"> + <td class="mark" colspan="<?php echo $_colspan; ?>"> + <?php echo __('Your credit card will be charged for') ?> </td> - <td class="a-right"> - <small><?php echo $this->displayBaseGrandtotal() ?></small> + <td class="amount"> + <?php echo $this->displayBaseGrandtotal() ?> </td> </tr> <?php endif?> -</tfoot> <?php endif; ?> diff --git a/app/code/Magento/Checkout/view/frontend/onepage/shipping.phtml b/app/code/Magento/Checkout/view/frontend/onepage/shipping.phtml index 05f7c7fbcdc64226cb3f8d1e3ace267cfa331fbb..5e2012203e69c1dba411d272f6655e9bfc1e3efb 100644 --- a/app/code/Magento/Checkout/view/frontend/onepage/shipping.phtml +++ b/app/code/Magento/Checkout/view/frontend/onepage/shipping.phtml @@ -19,123 +19,110 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design - * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -<?php /** @var $this \Magento\Checkout\Block\Onepage\Shipping */ ?> -<form action="" id="co-shipping-form"> - <ul class="form-list"> - <?php if ($this->customerHasAddresses()): ?> - <li class="wide"> - <label for="shipping-address-select"><?php echo __('Select a shipping address from your address book or enter a new address.') ?></label> - <div class="input-box"> - <?php echo $this->getAddressesHtmlSelect('shipping') ?> - </div> - </li> - <?php endif ?> - <li id="shipping-new-address-form"<?php if ($this->customerHasAddresses()): ?> style="display:none;"<?php endif ?>> - <fieldset> - <input type="hidden" name="shipping[address_id]" value="<?php echo $this->getAddress()->getId() ?>" id="shipping:address_id" /> - <ul> - <li class="fields"><?php echo $this->getLayout()->createBlock('Magento\Customer\Block\Widget\Name')->setObject($this->getAddress())->setFieldIdFormat('shipping:%s')->setFieldNameFormat('shipping[%s]')->toHtml() ?></li> - <li class="fields"> - <div class="fields"> - <label for="shipping:company"><?php echo __('Company') ?></label> - <div class="input-box"> - <input type="text" id="shipping:company" name="shipping[company]" value="<?php echo $this->escapeHtml($this->getAddress()->getCompany()) ?>" title="<?php echo __('Company') ?>" class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('company') ?>" /> - </div> - </div> - </li> - <?php $_streetValidationClass = $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('street'); ?> - <li class="wide"> - <label for="shipping:street1" class="required"><em>*</em><?php echo __('Address') ?></label> - <div class="input-box"> - <input type="text" title="<?php echo __('Street Address') ?>" name="shipping[street][]" id="shipping:street1" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet(1)) ?>" class="input-text <?php echo $_streetValidationClass ?>" /> - </div> - </li> - <?php $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass)); ?> - <?php for ($_i = 2, $_n = $this->helper('Magento\Customer\Helper\Address')->getStreetLines(); $_i <= $_n; $_i++): ?> - <li class="wide"> - <div class="input-box"> +<form class="form shipping address" id="co-shipping-form" data-hasrequired="<?php echo __('* Required Fields') ?>"> + +<?php if ($this->customerHasAddresses()): ?> + <div class="field addresses"> + <label class="label" for="shipping-address-select"><span><?php echo __('Select a shipping address from your address book or enter a new address.') ?></span></label> + <div class="control"><?php echo $this->getAddressesHtmlSelect('shipping') ?></div> + </div> +<?php endif ?> + <fieldset class="fieldset address" id="shipping-new-address-form"<?php if ($this->customerHasAddresses()): ?> style="display:none;"<?php endif ?>> + <input type="hidden" name="shipping[address_id]" value="<?php echo $this->getAddress()->getId() ?>" id="shipping:address_id" /> + <?php echo $this->getLayout()->createBlock('Magento\Customer\Block\Widget\Name')->setObject($this->getAddress())->setFieldIdFormat('shipping:%s')->setFieldNameFormat('shipping[%s]')->toHtml() ?> + <div class="field company"> + <label class="label" for="shipping:company"><span><?php echo __('Company') ?></span></label> + <div class="control"> + <input type="text" id="shipping:company" name="shipping[company]" value="<?php echo $this->escapeHtml($this->getAddress()->getCompany()) ?>" title="<?php echo __('Company') ?>" class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('company') ?>" /> + </div> + </div> + <?php if ($this->helper('Magento\Customer\Helper\Address')->isVatAttributeVisible()) : ?> + <div class="field taxvat"> + <label class="label" for="shipping:vat_id"><span><?php echo __('VAT Number'); ?></span></label> + <div class="control"> + <input type="text" id="shipping:vat_id" name="shipping[vat_id]" value="<?php echo $this->escapeHtml($this->getAddress()->getVatId()); ?>" title="<?php echo __('VAT Number'); ?>" class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('vat_id') ?>" /> + </div> + </div> + <?php endif; ?> + <?php $_streetValidationClass = $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('street'); ?> + <div class="field street required"> + <label class="label" for="shipping:street1"><span><?php echo __('Address') ?></span></label> + <div class="control"> + <input type="text" title="<?php echo __('Street Address') ?>" name="shipping[street][]" id="shipping:street1" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet(1)) ?>" class="input-text <?php echo $_streetValidationClass ?>" /> + <div class="nested"> + <?php $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass)); ?> + <?php for ($_i = 2, $_n = $this->helper('Magento\Customer\Helper\Address')->getStreetLines(); $_i <= $_n; $_i++): ?> + <div class="field additional no-label"> + <div class="control"> <input type="text" title="<?php echo __('Street Address %1', $_i) ?>" name="shipping[street][]" id="shipping:street<?php echo $_i ?>" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet($_i)) ?>" class="input-text <?php echo $_streetValidationClass ?>" /> </div> - </li> - <?php endfor; ?> - <?php if ($this->helper('Magento\Customer\Helper\Address')->isVatAttributeVisible()) : ?> - <li class="wide"> - <label for="billing:vat_id"><?php echo __('VAT Number'); ?></label> - <div class="input-box"> - <input type="text" id="shipping:vat_id" name="shipping[vat_id]" value="<?php echo $this->escapeHtml($this->getAddress()->getVatId()); ?>" title="<?php echo __('VAT Number'); ?>" class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('vat_id') ?>" /> - </div> - </li> - <?php endif; ?> - <li class="fields"> - <div class="field"> - <label for="shipping:city" class="required"><em>*</em><?php echo __('City') ?></label> - <div class="input-box"> - <input type="text" title="<?php echo __('City') ?>" name="shipping[city]" value="<?php echo $this->escapeHtml($this->getAddress()->getCity()) ?>" class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('city') ?>" id="shipping:city" /> - </div> - </div> - <div class="field"> - <label for="shipping:region" class="required"><em>*</em><?php echo __('State/Province') ?></label> - <div class="input-box"> - <select id="shipping:region_id" name="shipping[region_id]" title="<?php echo __('State/Province') ?>" class="validate-select" style="display:none;"> - <option value=""><?php echo __('Please select a region, state or province.') ?></option> - </select> - <input type="text" id="shipping:region" name="shipping[region]" value="<?php echo $this->escapeHtml($this->getAddress()->getRegion()) ?>" title="<?php echo __('State/Province') ?>" class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('region') ?>" style="display:none;" /> - </div> - </div> - </li> - <li class="fields"> - <div class="field"> - <label for="shipping:postcode" class="required"><em>*</em><?php echo __('Zip/Postal Code') ?></label> - <div class="input-box"> - <input type="text" title="<?php echo __('Zip/Postal Code') ?>" name="shipping[postcode]" id="shipping:postcode" value="<?php echo $this->escapeHtml($this->getAddress()->getPostcode()) ?>" class="input-text validate-zip-international <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('postcode') ?>" /> - </div> - </div> - <div class="field"> - <label for="shipping:country_id" class="required"><em>*</em><?php echo __('Country') ?></label> - <div class="input-box"> - <?php echo $this->getCountryHtmlSelect('shipping') ?> - </div> - </div> - </li> - <li class="fields"> - <div class="field"> - <label for="shipping:telephone" class="required"><em>*</em><?php echo __('Telephone') ?></label> - <div class="input-box"> - <input type="text" name="shipping[telephone]" value="<?php echo $this->escapeHtml($this->getAddress()->getTelephone()) ?>" title="<?php echo __('Telephone') ?>" class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('telephone') ?>" id="shipping:telephone" /> - </div> - </div> - <div class="field"> - <label for="shipping:fax"><?php echo __('Fax') ?></label> - <div class="input-box"> - <input type="text" name="shipping[fax]" value="<?php echo $this->escapeHtml($this->getAddress()->getFax()) ?>" title="<?php echo __('Fax') ?>" class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('fax') ?>" id="shipping:fax" /> - </div> - </div> - </li> - <?php if ($this->isCustomerLoggedIn() && $this->customerHasAddresses()):?> - <li class="control"> - <input type="checkbox" name="shipping[save_in_address_book]" value="1" title="<?php echo __('Save in address book') ?>" id="shipping:save_in_address_book" <?php if ($this->getAddress()->getSaveInAddressBook()):?> checked="checked"<?php endif;?> class="checkbox" /><label for="shipping:save_in_address_book"><?php echo __('Save in address book') ?></label></li> - <?php else:?> - <li class="no-display"><input type="hidden" name="shipping[save_in_address_book]" value="1" /></li> - <?php endif;?> - </ul> - </fieldset> - </li> - <li class="control"> - <input type="checkbox" name="shipping[same_as_billing]" id="shipping:same_as_billing" value="1"<?php if($this->getAddress()->getSameAsBilling()): ?> checked="checked"<?php endif; ?> title="<?php echo __('Use Billing Address') ?>" class="checkbox" /><label for="shipping:same_as_billing"><?php echo __('Use Billing Address') ?></label> - </li> - </ul> - <div class="buttons-set" id="shipping-buttons-container"> - <p class="required"><?php echo __('* Required Fields') ?></p> - <p class="back-link"><a href="#"><small>« </small><?php echo __('Back') ?></a></p> - <button type="button" class="button" title="<?php echo __('Continue') ?>"><span><span><?php echo __('Continue') ?></span></span></button> - <span id="shipping-please-wait" class="please-wait" style="display:none;"> - <img src="<?php echo $this->getViewFileUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo __('Loading next step...') ?>" title="<?php echo __('Loading next step...') ?>" class="v-middle" /> <?php echo __('Loading next step...') ?> - </span> + </div> + <?php endfor; ?> + </div> + </div> + </div> + + <div class="field city required"> + <label class="label" for="shipping:city"><span><?php echo __('City') ?></span></label> + <div class="control"> + <input type="text" title="<?php echo __('City') ?>" name="shipping[city]" value="<?php echo $this->escapeHtml($this->getAddress()->getCity()) ?>" class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('city') ?>" id="shipping:city" /> + </div> + </div> + <div class="field region required"> + <label class="label" for="shipping:region"><span><?php echo __('State/Province') ?></span></label> + <div class="control"> + <select id="shipping:region_id" name="shipping[region_id]" title="<?php echo __('State/Province') ?>" class="validate-select" style="display:none;"> + <option value=""><?php echo __('Please select region, state or province') ?></option> + </select> + <input type="text" id="shipping:region" name="shipping[region]" value="<?php echo $this->escapeHtml($this->getAddress()->getRegion()) ?>" title="<?php echo __('State/Province') ?>" class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('region') ?>" style="display:none;" /> + </div> + </div> + <div class="field zip required"> + <label class="label" for="shipping:postcode"><span><?php echo __('Zip/Postal Code') ?></span></label> + <div class="control"> + <input type="text" title="<?php echo __('Zip/Postal Code') ?>" name="shipping[postcode]" id="shipping:postcode" value="<?php echo $this->escapeHtml($this->getAddress()->getPostcode()) ?>" class="input-text validate-zip-international <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('postcode') ?>" /> + </div> + </div> + <div class="field country required"> + <label class="label" for="shipping:country_id"><span><?php echo __('Country') ?></span></label> + <div class="control"> + <?php echo $this->getCountryHtmlSelect('shipping') ?> + </div> + </div> + <div class="field telephone required"> + <label class="label" for="shipping:telephone"><span><?php echo __('Telephone') ?></span></label> + <div class="control"> + <input type="text" name="shipping[telephone]" value="<?php echo $this->escapeHtml($this->getAddress()->getTelephone()) ?>" title="<?php echo __('Telephone') ?>" class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('telephone') ?>" id="shipping:telephone" /> + </div> + </div> + <div class="field fax"> + <label class="label" for="shipping:fax"><span><?php echo __('Fax') ?></span></label> + <div class="control"> + <input type="text" name="shipping[fax]" value="<?php echo $this->escapeHtml($this->getAddress()->getFax()) ?>" title="<?php echo __('Fax') ?>" class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('fax') ?>" id="shipping:fax" /> + </div> + </div> + + <?php if ($this->isCustomerLoggedIn() && $this->customerHasAddresses()):?> + <div class="field choice save"> + <input type="checkbox" name="shipping[save_in_address_book]" value="1" title="<?php echo __('Save in address book') ?>" id="shipping:save_in_address_book" <?php if ($this->getAddress()->getSaveInAddressBook()):?> checked="checked"<?php endif;?> class="checkbox" /> + <label class="label" for="shipping:save_in_address_book"><span><?php echo __('Save in address book') ?></span></label> + </div> + <?php else:?> + <input type="hidden" name="shipping[save_in_address_book]" value="1" /> + <?php endif;?> + </fieldset> + <div class="choice field"> + <input type="checkbox" name="shipping[same_as_billing]" id="shipping:same_as_billing" value="1"<?php if($this->getAddress()->getSameAsBilling()): ?> checked="checked"<?php endif; ?> class="checkbox" /> + <label class="label" for="shipping:same_as_billing"><span><?php echo __('Use Billing Address') ?></span></label> + </div> + <div class="actions" id="shipping-buttons-container"> + <div class="primary"><button type="button" class="button action continue"><span><?php echo __('Continue') ?></span></button></div> + <div class="secondary"><a href="#" class="action back"><span><?php echo __('Back') ?></span></a></div> + <span id="shipping-please-wait" class="please-wait load indicator" style="display:none;"><span><?php echo __('Loading next step...') ?></span></span> </div> </form> <script type="text/javascript"> @@ -144,21 +131,14 @@ "<?php echo $this->getViewFileUrl('Magento_Checkout::js/region-updater.js') ?>", function() { $('#shipping\\:country_id').regionUpdater({ - optionalRegionAllowed: <?php echo ($this->getConfig('general/region/display_all') ? 'true' : 'false'); ?>, + optionalRegionAllowed: <?php echo ($this->getConfig('general/region/display_all')? 'true' : 'false'); ?>, regionListId: '#shipping\\:region_id', regionInputId: '#shipping\\:region', postcodeId: '#shipping\\:postcode', regionJson: <?php echo $this->helper('Magento\Directory\Helper\Data')->getRegionJson() ?>, defaultRegion: "<?php echo $this->getAddress()->getRegionId() ?>", - countriesWithOptionalZip: <?php echo $this->helper('Magento\Directory\Helper\Data')->getCountriesWithOptionalZip(true) ?>, - clearError: function() { - var selectorArr = ['#shipping\\:region_id', '#shipping\\:region', '#shipping\\:postcode']; - for (var i = 0; i < selectorArr.length; i++) { - $(selectorArr[i]).removeClass('validation-failed').next("div.validation-advice").remove(); - } - } + countriesWithOptionalZip: <?php echo $this->helper('Magento\Directory\Helper\Data')->getCountriesWithOptionalZip(true) ?> }); }); })(jQuery); </script> - diff --git a/app/code/Magento/Checkout/view/frontend/onepage/shipping_method.phtml b/app/code/Magento/Checkout/view/frontend/onepage/shipping_method.phtml index ac7166ee1b1fecd1fdc690342a1c90bcf499c674..0d8a397f6e268ef8d527f8f1fc634c2f4d08831e 100644 --- a/app/code/Magento/Checkout/view/frontend/onepage/shipping_method.phtml +++ b/app/code/Magento/Checkout/view/frontend/onepage/shipping_method.phtml @@ -19,23 +19,22 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design - * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -<form id="co-shipping-method-form" action=""> +<form class="form shipping methods" id="co-shipping-method-form"> <div id="checkout-shipping-method-load"> <?php echo $this->getChildHtml('available') ?> </div> <div id="onepage-checkout-shipping-method-additional-load"> <?php echo $this->getChildHtml('additional') ?> </div> - <div class="buttons-set" id="shipping-method-buttons-container"> - <p class="back-link"><a href="#"><small>« </small><?php echo __('Back') ?></a></p> - <button type="button" class="button"><span><span><?php echo __('Continue') ?></span></span></button> - <span id="shipping-method-please-wait" class="please-wait" style="display:none;"> - <img src="<?php echo $this->getViewFileUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo __('Loading next step...') ?>" title="<?php echo __('Loading next step...') ?>" class="v-middle" /> <?php echo __('Loading next step...') ?> + <div class="actions" id="shipping-method-buttons-container"> + <div class="primary"><button type="button" class="button action continue"><span><?php echo __('Continue') ?></span></button></div> + <div class="secondary"><a class="action back" href="#"><span><?php echo __('Back') ?></span></a></div> + <span id="shipping-method-please-wait" class="please-wait load indicator" style="display:none;"> + <span><?php echo __('Loading next step...') ?></span> </span> </div> </form> diff --git a/app/code/Magento/Checkout/view/frontend/onepage/shipping_method/available.phtml b/app/code/Magento/Checkout/view/frontend/onepage/shipping_method/available.phtml index 8fa017be225537ef5fdbd225c26cbc01d1260379..23bc36d330d32bb280aeca5db801fc167ad5a219 100644 --- a/app/code/Magento/Checkout/view/frontend/onepage/shipping_method/available.phtml +++ b/app/code/Magento/Checkout/view/frontend/onepage/shipping_method/available.phtml @@ -19,7 +19,6 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design - * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ @@ -27,37 +26,36 @@ <?php /** @var $this \Magento\Checkout\Block\Onepage\Shipping\Method\Available */ ?> <?php $_shippingRateGroups = $this->getShippingRates(); ?> <?php if (!$_shippingRateGroups): ?> - <p><?php echo __('Sorry, no quotes are available for this order.') ?></p> + <p><?php echo __('Sorry, no quotes are available for this order at this time.') ?></p> <?php else: ?> - <dl class="sp-methods"> + <dl class="items methods shipping"> <?php $shippingCodePrice = array(); ?> <?php $_sole = count($_shippingRateGroups) == 1; foreach ($_shippingRateGroups as $code => $_rates): ?> - <dt><?php echo $this->escapeHtml($this->getCarrierName($code)) ?></dt> - <dd> - <ul> + <dt class="item title <?php echo $code ?>"><?php echo $this->escapeHtml($this->getCarrierName($code)) ?></dt> + <dd class="item content <?php echo $code ?>"> <?php $_sole = $_sole && count($_rates) == 1; foreach ($_rates as $_rate): ?> <?php $shippingCodePrice[] = '"'.$_rate->getCode().'":'.(float)$_rate->getPrice(); ?> - <li> + <div class="field choice"> <?php if ($_rate->getErrorMessage()): ?> - <ul class="messages"><li class="error-msg"><ul><li><?php echo $this->escapeHtml($_rate->getErrorMessage()) ?></li></ul></li></ul> + <div class="message error"><div><?php echo $this->escapeHtml($_rate->getErrorMessage()) ?></div></div> <?php else: ?> <?php if ($_sole) : ?> <span class="no-display"><input name="shipping_method" type="radio" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?>" checked="checked" /></span> <?php else: ?> <input name="shipping_method" type="radio" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?>"<?php if($_rate->getCode()===$this->getAddressShippingMethod()) echo ' checked="checked"' ?> class="radio"/> <?php endif; ?> - <label for="s_method_<?php echo $_rate->getCode() ?>"><?php echo $this->escapeHtml($_rate->getMethodTitle()) ?> + <label class="label" for="s_method_<?php echo $_rate->getCode() ?>"><span><?php echo $this->escapeHtml($_rate->getMethodTitle()) ?> <?php $_excl = $this->getShippingPrice($_rate->getPrice(), $this->helper('Magento\Tax\Helper\Data')->displayShippingPriceIncludingTax()); ?> <?php $_incl = $this->getShippingPrice($_rate->getPrice(), true); ?> <?php echo $_excl; ?> <?php if ($this->helper('Magento\Tax\Helper\Data')->displayShippingBothPrices() && $_incl != $_excl): ?> (<?php echo __('Incl. Tax'); ?> <?php echo $_incl; ?>) <?php endif; ?> + </span> </label> <?php endif ?> - </li> + </div> <?php endforeach; ?> - </ul> </dd> <?php endforeach; ?> </dl> diff --git a/app/code/Magento/Checkout/view/frontend/success.phtml b/app/code/Magento/Checkout/view/frontend/success.phtml index 169c4d693f39925a402e7c303848f2dd45fec34c..95681ab6f6e26bf453c8e003ce4d4f85ed7b3109 100644 --- a/app/code/Magento/Checkout/view/frontend/success.phtml +++ b/app/code/Magento/Checkout/view/frontend/success.phtml @@ -19,30 +19,24 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design - * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -<div class="page-title"> - <h1><?php echo __('We received your order.') ?></h1> -</div> -<?php echo $this->getMessagesBlock()->getGroupedHtml() ?> -<h2 class="sub-title"><?php echo __('Thank you for your purchase!') ?></h2> - +<h2 class="subtitle"><?php echo __('Thank you for your purchase!') ?></h2> <?php if ($this->getOrderId()):?> -<?php if ($this->getCanViewOrder()) :?> - <p><?php echo __('Your order # is: %1.', sprintf('<a href="%s">%s</a>', $this->escapeHtml($this->getViewOrderUrl()), $this->escapeHtml($this->getOrderId()))) ?></p> -<?php else :?> - <p><?php echo __('Your order # is: %1.', $this->escapeHtml($this->getOrderId())) ?></p> -<?php endif;?> - <p><?php echo __('We\'ll send you a confirmation email with order details and tracking information.') ?></p> -<?php if ($this->getCanViewOrder() && $this->getCanPrintOrder()) :?> - <p> - <?php echo __('Click <a href="%1" onclick="this.target=\'_blank\'">here to print</a> a copy of your order confirmation.', $this->getPrintUrl()) ?> - <?php echo $this->getChildHtml() ?> - </p> -<?php endif;?> + <?php if ($this->getCanViewOrder()) :?> + <p><?php echo __('Your order # is: %1.', sprintf('<a href="%s">%s</a>', $this->escapeHtml($this->getViewOrderUrl()), $this->escapeHtml($this->getOrderId()))) ?></p> + <?php else :?> + <p><?php echo __('Your order # is: %1.', $this->escapeHtml($this->getOrderId())) ?></p> + <?php endif;?> + <p><?php echo __('You will receive an order confirmation email with details of your order and a link to track its progress.') ?></p> + <?php if ($this->getCanViewOrder() && $this->getCanPrintOrder()) :?> + <p> + <?php echo __('Click <a href="%1" onclick="this.target=\'_blank\'">here to print</a> a copy of your order confirmation.', $this->getPrintUrl()) ?> + <?php echo $this->getChildHtml() ?> + </p> + <?php endif;?> <?php endif;?> <?php if ($this->getAgreementRefId()): ?> @@ -51,14 +45,14 @@ <?php if ($profiles = $this->getRecurringProfiles()):?> <p><?php echo __('Your recurring payment profiles:'); ?></p> -<ul class="disc"> +<ul> <?php foreach($profiles as $profile):?> <?php $profileIdHtml = ($this->getCanViewProfiles() ? sprintf('<a href="%s">%s</a>', $this->escapeHtml($this->getProfileUrl($profile)), $this->escapeHtml($this->getObjectData($profile, 'reference_id'))) : $this->escapeHtml($this->getObjectData($profile, 'reference_id')));?> - <li><?php echo __('Payment profile # %1: "%2"', $profileIdHtml, $this->escapeHtml($this->getObjectData($profile, 'schedule_description')))?></li> + <li><?php echo __('Payment profile # %1: "%2".', $profileIdHtml, $this->escapeHtml($this->getObjectData($profile, 'schedule_description')))?></li> <?php endforeach;?> </ul> <?php endif;?> -<div class="buttons-set"> - <button type="button" class="button" title="<?php echo __('Continue Shopping') ?>" onclick="window.location='<?php echo $this->getUrl() ?>'"><span><span><?php echo __('Continue Shopping') ?></span></span></button> +<div class="actions"> + <a class="action continue" title="<?php echo __('Continue Shopping') ?>" href="<?php echo $this->getUrl() ?>"><span><?php echo __('Continue Shopping') ?></span></a> </div> diff --git a/app/code/Magento/Checkout/view/frontend/total/default.phtml b/app/code/Magento/Checkout/view/frontend/total/default.phtml index d34e1906d404f3b85f42219f1c876f5fa51995e4..2e5eee7a9c41aa51a381ab8b87cdb225653dddcd 100644 --- a/app/code/Magento/Checkout/view/frontend/total/default.phtml +++ b/app/code/Magento/Checkout/view/frontend/total/default.phtml @@ -18,21 +18,19 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * - * @category design - * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -<tr> - <th colspan="<?php echo $this->getColspan(); ?>" style="<?php echo $this->getTotal()->getStyle() ?>" class="a-right"> +<tr class="totals"> + <td colspan="<?php echo $this->getColspan(); ?>" style="<?php echo $this->getTotal()->getStyle() ?>" class="mark"> <?php if ($this->getRenderingArea() == $this->getTotal()->getArea()): ?><strong><?php endif; ?> <?php echo $this->escapeHtml($this->getTotal()->getTitle()); ?> <?php if ($this->getRenderingArea() == $this->getTotal()->getArea()): ?></strong><?php endif; ?> - </th> - <td style="<?php echo $this->getTotal()->getStyle() ?>" class="a-right"> + </td> + <td style="<?php echo $this->getTotal()->getStyle() ?>" class="amount"> <?php if ($this->getRenderingArea() == $this->getTotal()->getArea()): ?><strong><?php endif; ?> - <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($this->getTotal()->getValue()) ?> + <span><?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($this->getTotal()->getValue()) ?></span> <?php if ($this->getRenderingArea() == $this->getTotal()->getArea()): ?></strong><?php endif; ?> </td> </tr> diff --git a/app/code/Magento/Checkout/view/frontend/total/nominal.phtml b/app/code/Magento/Checkout/view/frontend/total/nominal.phtml index 58537f0ac3f29210e2bb38167ad6ad89f935df52..f93b655db8131d8b4d9699e707b9333c90de6611 100644 --- a/app/code/Magento/Checkout/view/frontend/total/nominal.phtml +++ b/app/code/Magento/Checkout/view/frontend/total/nominal.phtml @@ -18,39 +18,34 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * - * @category design - * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ + +/** @var $this \Magento\Checkout\Block\Total\Nominal */ ?> -<?php -/** - * @see \Magento\Checkout\Block\Total\Nominal - */ -?> -<tr> - <th colspan="<?php echo $this->getColspan() + 1; ?>" style="<?php echo $this->getTotalStyle() ?>" class="a-right"> +<tr class="totals nominal"> + <th colspan="<?php echo $this->getColspan() + 1; ?>" style="<?php echo $this->getTotalStyle() ?>" class="mark"> <?php echo sprintf(($this->getRenderingArea() == $this->getTotalArea()) ? '<strong>%s</strong>' : '%s', $this->escapeHtml($this->getTotalTitle())) ?> </th> </tr> <?php foreach ($this->getTotalItems() as $i => $item): ?> -<?php foreach ($this->getTotalItemDetails($item) as $j => $row):?> -<tr class="summary-details <?php echo "summary-details-nominal-{$i}" . (0 == $j ? ' summary-details-first' : '') . ($this->getItemDetailsRowIsCompounded($row) ? '' : ' summary-details-excluded')?>" style="display:none;"> - <td colspan="<?php echo $this->getColspan(); ?>" style="<?php echo $this->getTotalStyle() ?>" class="a-right"> - <?php echo $this->escapeHtml($this->getItemDetailsRowLabel($row)) ?> - </td> - <td class="a-right"> - <?php echo $this->formatPrice($this->getItemDetailsRowAmount($row)) ?> - </td> -</tr> -<?php endforeach; ?> -<tr class="summary-total" onclick="expandDetails(this, '<?php echo ".summary-details-nominal-{$i}"?>')"> - <td colspan="<?php echo $this->getColspan(); ?>" style="<?php echo $this->getTotalStyle() ?>"> - <div class="summary-collapse"><?php echo $this->escapeHtml($this->getItemName($item)); ?></div> - </td> - <td class="a-right"> - <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($this->getItemRowTotal($item)) ?> - </td> -</tr> + <?php foreach ($this->getTotalItemDetails($item) as $j => $row):?> + <tr class="totals nominal details"> + <td colspan="<?php echo $this->getColspan(); ?>" style="<?php echo $this->getTotalStyle() ?>" class="mark"> + <?php echo $this->escapeHtml($this->getItemDetailsRowLabel($row)) ?> + </td> + <td class="amount"> + <?php echo $this->formatPrice($this->getItemDetailsRowAmount($row)) ?> + </td> + </tr> + <?php endforeach; ?> + <tr class="totals nominal summary"> + <td class="mark" colspan="<?php echo $this->getColspan(); ?>" style="<?php echo $this->getTotalStyle() ?>"> + <div class="detailed"><?php echo $this->escapeHtml($this->getItemName($item)); ?></div> + </td> + <td class="amount"> + <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($this->getItemRowTotal($item)) ?> + </td> + </tr> <?php endforeach; ?> diff --git a/app/code/Magento/Checkout/view/frontend/total/tax.phtml b/app/code/Magento/Checkout/view/frontend/total/tax.phtml index 998107b44cab928eb5c98b87cd72cfbc0b617e1e..dcc197ca0df6f6eecdc0a42b68e873cf3e6aa8fd 100644 --- a/app/code/Magento/Checkout/view/frontend/total/tax.phtml +++ b/app/code/Magento/Checkout/view/frontend/total/tax.phtml @@ -18,8 +18,6 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * - * @category design - * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ @@ -35,8 +33,8 @@ <?php $isFirst = 1; ?> <?php foreach ($rates as $rate): ?> - <tr class="summary-details-<?php echo $taxIter; ?> summary-details<?php if ($isTop): echo ' summary-details-first'; endif; ?>" style="display:none;"> - <td class="a-right" style="<?php echo $this->getTotal()->getStyle() ?>" colspan="<?php echo $this->getColspan(); ?>"> + <tr class="totals tax details details-<?php echo $taxIter; ?>"> + <td class="mark" style="<?php echo $this->getTotal()->getStyle() ?>" colspan="<?php echo $this->getColspan(); ?>"> <?php echo $this->escapeHtml($rate['title']); ?> <?php if (!is_null($rate['percent'])): ?> (<?php echo (float)$rate['percent']; ?>%) @@ -44,7 +42,7 @@ <br /> </td> <?php if ($isFirst): ?> - <td rowspan="<?php echo count($rates); ?>" class="a-right" style="<?php echo $this->getTotal()->getStyle() ?>"> + <td class="amount" rowspan="<?php echo count($rates); ?>" class="a-right" style="<?php echo $this->getTotal()->getStyle() ?>"> <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($amount); ?> </td> <?php endif; ?> @@ -54,15 +52,21 @@ <?php endforeach; ?> <?php endforeach; ?> <?php endif;?> -<tr<?php if ($this->helper('Magento\Tax\Helper\Data')->displayFullSummary() && $this->getTotal()->getValue()!=0): ?> class="summary-total" onclick="expandDetails(this, '.summary-details-<?php echo $taxIter;?>')"<?php endif; ?>> - <td class="a-right" colspan="<?php echo $this->getColspan(); ?>" style="<?php echo $this->getTotal()->getStyle() ?>"> +<?php + $attributes = 'class="totals tax"'; + if ($this->helper('Magento\Tax\Helper\Data')->displayFullSummary() && $this->getTotal()->getValue()!=0) { + $attributes = 'class="totals tax summary"'; + } +?> +<tr <?php echo $attributes; ?>> + <td class="mark" colspan="<?php echo $this->getColspan(); ?>" style="<?php echo $this->getTotal()->getStyle() ?>"> <?php if ($this->helper('Magento\Tax\Helper\Data')->displayFullSummary()): ?> - <div class="summary-collapse"><?php echo $this->getTotal()->getTitle() ?></div> + <div class="detailed"><?php echo $this->getTotal()->getTitle() ?></div> <?php else: ?> <?php echo $this->getTotal()->getTitle() ?> <?php endif;?> </td> - <td class="a-right" style="<?php echo $this->getTotal()->getStyle() ?>"> - <strong><?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($this->getTotal()->getValue()) ?></strong> + <td class="amount" style="<?php echo $this->getTotal()->getStyle() ?>"> + <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($this->getTotal()->getValue()) ?> </td> </tr> diff --git a/app/code/Magento/Cms/Block/Adminhtml/Block/Edit.php b/app/code/Magento/Cms/Block/Adminhtml/Block/Edit.php index 231df64e1a17b79984828114197097dcd017bc9b..41f0483f9baa89226f220ba00ad3700b938b04d8 100644 --- a/app/code/Magento/Cms/Block/Adminhtml/Block/Edit.php +++ b/app/code/Magento/Cms/Block/Adminhtml/Block/Edit.php @@ -42,20 +42,20 @@ class Edit extends \Magento\Adminhtml\Block\Widget\Form\Container */ protected $_coreRegistry = null; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _construct() diff --git a/app/code/Magento/Cms/Block/Adminhtml/Block/Edit/Form.php b/app/code/Magento/Cms/Block/Adminhtml/Block/Edit/Form.php index 22a28803c44bdc8c4012ceab73c975d91f39ba89..b06331783dbe17c8de2ffe2f8dcd02cfffcba9f6 100644 --- a/app/code/Magento/Cms/Block/Adminhtml/Block/Edit/Form.php +++ b/app/code/Magento/Cms/Block/Adminhtml/Block/Edit/Form.php @@ -46,27 +46,27 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic */ protected $_systemStore; - /** - * @param \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig - * @param \Magento\Core\Model\System\Store $systemStore - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig + * @param \Magento\Core\Model\System\Store $systemStore + * @param array $data */ - public function __construct( - \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig, - \Magento\Core\Model\System\Store $systemStore, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig, + \Magento\Core\Model\System\Store $systemStore, + array $data = array() + ) { $this->_wysiwygConfig = $wysiwygConfig; $this->_systemStore = $systemStore; - parent::__construct($registry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); } /** diff --git a/app/code/Magento/Cms/Block/Adminhtml/Block/Widget/Chooser.php b/app/code/Magento/Cms/Block/Adminhtml/Block/Widget/Chooser.php index d4402ced6f40b996342bc0c0b356fc8a1279a06a..0d5fa34087a62a100b6c19a41bdae3de01163110 100644 --- a/app/code/Magento/Cms/Block/Adminhtml/Block/Widget/Chooser.php +++ b/app/code/Magento/Cms/Block/Adminhtml/Block/Widget/Chooser.php @@ -45,27 +45,25 @@ class Chooser extends \Magento\Adminhtml\Block\Widget\Grid */ protected $_collectionFactory; - /** - * @param \Magento\Cms\Model\BlockFactory $blockFactory - * @param \Magento\Cms\Model\Resource\Block\CollectionFactory $collectionFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Cms\Model\BlockFactory $blockFactory + * @param \Magento\Cms\Model\Resource\Block\CollectionFactory $collectionFactory + * @param array $data */ - public function __construct( - \Magento\Cms\Model\BlockFactory $blockFactory, - \Magento\Cms\Model\Resource\Block\CollectionFactory $collectionFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Cms\Model\BlockFactory $blockFactory, + \Magento\Cms\Model\Resource\Block\CollectionFactory $collectionFactory, + array $data = array() + ) { $this->_blockFactory = $blockFactory; $this->_collectionFactory = $collectionFactory; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $data); } /** diff --git a/app/code/Magento/Cms/Block/Adminhtml/Page/Edit.php b/app/code/Magento/Cms/Block/Adminhtml/Page/Edit.php index d3c42da2cd8f7b2b575591a73471737295a6b3c7..c11b33cb587168bfa92995ad8ba60cc96ab27337 100644 --- a/app/code/Magento/Cms/Block/Adminhtml/Page/Edit.php +++ b/app/code/Magento/Cms/Block/Adminhtml/Page/Edit.php @@ -42,20 +42,20 @@ class Edit extends \Magento\Adminhtml\Block\Widget\Form\Container */ protected $_coreRegistry = null; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** @@ -137,7 +137,7 @@ class Edit extends \Magento\Adminhtml\Block\Widget\Form\Container /** * Prepare layout * - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ protected function _prepareLayout() { diff --git a/app/code/Magento/Cms/Block/Adminhtml/Page/Edit/Tab/Content.php b/app/code/Magento/Cms/Block/Adminhtml/Page/Edit/Tab/Content.php index 760268aca13407f780625f3a09e0c8680880158f..d683d1d95bd745ae9d687eee8ce23aa52f5fc028 100644 --- a/app/code/Magento/Cms/Block/Adminhtml/Page/Edit/Tab/Content.php +++ b/app/code/Magento/Cms/Block/Adminhtml/Page/Edit/Tab/Content.php @@ -38,26 +38,24 @@ class Content */ protected $_wysiwygConfig; - /** - * @param \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Event\ManagerInterface $eventManager - * @param \Magento\Core\Model\Registry $coreRegistry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig + * @param array $data */ - public function __construct( - \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig, - \Magento\Backend\Block\Template\Context $context, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Event\ManagerInterface $eventManager, - \Magento\Core\Model\Registry $coreRegistry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig, + array $data = array() + ) { $this->_wysiwygConfig = $wysiwygConfig; - parent::__construct($coreRegistry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); } /** diff --git a/app/code/Magento/Cms/Block/Adminhtml/Page/Edit/Tab/Design.php b/app/code/Magento/Cms/Block/Adminhtml/Page/Edit/Tab/Design.php index 0119a603a67c21c8c6c4d76bb51a19ac8167f5fc..dd4584c6a55ec1127514c881eebf9171975ae0c8 100644 --- a/app/code/Magento/Cms/Block/Adminhtml/Page/Edit/Tab/Design.php +++ b/app/code/Magento/Cms/Block/Adminhtml/Page/Edit/Tab/Design.php @@ -42,27 +42,27 @@ class Design */ protected $_pageLayout; - /** - * @param \Magento\Page\Model\Source\Layout $pageLayout - * @param \Magento\Core\Model\Theme\LabelFactory $labelFactory - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Page\Model\Source\Layout $pageLayout + * @param \Magento\Core\Model\Theme\LabelFactory $labelFactory + * @param array $data */ - public function __construct( - \Magento\Page\Model\Source\Layout $pageLayout, - \Magento\Core\Model\Theme\LabelFactory $labelFactory, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Page\Model\Source\Layout $pageLayout, + \Magento\Core\Model\Theme\LabelFactory $labelFactory, + array $data = array() + ) { $this->_labelFactory = $labelFactory; $this->_pageLayout = $pageLayout; - parent::__construct($registry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); } /** diff --git a/app/code/Magento/Cms/Block/Adminhtml/Page/Edit/Tab/Main.php b/app/code/Magento/Cms/Block/Adminhtml/Page/Edit/Tab/Main.php index 3cedb1c24eb94326cd72af72a1b50301b0f5efa5..563446df85f05c03a488a90180d83fe43601da57 100644 --- a/app/code/Magento/Cms/Block/Adminhtml/Page/Edit/Tab/Main.php +++ b/app/code/Magento/Cms/Block/Adminhtml/Page/Edit/Tab/Main.php @@ -38,24 +38,24 @@ class Main */ protected $_systemStore; - /** - * @param \Magento\Core\Model\System\Store $systemStore - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Core\Model\System\Store $systemStore + * @param array $data */ - public function __construct( - \Magento\Core\Model\System\Store $systemStore, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Core\Model\System\Store $systemStore, + array $data = array() + ) { $this->_systemStore = $systemStore; - parent::__construct($registry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); } protected function _prepareForm() diff --git a/app/code/Magento/Cms/Block/Adminhtml/Page/Grid.php b/app/code/Magento/Cms/Block/Adminhtml/Page/Grid.php index 48d4298126d029de38fe0c7c5a7cc7f2ea7b6717..31c7bbe42d58aac74fa9d17614a4497011367db1 100644 --- a/app/code/Magento/Cms/Block/Adminhtml/Page/Grid.php +++ b/app/code/Magento/Cms/Block/Adminhtml/Page/Grid.php @@ -50,30 +50,28 @@ class Grid extends \Magento\Adminhtml\Block\Widget\Grid */ protected $_pageLayout; - /** - * @param \Magento\Page\Model\Source\Layout $pageLayout - * @param \Magento\Cms\Model\Page $cmsPage - * @param \Magento\Cms\Model\Resource\Page\CollectionFactory $collectionFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Page\Model\Source\Layout $pageLayout + * @param \Magento\Cms\Model\Page $cmsPage + * @param \Magento\Cms\Model\Resource\Page\CollectionFactory $collectionFactory + * @param array $data */ - public function __construct( - \Magento\Page\Model\Source\Layout $pageLayout, - \Magento\Cms\Model\Page $cmsPage, - \Magento\Cms\Model\Resource\Page\CollectionFactory $collectionFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Page\Model\Source\Layout $pageLayout, + \Magento\Cms\Model\Page $cmsPage, + \Magento\Cms\Model\Resource\Page\CollectionFactory $collectionFactory, + array $data = array() + ) { $this->_collectionFactory = $collectionFactory; $this->_cmsPage = $cmsPage; $this->_pageLayout = $pageLayout; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $data); } protected function _construct() diff --git a/app/code/Magento/Cms/Block/Adminhtml/Page/Grid/Renderer/Action.php b/app/code/Magento/Cms/Block/Adminhtml/Page/Grid/Renderer/Action.php index eed40c878d1b5534689d432d336e722fc303a7d1..aa36e49e7e3b0fccf611ce5076f35422bdbcb2d7 100644 --- a/app/code/Magento/Cms/Block/Adminhtml/Page/Grid/Renderer/Action.php +++ b/app/code/Magento/Cms/Block/Adminhtml/Page/Grid/Renderer/Action.php @@ -34,16 +34,16 @@ class Action */ protected $_urlFactory; - /** - * @param \Magento\Core\Model\UrlFactory $urlFactory - * @param \Magento\Backend\Block\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Context $context + * @param \Magento\Core\Model\UrlFactory $urlFactory + * @param array $data */ - public function __construct( - \Magento\Core\Model\UrlFactory $urlFactory, - \Magento\Backend\Block\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Context $context, + \Magento\Core\Model\UrlFactory $urlFactory, + array $data = array() + ) { $this->_urlFactory = $urlFactory; parent::__construct($context, $data); } diff --git a/app/code/Magento/Cms/Block/Adminhtml/Page/Widget/Chooser.php b/app/code/Magento/Cms/Block/Adminhtml/Page/Widget/Chooser.php index fac8309d3bcf05d3325960a642230a524a5be406..49f2bca50bcfb21c689585f2bbeb8e452d8bff1a 100644 --- a/app/code/Magento/Cms/Block/Adminhtml/Page/Widget/Chooser.php +++ b/app/code/Magento/Cms/Block/Adminhtml/Page/Widget/Chooser.php @@ -55,33 +55,31 @@ class Chooser extends \Magento\Adminhtml\Block\Widget\Grid */ protected $_collectionFactory; - /** - * @param \Magento\Page\Model\Source\Layout $pageLayout - * @param \Magento\Cms\Model\Page $cmsPage - * @param \Magento\Cms\Model\PageFactory $pageFactory - * @param \Magento\Cms\Model\Resource\Page\CollectionFactory $collectionFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Page\Model\Source\Layout $pageLayout + * @param \Magento\Cms\Model\Page $cmsPage + * @param \Magento\Cms\Model\PageFactory $pageFactory + * @param \Magento\Cms\Model\Resource\Page\CollectionFactory $collectionFactory + * @param array $data */ - public function __construct( - \Magento\Page\Model\Source\Layout $pageLayout, - \Magento\Cms\Model\Page $cmsPage, - \Magento\Cms\Model\PageFactory $pageFactory, - \Magento\Cms\Model\Resource\Page\CollectionFactory $collectionFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Page\Model\Source\Layout $pageLayout, + \Magento\Cms\Model\Page $cmsPage, + \Magento\Cms\Model\PageFactory $pageFactory, + \Magento\Cms\Model\Resource\Page\CollectionFactory $collectionFactory, + array $data = array() + ) { $this->_pageLayout = $pageLayout; $this->_cmsPage = $cmsPage; $this->_pageFactory = $pageFactory; $this->_collectionFactory = $collectionFactory; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $data); } /** diff --git a/app/code/Magento/Cms/Block/Adminhtml/Wysiwyg/Images/Content/Files.php b/app/code/Magento/Cms/Block/Adminhtml/Wysiwyg/Images/Content/Files.php index 10fea8eea10b51efbadb29cc70f8e376223ab41c..08c145f3c92673edace74baf372645ff9c05e833 100644 --- a/app/code/Magento/Cms/Block/Adminhtml/Wysiwyg/Images/Content/Files.php +++ b/app/code/Magento/Cms/Block/Adminhtml/Wysiwyg/Images/Content/Files.php @@ -52,23 +52,23 @@ class Files extends \Magento\Adminhtml\Block\Template */ protected $_imageHelper; - /** - * @param \Magento\Cms\Model\Wysiwyg\Images\Storage $imageStorage - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Cms\Helper\Wysiwyg\Images $imageHelper - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Cms\Model\Wysiwyg\Images\Storage $imageStorage + * @param \Magento\Cms\Helper\Wysiwyg\Images $imageHelper + * @param array $data */ - public function __construct( - \Magento\Cms\Model\Wysiwyg\Images\Storage $imageStorage, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Cms\Helper\Wysiwyg\Images $imageHelper, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Cms\Model\Wysiwyg\Images\Storage $imageStorage, + \Magento\Cms\Helper\Wysiwyg\Images $imageHelper, + array $data = array() + ) { $this->_imageHelper = $imageHelper; $this->_imageStorage = $imageStorage; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Cms/Block/Adminhtml/Wysiwyg/Images/Content/Uploader.php b/app/code/Magento/Cms/Block/Adminhtml/Wysiwyg/Images/Content/Uploader.php index 259357e1c772433b2fc57183f0755fc9338b6ec1..f671873764064bd298fd1cdcd9c289edaa85313f 100644 --- a/app/code/Magento/Cms/Block/Adminhtml/Wysiwyg/Images/Content/Uploader.php +++ b/app/code/Magento/Cms/Block/Adminhtml/Wysiwyg/Images/Content/Uploader.php @@ -40,24 +40,22 @@ class Uploader extends \Magento\Adminhtml\Block\Media\Uploader */ protected $_imagesStorage; - /** - * @param \Magento\Cms\Model\Wysiwyg\Images\Storage $imagesStorage - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\View\Url $viewUrl - * @param \Magento\File\Size $fileSize - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\File\Size $fileSize + * @param \Magento\Cms\Model\Wysiwyg\Images\Storage $imagesStorage + * @param array $data */ - public function __construct( - \Magento\Cms\Model\Wysiwyg\Images\Storage $imagesStorage, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\View\Url $viewUrl, - \Magento\File\Size $fileSize, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\File\Size $fileSize, + \Magento\Cms\Model\Wysiwyg\Images\Storage $imagesStorage, + array $data = array() + ) { $this->_imagesStorage = $imagesStorage; - parent::__construct($coreData, $context, $viewUrl, $fileSize, $data); + parent::__construct($context, $coreData, $fileSize, $data); } protected function _construct() diff --git a/app/code/Magento/Cms/Block/Adminhtml/Wysiwyg/Images/Tree.php b/app/code/Magento/Cms/Block/Adminhtml/Wysiwyg/Images/Tree.php index bca6fda28698ba611b778d273aa46376ff000bfa..d828961cc218158e582f11ef28f57828ed210b92 100644 --- a/app/code/Magento/Cms/Block/Adminhtml/Wysiwyg/Images/Tree.php +++ b/app/code/Magento/Cms/Block/Adminhtml/Wysiwyg/Images/Tree.php @@ -49,23 +49,23 @@ class Tree extends \Magento\Adminhtml\Block\Template */ protected $_cmsWysiwygImages = null; - /** - * @param \Magento\Cms\Helper\Wysiwyg\Images $cmsWysiwygImages - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Cms\Helper\Wysiwyg\Images $cmsWysiwygImages + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Cms\Helper\Wysiwyg\Images $cmsWysiwygImages, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Cms\Helper\Wysiwyg\Images $cmsWysiwygImages, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; $this->_cmsWysiwygImages = $cmsWysiwygImages; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Cms/Block/Block.php b/app/code/Magento/Cms/Block/Block.php index 08cba54e3635d192b936ff7327969cdbab9f6dde..8f1ba323ae8a6fb3394090a3df57f81182255225 100644 --- a/app/code/Magento/Cms/Block/Block.php +++ b/app/code/Magento/Cms/Block/Block.php @@ -34,7 +34,7 @@ */ namespace Magento\Cms\Block; -class Block extends \Magento\Core\Block\AbstractBlock +class Block extends \Magento\View\Block\AbstractBlock { /** * @var \Magento\Cms\Model\Template\FilterProvider @@ -58,14 +58,14 @@ class Block extends \Magento\Core\Block\AbstractBlock /** * Construct * - * @param \Magento\Core\Block\Context $context + * @param \Magento\View\Block\Context $context * @param \Magento\Cms\Model\Template\FilterProvider $filterProvider * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Cms\Model\BlockFactory $blockFactory * @param array $data */ public function __construct( - \Magento\Core\Block\Context $context, + \Magento\View\Block\Context $context, \Magento\Cms\Model\Template\FilterProvider $filterProvider, \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Cms\Model\BlockFactory $blockFactory, diff --git a/app/code/Magento/Cms/Block/Page.php b/app/code/Magento/Cms/Block/Page.php index deb564c192dc0364423748c48a125dc91f044fa4..b3132f9d63b69bb26c4bc26570cbb93d98599b3b 100644 --- a/app/code/Magento/Cms/Block/Page.php +++ b/app/code/Magento/Cms/Block/Page.php @@ -34,7 +34,7 @@ */ namespace Magento\Cms\Block; -class Page extends \Magento\Core\Block\AbstractBlock +class Page extends \Magento\View\Block\AbstractBlock { /** * @var \Magento\Cms\Model\Template\FilterProvider @@ -63,7 +63,7 @@ class Page extends \Magento\Core\Block\AbstractBlock /** * Construct * - * @param \Magento\Core\Block\Context $context + * @param \Magento\View\Block\Context $context * @param \Magento\Cms\Model\Page $page * @param \Magento\Cms\Model\Template\FilterProvider $filterProvider * @param \Magento\Core\Model\StoreManagerInterface $storeManager @@ -71,7 +71,7 @@ class Page extends \Magento\Core\Block\AbstractBlock * @param array $data */ public function __construct( - \Magento\Core\Block\Context $context, + \Magento\View\Block\Context $context, \Magento\Cms\Model\Page $page, \Magento\Cms\Model\Template\FilterProvider $filterProvider, \Magento\Core\Model\StoreManagerInterface $storeManager, diff --git a/app/code/Magento/Cms/Block/Widget/Block.php b/app/code/Magento/Cms/Block/Widget/Block.php index 205d04e144714cb2ec8a2d1ff8b3bd1f902c3a1b..3339bb9976c236f2e75666abf0d602fdba6ea2c1 100644 --- a/app/code/Magento/Cms/Block/Widget/Block.php +++ b/app/code/Magento/Cms/Block/Widget/Block.php @@ -34,7 +34,7 @@ */ namespace Magento\Cms\Block\Widget; -class Block extends \Magento\Core\Block\Template implements \Magento\Widget\Block\BlockInterface +class Block extends \Magento\View\Block\Template implements \Magento\Widget\Block\BlockInterface { /** * @var \Magento\Cms\Model\Template\FilterProvider @@ -48,13 +48,6 @@ class Block extends \Magento\Core\Block\Template implements \Magento\Widget\Bloc */ static protected $_widgetUsageMap = array(); - /** - * Store manager - * - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - /** * Block factory * @@ -63,27 +56,22 @@ class Block extends \Magento\Core\Block\Template implements \Magento\Widget\Bloc protected $_blockFactory; /** - * Construct - * + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Cms\Model\Template\FilterProvider $filterProvider * @param \Magento\Cms\Model\BlockFactory $blockFactory - * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Cms\Model\Template\FilterProvider $filterProvider, \Magento\Cms\Model\BlockFactory $blockFactory, - \Magento\Core\Model\StoreManagerInterface $storeManager, array $data = array() ) { - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); $this->_filterProvider = $filterProvider; $this->_blockFactory = $blockFactory; - $this->_storeManager = $storeManager; } /** diff --git a/app/code/Magento/Cms/Block/Widget/Page/Link.php b/app/code/Magento/Cms/Block/Widget/Page/Link.php index 9d57574af3dadb35877d69f2a0e40b0ad31503a2..b2adfca4b5f88d8dc8970ddd8561a13ecf398415 100644 --- a/app/code/Magento/Cms/Block/Widget/Page/Link.php +++ b/app/code/Magento/Cms/Block/Widget/Page/Link.php @@ -35,7 +35,7 @@ namespace Magento\Cms\Block\Widget\Page; class Link - extends \Magento\Core\Block\Html\Link + extends \Magento\View\Block\Html\Link implements \Magento\Widget\Block\BlockInterface { /** @@ -72,34 +72,22 @@ class Link protected $_cmsPage; /** - * Store manager - * - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - - /** - * Construct - * + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Cms\Model\Resource\Page $resourcePage * @param \Magento\Cms\Helper\Page $cmsPage - * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Cms\Model\Resource\Page $resourcePage, \Magento\Cms\Helper\Page $cmsPage, - \Magento\Core\Model\StoreManagerInterface $storeManager, array $data = array() ) { - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); $this->_resourcePage = $resourcePage; $this->_cmsPage = $cmsPage; - $this->_storeManager = $storeManager; } /** diff --git a/app/code/Magento/Cms/Controller/Adminhtml/Block.php b/app/code/Magento/Cms/Controller/Adminhtml/Block.php index 1c01373f4c5bd218f8cafa8250a8a09b31ce53f1..b70a1e50b9585527910ac96630fb3f84e75e391a 100644 --- a/app/code/Magento/Cms/Controller/Adminhtml/Block.php +++ b/app/code/Magento/Cms/Controller/Adminhtml/Block.php @@ -34,7 +34,7 @@ */ namespace Magento\Cms\Controller\Adminhtml; -class Block extends \Magento\Backend\Controller\Adminhtml\Action +class Block extends \Magento\Backend\App\Action { /** * Core registry @@ -44,11 +44,11 @@ class Block extends \Magento\Backend\Controller\Adminhtml\Action protected $_coreRegistry = null; /** - * @param \Magento\Backend\Controller\Context $context + * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Core\Model\Registry $coreRegistry */ public function __construct( - \Magento\Backend\Controller\Context $context, + \Magento\Backend\App\Action\Context $context, \Magento\Core\Model\Registry $coreRegistry ) { $this->_coreRegistry = $coreRegistry; @@ -63,8 +63,8 @@ class Block extends \Magento\Backend\Controller\Adminhtml\Action protected function _initAction() { // load layout, set active menu and breadcrumbs - $this->loadLayout() - ->_setActiveMenu('Magento_Cms::cms_block') + $this->_view->loadLayout(); + $this->_setActiveMenu('Magento_Cms::cms_block') ->_addBreadcrumb(__('CMS'), __('CMS')) ->_addBreadcrumb(__('Static Blocks'), __('Static Blocks')); return $this; @@ -75,10 +75,10 @@ class Block extends \Magento\Backend\Controller\Adminhtml\Action */ public function indexAction() { - $this->_title(__('Blocks')); + $this->_title->add(__('Blocks')); $this->_initAction(); - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -95,7 +95,7 @@ class Block extends \Magento\Backend\Controller\Adminhtml\Action */ public function editAction() { - $this->_title(__('Blocks')); + $this->_title->add(__('Blocks')); // 1. Get ID and create model $id = $this->getRequest()->getParam('block_id'); @@ -111,7 +111,7 @@ class Block extends \Magento\Backend\Controller\Adminhtml\Action } } - $this->_title($model->getId() ? $model->getTitle() : __('New Block')); + $this->_title->add($model->getId() ? $model->getTitle() : __('New Block')); // 3. Set entered data if was error when we do save $data = $this->_objectManager->get('Magento\Adminhtml\Model\Session')->getFormData(true); @@ -124,8 +124,8 @@ class Block extends \Magento\Backend\Controller\Adminhtml\Action // 5. Build edit form $this->_initAction() - ->_addBreadcrumb($id ? __('Edit Block') : __('New Block'), $id ? __('Edit Block') : __('New Block')) - ->renderLayout(); + ->_addBreadcrumb($id ? __('Edit Block') : __('New Block'), $id ? __('Edit Block') : __('New Block')); + $this->_view->renderLayout(); } /** diff --git a/app/code/Magento/Cms/Controller/Adminhtml/Block/Widget.php b/app/code/Magento/Cms/Controller/Adminhtml/Block/Widget.php index 83e42be7a0fe544088657f1b6882bd7522f9cc91..36ec786e8ee2fc77f3d7e750036064dd008c5b60 100644 --- a/app/code/Magento/Cms/Controller/Adminhtml/Block/Widget.php +++ b/app/code/Magento/Cms/Controller/Adminhtml/Block/Widget.php @@ -34,7 +34,7 @@ */ namespace Magento\Cms\Controller\Adminhtml\Block; -class Widget extends \Magento\Backend\Controller\Adminhtml\Action +class Widget extends \Magento\Backend\App\Action { /** * Chooser Source action @@ -42,7 +42,7 @@ class Widget extends \Magento\Backend\Controller\Adminhtml\Action public function chooserAction() { $uniqId = $this->getRequest()->getParam('uniq_id'); - $pagesGrid = $this->getLayout()->createBlock('Magento\Cms\Block\Adminhtml\Block\Widget\Chooser', '', array( + $pagesGrid = $this->_view->getLayout()->createBlock('Magento\Cms\Block\Adminhtml\Block\Widget\Chooser', '', array( 'data' => array('id' => $uniqId) )); $this->getResponse()->setBody($pagesGrid->toHtml()); diff --git a/app/code/Magento/Cms/Controller/Adminhtml/Page.php b/app/code/Magento/Cms/Controller/Adminhtml/Page.php index 0427e9e664dabddb9b9532e534ccc7074f6795d6..f3f9040ec45b5f2f462b17e94937493d5fd21817 100644 --- a/app/code/Magento/Cms/Controller/Adminhtml/Page.php +++ b/app/code/Magento/Cms/Controller/Adminhtml/Page.php @@ -34,7 +34,7 @@ */ namespace Magento\Cms\Controller\Adminhtml; -class Page extends \Magento\Backend\Controller\Adminhtml\Action +class Page extends \Magento\Backend\App\Action { /** * Core registry @@ -44,14 +44,22 @@ class Page extends \Magento\Backend\Controller\Adminhtml\Action protected $_coreRegistry = null; /** - * @param \Magento\Backend\Controller\Context $context + * @var \Magento\Core\Filter\Date + */ + protected $_dateFilter; + + /** + * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Core\Model\Registry $coreRegistry + * @param \Magento\Core\Filter\Date $dateFilter */ public function __construct( - \Magento\Backend\Controller\Context $context, - \Magento\Core\Model\Registry $coreRegistry + \Magento\Backend\App\Action\Context $context, + \Magento\Core\Model\Registry $coreRegistry, + \Magento\Core\Filter\Date $dateFilter ) { $this->_coreRegistry = $coreRegistry; + $this->_dateFilter = $dateFilter; parent::__construct($context); } @@ -63,8 +71,8 @@ class Page extends \Magento\Backend\Controller\Adminhtml\Action protected function _initAction() { // load layout, set active menu and breadcrumbs - $this->loadLayout() - ->_setActiveMenu('Magento_Cms::cms_page') + $this->_view->loadLayout(); + $this->_setActiveMenu('Magento_Cms::cms_page') ->_addBreadcrumb(__('CMS'), __('CMS')) ->_addBreadcrumb(__('Manage Pages'), __('Manage Pages')) ; @@ -76,10 +84,10 @@ class Page extends \Magento\Backend\Controller\Adminhtml\Action */ public function indexAction() { - $this->_title(__('Pages')); + $this->_title->add(__('Pages')); $this->_initAction(); - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -96,7 +104,7 @@ class Page extends \Magento\Backend\Controller\Adminhtml\Action */ public function editAction() { - $this->_title(__('Pages')); + $this->_title->add(__('Pages')); // 1. Get ID and create model $id = $this->getRequest()->getParam('page_id'); @@ -113,7 +121,7 @@ class Page extends \Magento\Backend\Controller\Adminhtml\Action } } - $this->_title($model->getId() ? $model->getTitle() : __('New Page')); + $this->_title->add($model->getId() ? $model->getTitle() : __('New Page')); // 3. Set entered data if was error when we do save $data = $this->_objectManager->get('Magento\Adminhtml\Model\Session')->getFormData(true); @@ -131,7 +139,7 @@ class Page extends \Magento\Backend\Controller\Adminhtml\Action $id ? __('Edit Page') : __('New Page') ); - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -258,7 +266,9 @@ class Page extends \Magento\Backend\Controller\Adminhtml\Action */ protected function _filterPostData($data) { - $data = $this->_filterDates($data, array('custom_theme_from', 'custom_theme_to')); + $inputFilter = new \Zend_Filter_Input( + array('custom_theme_from' => $this->_dateFilter, 'custom_theme_to' => $this->_dateFilter), array(), $data); + $data = $inputFilter->getUnescaped(); return $data; } diff --git a/app/code/Magento/Cms/Controller/Adminhtml/Page/Widget.php b/app/code/Magento/Cms/Controller/Adminhtml/Page/Widget.php index 70a04863dbc2cdac3823172254426f3913d96b6c..a0cc85cf4979638a73242ac4db48545b7ce4b484 100644 --- a/app/code/Magento/Cms/Controller/Adminhtml/Page/Widget.php +++ b/app/code/Magento/Cms/Controller/Adminhtml/Page/Widget.php @@ -34,7 +34,7 @@ */ namespace Magento\Cms\Controller\Adminhtml\Page; -class Widget extends \Magento\Backend\Controller\Adminhtml\Action +class Widget extends \Magento\Backend\App\Action { /** * Chooser Source action @@ -42,7 +42,7 @@ class Widget extends \Magento\Backend\Controller\Adminhtml\Action public function chooserAction() { $uniqId = $this->getRequest()->getParam('uniq_id'); - $pagesGrid = $this->getLayout()->createBlock('Magento\Cms\Block\Adminhtml\Page\Widget\Chooser', '', array( + $pagesGrid = $this->_view->getLayout()->createBlock('Magento\Cms\Block\Adminhtml\Page\Widget\Chooser', '', array( 'data' => array('id' => $uniqId) )); $this->getResponse()->setBody($pagesGrid->toHtml()); diff --git a/app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg.php b/app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg.php index 578ee2c164f3388ae29fd0e9f11ffb8074e160eb..0cda5ac19ac3c0db50d2cbc7f5995d09f1ed3598 100644 --- a/app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg.php +++ b/app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg.php @@ -33,7 +33,7 @@ */ namespace Magento\Cms\Controller\Adminhtml; -class Wysiwyg extends \Magento\Backend\Controller\Adminhtml\Action +class Wysiwyg extends \Magento\Backend\App\Action { /** * Template directives callback @@ -44,7 +44,7 @@ class Wysiwyg extends \Magento\Backend\Controller\Adminhtml\Action { $directive = $this->getRequest()->getParam('___directive'); $directive = $this->_objectManager->get('Magento\Core\Helper\Data')->urlDecode($directive); - $url = $this->_objectManager->create('Magento\Core\Model\Email\Template\Filter')->filter($directive); + $url = $this->_objectManager->create('Magento\Email\Model\Template\Filter')->filter($directive); /** @var \Magento\Image\Adapter\AdapterInterface $image */ $image = $this->_objectManager->get('Magento\Image\AdapterFactory')->create(); $response = $this->getResponse(); diff --git a/app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images.php b/app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images.php index 2c7ce7d3388561144268227d9aa3db98e14ff195..1ab03e2482e91521757d44dd0e48c721de61524d 100644 --- a/app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images.php +++ b/app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images.php @@ -33,7 +33,7 @@ */ namespace Magento\Cms\Controller\Adminhtml\Wysiwyg; -class Images extends \Magento\Backend\Controller\Adminhtml\Action +class Images extends \Magento\Backend\App\Action { /** * Core registry @@ -43,11 +43,11 @@ class Images extends \Magento\Backend\Controller\Adminhtml\Action protected $_coreRegistry = null; /** - * @param \Magento\Backend\Controller\Context $context + * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Core\Model\Registry $coreRegistry */ public function __construct( - \Magento\Backend\Controller\Context $context, + \Magento\Backend\App\Action\Context $context, \Magento\Core\Model\Registry $coreRegistry ) { $this->_coreRegistry = $coreRegistry; @@ -74,12 +74,13 @@ class Images extends \Magento\Backend\Controller\Adminhtml\Action } catch (\Exception $e) { $this->_getSession()->addError($e->getMessage()); } - $this->_initAction()->loadLayout('overlay_popup'); - $block = $this->getLayout()->getBlock('wysiwyg_images.js'); + $this->_initAction(); + $this->_view->loadLayout('overlay_popup'); + $block = $this->_view->getLayout()->getBlock('wysiwyg_images.js'); if ($block) { $block->setStoreId($storeId); } - $this->renderLayout(); + $this->_view->renderLayout(); } public function treeJsonAction() @@ -87,7 +88,7 @@ class Images extends \Magento\Backend\Controller\Adminhtml\Action try { $this->_initAction(); $this->getResponse()->setBody( - $this->getLayout()->createBlock('Magento\Cms\Block\Adminhtml\Wysiwyg\Images\Tree') + $this->_view->getLayout()->createBlock('Magento\Cms\Block\Adminhtml\Wysiwyg\Images\Tree') ->getTreeJson() ); } catch (\Exception $e) { @@ -100,8 +101,8 @@ class Images extends \Magento\Backend\Controller\Adminhtml\Action { try { $this->_initAction()->_saveSessionCurrentPath(); - $this->loadLayout('empty'); - $this->renderLayout(); + $this->_view->loadLayout('empty'); + $this->_view->renderLayout(); } catch (\Exception $e) { $result = array('error' => true, 'message' => $e->getMessage()); $this->getResponse()->setBody($this->_objectManager->get('Magento\Core\Helper\Data')->jsonEncode($result)); diff --git a/app/code/Magento/Cms/Controller/Index.php b/app/code/Magento/Cms/Controller/Index.php index a6f6da460ce7855588a25a4054922a0dc1aeb2c3..dd639d4fd4b6bd69f08c7df3493b5bc010196e70 100644 --- a/app/code/Magento/Cms/Controller/Index.php +++ b/app/code/Magento/Cms/Controller/Index.php @@ -34,7 +34,7 @@ */ namespace Magento\Cms\Controller; -class Index extends \Magento\Core\Controller\Front\Action +class Index extends \Magento\App\Action\Action { /** * Renders CMS Home page @@ -60,25 +60,8 @@ class Index extends \Magento\Core\Controller\Front\Action $this->getResponse()->setHeader('HTTP/1.1','404 Not Found'); $this->getResponse()->setHeader('Status','404 File not found'); - $this->loadLayout(); - $this->renderLayout(); - } - - /** - * Render CMS 404 Not found page - * - * @param string $coreRoute - */ - public function noRouteAction($coreRoute = null) - { - $this->getResponse()->setHeader('HTTP/1.1','404 Not Found'); - $this->getResponse()->setHeader('Status','404 File not found'); - - $pageId = $this->_objectManager->get('Magento\Core\Model\Store\Config') - ->getConfig(\Magento\Cms\Helper\Page::XML_PATH_NO_ROUTE_PAGE); - if (!$this->_objectManager->get('Magento\Cms\Helper\Page')->renderPage($this, $pageId)) { - $this->_forward('defaultNoRoute'); - } + $this->_view->loadLayout(); + $this->_view->renderLayout(); } /** @@ -91,8 +74,8 @@ class Index extends \Magento\Core\Controller\Front\Action $this->getResponse()->setHeader('HTTP/1.1','404 Not Found'); $this->getResponse()->setHeader('Status','404 File not found'); - $this->loadLayout(); - $this->renderLayout(); + $this->_view->loadLayout(); + $this->_view->renderLayout(); } /** @@ -115,7 +98,7 @@ class Index extends \Magento\Core\Controller\Front\Action */ public function defaultNoCookiesAction() { - $this->loadLayout(); - $this->renderLayout(); + $this->_view->loadLayout(); + $this->_view->renderLayout(); } } diff --git a/app/code/Magento/Cms/Controller/Noroute.php b/app/code/Magento/Cms/Controller/Noroute.php new file mode 100644 index 0000000000000000000000000000000000000000..9f28cd4ff91a0f127a04591ae2f447fcfee13f80 --- /dev/null +++ b/app/code/Magento/Cms/Controller/Noroute.php @@ -0,0 +1,43 @@ +<?php +/** + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +namespace Magento\Cms\Controller; + +class Noroute extends \Magento\App\Action\Action +{ + /** + * Render CMS 404 Not found page + */ + public function indexAction() + { + $this->getResponse()->setHeader('HTTP/1.1', '404 Not Found'); + $this->getResponse()->setHeader('Status', '404 File not found'); + + $pageId = $this->_objectManager->get('Magento\Core\Model\Store\Config') + ->getConfig(\Magento\Cms\Helper\Page::XML_PATH_NO_ROUTE_PAGE); + if (!$this->_objectManager->get('Magento\Cms\Helper\Page')->renderPage($this, $pageId)) { + $this->_forward('defaultNoRoute'); + } + } +} \ No newline at end of file diff --git a/app/code/Magento/Cms/Controller/Page.php b/app/code/Magento/Cms/Controller/Page.php index a4baf7f31b96113f061a639cc1f41d2d9bb8442c..275d4a7f6f0e65b45c9480b143128483f1344717 100644 --- a/app/code/Magento/Cms/Controller/Page.php +++ b/app/code/Magento/Cms/Controller/Page.php @@ -34,7 +34,7 @@ */ namespace Magento\Cms\Controller; -class Page extends \Magento\Core\Controller\Front\Action +class Page extends \Magento\App\Action\Action { /** * View CMS page action @@ -45,7 +45,7 @@ class Page extends \Magento\Core\Controller\Front\Action $pageId = $this->getRequest() ->getParam('page_id', $this->getRequest()->getParam('id', false)); if (!$this->_objectManager->get('Magento\Cms\Helper\Page')->renderPage($this, $pageId)) { - $this->_forward('noRoute'); + $this->_forward('noroute'); } } } diff --git a/app/code/Magento/Cms/Helper/Data.php b/app/code/Magento/Cms/Helper/Data.php index 9d97c200593c4f92f58a2a1da6491c2ef5910b46..adc465f822be1152f969c298ada2f2de93890f1c 100644 --- a/app/code/Magento/Cms/Helper/Data.php +++ b/app/code/Magento/Cms/Helper/Data.php @@ -25,6 +25,6 @@ */ namespace Magento\Cms\Helper; -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { } diff --git a/app/code/Magento/Cms/Helper/Page.php b/app/code/Magento/Cms/Helper/Page.php index 1961a2d978e95c757b49db58c525e217388c348d..18a94685167e445e1d7ea5b266a5a0f5b6035fee 100644 --- a/app/code/Magento/Cms/Helper/Page.php +++ b/app/code/Magento/Cms/Helper/Page.php @@ -34,7 +34,7 @@ */ namespace Magento\Cms\Helper; -class Page extends \Magento\Core\Helper\AbstractHelper +class Page extends \Magento\App\Helper\AbstractHelper { const XML_PATH_NO_ROUTE_PAGE = 'web/default/cms_no_route'; const XML_PATH_NO_COOKIES_PAGE = 'web/default/cms_no_cookies'; @@ -47,13 +47,6 @@ class Page extends \Magento\Core\Helper\AbstractHelper */ protected $_pageLayout; - /** - * Core event manager proxy - * - * @var \Magento\Event\ManagerInterface - */ - protected $_eventManager; - /** * Design package instance * @@ -93,52 +86,44 @@ class Page extends \Magento\Core\Helper\AbstractHelper protected $_pageFactory; /** - * Url - * - * @var \Magento\UrlInterface + * @var \Magento\Escaper */ - protected $_url; + protected $_escaper; /** - * @var \Magento\Escaper + * @var \Magento\App\ViewInterface */ - protected $_escaper; + protected $_view; /** - * Construct - * - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\Session\Pool $sessionFactory * @param \Magento\Cms\Model\Page $page - * @param \Magento\Event\ManagerInterface $eventManager * @param \Magento\Page\Helper\Layout $pageLayout * @param \Magento\View\DesignInterface $design - * @param \Magento\UrlInterface $url * @param \Magento\Cms\Model\PageFactory $pageFactory * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\LocaleInterface $locale * @param \Magento\Escaper $escaper + * @param \Magento\App\ViewInterface $view */ public function __construct( - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Core\Model\Session\Pool $sessionFactory, \Magento\Cms\Model\Page $page, - \Magento\Event\ManagerInterface $eventManager, \Magento\Page\Helper\Layout $pageLayout, \Magento\View\DesignInterface $design, - \Magento\UrlInterface $url, \Magento\Cms\Model\PageFactory $pageFactory, \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\LocaleInterface $locale, - \Magento\Escaper $escaper + \Magento\Escaper $escaper, + \Magento\App\ViewInterface $view ) { $this->_sessionPool = $sessionFactory; - // used singleton (instead factory) because there exist dependencies on \Magento\Cms\Helper\Page + $this->_view = $view; $this->_page = $page; - $this->_eventManager = $eventManager; $this->_pageLayout = $pageLayout; $this->_design = $design; - $this->_url = $url; $this->_pageFactory = $pageFactory; $this->_storeManager = $storeManager; $this->_locale = $locale; @@ -151,11 +136,11 @@ class Page extends \Magento\Core\Helper\AbstractHelper * * Call from controller action * - * @param \Magento\Core\Controller\Front\Action $action + * @param \Magento\App\Action\Action $action * @param integer $pageId * @return boolean */ - public function renderPage(\Magento\Core\Controller\Front\Action $action, $pageId = null) + public function renderPage(\Magento\App\Action\Action $action, $pageId = null) { return $this->_renderPage($action, $pageId); } @@ -163,17 +148,17 @@ class Page extends \Magento\Core\Helper\AbstractHelper /** * Renders CMS page * - * @param \Magento\Core\Controller\Front\Action|\Magento\Core\Controller\Varien\Action $action + * @param \Magento\App\Action\Action|\Magento\App\Action\Action $action * @param integer $pageId * @param bool $renderLayout * @return boolean */ - protected function _renderPage(\Magento\Core\Controller\Varien\Action $action, $pageId = null, $renderLayout = true) + protected function _renderPage(\Magento\App\Action\Action $action, $pageId = null, $renderLayout = true) { if (!is_null($pageId) && $pageId!==$this->_page->getId()) { - $delimeterPosition = strrpos($pageId, '|'); - if ($delimeterPosition) { - $pageId = substr($pageId, 0, $delimeterPosition); + $delimiterPosition = strrpos($pageId, '|'); + if ($delimiterPosition) { + $pageId = substr($pageId, 0, $delimiterPosition); } $this->_page->setStoreId($this->_storeManager->getStore()->getId()); @@ -194,10 +179,10 @@ class Page extends \Magento\Core\Helper\AbstractHelper $this->_design->setDesignTheme($this->_page->getCustomTheme()); } } - $action->getLayout()->getUpdate()->addHandle('default')->addHandle('cms_page_view'); - $action->addPageLayoutHandles(array('id' => $this->_page->getIdentifier())); + $this->_view->getLayout()->getUpdate()->addHandle('default')->addHandle('cms_page_view'); + $this->_view->addPageLayoutHandles(array('id' => $this->_page->getIdentifier())); - $action->addActionLayoutHandles(); + $this->_view->addActionLayoutHandles(); if ($this->_page->getRootTemplate()) { $handle = ($this->_page->getCustomRootTemplate() && $this->_page->getCustomRootTemplate() != 'empty' @@ -210,15 +195,15 @@ class Page extends \Magento\Core\Helper\AbstractHelper array('page' => $this->_page, 'controller_action' => $action) ); - $action->loadLayoutUpdates(); + $this->_view->loadLayoutUpdates(); $layoutUpdate = ($this->_page->getCustomLayoutUpdateXml() && $inRange) ? $this->_page->getCustomLayoutUpdateXml() : $this->_page->getLayoutUpdateXml(); if (!empty($layoutUpdate)) { - $action->getLayout()->getUpdate()->addUpdate($layoutUpdate); + $this->_view->getLayout()->getUpdate()->addUpdate($layoutUpdate); } - $action->generateLayoutXml()->generateLayoutBlocks(); + $this->_view->generateLayoutXml()->generateLayoutBlocks(); - $contentHeadingBlock = $action->getLayout()->getBlock('page_content_heading'); + $contentHeadingBlock = $this->_view->getLayout()->getBlock('page_content_heading'); if ($contentHeadingBlock) { $contentHeading = $this->_escaper->escapeHtml($this->_page->getContentHeading()); $contentHeadingBlock->setContentHeading($contentHeading); @@ -229,7 +214,7 @@ class Page extends \Magento\Core\Helper\AbstractHelper } /* @TODO: Move catalog and checkout storage types to appropriate modules */ - $messageBlock = $action->getLayout()->getMessagesBlock(); + $messageBlock = $this->_view->getLayout()->getMessagesBlock(); $sessions = array( 'Magento\Catalog\Model\Session', 'Magento\Checkout\Model\Session', @@ -244,7 +229,7 @@ class Page extends \Magento\Core\Helper\AbstractHelper } if ($renderLayout) { - $action->renderLayout(); + $this->_view->renderLayout(); } return true; @@ -255,12 +240,12 @@ class Page extends \Magento\Core\Helper\AbstractHelper * Allows to use also backend action as first parameter. * Also takes third parameter which allows not run renderLayout method. * - * @param \Magento\Core\Controller\Varien\Action $action + * @param \Magento\App\Action\Action $action * @param $pageId * @param $renderLayout * @return bool */ - public function renderPageExtended(\Magento\Core\Controller\Varien\Action $action, $pageId = null, $renderLayout = true) + public function renderPageExtended(\Magento\App\Action\Action $action, $pageId = null, $renderLayout = true) { return $this->_renderPage($action, $pageId, $renderLayout); } @@ -286,6 +271,6 @@ class Page extends \Magento\Core\Helper\AbstractHelper return null; } - return $this->_url->getUrl(null, array('_direct' => $page->getIdentifier())); + return $this->_urlBuilder->getUrl(null, array('_direct' => $page->getIdentifier())); } } diff --git a/app/code/Magento/Cms/Helper/Wysiwyg/Images.php b/app/code/Magento/Cms/Helper/Wysiwyg/Images.php index 8abb1516f9cfd69f765643a7f0086bbfbdf3068f..8739d10493e8262c46b68239c1b87f40d270ea72 100644 --- a/app/code/Magento/Cms/Helper/Wysiwyg/Images.php +++ b/app/code/Magento/Cms/Helper/Wysiwyg/Images.php @@ -29,7 +29,7 @@ */ namespace Magento\Cms\Helper\Wysiwyg; -class Images extends \Magento\Core\Helper\AbstractHelper +class Images extends \Magento\App\Helper\AbstractHelper { /** @@ -70,13 +70,6 @@ class Images extends \Magento\Core\Helper\AbstractHelper */ protected $_backendData; - /** - * Core event manager proxy - * - * @var \Magento\Event\ManagerInterface - */ - protected $_eventManager; - /** * Store manager * @@ -92,10 +85,7 @@ class Images extends \Magento\Core\Helper\AbstractHelper protected $_dir; /** - * Construct - * - * @param \Magento\Core\Helper\Context $context - * @param \Magento\Event\ManagerInterface $eventManager + * @param \Magento\App\Helper\Context $context * @param \Magento\Backend\Helper\Data $backendData * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Filesystem $filesystem @@ -103,8 +93,7 @@ class Images extends \Magento\Core\Helper\AbstractHelper * @param \Magento\App\Dir $dir */ public function __construct( - \Magento\Core\Helper\Context $context, - \Magento\Event\ManagerInterface $eventManager, + \Magento\App\Helper\Context $context, \Magento\Backend\Helper\Data $backendData, \Magento\Core\Helper\Data $coreData, \Magento\Filesystem $filesystem, @@ -112,7 +101,6 @@ class Images extends \Magento\Core\Helper\AbstractHelper \Magento\App\Dir $dir ) { parent::__construct($context); - $this->_eventManager = $eventManager; $this->_backendData = $backendData; $this->_coreData = $coreData; $this->_filesystem = $filesystem; diff --git a/app/code/Magento/Cms/Model/Observer.php b/app/code/Magento/Cms/Model/Observer.php index 4e975cf1ca123e3f627bfecf4eab77f33dfe37e7..2cba4c755871b398196e29d517c0bf8c7aa66f16 100644 --- a/app/code/Magento/Cms/Model/Observer.php +++ b/app/code/Magento/Cms/Model/Observer.php @@ -74,7 +74,7 @@ class Observer ->setLoaded(true) ->setForwardModule('cms') ->setForwardController('index') - ->setForwardAction('noRoute'); + ->setForwardAction('noroute'); return $this; } diff --git a/app/code/Magento/Cms/Model/Page.php b/app/code/Magento/Cms/Model/Page.php index 50de0f72df01c9121c7cdac2d421c9b8192748d2..dd3af5fb2057c34cdc0beef4b5eace61b2f1093e 100644 --- a/app/code/Magento/Cms/Model/Page.php +++ b/app/code/Magento/Cms/Model/Page.php @@ -91,33 +91,6 @@ class Page extends \Magento\Core\Model\AbstractModel */ protected $_eventPrefix = 'cms_page'; - /** - * Core event manager proxy - * - * @var \Magento\Event\ManagerInterface - */ - protected $_eventManager = null; - - /** - * @param \Magento\Event\ManagerInterface $eventManager - * @param \Magento\Core\Model\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Core\Model\Resource\AbstractResource $resource - * @param \Magento\Data\Collection\Db $resourceCollection - * @param array $data - */ - public function __construct( - \Magento\Event\ManagerInterface $eventManager, - \Magento\Core\Model\Context $context, - \Magento\Core\Model\Registry $registry, - \Magento\Core\Model\Resource\AbstractResource $resource = null, - \Magento\Data\Collection\Db $resourceCollection = null, - array $data = array() - ) { - $this->_eventManager = $eventManager; - parent::__construct($context, $registry, $resource, $resourceCollection, $data); - } - /** * Initialize resource model * diff --git a/app/code/Magento/Cms/Model/Template/Filter.php b/app/code/Magento/Cms/Model/Template/Filter.php index 57ec0e67992682934dd0f6f94cc2b67751abb69f..43463ce941b63a1c7cdc28a5d8ca40804a37cbaa 100644 --- a/app/code/Magento/Cms/Model/Template/Filter.php +++ b/app/code/Magento/Cms/Model/Template/Filter.php @@ -34,7 +34,7 @@ */ namespace Magento\Cms\Model\Template; -class Filter extends \Magento\Core\Model\Email\Template\Filter +class Filter extends \Magento\Email\Model\Template\Filter { /** * Whether to allow SID in store directive: AUTO diff --git a/app/code/Magento/Cms/etc/config.xml b/app/code/Magento/Cms/etc/config.xml index 7e56549a08a33131215785c185a72c5f62dd3d20..09dd511c0712b1aaff65076abc9cf71dc98aadde 100644 --- a/app/code/Magento/Cms/etc/config.xml +++ b/app/code/Magento/Cms/etc/config.xml @@ -33,7 +33,7 @@ <cms_no_route>no-route</cms_no_route> <cms_no_cookies>enable-cookies</cms_no_cookies> <front>cms</front> - <no_route>cms/index/noRoute</no_route> + <no_route>cms/noroute/index</no_route> <show_cms_breadcrumbs>1</show_cms_breadcrumbs> </default> </web> diff --git a/app/code/Magento/Cms/view/frontend/layout/cms_index_defaultindex.xml b/app/code/Magento/Cms/view/frontend/layout/cms_index_defaultindex.xml index 97933cab584e1a591f71519146ea0a51641e0fc5..0c6228769824f424ff3c5338c74e0e7bc38abe79 100644 --- a/app/code/Magento/Cms/view/frontend/layout/cms_index_defaultindex.xml +++ b/app/code/Magento/Cms/view/frontend/layout/cms_index_defaultindex.xml @@ -30,6 +30,6 @@ </action> </referenceBlock> <referenceContainer name="content"> - <block class="Magento\Core\Block\Template" name="default_home_page" template="Magento_Cms::default/home.phtml"/> + <block class="Magento\View\Block\Template" name="default_home_page" template="Magento_Cms::default/home.phtml"/> </referenceContainer> </layout> diff --git a/app/code/Magento/Cms/view/frontend/layout/cms_index_defaultnoroute.xml b/app/code/Magento/Cms/view/frontend/layout/cms_index_defaultnoroute.xml index 60768622749dba53dc848f8bdb804a181d7fc0b1..ea923101aa1ab73541288bb8802f63ef19bf7cf3 100644 --- a/app/code/Magento/Cms/view/frontend/layout/cms_index_defaultnoroute.xml +++ b/app/code/Magento/Cms/view/frontend/layout/cms_index_defaultnoroute.xml @@ -30,6 +30,6 @@ </action> </referenceBlock> <referenceContainer name="content"> - <block class="Magento\Core\Block\Template" name="default_no_route" template="Magento_Cms::default/no-route.phtml"/> + <block class="Magento\View\Block\Template" name="default_no_route" template="Magento_Cms::default/no-route.phtml"/> </referenceContainer> </layout> diff --git a/app/code/Magento/Cms/view/frontend/layout/cms_page_view.xml b/app/code/Magento/Cms/view/frontend/layout/cms_page_view.xml index c2f6546fbf28d1ca81c3b72867e90b65ea4ae5c3..6876cd1901fe28e66f6f72e20a8cf9632d5d7ca6 100644 --- a/app/code/Magento/Cms/view/frontend/layout/cms_page_view.xml +++ b/app/code/Magento/Cms/view/frontend/layout/cms_page_view.xml @@ -25,7 +25,7 @@ --> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <referenceContainer name="content"> - <block class="Magento\Core\Block\Template" name="page_content_heading" template="Magento_Cms::content_heading.phtml"/> + <block class="Magento\View\Block\Template" name="page_content_heading" template="Magento_Cms::content_heading.phtml"/> <container name="cms.wrapper" label="CMS Content Wrapper" htmlTag="div" htmlClass="std"> <block class="Magento\Cms\Block\Page" name="cms_page"/> </container> diff --git a/app/code/Magento/Connect/Block/Adminhtml/Extension/Custom/Edit/Tab/AbstractTab.php b/app/code/Magento/Connect/Block/Adminhtml/Extension/Custom/Edit/Tab/AbstractTab.php index ba6a666aaa78c358be6b8f19cb4d13aa0d58dca7..f5899bb18f1f605163d03bcf1abd356beb1644e6 100644 --- a/app/code/Magento/Connect/Block/Adminhtml/Extension/Custom/Edit/Tab/AbstractTab.php +++ b/app/code/Magento/Connect/Block/Adminhtml/Extension/Custom/Edit/Tab/AbstractTab.php @@ -52,23 +52,23 @@ abstract class AbstractTab */ protected $_addFileDepButtonHtml; - /** - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Connect\Model\Session $session - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Connect\Model\Session $session + * @param array $data */ - public function __construct( - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Connect\Model\Session $session, - array $data = array() - ) { - parent::__construct($registry, $formFactory, $coreData, $context, $data); + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Connect\Model\Session $session, + array $data = array() + ) { + parent::__construct($context, $coreData, $registry, $formFactory, $data); $this->setData($session->getCustomExtensionPackageFormData()); } diff --git a/app/code/Magento/Connect/Block/Adminhtml/Extension/Custom/Edit/Tab/Contents.php b/app/code/Magento/Connect/Block/Adminhtml/Extension/Custom/Edit/Tab/Contents.php index 642f27dd1a3f80d4411fdbcd4a4d3dcf46715761..70b67a67f919615a5c917a110369f7d93c6f194c 100644 --- a/app/code/Magento/Connect/Block/Adminhtml/Extension/Custom/Edit/Tab/Contents.php +++ b/app/code/Magento/Connect/Block/Adminhtml/Extension/Custom/Edit/Tab/Contents.php @@ -43,26 +43,26 @@ class Contents */ protected $_extensionFactory; - /** - * @param \Magento\Connect\Model\ExtensionFactory $extensionFactory - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Connect\Model\Session $session - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Connect\Model\Session $session + * @param \Magento\Connect\Model\ExtensionFactory $extensionFactory + * @param array $data */ - public function __construct( - \Magento\Connect\Model\ExtensionFactory $extensionFactory, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Connect\Model\Session $session, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Connect\Model\Session $session, + \Magento\Connect\Model\ExtensionFactory $extensionFactory, + array $data = array() + ) { $this->_extensionFactory = $extensionFactory; - parent::__construct($registry, $formFactory, $coreData, $context, $session, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $session, $data); } /** diff --git a/app/code/Magento/Connect/Block/Adminhtml/Extension/Custom/Edit/Tab/Grid.php b/app/code/Magento/Connect/Block/Adminhtml/Extension/Custom/Edit/Tab/Grid.php index 1a69b01315dd0c79f833a3bbc3c5b22e06c8f96e..f97d91d72c8499773e6b892a9775c246059c50f1 100644 --- a/app/code/Magento/Connect/Block/Adminhtml/Extension/Custom/Edit/Tab/Grid.php +++ b/app/code/Magento/Connect/Block/Adminhtml/Extension/Custom/Edit/Tab/Grid.php @@ -42,24 +42,22 @@ class Grid extends \Magento\Adminhtml\Block\Widget\Grid */ protected $_collectionFactory; - /** - * @param \Magento\Connect\Model\Extension\CollectionFactory $collectionFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Connect\Model\Extension\CollectionFactory $collectionFactory + * @param array $data */ - public function __construct( - \Magento\Connect\Model\Extension\CollectionFactory $collectionFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Connect\Model\Extension\CollectionFactory $collectionFactory, + array $data = array() + ) { $this->_collectionFactory = $collectionFactory; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $data); } /** diff --git a/app/code/Magento/Connect/Controller/Adminhtml/Extension/Custom.php b/app/code/Magento/Connect/Controller/Adminhtml/Extension/Custom.php index da99cdca2f25cf54a9c985a12c1eb69020659dfe..be4be85923a04479487b58de94f4812aa4e06608 100644 --- a/app/code/Magento/Connect/Controller/Adminhtml/Extension/Custom.php +++ b/app/code/Magento/Connect/Controller/Adminhtml/Extension/Custom.php @@ -33,7 +33,7 @@ */ namespace Magento\Connect\Controller\Adminhtml\Extension; -class Custom extends \Magento\Backend\Controller\Adminhtml\Action +class Custom extends \Magento\Backend\App\Action { /** * Redirect to edit Extension Package action @@ -41,7 +41,7 @@ class Custom extends \Magento\Backend\Controller\Adminhtml\Action */ public function indexAction() { - $this->_title(__('Package Extensions')); + $this->_title->add(__('Package Extensions')); $this->_forward('edit'); } @@ -52,11 +52,11 @@ class Custom extends \Magento\Backend\Controller\Adminhtml\Action */ public function editAction() { - $this ->_title(__('Extension')); + $this ->_title->add(__('Extension')); - $this->loadLayout(); + $this->_view->loadLayout(); $this->_setActiveMenu('Magento_Connect::system_extensions_custom'); - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -175,8 +175,8 @@ class Custom extends \Magento\Backend\Controller\Adminhtml\Action */ public function loadtabAction() { - $this->loadLayout(); - $this->renderLayout(); + $this->_view->loadLayout(); + $this->_view->renderLayout(); } /** @@ -185,8 +185,8 @@ class Custom extends \Magento\Backend\Controller\Adminhtml\Action */ public function gridAction() { - $this->loadLayout(); - $this->renderLayout(); + $this->_view->loadLayout(); + $this->_view->renderLayout(); } /** diff --git a/app/code/Magento/Connect/Controller/Adminhtml/Extension/Local.php b/app/code/Magento/Connect/Controller/Adminhtml/Extension/Local.php index 6d4448187b224437976a74b1f0dab7b5dfb25267..c69126b9ff29281bff3622a6d123c81c0c1cd1dd 100644 --- a/app/code/Magento/Connect/Controller/Adminhtml/Extension/Local.php +++ b/app/code/Magento/Connect/Controller/Adminhtml/Extension/Local.php @@ -33,7 +33,7 @@ */ namespace Magento\Connect\Controller\Adminhtml\Extension; -class Local extends \Magento\Backend\Controller\Adminhtml\Action +class Local extends \Magento\Backend\App\Action { /** * Redirect to Magento Connect diff --git a/app/code/Magento/Connect/Helper/Data.php b/app/code/Magento/Connect/Helper/Data.php index 1c82d5f68bfb599d59614ed385b4cc975dbc09a1..7438729beca29adee7580d9f5ce6118ca8afc0cc 100644 --- a/app/code/Magento/Connect/Helper/Data.php +++ b/app/code/Magento/Connect/Helper/Data.php @@ -48,9 +48,9 @@ class Data extends \Magento\Core\Helper\Data protected $_xmlConverter; /** - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\Store\Config $coreStoreConfig - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Locale $locale * @param \Magento\App\State $appState * @param \Magento\Filesystem $filesystem @@ -59,9 +59,9 @@ class Data extends \Magento\Core\Helper\Data * @param bool $dbCompatibleMode */ public function __construct( - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Core\Model\Store\Config $coreStoreConfig, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Locale $locale, \Magento\App\State $appState, \Magento\Filesystem $filesystem, diff --git a/app/code/Magento/Connect/Model/Session.php b/app/code/Magento/Connect/Model/Session.php index ba7257092c22ae84ed12458cfbf68f53d8fcc712..738c9f5593e52dae275b54f30e7e2835e3e4af56 100644 --- a/app/code/Magento/Connect/Model/Session.php +++ b/app/code/Magento/Connect/Model/Session.php @@ -80,9 +80,9 @@ class Session extends \Magento\Core\Model\Session\AbstractSession ) { continue; } - array_push($data['authors']['name'], $data['maintainers']['name'][$i]); - array_push($data['authors']['user'], $data['maintainers']['handle'][$i]); - array_push($data['authors']['email'], $data['maintainers']['email'][$i]); + $data['authors']['name'][] = $data['maintainers']['name'][$i]; + $data['authors']['user'][] = $data['maintainers']['handle'][$i]; + $data['authors']['email'][] = $data['maintainers']['email'][$i]; } // Convert channel from previous version for entire package $helper = $this->_connectData; diff --git a/app/code/Magento/Contacts/Controller/Index.php b/app/code/Magento/Contacts/Controller/Index.php index 0ed36cdfbd15c3c37c89ca7e3793bcb0b9f48211..d3037b115fa574d8723a062f6cae9e9b24bcd910 100644 --- a/app/code/Magento/Contacts/Controller/Index.php +++ b/app/code/Magento/Contacts/Controller/Index.php @@ -33,7 +33,10 @@ */ namespace Magento\Contacts\Controller; -class Index extends \Magento\Core\Controller\Front\Action +use Magento\App\Action\NotFoundException; +use Magento\App\RequestInterface; + +class Index extends \Magento\App\Action\Action { const XML_PATH_EMAIL_RECIPIENT = 'contacts/email/recipient_email'; const XML_PATH_EMAIL_SENDER = 'contacts/email/sender_email_identity'; @@ -41,15 +44,18 @@ class Index extends \Magento\Core\Controller\Front\Action const XML_PATH_ENABLED = 'contacts/contacts/enabled'; /** - * Check is page enabled + * Dispatch request + * + * @param RequestInterface $request + * @return mixed + * @throws \Magento\App\Action\NotFoundException */ - public function preDispatch() + public function dispatch(RequestInterface $request) { - parent::preDispatch(); - if (!$this->_objectManager->get('Magento\Core\Model\Store\Config')->getConfigFlag(self::XML_PATH_ENABLED)) { - $this->norouteAction(); + throw new NotFoundException(); } + return parent::dispatch($request); } /** @@ -57,13 +63,13 @@ class Index extends \Magento\Core\Controller\Front\Action */ public function indexAction() { - $this->loadLayout(); - $this->getLayout()->getBlock('contactForm') + $this->_view->loadLayout(); + $this->_view->getLayout()->getBlock('contactForm') ->setFormAction($this->_objectManager->create('Magento\Core\Model\Url')->getUrl('*/*/post')); - $this->_initLayoutMessages('Magento\Customer\Model\Session'); - $this->_initLayoutMessages('Magento\Catalog\Model\Session'); - $this->renderLayout(); + $messageStores = array('Magento\Customer\Model\Session', 'Magento\Catalog\Model\Session'); + $this->_view->getLayout()->initMessages($messageStores); + $this->_view->renderLayout(); } /** @@ -107,8 +113,8 @@ class Index extends \Magento\Core\Controller\Front\Action if ($error) { throw new \Exception(); } - $mailTemplate = $this->_objectManager->create('Magento\Core\Model\Email\Template'); - /* @var $mailTemplate \Magento\Core\Model\Email\Template */ + $mailTemplate = $this->_objectManager->create('Magento\Email\Model\Template'); + /* @var $mailTemplate \Magento\Email\Model\Template */ $mailTemplate->setDesignConfig(array( 'area' => \Magento\Core\Model\App\Area::AREA_FRONTEND, 'store' => $this->_objectManager->get('Magento\Core\Model\StoreManagerInterface') diff --git a/app/code/Magento/Contacts/Helper/Data.php b/app/code/Magento/Contacts/Helper/Data.php index a3fd38b791162ee37652f454b86f6b302ef7ae2b..66da1d95128526656117ca04ef542fe6edfd824a 100644 --- a/app/code/Magento/Contacts/Helper/Data.php +++ b/app/code/Magento/Contacts/Helper/Data.php @@ -33,7 +33,7 @@ */ namespace Magento\Contacts\Helper; -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { const XML_PATH_ENABLED = 'contacts/contacts/enabled'; @@ -53,12 +53,12 @@ class Data extends \Magento\Core\Helper\AbstractHelper protected $_customerSession; /** - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\Store\Config $coreStoreConfig * @param \Magento\Customer\Model\Session $customerSession */ public function __construct( - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Core\Model\Store\Config $coreStoreConfig, \Magento\Customer\Model\Session $customerSession ) { diff --git a/app/code/Magento/Contacts/view/frontend/layout/contacts_index_index.xml b/app/code/Magento/Contacts/view/frontend/layout/contacts_index_index.xml index 6079d7243cc5105289f1137a5c5717a81fc251fb..5c9374a609d7410d85880cbb1c46d23595ec1a0f 100644 --- a/app/code/Magento/Contacts/view/frontend/layout/contacts_index_index.xml +++ b/app/code/Magento/Contacts/view/frontend/layout/contacts_index_index.xml @@ -38,7 +38,7 @@ </action> </referenceBlock> <referenceContainer name="content"> - <block class="Magento\Core\Block\Template" name="contactForm" template="Magento_Contacts::form.phtml"> + <block class="Magento\View\Block\Template" name="contactForm" template="Magento_Contacts::form.phtml"> <container name="form.additional.info" label="Form Additional Info"/> </block> </referenceContainer> diff --git a/app/code/Magento/Core/App/Action/FormKeyValidator.php b/app/code/Magento/Core/App/Action/FormKeyValidator.php new file mode 100644 index 0000000000000000000000000000000000000000..b97355123829db1fbf4eedc0bcdca2dc30211e68 --- /dev/null +++ b/app/code/Magento/Core/App/Action/FormKeyValidator.php @@ -0,0 +1,56 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Core\App\Action; + +class FormKeyValidator +{ + /** + * @var \Magento\Core\Model\Session + */ + protected $_session; + + /** + * @param \Magento\Core\Model\Session $session + */ + public function __construct(\Magento\Core\Model\Session $session) + { + $this->_session = $session; + } + + /** + * Validate form key + * + * @param \Magento\App\RequestInterface $request + * @return bool + */ + public function validate(\Magento\App\RequestInterface $request) + { + $formKey = $request->getParam('form_key', null); + if (!$formKey || $formKey != $this->_session->getFormKey()) { + return false; + } + return true; + } +} \ No newline at end of file diff --git a/app/code/Magento/Core/App/Action/Plugin/Design.php b/app/code/Magento/Core/App/Action/Plugin/Design.php new file mode 100644 index 0000000000000000000000000000000000000000..714c9c4c05f9e15d0ca388a7946667bbcde6ca22 --- /dev/null +++ b/app/code/Magento/Core/App/Action/Plugin/Design.php @@ -0,0 +1,54 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Core\App\Action\Plugin; + +class Design +{ + /** + * @var \Magento\Core\Model\DesignLoader + */ + protected $_designLoader; + + /** + * @param \Magento\Core\Model\DesignLoader $designLoader + */ + public function __construct(\Magento\Core\Model\DesignLoader $designLoader) + { + $this->_designLoader = $designLoader; + } + + /** + * Initialize design + * + * @param array $arguments + * @param \Magento\Code\Plugin\InvocationChain $invocationChain + * @return mixed + */ + public function aroundDispatch(array $arguments, \Magento\Code\Plugin\InvocationChain $invocationChain) + { + $this->_designLoader->load(); + return $invocationChain->proceed($arguments); + } +} diff --git a/app/code/Magento/Core/App/Action/Plugin/Install.php b/app/code/Magento/Core/App/Action/Plugin/Install.php new file mode 100644 index 0000000000000000000000000000000000000000..f70abd41b3193fdde0c4e40e82939ddc0d04fb4a --- /dev/null +++ b/app/code/Magento/Core/App/Action/Plugin/Install.php @@ -0,0 +1,86 @@ +<?php +/** + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Core\App\Action\Plugin; + + +class Install +{ + /** + * @var \Magento\App\State + */ + protected $_appState; + + /** + * @var \Magento\App\ResponseInterface + */ + protected $_response; + + /** + * @var \Magento\Core\Model\Url + */ + protected $_url; + + /** + * @var \Magento\App\ActionFlag + */ + protected $_actionFlag; + + /** + * @param \Magento\App\State $appState + * @param \Magento\App\ResponseInterface $response + * @param \Magento\Core\Model\Url $url + * @param \Magento\App\ActionFlag $actionFlag + */ + public function __construct( + \Magento\App\State $appState, + \Magento\App\ResponseInterface $response, + \Magento\Core\Model\Url $url, + \Magento\App\ActionFlag $actionFlag + ) { + $this->_appState = $appState; + $this->_response = $response; + $this->_url = $url; + $this->_actionFlag = $actionFlag; + } + + /** + * Dispatch request + * + * @param array $arguments + * @param \Magento\Code\Plugin\InvocationChain $invocationChain + */ + public function aroundDispatch(array $arguments, \Magento\Code\Plugin\InvocationChain $invocationChain) + { + if (!$this->_appState->isInstalled()) { + $this->_actionFlag->set('', \Magento\App\Action\Action::FLAG_NO_DISPATCH, true); + $this->_response->setRedirect( + $this->_url->getUrl('install') + ); + return; + } + $invocationChain->proceed($arguments); + } +} diff --git a/app/code/Magento/Core/Controller/Front/Action.php b/app/code/Magento/Core/App/Action/Plugin/LastUrl.php similarity index 57% rename from app/code/Magento/Core/Controller/Front/Action.php rename to app/code/Magento/Core/App/Action/Plugin/LastUrl.php index 6555ad323888214068347adeeb30d2d40c27580d..35c565e68cfc00f79cd62b475f8b8825868ded4b 100644 --- a/app/code/Magento/Core/Controller/Front/Action.php +++ b/app/code/Magento/Core/App/Action/Plugin/LastUrl.php @@ -18,8 +18,6 @@ * 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_Core * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -27,15 +25,25 @@ /** * Generic frontend controller */ -namespace Magento\Core\Controller\Front; +namespace Magento\Core\App\Action\Plugin; -class Action extends \Magento\Core\Controller\Varien\Action +class LastUrl { /** * Session namespace to refer in other places */ const SESSION_NAMESPACE = 'frontend'; + /** + * @var \Magento\Core\Model\Session + */ + protected $_session; + + /** + * @var \Magento\Core\Model\Url + */ + protected $_url; + /** * Namespace for session. * @@ -44,19 +52,26 @@ class Action extends \Magento\Core\Controller\Varien\Action protected $_sessionNamespace = self::SESSION_NAMESPACE; /** - * Remember the last visited url in the session + * @param \Magento\Core\Model\Session $session + * @param \Magento\Core\Model\Url $url + */ + public function __construct(\Magento\Core\Model\Session $session, \Magento\Core\Model\Url $url) + { + $this->_session = $session; + $this->_url = $url; + } + + /** + * Process request * - * @return \Magento\Core\Controller\Front\Action + * @param array $arguments + * @param \Magento\Code\Plugin\InvocationChain $invocationChain + * @return mixed */ - public function postDispatch() + public function aroundDispatch(array $arguments, \Magento\Code\Plugin\InvocationChain $invocationChain) { - parent::postDispatch(); - if (!$this->getFlag('', self::FLAG_NO_START_SESSION )) { - $this->_objectManager->get('Magento\Core\Model\Session') - ->setLastUrl( - $this->_objectManager->create('Magento\Core\Model\Url')->getUrl('*/*/*', array('_current' => true)) - ); - } - return $this; + $result = $invocationChain->proceed($arguments); + $this->_session->setLastUrl($this->_url->getUrl('*/*/*', array('_current' => true))); + return $result; } } diff --git a/app/code/Magento/Core/App/Action/Plugin/Session.php b/app/code/Magento/Core/App/Action/Plugin/Session.php new file mode 100644 index 0000000000000000000000000000000000000000..3705d66a85eefff5beb75b5286351f8a6a548d90 --- /dev/null +++ b/app/code/Magento/Core/App/Action/Plugin/Session.php @@ -0,0 +1,144 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Core\App\Action\Plugin; + +class Session +{ + /** + * @var \Magento\Core\Model\Session + */ + protected $_session; + + /** + * @var \Magento\Core\Model\Cookie + */ + protected $_cookie; + + /** + * @var array + */ + protected $_cookieCheckActions; + + /** + * @var \Magento\Core\Model\Url + */ + protected $_url; + + /** + * @var string + */ + protected $_sessionNamespace; + + /** + * @var \Magento\App\ActionFlag + */ + protected $_flag; + + /** + * @var \Magento\Core\Model\Store\Config + */ + protected $_storeConfig; + + /** + * @param \Magento\Core\Model\Session $session + * @param \Magento\Core\Model\Cookie $cookie + * @param \Magento\Core\Model\Url $url + * @param \Magento\App\ActionFlag $flag + * @param \Magento\Core\Model\Store\Config $storeConfig + * @param string $sessionNamespace + * @param array $cookieCheckActions + */ + public function __construct( + \Magento\App\ActionFlag $flag, + \Magento\Core\Model\Session $session, + \Magento\Core\Model\Cookie $cookie, + \Magento\Core\Model\Url $url, + \Magento\Core\Model\Store\Config $storeConfig, + $sessionNamespace = '', + array $cookieCheckActions = array() + ) { + $this->_session = $session; + $this->_cookie = $cookie; + $this->_cookieCheckActions = $cookieCheckActions; + $this->_url = $url; + $this->_sessionNamespace = $sessionNamespace; + $this->_flag = $flag; + $this->_storeConfig = $storeConfig; + } + + /** + * @param array $arguments + * @param \Magento\Code\Plugin\InvocationChain $invocationChain + * @return array + */ + public function aroundDispatch(array $arguments = array(), \Magento\Code\Plugin\InvocationChain $invocationChain) + { + $request = $arguments[0]; + $checkCookie = in_array($request->getActionName(), $this->_cookieCheckActions) + && !$request->getParam('nocookie', false); + + $cookies = $this->_cookie->get(); + /** @var $session \Magento\Core\Model\Session */ + $session = $this->_session->start(); + + if (empty($cookies)) { + if ($session->getCookieShouldBeReceived()) { + $session->unsCookieShouldBeReceived(); + $session->setSkipSessionIdFlag(true); + if ($this->_storeConfig->getConfig('web/browser_capabilities/cookies')) { + $this->_forward($request); + return null; + } + } elseif ($checkCookie) { + if (isset($_GET[$session->getSessionIdQueryParam()]) + && $this->_url->getUseSession() + && $this->_sessionNamespace != \Magento\Backend\App\AbstractAction::SESSION_NAMESPACE + ) { + $session->setCookieShouldBeReceived(true); + } else { + $this->_forward($request); + return null; + } + } + } + return $invocationChain->proceed($arguments); + } + + /** + * Forward to noCookies action + * + * @param \Magento\App\RequestInterface $request + * @return \Magento\App\RequestInterface + */ + protected function _forward(\Magento\App\RequestInterface $request) + { + $request->initForwared(); + $request->setActionName('noCookies'); + $request->setControllerName('index'); + $request->setModuleName('core'); + $request->setDispatched(false); + return $request; + } +} diff --git a/app/code/Magento/Core/App/Action/Plugin/StoreCheck.php b/app/code/Magento/Core/App/Action/Plugin/StoreCheck.php new file mode 100644 index 0000000000000000000000000000000000000000..62ae90dac0bcf24fd44155902a6bbfad35eb8e9b --- /dev/null +++ b/app/code/Magento/Core/App/Action/Plugin/StoreCheck.php @@ -0,0 +1,60 @@ +<?php +/** + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Core\App\Action\Plugin; + + +class StoreCheck +{ + /** + * @var \Magento\Core\Model\StoreManagerInterface + */ + protected $_storeManager; + + /** + * @param \Magento\Core\Model\StoreManagerInterface $storeManager + */ + public function __construct( + \Magento\Core\Model\StoreManagerInterface $storeManager + ) { + $this->_storeManager = $storeManager; + } + + /** + * Dispatch request + * + * @param array $arguments + * @param \Magento\Code\Plugin\InvocationChain $invocationChain + * @return mixed + */ + public function aroundDispatch(array $arguments, \Magento\Code\Plugin\InvocationChain $invocationChain) + { + if (!$this->_storeManager->getStore()->getIsActive()) + { + $this->_storeManager->throwStoreException(); + } + return $invocationChain->proceed($arguments); + } +} \ No newline at end of file diff --git a/app/code/Magento/Core/App/FrontController/Plugin/DispatchExceptionHandler.php b/app/code/Magento/Core/App/FrontController/Plugin/DispatchExceptionHandler.php index 378994adff2c8d1c5fd75d24af9c2e6c2f67ab0a..697085bde97c35d5a5ee5fcd785aad86b72457f9 100644 --- a/app/code/Magento/Core/App/FrontController/Plugin/DispatchExceptionHandler.php +++ b/app/code/Magento/Core/App/FrontController/Plugin/DispatchExceptionHandler.php @@ -31,7 +31,7 @@ use Magento\Core\Model\StoreManager, class DispatchExceptionHandler { /** - * @var \Magento\Core\Model\StoreManager + * @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; diff --git a/app/code/Magento/Core/App/FrontController/Plugin/RequestPreprocessor.php b/app/code/Magento/Core/App/FrontController/Plugin/RequestPreprocessor.php index 8ea7e827e02e59df583759ddd2703c983a420775..5b21f634a8e89b413eee42061b446c3e2112da09 100644 --- a/app/code/Magento/Core/App/FrontController/Plugin/RequestPreprocessor.php +++ b/app/code/Magento/Core/App/FrontController/Plugin/RequestPreprocessor.php @@ -46,19 +46,19 @@ class RequestPreprocessor protected $_appState; /** - * @var \Magento\Core\Model\StoreManager + * @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; /** - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\App\State $appState * @param \Magento\Core\Model\Url $url * @param \Magento\Core\Model\Store\Config $storeConfig * @param \Magento\App\ResponseFactory $responseFactory */ public function __construct( - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\App\State $appState, \Magento\Core\Model\Url $url, \Magento\Core\Model\Store\Config $storeConfig, diff --git a/app/code/Magento/Core/App/Request/PathInfoProcessor.php b/app/code/Magento/Core/App/Request/PathInfoProcessor.php index 60997635cde8b3ed579aef5419dea3ad31f0328a..2c802b8bea5c0f092210866acf38cdb4a8beee8a 100644 --- a/app/code/Magento/Core/App/Request/PathInfoProcessor.php +++ b/app/code/Magento/Core/App/Request/PathInfoProcessor.php @@ -26,14 +26,14 @@ namespace Magento\Core\App\Request; class PathInfoProcessor implements \Magento\App\Request\PathInfoProcessorInterface { /** - * @var \Magento\Core\Model\StoreManager + * @var \Magento\Core\Model\StoreManagerInterface */ private $_storeManager; /** - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager */ - public function __construct(\Magento\Core\Model\StoreManager $storeManager) + public function __construct(\Magento\Core\Model\StoreManagerInterface $storeManager) { $this->_storeManager = $storeManager; } @@ -57,7 +57,7 @@ class PathInfoProcessor implements \Magento\App\Request\PathInfoProcessorInterfa $pathInfo = '/' . (isset($pathParts[1]) ? $pathParts[1] : ''); return $pathInfo; } elseif (!empty($storeCode)) { - $request->setActionName('noRoute'); + $request->setActionName('noroute'); return $pathInfo; } return $pathInfo; diff --git a/app/code/Magento/Core/App/Response/Redirect.php b/app/code/Magento/Core/App/Response/Redirect.php new file mode 100644 index 0000000000000000000000000000000000000000..b1631c6fa3d6abea37413945bc2d1d369a91a8f1 --- /dev/null +++ b/app/code/Magento/Core/App/Response/Redirect.php @@ -0,0 +1,210 @@ +<?php +/** + * Response redirector + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +namespace Magento\Core\App\Response; + +class Redirect implements \Magento\App\Response\RedirectInterface +{ + /** + * @var \Magento\App\RequestInterface + */ + protected $_request; + + /** + * @var \Magento\Core\Model\StoreManagerInterface + */ + protected $_storeManager; + + /** + * @var \Magento\Encryption\UrlCoder + */ + protected $_urlCoder; + + /** + * @var \Magento\Core\Model\Session\AbstractSession + */ + protected $_session; + + /** + * @var bool + */ + protected $_canUseSessionIdInParam; + + /** + * @var \Magento\Core\Model\Url + */ + protected $_urlBuilder; + + /** + * @param \Magento\App\RequestInterface $request + * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\Encryption\UrlCoder $urlCoder + * @param \Magento\Core\Model\Session\AbstractSession $session + * @param \Magento\Core\Model\Url $urlBuilder + * @param bool $canUseSessionIdInParam + */ + public function __construct( + \Magento\App\RequestInterface $request, + \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\Encryption\UrlCoder $urlCoder, + \Magento\Core\Model\Session\AbstractSession $session, + \Magento\Core\Model\Url $urlBuilder, + $canUseSessionIdInParam = true + ) { + $this->_canUseSessionIdInParam = $canUseSessionIdInParam; + $this->_request = $request; + $this->_storeManager = $storeManager; + $this->_urlCoder = $urlCoder; + $this->_session = $session; + $this->_urlBuilder = $urlBuilder; + } + + /** + * @return string + */ + protected function _getUrl() + { + $refererUrl = $this->_request->getServer('HTTP_REFERER'); + $url = (string)$this->_request->getParam(self::PARAM_NAME_REFERER_URL); + if ($url) { + $refererUrl = $url; + } + $url = $this->_request->getParam(\Magento\App\Action\Action::PARAM_NAME_BASE64_URL); + if ($url) { + $refererUrl = $this->_urlCoder->decode($url); + } + $url = $this->_request->getParam(\Magento\App\Action\Action::PARAM_NAME_URL_ENCODED); + if ($url) { + $refererUrl = $this->_urlCoder->decode($url); + } + + if (!$this->_isUrlInternal($refererUrl)) { + $refererUrl = $this->_storeManager->getStore()->getBaseUrl(); + } + return $refererUrl; + } + + /** + * Identify referer url via all accepted methods (HTTP_REFERER, regular or base64-encoded request param) + * + * @return string + */ + public function getRefererUrl() + { + return $this->_getUrl(); + } + + /** + * Set referer url for redirect in response + * + * @param string $defaultUrl + * @return \Magento\App\ActionInterface + */ + public function getRedirectUrl($defaultUrl = null) + { + $refererUrl = $this->_getUrl(); + if (empty($refererUrl)) { + $refererUrl = empty($defaultUrl) + ? $this->_storeManager->getStore()->getBaseUrl() + : $defaultUrl; + } + return $refererUrl; + } + + /** + * Redirect to error page + * + * @param string $defaultUrl + * @return string + */ + public function error($defaultUrl) + { + $errorUrl = $this->_request->getParam(self::PARAM_NAME_ERROR_URL); + if (empty($errorUrl)) { + $errorUrl = $defaultUrl; + } + if (!$this->_isUrlInternal($errorUrl)) { + $errorUrl = $this->_storeManager->getStore()->getBaseUrl(); + } + return $errorUrl; + } + + /** + * Redirect to success page + * + * @param string $defaultUrl + * @return string + */ + public function success($defaultUrl) + { + $successUrl = $this->_request->getParam(self::PARAM_NAME_SUCCESS_URL); + if (empty($successUrl)) { + $successUrl = $defaultUrl; + } + if (!$this->_isUrlInternal($successUrl)) { + $successUrl = $this->_storeManager->getStore()->getBaseUrl(); + } + return $successUrl; + } + + /** + * Set redirect into response + * + * @param \Magento\App\ResponseInterface $response + * @param string $path + * @param array $arguments + */ + public function redirect(\Magento\App\ResponseInterface $response, $path, $arguments = array()) + { + if ($this->_session->getCookieShouldBeReceived() + && $this->_urlBuilder->getUseSession() + && $this->_canUseSessionIdInParam + ) { + $arguments += array('_query' => array( + $this->_session->getSessionIdQueryParam() => $this->_session->getSessionId() + )); + } + $response->setRedirect($this->_urlBuilder->getUrl($path, $arguments)); + } + + /** + * Check whether URL is internal + * + * @param string $url + * @return bool + */ + protected function _isUrlInternal($url) + { + if (strpos($url, 'http') !== false) { + $unsecure = (strpos($url, $this->_storeManager->getStore()->getBaseUrl()) === 0); + $secure = strpos( + $url, + $this->_storeManager->getStore()->getBaseUrl(\Magento\Core\Model\Store::URL_TYPE_LINK, true) + ) === 0; + return $unsecure || $secure; + } + return false; + } +} diff --git a/app/code/Magento/Core/App/Router/Base.php b/app/code/Magento/Core/App/Router/Base.php index 742c4168bdbbc973b11ddfaf4abe4c02267748c4..c95985b0e218257f8339d9665d2dbcaf7c18565d 100644 --- a/app/code/Magento/Core/App/Router/Base.php +++ b/app/code/Magento/Core/App/Router/Base.php @@ -80,7 +80,7 @@ class Base extends \Magento\App\Router\AbstractRouter protected $_url; /** - * @var \Magento\Core\Model\StoreManager + * @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; @@ -106,7 +106,7 @@ class Base extends \Magento\App\Router\AbstractRouter * @param \Magento\App\Route\ConfigInterface $routeConfig * @param \Magento\App\State $appState * @param \Magento\Core\Model\Url|\Magento\UrlInterface $url - * @param \Magento\Core\Model\StoreManager|\Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\Core\Model\StoreManagerInterface|\Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Store\Config $storeConfig * @param \Magento\Core\Model\Url\SecurityInfoInterface $urlSecurityInfo * @param $routerId @@ -140,7 +140,7 @@ class Base extends \Magento\App\Router\AbstractRouter * Match provided request and if matched - return corresponding controller * * @param \Magento\App\RequestInterface $request - * @return \Magento\Core\Controller\Front\Action|null + * @return \Magento\App\Action\Action|null */ public function match(\Magento\App\RequestInterface $request) { @@ -244,7 +244,7 @@ class Base extends \Magento\App\Router\AbstractRouter * * @param $currentModuleName * @param \Magento\App\RequestInterface $request - * @return \Magento\Core\Controller\Varien\Action|null + * @return \Magento\App\Action\Action|null */ protected function _getNotFoundControllerInstance($currentModuleName, \Magento\App\RequestInterface $request) { @@ -268,7 +268,7 @@ class Base extends \Magento\App\Router\AbstractRouter * * @param \Magento\App\RequestInterface $request * @param array $params - * @return \Magento\Core\Controller\Front\Action|null + * @return \Magento\App\Action\Action|null */ protected function _matchController(\Magento\App\RequestInterface $request, array $params) { diff --git a/app/code/Magento/Core/Block/Formkey.php b/app/code/Magento/Core/Block/Formkey.php index 47090d27387e00eb96c390ad2239faacaab90a44..6e8e84642412c2b9745fa183113710f663bb1ef9 100644 --- a/app/code/Magento/Core/Block/Formkey.php +++ b/app/code/Magento/Core/Block/Formkey.php @@ -29,7 +29,7 @@ */ namespace Magento\Core\Block; -class Formkey extends \Magento\Core\Block\Template +class Formkey extends \Magento\View\Block\Template { /** * Get form key diff --git a/app/code/Magento/Core/Block/Store/Switcher.php b/app/code/Magento/Core/Block/Store/Switcher.php index f3ea787049d0d692388aa8716621124f8f460337..c93b913c5c018787eef9fff2438e55a64b69c54a 100644 --- a/app/code/Magento/Core/Block/Store/Switcher.php +++ b/app/code/Magento/Core/Block/Store/Switcher.php @@ -33,7 +33,7 @@ */ namespace Magento\Core\Block\Store; -class Switcher extends \Magento\Core\Block\Template +class Switcher extends \Magento\View\Block\Template { protected $_groups = array(); protected $_stores = array(); @@ -54,30 +54,22 @@ class Switcher extends \Magento\Core\Block\Template protected $_storeGroupFactory; /** - * @var \Magento\Core\Model\StoreManager - */ - protected $_storeManager; - - /** + * @param \Magento\View\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Core\Model\Store\GroupFactory $storeGroupFactory * @param \Magento\Core\Model\StoreFactory $storeFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManager $storeManager * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Core\Model\Store\GroupFactory $storeGroupFactory, \Magento\Core\Model\StoreFactory $storeFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, - \Magento\Core\Model\StoreManager $storeManager, array $data = array() ) { $this->_storeGroupFactory = $storeGroupFactory; $this->_storeFactory = $storeFactory; - $this->_storeManager = $storeManager; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _construct() diff --git a/app/code/Magento/Core/Controller/Ajax.php b/app/code/Magento/Core/Controller/Ajax.php index d84f0f91c63ec21fa04a046aa4484eac9b3a8590..6d6b8d63614e0cf77a528edbc1094df2a4bbf229 100644 --- a/app/code/Magento/Core/Controller/Ajax.php +++ b/app/code/Magento/Core/Controller/Ajax.php @@ -23,7 +23,7 @@ */ namespace Magento\Core\Controller; -class Ajax extends \Magento\Core\Controller\Front\Action +class Ajax extends \Magento\App\Action\Action { /** * Ajax action for inline translation @@ -36,6 +36,6 @@ class Ajax extends \Magento\Core\Controller\Front\Action $translationHelper = $this->_objectManager->get('Magento\Core\Helper\Translate'); $response = $translationHelper->apply($translationParams, $area); $this->getResponse()->setBody($response); - $this->setFlag('', self::FLAG_NO_POST_DISPATCH, true); + $this->_actionFlag->set('', self::FLAG_NO_POST_DISPATCH, true); } } diff --git a/app/code/Magento/Core/Controller/Index.php b/app/code/Magento/Core/Controller/Index.php index 8eaa3ccd8887ddbaf0f4953d50590d55aa6ac7b4..af5fa03247fe5d036eae7d2efa8d04596e047ae5 100644 --- a/app/code/Magento/Core/Controller/Index.php +++ b/app/code/Magento/Core/Controller/Index.php @@ -26,8 +26,8 @@ namespace Magento\Core\Controller; -class Index extends \Magento\Core\Controller\Front\Action { - +class Index extends \Magento\App\Action\Action +{ function indexAction() { @@ -42,4 +42,28 @@ class Index extends \Magento\Core\Controller\Front\Action { $this->getResponse()->setHttpResponseCode(404); $this->getResponse()->setBody(__('Requested resource not found')); } + + /** + * No cookies action + */ + public function noCookiesAction() + { + $redirect = new \Magento\Object(); + $this->_eventManager->dispatch('controller_action_nocookies', array( + 'action' => $this, + 'redirect' => $redirect + )); + + $url = $redirect->getRedirectUrl(); + if ($url) { + $this->getResponse()->setRedirect($url); + } elseif ($redirect->getRedirect()) { + $this->_redirect($redirect->getPath(), $redirect->getArguments()); + } else { + $this->_view->loadLayout(array('default', 'noCookie')); + $this->_view->renderLayout(); + } + + $this->getRequest()->setDispatched(true); + } } diff --git a/app/code/Magento/Core/Controller/Noroute.php b/app/code/Magento/Core/Controller/Noroute.php new file mode 100644 index 0000000000000000000000000000000000000000..0177aea422caaf45f397d108f8d126713509133d --- /dev/null +++ b/app/code/Magento/Core/Controller/Noroute.php @@ -0,0 +1,58 @@ +<?php +/** + * Noroute application handler. + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +namespace Magento\Core\Controller; + +use Magento\App\Action\Action; + +class Noroute extends Action +{ + /** + * Noroute application handler + */ + public function indexAction() + { + $status = $this->getRequest()->getParam('__status__'); + if (!$status instanceof \Magento\Object) { + $status = new \Magento\Object(); + } + + $this->_eventManager->dispatch('controller_action_noroute', array('action' => $this, 'status' => $status)); + + if ($status->getLoaded() !== true || $status->getForwarded() === true) { + $this->_view->loadLayout(array('default', 'noroute')); + $this->_view->renderLayout(); + } else { + $status->setForwarded(true); + $request = $this->getRequest(); + $request->initForward(); + $request->setParams(array('__status__' => $status)); + $request->setControllerName($status->getForwardController()); + $request->setModuleName($status->getForwardModule()); + $request->setActionName($status->getForwardAction()) + ->setDispatched(false); + } + } +} \ No newline at end of file diff --git a/app/code/Magento/Core/Controller/Varien/Action.php b/app/code/Magento/Core/Controller/Varien/Action.php deleted file mode 100644 index dfcf474a3dd465b7a368c9a90866fefd24bfe5ac..0000000000000000000000000000000000000000 --- a/app/code/Magento/Core/Controller/Varien/Action.php +++ /dev/null @@ -1,1075 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * 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_Core - * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - - -/** - * Custom \Zend_Controller_Action class (formally) - * - * Allows dispatching before and after events for each controller action - * - * @category Magento - * @package Magento_Core - * @author Magento Core Team <core@magentocommerce.com> - */ -namespace Magento\Core\Controller\Varien; - -use Magento\App\Action\AbstractAction; - -class Action extends \Magento\App\Action\AbstractAction -{ - const FLAG_NO_CHECK_INSTALLATION = 'no-install-check'; - const FLAG_NO_DISPATCH = 'no-dispatch'; - const FLAG_NO_PRE_DISPATCH = 'no-preDispatch'; - const FLAG_NO_POST_DISPATCH = 'no-postDispatch'; - const FLAG_NO_START_SESSION = 'no-startSession'; - const FLAG_NO_DISPATCH_BLOCK_EVENT = 'no-beforeGenerateLayoutBlocksDispatch'; - const FLAG_NO_COOKIES_REDIRECT = 'no-cookies-redirect'; - - const PARAM_NAME_SUCCESS_URL = 'success_url'; - const PARAM_NAME_ERROR_URL = 'error_url'; - const PARAM_NAME_REFERER_URL = 'referer_url'; - const PARAM_NAME_BASE64_URL = 'r64'; - const PARAM_NAME_URL_ENCODED = 'uenc'; - - /** - * @var \Magento\ObjectManager - */ - protected $_objectManager; - - /** - * Real module name (like 'Magento_Module') - * - * @var string - */ - protected $_realModuleName; - - /** - * Action flags - * - * for example used to disable rendering default layout - * - * @var array - */ - protected $_flags = array(); - - /** - * Action list where need check enabled cookie - * - * @var array - */ - protected $_cookieCheckActions = array(); - - /** - * Namespace for session. - * Should be defined for proper working session. - * - * @var string - */ - protected $_sessionNamespace; - - /** - * Whether layout is loaded - * - * @see self::loadLayout() - * @var bool - */ - protected $_isLayoutLoaded = false; - - /** - * Title parts to be rendered in the page head title - * - * @see self::_title() - * @var array - */ - protected $_titles = array(); - - /** - * Whether the default title should be removed - * - * @see self::_title() - * @var bool - */ - protected $_removeDefaultTitle = false; - - /** - * @var \Magento\App\FrontController - */ - protected $_frontController = null; - - /** - * @var \Magento\View\LayoutInterface - */ - protected $_layout; - - /** - * @var \Magento\Event\ManagerInterface - */ - protected $_eventManager; - - /** - * @var \Magento\HTTP\Authentication - */ - protected $authentication; - - /** - * @param \Magento\Core\Controller\Varien\Action\Context $context - */ - public function __construct(\Magento\Core\Controller\Varien\Action\Context $context) - { - parent::__construct($context->getRequest(), $context->getResponse()); - - $this->_objectManager = $context->getObjectManager(); - $this->_frontController = $context->getFrontController(); - $this->_layout = $context->getLayout(); - $this->_eventManager = $context->getEventManager(); - $this->_frontController->setAction($this); - $this->authentication = $context->getAuthentication(); - - $this->_construct(); - } - - protected function _construct() - { - } - - /** - * Check is controller method exist - * - * @param string $action - * @return bool - */ - public function hasAction($action) - { - return method_exists($this, $this->getActionMethodName($action)); - } - - /** - * Retrieve flag value - * - * @param string $action - * @param string $flag - * @return bool - */ - public function getFlag($action, $flag = '') - { - if ('' === $action) { - $action = $this->getRequest()->getActionName(); - } - if ('' === $flag) { - return $this->_flags; - } elseif (isset($this->_flags[$action][$flag])) { - return $this->_flags[$action][$flag]; - } else { - return false; - } - } - - /** - * Setting flag value - * - * @param string $action - * @param string $flag - * @param string $value - * @return \Magento\Core\Controller\Varien\Action - */ - public function setFlag($action, $flag, $value) - { - if ('' === $action) { - $action = $this->getRequest()->getActionName(); - } - $this->_flags[$action][$flag] = $value; - return $this; - } - - /** - * Retrieve current layout object - * - * @return \Magento\View\LayoutInterface - */ - public function getLayout() - { - /** @var \Magento\Config\ScopeInterface $configScope */ - $configScope = $this->_objectManager->get('Magento\Config\ScopeInterface'); - $this->_layout->setArea($configScope->getCurrentScope()); - return $this->_layout; - } - - /** - * Load layout by handles(s) - * - * @param string|null|bool $handles - * @param bool $generateBlocks - * @param bool $generateXml - * @return $this - * @throws \RuntimeException - */ - public function loadLayout($handles = null, $generateBlocks = true, $generateXml = true) - { - if ($this->_isLayoutLoaded) { - throw new \RuntimeException('Layout must be loaded only once.'); - } - // if handles were specified in arguments load them first - if (false !== $handles && '' !== $handles) { - $this->getLayout()->getUpdate()->addHandle($handles ? $handles : 'default'); - } - - // add default layout handles for this action - $this->addActionLayoutHandles(); - - $this->loadLayoutUpdates(); - - if (!$generateXml) { - return $this; - } - $this->generateLayoutXml(); - - if (!$generateBlocks) { - return $this; - } - $this->generateLayoutBlocks(); - $this->_isLayoutLoaded = true; - - return $this; - } - - /** - * Retrieve the default layout handle name for the current action - * - * @return string - */ - public function getDefaultLayoutHandle() - { - return strtolower($this->getFullActionName()); - } - - /** - * Add layout handle by full controller action name - * - * @return \Magento\Core\Controller\Varien\Action - */ - public function addActionLayoutHandles() - { - if (!$this->addPageLayoutHandles()) { - $this->getLayout()->getUpdate()->addHandle($this->getDefaultLayoutHandle()); - } - return $this; - } - - /** - * Add layout updates handles associated with the action page - * - * @param array $parameters page parameters - * @return bool - */ - public function addPageLayoutHandles(array $parameters = array()) - { - $handle = $this->getDefaultLayoutHandle(); - $pageHandles = array($handle); - foreach ($parameters as $key => $value) { - $pageHandles[] = $handle . '_' . $key . '_' . $value; - } - // Do not sort array going into add page handles. Ensure default layout handle is added first. - return $this->getLayout()->getUpdate()->addPageHandles($pageHandles); - } - - /** - * Load layout updates - * - * @return $this - */ - public function loadLayoutUpdates() - { - \Magento\Profiler::start('LAYOUT'); - - // dispatch event for adding handles to layout update - $this->_eventManager->dispatch( - 'controller_action_layout_load_before', - array('action' => $this, 'layout' => $this->getLayout()) - ); - - // load layout updates by specified handles - \Magento\Profiler::start('layout_load'); - $this->getLayout()->getUpdate()->load(); - \Magento\Profiler::stop('layout_load'); - - \Magento\Profiler::stop('LAYOUT'); - return $this; - } - - /** - * Generate layout xml - * - * @return $this - */ - public function generateLayoutXml() - { - \Magento\Profiler::start('LAYOUT'); - - // dispatch event for adding text layouts - if (!$this->getFlag('', self::FLAG_NO_DISPATCH_BLOCK_EVENT)) { - $this->_eventManager->dispatch( - 'controller_action_layout_generate_xml_before', - array('action' => $this, 'layout' => $this->getLayout()) - ); - } - - // generate xml from collected text updates - \Magento\Profiler::start('layout_generate_xml'); - $this->getLayout()->generateXml(); - \Magento\Profiler::stop('layout_generate_xml'); - - \Magento\Profiler::stop('LAYOUT'); - return $this; - } - - /** - * Generate layout blocks - * - * @return $this - */ - public function generateLayoutBlocks() - { - \Magento\Profiler::start('LAYOUT'); - - // dispatch event for adding xml layout elements - if (!$this->getFlag('', self::FLAG_NO_DISPATCH_BLOCK_EVENT)) { - $this->_eventManager->dispatch( - 'controller_action_layout_generate_blocks_before', - array('action' => $this, 'layout' => $this->getLayout()) - ); - } - - // generate blocks from xml layout - \Magento\Profiler::start('layout_generate_blocks'); - $this->getLayout()->generateElements(); - \Magento\Profiler::stop('layout_generate_blocks'); - - if (!$this->getFlag('', self::FLAG_NO_DISPATCH_BLOCK_EVENT)) { - $this->_eventManager->dispatch( - 'controller_action_layout_generate_blocks_after', - array('action' => $this, 'layout' => $this->getLayout()) - ); - } - - \Magento\Profiler::stop('LAYOUT'); - return $this; - } - - /** - * Rendering layout - * - * @param string $output - * @return \Magento\Core\Controller\Varien\Action - */ - public function renderLayout($output = '') - { - if ($this->getFlag('', 'no-renderLayout')) { - return; - } - - \Magento\Profiler::start('LAYOUT'); - - $this->_renderTitles(); - - \Magento\Profiler::start('layout_render'); - - if ('' !== $output) { - $this->getLayout()->addOutputElement($output); - } - - $this->_eventManager->dispatch('controller_action_layout_render_before'); - $this->_eventManager->dispatch('controller_action_layout_render_before_' . $this->getFullActionName()); - - $output = $this->getLayout()->getOutput(); - $this->_objectManager->get('Magento\Core\Model\Translate')->processResponseBody($output); - $this->getResponse()->appendBody($output); - \Magento\Profiler::stop('layout_render'); - - \Magento\Profiler::stop('LAYOUT'); - return $this; - } - - /** - * Dispatch action - * - * @param string $action - */ - public function dispatch($action) - { - $this->getRequest()->setDispatched(true); - try { - $actionMethodName = $this->getActionMethodName($action); - if (!method_exists($this, $actionMethodName)) { - $actionMethodName = 'norouteAction'; - } - - $profilerKey = 'CONTROLLER_ACTION:' . $this->getFullActionName(); - \Magento\Profiler::start($profilerKey); - - \Magento\Profiler::start('predispatch'); - $this->preDispatch(); - \Magento\Profiler::stop('predispatch'); - - if ($this->getRequest()->isDispatched()) { - /** - * preDispatch() didn't change the action, so we can continue - */ - if (!$this->getFlag('', self::FLAG_NO_DISPATCH)) { - \Magento\Profiler::start('action_body'); - $this->$actionMethodName(); - \Magento\Profiler::stop('action_body'); - - \Magento\Profiler::start('postdispatch'); - $this->postDispatch(); - \Magento\Profiler::stop('postdispatch'); - } - } - - \Magento\Profiler::stop($profilerKey); - } catch (\Magento\App\Action\Exception $e) { - // set prepared flags - foreach ($e->getResultFlags() as $flagData) { - list($action, $flag, $value) = $flagData; - $this->setFlag($action, $flag, $value); - } - // call forward, redirect or an action - list($method, $parameters) = $e->getResultCallback(); - switch ($method) { - case \Magento\App\Action\Exception::RESULT_REDIRECT: - list($path, $arguments) = $parameters; - $this->_redirect($path, $arguments); - break; - case \Magento\App\Action\Exception::RESULT_FORWARD: - list($action, $controller, $module, $params) = $parameters; - $this->_forward($action, $controller, $module, $params); - break; - default: - $actionMethodName = $this->getActionMethodName($method); - $this->getRequest()->setActionName($method); - $this->$actionMethodName($method); - break; - } - } - } - - /** - * Retrieve action method name - * - * @param string $action - * @return string - */ - public function getActionMethodName($action) - { - return $action . 'Action'; - } - - /** - * Start session if it is not restricted - * - * @return \Magento\Core\Controller\Varien\Action - */ - protected function _startSession() - { - if (!$this->getFlag('', self::FLAG_NO_START_SESSION)) { - $checkCookie = in_array($this->getRequest()->getActionName(), $this->_cookieCheckActions) - && !$this->getRequest()->getParam('nocookie', false); - $cookies = $this->_objectManager->get('Magento\Core\Model\Cookie')->get(); - /** @var $session \Magento\Core\Model\Session */ - $session = $this->_objectManager->get('Magento\Core\Model\Session')->start(); - - if (empty($cookies)) { - if ($session->getCookieShouldBeReceived()) { - $this->setFlag('', self::FLAG_NO_COOKIES_REDIRECT, true); - $session->unsCookieShouldBeReceived(); - $session->setSkipSessionIdFlag(true); - } elseif ($checkCookie) { - if (isset($_GET[$session->getSessionIdQueryParam()]) - && $this->_objectManager->get('Magento\Core\Model\Url')->getUseSession() - && $this->_sessionNamespace != \Magento\Backend\Controller\AbstractAction::SESSION_NAMESPACE - ) { - $session->setCookieShouldBeReceived(true); - } else { - $this->setFlag('', self::FLAG_NO_COOKIES_REDIRECT, true); - } - } - } - } - return $this; - } - - /** - * Initialize area and design - * - * @return \Magento\Core\Controller\Varien\Action - */ - protected function _initDesign() - { - $area = $this->_objectManager->get('Magento\Core\Model\App')->getArea($this->getLayout()->getArea()); - $area->load(\Magento\Core\Model\App\Area::PART_DESIGN); - $area->load(\Magento\Core\Model\App\Area::PART_TRANSLATE); - $area->detectDesign($this->getRequest()); - return $this; - } - - /** - * Dispatch event before action - * - * @return null - */ - public function preDispatch() - { - if (!$this->getFlag('', self::FLAG_NO_CHECK_INSTALLATION)) { - if (!$this->_objectManager->get('Magento\App\State')->isInstalled()) { - $this->setFlag('', self::FLAG_NO_DISPATCH, true); - $this->_redirect('install'); - return; - } - } - - // Prohibit disabled store actions - $storeManager = $this->_objectManager->get('Magento\Core\Model\StoreManager'); - if ($this->_objectManager->get('Magento\App\State')->isInstalled() - && !$storeManager->getStore()->getIsActive() - ) { - $this->_objectManager->get('Magento\Core\Model\StoreManager')->throwStoreException(); - } - - // Start session - $this->_startSession(); - - // Load area and initialize design depend on loaded area - $this->_initDesign(); - - if ($this->getFlag('', self::FLAG_NO_COOKIES_REDIRECT) - && $this->_objectManager->get('Magento\Core\Model\Store\Config')->getConfig('web/browser_capabilities/cookies') - ) { - $this->_forward('noCookies', 'index', 'core'); - return; - } - - if ($this->getFlag('', self::FLAG_NO_PRE_DISPATCH)) { - return; - } - - $this->_firePreDispatchEvents(); - } - - /** - * Fire predispatch events, execute extra logic after predispatch - */ - protected function _firePreDispatchEvents() - { - $this->_eventManager->dispatch('controller_action_predispatch', array('controller_action' => $this)); - $this->_eventManager->dispatch('controller_action_predispatch_' . $this->getRequest()->getRouteName(), - array('controller_action' => $this)); - $this->_eventManager->dispatch('controller_action_predispatch_' . $this->getFullActionName(), - array('controller_action' => $this)); - } - - /** - * Dispatches event after action - */ - public function postDispatch() - { - if ($this->getFlag('', self::FLAG_NO_POST_DISPATCH)) { - return; - } - - $this->_eventManager->dispatch( - 'controller_action_postdispatch_' . $this->getFullActionName(), - array('controller_action' => $this) - ); - $this->_eventManager->dispatch( - 'controller_action_postdispatch_' . $this->getRequest()->getRouteName(), - array('controller_action' => $this) - ); - $this->_eventManager->dispatch('controller_action_postdispatch', array('controller_action' => $this)); - } - - /** - * No route action - * - * @param null $coreRoute - */ - public function norouteAction($coreRoute = null) - { - $status = $this->getRequest()->getParam('__status__'); - if (!$status instanceof \Magento\Object) { - $status = new \Magento\Object(); - } - - $this->_eventManager->dispatch('controller_action_noroute', array('action' => $this, 'status' => $status)); - - if ($status->getLoaded() !== true - || $status->getForwarded() === true - || !is_null($coreRoute) - ) { - $this->loadLayout(array('default', 'noRoute')); - $this->renderLayout(); - } else { - $status->setForwarded(true); - $this->_forward( - $status->getForwardAction(), - $status->getForwardController(), - $status->getForwardModule(), - array('__status__' => $status)); - } - } - - /** - * No cookies action - */ - public function noCookiesAction() - { - $redirect = new \Magento\Object(); - $this->_eventManager->dispatch('controller_action_nocookies', array( - 'action' => $this, - 'redirect' => $redirect - )); - - $url = $redirect->getRedirectUrl(); - if ($url) { - $this->_redirectUrl($url); - } elseif ($redirect->getRedirect()) { - $this->_redirect($redirect->getPath(), $redirect->getArguments()); - } else { - $this->loadLayout(array('default', 'noCookie')); - $this->renderLayout(); - } - - $this->getRequest()->setDispatched(true); - } - - /** - * Throw control to different action (control and module if was specified). - * - * @param string $action - * @param string|null $controller - * @param string|null $module - * @param array|null $params - */ - protected function _forward($action, $controller = null, $module = null, array $params = null) - { - $request = $this->getRequest(); - - $request->initForward(); - - if (isset($params)) { - $request->setParams($params); - } - - if (isset($controller)) { - $request->setControllerName($controller); - - // Module should only be reset if controller has been specified - if (isset($module)) { - $request->setModuleName($module); - } - } - - $request->setActionName($action) - ->setDispatched(false); - } - - /** - * Initializing layout messages by message storage(s), loading and adding messages to layout messages block - * - * @param string|array $messagesStorage - * @throws \Magento\Core\Exception - * @return \Magento\Core\Controller\Varien\Action - */ - protected function _initLayoutMessages($messagesStorage) - { - if (!is_array($messagesStorage)) { - $messagesStorage = array($messagesStorage); - } - foreach ($messagesStorage as $storageName) { - $storage = $this->_objectManager->get($storageName); - if ($storage) { - $block = $this->getLayout()->getMessagesBlock(); - $block->addMessages($storage->getMessages(true)); - $block->setEscapeMessageFlag($storage->getEscapeMessages(true)); - $block->addStorageType($storageName); - } else { - throw new \Magento\Core\Exception( - __('Invalid messages storage "%1" for layout messages initialization', (string)$storageName) - ); - } - } - return $this; - } - - /** - * Initializing layout messages by message storage(s), loading and adding messages to layout messages block - * - * @param string|array $messagesStorage - * @return \Magento\Core\Controller\Varien\Action - */ - public function initLayoutMessages($messagesStorage) - { - return $this->_initLayoutMessages($messagesStorage); - } - - /** - * Set redirect url into response - * - * @param string $url - * @return \Magento\Core\Controller\Varien\Action - */ - protected function _redirectUrl($url) - { - $this->getResponse()->setRedirect($url); - return $this; - } - - /** - * Set redirect into response - * - * @param string $path - * @param array $arguments - * @return \Magento\Core\Controller\Varien\Action - */ - protected function _redirect($path, $arguments = array()) - { - return $this->setRedirectWithCookieCheck($path, $arguments); - } - - /** - * Set redirect into response with session id in URL if it is enabled. - * It allows to distinguish primordial request from browser with cookies disabled. - * - * @param string $path - * @param array $arguments - * @return \Magento\Core\Controller\Varien\Action - */ - public function setRedirectWithCookieCheck($path, array $arguments = array()) - { - /** @var $session \Magento\Core\Model\Session */ - $session = $this->_objectManager->get('Magento\Core\Model\Session'); - if ($session->getCookieShouldBeReceived() - && $this->_objectManager->get('Magento\Core\Model\Url')->getUseSession() - && $this->_sessionNamespace != \Magento\Backend\Controller\AbstractAction::SESSION_NAMESPACE - ) { - $arguments += array('_query' => array( - $session->getSessionIdQueryParam() => $session->getSessionId() - )); - } - $this->getResponse()->setRedirect( - $this->_objectManager->create('Magento\Core\Model\Url')->getUrl($path, $arguments) - ); - return $this; - } - - - /** - * Redirect to success page - * - * @param string $defaultUrl - * @return \Magento\Core\Controller\Varien\Action - */ - protected function _redirectSuccess($defaultUrl) - { - $successUrl = $this->getRequest()->getParam(self::PARAM_NAME_SUCCESS_URL); - if (empty($successUrl)) { - $successUrl = $defaultUrl; - } - if (!$this->_isUrlInternal($successUrl)) { - $successUrl = $this->_objectManager->get('Magento\Core\Model\StoreManager')->getStore()->getBaseUrl(); - } - $this->getResponse()->setRedirect($successUrl); - return $this; - } - - /** - * Redirect to error page - * - * @param string $defaultUrl - * @return \Magento\Core\Controller\Varien\Action - */ - protected function _redirectError($defaultUrl) - { - $errorUrl = $this->getRequest()->getParam(self::PARAM_NAME_ERROR_URL); - if (empty($errorUrl)) { - $errorUrl = $defaultUrl; - } - if (!$this->_isUrlInternal($errorUrl)) { - $errorUrl = $this->_objectManager->get('Magento\Core\Model\StoreManager')->getStore()->getBaseUrl(); - } - $this->getResponse()->setRedirect($errorUrl); - return $this; - } - - /** - * Set referer url for redirect in response - * - * @param string $defaultUrl - * @return \Magento\Core\Controller\Varien\Action - */ - protected function _redirectReferer($defaultUrl=null) - { - - $refererUrl = $this->_getRefererUrl(); - if (empty($refererUrl)) { - $refererUrl = empty($defaultUrl) - ? $this->_objectManager->get('Magento\Core\Model\StoreManager')->getBaseUrl() - : $defaultUrl; - } - - $this->getResponse()->setRedirect($refererUrl); - return $this; - } - - /** - * Identify referer url via all accepted methods (HTTP_REFERER, regular or base64-encoded request param) - * - * @return string - */ - protected function _getRefererUrl() - { - $refererUrl = $this->getRequest()->getServer('HTTP_REFERER'); - $url = $this->getRequest()->getParam(self::PARAM_NAME_REFERER_URL); - if ($url) { - $refererUrl = $url; - } - $url = $this->getRequest()->getParam(self::PARAM_NAME_BASE64_URL); - if ($url) { - $refererUrl = $this->_objectManager->get('Magento\Core\Helper\Data')->urlDecode($url); - } - $url = $this->getRequest()->getParam(self::PARAM_NAME_URL_ENCODED); - if ($url) { - $refererUrl = $this->_objectManager->get('Magento\Core\Helper\Data')->urlDecode($url); - } - - if (!$this->_isUrlInternal($refererUrl)) { - $refererUrl = $this->_objectManager->get('Magento\Core\Model\StoreManagerInterface')->getStore()->getBaseUrl(); - } - return $refererUrl; - } - - /** - * Check url to be used as internal - * - * @param string $url - * @return bool - */ - protected function _isUrlInternal($url) - { - if (strpos($url, 'http') !== false) { - /** - * Url must start from base secure or base unsecure url - */ - /** @var $store \Magento\Core\Model\StoreManagerInterface */ - $store = $this->_objectManager->get('Magento\Core\Model\StoreManagerInterface')->getStore(); - if ((strpos($url, $store->getBaseUrl()) === 0) - || (strpos($url, $store->getBaseUrl(\Magento\Core\Model\Store::URL_TYPE_LINK, true)) === 0) - ) { - return true; - } - } - return false; - } - - /** - * Validate Form Key - * - * @return bool - */ - protected function _validateFormKey() - { - if (!($formKey = $this->getRequest()->getParam('form_key', null)) - || $formKey != $this->_objectManager->get('Magento\Core\Model\Session')->getFormKey() - ) { - return false; - } - return true; - } - - /** - * Add an extra title to the end - * - * Usage examples: - * $this->_title('foo')->_title('bar'); - * => bar / foo / <default title> - * - * @see self::_renderTitles() - * @param string $text - * @return \Magento\Core\Controller\Varien\Action - */ - protected function _title($text) - { - $this->_titles[] = $text; - return $this; - } - - /** - * Prepare titles in the 'head' layout block - * Supposed to work only in actions where layout is rendered - * Falls back to the default logic if there are no titles eventually - * - * @see self::loadLayout() - * @see self::renderLayout() - */ - protected function _renderTitles() - { - if ($this->_isLayoutLoaded && $this->_titles) { - $titleBlock = $this->getLayout()->getBlock('head'); - if ($titleBlock) { - if (!$this->_removeDefaultTitle) { - $title = trim($titleBlock->getTitle()); - if ($title) { - array_unshift($this->_titles, $title); - } - } - $titleBlock->setTitle(array_reverse($this->_titles)); - } - } - } - - /** - * Convert dates in array from localized to internal format - * - * @param array $array - * @param array $dateFields - * @return array - */ - protected function _filterDates($array, $dateFields) - { - if (empty($dateFields)) { - return $array; - } - $filterInput = new \Zend_Filter_LocalizedToNormalized(array( - 'date_format' => $this->_objectManager->get('Magento\Core\Model\LocaleInterface') - ->getDateFormat(\Magento\Core\Model\LocaleInterface::FORMAT_TYPE_SHORT) - )); - $filterInternal = new \Zend_Filter_NormalizedToLocalized(array( - 'date_format' => \Magento\Stdlib\DateTime::DATE_INTERNAL_FORMAT - )); - - foreach ($dateFields as $dateField) { - if (array_key_exists($dateField, $array) && !empty($dateField)) { - $array[$dateField] = $filterInput->filter($array[$dateField]); - $array[$dateField] = $filterInternal->filter($array[$dateField]); - } - } - return $array; - } - - /** - * Convert dates with time in array from localized to internal format - * - * @param array $array - * @param array $dateFields - * @return array - */ - protected function _filterDateTime($array, $dateFields) - { - if (empty($dateFields)) { - return $array; - } - $filterInput = new \Zend_Filter_LocalizedToNormalized(array( - 'date_format' => $this->_objectManager->get('Magento\Core\Model\LocaleInterface') - ->getDateTimeFormat(\Magento\Core\Model\LocaleInterface::FORMAT_TYPE_SHORT) - )); - $filterInternal = new \Zend_Filter_NormalizedToLocalized(array( - 'date_format' => \Magento\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT - )); - - foreach ($dateFields as $dateField) { - if (array_key_exists($dateField, $array) && !empty($dateField)) { - $array[$dateField] = $filterInput->filter($array[$dateField]); - $array[$dateField] = $filterInternal->filter($array[$dateField]); - } - } - return $array; - } - - /** - * Declare headers and content file in response for file download - * - * @param string $fileName - * @param string|array $content set to null to avoid starting output, $contentLength should be set explicitly in - * that case - * @param string $contentType - * @param int $contentLength explicit content length, if strlen($content) isn't applicable - * @throws \Magento\Core\Exception - * @return \Magento\Core\Controller\Varien\Action - */ - protected function _prepareDownloadResponse( - $fileName, - $content, - $contentType = 'application/octet-stream', - $contentLength = null - ) { - /** @var \Magento\Filesystem $filesystem */ - $filesystem = $this->_objectManager->create('Magento\Filesystem'); - $isFile = false; - $file = null; - if (is_array($content)) { - if (!isset($content['type']) || !isset($content['value'])) { - return $this; - } - if ($content['type'] == 'filename') { - $isFile = true; - $file = $content['value']; - $contentLength = $filesystem->getFileSize($file); - } - } - - $this->getResponse() - ->setHttpResponseCode(200) - ->setHeader('Pragma', 'public', true) - ->setHeader('Cache-Control', 'must-revalidate, post-check=0, pre-check=0', true) - ->setHeader('Content-type', $contentType, true) - ->setHeader('Content-Length', is_null($contentLength) ? strlen($content) : $contentLength, true) - ->setHeader('Content-Disposition', 'attachment; filename="'.$fileName.'"', true) - ->setHeader('Last-Modified', date('r'), true); - - if (!is_null($content)) { - if ($isFile) { - $this->getResponse()->clearBody(); - $this->getResponse()->sendHeaders(); - - if (!$filesystem->isFile($file)) { - throw new \Magento\Core\Exception(__('File not found')); - } - $stream = $filesystem->createAndOpenStream($file, 'r'); - while ($buffer = $stream->read(1024)) { - print $buffer; - } - flush(); - $stream->close(); - if (!empty($content['rm'])) { - $filesystem->delete($file); - } - - exit(0); - } else { - $this->getResponse()->setBody($content); - } - } - return $this; - } -} diff --git a/app/code/Magento/Core/Exception.php b/app/code/Magento/Core/Exception.php index 0731ac095fba4a3aafca3781fc21d8f4cbcc7719..cd0cc49686cc45002c759de49a191e6b499824ea 100644 --- a/app/code/Magento/Core/Exception.php +++ b/app/code/Magento/Core/Exception.php @@ -39,7 +39,7 @@ class Exception extends \Exception { protected $_messages = array(); - public function addMessage(\Magento\Core\Model\Message\AbstractMessage $message) + public function addMessage(\Magento\Message\AbstractMessage $message) { if (!isset($this->_messages[$message->getType()])) { $this->_messages[$message->getType()] = array(); diff --git a/app/code/Magento/Core/Filter/Date.php b/app/code/Magento/Core/Filter/Date.php new file mode 100644 index 0000000000000000000000000000000000000000..481d8507037259dc19a441b98240fa0c19dff8d0 --- /dev/null +++ b/app/code/Magento/Core/Filter/Date.php @@ -0,0 +1,55 @@ +<?php +/** + * Date filter. Converts date from localized to internal format. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +/** + * @todo move this class to library when locale interface is moved + */ +namespace Magento\Core\Filter; + +use Magento\Core\Model\LocaleInterface; + +class Date implements \Zend_Filter_Interface +{ + /** + * Filter that converts localized input into normalized format + * + * @var \Zend_Filter_LocalizedToNormalized + */ + protected $_localToNormalFilter; + + /** + * Filter that converts normalized input into internal format + * + * @var \Zend_Filter_NormalizedToLocalized + */ + protected $_normalToLocalFilter; + + /** + * @param LocaleInterface $locale + */ + public function __construct( + LocaleInterface $locale + ) { + $this->_localToNormalFilter = new \Zend_Filter_LocalizedToNormalized(array( + 'date_format' => $locale->getDateFormat(LocaleInterface::FORMAT_TYPE_SHORT) + )); + $this->_normalToLocalFilter = new \Zend_Filter_NormalizedToLocalized(array( + 'date_format' => \Magento\Stdlib\DateTime::DATE_INTERNAL_FORMAT + )); + } + + /** + * Convert date from localized to internal format + * + * @param string $value + * @return string + */ + public function filter($value) + { + return $this->_normalToLocalFilter->filter($this->_localToNormalFilter->filter($value)); + } +} diff --git a/app/code/Magento/Core/Filter/DateTime.php b/app/code/Magento/Core/Filter/DateTime.php new file mode 100644 index 0000000000000000000000000000000000000000..ccd3d870370aefe133bdc215659b83b1fa9d6a07 --- /dev/null +++ b/app/code/Magento/Core/Filter/DateTime.php @@ -0,0 +1,31 @@ +<?php +/** + * Date/Time filter. Converts datetime from localized to internal format. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +/** + * @todo move this class to library when locale interface is moved + */ +namespace Magento\Core\Filter; + +use Magento\Core\Model\LocaleInterface; + +class DateTime extends Date +{ + /** + * @param LocaleInterface $locale + */ + public function __construct( + LocaleInterface $locale + ) { + parent::__construct($locale); + $this->_localToNormalFilter = new \Zend_Filter_LocalizedToNormalized(array( + 'date_format' => $locale->getDateTimeFormat(LocaleInterface::FORMAT_TYPE_SHORT) + )); + $this->_normalToLocalFilter = new \Zend_Filter_NormalizedToLocalized(array( + 'date_format' => \Magento\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT + )); + } +} diff --git a/app/code/Magento/Core/Helper/Cookie.php b/app/code/Magento/Core/Helper/Cookie.php index e48f364dcae5642654314d0768dfdd1d54fedad0..a90844b660e3eadc0f58cc97112023a41e3f7869 100644 --- a/app/code/Magento/Core/Helper/Cookie.php +++ b/app/code/Magento/Core/Helper/Cookie.php @@ -33,7 +33,7 @@ */ namespace Magento\Core\Helper; -class Cookie extends \Magento\Core\Helper\AbstractHelper +class Cookie extends \Magento\App\Helper\AbstractHelper { /** * Cookie name for users who allowed cookie save @@ -66,18 +66,19 @@ class Cookie extends \Magento\Core\Helper\AbstractHelper protected $_website; /** - * @param \Magento\Core\Helper\Context $context - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\App\Helper\Context $context + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Cookie $cookie * @param array $data + * * @throws \InvalidArgumentException */ public function __construct( - \Magento\Core\Helper\Context $context, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\App\Helper\Context $context, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Cookie $cookie, - array $data = array()) - { + array $data = array() + ) { parent::__construct($context); $this->_currentStore = isset($data['current_store']) ? $data['current_store'] : $storeManager->getStore(); diff --git a/app/code/Magento/Core/Helper/Data.php b/app/code/Magento/Core/Helper/Data.php index 0ca295bb0016a2dcbbabdc15a9875731c7af3252..7f83089b8944c3e83a83aa7bc748a22cbc49c184 100644 --- a/app/code/Magento/Core/Helper/Data.php +++ b/app/code/Magento/Core/Helper/Data.php @@ -29,7 +29,7 @@ namespace Magento\Core\Helper; /** * Core data helper */ -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { const XML_PATH_DEFAULT_COUNTRY = 'general/country/default'; const XML_PATH_DEV_ALLOW_IPS = 'dev/restrict/allow_ips'; @@ -42,15 +42,19 @@ class Data extends \Magento\Core\Helper\AbstractHelper */ const DIVIDE_EPSILON = 10000; - /** - * Config path to mail sending setting that shows if email communications are disabled - */ - const XML_PATH_SYSTEM_SMTP_DISABLE = 'system/smtp/disable'; + protected $_allowedFormats = array( + \Magento\Core\Model\LocaleInterface::FORMAT_TYPE_FULL, + \Magento\Core\Model\LocaleInterface::FORMAT_TYPE_LONG, + \Magento\Core\Model\LocaleInterface::FORMAT_TYPE_MEDIUM, + \Magento\Core\Model\LocaleInterface::FORMAT_TYPE_SHORT + ); /** - * @var \Magento\Cache\ConfigInterface + * Core event manager proxy + * + * @var \Magento\Event\ManagerInterface */ - protected $_cacheConfig; + protected $_eventManager = null; /** * Core store config @@ -60,7 +64,7 @@ class Data extends \Magento\Core\Helper\AbstractHelper protected $_coreStoreConfig; /** - * @var \Magento\Core\Model\StoreManager + * @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; @@ -80,30 +84,23 @@ class Data extends \Magento\Core\Helper\AbstractHelper protected $_dbCompatibleMode; /** - * @var \Magento\HTTP\PhpEnvironment\RemoteAddress - */ - protected $_remoteAddress; - - /** - * @param Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\Store\Config $coreStoreConfig - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Locale $locale * @param \Magento\App\State $appState * @param bool $dbCompatibleMode */ public function __construct( - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Core\Model\Store\Config $coreStoreConfig, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Locale $locale, \Magento\App\State $appState, $dbCompatibleMode = true ) { - $this->_coreStoreConfig = $coreStoreConfig; - $this->_remoteAddress = $context->getRemoteAddress(); parent::__construct($context); - $this->_cacheConfig = $context->getCacheConfig(); + $this->_coreStoreConfig = $coreStoreConfig; $this->_storeManager = $storeManager; $this->_locale = $locale; $this->_appState = $appState; @@ -272,14 +269,4 @@ class Data extends \Magento\Core\Helper\AbstractHelper { return (bool) $this->_coreStoreConfig->getConfig(self::XML_PATH_SINGLE_STORE_MODE_ENABLED); } - - /** - * Returns the translate model for this instance. - * - * @return \Magento\Core\Model\Translate - */ - public function getTranslator() - { - return $this->_translator; - } } diff --git a/app/code/Magento/Core/Helper/File/Media.php b/app/code/Magento/Core/Helper/File/Media.php index 9518ad1ac7818b059be7f96fa9092b6c739b76d9..4e2facdd14b791196fec04a53c576616aa8f8824 100644 --- a/app/code/Magento/Core/Helper/File/Media.php +++ b/app/code/Magento/Core/Helper/File/Media.php @@ -29,7 +29,7 @@ namespace Magento\Core\Helper\File; /** * Class Media */ -class Media extends \Magento\Core\Helper\AbstractHelper +class Media extends \Magento\App\Helper\AbstractHelper { /** * @var \Magento\Core\Model\Date @@ -39,11 +39,11 @@ class Media extends \Magento\Core\Helper\AbstractHelper /** * Constructor * - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\Date $date */ public function __construct( - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Core\Model\Date $date ) { parent::__construct($context); diff --git a/app/code/Magento/Core/Helper/File/Storage.php b/app/code/Magento/Core/Helper/File/Storage.php index 3da083470a73551642866a30ac65d160fdcb8d03..d82ae7ad8d24dc25cdb6ab1a5923cd3d6d7b3715 100644 --- a/app/code/Magento/Core/Helper/File/Storage.php +++ b/app/code/Magento/Core/Helper/File/Storage.php @@ -33,7 +33,7 @@ */ namespace Magento\Core\Helper\File; -class Storage extends \Magento\Core\Helper\AbstractHelper +class Storage extends \Magento\App\Helper\AbstractHelper { /** * Current storage code @@ -70,21 +70,29 @@ class Storage extends \Magento\Core\Helper\AbstractHelper */ protected $_filesystemStorage; + /** + * @var \Magento\Core\Model\ConfigInterface + */ + protected $config; + /** * @param Storage\Database $coreFileStorageDb - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\File\Storage $storage * @param \Magento\Core\Model\File\Storage\File $filesystemStorage + * @param \Magento\Core\Model\ConfigInterface $config */ public function __construct( \Magento\Core\Helper\File\Storage\Database $coreFileStorageDb, - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Core\Model\File\Storage $storage, - \Magento\Core\Model\File\Storage\File $filesystemStorage + \Magento\Core\Model\File\Storage\File $filesystemStorage, + \Magento\Core\Model\ConfigInterface $config ) { $this->_filesystemStorage = $filesystemStorage; $this->_coreFileStorageDb = $coreFileStorageDb; $this->_storage = $storage; + $this->config = $config; parent::__construct($context); } @@ -96,8 +104,9 @@ class Storage extends \Magento\Core\Helper\AbstractHelper public function getCurrentStorageCode() { if (is_null($this->_currentStorage)) { - $this->_currentStorage = (int) $this->_app - ->getConfig()->getValue(\Magento\Core\Model\File\Storage::XML_PATH_STORAGE_MEDIA, 'default'); + $this->_currentStorage = (int) $this->config->getValue( + \Magento\Core\Model\File\Storage::XML_PATH_STORAGE_MEDIA, 'default' + ); } return $this->_currentStorage; diff --git a/app/code/Magento/Core/Helper/File/Storage/Database.php b/app/code/Magento/Core/Helper/File/Storage/Database.php index 3706dfb1a609c21d899d6bccce4166e0f48cde11..c920f39b5bb50bae7799bf0df7f6da1d1a6e7e23 100644 --- a/app/code/Magento/Core/Helper/File/Storage/Database.php +++ b/app/code/Magento/Core/Helper/File/Storage/Database.php @@ -33,7 +33,7 @@ */ namespace Magento\Core\Helper\File\Storage; -class Database extends \Magento\Core\Helper\AbstractHelper +class Database extends \Magento\App\Helper\AbstractHelper { /** * Database storage model @@ -72,7 +72,7 @@ class Database extends \Magento\Core\Helper\AbstractHelper protected $_dbStorageFactory; /** - * @var \Magento\Core\Model\File\Storage\File\Proxy + * @var \Magento\Core\Model\File\Storage\File */ protected $_fileStorage; @@ -82,24 +82,32 @@ class Database extends \Magento\Core\Helper\AbstractHelper protected $_dir; /** - * @param \Magento\Core\Helper\Context $context + * @var \Magento\Core\Model\ConfigInterface + */ + protected $config; + + /** + * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\File\Storage\DatabaseFactory $dbStorageFactory * @param \Magento\Core\Model\File\Storage\File $fileStorage * @param \Magento\App\Dir $dir * @param \Magento\Filesystem $filesystem + * @param \Magento\Core\Model\ConfigInterface $config */ public function __construct( - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Core\Model\File\Storage\DatabaseFactory $dbStorageFactory, \Magento\Core\Model\File\Storage\File $fileStorage, \Magento\App\Dir $dir, - \Magento\Filesystem $filesystem + \Magento\Filesystem $filesystem, + \Magento\Core\Model\ConfigInterface $config ) { - parent::__construct($context); $this->_filesystem = $filesystem; $this->_dbStorageFactory = $dbStorageFactory; $this->_fileStorage = $fileStorage; $this->_dir = $dir; + $this->config = $config; + parent::__construct($context); } /** @@ -111,8 +119,9 @@ class Database extends \Magento\Core\Helper\AbstractHelper public function checkDbUsage() { if (null === $this->_useDb) { - $currentStorage = (int) $this->_app->getConfig() - ->getValue(\Magento\Core\Model\File\Storage::XML_PATH_STORAGE_MEDIA, 'default'); + $currentStorage = (int) $this->config->getValue( + \Magento\Core\Model\File\Storage::XML_PATH_STORAGE_MEDIA, 'default' + ); $this->_useDb = ($currentStorage == \Magento\Core\Model\File\Storage::STORAGE_MEDIA_DATABASE); } diff --git a/app/code/Magento/Core/Helper/Js.php b/app/code/Magento/Core/Helper/Js.php index 76032fd153d4611c690602ae28cd8e7bf23ca231..4823d32a1c69a7be61fb39b2152b6efb1e0ede72 100644 --- a/app/code/Magento/Core/Helper/Js.php +++ b/app/code/Magento/Core/Helper/Js.php @@ -29,7 +29,7 @@ */ namespace Magento\Core\Helper; -class Js extends \Magento\Core\Helper\AbstractHelper +class Js extends \Magento\App\Helper\AbstractHelper { /** * Array of sentences of JS translations @@ -52,12 +52,12 @@ class Js extends \Magento\Core\Helper\AbstractHelper /** * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\View\Url $viewUrl */ public function __construct( \Magento\Core\Helper\Data $coreData, - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\View\Url $viewUrl ) { $this->_coreData = $coreData; diff --git a/app/code/Magento/Core/Helper/String.php b/app/code/Magento/Core/Helper/String.php index 257003e219884392ff03605f6d663d0d7d1475f6..b306cd7980ab94508da91dbd4802bc5dc5733903 100644 --- a/app/code/Magento/Core/Helper/String.php +++ b/app/code/Magento/Core/Helper/String.php @@ -29,7 +29,7 @@ namespace Magento\Core\Helper; /** * Core data helper */ -class String extends \Magento\Core\Helper\AbstractHelper +class String extends \Magento\App\Helper\AbstractHelper { /** * Builds namespace + classname out of the parts array diff --git a/app/code/Magento/Core/Helper/Theme.php b/app/code/Magento/Core/Helper/Theme.php index 81c1c0cfecec8cdd170b3ed89067caa154bf9c14..e139baf16bd10d1c078d4560a4459dfdf83c895d 100644 --- a/app/code/Magento/Core/Helper/Theme.php +++ b/app/code/Magento/Core/Helper/Theme.php @@ -29,7 +29,7 @@ */ namespace Magento\Core\Helper; -class Theme extends \Magento\Core\Helper\AbstractHelper +class Theme extends \Magento\App\Helper\AbstractHelper { /** * Directories @@ -65,7 +65,7 @@ class Theme extends \Magento\Core\Helper\AbstractHelper * @param \Magento\View\FileSystem $viewFileSystem */ public function __construct( - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\App\Dir $dirs, \Magento\View\Layout\ProcessorFactory $layoutProcessorFactory, \Magento\Core\Model\Resource\Theme\Collection $themeCollection, diff --git a/app/code/Magento/Core/Helper/Translate.php b/app/code/Magento/Core/Helper/Translate.php index 2fc62fd7161de75c0177bc9da7a3941158cddc27..499bc21b661bbc46fe9870a6b11417d84b45c353 100644 --- a/app/code/Magento/Core/Helper/Translate.php +++ b/app/code/Magento/Core/Helper/Translate.php @@ -29,7 +29,7 @@ */ namespace Magento\Core\Helper; -class Translate extends \Magento\Core\Helper\AbstractHelper +class Translate extends \Magento\App\Helper\AbstractHelper { /** * Design package instance @@ -37,23 +37,24 @@ class Translate extends \Magento\Core\Helper\AbstractHelper * @var \Magento\View\DesignInterface */ protected $_design; - + /** - * @var \Magento\Event\ManagerInterface + * @var \Magento\Core\Model\Translate */ - protected $_eventManager; + protected $translator; /** - * @param Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\View\DesignInterface $design - * @param \Magento\Event\ManagerInterface $eventManager + * @param \Magento\Core\Model\Translate $translator */ public function __construct( - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\View\DesignInterface $design, - \Magento\Event\ManagerInterface $eventManager + \Magento\Core\Model\Translate $translator ) { - $this->_eventManager = $eventManager; + $this->translator = $translator; + $this->_design = $design; parent::__construct($context); } @@ -72,7 +73,7 @@ class Translate extends \Magento\Core\Helper\AbstractHelper $this->_design->setArea($area); } - $this->_translator->processAjaxPost($translate); + $this->translator->processAjaxPost($translate); $result = $returnType == 'json' ? "{success:true}" : true; } catch (\Exception $e) { $result = $returnType == 'json' ? "{error:true,message:'" . $e->getMessage() . "'}" : false; @@ -88,16 +89,16 @@ class Translate extends \Magento\Core\Helper\AbstractHelper */ public function initTranslate($localeCode, $forceReload) { - $this->_translator->setLocale($localeCode); + $this->translator->setLocale($localeCode); $dispatchResult = new \Magento\Object(array( 'inline_type' => null )); $this->_eventManager->dispatch('translate_initialization_before', array( - 'translate_object' => $this->_translator, + 'translate_object' => $this->translator, 'result' => $dispatchResult )); - $this->_translator->init(null, $dispatchResult, $forceReload); + $this->translator->init(null, $dispatchResult, $forceReload); return $this; } } diff --git a/app/code/Magento/Core/Helper/Url.php b/app/code/Magento/Core/Helper/Url.php index 3e69656fcec6a2a6dbf23f5a32aa90ab0fa774f3..14b93e86b45640ee3f383ea7109b810f1a246702 100644 --- a/app/code/Magento/Core/Helper/Url.php +++ b/app/code/Magento/Core/Helper/Url.php @@ -33,7 +33,7 @@ */ namespace Magento\Core\Helper; -class Url extends \Magento\Core\Helper\AbstractHelper +class Url extends \Magento\App\Helper\AbstractHelper { /** * @var \Magento\Core\Model\StoreManagerInterface @@ -41,11 +41,11 @@ class Url extends \Magento\Core\Helper\AbstractHelper protected $_storeManager; /** - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\StoreManagerInterface $storeManager */ public function __construct( - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Core\Model\StoreManagerInterface $storeManager ) { parent::__construct($context); diff --git a/app/code/Magento/Core/Helper/Url/Rewrite.php b/app/code/Magento/Core/Helper/Url/Rewrite.php index 00c1966b6f85ef3b199496108b2f080e1f3e3337..f15ea59fe20d3b9825bb0eabf9c862bd59b3566c 100644 --- a/app/code/Magento/Core/Helper/Url/Rewrite.php +++ b/app/code/Magento/Core/Helper/Url/Rewrite.php @@ -33,7 +33,7 @@ */ namespace Magento\Core\Helper\Url; -class Rewrite extends \Magento\Core\Helper\AbstractHelper +class Rewrite extends \Magento\App\Helper\AbstractHelper { /** * Validation error constants @@ -47,11 +47,11 @@ class Rewrite extends \Magento\Core\Helper\AbstractHelper protected $_urlrewrite; /** - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\Source\Urlrewrite\Options $urlrewrite */ public function __construct( - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Core\Model\Source\Urlrewrite\Options $urlrewrite ) { parent::__construct($context); diff --git a/app/code/Magento/Core/Model/AbstractModel.php b/app/code/Magento/Core/Model/AbstractModel.php index ea2283b27511934ea4e807f395341e943f0185f3..87b274e927afb6c13edb8ca2edb4ee876f329fb5 100644 --- a/app/code/Magento/Core/Model/AbstractModel.php +++ b/app/code/Magento/Core/Model/AbstractModel.php @@ -114,7 +114,7 @@ abstract class AbstractModel extends \Magento\Object * * @var \Magento\Event\ManagerInterface */ - protected $_eventDispatcher; + protected $_eventManager; /** * Application Cache Manager @@ -133,6 +133,11 @@ abstract class AbstractModel extends \Magento\Object */ protected $_logger; + /** + * @var \Magento\App\State + */ + protected $_appState; + /** * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry @@ -148,11 +153,12 @@ abstract class AbstractModel extends \Magento\Object array $data = array() ) { $this->_coreRegistry = $registry; - $this->_eventDispatcher = $context->getEventDispatcher(); + $this->_eventManager = $context->getEventDispatcher(); $this->_cacheManager = $context->getCacheManager(); $this->_resource = $resource; $this->_resourceCollection = $resourceCollection; $this->_logger = $context->getLogger(); + $this->_appState = $context->getAppState(); if (method_exists($this->_resource, 'getIdFieldName') || $this->_resource instanceof \Magento\Object) { $this->_idFieldName = $this->_getResource()->getIdFieldName(); @@ -187,7 +193,7 @@ abstract class AbstractModel extends \Magento\Object public function __sleep() { $properties = array_keys(get_object_vars($this)); - $properties = array_diff($properties, array('_eventDispatcher', '_cacheManager', '_coreRegistry')); + $properties = array_diff($properties, array('_eventManager', '_cacheManager', '_coreRegistry')); return $properties; } @@ -197,7 +203,7 @@ abstract class AbstractModel extends \Magento\Object public function __wakeup() { $objectManager = \Magento\App\ObjectManager::getInstance(); - $this->_eventDispatcher = $objectManager->get('Magento\Event\ManagerInterface'); + $this->_eventManager = $objectManager->get('Magento\Event\ManagerInterface'); $this->_cacheManager = $objectManager->get('Magento\App\CacheInterface'); $this->_coreRegistry = $objectManager->get('Magento\Core\Model\Registry'); } @@ -260,7 +266,7 @@ abstract class AbstractModel extends \Magento\Object return $this->_resourceCollection ? clone $this->_resourceCollection : \Magento\App\ObjectManager::getInstance()->create( - $this->_collectionName, array('resource' => $this->_getResource()) + $this->_collectionName ); } @@ -314,9 +320,9 @@ abstract class AbstractModel extends \Magento\Object protected function _beforeLoad($modelId, $field = null) { $params = array('object' => $this, 'field' => $field, 'value' => $modelId); - $this->_eventDispatcher->dispatch('model_load_before', $params); + $this->_eventManager->dispatch('model_load_before', $params); $params = array_merge($params, $this->_getEventData()); - $this->_eventDispatcher->dispatch($this->_eventPrefix . '_load_before', $params); + $this->_eventManager->dispatch($this->_eventPrefix . '_load_before', $params); return $this; } @@ -327,8 +333,8 @@ abstract class AbstractModel extends \Magento\Object */ protected function _afterLoad() { - $this->_eventDispatcher->dispatch('model_load_after', array('object' => $this)); - $this->_eventDispatcher->dispatch($this->_eventPrefix . '_load_after', $this->_getEventData()); + $this->_eventManager->dispatch('model_load_after', array('object' => $this)); + $this->_eventManager->dispatch($this->_eventPrefix . '_load_after', $this->_getEventData()); return $this; } @@ -399,8 +405,8 @@ abstract class AbstractModel extends \Magento\Object */ public function afterCommitCallback() { - $this->_eventDispatcher->dispatch('model_save_commit_after', array('object' => $this)); - $this->_eventDispatcher->dispatch($this->_eventPrefix . '_save_commit_after', $this->_getEventData()); + $this->_eventManager->dispatch('model_save_commit_after', array('object' => $this)); + $this->_eventManager->dispatch($this->_eventPrefix . '_save_commit_after', $this->_getEventData()); return $this; } @@ -434,8 +440,8 @@ abstract class AbstractModel extends \Magento\Object if (!$this->getId()) { $this->isObjectNew(true); } - $this->_eventDispatcher->dispatch('model_save_before', array('object' => $this)); - $this->_eventDispatcher->dispatch($this->_eventPrefix . '_save_before', $this->_getEventData()); + $this->_eventManager->dispatch('model_save_before', array('object' => $this)); + $this->_eventManager->dispatch($this->_eventPrefix . '_save_before', $this->_getEventData()); return $this; } @@ -452,7 +458,7 @@ abstract class AbstractModel extends \Magento\Object $errors = $validator->getMessages(); $exception = new \Magento\Core\Exception(implode(PHP_EOL, $errors)); foreach ($errors as $errorMessage) { - $exception->addMessage(new \Magento\Core\Model\Message\Error($errorMessage)); + $exception->addMessage(new \Magento\Message\Error($errorMessage)); } throw $exception; } @@ -580,8 +586,8 @@ abstract class AbstractModel extends \Magento\Object protected function _afterSave() { $this->cleanModelCache(); - $this->_eventDispatcher->dispatch('model_save_after', array('object' => $this)); - $this->_eventDispatcher->dispatch($this->_eventPrefix . '_save_after', $this->_getEventData()); + $this->_eventManager->dispatch('model_save_after', array('object' => $this)); + $this->_eventManager->dispatch($this->_eventPrefix . '_save_after', $this->_getEventData()); return $this; } @@ -615,8 +621,8 @@ abstract class AbstractModel extends \Magento\Object */ protected function _beforeDelete() { - $this->_eventDispatcher->dispatch('model_delete_before', array('object' => $this)); - $this->_eventDispatcher->dispatch($this->_eventPrefix . '_delete_before', $this->_getEventData()); + $this->_eventManager->dispatch('model_delete_before', array('object' => $this)); + $this->_eventManager->dispatch($this->_eventPrefix . '_delete_before', $this->_getEventData()); $this->cleanModelCache(); return $this; } @@ -646,8 +652,8 @@ abstract class AbstractModel extends \Magento\Object */ protected function _afterDelete() { - $this->_eventDispatcher->dispatch('model_delete_after', array('object' => $this)); - $this->_eventDispatcher->dispatch($this->_eventPrefix . '_delete_after', $this->_getEventData()); + $this->_eventManager->dispatch('model_delete_after', array('object' => $this)); + $this->_eventManager->dispatch($this->_eventPrefix . '_delete_after', $this->_getEventData()); return $this; } @@ -658,8 +664,8 @@ abstract class AbstractModel extends \Magento\Object */ protected function _afterDeleteCommit() { - $this->_eventDispatcher->dispatch('model_delete_commit_after', array('object' => $this)); - $this->_eventDispatcher->dispatch($this->_eventPrefix . '_delete_commit_after', $this->_getEventData()); + $this->_eventManager->dispatch('model_delete_commit_after', array('object' => $this)); + $this->_eventManager->dispatch($this->_eventPrefix . '_delete_commit_after', $this->_getEventData()); return $this; } @@ -691,7 +697,7 @@ abstract class AbstractModel extends \Magento\Object final public function clearInstance() { $this->_clearReferences(); - $this->_eventDispatcher->dispatch($this->_eventPrefix . '_clear', $this->_getEventData()); + $this->_eventManager->dispatch($this->_eventPrefix . '_clear', $this->_getEventData()); $this->_clearData(); return $this; } diff --git a/app/code/Magento/Core/Model/App.php b/app/code/Magento/Core/Model/App.php index 3b56af02c0084c3bd0ff43395e46019fab8956a9..19ea96827e36b65d1f5ad757bdd2b69773d77350 100644 --- a/app/code/Magento/Core/Model/App.php +++ b/app/code/Magento/Core/Model/App.php @@ -53,7 +53,7 @@ class App implements \Magento\Core\Model\AppInterface /** * Magento version */ - const VERSION = '2.0.0.0-dev52'; + const VERSION = '2.0.0.0-dev53'; /** @@ -553,7 +553,7 @@ class App implements \Magento\Core\Model\AppInterface * * @param bool $value * - * @deprecated use \Magento\Core\Model\StoreManager::setIsSingleStoreModeAllowed() + * @deprecated use \Magento\Core\Model\StoreManagerInterface::setIsSingleStoreModeAllowed() */ public function setIsSingleStoreModeAllowed($value) { @@ -565,7 +565,7 @@ class App implements \Magento\Core\Model\AppInterface * * @return bool * - * @deprecated use \Magento\Core\Model\StoreManager::hasSingleStore() + * @deprecated use \Magento\Core\Model\StoreManagerInterface::hasSingleStore() */ public function hasSingleStore() { @@ -577,7 +577,7 @@ class App implements \Magento\Core\Model\AppInterface * * @return bool * - * @deprecated use \Magento\Core\Model\StoreManager::isSingleStoreMode() + * @deprecated use \Magento\Core\Model\StoreManagerInterface::isSingleStoreMode() */ public function isSingleStoreMode() { @@ -587,7 +587,7 @@ class App implements \Magento\Core\Model\AppInterface /** * @throws \Magento\Core\Model\Store\Exception * - * @deprecated use \Magento\Core\Model\StoreManager::throwStoreException() + * @deprecated use \Magento\Core\Model\StoreManagerInterface::throwStoreException() */ public function throwStoreException() { @@ -601,7 +601,7 @@ class App implements \Magento\Core\Model\AppInterface * @return \Magento\Core\Model\Store * @throws \Magento\Core\Model\Store\Exception * - * @deprecated use \Magento\Core\Model\StoreManager::getStore() + * @deprecated use \Magento\Core\Model\StoreManagerInterface::getStore() */ public function getStore($storeId = null) { @@ -615,7 +615,7 @@ class App implements \Magento\Core\Model\AppInterface * @param bool $codeKey * @return \Magento\Core\Model\Store[] * - * @deprecated use \Magento\Core\Model\StoreManager::getStores() + * @deprecated use \Magento\Core\Model\StoreManagerInterface::getStores() */ public function getStores($withDefault = false, $codeKey = false) { @@ -629,7 +629,7 @@ class App implements \Magento\Core\Model\AppInterface * @return \Magento\Core\Model\Website * @throws \Magento\Core\Exception * - * @deprecated use \Magento\Core\Model\StoreManager::getWebsite() + * @deprecated use \Magento\Core\Model\StoreManagerInterface::getWebsite() */ public function getWebsite($websiteId = null) { @@ -643,7 +643,7 @@ class App implements \Magento\Core\Model\AppInterface * @param bool|string $codeKey * @return \Magento\Core\Model\Website[] * - * @deprecated use \Magento\Core\Model\StoreManager::getWebsites() + * @deprecated use \Magento\Core\Model\StoreManagerInterface::getWebsites() */ public function getWebsites($withDefault = false, $codeKey = false) { @@ -653,7 +653,7 @@ class App implements \Magento\Core\Model\AppInterface /** * Reinitialize store list * - * @deprecated use \Magento\Core\Model\StoreManager::reinitStores() + * @deprecated use \Magento\Core\Model\StoreManagerInterface::reinitStores() */ public function reinitStores() { @@ -665,7 +665,7 @@ class App implements \Magento\Core\Model\AppInterface * * @param string $store * - * @deprecated use \Magento\Core\Model\StoreManager::setCurrentStore() + * @deprecated use \Magento\Core\Model\StoreManagerInterface::setCurrentStore() */ public function setCurrentStore($store) { @@ -677,7 +677,7 @@ class App implements \Magento\Core\Model\AppInterface * * @return string * - * @deprecated use \Magento\Core\Model\StoreManager::getCurrentStore() + * @deprecated use \Magento\Core\Model\StoreManagerInterface::getCurrentStore() */ public function getCurrentStore() { @@ -690,7 +690,7 @@ class App implements \Magento\Core\Model\AppInterface * * @return \Magento\Core\Model\Store * - * @deprecated use \Magento\Core\Model\StoreManager::getDefaultStoreView() + * @deprecated use \Magento\Core\Model\StoreManagerInterface::getDefaultStoreView() */ public function getDefaultStoreView() { @@ -704,7 +704,7 @@ class App implements \Magento\Core\Model\AppInterface * @return \Magento\Core\Model\Store\Group * @throws \Magento\Core\Exception * - * @deprecated use \Magento\Core\Model\StoreManager::getGroup() + * @deprecated use \Magento\Core\Model\StoreManagerInterface::getGroup() */ public function getGroup($groupId = null) { @@ -720,7 +720,7 @@ class App implements \Magento\Core\Model\AppInterface * @param bool $codeKey * @return \Magento\Core\Model\Store\Group[] * - * @deprecated use \Magento\Core\Model\StoreManager::getGroups() + * @deprecated use \Magento\Core\Model\StoreManagerInterface::getGroups() */ public function getGroups($withDefault = false, $codeKey = false) { @@ -732,7 +732,7 @@ class App implements \Magento\Core\Model\AppInterface * * @param null|bool|int|string|\Magento\Core\Model\Website $websiteId * - * @deprecated use \Magento\Core\Model\StoreManager::clearWebsiteCache() + * @deprecated use \Magento\Core\Model\StoreManagerInterface::clearWebsiteCache() */ public function clearWebsiteCache($websiteId = null) { @@ -744,7 +744,7 @@ class App implements \Magento\Core\Model\AppInterface * * @return \Magento\Core\Model\Store|null * - * @deprecated use \Magento\Core\Model\StoreManager::getAnyStoreView() + * @deprecated use \Magento\Core\Model\StoreManagerInterface::getAnyStoreView() */ public function getAnyStoreView() { @@ -801,7 +801,7 @@ class App implements \Magento\Core\Model\AppInterface 'revision' => '0', 'patch' => '0', 'stability' => 'dev', - 'number' => '52', + 'number' => '53', ); } } diff --git a/app/code/Magento/Core/Model/App/Area.php b/app/code/Magento/Core/Model/App/Area.php index ef449a77f93d97010a86c8f61b5dfe61870f8ef1..26e92f0151ab8faa1ade13cae61b34a0090b1149 100644 --- a/app/code/Magento/Core/Model/App/Area.php +++ b/app/code/Magento/Core/Model/App/Area.php @@ -114,7 +114,7 @@ class Area protected $_design; /** - * @var \Magento\Core\Model\StoreManager + * @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; @@ -127,7 +127,7 @@ class Area * @param \Magento\App\ObjectManager\ConfigLoader $diConfigLoader * @param \Magento\Core\Model\Store\Config $coreStoreConfig * @param \Magento\Core\Model\Design $design - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param string $areaCode */ public function __construct( @@ -139,7 +139,7 @@ class Area \Magento\App\ObjectManager\ConfigLoader $diConfigLoader, \Magento\Core\Model\Store\Config $coreStoreConfig, \Magento\Core\Model\Design $design, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, $areaCode ) { $this->_coreStoreConfig = $coreStoreConfig; diff --git a/app/code/Magento/Core/Model/App/Emulation.php b/app/code/Magento/Core/Model/App/Emulation.php index a14b17193761f873b03a93bb6f93964daf2f2416..c623c2e632b0f35e4340c70c5507e973e61359c3 100644 --- a/app/code/Magento/Core/Model/App/Emulation.php +++ b/app/code/Magento/Core/Model/App/Emulation.php @@ -41,7 +41,7 @@ class Emulation extends \Magento\Object protected $_app; /** - * @var \Magento\Core\Model\StoreManager + * @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; @@ -74,7 +74,7 @@ class Emulation extends \Magento\Object /** * @param \Magento\Core\Model\App $app - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\View\DesignInterface $viewDesign * @param \Magento\Core\Model\Design $design * @param \Magento\Core\Model\Translate $translate @@ -85,7 +85,7 @@ class Emulation extends \Magento\Object */ public function __construct( \Magento\Core\Model\App $app, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\View\DesignInterface $viewDesign, \Magento\Core\Model\Design $design, \Magento\Core\Model\Translate $translate, diff --git a/app/code/Magento/Core/Model/Calculator.php b/app/code/Magento/Core/Model/Calculator.php index 84c34500d535a6ddd66a7b7db99c4417a60b2e79..c508aee1f68011e00eaa3d2b4f9da8f2b89661bc 100644 --- a/app/code/Magento/Core/Model/Calculator.php +++ b/app/code/Magento/Core/Model/Calculator.php @@ -54,9 +54,9 @@ class Calculator * Initialize calculator * * @param \Magento\Core\Model\Store|int $store - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager */ - public function __construct($store, \Magento\Core\Model\StoreManager $storeManager) + public function __construct($store, \Magento\Core\Model\StoreManagerInterface $storeManager) { if (!($store instanceof \Magento\Core\Model\Store)) { $store = $storeManager->getStore($store); diff --git a/app/code/Magento/Core/Model/Context.php b/app/code/Magento/Core/Model/Context.php index 53d13a63eecc3a8d4daf8d32536dca6eeeb9c58d..e33bca05e775d347df94d527a582a18e0964f945 100644 --- a/app/code/Magento/Core/Model/Context.php +++ b/app/code/Magento/Core/Model/Context.php @@ -97,12 +97,4 @@ class Context implements \Magento\ObjectManager\ContextInterface { return $this->_appState; } - - /** - * @return \Magento\Core\Model\StoreManager - */ - public function getStoreManager() - { - return $this->_storeManager; - } } diff --git a/app/code/Magento/Core/Model/Cookie.php b/app/code/Magento/Core/Model/Cookie.php index b7a2ec5e4eacbe1fb1fa37e953ff2ff0867ea4a1..aab242c83139ccf89f165745d78bcbb250ff76d0 100644 --- a/app/code/Magento/Core/Model/Cookie.php +++ b/app/code/Magento/Core/Model/Cookie.php @@ -51,7 +51,7 @@ class Cookie protected $_store; /** - * @var \Magento\Core\Model\StoreManager + * @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; @@ -82,7 +82,7 @@ class Cookie \Magento\App\RequestInterface $request, \Magento\App\ResponseInterface $response, \Magento\Core\Model\Store\Config $coreStoreConfig, - \Magento\Core\Model\StoreManager $storeManager + \Magento\Core\Model\StoreManagerInterface $storeManager ) { $this->_httpRequest = $request; $this->_httpResponse = $response; diff --git a/app/code/Magento/Core/Model/Date.php b/app/code/Magento/Core/Model/Date.php index 1933ef6a2d879fbdb7235366d57a976fe2ff67cb..1fa213c9d1ed96fdfdebcada8f6fd9fa54ee104d 100644 --- a/app/code/Magento/Core/Model/Date.php +++ b/app/code/Magento/Core/Model/Date.php @@ -45,13 +45,10 @@ class Date protected $_locale; /** - * Init offset - * + * @param LocaleInterface $locale */ - public function __construct( - \Magento\Core\Model\StoreManager $storeManager, - \Magento\Core\Model\LocaleInterface $locale - ) { + public function __construct(\Magento\Core\Model\LocaleInterface $locale) + { $this->_locale = $locale; $this->_offset = $this->calculateOffset($locale->getConfigTimezone()); } diff --git a/app/code/Magento/Core/Model/Design/Backend/Exceptions.php b/app/code/Magento/Core/Model/Design/Backend/Exceptions.php index b6b02d75145e9630e8c3fe478e425ca003da860a..992e8176e17f85be971b8b3eae2dcfc549259aba 100644 --- a/app/code/Magento/Core/Model/Design/Backend/Exceptions.php +++ b/app/code/Magento/Core/Model/Design/Backend/Exceptions.php @@ -39,7 +39,7 @@ class Exceptions extends \Magento\Backend\Model\Config\Backend\Serialized\ArrayS * @param \Magento\View\DesignInterface $design * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Config $config * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection @@ -49,7 +49,7 @@ class Exceptions extends \Magento\Backend\Model\Config\Backend\Serialized\ArrayS \Magento\View\DesignInterface $design, \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Config $config, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, diff --git a/app/code/Magento/Core/Model/Design/Backend/Theme.php b/app/code/Magento/Core/Model/Design/Backend/Theme.php index 679e4a723c0d0278b05862d08197cc9ca00ca197..9882c87a439c6e787c2fd60e55845f982855d397 100644 --- a/app/code/Magento/Core/Model/Design/Backend/Theme.php +++ b/app/code/Magento/Core/Model/Design/Backend/Theme.php @@ -39,7 +39,7 @@ class Theme extends \Magento\Core\Model\Config\Value * @param \Magento\View\DesignInterface $design * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Config $config * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection @@ -49,7 +49,7 @@ class Theme extends \Magento\Core\Model\Config\Value \Magento\View\DesignInterface $design, \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Config $config, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, diff --git a/app/code/Magento/Core/Model/DesignLoader.php b/app/code/Magento/Core/Model/DesignLoader.php new file mode 100644 index 0000000000000000000000000000000000000000..544feee4e8a7292d6fbea281e915625fec069098 --- /dev/null +++ b/app/code/Magento/Core/Model/DesignLoader.php @@ -0,0 +1,69 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Core\Model; + +class DesignLoader +{ + /** + * @var \Magento\App\RequestInterface + */ + protected $_request; + + /** + * @var \Magento\Core\Model\App + */ + protected $_app; + + /** + * @var \Magento\View\LayoutInterface + */ + protected $_layout; + + /** + * @param \Magento\App\RequestInterface $request + * @param \Magento\Core\Model\App $app + * @param \Magento\View\LayoutInterface $layout + */ + public function __construct( + \Magento\App\RequestInterface $request, + \Magento\Core\Model\App $app, + \Magento\View\LayoutInterface $layout + ) { + $this->_request = $request; + $this->_app = $app; + $this->_layout = $layout; + } + + /** + * Load design + */ + public function load() + { + $area = $this->_app->getArea($this->_layout->getArea()); + $area->load(\Magento\Core\Model\App\Area::PART_DESIGN); + $area->load(\Magento\Core\Model\App\Area::PART_TRANSLATE); + $area->detectDesign($this->_request); + } +} \ No newline at end of file diff --git a/app/code/Magento/Core/Model/Email.php b/app/code/Magento/Core/Model/Email.php deleted file mode 100644 index bbad0794757d6fa0f2a04272570f6c99ef3f46b1..0000000000000000000000000000000000000000 --- a/app/code/Magento/Core/Model/Email.php +++ /dev/null @@ -1,146 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * 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_Core - * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - - -/** - * Possible data fields: - * - * - subject - * - to - * - from - * - body - * - template (file name) - * - module (for template) - * - */ -namespace Magento\Core\Model; - -class Email extends \Magento\Object -{ - protected $_tplVars = array(); - protected $_block; - - /** - * Core store config - * - * @var \Magento\Core\Model\Store\Config - */ - protected $_coreStoreConfig; - - /** - * Layout factory - * - * @var \Magento\View\LayoutFactory - */ - protected $_layoutFactory; - - /** - * @param Store\Config $coreStoreConfig - * @param \Magento\View\LayoutFactory $layoutFactory - * @param array $data - */ - public function __construct( - \Magento\Core\Model\Store\Config $coreStoreConfig, - \Magento\View\LayoutFactory $layoutFactory, - array $data = array() - ) { - $this->_layoutFactory = $layoutFactory; - $this->_coreStoreConfig = $coreStoreConfig; - // TODO: move to config - $this->setFromName('Magento'); - $this->setFromEmail('magento@varien.com'); - $this->setType('text'); - parent::__construct($data); - } - - public function setTemplateVar($var, $value = null) - { - if (is_array($var)) { - foreach ($var as $index=>$value) { - $this->_tplVars[$index] = $value; - } - } - else { - $this->_tplVars[$var] = $value; - } - return $this; - } - - public function getTemplateVars() - { - return $this->_tplVars; - } - - public function getBody() - { - $body = $this->getData('body'); - if (empty($body) && $this->getTemplate()) { - $this->_block = $this->_layoutFactory->create()->createBlock('Magento\Core\Block\Template', 'email') - ->setArea(\Magento\Core\Model\App\Area::AREA_FRONTEND) - ->setTemplate($this->getTemplate()); - foreach ($this->getTemplateVars() as $var=>$value) { - $this->_block->assign($var, $value); - } - $this->_block->assign('_type', strtolower($this->getType())) - ->assign('_section', 'body'); - $body = $this->_block->toHtml(); - } - return $body; - } - - public function getSubject() - { - $subject = $this->getData('subject'); - if (empty($subject) && $this->_block) { - $this->_block->assign('_section', 'subject'); - $subject = $this->_block->toHtml(); - } - return $subject; - } - - public function send() - { - if ($this->_coreStoreConfig->getConfigFlag('system/smtp/disable')) { - return $this; - } - - $mail = new \Zend_Mail(); - - if (strtolower($this->getType()) == 'html') { - $mail->setBodyHtml($this->getBody()); - } - else { - $mail->setBodyText($this->getBody()); - } - - $mail->setFrom($this->getFromEmail(), $this->getFromName()) - ->addTo($this->getToEmail(), $this->getToName()) - ->setSubject($this->getSubject()); - $mail->send(); - - return $this; - } -} diff --git a/app/code/Magento/Core/Model/File/Storage/Database.php b/app/code/Magento/Core/Model/File/Storage/Database.php index e09cb3746361b4587fcb84f369098c95ceb05082..15a50465b3803f3b4d1af8ce6b6543649d79eb5e 100644 --- a/app/code/Magento/Core/Model/File/Storage/Database.php +++ b/app/code/Magento/Core/Model/File/Storage/Database.php @@ -52,11 +52,6 @@ class Database extends \Magento\Core\Model\File\Storage\Database\AbstractDatabas */ protected $_errors = array(); - /** - * @var \Magento\Logger - */ - protected $_logger; - /** * @var \Magento\Core\Model\File\Storage\Directory\DatabaseFactory */ @@ -70,7 +65,6 @@ class Database extends \Magento\Core\Model\File\Storage\Database\AbstractDatabas /** * Class constructor * - * @param \Magento\Logger $logger * @param \Magento\Core\Helper\File\Storage\Database $coreFileStorageDb * @param \Magento\Core\Helper\File\Media $mediaHelper * @param \Magento\Core\Model\Context $context @@ -84,7 +78,6 @@ class Database extends \Magento\Core\Model\File\Storage\Database\AbstractDatabas * @param array $data */ public function __construct( - \Magento\Logger $logger, \Magento\Core\Helper\File\Storage\Database $coreFileStorageDb, \Magento\Core\Helper\File\Media $mediaHelper, \Magento\Core\Model\Context $context, @@ -98,7 +91,6 @@ class Database extends \Magento\Core\Model\File\Storage\Database\AbstractDatabas array $data = array() ) { $this->_directoryFactory = $directoryFactory; - $this->_logger = $logger; $this->_mediaHelper = $mediaHelper; parent::__construct( $coreFileStorageDb, diff --git a/app/code/Magento/Core/Model/Input/Filter.php b/app/code/Magento/Core/Model/Input/Filter.php index 6304f4b4883141737af39f430dad20b8eb0e143a..f4a3052d3c8ff732a6160d93ebacf7e7453e83b6 100644 --- a/app/code/Magento/Core/Model/Input/Filter.php +++ b/app/code/Magento/Core/Model/Input/Filter.php @@ -101,7 +101,7 @@ namespace Magento\Core\Model\Input; class Filter implements \Zend_Filter_Interface { /** - * @var \Magento\Core\Model\Factory\Helper + * @var \Magento\App\Helper\HelperFactory */ protected $_helperFactory; @@ -111,11 +111,11 @@ class Filter implements \Zend_Filter_Interface protected $_objectManager; /** - * @param \Magento\Core\Model\Factory\Helper $helperFactory + * @param \Magento\App\Helper\HelperFactory $helperFactory * @param \Magento\ObjectManager $objectManager */ function __construct( - \Magento\Core\Model\Factory\Helper $helperFactory, + \Magento\App\Helper\HelperFactory $helperFactory, \Magento\ObjectManager $objectManager ) { $this->_helperFactory = $helperFactory; @@ -270,11 +270,11 @@ class Filter implements \Zend_Filter_Interface * Call specified helper method for $value filtration * * @param mixed $value - * @param \Magento\Core\Helper\AbstractHelper $helper + * @param \Magento\App\Helper\AbstractHelper $helper * @param array $filterData * @return mixed */ - protected function _applyFiltrationWithHelper($value, \Magento\Core\Helper\AbstractHelper $helper, array $filterData) + protected function _applyFiltrationWithHelper($value, \Magento\App\Helper\AbstractHelper $helper, array $filterData) { if (!isset($filterData['method']) || empty($filterData['method'])) { throw new \Exception("Helper filtration method is not set"); @@ -292,7 +292,7 @@ class Filter implements \Zend_Filter_Interface * Try to create Magento helper for filtration based on $filterData. Return false on failure * * @param $filterData - * @return bool|\Magento\Core\Helper\AbstractHelper + * @return bool|\Magento\App\Helper\AbstractHelper * @throws \Exception */ protected function _getFiltrationHelper($filterData) @@ -302,7 +302,7 @@ class Filter implements \Zend_Filter_Interface $helper = $filterData['helper']; if (is_string($helper)) { $helper = $this->_helperFactory->get($helper); - } elseif (!($helper instanceof \Magento\Core\Helper\AbstractHelper)) { + } elseif (!($helper instanceof \Magento\App\Helper\AbstractHelper)) { throw new \Exception("Filter '{$helper}' not found"); } } diff --git a/app/code/Magento/Core/Model/Layout.php b/app/code/Magento/Core/Model/Layout.php index 82dc52564df0ae595c8ed7b8944d1310e15f1c8b..c5eddc4c0a28df159e5d9e1107772340514ab4f0 100644 --- a/app/code/Magento/Core/Model/Layout.php +++ b/app/code/Magento/Core/Model/Layout.php @@ -205,7 +205,7 @@ class Layout extends \Magento\Simplexml\Config implements \Magento\View\LayoutIn /** * Core data * - * @var \Magento\Core\Model\Factory\Helper + * @var \Magento\App\Helper\HelperFactory */ protected $_factoryHelper = null; @@ -243,12 +243,17 @@ class Layout extends \Magento\Simplexml\Config implements \Magento\View\LayoutIn */ protected $_appState; + /** + * @var \Magento\ObjectManager + */ + protected $_objectManager; + /** * @param \Magento\View\Layout\ProcessorFactory $processorFactory * @param Resource\Theme\CollectionFactory $themeFactory * @param \Magento\Logger $logger * @param \Magento\Event\ManagerInterface $eventManager - * @param Factory\Helper $factoryHelper + * @param \Magento\App\Helper\HelperFactory $factoryHelper * @param \Magento\Core\Helper\Data $coreData * @param \Magento\View\DesignInterface $design * @param BlockFactory $blockFactory @@ -258,6 +263,7 @@ class Layout extends \Magento\Simplexml\Config implements \Magento\View\LayoutIn * @param DataService\Graph $dataServiceGraph * @param Store\Config $coreStoreConfig * @param \Magento\App\State $appState + * @param \Magento\ObjectManager $objectManager * @param string $area */ public function __construct( @@ -265,7 +271,7 @@ class Layout extends \Magento\Simplexml\Config implements \Magento\View\LayoutIn \Magento\Core\Model\Resource\Theme\CollectionFactory $themeFactory, \Magento\Logger $logger, \Magento\Event\ManagerInterface $eventManager, - \Magento\Core\Model\Factory\Helper $factoryHelper, + \Magento\App\Helper\HelperFactory $factoryHelper, \Magento\Core\Helper\Data $coreData, \Magento\View\DesignInterface $design, \Magento\View\Element\BlockFactory $blockFactory, @@ -275,6 +281,7 @@ class Layout extends \Magento\Simplexml\Config implements \Magento\View\LayoutIn \Magento\Core\Model\DataService\Graph $dataServiceGraph, \Magento\Core\Model\Store\Config $coreStoreConfig, \Magento\App\State $appState, + \Magento\ObjectManager $objectManager, $area = \Magento\View\DesignInterface::DEFAULT_AREA ) { $this->_eventManager = $eventManager; @@ -295,6 +302,7 @@ class Layout extends \Magento\Simplexml\Config implements \Magento\View\LayoutIn $this->_processorFactory = $processorFactory; $this->themeFactory = $themeFactory; $this->_logger = $logger; + $this->_objectManager = $objectManager; } /** @@ -869,7 +877,7 @@ class Layout extends \Magento\Simplexml\Config implements \Magento\View\LayoutIn * Creates block object based on xml node data and add it to the layout * * @param string $elementName - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock * @throws \Magento\Exception */ protected function _generateBlock($elementName) @@ -902,7 +910,7 @@ class Layout extends \Magento\Simplexml\Config implements \Magento\View\LayoutIn if (!empty($node['template'])) { $templateFileName = (string)$node['template']; - if ($block instanceof \Magento\Core\Block\Template) { + if ($block instanceof \Magento\View\Block\Template) { $block->assign($dictionary); } $block->setTemplate($templateFileName); @@ -994,7 +1002,7 @@ class Layout extends \Magento\Simplexml\Config implements \Magento\View\LayoutIn * * @param string $parentName * @param string $alias - * @return bool|\Magento\Core\Block\AbstractBlock + * @return bool|\Magento\View\Block\AbstractBlock */ public function getChildBlock($parentName, $alias) { @@ -1297,7 +1305,7 @@ class Layout extends \Magento\Simplexml\Config implements \Magento\View\LayoutIn * Save block in blocks registry * * @param string $name - * @param \Magento\Core\Block\AbstractBlock $block + * @param \Magento\View\Block\AbstractBlock $block * @return \Magento\Core\Model\Layout */ public function setBlock($name, $block) @@ -1329,7 +1337,7 @@ class Layout extends \Magento\Simplexml\Config implements \Magento\View\LayoutIn * @param string $type * @param string $name * @param array $attributes - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ public function createBlock($type, $name = '', array $attributes = array()) { @@ -1341,10 +1349,10 @@ class Layout extends \Magento\Simplexml\Config implements \Magento\View\LayoutIn /** * Create block and add to layout * - * @param string|\Magento\Core\Block\AbstractBlock $block + * @param string|\Magento\View\Block\AbstractBlock $block * @param string $name * @param array $attributes - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ protected function _createBlock($block, $name, array $attributes = array()) { @@ -1363,15 +1371,15 @@ class Layout extends \Magento\Simplexml\Config implements \Magento\View\LayoutIn /** * Add a block to registry, create new object if needed * - * @param string|\Magento\Core\Block\AbstractBlock $block + * @param string|\Magento\View\Block\AbstractBlock $block * @param string $name * @param string $parent * @param string $alias - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ public function addBlock($block, $name = '', $parent = '', $alias = '') { - if (empty($name) && $block instanceof \Magento\Core\Block\AbstractBlock) { + if (empty($name) && $block instanceof \Magento\View\Block\AbstractBlock) { $name = $block->getNameInLayout(); } $name = $this->_createStructuralElement( @@ -1426,10 +1434,10 @@ class Layout extends \Magento\Simplexml\Config implements \Magento\View\LayoutIn /** * Create block object instance based on block type * - * @param string|\Magento\Core\Block\AbstractBlock $block + * @param string|\Magento\View\Block\AbstractBlock $block * @param array $attributes * @throws \Magento\Core\Exception - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ protected function _getBlockInstance($block, array $attributes = array()) { @@ -1438,7 +1446,7 @@ class Layout extends \Magento\Simplexml\Config implements \Magento\View\LayoutIn $block = $this->_blockFactory->createBlock($block, $attributes); } } - if (!$block instanceof \Magento\Core\Block\AbstractBlock) { + if (!$block instanceof \Magento\View\Block\AbstractBlock) { throw new \Magento\Core\Exception(__('Invalid block type: %1', $block)); } return $block; @@ -1459,7 +1467,7 @@ class Layout extends \Magento\Simplexml\Config implements \Magento\View\LayoutIn * Get block object by name * * @param string $name - * @return \Magento\Core\Block\AbstractBlock|bool + * @return \Magento\View\Block\AbstractBlock|bool */ public function getBlock($name) { @@ -1539,7 +1547,7 @@ class Layout extends \Magento\Simplexml\Config implements \Magento\View\LayoutIn /** * Retrieve messages block * - * @return \Magento\Core\Block\Messages + * @return \Magento\View\Block\Messages */ public function getMessagesBlock() { @@ -1547,7 +1555,7 @@ class Layout extends \Magento\Simplexml\Config implements \Magento\View\LayoutIn if ($block) { return $block; } - return $this->createBlock('Magento\Core\Block\Messages', 'messages'); + return $this->createBlock('Magento\View\Block\Messages', 'messages'); } /** @@ -1555,7 +1563,7 @@ class Layout extends \Magento\Simplexml\Config implements \Magento\View\LayoutIn * * @param string $type * @throws \Magento\Core\Exception - * @return \Magento\Core\Helper\AbstractHelper + * @return \Magento\App\Helper\AbstractHelper */ public function getBlockSingleton($type) { @@ -1566,7 +1574,7 @@ class Layout extends \Magento\Simplexml\Config implements \Magento\View\LayoutIn $helper = $this->_blockFactory->createBlock($type); if ($helper) { - if ($helper instanceof \Magento\Core\Block\AbstractBlock) { + if ($helper instanceof \Magento\View\Block\AbstractBlock) { $helper->setLayout($this); } $this->_helpers[$type] = $helper; @@ -1646,7 +1654,7 @@ class Layout extends \Magento\Simplexml\Config implements \Magento\View\LayoutIn if (!empty($options['dataServiceName'])) { $dictionary = $this->_dataServiceGraph->get($options['dataServiceName']); } - /** @var $block \Magento\Core\Block\Template */ + /** @var $block \Magento\View\Block\Template */ $block = $this->createBlock($options['type'], '') ->setData($data) ->assign($dictionary) @@ -1656,4 +1664,30 @@ class Layout extends \Magento\Simplexml\Config implements \Magento\View\LayoutIn echo $block->toHtml(); } } + + /** + * Init messages by message storage(s), loading and adding messages to layout messages block + * + * @throws \UnexpectedValueException + * @param string|array $messages + */ + public function initMessages($messages) + { + if (!is_array($messages)) { + $messages = array($messages); + } + foreach ($messages as $storageName) { + $storage = $this->_objectManager->get($storageName); + if ($storage) { + $block = $this->getMessagesBlock(); + $block->addMessages($storage->getMessages(true)); + $block->setEscapeMessageFlag($storage->getEscapeMessages(true)); + $block->addStorageType($storageName); + } else { + throw new \UnexpectedValueException( + __('Invalid messages storage "%1" for layout messages initialization', (string)$storageName) + ); + } + } + } } diff --git a/app/code/Magento/Core/Model/Locale.php b/app/code/Magento/Core/Model/Locale.php index 62850f29a572170bf7f59ec4527ca9cf683372d9..a27a76729a4468caa8822eb725a911207cd7372f 100644 --- a/app/code/Magento/Core/Model/Locale.php +++ b/app/code/Magento/Core/Model/Locale.php @@ -89,7 +89,7 @@ class Locale implements \Magento\Core\Model\LocaleInterface protected $_appState; /** - * @var \Magento\Core\Model\StoreManager + * @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; @@ -128,7 +128,7 @@ class Locale implements \Magento\Core\Model\LocaleInterface * @param \Magento\Core\Helper\Translate $translate * @param \Magento\Core\Model\Store\Config $coreStoreConfig * @param \Magento\App\State $appState - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Locale\Config $config * @param \Magento\Core\Model\App $app * @param \Magento\Stdlib\DateTime $dateTime @@ -140,7 +140,7 @@ class Locale implements \Magento\Core\Model\LocaleInterface \Magento\Core\Helper\Translate $translate, \Magento\Core\Model\Store\Config $coreStoreConfig, \Magento\App\State $appState, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Locale\Config $config, \Magento\Core\Model\App $app, \Magento\Stdlib\DateTime $dateTime, diff --git a/app/code/Magento/Core/Model/Message.php b/app/code/Magento/Core/Model/Message.php deleted file mode 100644 index e827d07833369f6d7af70fbdbbf113c02366e2c2..0000000000000000000000000000000000000000 --- a/app/code/Magento/Core/Model/Message.php +++ /dev/null @@ -1,84 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * 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_Core - * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - -/** - * Message model - * - * @category Magento - * @package Magento_Core - * @author Magento Core Team <core@magentocommerce.com> - */ -namespace Magento\Core\Model; - -class Message -{ - const ERROR = 'error'; - const WARNING = 'warning'; - const NOTICE = 'notice'; - const SUCCESS = 'success'; - - protected function _factory($code, $type, $class='', $method='') - { - switch (strtolower($type)) { - case self::ERROR : - $message = new \Magento\Core\Model\Message\Error($code); - break; - case self::WARNING : - $message = new \Magento\Core\Model\Message\Warning($code); - break; - case self::SUCCESS : - $message = new \Magento\Core\Model\Message\Success($code); - break; - default: - $message = new \Magento\Core\Model\Message\Notice($code); - break; - } - $message->setClass($class); - $message->setMethod($method); - - return $message; - } - - public function error($code, $class='', $method='') - { - return $this->_factory($code, self::ERROR, $class, $method); - } - - public function warning($code, $class='', $method='') - { - return $this->_factory($code, self::WARNING, $class, $method); - } - - public function notice($code, $class='', $method='') - { - return $this->_factory($code, self::NOTICE, $class, $method); - } - - public function success($code, $class='', $method='') - { - return $this->_factory($code, self::SUCCESS, $class, $method); - } -} diff --git a/app/code/Magento/Core/Model/Resource/Translate.php b/app/code/Magento/Core/Model/Resource/Translate.php index e554b91bf26d118e240612affb417bcac3fca429..df19b8e40532035b362b7d9b7340d06d11e1ed04 100644 --- a/app/code/Magento/Core/Model/Resource/Translate.php +++ b/app/code/Magento/Core/Model/Resource/Translate.php @@ -42,19 +42,19 @@ class Translate extends \Magento\Core\Model\Resource\Db\AbstractDb protected $_appState; /** - * @var \Magento\Core\Model\StoreManager + * @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; /** * @param \Magento\App\Resource $resource * @param \Magento\App\State $appState - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager */ public function __construct( \Magento\App\Resource $resource, \Magento\App\State $appState, - \Magento\Core\Model\StoreManager $storeManager + \Magento\Core\Model\StoreManagerInterface $storeManager ) { parent::__construct($resource); $this->_appState = $appState; diff --git a/app/code/Magento/Core/Model/Resource/Translate/String.php b/app/code/Magento/Core/Model/Resource/Translate/String.php index 121c84331ccb1596bbe85fba3c9a085f69a3b7c2..e9a949301c0b761feaa4dcab592018e51f17f052 100644 --- a/app/code/Magento/Core/Model/Resource/Translate/String.php +++ b/app/code/Magento/Core/Model/Resource/Translate/String.php @@ -42,19 +42,19 @@ class String extends \Magento\Core\Model\Resource\Db\AbstractDb protected $_locale; /** - * @var \Magento\Core\Model\StoreManager + * @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; /** * @param \Magento\App\Resource $resource * @param \Magento\Core\Model\LocaleInterface $locale - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager */ public function __construct( \Magento\App\Resource $resource, \Magento\Core\Model\LocaleInterface $locale, - \Magento\Core\Model\StoreManager $storeManager + \Magento\Core\Model\StoreManagerInterface $storeManager ) { parent::__construct($resource); $this->_locale = $locale; diff --git a/app/code/Magento/Core/Model/Resource/Url/Rewrite/Collection.php b/app/code/Magento/Core/Model/Resource/Url/Rewrite/Collection.php index 9f8d128b74554eaa719269c13f75e1f5ac95014b..09ab31792205f83320831bf8a103a5d73f984527 100644 --- a/app/code/Magento/Core/Model/Resource/Url/Rewrite/Collection.php +++ b/app/code/Magento/Core/Model/Resource/Url/Rewrite/Collection.php @@ -37,7 +37,9 @@ namespace Magento\Core\Model\Resource\Url\Rewrite; class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractCollection { /** - * @var \Magento\Core\Model\StoreManager + * Store Manager Model + * + * @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; @@ -46,7 +48,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl * @param \Magento\Logger $logger * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy * @param \Magento\Core\Model\EntityFactory $entityFactory - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Resource\Db\AbstractDb $resource */ public function __construct( @@ -54,7 +56,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl \Magento\Logger $logger, \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, \Magento\Core\Model\EntityFactory $entityFactory, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Resource\Db\AbstractDb $resource = null ) { parent::__construct($eventManager, $logger, $fetchStrategy, $entityFactory, $resource); diff --git a/app/code/Magento/Core/Model/Session.php b/app/code/Magento/Core/Model/Session.php index 7dce363aafc82bf168a56534c664839ad71a4655..459f294c5f4b278a5c412878bc404f1ba4b49af5 100644 --- a/app/code/Magento/Core/Model/Session.php +++ b/app/code/Magento/Core/Model/Session.php @@ -24,6 +24,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\Core\Model; /** * Core session model @@ -34,8 +35,6 @@ * @method \Magento\Core\Model\Session setCookieShouldBeReceived(bool $flag) * @method \Magento\Core\Model\Session unsCookieShouldBeReceived() */ -namespace Magento\Core\Model; - class Session extends \Magento\Core\Model\Session\AbstractSession { /** diff --git a/app/code/Magento/Core/Model/Session/AbstractSession.php b/app/code/Magento/Core/Model/Session/AbstractSession.php index 68190b051df64c19339e2a49c7f9f2121b761682..05afd75a8d840cbdad259538b1406fe8978661cd 100644 --- a/app/code/Magento/Core/Model/Session/AbstractSession.php +++ b/app/code/Magento/Core/Model/Session/AbstractSession.php @@ -101,16 +101,16 @@ class AbstractSession extends \Magento\Object /** * Core message * - * @var \Magento\Core\Model\Message + * @var \Magento\Message\Factory */ - protected $_message; + protected $messageFactory; /** * Core message collection factory * - * @var \Magento\Core\Model\Message\CollectionFactory + * @var \Magento\Message\CollectionFactory */ - protected $_messageFactory; + protected $messagesFactory; /** * @var \Magento\App\RequestInterface @@ -123,7 +123,7 @@ class AbstractSession extends \Magento\Object protected $_appState; /** - * @var \Magento\Core\Model\StoreManager + * @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; @@ -168,8 +168,8 @@ class AbstractSession extends \Magento\Object $this->_saveMethod = $this->_saveMethod ?: $context->getSaveMethod(); $this->_cacheLimiter = $this->_cacheLimiter ?: $context->getCacheLimiter(); $this->_sidNameMap = $context->getSidMap(); - $this->_messageFactory = $context->getMessageFactory(); - $this->_message = $context->getMessage(); + $this->messagesFactory = $context->getMessagesFactory(); + $this->messageFactory = $context->getMessageFactory(); $this->_cookie = $context->getCookie(); $this->_request = $context->getRequest(); $this->_appState = $context->getAppState(); @@ -408,12 +408,12 @@ class AbstractSession extends \Magento\Object * Retrieve messages from session * * @param bool $clear - * @return \Magento\Core\Model\Message\Collection + * @return \Magento\Message\Collection */ public function getMessages($clear = false) { if (!$this->getData('messages')) { - $this->setMessages($this->_messageFactory->create()); + $this->setMessages($this->messagesFactory->create()); } if ($clear) { @@ -442,17 +442,17 @@ class AbstractSession extends \Magento\Object $file = $this->_coreStoreConfig->getConfig(self::XML_PATH_LOG_EXCEPTION_FILE); $this->_logger->logFile($message, \Zend_Log::DEBUG, $file); - $this->addMessage($this->_message->error($alternativeText)); + $this->addMessage($this->messageFactory->error($alternativeText)); return $this; } /** * Adding new message to message collection * - * @param \Magento\Core\Model\Message\AbstractMessage $message + * @param \Magento\Message\AbstractMessage $message * @return \Magento\Core\Model\Session\AbstractSession */ - public function addMessage(\Magento\Core\Model\Message\AbstractMessage $message) + public function addMessage(\Magento\Message\AbstractMessage $message) { $this->getMessages()->add($message); $this->_eventManager->dispatch('core_session_abstract_add_message'); @@ -467,7 +467,7 @@ class AbstractSession extends \Magento\Object */ public function addError($message) { - $this->addMessage($this->_message->error($message)); + $this->addMessage($this->messageFactory->error($message)); return $this; } @@ -479,7 +479,7 @@ class AbstractSession extends \Magento\Object */ public function addWarning($message) { - $this->addMessage($this->_message->warning($message)); + $this->addMessage($this->messageFactory->warning($message)); return $this; } @@ -491,7 +491,7 @@ class AbstractSession extends \Magento\Object */ public function addNotice($message) { - $this->addMessage($this->_message->notice($message)); + $this->addMessage($this->messageFactory->notice($message)); return $this; } @@ -503,7 +503,7 @@ class AbstractSession extends \Magento\Object */ public function addSuccess($message) { - $this->addMessage($this->_message->success($message)); + $this->addMessage($this->messageFactory->success($message)); return $this; } @@ -526,7 +526,7 @@ class AbstractSession extends \Magento\Object /** * Adds messages array to message collection, but doesn't add duplicates to it * - * @param array|string|\Magento\Core\Model\Message\AbstractMessage $messages + * @param array|string|\Magento\Message\AbstractMessage $messages * @return \Magento\Core\Model\Session\AbstractSession */ public function addUniqueMessages($messages) @@ -541,7 +541,7 @@ class AbstractSession extends \Magento\Object $messagesAlready = array(); $items = $this->getMessages()->getItems(); foreach ($items as $item) { - if ($item instanceof \Magento\Core\Model\Message\AbstractMessage) { + if ($item instanceof \Magento\Message\AbstractMessage) { $text = $item->getText(); } else if (is_string($item)) { $text = $item; @@ -552,7 +552,7 @@ class AbstractSession extends \Magento\Object } foreach ($messages as $message) { - if ($message instanceof \Magento\Core\Model\Message\AbstractMessage) { + if ($message instanceof \Magento\Message\AbstractMessage) { $text = $message->getText(); } else if (is_string($message)) { $text = $message; @@ -583,7 +583,9 @@ class AbstractSession extends \Magento\Object { if (null === $id - && ($this->_storeManager->getStore()->isAdmin() || $this->_coreStoreConfig->getConfig(self::XML_PATH_USE_FRONTEND_SID)) + && ($this->_storeManager->getStore()->isAdmin() + || $this->_coreStoreConfig->getConfig(self::XML_PATH_USE_FRONTEND_SID) + ) ) { $_queryParam = $this->getSessionIdQueryParam(); if (isset($_GET[$_queryParam]) && $this->_url->isOwnOriginUrl()) { diff --git a/app/code/Magento/Core/Model/Session/Context.php b/app/code/Magento/Core/Model/Session/Context.php index 8fd753c920421ea9b562e85c7221d993fab3611e..46c0e29f3f24a184fb19884c4c58dcca86ccd62d 100644 --- a/app/code/Magento/Core/Model/Session/Context.php +++ b/app/code/Magento/Core/Model/Session/Context.php @@ -77,18 +77,18 @@ class Context implements \Magento\ObjectManager\ContextInterface protected $_cookie; /** - * Core message + * Core message factory * - * @var \Magento\Core\Model\Message + * @var \Magento\Message\Factory */ - protected $_message; + protected $messageFactory; /** * Core message collection factory * - * @var \Magento\Core\Model\Message\CollectionFactory + * @var \Magento\Message\CollectionFactory */ - protected $_messageFactory; + protected $messagesFactory; /** * @var \Magento\App\RequestInterface @@ -101,7 +101,7 @@ class Context implements \Magento\ObjectManager\ContextInterface protected $_appState; /** - * @var \Magento\Core\Model\StoreManager + * @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; @@ -120,12 +120,12 @@ class Context implements \Magento\ObjectManager\ContextInterface * @param \Magento\Logger $logger * @param \Magento\Event\ManagerInterface $eventManager * @param \Magento\Core\Model\Store\Config $coreStoreConfig - * @param \Magento\Core\Model\Message\CollectionFactory $messageFactory - * @param \Magento\Core\Model\Message $message + * @param \Magento\Message\CollectionFactory $messagesFactory + * @param \Magento\Message\Factory $messageFactory * @param \Magento\Core\Model\Cookie $cookie * @param \Magento\App\RequestInterface $request * @param \Magento\App\State $appState - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\App\Dir $dir * @param \Magento\Core\Model\Url $url * @param $saveMethod @@ -138,12 +138,12 @@ class Context implements \Magento\ObjectManager\ContextInterface \Magento\Logger $logger, \Magento\Event\ManagerInterface $eventManager, \Magento\Core\Model\Store\Config $coreStoreConfig, - \Magento\Core\Model\Message\CollectionFactory $messageFactory, - \Magento\Core\Model\Message $message, + \Magento\Message\CollectionFactory $messagesFactory, + \Magento\Message\Factory $messageFactory, \Magento\Core\Model\Cookie $cookie, \Magento\App\RequestInterface $request, \Magento\App\State $appState, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\App\Dir $dir, \Magento\Core\Model\Url $url, $saveMethod, @@ -159,8 +159,8 @@ class Context implements \Magento\ObjectManager\ContextInterface $this->_savePath = $savePath; $this->_cacheLimiter = $cacheLimiter; $this->sidMap = $sidMap; - $this->_messageFactory = $messageFactory; - $this->_message = $message; + $this->messagesFactory = $messagesFactory; + $this->messageFactory = $messageFactory; $this->_cookie = $cookie; $this->_request = $request; $this->_appState = $appState; @@ -258,19 +258,19 @@ class Context implements \Magento\ObjectManager\ContextInterface } /** - * @return \Magento\Core\Model\Message + * @return \Magento\Message\Factory */ - public function getMessage() + public function getMessageFactory() { - return $this->_message; + return $this->messageFactory; } /** - * @return \Magento\Core\Model\Message\CollectionFactory + * @return \Magento\Message\CollectionFactory */ - public function getMessageFactory() + public function getMessagesFactory() { - return $this->_messageFactory; + return $this->messagesFactory; } /** @@ -282,7 +282,7 @@ class Context implements \Magento\ObjectManager\ContextInterface } /** - * @return \Magento\Core\Model\StoreManager + * @return \Magento\Core\Model\StoreManagerInterface */ public function getStoreManager() { diff --git a/app/code/Magento/Core/Model/Store.php b/app/code/Magento/Core/Model/Store.php index f8b50a4ca6ad3903ffac54c9613163740ed67bdf..18e4bf89fe7f750ed6bb742c5a9876f4f46b3397 100644 --- a/app/code/Magento/Core/Model/Store.php +++ b/app/code/Magento/Core/Model/Store.php @@ -245,11 +245,6 @@ class Store extends \Magento\Core\Model\AbstractModel */ protected $_url; - /** - * @var \Magento\App\State - */ - protected $_appState; - /** * @var bool */ @@ -295,14 +290,13 @@ class Store extends \Magento\Core\Model\AbstractModel * @param \Magento\Core\Model\Registry $registry * @param \Magento\App\Cache\Type\Config $configCacheType * @param \Magento\Core\Model\Url $url - * @param \Magento\App\State $appState * @param \Magento\App\RequestInterface $request * @param \Magento\Core\Model\Resource\Config\Data $configDataResource * @param \Magento\App\Dir $dir * @param \Magento\Core\Model\Store\Config $coreStoreConfig * @param \Magento\Core\Model\Config $coreConfig * @param \Magento\Core\Model\Resource\Store $resource - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Data\Collection\Db $resourceCollection * @param bool $isCustomEntryPoint * @param array $data @@ -313,14 +307,13 @@ class Store extends \Magento\Core\Model\AbstractModel \Magento\Core\Model\Registry $registry, \Magento\App\Cache\Type\Config $configCacheType, \Magento\Core\Model\Url $url, - \Magento\App\State $appState, \Magento\App\RequestInterface $request, \Magento\Core\Model\Resource\Config\Data $configDataResource, \Magento\App\Dir $dir, \Magento\Core\Model\Store\Config $coreStoreConfig, \Magento\Core\Model\Config $coreConfig, \Magento\Core\Model\Resource\Store $resource, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Data\Collection\Db $resourceCollection = null, $isCustomEntryPoint = false, array $data = array() @@ -329,7 +322,6 @@ class Store extends \Magento\Core\Model\AbstractModel $this->_coreStoreConfig = $coreStoreConfig; $this->_url = $url; $this->_configCacheType = $configCacheType; - $this->_appState = $appState; $this->_request = $request; $this->_configDataResource = $configDataResource; $this->_isCustomEntryPoint = $isCustomEntryPoint; @@ -358,7 +350,7 @@ class Store extends \Magento\Core\Model\AbstractModel public function __wakeup() { parent::__wakeup(); - $this->_eventDispatcher = \Magento\App\ObjectManager::getInstance() + $this->_eventManager = \Magento\App\ObjectManager::getInstance() ->get('Magento\Event\ManagerInterface'); $this->_cacheManager = \Magento\App\ObjectManager::getInstance() ->get('Magento\App\CacheInterface'); diff --git a/app/code/Magento/Core/Model/Store/Group.php b/app/code/Magento/Core/Model/Store/Group.php index 514e8362aa4b10ae30125901031fb7d7b6611882..103ecae8dfb3cb35929763a79f7581be485c6525 100644 --- a/app/code/Magento/Core/Model/Store/Group.php +++ b/app/code/Magento/Core/Model/Store/Group.php @@ -106,7 +106,7 @@ class Group extends \Magento\Core\Model\AbstractModel protected $_store; /** - * @var \Magento\Core\Model\StoreManager + * @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; @@ -115,7 +115,7 @@ class Group extends \Magento\Core\Model\AbstractModel * @param \Magento\Core\Model\Registry $registry * @param \Magento\Core\Model\Resource\Config\Data $configDataResource * @param \Magento\Core\Model\Store $store - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection * @param array $data @@ -125,7 +125,7 @@ class Group extends \Magento\Core\Model\AbstractModel \Magento\Core\Model\Registry $registry, \Magento\Core\Model\Resource\Config\Data $configDataResource, \Magento\Core\Model\Store $store, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, array $data = array() @@ -294,7 +294,7 @@ class Group extends \Magento\Core\Model\AbstractModel foreach ($this->getStores() as $store) { /* @var $store \Magento\Core\Model\Store */ if ($store->getLocaleCode() == $locale) { - array_push($stores, $store); + $stores[] = $store; } } return $stores; diff --git a/app/code/Magento/Core/Model/StoreManager.php b/app/code/Magento/Core/Model/StoreManager.php index a7b0c1fe6eed187f8075faf72cada75b8da16268..e473bac8c7e293a7fbe3f0a049186ca5ac03e2d3 100644 --- a/app/code/Magento/Core/Model/StoreManager.php +++ b/app/code/Magento/Core/Model/StoreManager.php @@ -77,21 +77,21 @@ class StoreManager implements \Magento\Core\Model\StoreManagerInterface /** * Helper factory * - * @var \Magento\Core\Model\Factory\Helper + * @var \Magento\App\Helper\HelperFactory */ protected $_helperFactory; /** * @param \Magento\Core\Model\Store\StorageFactory $factory * @param \Magento\App\RequestInterface $request - * @param \Magento\Core\Model\Factory\Helper $helperFactory + * @param \Magento\App\Helper\HelperFactory $helperFactory * @param string $scopeCode * @param string $scopeType */ public function __construct( \Magento\Core\Model\Store\StorageFactory $factory, \Magento\App\RequestInterface $request, - \Magento\Core\Model\Factory\Helper $helperFactory, + \Magento\App\Helper\HelperFactory $helperFactory, $scopeCode = '', $scopeType = 'store' ) { @@ -131,7 +131,7 @@ class StoreManager implements \Magento\Core\Model\StoreManagerInterface return $this->getStore($storeId); } catch (\Exception $e) { if ($this->_getStorage()->getCurrentStore()) { - $this->_request->setActionName('noRoute'); + $this->_request->setActionName('noroute'); return new \Magento\Object(); } diff --git a/app/code/Magento/Core/Model/System/Store.php b/app/code/Magento/Core/Model/System/Store.php index 5cddac53a45d3e3894683f0ed608e0f3e318ed9f..21787f5da3ff3ead5997315cc39005d8a68f8550 100644 --- a/app/code/Magento/Core/Model/System/Store.php +++ b/app/code/Magento/Core/Model/System/Store.php @@ -67,7 +67,7 @@ class Store extends \Magento\Object private $_isAdminScopeAllowed = true; /** - * @var \Magento\Core\Model\StoreManager + * @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; @@ -75,10 +75,10 @@ class Store extends \Magento\Object * Init model * Load Website, Group and Store collections * - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @return \Magento\Core\Model\System\Store */ - public function __construct(\Magento\Core\Model\StoreManager $storeManager) + public function __construct(\Magento\Core\Model\StoreManagerInterface $storeManager) { $this->_storeManager = $storeManager; return $this->reload(); diff --git a/app/code/Magento/Core/Model/Template.php b/app/code/Magento/Core/Model/Template.php index 29b8ee28314a7497263e19bb3f6705e0ba8267c8..8e460fe7e10825f706714c34aee9230a58fee072 100644 --- a/app/code/Magento/Core/Model/Template.php +++ b/app/code/Magento/Core/Model/Template.php @@ -97,7 +97,7 @@ abstract class Template extends \Magento\Core\Model\AbstractModel protected $_appEmulation; /** - * @var \Magento\Core\Model\StoreManager + * @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; diff --git a/app/code/Magento/Core/Model/Theme.php b/app/code/Magento/Core/Model/Theme.php index b34409f06e9e81e06c77a302498ba72bd847bf3e..aebdc4a5e6ccf7afcdb90bc331299ba916f05878 100644 --- a/app/code/Magento/Core/Model/Theme.php +++ b/app/code/Magento/Core/Model/Theme.php @@ -106,11 +106,6 @@ class Theme extends \Magento\Core\Model\AbstractModel implements \Magento\View\D */ protected $_customFactory; - /** - * @var \Magento\App\State - */ - protected $_appState; - /** * Initialize dependencies * @@ -136,7 +131,6 @@ class Theme extends \Magento\Core\Model\AbstractModel implements \Magento\View\D \Magento\View\Design\Theme\ImageFactory $imageFactory, \Magento\View\Design\Theme\Validator $validator, \Magento\View\Design\Theme\CustomizationFactory $customizationFactory, - \Magento\App\State $appState, \Magento\Core\Model\Resource\Theme $resource = null, \Magento\Core\Model\Resource\Theme\Collection $resourceCollection = null, array $data = array() @@ -147,7 +141,6 @@ class Theme extends \Magento\Core\Model\AbstractModel implements \Magento\View\D $this->_imageFactory = $imageFactory; $this->_validator = $validator; $this->_customFactory = $customizationFactory; - $this->_appState = $appState; $this->addData(array( 'type' => self::TYPE_VIRTUAL diff --git a/app/code/Magento/Core/Model/Theme/Domain/Physical.php b/app/code/Magento/Core/Model/Theme/Domain/Physical.php index 35b30986a68ab8002191834f8ff32eb3eeddbcc7..2a680d166eeb8edc964fa8b4aff4d3cf5d8ba317 100644 --- a/app/code/Magento/Core/Model/Theme/Domain/Physical.php +++ b/app/code/Magento/Core/Model/Theme/Domain/Physical.php @@ -29,7 +29,7 @@ */ namespace Magento\Core\Model\Theme\Domain; -class Physical +class Physical implements \Magento\View\Design\Theme\Domain\PhysicalInterface { /** * Physical theme model instance diff --git a/app/code/Magento/Core/Model/Theme/Domain/Staging.php b/app/code/Magento/Core/Model/Theme/Domain/Staging.php index 9007f0b74b3a02da88eeb005c67b793c40193ff9..2d2a17582c72776b684a34c791816a5fbe443f01 100644 --- a/app/code/Magento/Core/Model/Theme/Domain/Staging.php +++ b/app/code/Magento/Core/Model/Theme/Domain/Staging.php @@ -29,7 +29,7 @@ */ namespace Magento\Core\Model\Theme\Domain; -class Staging +class Staging implements \Magento\View\Design\Theme\Domain\StagingInterface { /** * Staging theme model instance @@ -58,7 +58,7 @@ class Staging /** * Copy changes from 'staging' theme * - * @return \Magento\Core\Model\Theme\Domain\Virtual + * @return \Magento\View\Design\Theme\Domain\StagingInterface */ public function updateFromStagingTheme() { diff --git a/app/code/Magento/Core/Model/Theme/Domain/Virtual.php b/app/code/Magento/Core/Model/Theme/Domain/Virtual.php index 96d784364a26655b34f627a21bb680cd2c72bb7a..f538989e18ceab675934e547cc686dd234aead77 100644 --- a/app/code/Magento/Core/Model/Theme/Domain/Virtual.php +++ b/app/code/Magento/Core/Model/Theme/Domain/Virtual.php @@ -29,7 +29,7 @@ */ namespace Magento\Core\Model\Theme\Domain; -class Virtual +class Virtual implements \Magento\View\Design\Theme\Domain\VirtualInterface { /** * Virtual theme model instance diff --git a/app/code/Magento/Core/Model/Theme/Image/Path.php b/app/code/Magento/Core/Model/Theme/Image/Path.php index 7eba34128bad8f69ecaa7d51a249d495060b6f3d..2f0f430b6953a1632d579f178c00c67f01618feb 100644 --- a/app/code/Magento/Core/Model/Theme/Image/Path.php +++ b/app/code/Magento/Core/Model/Theme/Image/Path.php @@ -45,16 +45,14 @@ class Path implements \Magento\View\Design\Theme\Image\PathInterface protected $viewUrl; /** - * @var \Magento\UrlInterface + * @var \Magento\Core\Model\StoreManagerInterface */ - protected $storeManager; + protected $_storeManager; /** - * Initialize dependencies - * * @param \Magento\App\Dir $dir * @param \Magento\View\Url $viewUrl - * @param \Magento\UrlInterface $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager */ public function __construct( \Magento\App\Dir $dir, @@ -63,7 +61,7 @@ class Path implements \Magento\View\Design\Theme\Image\PathInterface ) { $this->dir = $dir; $this->viewUrl = $viewUrl; - $this->storeManager = $storeManager; + $this->_storeManager = $storeManager; } /** @@ -73,7 +71,7 @@ class Path implements \Magento\View\Design\Theme\Image\PathInterface */ public function getPreviewImageDirectoryUrl() { - return $this->storeManager->getStore()->getBaseUrl(\Magento\Core\Model\Store::URL_TYPE_MEDIA) + return $this->_storeManager->getStore()->getBaseUrl(\Magento\Core\Model\Store::URL_TYPE_MEDIA) . self::PREVIEW_DIRECTORY_PATH . '/'; } diff --git a/app/code/Magento/Core/Model/Theme/Registration.php b/app/code/Magento/Core/Model/Theme/Registration.php index 7905c2ca54137d25145e9ecbe5d12b80e2f984ce..75da923844c6c0bf4cb80c6d38d9191902fc1e28 100644 --- a/app/code/Magento/Core/Model/Theme/Registration.php +++ b/app/code/Magento/Core/Model/Theme/Registration.php @@ -131,7 +131,7 @@ class Registration if (in_array($tempId, $inheritanceChain)) { throw new \Magento\Core\Exception(__('Circular-reference in theme inheritance detected for "%1"', $tempId)); } - array_push($inheritanceChain, $tempId); + $inheritanceChain[] = $tempId; $parentTheme = $theme->getParentTheme(); if ($parentTheme) { $this->_registerThemeRecursively($parentTheme, $inheritanceChain); diff --git a/app/code/Magento/Core/Model/Translate.php b/app/code/Magento/Core/Model/Translate.php index 321f3fbaf363d4ef87db0a90aac10368430435e5..dde1871f4207e855c50d7048c81ea13a2d2ca1c6 100644 --- a/app/code/Magento/Core/Model/Translate.php +++ b/app/code/Magento/Core/Model/Translate.php @@ -25,6 +25,7 @@ */ namespace Magento\Core\Model; +use Magento\TranslateInterface; /** * Translate model @@ -33,7 +34,7 @@ namespace Magento\Core\Model; * @SuppressWarnings(PHPMD.CouplingBetweenObjects) * @SuppressWarnings(PHPMD.TooManyFields) */ -class Translate +class Translate implements TranslateInterface { /** * CSV separator @@ -174,7 +175,7 @@ class Translate protected $_modulesReader; /** - * @var \Magento\Core\Model\StoreManager + * @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; @@ -203,7 +204,7 @@ class Translate * @param \Magento\Module\ModuleList $moduleList * @param \Magento\Module\Dir\Reader $modulesReader * @param \Magento\Core\Model\Config $coreConfig - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Resource\Translate $translate * @param \Magento\Core\Model\App $app * @param \Magento\App\State $appState @@ -220,7 +221,7 @@ class Translate \Magento\Module\ModuleList $moduleList, \Magento\Module\Dir\Reader $modulesReader, \Magento\Core\Model\Config $coreConfig, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Resource\Translate $translate, \Magento\Core\Model\App $app, \Magento\App\State $appState @@ -349,9 +350,7 @@ class Translate * @param bool $isJson * @return \Magento\Core\Model\Translate\InlineInterface */ - public function processResponseBody(&$body, - $isJson = \Magento\Core\Model\Translate\InlineParser::JSON_FLAG_DEFAULT_STATE - ) { + public function processResponseBody(&$body, $isJson = false) { return $this->getInlineObject()->processResponseBody($body, $isJson); } diff --git a/app/code/Magento/Core/Model/Translate/Inline.php b/app/code/Magento/Core/Model/Translate/Inline.php index 73c570bc9929a35782f755e36de4678a419225f7..bf41766b772bcfe7d0fd00a62c7823bc03cce6a2 100644 --- a/app/code/Magento/Core/Model/Translate/Inline.php +++ b/app/code/Magento/Core/Model/Translate/Inline.php @@ -205,8 +205,8 @@ class Inline implements \Magento\Core\Model\Translate\InlineInterface $ajaxUrl = $urlModel->getUrl($urlPrefix . '/ajax/translate', array('_secure' => $store->isCurrentlySecure())); - /** @var $block \Magento\Core\Block\Template */ - $block = $this->_layout->createBlock('Magento\Core\Block\Template'); + /** @var $block \Magento\View\Block\Template */ + $block = $this->_layout->createBlock('Magento\View\Block\Template'); $block->setAjaxUrl($ajaxUrl); diff --git a/app/code/Magento/Core/Model/Translate/InlineParser.php b/app/code/Magento/Core/Model/Translate/InlineParser.php index 1ad7a39f9964ba4c8538ab09a6d9ec85f493b8ff..21e5d72182c7fc4797e068279ed56939eec5ed49 100644 --- a/app/code/Magento/Core/Model/Translate/InlineParser.php +++ b/app/code/Magento/Core/Model/Translate/InlineParser.php @@ -140,7 +140,7 @@ class InlineParser protected $_resource; /** - * @var \Magento\Core\Model\StoreManager + * @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; @@ -158,7 +158,7 @@ class InlineParser * Initialize base inline translation model * * @param \Magento\Core\Model\Resource\Translate\String $resource - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\View\DesignInterface $design * @param \Magento\Core\Helper\Data $helper * @param \Zend_Filter_Interface $inputFilter @@ -168,7 +168,7 @@ class InlineParser \Magento\Core\Model\Resource\Translate\String $resource, \Magento\View\DesignInterface $design, \Magento\Core\Helper\Data $helper, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Zend_Filter_Interface $inputFilter, \Magento\App\State $appState ) { @@ -197,7 +197,7 @@ class InlineParser } /** - * @return \Magento\Core\Model\StoreManager + * @return \Magento\Core\Model\StoreManagerInterface */ public function getStoreManager() { diff --git a/app/code/Magento/Core/Model/Url.php b/app/code/Magento/Core/Model/Url.php index 5fcfd9e4c6cf24ddd3b7216255a9c6f3eaeacb45..076b20b9c56cffb2645e0750aa46f3dad4ee7a31 100644 --- a/app/code/Magento/Core/Model/Url.php +++ b/app/code/Magento/Core/Model/Url.php @@ -142,7 +142,7 @@ class Url extends \Magento\Object implements \Magento\UrlInterface protected $_app; /** - * @var \Magento\Core\Model\StoreManager + * @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; @@ -180,7 +180,7 @@ class Url extends \Magento\Object implements \Magento\UrlInterface Url\SecurityInfoInterface $urlSecurityInfo, \Magento\Core\Model\Store\Config $coreStoreConfig, \Magento\Core\Model\App $app, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Session $session, $areaCode = null, array $data = array() @@ -1240,7 +1240,9 @@ class Url extends \Magento\Object implements \Magento\UrlInterface $referer = parse_url($this->_app->getRequest()->getServer('HTTP_REFERER'), PHP_URL_HOST); foreach ($this->_storeManager->getStores() as $store) { $storeDomains[] = parse_url($store->getBaseUrl(), PHP_URL_HOST); - $storeDomains[] = parse_url($store->getBaseUrl(\Magento\Core\Model\Store::URL_TYPE_LINK, true), PHP_URL_HOST); + $storeDomains[] = parse_url($store->getBaseUrl( + \Magento\Core\Model\Store::URL_TYPE_LINK, true), PHP_URL_HOST + ); } $storeDomains = array_unique($storeDomains); if (empty($referer) || in_array($referer, $storeDomains)) { @@ -1259,7 +1261,7 @@ class Url extends \Magento\Object implements \Magento\UrlInterface public function getRedirectUrl($url) { $this->_prepareSessionUrlWithParams($url, array( - 'name' => \Magento\Core\Controller\Front\Action::SESSION_NAMESPACE + 'name' => \Magento\Core\App\Action\Plugin\LastUrl::SESSION_NAMESPACE )); $query = $this->getQuery(false); diff --git a/app/code/Magento/Core/Model/Url/Rewrite.php b/app/code/Magento/Core/Model/Url/Rewrite.php index 313ea3ac05a5a6f664a9295c82768298e847172c..9bc77da3cdee19b2853410f0ec9f78216529ef40 100644 --- a/app/code/Magento/Core/Model/Url/Rewrite.php +++ b/app/code/Magento/Core/Model/Url/Rewrite.php @@ -81,12 +81,7 @@ class Rewrite extends \Magento\Core\Model\AbstractModel protected $_app; /** - * @var \Magento\App\State - */ - protected $_appState; - - /** - * @var \Magento\Core\Model\StoreManager + * @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; @@ -95,8 +90,7 @@ class Rewrite extends \Magento\Core\Model\AbstractModel * @param \Magento\Core\Model\Registry $registry * @param \Magento\Core\Model\Store\Config $coreStoreConfig * @param \Magento\Core\Model\App $app - * @param \Magento\App\State $appState - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection * @param array $data @@ -106,15 +100,13 @@ class Rewrite extends \Magento\Core\Model\AbstractModel \Magento\Core\Model\Registry $registry, \Magento\Core\Model\Store\Config $coreStoreConfig, \Magento\Core\Model\App $app, - \Magento\App\State $appState, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, array $data = array() ) { $this->_coreStoreConfig = $coreStoreConfig; $this->_app = $app; - $this->_appState = $appState; $this->_storeManager = $storeManager; parent::__construct($context, $registry, $resource, $resourceCollection, $data); } @@ -252,9 +244,6 @@ class Rewrite extends \Magento\Core\Model\AbstractModel if (!$this->_appState->isInstalled()) { return false; } - if (is_null($request)) { - $request = $this->_app->getFrontController()->getRequest(); - } if (is_null($this->getStoreId()) || false === $this->getStoreId()) { $this->setStoreId($this->_storeManager->getStore()->getId()); } diff --git a/app/code/Magento/Core/Model/View/Design/Proxy.php b/app/code/Magento/Core/Model/View/Design/Proxy.php deleted file mode 100644 index e671a3901769e6df162ee3037eb9643040447c7e..0000000000000000000000000000000000000000 --- a/app/code/Magento/Core/Model/View/Design/Proxy.php +++ /dev/null @@ -1,139 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * 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_Core - * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - -/** - * Design proxy - */ -namespace Magento\Core\Model\View\Design; - -class Proxy implements \Magento\View\DesignInterface -{ - /** - * @var \Magento\ObjectManager - */ - protected $_objectManager; - - /** - * @var \Magento\Core\Model\View\Design - */ - protected $_model; - - /** - * @param \Magento\ObjectManager $objectManager - */ - public function __construct(\Magento\ObjectManager $objectManager) - { - $this->_objectManager = $objectManager; - } - - /** - * @return \Magento\Core\Model\View\Design - */ - protected function _getInstance() - { - if (null === $this->_model) { - $this->_model = $this->_objectManager->get('Magento\Core\Model\View\Design'); - } - return $this->_model; - } - - /** - * Set package area - * - * @deprecated - * @param string $area - * @return \Magento\View\DesignInterface - */ - public function setArea($area) - { - return $this->_getInstance()->setArea($area); - } - - /** - * Retrieve package area - * - * @deprecated - * @return string - */ - public function getArea() - { - return $this->_getInstance()->getArea(); - } - - /** - * Set theme path - * - * @param \Magento\Core\Model\Theme|int|string $theme - * @param string $area - * @return \Magento\View\DesignInterface - */ - public function setDesignTheme($theme, $area = null) - { - return $this->_getInstance()->setDesignTheme($theme, $area); - } - - /** - * Get default theme which declared in configuration - * - * @param string $area - * @param array $params - * @return string|int - */ - public function getConfigurationDesignTheme($area = null, array $params = array()) - { - return $this->_getInstance()->getConfigurationDesignTheme($area, $params); - } - - /** - * Set default design theme - * - * @return \Magento\View\DesignInterface - */ - public function setDefaultDesignTheme() - { - return $this->_getInstance()->setDefaultDesignTheme(); - } - - /** - * Design theme model getter - * - * @return \Magento\Core\Model\Theme - */ - public function getDesignTheme() - { - return $this->_getInstance()->getDesignTheme(); - } - - /** - * Get design settings for current request - * - * @return array - */ - public function getDesignParams() - { - return $this->_getInstance()->getDesignParams(); - } -} diff --git a/app/code/Magento/Core/Model/Website.php b/app/code/Magento/Core/Model/Website.php index a67d2280841d6455a1759ac5c1b3b5457df09195..673024dd10f560386bcba9b38bdd586ec12dd885 100644 --- a/app/code/Magento/Core/Model/Website.php +++ b/app/code/Magento/Core/Model/Website.php @@ -165,7 +165,7 @@ class Website extends \Magento\Core\Model\AbstractModel protected $_websiteFactory; /** - * @var \Magento\Core\Model\StoreManager + * @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; @@ -187,7 +187,7 @@ class Website extends \Magento\Core\Model\AbstractModel * @param \Magento\Core\Model\StoreFactory $storeFactory * @param \Magento\Core\Model\Store\GroupFactory $storeGroupFactory * @param \Magento\Core\Model\WebsiteFactory $websiteFactory - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\App $app * @param \Magento\Directory\Model\CurrencyFactory $currencyFactory * @param \Magento\Core\Model\Resource\AbstractResource $resource @@ -202,7 +202,7 @@ class Website extends \Magento\Core\Model\AbstractModel \Magento\Core\Model\StoreFactory $storeFactory, \Magento\Core\Model\Store\GroupFactory $storeGroupFactory, \Magento\Core\Model\WebsiteFactory $websiteFactory, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\App $app, \Magento\Directory\Model\CurrencyFactory $currencyFactory, \Magento\Core\Model\Resource\AbstractResource $resource = null, diff --git a/app/code/Magento/Core/etc/config.xml b/app/code/Magento/Core/etc/config.xml index d21b1f20af450d1e09630e16e022cf696f615dae..584bb881beff581714d020172680ece940ef221c 100644 --- a/app/code/Magento/Core/etc/config.xml +++ b/app/code/Magento/Core/etc/config.xml @@ -75,11 +75,6 @@ <filesystem> <media>{{media_dir}}</media> </filesystem> - <smtp> - <disable>0</disable> - <host>localhost</host> - <port>25</port> - </smtp> <media_storage_configuration> <media_storage>0</media_storage> <media_database>default_setup</media_database> @@ -193,28 +188,6 @@ </directory> </filesystem> </system> - <trans_email> - <ident_custom1> - <email>custom1@example.com</email> - <name>Custom 1</name> - </ident_custom1> - <ident_custom2> - <email>custom2@example.com</email> - <name>Custom 2</name> - </ident_custom2> - <ident_general> - <email>owner@example.com</email> - <name>Owner</name> - </ident_general> - <ident_sales> - <email>sales@example.com</email> - <name>Sales</name> - </ident_sales> - <ident_support> - <email>support@example.com</email> - <name>CustomerSupport</name> - </ident_support> - </trans_email> <web> <url> <use_store>0</use_store> diff --git a/app/code/Magento/Core/etc/di.xml b/app/code/Magento/Core/etc/di.xml index ea8699421ba05dcf1b17a6fde29269d786a9fdf0..b6cf71c7d81a09873e96a9fca45b63234fbe68e6 100644 --- a/app/code/Magento/Core/etc/di.xml +++ b/app/code/Magento/Core/etc/di.xml @@ -51,6 +51,9 @@ <preference for="Magento\View\Design\Theme\ThemeProviderInterface" type="Magento\Core\Model\Theme\ThemeProvider" /> <preference for="Magento\View\Design\Theme\FileProviderInterface" type="Magento\Core\Model\Theme\FileProvider" /> <preference for="Magento\View\Design\Theme\Customization\ConfigInterface" type="Magento\Core\Model\Theme\Customization\Config" /> + <preference for="Magento\App\ViewInterface" type="Magento\App\View" /> + <preference for="Magento\TranslateInterface" type="Magento\Core\Model\Translate" /> + <preference for="Magento\App\Response\RedirectInterface" type="Magento\Core\App\Response\Redirect" /> <type name="Magento\App\DefaultPath\DefaultPath"> <param name="parts"> <value> @@ -380,7 +383,7 @@ <instance type="Magento\App\Request\Http\Proxy" /> </param> </type> - <type name="Magento\Core\Helper\Context"> + <type name="Magento\App\Helper\Context"> <param name="urlBuilder"> <instance type="Magento\Core\Model\Url\Proxy" /> </param> @@ -398,13 +401,13 @@ <instance type="Magento\Core\Model\File\Storage\File\Proxy" /> </param> </type> - <type name="Magento\View\Service"> - <param name="design"> - <instance type="Magento\Core\Model\View\Design\Proxy" /> - </param> - </type> <type name="Magento\View\TemplateEngineFactory"> <plugin name="debug_hints" type="Magento\Core\Model\TemplateEngine\Plugin\DebugHints" sortOrder="10"/> + <param name="engines"> + <value> + <phtml>Magento\View\TemplateEngine\Php</phtml> + </value> + </param> </type> <type name="\Magento\Image"> <param name="adapter"> @@ -450,6 +453,12 @@ </type> <type name="Magento\App\FrontController"> <plugin name="dispatchExceptionHandler" type="Magento\Core\App\FrontController\Plugin\DispatchExceptionHandler" sortOrder="30"/> + <plugin name="clickjacking" type="Magento\App\FrontController\Plugin\Clickjacking" sortOrder="0"/> + </type> + <type name="Magento\App\Action\Action"> + <plugin name="installInitializer" type="Magento\Core\App\Action\Plugin\Install" sortOrder="5"/> + <plugin name="sessionInitializer" type="Magento\Core\App\Action\Plugin\Session" sortOrder="10"/> + <plugin name="designLoader" type="Magento\Core\App\Action\Plugin\Design" sortOrder="20"/> </type> <type name="Magento\Core\Model\Locale"> <param name="dateModel"> diff --git a/app/code/Magento/Core/etc/frontend/di.xml b/app/code/Magento/Core/etc/frontend/di.xml index e4378c51458cb96f47f4d5d576ef7c47e246c768..3ce4bcee5799992f664be60812e764835a3c6ad9 100644 --- a/app/code/Magento/Core/etc/frontend/di.xml +++ b/app/code/Magento/Core/etc/frontend/di.xml @@ -38,6 +38,9 @@ <plugin name="requestPreprocessor" type="Magento\Core\App\FrontController\Plugin\RequestPreprocessor" sortOrder="50"/> <plugin name="urlRewrite" type="Magento\Core\App\FrontController\Plugin\UrlRewrite" sortOrder="60"/> </type> + <type name="Magento\App\Action\Action"> + <plugin name="lastUrl" type="Magento\Core\App\Action\Plugin\LastUrl" sortOrder="70"/> + </type> <type name="Magento\App\RouterList" shared="true"> <param name="routerList"> <value> diff --git a/app/code/Magento/Core/etc/module.xml b/app/code/Magento/Core/etc/module.xml index d1fc5a109bb1acc90bd1c522e958e9185aa00127..fee188b4556d4d3ec820341bd356d097133101c3 100755 --- a/app/code/Magento/Core/etc/module.xml +++ b/app/code/Magento/Core/etc/module.xml @@ -32,8 +32,6 @@ <module name="Magento_Index"/> <module name="Magento_Cron"/> <module name="Magento_Catalog"/> - <module name="Magento_Newsletter"/> - <module name="Magento_Cms"/> <module name="Magento_Theme"/> <module name="Magento_AdminNotification"/> <module name="Magento_CatalogInventory"/> diff --git a/app/code/Magento/Core/sql/core_setup/install-1.6.0.0.php b/app/code/Magento/Core/sql/core_setup/install-1.6.0.0.php index 3ed73b9035bd40a48960e15a4647a7f1a5d6fd39..617b40f1cf4f0934c09d3fedc2fc6a73d9193760 100644 --- a/app/code/Magento/Core/sql/core_setup/install-1.6.0.0.php +++ b/app/code/Magento/Core/sql/core_setup/install-1.6.0.0.php @@ -206,53 +206,6 @@ $table = $installer->getConnection() ->setComment('Config Data'); $installer->getConnection()->createTable($table); -/** - * Create table 'core_email_template' - */ -$table = $installer->getConnection() - ->newTable($installer->getTable('core_email_template')) - ->addColumn('template_id', \Magento\DB\Ddl\Table::TYPE_INTEGER, null, array( - 'identity' => true, - 'unsigned' => true, - 'nullable' => false, - 'primary' => true, - ), 'Template Id') - ->addColumn('template_code', \Magento\DB\Ddl\Table::TYPE_TEXT, 150, array( - 'nullable' => false - ), 'Template Name') - ->addColumn('template_text', \Magento\DB\Ddl\Table::TYPE_TEXT, '64k', array( - 'nullable' => false - ), 'Template Content') - ->addColumn('template_styles', \Magento\DB\Ddl\Table::TYPE_TEXT, '64k', array( - ), 'Templste Styles') - ->addColumn('template_type', \Magento\DB\Ddl\Table::TYPE_INTEGER, null, array( - 'unsigned' => true, - ), 'Template Type') - ->addColumn('template_subject', \Magento\DB\Ddl\Table::TYPE_TEXT, 200, array( - 'nullable' => false, - ), 'Template Subject') - ->addColumn('template_sender_name', \Magento\DB\Ddl\Table::TYPE_TEXT, 200, array( - ), 'Template Sender Name') - ->addColumn('template_sender_email', \Magento\DB\Ddl\Table::TYPE_TEXT, 200, array( - ), 'Template Sender Email') - ->addColumn('added_at', \Magento\DB\Ddl\Table::TYPE_TIMESTAMP, null, array( - ), 'Date of Template Creation') - ->addColumn('modified_at', \Magento\DB\Ddl\Table::TYPE_TIMESTAMP, null, array( - ), 'Date of Template Modification') - ->addColumn('orig_template_code', \Magento\DB\Ddl\Table::TYPE_TEXT, 200, array( - ), 'Original Template Code') - ->addColumn('orig_template_variables', \Magento\DB\Ddl\Table::TYPE_TEXT, '64k', array( - ), 'Original Template Variables') - ->addIndex($installer->getIdxName('core_email_template', array('template_code'), - \Magento\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE), - array('template_code'), array('type' => \Magento\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE)) - ->addIndex($installer->getIdxName('core_email_template', array('added_at')), - array('added_at')) - ->addIndex($installer->getIdxName('core_email_template', array('modified_at')), - array('modified_at')) - ->setComment('Email Templates'); -$installer->getConnection()->createTable($table); - /** * Create table 'core_layout_update' */ diff --git a/app/code/Magento/Cron/Helper/Data.php b/app/code/Magento/Cron/Helper/Data.php index a29adcaad768e7a62e4293781695d3bcf7d5de2c..8a06888dd68800cd0bcd35d012595645302d485d 100644 --- a/app/code/Magento/Cron/Helper/Data.php +++ b/app/code/Magento/Cron/Helper/Data.php @@ -29,7 +29,7 @@ */ namespace Magento\Cron\Helper; -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { } diff --git a/app/code/Magento/Cron/Model/Config/Backend/Product/Alert.php b/app/code/Magento/Cron/Model/Config/Backend/Product/Alert.php index 6fc3b5ab9cfcefebdeaa5368cd0e40ca34920f29..73bd8c1bccfec93a441a3910c1646a03d389e2c5 100644 --- a/app/code/Magento/Cron/Model/Config/Backend/Product/Alert.php +++ b/app/code/Magento/Cron/Model/Config/Backend/Product/Alert.php @@ -59,7 +59,7 @@ class Alert extends \Magento\Core\Model\Config\Value * @param \Magento\Core\Model\Config\ValueFactory $configValueFactory * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Config $config * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection @@ -70,7 +70,7 @@ class Alert extends \Magento\Core\Model\Config\Value \Magento\Core\Model\Config\ValueFactory $configValueFactory, \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Config $config, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, diff --git a/app/code/Magento/Cron/Model/Config/Backend/Sitemap.php b/app/code/Magento/Cron/Model/Config/Backend/Sitemap.php index 1b01472f3315a25d5fa86c71576ebf846185e199..246c360242841f6f1886e85db072649fb6ca6e4c 100644 --- a/app/code/Magento/Cron/Model/Config/Backend/Sitemap.php +++ b/app/code/Magento/Cron/Model/Config/Backend/Sitemap.php @@ -59,7 +59,7 @@ class Sitemap extends \Magento\Core\Model\Config\Value * @param \Magento\Core\Model\Config\ValueFactory $configValueFactory * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Config $config * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection @@ -70,7 +70,7 @@ class Sitemap extends \Magento\Core\Model\Config\Value \Magento\Core\Model\Config\ValueFactory $configValueFactory, \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Config $config, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, diff --git a/app/code/Magento/CurrencySymbol/Block/Adminhtml/System/Currency/Rate/Matrix.php b/app/code/Magento/CurrencySymbol/Block/Adminhtml/System/Currency/Rate/Matrix.php index 027aec655486859bd606d92f40bd4104d7d362d1..f6bec98233101607689a8ea118204dcb4b8abed0 100644 --- a/app/code/Magento/CurrencySymbol/Block/Adminhtml/System/Currency/Rate/Matrix.php +++ b/app/code/Magento/CurrencySymbol/Block/Adminhtml/System/Currency/Rate/Matrix.php @@ -37,39 +37,31 @@ class Matrix extends \Magento\Backend\Block\Template { protected $_template = 'system/currency/rate/matrix.phtml'; - /** - * @var \Magento\Backend\Model\Session - */ - protected $_adminSession; - /** * @var \Magento\Directory\Model\CurrencyFactory */ protected $_dirCurrencyFactory; - /** - * @param \Magento\Directory\Model\CurrencyFactory $dirCurrencyFactory - * @param \Magento\Backend\Model\Session $adminSession - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Directory\Model\CurrencyFactory $dirCurrencyFactory + * @param array $data */ - public function __construct( - \Magento\Directory\Model\CurrencyFactory $dirCurrencyFactory, - \Magento\Backend\Model\Session $adminSession, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Directory\Model\CurrencyFactory $dirCurrencyFactory, + array $data = array() + ) { $this->_dirCurrencyFactory = $dirCurrencyFactory; - $this->_adminSession = $adminSession; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _prepareLayout() { - $newRates = $this->_adminSession->getRates(); - $this->_adminSession->unsetData('rates'); + $newRates = $this->_backendSession->getRates(); + $this->_backendSession->unsetData('rates'); $currencyModel = $this->_dirCurrencyFactory->create(); $currencies = $currencyModel->getConfigAllowCurrencies(); diff --git a/app/code/Magento/CurrencySymbol/Block/Adminhtml/System/Currency/Rate/Services.php b/app/code/Magento/CurrencySymbol/Block/Adminhtml/System/Currency/Rate/Services.php index 0dc7be91b08d09d085b8e67888efa18a0ec782e9..1c8912517d80384a095398dbd0ace67e743bbe60 100644 --- a/app/code/Magento/CurrencySymbol/Block/Adminhtml/System/Currency/Rate/Services.php +++ b/app/code/Magento/CurrencySymbol/Block/Adminhtml/System/Currency/Rate/Services.php @@ -46,34 +46,26 @@ class Services extends \Magento\Backend\Block\Template */ protected $_srcCurrencyFactory; - /** - * @var \Magento\Backend\Model\Session - */ - protected $_adminSession; - - /** - * @param \Magento\Backend\Model\Session $adminSession - * @param \Magento\Directory\Model\Currency\Import\Source\ServiceFactory $srcCurrencyFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Directory\Model\Currency\Import\Source\ServiceFactory $srcCurrencyFactory + * @param array $data */ - public function __construct( - \Magento\Backend\Model\Session $adminSession, - \Magento\Directory\Model\Currency\Import\Source\ServiceFactory $srcCurrencyFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { - $this->_adminSession = $adminSession; + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Directory\Model\Currency\Import\Source\ServiceFactory $srcCurrencyFactory, + array $data = array() + ) { $this->_srcCurrencyFactory = $srcCurrencyFactory; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** * Create import services form select element * - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ protected function _prepareLayout() { @@ -83,7 +75,7 @@ class Services extends \Magento\Backend\Block\Template ->setOptions($this->_srcCurrencyFactory->create()->toOptionArray()) ->setId('rate_services') ->setName('rate_services') - ->setValue($this->_adminSession->getCurrencyRateService(true)) + ->setValue($this->_backendSession->getCurrencyRateService(true)) ->setTitle(__('Import Service')) ); diff --git a/app/code/Magento/CurrencySymbol/Block/Adminhtml/System/Currencysymbol.php b/app/code/Magento/CurrencySymbol/Block/Adminhtml/System/Currencysymbol.php index 4817b7b765ec75880ca4a4be3d6a694a3cdc1c06..1b0b197992bfbbd3aa2b89efd15252678f41c0a7 100644 --- a/app/code/Magento/CurrencySymbol/Block/Adminhtml/System/Currencysymbol.php +++ b/app/code/Magento/CurrencySymbol/Block/Adminhtml/System/Currencysymbol.php @@ -40,20 +40,20 @@ class Currencysymbol extends \Magento\Backend\Block\Widget\Form */ protected $_symbolSystemFactory; - /** - * @param \Magento\CurrencySymbol\Model\System\CurrencysymbolFactory $symbolSystemFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\CurrencySymbol\Model\System\CurrencysymbolFactory $symbolSystemFactory + * @param array $data */ - public function __construct( - \Magento\CurrencySymbol\Model\System\CurrencysymbolFactory $symbolSystemFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\CurrencySymbol\Model\System\CurrencysymbolFactory $symbolSystemFactory, + array $data = array() + ) { $this->_symbolSystemFactory = $symbolSystemFactory; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** @@ -76,7 +76,7 @@ class Currencysymbol extends \Magento\Backend\Block\Widget\Form /** * Prepares layout * - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ protected function _prepareLayout() { @@ -100,7 +100,7 @@ class Currencysymbol extends \Magento\Backend\Block\Widget\Form */ public function getSaveButtonHtml() { - /** @var $block \Magento\Core\Block\AbstractBlock */ + /** @var $block \Magento\View\Block\AbstractBlock */ $block = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Widget\Button'); $block->setData(array( 'label' => __('Save Currency Symbols'), diff --git a/app/code/Magento/CurrencySymbol/Controller/Adminhtml/System/Currency.php b/app/code/Magento/CurrencySymbol/Controller/Adminhtml/System/Currency.php index 29e0ef0fee12e62ce017ca5bbfe74d4f21313f3a..5bd33244b93ea88082e79d72abe3db64051c23ee 100644 --- a/app/code/Magento/CurrencySymbol/Controller/Adminhtml/System/Currency.php +++ b/app/code/Magento/CurrencySymbol/Controller/Adminhtml/System/Currency.php @@ -33,7 +33,7 @@ */ namespace Magento\CurrencySymbol\Controller\Adminhtml\System; -class Currency extends \Magento\Backend\Controller\Adminhtml\Action +class Currency extends \Magento\Backend\App\Action { /** * Core registry @@ -43,11 +43,11 @@ class Currency extends \Magento\Backend\Controller\Adminhtml\Action protected $_coreRegistry = null; /** - * @param \Magento\Backend\Controller\Context $context + * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Core\Model\Registry $coreRegistry */ public function __construct( - \Magento\Backend\Controller\Context $context, + \Magento\Backend\App\Action\Context $context, \Magento\Core\Model\Registry $coreRegistry ) { $this->_coreRegistry = $coreRegistry; @@ -73,12 +73,12 @@ class Currency extends \Magento\Backend\Controller\Adminhtml\Action */ public function indexAction() { - $this->_title(__('Currency Rates')); + $this->_title->add(__('Currency Rates')); - $this->loadLayout(); + $this->_view->loadLayout(); $this->_setActiveMenu('Magento_CurrencySymbol::system_currency_rates'); - $this->_addContent($this->getLayout()->createBlock('Magento\CurrencySymbol\Block\Adminhtml\System\Currency')); - $this->renderLayout(); + $this->_addContent($this->_view->getLayout()->createBlock('Magento\CurrencySymbol\Block\Adminhtml\System\Currency')); + $this->_view->renderLayout(); } public function fetchRatesAction() diff --git a/app/code/Magento/CurrencySymbol/Controller/Adminhtml/System/Currencysymbol.php b/app/code/Magento/CurrencySymbol/Controller/Adminhtml/System/Currencysymbol.php index 10604df09c06ab920242b1016aa12d2a20d9df5a..2331e01dab5305b3350038952316b102e43b7eb9 100644 --- a/app/code/Magento/CurrencySymbol/Controller/Adminhtml/System/Currencysymbol.php +++ b/app/code/Magento/CurrencySymbol/Controller/Adminhtml/System/Currencysymbol.php @@ -33,7 +33,7 @@ */ namespace Magento\CurrencySymbol\Controller\Adminhtml\System; -class Currencysymbol extends \Magento\Backend\Controller\Adminhtml\Action +class Currencysymbol extends \Magento\Backend\App\Action { /** * Show Currency Symbols Management dialog @@ -41,8 +41,8 @@ class Currencysymbol extends \Magento\Backend\Controller\Adminhtml\Action public function indexAction() { // set active menu and breadcrumbs - $this->loadLayout() - ->_setActiveMenu('Magento_CurrencySymbol::system_currency_symbols') + $this->_view->loadLayout(); + $this->_setActiveMenu('Magento_CurrencySymbol::system_currency_symbols') ->_addBreadcrumb( __('System'), __('System') @@ -52,8 +52,8 @@ class Currencysymbol extends \Magento\Backend\Controller\Adminhtml\Action __('Manage Currency Rates') ); - $this->_title(__('Currency Symbols')); - $this->renderLayout(); + $this->_title->add(__('Currency Symbols')); + $this->_view->renderLayout(); } /** @@ -80,7 +80,7 @@ class Currencysymbol extends \Magento\Backend\Controller\Adminhtml\Action $backendSession->addError($e->getMessage()); } - $this->_redirectReferer(); + $this->getResponse()->setRedirect($this->_redirect->getRedirectUrl($this->getUrl('*'))); } /** @@ -89,7 +89,7 @@ class Currencysymbol extends \Magento\Backend\Controller\Adminhtml\Action public function resetAction() { $this->_objectManager->create('Magento\CurrencySymbol\Model\System\Currencysymbol')->resetValues(); - $this->_redirectReferer(); + $this->getResponse()->setRedirect($this->_redirect->getRedirectUrl($this->getUrl('*'))); } /** diff --git a/app/code/Magento/CurrencySymbol/Helper/Data.php b/app/code/Magento/CurrencySymbol/Helper/Data.php index 799be90d5f0747f5d8d60e35d3ef05553ed43ae2..052d21de6a5384a3ff8b77711aeebe730258b31c 100644 --- a/app/code/Magento/CurrencySymbol/Helper/Data.php +++ b/app/code/Magento/CurrencySymbol/Helper/Data.php @@ -41,18 +41,18 @@ class Data extends \Magento\Core\Helper\Data protected $_symbolFactory; /** - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\Store\Config $coreStoreConfig - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Locale $locale * @param \Magento\App\State $appState * @param \Magento\CurrencySymbol\Model\System\CurrencysymbolFactory $symbolFactory * @param bool $dbCompatibleMode */ public function __construct( - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Core\Model\Store\Config $coreStoreConfig, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Locale $locale, \Magento\App\State $appState, \Magento\CurrencySymbol\Model\System\CurrencysymbolFactory $symbolFactory, diff --git a/app/code/Magento/CurrencySymbol/Model/System/Currencysymbol.php b/app/code/Magento/CurrencySymbol/Model/System/Currencysymbol.php index 5d4d665703f62b95416bc334504b71fb08ccb8c8..5bbbcad00893e9a3923c0fcb5b9c9578452c0f25 100644 --- a/app/code/Magento/CurrencySymbol/Model/System/Currencysymbol.php +++ b/app/code/Magento/CurrencySymbol/Model/System/Currencysymbol.php @@ -105,7 +105,7 @@ class Currencysymbol protected $_systemStore; /** - * @var \Magento\Core\Model\StoreManager + * @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; diff --git a/app/code/Magento/Customer/Block/Account/AuthorizationLink.php b/app/code/Magento/Customer/Block/Account/AuthorizationLink.php index 407d1da92892248a03ae94b4ddb63e35c6527d8c..0b86e73af836f80c874e8947111b755b6816c1a5 100644 --- a/app/code/Magento/Customer/Block/Account/AuthorizationLink.php +++ b/app/code/Magento/Customer/Block/Account/AuthorizationLink.php @@ -37,18 +37,18 @@ class AuthorizationLink extends \Magento\Page\Block\Link protected $_customerSession; /** - * @param \Magento\Core\Block\Template\Context $context - * @param \Magento\Customer\Model\Session $session + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Customer\Model\Session $session * @param array $data */ public function __construct( - \Magento\Core\Block\Template\Context $context, - \Magento\Customer\Model\Session $session, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, + \Magento\Customer\Model\Session $session, array $data = array() ) { - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); $this->_customerSession = $session; } diff --git a/app/code/Magento/Customer/Block/Account/Customer.php b/app/code/Magento/Customer/Block/Account/Customer.php index 779950799c00cf889b24486b549f97cd06359977..2690deb58c521d964ef3843e16062d18e6e4be84 100644 --- a/app/code/Magento/Customer/Block/Account/Customer.php +++ b/app/code/Magento/Customer/Block/Account/Customer.php @@ -24,7 +24,7 @@ namespace Magento\Customer\Block\Account; -class Customer extends \Magento\Core\Block\Template +class Customer extends \Magento\View\Block\Template { /** * Customer session @@ -34,18 +34,18 @@ class Customer extends \Magento\Core\Block\Template protected $_customerSession; /** - * @param \Magento\Core\Block\Template\Context $context - * @param \Magento\Customer\Model\Session $session + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Customer\Model\Session $session * @param array $data */ public function __construct( - \Magento\Core\Block\Template\Context $context, - \Magento\Customer\Model\Session $session, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, + \Magento\Customer\Model\Session $session, array $data = array() ) { - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); $this->_customerSession = $session; } diff --git a/app/code/Magento/Customer/Block/Account/Dashboard.php b/app/code/Magento/Customer/Block/Account/Dashboard.php index e313b6f8604bf35189dbb345a81013e0992d3948..6289ee10d50f7fd7f94498fe26580414a771d6c4 100644 --- a/app/code/Magento/Customer/Block/Account/Dashboard.php +++ b/app/code/Magento/Customer/Block/Account/Dashboard.php @@ -33,7 +33,7 @@ */ namespace Magento\Customer\Block\Account; -class Dashboard extends \Magento\Core\Block\Template +class Dashboard extends \Magento\View\Block\Template { /** * @var \Magento\Newsletter\Model\Subscriber @@ -51,22 +51,22 @@ class Dashboard extends \Magento\Core\Block\Template protected $_subscriberFactory; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Customer\Model\Session $customerSession, \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory, array $data = array() ) { $this->_customerSession = $customerSession; $this->_subscriberFactory = $subscriberFactory; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } public function getCustomer() diff --git a/app/code/Magento/Customer/Block/Account/Dashboard/Address.php b/app/code/Magento/Customer/Block/Account/Dashboard/Address.php index fc4c5294cec4492d8fbaa549c2a234c4ddff725c..7e46d6c916d018d1a3978fc97a85ab6ef2289c29 100644 --- a/app/code/Magento/Customer/Block/Account/Dashboard/Address.php +++ b/app/code/Magento/Customer/Block/Account/Dashboard/Address.php @@ -34,7 +34,7 @@ namespace Magento\Customer\Block\Account\Dashboard; -class Address extends \Magento\Core\Block\Template +class Address extends \Magento\View\Block\Template { /** * @var \Magento\Customer\Model\Session @@ -42,19 +42,19 @@ class Address extends \Magento\Core\Block\Template protected $_customerSession; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Customer\Model\Session $customerSession * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Customer\Model\Session $customerSession, array $data = array() ) { $this->_customerSession = $customerSession; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } public function getCustomer() diff --git a/app/code/Magento/Customer/Block/Account/Dashboard/Block.php b/app/code/Magento/Customer/Block/Account/Dashboard/Block.php index 7186213a9a5798db8d26ee850de97cb56cde5323..5215d420c52489767866b817ac279aed83ab60e7 100644 --- a/app/code/Magento/Customer/Block/Account/Dashboard/Block.php +++ b/app/code/Magento/Customer/Block/Account/Dashboard/Block.php @@ -27,7 +27,7 @@ namespace Magento\Customer\Block\Account\Dashboard; -class Block extends \Magento\Core\Block\Template +class Block extends \Magento\View\Block\Template { } diff --git a/app/code/Magento/Customer/Block/Account/Dashboard/Hello.php b/app/code/Magento/Customer/Block/Account/Dashboard/Hello.php index 3e6b1b3fc9f4933472dcb8518321be921d529432..3aa0b3e3475736981cab1d6f9f1fbc95527cfde1 100644 --- a/app/code/Magento/Customer/Block/Account/Dashboard/Hello.php +++ b/app/code/Magento/Customer/Block/Account/Dashboard/Hello.php @@ -27,7 +27,7 @@ namespace Magento\Customer\Block\Account\Dashboard; -class Hello extends \Magento\Core\Block\Template +class Hello extends \Magento\View\Block\Template { /** * @var \Magento\Customer\Model\Session @@ -35,19 +35,19 @@ class Hello extends \Magento\Core\Block\Template protected $_customerSession; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Customer\Model\Session $customerSession * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Customer\Model\Session $customerSession, array $data = array() ) { $this->_customerSession = $customerSession; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } public function getCustomerName() diff --git a/app/code/Magento/Customer/Block/Account/Dashboard/Info.php b/app/code/Magento/Customer/Block/Account/Dashboard/Info.php index 8156397ef2880411e64d5ff9eb9e82510f1b1e4d..1687e8bb5f6fe7aa3c877bfbedfdded83382db38 100644 --- a/app/code/Magento/Customer/Block/Account/Dashboard/Info.php +++ b/app/code/Magento/Customer/Block/Account/Dashboard/Info.php @@ -34,7 +34,7 @@ namespace Magento\Customer\Block\Account\Dashboard; -class Info extends \Magento\Core\Block\Template +class Info extends \Magento\View\Block\Template { /** * Cached subscription object @@ -54,22 +54,22 @@ class Info extends \Magento\Core\Block\Template protected $_subscriberFactory; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Customer\Model\Session $customerSession, \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory, array $data = array() ) { $this->_customerSession = $customerSession; $this->_subscriberFactory = $subscriberFactory; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } diff --git a/app/code/Magento/Customer/Block/Account/Dashboard/Newsletter.php b/app/code/Magento/Customer/Block/Account/Dashboard/Newsletter.php index 7b88b251b875ddcd8e54cc28580e3a9478235c67..bab61998c26fd89c8aadadcbb8366f58e80cc79b 100644 --- a/app/code/Magento/Customer/Block/Account/Dashboard/Newsletter.php +++ b/app/code/Magento/Customer/Block/Account/Dashboard/Newsletter.php @@ -34,7 +34,7 @@ namespace Magento\Customer\Block\Account\Dashboard; -class Newsletter extends \Magento\Core\Block\Template +class Newsletter extends \Magento\View\Block\Template { /** * @var \Magento\Newsletter\Model\Subscriber @@ -51,16 +51,23 @@ class Newsletter extends \Magento\Core\Block\Template */ protected $_subscriberFactory; + /** + * @param \Magento\View\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Customer\Model\Session $customerSession + * @param \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory + * @param array $data + */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Customer\Model\Session $customerSession, \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory, array $data = array() ) { $this->_customerSession = $customerSession; $this->_subscriberFactory = $subscriberFactory; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } public function getSubscriptionObject() diff --git a/app/code/Magento/Customer/Block/Account/Dashboard/Sidebar.php b/app/code/Magento/Customer/Block/Account/Dashboard/Sidebar.php index d71135487bd5fd33ae4d2c5502770b9398c5ee51..4dc447ac5fb3c1faab1f41b97e195226f74b5c7f 100644 --- a/app/code/Magento/Customer/Block/Account/Dashboard/Sidebar.php +++ b/app/code/Magento/Customer/Block/Account/Dashboard/Sidebar.php @@ -34,7 +34,7 @@ namespace Magento\Customer\Block\Account\Dashboard; -class Sidebar extends \Magento\Core\Block\Template +class Sidebar extends \Magento\View\Block\Template { protected $_cartItemsCount; @@ -57,11 +57,6 @@ class Sidebar extends \Magento\Core\Block\Template */ protected $_checkoutSession; - /** - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - /** * @var \Magento\Sales\Model\QuoteFactory */ @@ -78,22 +73,20 @@ class Sidebar extends \Magento\Core\Block\Template protected $_itemsCompareFactory; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Checkout\Model\Session $checkoutSession - * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Sales\Model\QuoteFactory $quoteFactory * @param \Magento\Wishlist\Model\WishlistFactory $wishListFactory * @param \Magento\Catalog\Model\Resource\Product\Compare\Item\CollectionFactory $itemsCompareFactory * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Customer\Model\Session $customerSession, \Magento\Checkout\Model\Session $checkoutSession, - \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Sales\Model\QuoteFactory $quoteFactory, \Magento\Wishlist\Model\WishlistFactory $wishListFactory, \Magento\Catalog\Model\Resource\Product\Compare\Item\CollectionFactory $itemsCompareFactory, @@ -101,11 +94,10 @@ class Sidebar extends \Magento\Core\Block\Template ) { $this->_customerSession = $customerSession; $this->_checkoutSession = $checkoutSession; - $this->_storeManager = $storeManager; $this->_quoteFactory = $quoteFactory; $this->_wishListFactory = $wishListFactory; $this->_itemsCompareFactory = $itemsCompareFactory; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } diff --git a/app/code/Magento/Customer/Block/Account/Forgotpassword.php b/app/code/Magento/Customer/Block/Account/Forgotpassword.php index a4932ac078e80ae5fa0ec357de15261ffa1f0420..3806aca5ca135cb341dfed3ef53554061f55d7c9 100644 --- a/app/code/Magento/Customer/Block/Account/Forgotpassword.php +++ b/app/code/Magento/Customer/Block/Account/Forgotpassword.php @@ -34,7 +34,7 @@ namespace Magento\Customer\Block\Account; -class Forgotpassword extends \Magento\Core\Block\Template +class Forgotpassword extends \Magento\View\Block\Template { } diff --git a/app/code/Magento/Customer/Block/Account/RegisterLink.php b/app/code/Magento/Customer/Block/Account/RegisterLink.php index 32a7625e99f7860b2756c18d346e364d2e843fbe..fc4a6b688c410b205cdcb97a3f3d6c3115c7df80 100644 --- a/app/code/Magento/Customer/Block/Account/RegisterLink.php +++ b/app/code/Magento/Customer/Block/Account/RegisterLink.php @@ -37,18 +37,18 @@ class RegisterLink extends \Magento\Page\Block\Link protected $_customerSession; /** - * @param \Magento\Core\Block\Template\Context $context - * @param \Magento\Customer\Model\Session $session + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Customer\Model\Session $session * @param array $data */ public function __construct( - \Magento\Core\Block\Template\Context $context, - \Magento\Customer\Model\Session $session, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, + \Magento\Customer\Model\Session $session, array $data = array() ) { - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); $this->_customerSession = $session; } diff --git a/app/code/Magento/Customer/Block/Account/Resetpassword.php b/app/code/Magento/Customer/Block/Account/Resetpassword.php index ae48a3a15622d1df5dc779cb80d741ce42e22c17..212137a0241bbef95668d592c611c5cdfe41dac9 100644 --- a/app/code/Magento/Customer/Block/Account/Resetpassword.php +++ b/app/code/Magento/Customer/Block/Account/Resetpassword.php @@ -34,7 +34,7 @@ namespace Magento\Customer\Block\Account; -class Resetpassword extends \Magento\Core\Block\Template +class Resetpassword extends \Magento\View\Block\Template { } diff --git a/app/code/Magento/Customer/Block/Address/Book.php b/app/code/Magento/Customer/Block/Address/Book.php index a760323ab751faec5236fa14d587eb669e5289ea..7dcc00c280759dc02ae138656251e0d0e73313c9 100644 --- a/app/code/Magento/Customer/Block/Address/Book.php +++ b/app/code/Magento/Customer/Block/Address/Book.php @@ -33,7 +33,7 @@ */ namespace Magento\Customer\Block\Address; -class Book extends \Magento\Core\Block\Template +class Book extends \Magento\View\Block\Template { /** * @var \Magento\Customer\Model\Session @@ -41,19 +41,19 @@ class Book extends \Magento\Core\Block\Template protected $_customerSession; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Customer\Model\Session $customerSession * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Customer\Model\Session $customerSession, array $data = array() ) { $this->_customerSession = $customerSession; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _prepareLayout() diff --git a/app/code/Magento/Customer/Block/Address/Edit.php b/app/code/Magento/Customer/Block/Address/Edit.php index bb5ff34e22b52c6681167ebd1995bbdd13f5d734..dd028ffc6af5033de60b3ca9b56d18f5360e2809 100644 --- a/app/code/Magento/Customer/Block/Address/Edit.php +++ b/app/code/Magento/Customer/Block/Address/Edit.php @@ -51,10 +51,9 @@ class Edit extends \Magento\Directory\Block\Data protected $_addressFactory; /** - * @param \Magento\Core\Block\Template\Context $context + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData * @param \Magento\App\Cache\Type\Config $configCacheType - * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollFactory * @param \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollFactory * @param \Magento\Core\Model\Config $config @@ -63,10 +62,9 @@ class Edit extends \Magento\Directory\Block\Data * @param array $data */ public function __construct( - \Magento\Core\Block\Template\Context $context, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, \Magento\App\Cache\Type\Config $configCacheType, - \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollFactory, \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollFactory, \Magento\Core\Model\Config $config, @@ -77,9 +75,7 @@ class Edit extends \Magento\Directory\Block\Data $this->_config = $config; $this->_customerSession = $customerSession; $this->_addressFactory = $addressFactory; - parent::__construct( - $configCacheType, $coreData, $context, $storeManager, $regionCollFactory, $countryCollFactory, $data - ); + parent::__construct($context, $coreData, $configCacheType, $regionCollFactory, $countryCollFactory, $data); } protected function _prepareLayout() diff --git a/app/code/Magento/Customer/Block/Address/Renderer/DefaultRenderer.php b/app/code/Magento/Customer/Block/Address/Renderer/DefaultRenderer.php index 562fe204b05ba84582354a2f7538be28bd783d23..068f0c09d762fd21ac369893c82ad6f1332a39c3 100644 --- a/app/code/Magento/Customer/Block/Address/Renderer/DefaultRenderer.php +++ b/app/code/Magento/Customer/Block/Address/Renderer/DefaultRenderer.php @@ -35,7 +35,7 @@ namespace Magento\Customer\Block\Address\Renderer; class DefaultRenderer - extends \Magento\Core\Block\AbstractBlock + extends \Magento\View\Block\AbstractBlock implements \Magento\Customer\Block\Address\Renderer\RendererInterface { /** @@ -58,27 +58,19 @@ class DefaultRenderer protected $_attrDataFactory; /** - * @var \Magento\Filter\FilterManager - */ - protected $_filterManager; - - /** + * @param \Magento\View\Block\Context $context * @param \Magento\Customer\Helper\Address $customerAddress - * @param \Magento\Core\Block\Context $context * @param \Magento\Eav\Model\AttributeDataFactory $attrDataFactory - * @param \Magento\Filter\FilterManager $filterManager * @param array $data */ public function __construct( + \Magento\View\Block\Context $context, \Magento\Customer\Helper\Address $customerAddress, - \Magento\Core\Block\Context $context, \Magento\Eav\Model\AttributeDataFactory $attrDataFactory, - \Magento\Filter\FilterManager $filterManager, array $data = array() ) { $this->_customerAddress = $customerAddress; $this->_attrDataFactory = $attrDataFactory; - $this->_filterManager = $filterManager; parent::__construct($context, $data); } @@ -170,6 +162,6 @@ class DefaultRenderer } $format = !is_null($format) ? $format : $this->getFormat($address); - return $this->_filterManager->template($format, array('variables' => $data)); + return $this->filterManager->template($format, array('variables' => $data)); } } diff --git a/app/code/Magento/Customer/Block/Adminhtml/Edit.php b/app/code/Magento/Customer/Block/Adminhtml/Edit.php index 4f07cc0a83dabf062a088cd0362398e78f5e86ac..a386b98f3dc4de4acb9066d40a50b5d847fdfc71 100644 --- a/app/code/Magento/Customer/Block/Adminhtml/Edit.php +++ b/app/code/Magento/Customer/Block/Adminhtml/Edit.php @@ -42,20 +42,20 @@ class Edit extends \Magento\Adminhtml\Block\Widget\Form\Container */ protected $_coreRegistry = null; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _construct() diff --git a/app/code/Magento/Customer/Block/Adminhtml/Edit/Renderer/Attribute/Group.php b/app/code/Magento/Customer/Block/Adminhtml/Edit/Renderer/Attribute/Group.php index 33d966bacd76ed2fb475e83f2f9d8a3aedc9ee43..d32bcbad18739048c46bbd7456c3598322a94c7f 100644 --- a/app/code/Magento/Customer/Block/Adminhtml/Edit/Renderer/Attribute/Group.php +++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Renderer/Attribute/Group.php @@ -52,23 +52,23 @@ class Group */ protected $_coreRegistry = null; - /** - * @param \Magento\Customer\Helper\Address $customerAddress - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Customer\Helper\Address $customerAddress + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Customer\Helper\Address $customerAddress, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Customer\Helper\Address $customerAddress, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; $this->_customerAddress = $customerAddress; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Account.php b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Account.php index fcacd7a01424a7fe39c0a7a4e92b5343774c7f84..8a41f3340bc76d6466efe509c8f1d9be32f69872 100644 --- a/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Account.php +++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Account.php @@ -55,27 +55,27 @@ class Account extends \Magento\Backend\Block\Widget\Form\Generic */ protected $_systemStore; - /** - * @param \Magento\Customer\Model\FormFactory $customerFactory - * @param \Magento\Core\Model\System\Store $systemStore - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Customer\Model\FormFactory $customerFactory + * @param \Magento\Core\Model\System\Store $systemStore + * @param array $data */ - public function __construct( - \Magento\Customer\Model\FormFactory $customerFactory, - \Magento\Core\Model\System\Store $systemStore, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Customer\Model\FormFactory $customerFactory, + \Magento\Core\Model\System\Store $systemStore, + array $data = array() + ) { $this->_systemStore = $systemStore; $this->_customerFactory = $customerFactory; - parent::__construct($registry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); } /** diff --git a/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Addresses.php b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Addresses.php index 00ae692a3550cda1072d8876e8bcc26664a588f1..92b5ee0d467e1951a15c02234a9945d81dd5ae6b 100644 --- a/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Addresses.php +++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Addresses.php @@ -44,36 +44,36 @@ class Addresses extends \Magento\Backend\Block\Widget\Form\Generic */ protected $_adminhtmlAddresses = null; - /** - * @param \Magento\Customer\Model\Renderer\RegionFactory $regionFactory - * @param \Magento\Customer\Model\AddressFactory $addressFactory - * @param \Magento\Customer\Model\FormFactory $customerFactory - * @param \Magento\Core\Model\System\Store $systemStore - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Adminhtml\Helper\Addresses $adminhtmlAddresses - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Customer\Model\Renderer\RegionFactory $regionFactory + * @param \Magento\Customer\Model\AddressFactory $addressFactory + * @param \Magento\Customer\Model\FormFactory $customerFactory + * @param \Magento\Core\Model\System\Store $systemStore + * @param \Magento\Adminhtml\Helper\Addresses $adminhtmlAddresses + * @param array $data */ - public function __construct( - \Magento\Customer\Model\Renderer\RegionFactory $regionFactory, - \Magento\Customer\Model\AddressFactory $addressFactory, - \Magento\Customer\Model\FormFactory $customerFactory, - \Magento\Core\Model\System\Store $systemStore, - \Magento\Data\FormFactory $formFactory, - \Magento\Adminhtml\Helper\Addresses $adminhtmlAddresses, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Customer\Model\Renderer\RegionFactory $regionFactory, + \Magento\Customer\Model\AddressFactory $addressFactory, + \Magento\Customer\Model\FormFactory $customerFactory, + \Magento\Core\Model\System\Store $systemStore, + \Magento\Adminhtml\Helper\Addresses $adminhtmlAddresses, + array $data = array() + ) { $this->_adminhtmlAddresses = $adminhtmlAddresses; $this->_regionFactory = $regionFactory; $this->_addressFactory = $addressFactory; $this->_customerFactory = $customerFactory; $this->_systemStore = $systemStore; - parent::__construct($registry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); } public function getRegionsUrl() diff --git a/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Cart.php b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Cart.php index 6a45dccbf8d208550124d496b5bd6d967e3153d3..590ac64c6e1704c36440c77435b0a62111d8f257 100644 --- a/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Cart.php +++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Cart.php @@ -55,30 +55,28 @@ class Cart extends \Magento\Adminhtml\Block\Widget\Grid */ protected $_quoteFactory; - /** - * @param \Magento\Sales\Model\QuoteFactory $quoteFactory - * @param \Magento\Data\CollectionFactory $dataCollectionFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param \Magento\Core\Model\Registry $coreRegistry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Sales\Model\QuoteFactory $quoteFactory + * @param \Magento\Data\CollectionFactory $dataCollectionFactory + * @param \Magento\Core\Model\Registry $coreRegistry + * @param array $data */ - public function __construct( - \Magento\Sales\Model\QuoteFactory $quoteFactory, - \Magento\Data\CollectionFactory $dataCollectionFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - \Magento\Core\Model\Registry $coreRegistry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Sales\Model\QuoteFactory $quoteFactory, + \Magento\Data\CollectionFactory $dataCollectionFactory, + \Magento\Core\Model\Registry $coreRegistry, + array $data = array() + ) { $this->_dataCollectionFactory = $dataCollectionFactory; $this->_coreRegistry = $coreRegistry; $this->_quoteFactory = $quoteFactory; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $data); } protected function _construct() diff --git a/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Carts.php b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Carts.php index cb7d707b7690bbae527daf6e840eb6493d6fdab9..239057fd6907c5de918c933d8bac388a03196c89 100644 --- a/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Carts.php +++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Carts.php @@ -39,20 +39,20 @@ class Carts extends \Magento\Backend\Block\Template */ protected $_coreRegistry = null; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Newsletter.php b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Newsletter.php index 12724484f5e982144e0a9504d7bff93ebc8d9476..5f2aa802b5646c350c668dc26a9bef9c5e0e46af 100644 --- a/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Newsletter.php +++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Newsletter.php @@ -42,24 +42,24 @@ class Newsletter extends \Magento\Backend\Block\Widget\Form\Generic */ protected $_subscriberFactory; - /** - * @param \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory + * @param array $data */ - public function __construct( - \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory, + array $data = array() + ) { $this->_subscriberFactory = $subscriberFactory; - parent::__construct($registry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); } public function initForm() diff --git a/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Newsletter/Grid.php b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Newsletter/Grid.php index 810b8a4c7279527071da3f3d07643d968b98686a..ba3cd074bcfe7dad37a167436c387371f56b0f49 100644 --- a/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Newsletter/Grid.php +++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Newsletter/Grid.php @@ -47,27 +47,25 @@ class Grid extends \Magento\Adminhtml\Block\Widget\Grid */ protected $_collectionFactory; - /** - * @param \Magento\Newsletter\Model\Resource\Queue\CollectionFactory $collectionFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param \Magento\Core\Model\Registry $coreRegistry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Newsletter\Model\Resource\Queue\CollectionFactory $collectionFactory + * @param \Magento\Core\Model\Registry $coreRegistry + * @param array $data */ - public function __construct( - \Magento\Newsletter\Model\Resource\Queue\CollectionFactory $collectionFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - \Magento\Core\Model\Registry $coreRegistry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Newsletter\Model\Resource\Queue\CollectionFactory $collectionFactory, + \Magento\Core\Model\Registry $coreRegistry, + array $data = array() + ) { $this->_coreRegistry = $coreRegistry; $this->_collectionFactory = $collectionFactory; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $data); } protected function _construct() diff --git a/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Orders.php b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Orders.php index e93d4db5440152ef82131e64b49c752ddd47b5ec..d8e6ce160735397d75655ec086e23f8aa5824f28 100644 --- a/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Orders.php +++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Orders.php @@ -54,30 +54,28 @@ class Orders extends \Magento\Adminhtml\Block\Widget\Grid */ protected $_collectionFactory; - /** - * @param \Magento\Sales\Model\Resource\Order\Grid\CollectionFactory $collectionFactory - * @param \Magento\Sales\Helper\Reorder $salesReorder - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param \Magento\Core\Model\Registry $coreRegistry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Sales\Model\Resource\Order\Grid\CollectionFactory $collectionFactory + * @param \Magento\Sales\Helper\Reorder $salesReorder + * @param \Magento\Core\Model\Registry $coreRegistry + * @param array $data */ - public function __construct( - \Magento\Sales\Model\Resource\Order\Grid\CollectionFactory $collectionFactory, - \Magento\Sales\Helper\Reorder $salesReorder, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - \Magento\Core\Model\Registry $coreRegistry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Sales\Model\Resource\Order\Grid\CollectionFactory $collectionFactory, + \Magento\Sales\Helper\Reorder $salesReorder, + \Magento\Core\Model\Registry $coreRegistry, + array $data = array() + ) { $this->_coreRegistry = $coreRegistry; $this->_salesReorder = $salesReorder; $this->_collectionFactory = $collectionFactory; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $data); } protected function _construct() diff --git a/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/View.php b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/View.php index 068335dafe17c3b051ac795da06e93bb81579ebb..b09949e9a88706196b1105d2691e53fd2deed2d8 100644 --- a/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/View.php +++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/View.php @@ -71,32 +71,32 @@ class View */ protected $dateTime; - /** - * @param \Magento\Customer\Model\GroupFactory $groupFactory - * @param \Magento\Log\Model\CustomerFactory $logFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Log\Model\Visitor $modelVisitor - * @param \Magento\Stdlib\DateTime $dateTime - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Customer\Model\GroupFactory $groupFactory + * @param \Magento\Log\Model\CustomerFactory $logFactory + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Log\Model\Visitor $modelVisitor + * @param \Magento\Stdlib\DateTime $dateTime + * @param array $data */ - public function __construct( - \Magento\Customer\Model\GroupFactory $groupFactory, - \Magento\Log\Model\CustomerFactory $logFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - \Magento\Log\Model\Visitor $modelVisitor, - \Magento\Stdlib\DateTime $dateTime, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Customer\Model\GroupFactory $groupFactory, + \Magento\Log\Model\CustomerFactory $logFactory, + \Magento\Core\Model\Registry $registry, + \Magento\Log\Model\Visitor $modelVisitor, + \Magento\Stdlib\DateTime $dateTime, + array $data = array() + ) { $this->_coreRegistry = $registry; $this->_modelVisitor = $modelVisitor; $this->_groupFactory = $groupFactory; $this->_logFactory = $logFactory; $this->dateTime = $dateTime; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/View/Accordion.php b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/View/Accordion.php index cf6dc2ce0217bc973fe6f69cb32df48f3c11d432..782249d96d70661b67efce76ea2d7e796f4b0f5d 100644 --- a/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/View/Accordion.php +++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/View/Accordion.php @@ -52,26 +52,26 @@ class Accordion extends \Magento\Adminhtml\Block\Widget\Accordion */ protected $_itemsFactory; - /** - * @param \Magento\Sales\Model\QuoteFactory $quoteFactory - * @param \Magento\Wishlist\Model\Resource\Item\CollectionFactory $itemsFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Sales\Model\QuoteFactory $quoteFactory + * @param \Magento\Wishlist\Model\Resource\Item\CollectionFactory $itemsFactory + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Sales\Model\QuoteFactory $quoteFactory, - \Magento\Wishlist\Model\Resource\Item\CollectionFactory $itemsFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Sales\Model\QuoteFactory $quoteFactory, + \Magento\Wishlist\Model\Resource\Item\CollectionFactory $itemsFactory, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; $this->_quoteFactory = $quoteFactory; $this->_itemsFactory = $itemsFactory; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _prepareLayout() diff --git a/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/View/Cart.php b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/View/Cart.php index e785014f58d9cb2c1c8732fc75ce2a974df75f39..ed0cb7edec65c08c5af4f2d099703c756dbada14 100644 --- a/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/View/Cart.php +++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/View/Cart.php @@ -55,30 +55,28 @@ class Cart extends \Magento\Adminhtml\Block\Widget\Grid */ protected $_quoteFactory; - /** - * @param \Magento\Sales\Model\QuoteFactory $quoteFactory - * @param \Magento\Data\CollectionFactory $dataCollectionFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param \Magento\Core\Model\Registry $coreRegistry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Sales\Model\QuoteFactory $quoteFactory + * @param \Magento\Data\CollectionFactory $dataCollectionFactory + * @param \Magento\Core\Model\Registry $coreRegistry + * @param array $data */ - public function __construct( - \Magento\Sales\Model\QuoteFactory $quoteFactory, - \Magento\Data\CollectionFactory $dataCollectionFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - \Magento\Core\Model\Registry $coreRegistry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Sales\Model\QuoteFactory $quoteFactory, + \Magento\Data\CollectionFactory $dataCollectionFactory, + \Magento\Core\Model\Registry $coreRegistry, + array $data = array() + ) { $this->_dataCollectionFactory = $dataCollectionFactory; $this->_coreRegistry = $coreRegistry; $this->_quoteFactory = $quoteFactory; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $data); } protected function _construct() diff --git a/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/View/Grid/Renderer/Item.php b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/View/Grid/Renderer/Item.php index 518579ba1d3a66276665e630269e52e246925fd7..eeda163bb5f552f6e417abdb7cd31944364a4cf7 100644 --- a/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/View/Grid/Renderer/Item.php +++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/View/Grid/Renderer/Item.php @@ -43,16 +43,16 @@ class Item */ protected $_productConfig = null; - /** - * @param \Magento\Catalog\Helper\Product\Configuration $productConfig - * @param \Magento\Backend\Block\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Context $context + * @param \Magento\Catalog\Helper\Product\Configuration $productConfig + * @param array $data */ - public function __construct( - \Magento\Catalog\Helper\Product\Configuration $productConfig, - \Magento\Backend\Block\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Context $context, + \Magento\Catalog\Helper\Product\Configuration $productConfig, + array $data = array() + ) { $this->_productConfig = $productConfig; parent::__construct($context, $data); } diff --git a/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/View/Orders.php b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/View/Orders.php index 316a4266648ee8f6cd02882770dd5ed92ecb0d2a..6e4c3cbf408864ca891fb4a95c2185d2e6c15a0d 100644 --- a/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/View/Orders.php +++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/View/Orders.php @@ -47,27 +47,25 @@ class Orders extends \Magento\Adminhtml\Block\Widget\Grid */ protected $_collectionFactory; - /** - * @param \Magento\Sales\Model\Resource\Order\Grid\CollectionFactory $collectionFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param \Magento\Core\Model\Registry $coreRegistry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Sales\Model\Resource\Order\Grid\CollectionFactory $collectionFactory + * @param \Magento\Core\Model\Registry $coreRegistry + * @param array $data */ - public function __construct( - \Magento\Sales\Model\Resource\Order\Grid\CollectionFactory $collectionFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - \Magento\Core\Model\Registry $coreRegistry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Sales\Model\Resource\Order\Grid\CollectionFactory $collectionFactory, + \Magento\Core\Model\Registry $coreRegistry, + array $data = array() + ) { $this->_coreRegistry = $coreRegistry; $this->_collectionFactory = $collectionFactory; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $data); } protected function _construct() diff --git a/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/View/Sales.php b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/View/Sales.php index ede7c61b4cd3afa78d348fa0de4129b27976581e..1a50eb89229117082001bd2ccd8da599c54f844e 100644 --- a/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/View/Sales.php +++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/View/Sales.php @@ -53,11 +53,6 @@ class Sales extends \Magento\Backend\Block\Template */ protected $_currency; - /** - * @var \Magento\Core\Model\StoreManager - */ - protected $_storeManager; - /** * @param \Magento\Core\Helper\Data $coreData * Core registry @@ -76,29 +71,26 @@ class Sales extends \Magento\Backend\Block\Template */ protected $_collectionFactory; - /** - * @param \Magento\Directory\Model\CurrencyFactory $currencyFactory - * @param \Magento\Sales\Model\Resource\Sale\CollectionFactory $collectionFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManager $storeManager - * @param \Magento\Core\Model\Registry $coreRegistry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Directory\Model\CurrencyFactory $currencyFactory + * @param \Magento\Sales\Model\Resource\Sale\CollectionFactory $collectionFactory + * @param \Magento\Core\Model\Registry $coreRegistry + * @param array $data */ - public function __construct( - \Magento\Directory\Model\CurrencyFactory $currencyFactory, - \Magento\Sales\Model\Resource\Sale\CollectionFactory $collectionFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManager $storeManager, - \Magento\Core\Model\Registry $coreRegistry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Directory\Model\CurrencyFactory $currencyFactory, + \Magento\Sales\Model\Resource\Sale\CollectionFactory $collectionFactory, + \Magento\Core\Model\Registry $coreRegistry, + array $data = array() + ) { $this->_coreRegistry = $coreRegistry; - $this->_storeManager = $storeManager; $this->_currencyFactory = $currencyFactory; $this->_collectionFactory = $collectionFactory; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _construct() diff --git a/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/View/Wishlist.php b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/View/Wishlist.php index 194d03ab15eb3384754c03d0cdc2c74638e46c87..9b3ead0c890fdcd0d2a5de66c61316491a27e3f4 100644 --- a/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/View/Wishlist.php +++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/View/Wishlist.php @@ -47,27 +47,25 @@ class Wishlist extends \Magento\Adminhtml\Block\Widget\Grid */ protected $_collectionFactory; - /** - * @param \Magento\Wishlist\Model\Resource\Item\CollectionFactory $collectionFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param \Magento\Core\Model\Registry $coreRegistry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Wishlist\Model\Resource\Item\CollectionFactory $collectionFactory + * @param \Magento\Core\Model\Registry $coreRegistry + * @param array $data */ - public function __construct( - \Magento\Wishlist\Model\Resource\Item\CollectionFactory $collectionFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - \Magento\Core\Model\Registry $coreRegistry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Wishlist\Model\Resource\Item\CollectionFactory $collectionFactory, + \Magento\Core\Model\Registry $coreRegistry, + array $data = array() + ) { $this->_coreRegistry = $coreRegistry; $this->_collectionFactory = $collectionFactory; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $data); } /** diff --git a/app/code/Magento/Customer/Block/Adminhtml/Edit/Tabs.php b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tabs.php index b59cacd84192af3ab53f4176612c05e306d20d82..1cd8b1002fa2aef11da47c3dc094ff4632f399e2 100644 --- a/app/code/Magento/Customer/Block/Adminhtml/Edit/Tabs.php +++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tabs.php @@ -38,22 +38,22 @@ class Tabs extends \Magento\Backend\Block\Widget\Tabs */ protected $_coreRegistry = null; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Backend\Model\Auth\Session $authSession - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Backend\Model\Auth\Session $authSession + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Backend\Model\Auth\Session $authSession, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Backend\Model\Auth\Session $authSession, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $authSession, $data); + parent::__construct($context, $coreData, $authSession, $data); } protected function _construct() diff --git a/app/code/Magento/Customer/Block/Adminhtml/Grid.php b/app/code/Magento/Customer/Block/Adminhtml/Grid.php index 8a747d6eaf41cbd36c9d43f265ca6f93bacb3cd6..c01330688de40d6e820387fa3b538d8a2f5ded32 100644 --- a/app/code/Magento/Customer/Block/Adminhtml/Grid.php +++ b/app/code/Magento/Customer/Block/Adminhtml/Grid.php @@ -50,30 +50,28 @@ class Grid extends \Magento\Adminhtml\Block\Widget\Grid */ protected $_groupsFactory; - /** - * @param \Magento\Core\Model\System\Store $systemStore - * @param \Magento\Customer\Model\Resource\Customer\CollectionFactory $customersFactory - * @param \Magento\Customer\Model\Resource\Group\CollectionFactory $groupsFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Core\Model\System\Store $systemStore + * @param \Magento\Customer\Model\Resource\Customer\CollectionFactory $customersFactory + * @param \Magento\Customer\Model\Resource\Group\CollectionFactory $groupsFactory + * @param array $data */ - public function __construct( - \Magento\Core\Model\System\Store $systemStore, - \Magento\Customer\Model\Resource\Customer\CollectionFactory $customersFactory, - \Magento\Customer\Model\Resource\Group\CollectionFactory $groupsFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Core\Model\System\Store $systemStore, + \Magento\Customer\Model\Resource\Customer\CollectionFactory $customersFactory, + \Magento\Customer\Model\Resource\Group\CollectionFactory $groupsFactory, + array $data = array() + ) { $this->_systemStore = $systemStore; $this->_customersFactory = $customersFactory; $this->_groupsFactory = $groupsFactory; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $data); } protected function _construct() diff --git a/app/code/Magento/Customer/Block/Adminhtml/Grid/Filter/Country.php b/app/code/Magento/Customer/Block/Adminhtml/Grid/Filter/Country.php index a42bd8e7d6206fc1ac33f1191861957984d1a649..00c2f72708eb7b7aba357afe57e69c63c25d46e0 100644 --- a/app/code/Magento/Customer/Block/Adminhtml/Grid/Filter/Country.php +++ b/app/code/Magento/Customer/Block/Adminhtml/Grid/Filter/Country.php @@ -41,18 +41,18 @@ class Country */ protected $_collectionFactory; - /** - * @param \Magento\Directory\Model\Resource\Country\CollectionFactory $collectionFactory - * @param \Magento\Backend\Block\Context $context - * @param \Magento\Core\Model\Resource\Helper $resourceHelper - * @param array $data + /** + * @param \Magento\Backend\Block\Context $context + * @param \Magento\Core\Model\Resource\Helper $resourceHelper + * @param \Magento\Directory\Model\Resource\Country\CollectionFactory $collectionFactory + * @param array $data */ - public function __construct( - \Magento\Directory\Model\Resource\Country\CollectionFactory $collectionFactory, - \Magento\Backend\Block\Context $context, - \Magento\Core\Model\Resource\Helper $resourceHelper, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Context $context, + \Magento\Core\Model\Resource\Helper $resourceHelper, + \Magento\Directory\Model\Resource\Country\CollectionFactory $collectionFactory, + array $data = array() + ) { $this->_collectionFactory = $collectionFactory; parent::__construct($context, $resourceHelper, $data); } diff --git a/app/code/Magento/Customer/Block/Adminhtml/Group/Edit.php b/app/code/Magento/Customer/Block/Adminhtml/Group/Edit.php index 563b3f5039492a3ea4b2b33fbc91079083f9345b..f817ab726b9b987b7df32d7128c416999fd044f5 100644 --- a/app/code/Magento/Customer/Block/Adminhtml/Group/Edit.php +++ b/app/code/Magento/Customer/Block/Adminhtml/Group/Edit.php @@ -38,20 +38,20 @@ class Edit extends \Magento\Adminhtml\Block\Widget\Form\Container */ protected $_coreRegistry = null; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _construct() diff --git a/app/code/Magento/Customer/Block/Adminhtml/Group/Edit/Form.php b/app/code/Magento/Customer/Block/Adminhtml/Group/Edit/Form.php index 3d88b7277dee91a78f6667869b619c74207eea28..4d9526b9186e0907c026db99fe3333623ab230b3 100644 --- a/app/code/Magento/Customer/Block/Adminhtml/Group/Edit/Form.php +++ b/app/code/Magento/Customer/Block/Adminhtml/Group/Edit/Form.php @@ -35,37 +35,29 @@ namespace Magento\Customer\Block\Adminhtml\Group\Edit; class Form extends \Magento\Backend\Block\Widget\Form\Generic { - /** - * @var \Magento\Backend\Model\Session - */ - protected $_backendSession; - /** * @var \Magento\Tax\Model\TaxClass\Source\Customer */ protected $_taxCustomer; - /** - * @param \Magento\Backend\Model\Session $backendSession - * @param \Magento\Tax\Model\TaxClass\Source\Customer $taxCustomer - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Tax\Model\TaxClass\Source\Customer $taxCustomer + * @param array $data */ - public function __construct( - \Magento\Backend\Model\Session $backendSession, - \Magento\Tax\Model\TaxClass\Source\Customer $taxCustomer, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Tax\Model\TaxClass\Source\Customer $taxCustomer, + array $data = array() + ) { $this->_taxCustomer = $taxCustomer; - $this->_backendSession = $backendSession; - parent::__construct($registry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); } /** diff --git a/app/code/Magento/Customer/Block/Form/Login.php b/app/code/Magento/Customer/Block/Form/Login.php index d0f0b45cb9d237225efbe201614229df30fc21e2..1664c69413c93f3050684c7d9470b73f21e73817 100644 --- a/app/code/Magento/Customer/Block/Form/Login.php +++ b/app/code/Magento/Customer/Block/Form/Login.php @@ -33,7 +33,7 @@ */ namespace Magento\Customer\Block\Form; -class Login extends \Magento\Core\Block\Template +class Login extends \Magento\View\Block\Template { private $_username = -1; @@ -42,14 +42,20 @@ class Login extends \Magento\Core\Block\Template */ protected $_customerSession; + /** + * @param \Magento\View\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Customer\Model\Session $customerSession + * @param array $data + */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Customer\Model\Session $customerSession, array $data = array() ) { $this->_customerSession = $customerSession; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _prepareLayout() diff --git a/app/code/Magento/Customer/Block/Form/Register.php b/app/code/Magento/Customer/Block/Form/Register.php index 40ef4a7fcddea5300afe898678b7d48e9269d1cd..cebbe3b1d6a27e2f8eb7c068a0e1598340638837 100644 --- a/app/code/Magento/Customer/Block/Form/Register.php +++ b/app/code/Magento/Customer/Block/Form/Register.php @@ -44,32 +44,28 @@ class Register extends \Magento\Directory\Block\Data protected $_customerSession; /** - * @param \Magento\App\Cache\Type\Config $configCacheType + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context - * @param \Magento\Customer\Model\Session $customerSession - * @param \Magento\Customer\Model\AddressFactory $addressFactory - * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\App\Cache\Type\Config $configCacheType * @param \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollFactory * @param \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollFactory + * @param \Magento\Customer\Model\Session $customerSession + * @param \Magento\Customer\Model\AddressFactory $addressFactory * @param array $data */ public function __construct( - \Magento\App\Cache\Type\Config $configCacheType, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, - \Magento\Customer\Model\Session $customerSession, - \Magento\Customer\Model\AddressFactory $addressFactory, - \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\App\Cache\Type\Config $configCacheType, \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollFactory, \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollFactory, + \Magento\Customer\Model\Session $customerSession, + \Magento\Customer\Model\AddressFactory $addressFactory, array $data = array() ) { $this->_customerSession = $customerSession; $this->_addressFactory = $addressFactory; - parent::__construct( - $configCacheType, $coreData, $context, $storeManager, $regionCollFactory, $countryCollFactory, $data - ); + parent::__construct($context, $coreData, $configCacheType, $regionCollFactory, $countryCollFactory, $data); } /** diff --git a/app/code/Magento/Customer/Block/Newsletter.php b/app/code/Magento/Customer/Block/Newsletter.php index c7898920860cc12024d9125cba37056585e5d191..83243a3e4a095d724a5a74c7ed197f4259671dcb 100644 --- a/app/code/Magento/Customer/Block/Newsletter.php +++ b/app/code/Magento/Customer/Block/Newsletter.php @@ -34,7 +34,7 @@ */ namespace Magento\Customer\Block; -class Newsletter extends \Magento\Customer\Block\Account\Dashboard // \Magento\Core\Block\Template +class Newsletter extends \Magento\Customer\Block\Account\Dashboard // \Magento\View\Block\Template { protected $_template = 'form/newsletter.phtml'; diff --git a/app/code/Magento/Customer/Block/Widget/AbstractWidget.php b/app/code/Magento/Customer/Block/Widget/AbstractWidget.php index 3ca1b54c0437a84a59af293bb3b3c9fb05c7424f..1a2c94bf0c842bb017b031ce5ec57e2446d0f9e9 100644 --- a/app/code/Magento/Customer/Block/Widget/AbstractWidget.php +++ b/app/code/Magento/Customer/Block/Widget/AbstractWidget.php @@ -26,7 +26,7 @@ namespace Magento\Customer\Block\Widget; -class AbstractWidget extends \Magento\Core\Block\Template +class AbstractWidget extends \Magento\View\Block\Template { /** * @var \Magento\Eav\Model\Config @@ -34,19 +34,19 @@ class AbstractWidget extends \Magento\Core\Block\Template protected $_eavConfig; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Eav\Model\Config $eavConfig * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Eav\Model\Config $eavConfig, array $data = array() ) { $this->_eavConfig = $eavConfig; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } public function getConfig($key) diff --git a/app/code/Magento/Customer/Block/Widget/Dob.php b/app/code/Magento/Customer/Block/Widget/Dob.php index 7dd26d45fa2539713e3b7e494bceaecc1955f654..f3fde2af9c30dff16c5e0769d7be940aa5d1bd71 100644 --- a/app/code/Magento/Customer/Block/Widget/Dob.php +++ b/app/code/Magento/Customer/Block/Widget/Dob.php @@ -41,35 +41,9 @@ class Dob extends \Magento\Customer\Block\Widget\AbstractWidget */ protected $_dateInputs = array(); - /** - * @var \Magento\Core\Model\LocaleInterface - */ - protected $_locale; - - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context - * @param \Magento\Eav\Model\Config $eavConfig - * @param \Magento\Core\Model\LocaleInterface $locale - * @param array $data - */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, - \Magento\Eav\Model\Config $eavConfig, - \Magento\Core\Model\LocaleInterface $locale, - array $data = array() - ) { - $this->_locale = $locale; - parent::__construct($coreData, $context, $eavConfig, $data); - } - - public function _construct() { parent::_construct(); - - // default template location $this->setTemplate('widget/dob.phtml'); } diff --git a/app/code/Magento/Customer/Block/Widget/Gender.php b/app/code/Magento/Customer/Block/Widget/Gender.php index 8f140920d1eae5dce9bd909c24c0749f23a2ec35..8ca30eca52e0b81e7bf23e8135d2b62c6e28958b 100644 --- a/app/code/Magento/Customer/Block/Widget/Gender.php +++ b/app/code/Magento/Customer/Block/Widget/Gender.php @@ -46,16 +46,16 @@ class Gender extends \Magento\Customer\Block\Widget\AbstractWidget protected $_customerResource; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Eav\Model\Config $eavConfig * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Customer\Model\Resource\Customer $customerResource * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Eav\Model\Config $eavConfig, \Magento\Customer\Model\Session $customerSession, \Magento\Customer\Model\Resource\Customer $customerResource, @@ -63,7 +63,7 @@ class Gender extends \Magento\Customer\Block\Widget\AbstractWidget ) { $this->_customerSession = $customerSession; $this->_customerResource = $customerResource; - parent::__construct($coreData, $context, $eavConfig, $data); + parent::__construct($context, $coreData, $eavConfig, $data); } /** diff --git a/app/code/Magento/Customer/Block/Widget/Taxvat.php b/app/code/Magento/Customer/Block/Widget/Taxvat.php index 9110f68d0315a9eb1fb8bb9fa9f03f7eca70923e..16758a524cdc0fb9e006fd5c0fb43cb9c553c118 100644 --- a/app/code/Magento/Customer/Block/Widget/Taxvat.php +++ b/app/code/Magento/Customer/Block/Widget/Taxvat.php @@ -34,21 +34,21 @@ class Taxvat extends \Magento\Customer\Block\Widget\AbstractWidget protected $_customerResource; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Eav\Model\Config $eavConfig * @param \Magento\Customer\Model\Session $customerSession * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Eav\Model\Config $eavConfig, \Magento\Customer\Model\Session $customerSession, array $data = array() ) { $this->_customerSession = $customerSession; - parent::__construct($coreData, $context, $eavConfig, $data); + parent::__construct($context, $coreData, $eavConfig, $data); } public function _construct() diff --git a/app/code/Magento/Customer/Controller/Account.php b/app/code/Magento/Customer/Controller/Account.php index 56ac5c3f4bb382c8c188f32d204d297ae85b03d7..7ed23a426ed84cdc9afbf629ab853eddea03c513 100644 --- a/app/code/Magento/Customer/Controller/Account.php +++ b/app/code/Magento/Customer/Controller/Account.php @@ -25,19 +25,13 @@ */ namespace Magento\Customer\Controller; +use Magento\App\RequestInterface; /** * Customer account controller */ -class Account extends \Magento\Core\Controller\Front\Action +class Account extends \Magento\App\Action\Action { - /** - * Action list where need check enabled cookie - * - * @var array - */ - protected $_cookieCheckActions = array('loginPost', 'createpost'); - /** * List of actions that are allowed for not authorized users * @@ -75,11 +69,6 @@ class Account extends \Magento\Core\Controller\Front\Action */ protected $_urlFactory; - /** - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - /** * @var \Magento\Customer\Model\CustomerFactory */ @@ -103,35 +92,43 @@ class Account extends \Magento\Core\Controller\Front\Action protected $string; /** - * @param \Magento\Core\Controller\Varien\Action\Context $context + * @var \Magento\Core\App\Action\FormKeyValidator + */ + protected $_formKeyValidator; + + /** + * @param \Magento\App\Action\Context $context * @param \Magento\Core\Model\Registry $coreRegistry * @param \Magento\Customer\Model\Session $customerSession - * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\UrlFactory $urlFactory * @param \Magento\Customer\Model\CustomerFactory $customerFactory * @param \Magento\Customer\Model\FormFactory $formFactory * @param \Magento\Customer\Model\AddressFactory $addressFactory * @param \Magento\Stdlib\String $string + * @param \Magento\Core\App\Action\FormKeyValidator $formKeyValidator + * @param \Magento\Core\Model\StoreManagerInterface $storeManager */ public function __construct( - \Magento\Core\Controller\Varien\Action\Context $context, + \Magento\App\Action\Context $context, \Magento\Core\Model\Registry $coreRegistry, \Magento\Customer\Model\Session $customerSession, - \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\UrlFactory $urlFactory, \Magento\Customer\Model\CustomerFactory $customerFactory, \Magento\Customer\Model\FormFactory $formFactory, \Magento\Customer\Model\AddressFactory $addressFactory, - \Magento\Stdlib\String $string + \Magento\Stdlib\String $string, + \Magento\Core\App\Action\FormKeyValidator $formKeyValidator, + \Magento\Core\Model\StoreManagerInterface $storeManager ) { + $this->_storeManager = $storeManager; $this->_coreRegistry = $coreRegistry; $this->_customerSession = $customerSession; - $this->_storeManager = $storeManager; $this->_urlFactory = $urlFactory; $this->_customerFactory = $customerFactory; $this->_formFactory = $formFactory; $this->_addressFactory = $addressFactory; $this->string = $string; + $this->_formKeyValidator = $formKeyValidator; parent::__construct($context); } @@ -146,22 +143,29 @@ class Account extends \Magento\Core\Controller\Front\Action } /** - * Action predispatch + * Get list of actions that are allowed for not authorized users * - * Check customer authentication for some actions + * @return array */ - public function preDispatch() + protected function _getAllowedActions() { - // a brute-force protection here would be nice - - parent::preDispatch(); + return $this->_openActions; + } + /** + * Dispatch request + * + * @param RequestInterface $request + * @return mixed|void + */ + public function dispatch(RequestInterface $request) + { if (!$this->_objectManager->get('Magento\App\State')->isInstalled()) { - return; + parent::dispatch($request); } if (!$this->getRequest()->isDispatched()) { - return; + parent::dispatch($request); } $action = $this->getRequest()->getActionName(); @@ -169,32 +173,14 @@ class Account extends \Magento\Core\Controller\Front\Action if (!preg_match($pattern, $action)) { if (!$this->_getSession()->authenticate($this)) { - $this->setFlag('', 'no-dispatch', true); + $this->_actionFlag->set('', 'no-dispatch', true); } } else { $this->_getSession()->setNoReferer(true); } - } - - /** - * Get list of actions that are allowed for not authorized users - * - * @return array - */ - protected function _getAllowedActions() - { - return $this->_openActions; - } - - /** - * Action postdispatch - * - * Remove No-referer flag from customer session after each action - */ - public function postDispatch() - { - parent::postDispatch(); + $result = parent::dispatch($request); $this->_getSession()->unsNoReferer(false); + return $result; } /** @@ -202,11 +188,11 @@ class Account extends \Magento\Core\Controller\Front\Action */ public function indexAction() { - $this->loadLayout(); - $this->_initLayoutMessages('Magento\Customer\Model\Session'); - $this->_initLayoutMessages('Magento\Catalog\Model\Session'); - $this->getLayout()->getBlock('head')->setTitle(__('My Account')); - $this->renderLayout(); + $this->_view->loadLayout(); + $messageStores = array('Magento\Customer\Model\Session', 'Magento\Catalog\Model\Session'); + $this->_view->getLayout()->initMessages($messageStores); + $this->_view->getLayout()->getBlock('head')->setTitle(__('My Account')); + $this->_view->renderLayout(); } /** @@ -219,10 +205,10 @@ class Account extends \Magento\Core\Controller\Front\Action return; } $this->getResponse()->setHeader('Login-Required', 'true'); - $this->loadLayout(); - $this->_initLayoutMessages('Magento\Customer\Model\Session'); - $this->_initLayoutMessages('Magento\Catalog\Model\Session'); - $this->renderLayout(); + $this->_view->loadLayout(); + $messageStores = array('Magento\Customer\Model\Session', 'Magento\Catalog\Model\Session'); + $this->_view->getLayout()->initMessages($messageStores); + $this->_view->renderLayout(); } /** @@ -296,7 +282,7 @@ class Account extends \Magento\Core\Controller\Front\Action $referer = $this->getRequest()->getParam(\Magento\Customer\Helper\Data::REFERER_QUERY_PARAM_NAME); if ($referer) { $referer = $this->_objectManager->get('Magento\Core\Helper\Data')->urlDecode($referer); - if ($this->_isUrlInternal($referer)) { + if ($this->_url->isInternal($referer)) { $session->setBeforeAuthUrl($referer); } } @@ -316,7 +302,7 @@ class Account extends \Magento\Core\Controller\Front\Action $session->setBeforeAuthUrl($session->getAfterAuthUrl(true)); } } - $this->_redirectUrl($session->getBeforeAuthUrl(true)); + $this->getResponse()->setRedirect($session->getBeforeAuthUrl(true)); } /** @@ -327,7 +313,7 @@ class Account extends \Magento\Core\Controller\Front\Action $lastCustomerId = $this->_getSession()->getId(); $this->_getSession()->logout() ->renewSession() - ->setBeforeAuthUrl($this->_getRefererUrl()) + ->setBeforeAuthUrl($this->_redirect->getRefererUrl()) ->setLastCustomerId($lastCustomerId); $this->_redirect('*/*/logoutSuccess'); @@ -338,8 +324,8 @@ class Account extends \Magento\Core\Controller\Front\Action */ public function logoutSuccessAction() { - $this->loadLayout(); - $this->renderLayout(); + $this->_view->loadLayout(); + $this->_view->renderLayout(); } /** @@ -352,9 +338,9 @@ class Account extends \Magento\Core\Controller\Front\Action return; } - $this->loadLayout(); - $this->_initLayoutMessages('Magento\Customer\Model\Session'); - $this->renderLayout(); + $this->_view->loadLayout(); + $this->_view->getLayout()->initMessages('Magento\Customer\Model\Session'); + $this->_view->renderLayout(); } /** @@ -370,7 +356,8 @@ class Account extends \Magento\Core\Controller\Front\Action $session->setEscapeMessages(true); // prevent XSS injection in user input if (!$this->getRequest()->isPost()) { - $this->_redirectError($this->_createUrl()->getUrl('*/*/create', array('_secure' => true))); + $url = $this->_createUrl()->getUrl('*/*/create', array('_secure' => true)); + $this->getResponse()->setRedirect($this->_redirect->error($url)); return; } @@ -398,11 +385,12 @@ class Account extends \Magento\Core\Controller\Front\Action $session->addSuccess( __('Account confirmation is required. Please, check your email for the confirmation link. To resend the confirmation email please <a href="%1">click here</a>.', $email) ); - $this->_redirectSuccess($this->_createUrl()->getUrl('*/*/index', array('_secure' => true))); + $url = $this->_createUrl()->getUrl('*/*/index', array('_secure' => true)); + $this->getResponse()->setRedirect($this->_redirect->success($url)); } else { $session->setCustomerAsLoggedIn($customer); $url = $this->_welcomeCustomer($customer); - $this->_redirectSuccess($url); + $this->getResponse()->setRedirect($this->_redirect->success($url)); } return; } catch (\Magento\Core\Exception $e) { @@ -425,7 +413,8 @@ class Account extends \Magento\Core\Controller\Front\Action } $session->setCustomerFormData($this->getRequest()->getPost()); - $this->_redirectError($this->_createUrl()->getUrl('*/*/create', array('_secure' => true))); + $defaultUrl = $this->_createUrl()->getUrl('*/*/create', array('_secure' => true)); + $this->getResponse()->setRedirect($this->_redirect->error($defaultUrl)); } /** @@ -554,6 +543,67 @@ class Account extends \Magento\Core\Controller\Front\Action return $successUrl; } + /** + * load customer by id (try/catch in case if it throws exceptions) + * + * @param $customerId + * @return \Magento\Customer\Model\Customer + * @throws \Exception + */ + protected function _loadCustomerById($customerId) + { + try { + /** @var \Magento\Customer\Model\Customer $customer */ + $customer = $this->_createCustomer()->load($customerId); + if ((!$customer) || (!$customer->getId())) { + throw new \Exception('Failed to load customer by id.'); + } + } catch (\Exception $e) { + throw new \Exception(__('Wrong customer account specified.')); + } + return $customer; + } + + /** + * @param \Magento\Customer\Model\Customer $customer + * @throws \Exception + */ + protected function _activateCustomer($customer) + { + try { + $customer->setConfirmation(null); + $customer->save(); + } catch (\Exception $e) { + throw new \Exception(__('Failed to confirm customer account.')); + } + } + + /** + * @param \Magento\Customer\Model\Customer $customer + * @param mixed $key + * @return bool|null + * @throws \Exception + */ + protected function _checkCustomerActive($customer, $key) + { + $backUrl = $this->getRequest()->getParam('back_url', false); + + // check if it is inactive + if ($customer->getConfirmation()) { + if ($customer->getConfirmation() !== $key) { + throw new \Exception(__('Wrong confirmation key.')); + } + $this->_activateCustomer($customer); + + // log in and send greeting email, then die happy + $this->_getSession()->setCustomerAsLoggedIn($customer); + $successUrl = $this->_welcomeCustomer($customer, true); + $url = $backUrl ? $backUrl : $successUrl; + $this->getResponse()->setRedirect($this->_redirect->success($url)); + return true; + } + } + /** * Confirm customer account by id and confirmation key */ @@ -566,54 +616,55 @@ class Account extends \Magento\Core\Controller\Front\Action try { $customerId = $this->getRequest()->getParam('id', false); $key = $this->getRequest()->getParam('key', false); - $backUrl = $this->getRequest()->getParam('back_url', false); if (empty($customerId) || empty($key)) { throw new \Exception(__('Bad request.')); } - // load customer by id (try/catch in case if it throws exceptions) - try { - /** @var \Magento\Customer\Model\Customer $customer */ - $customer = $this->_createCustomer()->load($customerId); - if ((!$customer) || (!$customer->getId())) { - throw new \Exception('Failed to load customer by id.'); - } - } catch (\Exception $e) { - throw new \Exception(__('Wrong customer account specified.')); - } - - // check if it is inactive - if ($customer->getConfirmation()) { - if ($customer->getConfirmation() !== $key) { - throw new \Exception(__('Wrong confirmation key.')); - } - - // activate customer - try { - $customer->setConfirmation(null); - $customer->save(); - } catch (\Exception $e) { - throw new \Exception(__('Failed to confirm customer account.')); - } - - // log in and send greeting email, then die happy - $this->_getSession()->setCustomerAsLoggedIn($customer); - $successUrl = $this->_welcomeCustomer($customer, true); - $this->_redirectSuccess($backUrl ? $backUrl : $successUrl); + $customer = $this->_loadCustomerById($customerId); + if (true === $this->_checkCustomerActive($customer, $key)) { return; } // die happy - $this->_redirectSuccess($this->_createUrl()->getUrl('*/*/index', array('_secure' => true))); + $url = $this->_createUrl()->getUrl('*/*/index', array('_secure' => true)); + $this->getResponse()->setRedirect($this->_redirect->success($url)); return; } catch (\Exception $e) { // die unhappy $this->_getSession()->addError($e->getMessage()); - $this->_redirectError($this->_createUrl()->getUrl('*/*/index', array('_secure' => true))); + $url = $this->_createUrl()->getUrl('*/*/index', array('_secure' => true)); + $this->getResponse()->setRedirect($this->_redirect->error($url)); return; } } + /** + * @param \Magento\Customer\Model\Customer $customer + * @param string $email + */ + protected function _confirmByEmail($customer, $email) + { + try { + $customer->setWebsiteId($this->_storeManager->getStore()->getWebsiteId())->loadByEmail($email); + if (!$customer->getId()) { + throw new \Exception(''); + } + if ($customer->getConfirmation()) { + $customer->sendNewAccountEmail('confirmation', '', $this->_storeManager->getStore()->getId()); + $this->_getSession()->addSuccess(__('Please, check your email for confirmation key.')); + } else { + $this->_getSession()->addSuccess(__('This email does not require confirmation.')); + } + $this->_getSession()->setUsername($email); + $url = $this->_createUrl()->getUrl('*/*/index', array('_secure' => true)); + $this->getResponse()->setRedirect($this->_redirect->success($url)); + } catch (\Exception $e) { + $this->_getSession()->addException($e, __('Wrong email.')); + $url = $this->_createUrl()->getUrl('*/*/*', array('email' => $email, '_secure' => true)); + $this->getResponse()->setRedirect($this->_redirect->error($url)); + } + } + /** * Send confirmation link to specified email */ @@ -628,34 +679,18 @@ class Account extends \Magento\Core\Controller\Front\Action // try to confirm by email $email = $this->getRequest()->getPost('email'); if ($email) { - try { - $customer->setWebsiteId($this->_storeManager->getStore()->getWebsiteId())->loadByEmail($email); - if (!$customer->getId()) { - throw new \Exception(''); - } - if ($customer->getConfirmation()) { - $customer->sendNewAccountEmail('confirmation', '', $this->_storeManager->getStore()->getId()); - $this->_getSession()->addSuccess(__('Please, check your email for confirmation key.')); - } else { - $this->_getSession()->addSuccess(__('This email does not require confirmation.')); - } - $this->_getSession()->setUsername($email); - $this->_redirectSuccess($this->_createUrl()->getUrl('*/*/index', array('_secure' => true))); - } catch (\Exception $e) { - $this->_getSession()->addException($e, __('Wrong email.')); - $this->_redirectError($this->_createUrl()->getUrl('*/*/*', array('email' => $email, '_secure' => true))); - } + $this->_confirmByEmail($customer, $email); return; } // output form - $this->loadLayout(); + $this->_view->loadLayout(); - $this->getLayout()->getBlock('accountConfirmation') + $this->_view->getLayout()->getBlock('accountConfirmation') ->setEmail($this->getRequest()->getParam('email', $email)); - $this->_initLayoutMessages('Magento\Customer\Model\Session'); - $this->renderLayout(); + $this->_view->getLayout()->initMessages('Magento\Customer\Model\Session'); + $this->_view->renderLayout(); } /** @@ -663,15 +698,15 @@ class Account extends \Magento\Core\Controller\Front\Action */ public function forgotPasswordAction() { - $this->loadLayout(); + $this->_view->loadLayout(); - $this->getLayout()->getBlock('forgotPassword')->setEmailValue( + $this->_view->getLayout()->getBlock('forgotPassword')->setEmailValue( $this->_getSession()->getForgottenEmail() ); $this->_getSession()->unsForgottenEmail(); - $this->_initLayoutMessages('Magento\Customer\Model\Session'); - $this->renderLayout(); + $this->_view->getLayout()->initMessages('Magento\Customer\Model\Session'); + $this->_view->renderLayout(); } /** @@ -738,12 +773,12 @@ class Account extends \Magento\Core\Controller\Front\Action $customerId = (int)$this->getRequest()->getParam('id'); try { $this->_validateResetPasswordLinkToken($customerId, $resetPasswordToken); - $this->loadLayout(); + $this->_view->loadLayout(); // Pass received parameters to the reset forgotten password form - $this->getLayout()->getBlock('resetPassword') + $this->_view->getLayout()->getBlock('resetPassword') ->setCustomerId($customerId) ->setResetPasswordLinkToken($resetPasswordToken); - $this->renderLayout(); + $this->_view->renderLayout(); } catch (\Exception $exception) { $this->_getSession()->addError( __('Your password reset link has expired.') @@ -777,10 +812,7 @@ class Account extends \Magento\Core\Controller\Front\Action $errorMessages = array(); if (iconv_strlen($password) <= 0) { - array_push( - $errorMessages, - __('New password field cannot be empty.') - ); + $errorMessages[] = __('New password field cannot be empty.'); } /** @var $customer \Magento\Customer\Model\Customer */ $customer = $this->_createCustomer()->load($customerId); @@ -859,13 +891,13 @@ class Account extends \Magento\Core\Controller\Front\Action */ public function editAction() { - $this->loadLayout(); - $this->_initLayoutMessages('Magento\Customer\Model\Session'); - $this->_initLayoutMessages('Magento\Catalog\Model\Session'); + $this->_view->loadLayout(); + $messageStores = array('Magento\Customer\Model\Session', 'Magento\Catalog\Model\Session'); + $this->_view->getLayout()->initMessages($messageStores); - $block = $this->getLayout()->getBlock('customer_edit'); + $block = $this->_view->getLayout()->getBlock('customer_edit'); if ($block) { - $block->setRefererUrl($this->_getRefererUrl()); + $block->setRefererUrl($this->_redirect->getRefererUrl()); } $data = $this->_getSession()->getCustomerFormData(true); $customer = $this->_getSession()->getCustomer(); @@ -876,9 +908,9 @@ class Account extends \Magento\Core\Controller\Front\Action $customer->setChangePassword(1); } - $this->getLayout()->getBlock('head')->setTitle(__('Account Information')); - $this->getLayout()->getBlock('messages')->setEscapeMessageFlag(true); - $this->renderLayout(); + $this->_view->getLayout()->getBlock('head')->setTitle(__('Account Information')); + $this->_view->getLayout()->getBlock('messages')->setEscapeMessageFlag(true); + $this->_view->renderLayout(); } /** @@ -886,7 +918,7 @@ class Account extends \Magento\Core\Controller\Front\Action */ public function editPostAction() { - if (!$this->_validateFormKey()) { + if (!$this->_formKeyValidator->validate($this->getRequest())) { $this->_redirect('*/*/edit'); return; } @@ -972,18 +1004,6 @@ class Account extends \Magento\Core\Controller\Front\Action $this->_redirect('*/*/edit'); } - /** - * Filtering posted data. Converting localized data if needed - * - * @param array $data - * @return array - */ - protected function _filterPostData($data) - { - $data = $this->_filterDates($data, array('dob')); - return $data; - } - /** * Check whether VAT ID validation is enabled * diff --git a/app/code/Magento/Customer/Controller/Address.php b/app/code/Magento/Customer/Controller/Address.php index 92ad71bd8995d8c2ab5674de94e852b4af457aa0..9345c7b8c62ea694658a5e694f07943d67dff130 100644 --- a/app/code/Magento/Customer/Controller/Address.php +++ b/app/code/Magento/Customer/Controller/Address.php @@ -33,7 +33,10 @@ */ namespace Magento\Customer\Controller; -class Address extends \Magento\Core\Controller\Front\Action +use Magento\App\Action\NotFoundException; +use Magento\App\RequestInterface; + +class Address extends \Magento\App\Action\Action { /** * @var \Magento\Customer\Model\Session @@ -50,15 +53,29 @@ class Address extends \Magento\Core\Controller\Front\Action */ protected $_addressFormFactory; + /** + * @var \Magento\Core\App\Action\FormKeyValidator + */ + protected $_formKeyValidator; + + /** + * @param \Magento\App\Action\Context $context + * @param \Magento\Customer\Model\Session $customerSession + * @param \Magento\Customer\Model\AddressFactory $addressFactory + * @param \Magento\Customer\Model\Address\FormFactory $addressFormFactory + * @param \Magento\Core\App\Action\FormKeyValidator $formKeyValidator + */ public function __construct( - \Magento\Core\Controller\Varien\Action\Context $context, + \Magento\App\Action\Context $context, \Magento\Customer\Model\Session $customerSession, \Magento\Customer\Model\AddressFactory $addressFactory, - \Magento\Customer\Model\Address\FormFactory $addressFormFactory + \Magento\Customer\Model\Address\FormFactory $addressFormFactory, + \Magento\Core\App\Action\FormKeyValidator $formKeyValidator ) { $this->_customerSession = $customerSession; $this->_addressFactory = $addressFactory; $this->_addressFormFactory = $addressFormFactory; + $this->_formKeyValidator = $formKeyValidator; parent::__construct($context); } @@ -72,13 +89,16 @@ class Address extends \Magento\Core\Controller\Front\Action return $this->_customerSession; } - public function preDispatch() + /** + * @param RequestInterface $request + * @return mixed + */ + public function dispatch(RequestInterface $request) { - parent::preDispatch(); - if (!$this->_getSession()->authenticate($this)) { - $this->setFlag('', 'no-dispatch', true); + $this->_actionFlag->set('', 'no-dispatch', true); } + return parent::dispatch($request); } /** @@ -87,15 +107,15 @@ class Address extends \Magento\Core\Controller\Front\Action public function indexAction() { if (count($this->_getSession()->getCustomer()->getAddresses())) { - $this->loadLayout(); - $this->_initLayoutMessages('Magento\Customer\Model\Session'); - $this->_initLayoutMessages('Magento\Catalog\Model\Session'); + $this->_view->loadLayout(); + $this->_view->getLayout() + ->initMessages(array('Magento\Customer\Model\Session', 'Magento\Catalog\Model\Session')); - $block = $this->getLayout()->getBlock('address_book'); + $block = $this->_view->getLayout()->getBlock('address_book'); if ($block) { - $block->setRefererUrl($this->_getRefererUrl()); + $block->setRefererUrl($this->_redirect->getRefererUrl()); } - $this->renderLayout(); + $this->_view->renderLayout(); } else { $this->getResponse()->setRedirect($this->_buildUrl('*/*/new')); } @@ -116,13 +136,13 @@ class Address extends \Magento\Core\Controller\Front\Action */ public function formAction() { - $this->loadLayout(); - $this->_initLayoutMessages('Magento\Customer\Model\Session'); - $navigationBlock = $this->getLayout()->getBlock('customer_account_navigation'); + $this->_view->loadLayout(); + $this->_view->getLayout()->initMessages('Magento\Customer\Model\Session'); + $navigationBlock = $this->_view->getLayout()->getBlock('customer_account_navigation'); if ($navigationBlock) { $navigationBlock->setActive('customer/address'); } - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -130,13 +150,13 @@ class Address extends \Magento\Core\Controller\Front\Action */ public function formPostAction() { - if (!$this->_validateFormKey()) { + if (!$this->_formKeyValidator->validate($this->getRequest())) { return $this->_redirect('*/*/'); } if (!$this->getRequest()->isPost()) { $this->_getSession()->setAddressFormData($this->getRequest()->getPost()); - $this->_redirectError($this->_buildUrl('*/*/edit')); + $this->getResponse()->setRedirect($this->_redirect->error($this->_buildUrl('*/*/edit'))); return; } @@ -145,7 +165,8 @@ class Address extends \Magento\Core\Controller\Front\Action $this->_validateAddress($address); $address->save(); $this->_getSession()->addSuccess(__('The address has been saved.')); - $this->_redirectSuccess($this->_buildUrl('*/*/index', array('_secure'=>true))); + $url = $this->_buildUrl('*/*/index', array('_secure'=>true)); + $this->getResponse()->setRedirect($this->_redirect->success($url)); return; } catch (\Magento\Core\Exception $e) { $this->_getSession()->addException($e, $e->getMessage()); @@ -160,7 +181,8 @@ class Address extends \Magento\Core\Controller\Front\Action } $this->_getSession()->setAddressFormData($this->getRequest()->getPost()); - $this->_redirectError($this->_buildUrl('*/*/edit', array('id' => $address->getId()))); + $url = $this->_buildUrl('*/*/edit', array('id' => $address->getId())); + $this->getResponse()->setRedirect($this->_redirect->error($url)); } /** diff --git a/app/code/Magento/Customer/Controller/Adminhtml/Cart/Product/Composite/Cart.php b/app/code/Magento/Customer/Controller/Adminhtml/Cart/Product/Composite/Cart.php index 17b77204ed47e83b55fc0a3fee9ec07ae9ae7839..0678f1862bffcd1c628a01f636a6b0c16486b9fa 100644 --- a/app/code/Magento/Customer/Controller/Adminhtml/Cart/Product/Composite/Cart.php +++ b/app/code/Magento/Customer/Controller/Adminhtml/Cart/Product/Composite/Cart.php @@ -33,7 +33,7 @@ */ namespace Magento\Customer\Controller\Adminhtml\Cart\Product\Composite; -class Cart extends \Magento\Backend\Controller\Adminhtml\Action +class Cart extends \Magento\Backend\App\Action { /** * Customer we're working with @@ -115,7 +115,7 @@ class Cart extends \Magento\Backend\Controller\Adminhtml\Action } $this->_objectManager->get('Magento\Catalog\Helper\Product\Composite') - ->renderConfigureResult($this, $configureResult); + ->renderConfigureResult($configureResult); return $this; } diff --git a/app/code/Magento/Customer/Controller/Adminhtml/Group.php b/app/code/Magento/Customer/Controller/Adminhtml/Group.php index 029e27d87ae1dd115537507c5b20b20de3841800..d5d55bda9d86cd35c9d54935f977e5cf87661712 100644 --- a/app/code/Magento/Customer/Controller/Adminhtml/Group.php +++ b/app/code/Magento/Customer/Controller/Adminhtml/Group.php @@ -33,7 +33,7 @@ */ namespace Magento\Customer\Controller\Adminhtml; -class Group extends \Magento\Backend\Controller\Adminhtml\Action +class Group extends \Magento\Backend\App\Action { /** * Core registry @@ -41,13 +41,12 @@ class Group extends \Magento\Backend\Controller\Adminhtml\Action * @var \Magento\Core\Model\Registry */ protected $_coreRegistry = null; - /** - * @param \Magento\Backend\Controller\Context $context + * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Core\Model\Registry $coreRegistry */ public function __construct( - \Magento\Backend\Controller\Context $context, + \Magento\Backend\App\Action\Context $context, \Magento\Core\Model\Registry $coreRegistry ) { $this->_coreRegistry = $coreRegistry; @@ -56,7 +55,7 @@ class Group extends \Magento\Backend\Controller\Adminhtml\Action protected function _initGroup() { - $this->_title(__('Customer Groups')); + $this->_title->add(__('Customer Groups')); $this->_coreRegistry->register('current_group', $this->_objectManager->create('Magento\Customer\Model\Group')); $groupId = $this->getRequest()->getParam('id'); @@ -71,13 +70,13 @@ class Group extends \Magento\Backend\Controller\Adminhtml\Action */ public function indexAction() { - $this->_title(__('Customer Groups')); + $this->_title->add(__('Customer Groups')); - $this->loadLayout(); + $this->_view->loadLayout(); $this->_setActiveMenu('Magento_Customer::customer_group'); $this->_addBreadcrumb(__('Customers'), __('Customers')); $this->_addBreadcrumb(__('Customer Groups'), __('Customer Groups')); - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -86,7 +85,7 @@ class Group extends \Magento\Backend\Controller\Adminhtml\Action public function newAction() { $this->_initGroup(); - $this->loadLayout(); + $this->_view->loadLayout(); $this->_setActiveMenu('Magento_Customer::customer_group'); $this->_addBreadcrumb(__('Customers'), __('Customers')); $this->_addBreadcrumb(__('Customer Groups'), __('Customer Groups'), $this->getUrl('customer/group')); @@ -99,12 +98,12 @@ class Group extends \Magento\Backend\Controller\Adminhtml\Action $this->_addBreadcrumb(__('New Group'), __('New Customer Groups')); } - $this->_title($currentGroup->getId() ? $currentGroup->getCode() : __('New Customer Group')); + $this->_title->add($currentGroup->getId() ? $currentGroup->getCode() : __('New Customer Group')); - $this->getLayout()->addBlock('Magento\Customer\Block\Adminhtml\Group\Edit', 'group', 'content') + $this->_view->getLayout()->addBlock('Magento\Customer\Block\Adminhtml\Group\Edit', 'group', 'content') ->setEditMode((bool)$this->_coreRegistry->registry('current_group')->getId()); - $this->renderLayout(); + $this->_view->renderLayout(); } /** diff --git a/app/code/Magento/Customer/Controller/Adminhtml/Index.php b/app/code/Magento/Customer/Controller/Adminhtml/Index.php index 7b478c7ca27800d407e9bf2abfc8b9121244698b..1eacfaea36fde872a1b5c213c0ffc5943217679b 100644 --- a/app/code/Magento/Customer/Controller/Adminhtml/Index.php +++ b/app/code/Magento/Customer/Controller/Adminhtml/Index.php @@ -25,7 +25,9 @@ */ namespace Magento\Customer\Controller\Adminhtml; -class Index extends \Magento\Backend\Controller\Adminhtml\Action +use Magento\App\Action\NotFoundException; + +class Index extends \Magento\Backend\App\Action { /** * @var \Magento\Validator @@ -40,13 +42,21 @@ class Index extends \Magento\Backend\Controller\Adminhtml\Action protected $_coreRegistry = null; /** - * @param \Magento\Backend\Controller\Context $context + * @var \Magento\App\Response\Http\FileFactory + */ + protected $_fileFactory; + + /** + * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Core\Model\Registry $coreRegistry + * @param \Magento\App\Response\Http\FileFactory $fileFactory */ public function __construct( - \Magento\Backend\Controller\Context $context, - \Magento\Core\Model\Registry $coreRegistry + \Magento\Backend\App\Action\Context $context, + \Magento\Core\Model\Registry $coreRegistry, + \Magento\App\Response\Http\FileFactory $fileFactory ) { + $this->_fileFactory = $fileFactory; $this->_coreRegistry = $coreRegistry; parent::__construct($context); } @@ -60,7 +70,7 @@ class Index extends \Magento\Backend\Controller\Adminhtml\Action protected function _initCustomer($idFieldName = 'id') { // Default title - $this->_title(__('Customers')); + $this->_title->add(__('Customers')); $customerId = (int)$this->getRequest()->getParam($idFieldName); $customer = $this->_objectManager->create('Magento\Customer\Model\Customer'); @@ -77,13 +87,13 @@ class Index extends \Magento\Backend\Controller\Adminhtml\Action */ public function indexAction() { - $this->_title(__('Customers')); + $this->_title->add(__('Customers')); if ($this->getRequest()->getQuery('ajax')) { $this->_forward('grid'); return; } - $this->loadLayout(); + $this->_view->loadLayout(); /** * Set active menu item @@ -94,7 +104,7 @@ class Index extends \Magento\Backend\Controller\Adminhtml\Action * Append customers block to content */ $this->_addContent( - $this->getLayout()->createBlock('Magento\Customer\Block\Adminhtml\Customer', 'customer') + $this->_view->getLayout()->createBlock('Magento\Customer\Block\Adminhtml\Customer', 'customer') ); /** @@ -103,7 +113,7 @@ class Index extends \Magento\Backend\Controller\Adminhtml\Action $this->_addBreadcrumb(__('Customers'), __('Customers')); $this->_addBreadcrumb(__('Manage Customers'), __('Manage Customers')); - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -111,8 +121,8 @@ class Index extends \Magento\Backend\Controller\Adminhtml\Action */ public function gridAction() { - $this->loadLayout(); - $this->renderLayout(); + $this->_view->loadLayout(); + $this->_view->renderLayout(); } /** @@ -121,7 +131,7 @@ class Index extends \Magento\Backend\Controller\Adminhtml\Action public function editAction() { $this->_initCustomer(); - $this->loadLayout(); + $this->_view->loadLayout(); $this->_setActiveMenu('Magento_Customer::customer_manage'); /* @var $customer \Magento\Customer\Model\Customer */ @@ -178,14 +188,14 @@ class Index extends \Magento\Backend\Controller\Adminhtml\Action } } - $this->_title($customer->getId() ? $customer->getName() : __('New Customer')); + $this->_title->add($customer->getId() ? $customer->getName() : __('New Customer')); /** * Set active menu item */ $this->_setActiveMenu('Magento_Customer::customer'); - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -268,7 +278,7 @@ class Index extends \Magento\Backend\Controller\Adminhtml\Action $this->_getSession()->setCustomerData($originalRequestData); $returnToEdit = true; } catch (\Magento\Core\Exception $exception) { - $messages = $exception->getMessages(\Magento\Core\Model\Message::ERROR); + $messages = $exception->getMessages(\Magento\Message\Factory::ERROR); if (!count($messages)) { $messages = $exception->getMessage(); } @@ -324,7 +334,7 @@ class Index extends \Magento\Backend\Controller\Adminhtml\Action $this->_getSession() ->addSuccess(__('Customer will receive an email with a link to reset password.')); } catch (\Magento\Core\Exception $exception) { - $messages = $exception->getMessages(\Magento\Core\Model\Message::ERROR); + $messages = $exception->getMessages(\Magento\Message\Factory::ERROR); if (!count($messages)) { $messages = $exception->getMessage(); } @@ -348,8 +358,8 @@ class Index extends \Magento\Backend\Controller\Adminhtml\Action $session = $this->_getSession(); $callback = function ($error) use ($session) { - if (!($error instanceof \Magento\Core\Model\Message\Error)) { - $error = new \Magento\Core\Model\Message\Error($error); + if (!($error instanceof \Magento\Message\Error)) { + $error = new \Magento\Message\Error($error); } $session->addMessage($error); }; @@ -461,9 +471,9 @@ class Index extends \Magento\Backend\Controller\Adminhtml\Action public function exportCsvAction() { $fileName = 'customers.csv'; - $content = $this->getLayout()->createBlock('Magento\Customer\Block\Adminhtml\Grid')->getCsvFile(); + $content = $this->_view->getLayout()->createBlock('Magento\Customer\Block\Adminhtml\Grid')->getCsvFile(); - $this->_prepareDownloadResponse($fileName, $content); + return $this->_fileFactory->create($fileName, $content); } /** @@ -472,8 +482,8 @@ class Index extends \Magento\Backend\Controller\Adminhtml\Action public function exportXmlAction() { $fileName = 'customers.xml'; - $content = $this->getLayout()->createBlock('Magento\Customer\Block\Adminhtml\Grid')->getExcelFile(); - $this->_prepareDownloadResponse($fileName, $content); + $content = $this->_view->getLayout()->createBlock('Magento\Customer\Block\Adminhtml\Grid')->getExcelFile(); + return $this->_fileFactory->create($fileName, $content); } /** @@ -482,8 +492,8 @@ class Index extends \Magento\Backend\Controller\Adminhtml\Action public function ordersAction() { $this->_initCustomer(); - $this->loadLayout(); - $this->renderLayout(); + $this->_view->loadLayout(); + $this->_view->renderLayout(); } /** @@ -492,8 +502,8 @@ class Index extends \Magento\Backend\Controller\Adminhtml\Action public function lastOrdersAction() { $this->_initCustomer(); - $this->loadLayout(); - $this->renderLayout(); + $this->_view->loadLayout(); + $this->_view->renderLayout(); } /** @@ -506,7 +516,7 @@ class Index extends \Magento\Backend\Controller\Adminhtml\Action ->loadByCustomer($this->_coreRegistry->registry('current_customer')); $this->_coreRegistry->register('subscriber', $subscriber); - $this->loadLayout()->renderLayout(); + $this->_view->loadLayout()->renderLayout(); } public function wishlistAction() @@ -523,9 +533,11 @@ class Index extends \Magento\Backend\Controller\Adminhtml\Action } } - $this->getLayout()->getUpdate()->addHandle(strtolower($this->getFullActionName())); - $this->loadLayoutUpdates()->generateLayoutXml()->generateLayoutBlocks(); - $this->renderLayout(); + $this->_view->getLayout()->getUpdate()->addHandle(strtolower($this->_request->getFullActionName())); + $this->_view->loadLayoutUpdates(); + $this->_view->generateLayoutXml(); + $this->_view->generateLayoutBlocks(); + $this->_view->renderLayout(); } /** @@ -534,8 +546,8 @@ class Index extends \Magento\Backend\Controller\Adminhtml\Action public function viewWishlistAction() { $this->_initCustomer(); - $this->loadLayout(); - $this->renderLayout(); + $this->_view->loadLayout(); + $this->_view->renderLayout(); } /** @@ -563,9 +575,9 @@ class Index extends \Magento\Backend\Controller\Adminhtml\Action } } - $this->loadLayout(); - $this->getLayout()->getBlock('admin.customer.view.edit.cart')->setWebsiteId($websiteId); - $this->renderLayout(); + $this->_view->loadLayout(); + $this->_view->getLayout()->getBlock('admin.customer.view.edit.cart')->setWebsiteId($websiteId); + $this->_view->renderLayout(); } /** @@ -575,11 +587,10 @@ class Index extends \Magento\Backend\Controller\Adminhtml\Action public function viewCartAction() { $this->_initCustomer(); - $this->loadLayout() - ->getLayout() - ->getBlock('admin.customer.view.cart') + $this->_view->loadLayout(); + $this->_view->getLayout()->getBlock('admin.customer.view.cart') ->setWebsiteId((int)$this->getRequest()->getParam('website_id')); - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -589,8 +600,8 @@ class Index extends \Magento\Backend\Controller\Adminhtml\Action public function cartsAction() { $this->_initCustomer(); - $this->loadLayout(); - $this->renderLayout(); + $this->_view->loadLayout(); + $this->_view->renderLayout(); } /** @@ -600,12 +611,11 @@ class Index extends \Magento\Backend\Controller\Adminhtml\Action public function productReviewsAction() { $this->_initCustomer(); - $this->loadLayout() - ->getLayout() - ->getBlock('admin.customer.reviews') + $this->_view->loadLayout(); + $this->_view->getLayout()->getBlock('admin.customer.reviews') ->setCustomerId($this->_coreRegistry->registry('current_customer')->getId()) ->setUseAjax(true); - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -622,8 +632,8 @@ class Index extends \Magento\Backend\Controller\Adminhtml\Action } if ($response->getError()) { - $this->_initLayoutMessages('Magento\Adminhtml\Model\Session'); - $response->setMessage($this->getLayout()->getMessagesBlock()->getGroupedHtml()); + $this->_view->getLayout()->initMessages('Magento\Adminhtml\Model\Session'); + $response->setMessage($this->_view->getLayout()->getMessagesBlock()->getGroupedHtml()); } $this->getResponse()->setBody($response->toJson()); @@ -669,8 +679,8 @@ class Index extends \Magento\Backend\Controller\Adminhtml\Action $customer->addData($data); $errors = $customer->validate(); } catch (\Magento\Core\Exception $exception) { - /* @var $error \Magento\Core\Model\Message\Error */ - foreach ($exception->getMessages(\Magento\Core\Model\Message::ERROR) as $error) { + /* @var $error \Magento\Message\Error */ + foreach ($exception->getMessages(\Magento\Message\Factory::ERROR) as $error) { $errors[] = $error->getCode(); } } @@ -828,6 +838,8 @@ class Index extends \Magento\Backend\Controller\Adminhtml\Action /** * Customer view file action + * + * @throws NotFoundException */ public function viewfileAction() { @@ -843,7 +855,7 @@ class Index extends \Magento\Backend\Controller\Adminhtml\Action ->urlDecode($this->getRequest()->getParam('image')); $plain = true; } else { - return $this->norouteAction(); + throw new NotFoundException(); } $path = $this->_objectManager->get('Magento\App\Dir')->getDir('media') . DS . 'customer'; @@ -856,7 +868,7 @@ class Index extends \Magento\Backend\Controller\Adminhtml\Action && !$this->_objectManager->get('Magento\Core\Helper\File\Storage') ->processStorageFile(str_replace('/', DS, $fileName)) ) { - return $this->norouteAction(); + throw new NotFoundException(); } if ($plain) { @@ -891,7 +903,7 @@ class Index extends \Magento\Backend\Controller\Adminhtml\Action echo $filesystem->read($fileName); } else { $name = pathinfo($fileName, PATHINFO_BASENAME); - $this->_prepareDownloadResponse($name, array( + $this->_fileFactory->create($name, array( 'type' => 'filename', 'value' => $fileName )); @@ -908,16 +920,4 @@ class Index extends \Magento\Backend\Controller\Adminhtml\Action { return $this->_authorization->isAllowed('Magento_Customer::manage'); } - - /** - * Filtering posted data. Converting localized data if needed - * - * @param array - * @return array - */ - protected function _filterPostData($data) - { - $data['account'] = $this->_filterDates($data['account'], array('dob')); - return $data; - } } diff --git a/app/code/Magento/Customer/Controller/Adminhtml/Online.php b/app/code/Magento/Customer/Controller/Adminhtml/Online.php index d280b1a46b327d35a549da819b6ee80ec0fc6b0f..d757d4ad70391cdbc91609aa2f790b69bee3aff3 100644 --- a/app/code/Magento/Customer/Controller/Adminhtml/Online.php +++ b/app/code/Magento/Customer/Controller/Adminhtml/Online.php @@ -25,26 +25,25 @@ */ namespace Magento\Customer\Controller\Adminhtml; -class Online extends \Magento\Backend\Controller\Adminhtml\Action +class Online extends \Magento\Backend\App\Action { - public function indexAction() { - $this->_title(__('Customers Now Online')); + $this->_title->add(__('Customers Now Online')); - if($this->getRequest()->getParam('ajax')) { + if ($this->getRequest()->getParam('ajax')) { $this->_forward('grid'); return; } - $this->loadLayout(); + $this->_view->loadLayout(); $this->_setActiveMenu('Magento_Customer::customer_online'); $this->_addBreadcrumb(__('Customers'), __('Customers')); $this->_addBreadcrumb(__('Online Customers'), __('Online Customers')); - $this->renderLayout(); + $this->_view->renderLayout(); } protected function _isAllowed() diff --git a/app/code/Magento/Customer/Controller/Adminhtml/System/Config/Validatevat.php b/app/code/Magento/Customer/Controller/Adminhtml/System/Config/Validatevat.php index a75b70f5826cee0b4b92eca594a9e8f6eacfe8a0..7ae4b8b4d92ddb4b9a460d4c7c4a4d1198203621 100644 --- a/app/code/Magento/Customer/Controller/Adminhtml/System/Config/Validatevat.php +++ b/app/code/Magento/Customer/Controller/Adminhtml/System/Config/Validatevat.php @@ -33,7 +33,7 @@ */ namespace Magento\Customer\Controller\Adminhtml\System\Config; -class Validatevat extends \Magento\Backend\Controller\Adminhtml\Action +class Validatevat extends \Magento\Backend\App\Action { /** * Perform customer VAT ID validation diff --git a/app/code/Magento/Customer/Controller/Adminhtml/Wishlist/Product/Composite/Wishlist.php b/app/code/Magento/Customer/Controller/Adminhtml/Wishlist/Product/Composite/Wishlist.php index 594955b9a0583ac24359ee75dc8ed05d2d29613f..900d5604c5f8332b75a535412684addc6de2cc3f 100644 --- a/app/code/Magento/Customer/Controller/Adminhtml/Wishlist/Product/Composite/Wishlist.php +++ b/app/code/Magento/Customer/Controller/Adminhtml/Wishlist/Product/Composite/Wishlist.php @@ -34,7 +34,7 @@ namespace Magento\Customer\Controller\Adminhtml\Wishlist\Product\Composite; class Wishlist - extends \Magento\Backend\Controller\Adminhtml\Action + extends \Magento\Backend\App\Action { /** * Wishlist we're working with @@ -101,7 +101,7 @@ class Wishlist } $this->_objectManager->get('Magento\Catalog\Helper\Product\Composite') - ->renderConfigureResult($this, $configureResult); + ->renderConfigureResult($configureResult); return $this; } diff --git a/app/code/Magento/Customer/Controller/Review.php b/app/code/Magento/Customer/Controller/Review.php index f33ef43f895f7ee54363f37582970af2b4c5955f..384c5736f6ef8cbf458311b81538610a6085a6ab 100644 --- a/app/code/Magento/Customer/Controller/Review.php +++ b/app/code/Magento/Customer/Controller/Review.php @@ -34,17 +34,17 @@ namespace Magento\Customer\Controller; -class Review extends \Magento\Core\Controller\Front\Action +class Review extends \Magento\App\Action\Action { public function indexAction() { - $this->loadLayout(); - $this->renderLayout(); + $this->_view->loadLayout(); + $this->_view->renderLayout(); } public function viewAction() { - $this->loadLayout(); - $this->renderLayout(); + $this->_view->loadLayout(); + $this->_view->renderLayout(); } } diff --git a/app/code/Magento/Customer/Helper/Address.php b/app/code/Magento/Customer/Helper/Address.php index 93309fc83499ccc4e3b9b77781c524491d1a0f4d..4dedbe701a9c0317b558c0bb003892a146a216e5 100644 --- a/app/code/Magento/Customer/Helper/Address.php +++ b/app/code/Magento/Customer/Helper/Address.php @@ -31,7 +31,7 @@ */ namespace Magento\Customer\Helper; -class Address extends \Magento\Core\Helper\AbstractHelper +class Address extends \Magento\App\Helper\AbstractHelper { /** * VAT Validation parameters XML paths @@ -93,7 +93,7 @@ class Address extends \Magento\Core\Helper\AbstractHelper protected $_addressConfig; /** - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\View\Element\BlockFactory $blockFactory * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Store\Config $coreStoreConfig @@ -101,7 +101,7 @@ class Address extends \Magento\Core\Helper\AbstractHelper * @param \Magento\Customer\Model\Address\Config|\Magento\Customer\Model\Address\Config $addressConfig */ public function __construct( - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\View\Element\BlockFactory $blockFactory, \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Store\Config $coreStoreConfig, diff --git a/app/code/Magento/Customer/Helper/Data.php b/app/code/Magento/Customer/Helper/Data.php index d8d8ee9016c75b8bf3d9aa57bc04e404e49ad34f..96e4c19297aa9ba638b75200746d028aa804ce5b 100644 --- a/app/code/Magento/Customer/Helper/Data.php +++ b/app/code/Magento/Customer/Helper/Data.php @@ -29,7 +29,7 @@ namespace Magento\Customer\Helper; /** * Customer Data Helper */ -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { /** * Query param name for last url visited @@ -119,13 +119,6 @@ class Data extends \Magento\Core\Helper\AbstractHelper */ protected $_customerAddress = null; - /** - * Core event manager proxy - * - * @var \Magento\Event\ManagerInterface - */ - protected $_eventManager = null; - /** * Core store config * @@ -164,10 +157,9 @@ class Data extends \Magento\Core\Helper\AbstractHelper protected $mathRandom; /** - * @param \Magento\Event\ManagerInterface $eventManager * @param \Magento\Customer\Helper\Address $customerAddress * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\Store\Config $coreStoreConfig * @param \Magento\Core\Model\Config $coreConfig * @param \Magento\Customer\Model\Session $customerSession @@ -177,10 +169,9 @@ class Data extends \Magento\Core\Helper\AbstractHelper * @param \Magento\Math\Random $mathRandom */ public function __construct( - \Magento\Event\ManagerInterface $eventManager, \Magento\Customer\Helper\Address $customerAddress, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Core\Model\Store\Config $coreStoreConfig, \Magento\Core\Model\Config $coreConfig, \Magento\Customer\Model\Session $customerSession, @@ -189,7 +180,6 @@ class Data extends \Magento\Core\Helper\AbstractHelper \Magento\Escaper $escaper, \Magento\Math\Random $mathRandom ) { - $this->_eventManager = $eventManager; $this->_customerAddress = $customerAddress; $this->_coreData = $coreData; $this->_coreStoreConfig = $coreStoreConfig; diff --git a/app/code/Magento/Customer/Model/Address.php b/app/code/Magento/Customer/Model/Address.php index e32b17e2625ec4888617ec59a128cb2a0b1a3828..e1b998582316d48456a46c76890b30a665b22370 100644 --- a/app/code/Magento/Customer/Model/Address.php +++ b/app/code/Magento/Customer/Model/Address.php @@ -47,7 +47,6 @@ class Address extends \Magento\Customer\Model\Address\AbstractAddress protected $_customerFactory; /** - * @param \Magento\Event\ManagerInterface $eventManager * @param \Magento\Directory\Helper\Data $directoryData * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry @@ -63,7 +62,6 @@ class Address extends \Magento\Customer\Model\Address\AbstractAddress * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( - \Magento\Event\ManagerInterface $eventManager, \Magento\Directory\Helper\Data $directoryData, \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, @@ -78,7 +76,7 @@ class Address extends \Magento\Customer\Model\Address\AbstractAddress ) { $this->_customerFactory = $customerFactory; parent::__construct( - $eventManager, $directoryData, $context, $registry, $eavConfig, $addressConfig, $regionFactory, + $directoryData, $context, $registry, $eavConfig, $addressConfig, $regionFactory, $countryFactory, $resource, $resourceCollection, $data ); } diff --git a/app/code/Magento/Customer/Model/Address/AbstractAddress.php b/app/code/Magento/Customer/Model/Address/AbstractAddress.php index 1edffbe2a09822e1d52e39ba111a75c0db72338d..1b6f5306de19a4a6e7f720feb35076d1ea0754ac 100644 --- a/app/code/Magento/Customer/Model/Address/AbstractAddress.php +++ b/app/code/Magento/Customer/Model/Address/AbstractAddress.php @@ -79,13 +79,6 @@ class AbstractAddress extends \Magento\Core\Model\AbstractModel */ protected $_directoryData = null; - /** - * Core event manager proxy - * - * @var \Magento\Event\ManagerInterface - */ - protected $_eventManager = null; - /** * @var \Magento\Eav\Model\Config */ @@ -107,7 +100,6 @@ class AbstractAddress extends \Magento\Core\Model\AbstractModel protected $_countryFactory; /** - * @param \Magento\Event\ManagerInterface $eventManager * @param \Magento\Directory\Helper\Data $directoryData * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry @@ -120,7 +112,6 @@ class AbstractAddress extends \Magento\Core\Model\AbstractModel * @param array $data */ public function __construct( - \Magento\Event\ManagerInterface $eventManager, \Magento\Directory\Helper\Data $directoryData, \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, @@ -132,7 +123,6 @@ class AbstractAddress extends \Magento\Core\Model\AbstractModel \Magento\Data\Collection\Db $resourceCollection = null, array $data = array() ) { - $this->_eventManager = $eventManager; $this->_directoryData = $directoryData; $data = $this->_implodeStreetField($data); $this->_eavConfig = $eavConfig; diff --git a/app/code/Magento/Customer/Model/Address/Config.php b/app/code/Magento/Customer/Model/Address/Config.php index a984df2a2115aa312307b05679ce2c6ee837875b..8ad4cf54e9c2b5b0d7c731fafe6e8b0cb2b738a6 100644 --- a/app/code/Magento/Customer/Model/Address/Config.php +++ b/app/code/Magento/Customer/Model/Address/Config.php @@ -63,7 +63,7 @@ class Config extends \Magento\Config\Data protected $_defaultTypes = array(); /** - * @var \Magento\Core\Model\StoreManager + * @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; @@ -75,14 +75,14 @@ class Config extends \Magento\Config\Data /** * @param \Magento\Customer\Model\Address\Config\Reader $reader * @param \Magento\Config\CacheInterface $cache - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Customer\Helper\Address $addressHelper * @param string $cacheId */ public function __construct( \Magento\Customer\Model\Address\Config\Reader $reader, \Magento\Config\CacheInterface $cache, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Customer\Helper\Address $addressHelper, $cacheId = 'address_format' ) { diff --git a/app/code/Magento/Customer/Model/Config/Backend/Address/Street.php b/app/code/Magento/Customer/Model/Config/Backend/Address/Street.php index a13cc8116c0801b6d94ab4eb052734ba9b847de8..59f21529bc34ae88c45f6a82def2748130a5b7bf 100644 --- a/app/code/Magento/Customer/Model/Config/Backend/Address/Street.php +++ b/app/code/Magento/Customer/Model/Config/Backend/Address/Street.php @@ -41,7 +41,7 @@ class Street extends \Magento\Core\Model\Config\Value /** * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Config $config * @param \Magento\Eav\Model\Config $eavConfig * @param \Magento\Core\Model\Resource\AbstractResource $resource @@ -51,7 +51,7 @@ class Street extends \Magento\Core\Model\Config\Value public function __construct( \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Config $config, \Magento\Eav\Model\Config $eavConfig, \Magento\Core\Model\Resource\AbstractResource $resource = null, diff --git a/app/code/Magento/Customer/Model/Config/Backend/Show/Customer.php b/app/code/Magento/Customer/Model/Config/Backend/Show/Customer.php index 11e1b2304408e2c89a9e42787cf442e0ffd74df2..b0348b604c57bfb33e66aaad4618a88ed180e06c 100644 --- a/app/code/Magento/Customer/Model/Config/Backend/Show/Customer.php +++ b/app/code/Magento/Customer/Model/Config/Backend/Show/Customer.php @@ -43,7 +43,7 @@ class Customer extends \Magento\Core\Model\Config\Value /** * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Config $config * @param \Magento\Eav\Model\Config $eavConfig * @param \Magento\Core\Model\Resource\AbstractResource $resource @@ -53,7 +53,7 @@ class Customer extends \Magento\Core\Model\Config\Value public function __construct( \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Config $config, \Magento\Eav\Model\Config $eavConfig, \Magento\Core\Model\Resource\AbstractResource $resource = null, diff --git a/app/code/Magento/Customer/Model/Config/Share.php b/app/code/Magento/Customer/Model/Config/Share.php index 18736ccf383f21ddd6023a23a0213b52e3011042..e64fc013480ca86d6068cb53ed5129018536722e 100644 --- a/app/code/Magento/Customer/Model/Config/Share.php +++ b/app/code/Magento/Customer/Model/Config/Share.php @@ -66,7 +66,7 @@ class Share extends \Magento\Core\Model\Config\Value * * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Config $config * @param \Magento\Core\Model\Store\Config $coreStoreConfig * @param \Magento\Customer\Model\Resource\Customer $customerResource @@ -77,7 +77,7 @@ class Share extends \Magento\Core\Model\Config\Value public function __construct( \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Config $config, \Magento\Core\Model\Store\Config $coreStoreConfig, \Magento\Customer\Model\Resource\Customer $customerResource, diff --git a/app/code/Magento/Customer/Model/Customer.php b/app/code/Magento/Customer/Model/Customer.php index 903c3de16fcd22c6eb8fd09d5c773de5f15718dd..911e203610821f1de72f473601476864a41a479b 100644 --- a/app/code/Magento/Customer/Model/Customer.php +++ b/app/code/Magento/Customer/Model/Customer.php @@ -120,10 +120,10 @@ class Customer extends \Magento\Core\Model\AbstractModel */ private static $_isConfirmationRequired; - /** @var \Magento\Core\Model\Sender */ + /** @var \Magento\Email\Model\Sender */ protected $_sender; - /** @var \Magento\Core\Model\StoreManager */ + /** @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; /** @var \Magento\Eav\Model\Config */ @@ -136,13 +136,6 @@ class Customer extends \Magento\Core\Model\AbstractModel */ protected $_customerData = null; - /** - * Core event manager proxy - * - * @var \Magento\Event\ManagerInterface - */ - protected $_eventManager = null; - /** * @var \Magento\Core\Model\Store\Config */ @@ -164,12 +157,12 @@ class Customer extends \Magento\Core\Model\AbstractModel protected $_addressesFactory; /** - * @var \Magento\Core\Model\Email\Template\MailerFactory + * @var \Magento\Email\Model\Template\MailerFactory */ protected $_mailerFactory; /** - * @var \Magento\Core\Model\Email\InfoFactory + * @var \Magento\Email\Model\InfoFactory */ protected $_emailInfoFactory; @@ -199,20 +192,19 @@ class Customer extends \Magento\Core\Model\AbstractModel protected $dateTime; /** - * @param \Magento\Event\ManagerInterface $eventManager * @param \Magento\Customer\Helper\Data $customerData * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Core\Model\Sender $sender - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Email\Model\Sender $sender + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Eav\Model\Config $config * @param \Magento\Core\Model\Store\Config $coreStoreConfig * @param \Magento\Customer\Model\Resource\Customer $resource * @param \Magento\Customer\Model\Config\Share $configShare * @param \Magento\Customer\Model\AddressFactory $addressFactory * @param \Magento\Customer\Model\Resource\Address\CollectionFactory $addressesFactory - * @param \Magento\Core\Model\Email\Template\MailerFactory $mailerFactory - * @param \Magento\Core\Model\Email\InfoFactory $emailInfoFactory + * @param \Magento\Email\Model\Template\MailerFactory $mailerFactory + * @param \Magento\Email\Model\InfoFactory $emailInfoFactory * @param \Magento\Customer\Model\GroupFactory $groupFactory * @param \Magento\Customer\Model\AttributeFactory $attributeFactory * @param \Magento\Encryption\EncryptorInterface $encryptor @@ -222,20 +214,19 @@ class Customer extends \Magento\Core\Model\AbstractModel * @param array $data */ public function __construct( - \Magento\Event\ManagerInterface $eventManager, \Magento\Customer\Helper\Data $customerData, \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, - \Magento\Core\Model\Sender $sender, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Email\Model\Sender $sender, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Eav\Model\Config $config, \Magento\Core\Model\Store\Config $coreStoreConfig, \Magento\Customer\Model\Resource\Customer $resource, \Magento\Customer\Model\Config\Share $configShare, \Magento\Customer\Model\AddressFactory $addressFactory, \Magento\Customer\Model\Resource\Address\CollectionFactory $addressesFactory, - \Magento\Core\Model\Email\Template\MailerFactory $mailerFactory, - \Magento\Core\Model\Email\InfoFactory $emailInfoFactory, + \Magento\Email\Model\Template\MailerFactory $mailerFactory, + \Magento\Email\Model\InfoFactory $emailInfoFactory, \Magento\Customer\Model\GroupFactory $groupFactory, \Magento\Customer\Model\AttributeFactory $attributeFactory, \Magento\Encryption\EncryptorInterface $encryptor, @@ -244,7 +235,6 @@ class Customer extends \Magento\Core\Model\AbstractModel \Magento\Data\Collection\Db $resourceCollection = null, array $data = array() ) { - $this->_eventManager = $eventManager; $this->_customerData = $customerData; $this->_coreStoreConfig = $coreStoreConfig; $this->_sender = $sender; @@ -767,7 +757,7 @@ class Customer extends \Magento\Core\Model\AbstractModel */ protected function _sendEmailTemplate($template, $sender, $templateParams = array(), $storeId = null) { - /** @var $mailer \Magento\Core\Model\Email\Template\Mailer */ + /** @var $mailer \Magento\Email\Model\Template\Mailer */ $mailer = $this->_createMailer(); $emailInfo = $this->_createEmailInfo(); $emailInfo->addTo($this->getEmail(), $this->getName()); @@ -1253,7 +1243,7 @@ class Customer extends \Magento\Core\Model\AbstractModel } /** - * @return \Magento\Core\Model\Email\Template\Mailer + * @return \Magento\Email\Model\Template\Mailer */ protected function _createMailer() { @@ -1261,7 +1251,7 @@ class Customer extends \Magento\Core\Model\AbstractModel } /** - * @return \Magento\Core\Model\Email\Info + * @return \Magento\Email\Model\Info */ protected function _createEmailInfo() { diff --git a/app/code/Magento/Customer/Model/Observer.php b/app/code/Magento/Customer/Model/Observer.php index 1cef82c3403a2dd0e3e850d8a4c8f6968035f956..1247b1706d9af91103e0e29a27ec12a0a2d783f6 100644 --- a/app/code/Magento/Customer/Model/Observer.php +++ b/app/code/Magento/Customer/Model/Observer.php @@ -63,7 +63,7 @@ class Observer protected $_customerData; /** - * @var \Magento\Core\Model\StoreManager + * @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; @@ -76,14 +76,14 @@ class Observer * @param \Magento\Customer\Helper\Data $customerData * @param \Magento\Customer\Helper\Address $customerAddress * @param \Magento\Core\Model\Registry $coreRegistry - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Customer\Model\Session $customerSession */ public function __construct( \Magento\Customer\Helper\Data $customerData, \Magento\Customer\Helper\Address $customerAddress, \Magento\Core\Model\Registry $coreRegistry, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Customer\Model\Session $customerSession ) { $this->_customerData = $customerData; diff --git a/app/code/Magento/Customer/Model/Session.php b/app/code/Magento/Customer/Model/Session.php index 98337ee457253b208ba3eebe06a8c13768aaea52..35c7fc739f4ca487e31cabf168766c11cd8a5be2 100644 --- a/app/code/Magento/Customer/Model/Session.php +++ b/app/code/Magento/Customer/Model/Session.php @@ -59,11 +59,6 @@ class Session extends \Magento\Core\Model\Session\AbstractSession */ protected $_coreUrl = null; - /** - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - /** * @var \Magento\Customer\Model\Config\Share */ @@ -91,7 +86,6 @@ class Session extends \Magento\Core\Model\Session\AbstractSession /** * @param \Magento\Core\Model\Session\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Customer\Model\Config\Share $configShare * @param \Magento\Core\Helper\Url $coreUrl * @param \Magento\Customer\Helper\Data $customerData @@ -104,7 +98,6 @@ class Session extends \Magento\Core\Model\Session\AbstractSession */ public function __construct( \Magento\Core\Model\Session\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Customer\Model\Config\Share $configShare, \Magento\Core\Helper\Url $coreUrl, \Magento\Customer\Helper\Data $customerData, @@ -117,7 +110,6 @@ class Session extends \Magento\Core\Model\Session\AbstractSession ) { $this->_coreUrl = $coreUrl; $this->_customerData = $customerData; - $this->_storeManager = $storeManager; $this->_configShare = $configShare; $this->_session = $session; $this->_customerResource = $customerResource; @@ -126,7 +118,7 @@ class Session extends \Magento\Core\Model\Session\AbstractSession parent::__construct($context, $data); $namespace = 'customer'; if ($configShare->isWebsiteScope()) { - $namespace .= '_' . ($storeManager->getWebsite()->getCode()); + $namespace .= '_' . ($this->_storeManager->getWebsite()->getCode()); } $this->init($namespace, $sessionName); @@ -325,11 +317,11 @@ class Session extends \Magento\Core\Model\Session\AbstractSession /** * Authenticate controller action by login customer * - * @param \Magento\Core\Controller\Varien\Action $action + * @param \Magento\App\Action\Action $action * @param bool $loginUrl * @return bool */ - public function authenticate(\Magento\Core\Controller\Varien\Action $action, $loginUrl = null) + public function authenticate(\Magento\App\Action\Action $action, $loginUrl = null) { if ($this->isLoggedIn()) { return true; @@ -338,8 +330,14 @@ class Session extends \Magento\Core\Model\Session\AbstractSession if (isset($loginUrl)) { $action->getResponse()->setRedirect($loginUrl); } else { - $action->setRedirectWithCookieCheck(\Magento\Customer\Helper\Data::ROUTE_ACCOUNT_LOGIN, - $this->_customerData->getLoginUrlParams() + $arguments = $this->_customerData->getLoginUrlParams(); + if ($this->_session->getCookieShouldBeReceived() && $this->_url->getUseSession()) { + $arguments += array('_query' => array( + $this->_session->getSessionIdQueryParam() => $this->_session->getSessionId() + )); + } + $action->getResponse()->setRedirect( + $this->_url->getUrl(\Magento\Customer\Helper\Data::ROUTE_ACCOUNT_LOGIN, $arguments) ); } diff --git a/app/code/Magento/Customer/etc/frontend/di.xml b/app/code/Magento/Customer/etc/frontend/di.xml index eafd321ae09446a7fa18f4eee0e403c496537caf..b7812302ff09c441881e9400268fb6c4ed495d2f 100644 --- a/app/code/Magento/Customer/etc/frontend/di.xml +++ b/app/code/Magento/Customer/etc/frontend/di.xml @@ -36,4 +36,15 @@ </value> </param> </type> + <virtualType name="customerAccountInitSession" type="Magento\Core\App\Action\Plugin\Session"> + <param name="cookieCheckActions"> + <value> + <customerLogin>loginPost</customerLogin> + <customerCreate>createpost</customerCreate> + </value> + </param> + </virtualType> + <type name="Magento\Customer\Controller\Account"> + <plugin name="sessionInitializer" type="customerAccountInitSession" /> + </type> </config> diff --git a/app/code/Magento/Customer/view/frontend/layout/customer_account_confirmation.xml b/app/code/Magento/Customer/view/frontend/layout/customer_account_confirmation.xml index 60fa97c0f6bfefa813fb70d06e6523697a0d21ad..34e54f22ebff17fa4d3810526c96293d96b8f6ef 100644 --- a/app/code/Magento/Customer/view/frontend/layout/customer_account_confirmation.xml +++ b/app/code/Magento/Customer/view/frontend/layout/customer_account_confirmation.xml @@ -35,6 +35,6 @@ </action> </referenceBlock> <referenceContainer name="content"> - <block class="Magento\Core\Block\Template" name="accountConfirmation" template="Magento_Customer::form/confirmation.phtml"/> + <block class="Magento\View\Block\Template" name="accountConfirmation" template="Magento_Customer::form/confirmation.phtml"/> </referenceContainer> </layout> diff --git a/app/code/Magento/Customer/view/frontend/layout/customer_account_index.xml b/app/code/Magento/Customer/view/frontend/layout/customer_account_index.xml index 4fbb35b432397ce9e40a467c7cd1f75d6dead8b3..1d1922a9d7da38eca1096dbaa89dc12107d23802 100644 --- a/app/code/Magento/Customer/view/frontend/layout/customer_account_index.xml +++ b/app/code/Magento/Customer/view/frontend/layout/customer_account_index.xml @@ -32,7 +32,7 @@ </referenceBlock> <referenceContainer name="content"> <block class="Magento\Customer\Block\Account\Dashboard\Hello" name="customer_account_dashboard_hello" as="hello" template="account/dashboard/hello.phtml"/> - <block class="Magento\Core\Block\Template" name="customer_account_dashboard_top" as="top"/> + <block class="Magento\View\Block\Template" name="customer_account_dashboard_top" as="top"/> <block class="Magento\Customer\Block\Account\Dashboard\Info" name="customer_account_dashboard_info" as="info" template="account/dashboard/info.phtml"/> <block class="Magento\Customer\Block\Account\Dashboard\Address" name="customer_account_dashboard_address" as="address" template="account/dashboard/address.phtml"/> </referenceContainer> diff --git a/app/code/Magento/Customer/view/frontend/layout/customer_account_logoutsuccess.xml b/app/code/Magento/Customer/view/frontend/layout/customer_account_logoutsuccess.xml index 1834231f22adf379401b12195deaf845f2aac06e..9a17dc8e9c05ebc9e00acd85610b77e93df1bf37 100644 --- a/app/code/Magento/Customer/view/frontend/layout/customer_account_logoutsuccess.xml +++ b/app/code/Magento/Customer/view/frontend/layout/customer_account_logoutsuccess.xml @@ -35,6 +35,6 @@ </action> </referenceBlock> <referenceContainer name="content"> - <block class="Magento\Core\Block\Template" name="customer_logout" template="Magento_Customer::logout.phtml"/> + <block class="Magento\View\Block\Template" name="customer_logout" template="Magento_Customer::logout.phtml"/> </referenceContainer> </layout> diff --git a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Form/Renderer/BackgroundUploader.php b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Form/Renderer/BackgroundUploader.php index c7ebf6667f8d8807ef63edc789f6d3091e5d8ba3..95cedefbb5f3ebdc87035f35f3635b4dab258048 100644 --- a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Form/Renderer/BackgroundUploader.php +++ b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Form/Renderer/BackgroundUploader.php @@ -37,20 +37,20 @@ class BackgroundUploader */ protected $_themeContext; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\DesignEditor\Model\Theme\Context $themeContext - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\DesignEditor\Model\Theme\Context $themeContext + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\DesignEditor\Model\Theme\Context $themeContext, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\DesignEditor\Model\Theme\Context $themeContext, + array $data = array() + ) { $this->_themeContext = $themeContext; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Form/Renderer/LogoUploader.php b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Form/Renderer/LogoUploader.php index 3034970e9a03a878e3c81d4c2d3e80a8eb93b006..1ff5b226fbe7b6d1bf6d53ea393fb0490be99333 100644 --- a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Form/Renderer/LogoUploader.php +++ b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Form/Renderer/LogoUploader.php @@ -60,23 +60,23 @@ class LogoUploader 'Magento_DesignEditor::editor/form/renderer/logo-uploader.phtml', ); - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\DesignEditor\Model\Theme\Context $themeContext - * @param \Magento\Theme\Model\Config\Customization $customization - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\DesignEditor\Model\Theme\Context $themeContext + * @param \Magento\Theme\Model\Config\Customization $customization + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\DesignEditor\Model\Theme\Context $themeContext, - \Magento\Theme\Model\Config\Customization $customization, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\DesignEditor\Model\Theme\Context $themeContext, + \Magento\Theme\Model\Config\Customization $customization, + array $data = array() + ) { $this->_themeContext = $themeContext; $this->_customization = $customization; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Toolbar/Buttons/Edit.php b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Toolbar/Buttons/Edit.php index 2b02e142b4e7ee6fad6d77309dc38357c92560d8..765ab97da9fef1b10bea19443562b9fd575b342f 100644 --- a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Toolbar/Buttons/Edit.php +++ b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Toolbar/Buttons/Edit.php @@ -42,31 +42,23 @@ class Edit */ protected $_changeFactory; - /** - * @var \Magento\Core\Model\LocaleInterface - */ - protected $_localeModel; - - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\DesignEditor\Model\Theme\Context $themeContext - * @param \Magento\DesignEditor\Model\Theme\ChangeFactory $changeFactory - * @param \Magento\Core\Model\LocaleInterface $localeModel - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\DesignEditor\Model\Theme\Context $themeContext + * @param \Magento\DesignEditor\Model\Theme\ChangeFactory $changeFactory + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\DesignEditor\Model\Theme\Context $themeContext, - \Magento\DesignEditor\Model\Theme\ChangeFactory $changeFactory, - \Magento\Core\Model\LocaleInterface $localeModel, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\DesignEditor\Model\Theme\Context $themeContext, + \Magento\DesignEditor\Model\Theme\ChangeFactory $changeFactory, + array $data = array() + ) { $this->_themeContext = $themeContext; $this->_changeFactory = $changeFactory; - $this->_localeModel = $localeModel; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** @@ -180,7 +172,7 @@ class Edit { $sourceChange = $this->_changeFactory->create(); $sourceChange->loadByThemeId($this->_themeContext->getEditableTheme()->getId()); - $dateMessage = $this->_localeModel + $dateMessage = $this->_locale ->date($sourceChange->getChangeTime(), \Magento\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT)->toString(); $message = __('Do you want to restore the version saved at %1?', $dateMessage); diff --git a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools.php b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools.php index c479fdeec53084f0aba5d1150ca619d0b6407af2..5791179d15f68f9590ba3530c47c687775a81da6 100644 --- a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools.php +++ b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools.php @@ -44,20 +44,20 @@ class Tools extends \Magento\Backend\Block\Template */ protected $_themeContext; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\DesignEditor\Model\Theme\Context $themeContext - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\DesignEditor\Model\Theme\Context $themeContext + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\DesignEditor\Model\Theme\Context $themeContext, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\DesignEditor\Model\Theme\Context $themeContext, + array $data = array() + ) { $this->_themeContext = $themeContext; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Block.php b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Block.php index f2ba4592a4091671ee0f541283e873f46174e62f..e3f51e19f8a48d730b1f5208b95b6be43ad1531b 100644 --- a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Block.php +++ b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Block.php @@ -29,6 +29,6 @@ */ namespace Magento\DesignEditor\Block\Adminhtml\Editor\Tools; -class Block extends \Magento\Core\Block\Template +class Block extends \Magento\View\Block\Template { } diff --git a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/Css.php b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/Css.php index 379c0c5cc29b9a6816f6ba84340d902b4ac06c4e..5c98b0d8f09b0c02b438d1d7eed7ae813e0892a9 100644 --- a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/Css.php +++ b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/Css.php @@ -29,7 +29,7 @@ */ namespace Magento\DesignEditor\Block\Adminhtml\Editor\Tools\Code; -class Css extends \Magento\Core\Block\Template +class Css extends \Magento\View\Block\Template { /** * Get file groups content diff --git a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/Custom.php b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/Custom.php index 90866a7e8797c0594295643724b4ec295abe1d09..806e9afcb0d9d031332c5c336c9a3ca9a1a3287f 100644 --- a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/Custom.php +++ b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/Custom.php @@ -43,23 +43,23 @@ class Custom extends \Magento\Backend\Block\Widget\Form\Generic */ protected $_themeContext; - /** - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\DesignEditor\Model\Theme\Context $themeContext - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\DesignEditor\Model\Theme\Context $themeContext + * @param array $data */ - public function __construct( - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\DesignEditor\Model\Theme\Context $themeContext, - array $data = array() - ) { - parent::__construct($registry, $formFactory, $coreData, $context, $data); + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\DesignEditor\Model\Theme\Context $themeContext, + array $data = array() + ) { + parent::__construct($context, $coreData, $registry, $formFactory, $data); $this->_themeContext = $themeContext; } diff --git a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/ImageSizing.php b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/ImageSizing.php index a1553ee7043c5b6d679a1d823ff8249b4d77fe7b..fe0cbd86a9c8258d34c2ba460355b0a966f10b24 100644 --- a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/ImageSizing.php +++ b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/ImageSizing.php @@ -48,27 +48,27 @@ class ImageSizing extends \Magento\Backend\Block\Widget\Form\Generic */ protected $_themeContext; - /** - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Eav\Model\Config $eavConfig - * @param \Magento\DesignEditor\Model\Editor\Tools\Controls\Factory $controlFactory - * @param \Magento\DesignEditor\Model\Theme\Context $themeContext - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Eav\Model\Config $eavConfig + * @param \Magento\DesignEditor\Model\Editor\Tools\Controls\Factory $controlFactory + * @param \Magento\DesignEditor\Model\Theme\Context $themeContext + * @param array $data */ - public function __construct( - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Eav\Model\Config $eavConfig, - \Magento\DesignEditor\Model\Editor\Tools\Controls\Factory $controlFactory, - \Magento\DesignEditor\Model\Theme\Context $themeContext, - array $data = array() - ) { - parent::__construct($registry, $formFactory, $coreData, $context, $data); + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Eav\Model\Config $eavConfig, + \Magento\DesignEditor\Model\Editor\Tools\Controls\Factory $controlFactory, + \Magento\DesignEditor\Model\Theme\Context $themeContext, + array $data = array() + ) { + parent::__construct($context, $coreData, $registry, $formFactory, $data); $this->_eavConfig = $eavConfig; $this->_controlFactory = $controlFactory; $this->_themeContext = $themeContext; diff --git a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/Js.php b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/Js.php index d0be1f282344de27798efbc9ad5b50b93256d8c0..d179993bc06049a933d42adae82f3f5a9afb206a 100644 --- a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/Js.php +++ b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/Js.php @@ -43,25 +43,25 @@ class Js extends \Magento\Backend\Block\Widget\Form\Generic */ protected $_themeContext; - /** - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Theme\Model\Config\Customization $customizationConfig - * @param \Magento\DesignEditor\Model\Theme\Context $themeContext - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Theme\Model\Config\Customization $customizationConfig + * @param \Magento\DesignEditor\Model\Theme\Context $themeContext + * @param array $data */ - public function __construct( - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Theme\Model\Config\Customization $customizationConfig, - \Magento\DesignEditor\Model\Theme\Context $themeContext, - array $data = array() - ) { - parent::__construct($registry, $formFactory, $coreData, $context, $data); + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Theme\Model\Config\Customization $customizationConfig, + \Magento\DesignEditor\Model\Theme\Context $themeContext, + array $data = array() + ) { + parent::__construct($context, $coreData, $registry, $formFactory, $data); $this->_customizationConfig = $customizationConfig; $this->_themeContext = $themeContext; } diff --git a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/QuickStyles/AbstractTab.php b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/QuickStyles/AbstractTab.php index d3696145c8f76d476a0b77b46951f817246e4849..978cba1aa85533487b8878404c092c6767f25de7 100644 --- a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/QuickStyles/AbstractTab.php +++ b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/QuickStyles/AbstractTab.php @@ -62,21 +62,21 @@ abstract class AbstractTab */ protected $_tab = null; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\DesignEditor\Model\Editor\Tools\QuickStyles\Form\Builder $formBuilder - * @param \Magento\DesignEditor\Model\Theme\Context $themeContext - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\DesignEditor\Model\Editor\Tools\QuickStyles\Form\Builder $formBuilder + * @param \Magento\DesignEditor\Model\Theme\Context $themeContext + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\DesignEditor\Model\Editor\Tools\QuickStyles\Form\Builder $formBuilder, - \Magento\DesignEditor\Model\Theme\Context $themeContext, - array $data = array() - ) { - parent::__construct($coreData, $context, $data); + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\DesignEditor\Model\Editor\Tools\QuickStyles\Form\Builder $formBuilder, + \Magento\DesignEditor\Model\Theme\Context $themeContext, + array $data = array() + ) { + parent::__construct($context, $coreData, $data); $this->_formBuilder = $formBuilder; $this->_themeContext = $themeContext; } diff --git a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Settings.php b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Settings.php index 42128b75a7e90ee8c99ec17d839a6ef35a092cd6..98e200a2536b58a86b7c5171caed5f24d6b64b09 100644 --- a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Settings.php +++ b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Settings.php @@ -29,7 +29,7 @@ */ namespace Magento\DesignEditor\Block\Adminhtml\Editor\Tools; -class Settings extends \Magento\Core\Block\Template +class Settings extends \Magento\View\Block\Template { } diff --git a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Tabs/AbstractTabs.php b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Tabs/AbstractTabs.php index eda9e3cd54cf15ef268afdf84fc39fd2b7b16b02..4f671b605a7e27f4bfffb667819beea5000c6a58 100644 --- a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Tabs/AbstractTabs.php +++ b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Tabs/AbstractTabs.php @@ -31,7 +31,7 @@ */ namespace Magento\DesignEditor\Block\Adminhtml\Editor\Tools\Tabs; -abstract class AbstractTabs extends \Magento\Core\Block\Template +abstract class AbstractTabs extends \Magento\View\Block\Template { /** * Alias of tab handle block in layout diff --git a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Tabs/Body.php b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Tabs/Body.php index 30c46e1d31ea633a391e17aa20f92d993d320ec0..40d57cb23884d05d3fb7aeb2c878fe952581eeda 100644 --- a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Tabs/Body.php +++ b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Tabs/Body.php @@ -36,7 +36,7 @@ */ namespace Magento\DesignEditor\Block\Adminhtml\Editor\Tools\Tabs; -class Body extends \Magento\Core\Block\Template +class Body extends \Magento\View\Block\Template { /** * Get tab content diff --git a/app/code/Magento/DesignEditor/Block/Adminhtml/Theme/Button.php b/app/code/Magento/DesignEditor/Block/Adminhtml/Theme/Button.php index 162196bd6aee3c3116781e739f253d96158bf0ea..c21ea4d630c9e58a7bc184470dd18ce26e16249a 100644 --- a/app/code/Magento/DesignEditor/Block/Adminhtml/Theme/Button.php +++ b/app/code/Magento/DesignEditor/Block/Adminhtml/Theme/Button.php @@ -29,7 +29,7 @@ */ namespace Magento\DesignEditor\Block\Adminhtml\Theme; -class Button extends \Magento\Core\Block\Template +class Button extends \Magento\View\Block\Template { /** * Define block template diff --git a/app/code/Magento/DesignEditor/Block/Adminhtml/Theme/Selector/SelectorList/AbstractSelectorList.php b/app/code/Magento/DesignEditor/Block/Adminhtml/Theme/Selector/SelectorList/AbstractSelectorList.php index e1fcc816a2e4b2e7838658600030c60be10bee84..e8bf7044d594e0b416795a60f5dad22ddc2c14f9 100644 --- a/app/code/Magento/DesignEditor/Block/Adminhtml/Theme/Selector/SelectorList/AbstractSelectorList.php +++ b/app/code/Magento/DesignEditor/Block/Adminhtml/Theme/Selector/SelectorList/AbstractSelectorList.php @@ -168,7 +168,7 @@ abstract class AbstractSelectorList $editButton->setData(array( 'title' => __('Edit'), 'label' => __('Edit'), - 'class' => 'action-edit', + 'class' => 'action-edit primary', 'href' => $this->_getEditUrl($themeBlock->getTheme()->getId()), 'target' => 'edittheme', )); diff --git a/app/code/Magento/DesignEditor/Block/Adminhtml/Theme/Selector/SelectorList/Assigned.php b/app/code/Magento/DesignEditor/Block/Adminhtml/Theme/Selector/SelectorList/Assigned.php index d84589f45a7a2cedc58ea824c23232d7ba6b8a72..916222e4ad30ac7fab1b0f0200f8a2832767c141 100644 --- a/app/code/Magento/DesignEditor/Block/Adminhtml/Theme/Selector/SelectorList/Assigned.php +++ b/app/code/Magento/DesignEditor/Block/Adminhtml/Theme/Selector/SelectorList/Assigned.php @@ -32,29 +32,6 @@ namespace Magento\DesignEditor\Block\Adminhtml\Theme\Selector\SelectorList; class Assigned extends \Magento\DesignEditor\Block\Adminhtml\Theme\Selector\SelectorList\AbstractSelectorList { - /** - * Store manager model - * - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param array $data - */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - array $data = array() - ) { - $this->_storeManager = $storeManager; - parent::__construct($coreData, $context, $data); - } - /** * Get list title * diff --git a/app/code/Magento/DesignEditor/Block/Adminhtml/Theme/Selector/StoreView.php b/app/code/Magento/DesignEditor/Block/Adminhtml/Theme/Selector/StoreView.php index 73a3ebd7b2bc50178ffea371c72c983b99359af0..10f6eddbea8e499e33d1fa4ab1f9cf04ceacce45 100644 --- a/app/code/Magento/DesignEditor/Block/Adminhtml/Theme/Selector/StoreView.php +++ b/app/code/Magento/DesignEditor/Block/Adminhtml/Theme/Selector/StoreView.php @@ -47,25 +47,24 @@ class StoreView extends \Magento\Backend\Block\Template */ protected $_customizationConfig; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Resource\Website\Collection $websiteCollection - * @param \Magento\Theme\Model\Config\Customization $customizationConfig - * @param array $data - * @internal param \Magento\Theme\Model\Config $themeConfig + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Resource\Website\Collection $websiteCollection + * @param \Magento\Theme\Model\Config\Customization $customizationConfig + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Resource\Website\Collection $websiteCollection, - \Magento\Theme\Model\Config\Customization $customizationConfig, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Resource\Website\Collection $websiteCollection, + \Magento\Theme\Model\Config\Customization $customizationConfig, + array $data = array() + ) { $this->_websiteCollection = $websiteCollection; $this->_customizationConfig = $customizationConfig; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/DesignEditor/Controller/Adminhtml/System/Design/Editor.php b/app/code/Magento/DesignEditor/Controller/Adminhtml/System/Design/Editor.php index f4420557e5a6fdf6ee09bc4f1edd29882d3a1292..b4ecc0e88584cde6a288dd890d531a376f5ada92 100644 --- a/app/code/Magento/DesignEditor/Controller/Adminhtml/System/Design/Editor.php +++ b/app/code/Magento/DesignEditor/Controller/Adminhtml/System/Design/Editor.php @@ -31,7 +31,7 @@ namespace Magento\DesignEditor\Controller\Adminhtml\System\Design; * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ -class Editor extends \Magento\Backend\Controller\Adminhtml\Action +class Editor extends \Magento\Backend\App\Action { /** * @var \Magento\Theme\Model\Config @@ -44,18 +44,17 @@ class Editor extends \Magento\Backend\Controller\Adminhtml\Action protected $_customizationConfig; /** - * @param \Magento\Backend\Controller\Context $context + * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Theme\Model\Config $themeConfig * @param \Magento\Theme\Model\Config\Customization $customizationConfig */ public function __construct( - \Magento\Backend\Controller\Context $context, + \Magento\Backend\App\Action\Context $context, \Magento\Theme\Model\Config $themeConfig, \Magento\Theme\Model\Config\Customization $customizationConfig ) { $this->_themeConfig = $themeConfig; $this->_customizationConfig = $customizationConfig; - parent::__construct($context); } @@ -82,18 +81,18 @@ class Editor extends \Magento\Backend\Controller\Adminhtml\Action ->getParam('page_size', \Magento\Core\Model\Resource\Theme\Collection::DEFAULT_PAGE_SIZE); try { - $this->loadLayout(); + $this->_view->loadLayout(); /** @var $collection \Magento\Core\Model\Resource\Theme\Collection */ $collection = $this->_objectManager->get('Magento\Core\Model\Resource\Theme\Collection') ->filterPhysicalThemes($page, $pageSize); /** @var $availableThemeBlock \Magento\DesignEditor\Block\Adminhtml\Theme\Selector\SelectorList\Available */ - $availableThemeBlock = $this->getLayout()->getBlock('available.theme.list'); + $availableThemeBlock = $this->_view->getLayout()->getBlock('available.theme.list'); $availableThemeBlock->setCollection($collection)->setNextPage(++$page); $availableThemeBlock->setIsFirstEntrance($this->_isFirstEntrance()); $availableThemeBlock->setHasThemeAssigned($this->_customizationConfig->hasThemeAssigned()); - $response = array('content' => $this->getLayout()->getOutput()); + $response = array('content' => $this->_view->getLayout()->getOutput()); } catch (\Exception $e) { $this->_objectManager->get('Magento\Logger')->logException($e); $response = array('error' => __('Sorry, but we can\'t load the theme list.')); @@ -124,20 +123,20 @@ class Editor extends \Magento\Backend\Controller\Adminhtml\Action $this->_eventManager->dispatch('design_editor_activate'); $this->_setTitle(); - $this->loadLayout(); + $this->_view->loadLayout(); $this->_configureToolbarBlocks($launchedTheme, $editableTheme, $mode); //top panel $this->_configureToolsBlocks($launchedTheme, $mode); //bottom panel $this->_configureEditorBlock($launchedTheme, $mode); //editor container /** @var $storeViewBlock \Magento\DesignEditor\Block\Adminhtml\Theme\Selector\StoreView */ - $storeViewBlock = $this->getLayout()->getBlock('theme.selector.storeview'); + $storeViewBlock = $this->_view->getLayout()->getBlock('theme.selector.storeview'); $storeViewBlock->setData(array( 'actionOnAssign' => 'none', 'theme_id' => $launchedTheme->getId() )); - $this->renderLayout(); + $this->_view->renderLayout(); } catch (\Magento\Core\Exception $e) { $this->_getSession()->addException($e, $e->getMessage()); $this->_objectManager->get('Magento\Logger')->logException($e); @@ -296,7 +295,7 @@ class Editor extends \Magento\Backend\Controller\Adminhtml\Action $this->_objectManager->get('Magento\Logger')->logException($e); $this->_getSession()->addError(__('You cannot duplicate this theme.')); } - $this->_redirectUrl($this->_getRefererUrl()); + $this->getResponse()->setRedirect($this->_redirect->getRefererUrl()); } /** @@ -354,7 +353,7 @@ class Editor extends \Magento\Backend\Controller\Adminhtml\Action */ protected function _setTitle() { - $this->_title(__('Store Designer')); + $this->_title->add(__('Store Designer')); } /** @@ -395,13 +394,13 @@ class Editor extends \Magento\Backend\Controller\Adminhtml\Action protected function _configureToolsBlocks($theme, $mode) { /** @var $toolsBlock \Magento\DesignEditor\Block\Adminhtml\Editor\Tools */ - $toolsBlock = $this->getLayout()->getBlock('design_editor_tools'); + $toolsBlock = $this->_view->getLayout()->getBlock('design_editor_tools'); if ($toolsBlock) { $toolsBlock->setMode($mode); } /** @var $cssTabBlock \Magento\DesignEditor\Block\Adminhtml\Editor\Tools\Code\Css */ - $cssTabBlock = $this->getLayout()->getBlock('design_editor_tools_code_css'); + $cssTabBlock = $this->_view->getLayout()->getBlock('design_editor_tools_code_css'); if ($cssTabBlock) { /** @var $helper \Magento\Core\Helper\Theme */ $helper = $this->_objectManager->get('Magento\Core\Helper\Theme'); @@ -423,19 +422,19 @@ class Editor extends \Magento\Backend\Controller\Adminhtml\Action protected function _configureToolbarBlocks($theme, $editableTheme, $mode) { /** @var $toolbarBlock \Magento\DesignEditor\Block\Adminhtml\Editor\Toolbar\Buttons */ - $toolbarBlock = $this->getLayout()->getBlock('design_editor_toolbar_buttons'); + $toolbarBlock = $this->_view->getLayout()->getBlock('design_editor_toolbar_buttons'); $toolbarBlock->setThemeId($editableTheme->getId())->setVirtualThemeId($theme->getId()) ->setMode($mode); /** @var $saveButtonBlock \Magento\DesignEditor\Block\Adminhtml\Editor\Toolbar\Buttons\Save */ - $saveButtonBlock = $this->getLayout()->getBlock('design_editor_toolbar_buttons_save'); + $saveButtonBlock = $this->_view->getLayout()->getBlock('design_editor_toolbar_buttons_save'); if ($saveButtonBlock) { $saveButtonBlock->setTheme($theme)->setMode($mode)->setHasThemeAssigned( $this->_customizationConfig->hasThemeAssigned() ); } /** @var $saveButtonBlock \Magento\DesignEditor\Block\Adminhtml\Editor\Toolbar\Buttons\Edit */ - $editButtonBlock = $this->getLayout()->getBlock('design_editor_toolbar_buttons_edit'); + $editButtonBlock = $this->_view->getLayout()->getBlock('design_editor_toolbar_buttons_edit'); if ($editButtonBlock) { $editButtonBlock->setTheme($editableTheme); } @@ -453,7 +452,7 @@ class Editor extends \Magento\Backend\Controller\Adminhtml\Action protected function _configureEditorBlock($editableTheme, $mode) { /** @var $editorBlock \Magento\DesignEditor\Block\Adminhtml\Editor\Container */ - $editorBlock = $this->getLayout()->getBlock('design_editor'); + $editorBlock = $this->_view->getLayout()->getBlock('design_editor'); $currentUrl = $this->_getCurrentUrl($editableTheme->getId(), $mode); $editorBlock->setFrameUrl($currentUrl); $editorBlock->setTheme($editableTheme); @@ -482,27 +481,27 @@ class Editor extends \Magento\Backend\Controller\Adminhtml\Action { try { $this->_setTitle(); - $this->loadLayout(); + $this->_view->loadLayout(); $this->_setActiveMenu('Magento_DesignEditor::system_design_editor'); if (!$this->_isFirstEntrance()) { /** @var $assignedThemeBlock * \Magento\DesignEditor\Block\Adminhtml\Theme\Selector\SelectorList\Assigned */ - $assignedThemeBlock = $this->getLayout()->getBlock('assigned.theme.list'); + $assignedThemeBlock = $this->_view->getLayout()->getBlock('assigned.theme.list'); $assignedThemeBlock->setCollection($this->_customizationConfig->getAssignedThemeCustomizations()); /** @var $unassignedThemeBlock * \Magento\DesignEditor\Block\Adminhtml\Theme\Selector\SelectorList\Unassigned */ - $unassignedThemeBlock = $this->getLayout()->getBlock('unassigned.theme.list'); + $unassignedThemeBlock = $this->_view->getLayout()->getBlock('unassigned.theme.list'); $unassignedThemeBlock->setCollection($this->_customizationConfig->getUnassignedThemeCustomizations()); $unassignedThemeBlock->setHasThemeAssigned($this->_customizationConfig->hasThemeAssigned()); } /** @var $storeViewBlock \Magento\DesignEditor\Block\Adminhtml\Theme\Selector\StoreView */ - $storeViewBlock = $this->getLayout()->getBlock('theme.selector.storeview'); + $storeViewBlock = $this->_view->getLayout()->getBlock('theme.selector.storeview'); $storeViewBlock->setData('actionOnAssign', 'refresh'); - $this->renderLayout(); + $this->_view->renderLayout(); } catch (\Exception $e) { $this->_getSession()->addError(__('We can\'t load the list of themes.')); - $this->_redirectUrl($this->_getRefererUrl()); + $this->getResponse()->setRedirect($this->_redirect->getRefererUrl()); $this->_objectManager->get('Magento\Logger')->logException($e); } } diff --git a/app/code/Magento/DesignEditor/Controller/Adminhtml/System/Design/Editor/Files.php b/app/code/Magento/DesignEditor/Controller/Adminhtml/System/Design/Editor/Files.php index e343e66fc6384c7629ce2b35ab790a168db65f67..02c83ef0d3271ab74e06a4ea0a7c6e154f9e08e4 100644 --- a/app/code/Magento/DesignEditor/Controller/Adminhtml/System/Design/Editor/Files.php +++ b/app/code/Magento/DesignEditor/Controller/Adminhtml/System/Design/Editor/Files.php @@ -40,7 +40,7 @@ class Files { try { $this->getResponse()->setBody( - $this->getLayout()->createBlock('Magento\DesignEditor\Block\Adminhtml\Editor\Tools\Files\Tree') + $this->_view->getLayout()->createBlock('Magento\DesignEditor\Block\Adminhtml\Editor\Tools\Files\Tree') ->getTreeJson($this->_getStorage()->getTreeArray()) ); } catch (\Exception $e) { @@ -55,9 +55,9 @@ class Files public function contentsAction() { try { - $this->loadLayout('empty'); - $this->getLayout()->getBlock('editor_files.files')->setStorage($this->_getStorage()); - $this->renderLayout(); + $this->_view->loadLayout('empty'); + $this->_view->getLayout()->getBlock('editor_files.files')->setStorage($this->_getStorage()); + $this->_view->renderLayout(); $this->_getSession()->setStoragePath( $this->_objectManager->get('Magento\Theme\Helper\Storage')->getCurrentPath() diff --git a/app/code/Magento/DesignEditor/Controller/Adminhtml/System/Design/Editor/Tools.php b/app/code/Magento/DesignEditor/Controller/Adminhtml/System/Design/Editor/Tools.php index 79dc781bb0aecd3b7cf0af29be3d1a8ba9370e6c..e31ac5cd87cb325f161d5f5d299090a12bef0b3c 100644 --- a/app/code/Magento/DesignEditor/Controller/Adminhtml/System/Design/Editor/Tools.php +++ b/app/code/Magento/DesignEditor/Controller/Adminhtml/System/Design/Editor/Tools.php @@ -31,7 +31,7 @@ namespace Magento\DesignEditor\Controller\Adminhtml\System\Design\Editor; * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ -class Tools extends \Magento\Backend\Controller\Adminhtml\Action +class Tools extends \Magento\Backend\App\Action { /** * Initialize theme context model @@ -169,7 +169,7 @@ class Tools extends \Magento\Backend\Controller\Adminhtml\Action $editableTheme->getCustomization()->delete($removeJsFiles); $this->_forward('jsList'); } catch (\Exception $e) { - $this->_redirectUrl($this->_getRefererUrl()); + $this->getResponse()->setRedirect($this->_redirect->getRefererUrl()); $this->_objectManager->get('Magento\Logger')->logException($e); } } diff --git a/app/code/Magento/DesignEditor/Controller/Varien/Router/Standard.php b/app/code/Magento/DesignEditor/Controller/Varien/Router/Standard.php index e944632dbb6f99e8f4ef272891babdbbcecd76a4..b537723770320483e2ed1edd5cc8fc5862c10631 100644 --- a/app/code/Magento/DesignEditor/Controller/Varien/Router/Standard.php +++ b/app/code/Magento/DesignEditor/Controller/Varien/Router/Standard.php @@ -96,7 +96,7 @@ class Standard extends \Magento\Core\App\Router\Base * Match provided request and if matched - return corresponding controller * * @param \Magento\App\RequestInterface $request - * @return \Magento\Core\Controller\Front\Action|null + * @return \Magento\App\Action\Action|null */ public function match(\Magento\App\RequestInterface $request) { diff --git a/app/code/Magento/DesignEditor/Helper/Data.php b/app/code/Magento/DesignEditor/Helper/Data.php index 20ec1e3007061d41c7b05ecd3d4c5f1a1290cd45..7c3b479a9c1a87750c5803999e946d291ba1dd1b 100644 --- a/app/code/Magento/DesignEditor/Helper/Data.php +++ b/app/code/Magento/DesignEditor/Helper/Data.php @@ -29,7 +29,7 @@ */ namespace Magento\DesignEditor\Helper; -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { /** * XML path to VDE front name setting @@ -61,12 +61,12 @@ class Data extends \Magento\Core\Helper\AbstractHelper protected $_translationMode; /** - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param $frontName * @param array $disabledCacheTypes */ public function __construct( - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, $frontName, array $disabledCacheTypes = array() ) { diff --git a/app/code/Magento/DesignEditor/Model/Translate/InlineVde.php b/app/code/Magento/DesignEditor/Model/Translate/InlineVde.php index 86262e112b0dbaf5b38103931c5d48502cb514cb..395ce68cea8ec1d840a7724df96232e484944910 100644 --- a/app/code/Magento/DesignEditor/Model/Translate/InlineVde.php +++ b/app/code/Magento/DesignEditor/Model/Translate/InlineVde.php @@ -165,8 +165,8 @@ class InlineVde implements \Magento\Core\Model\Translate\InlineInterface \Magento\DesignEditor\Helper\Data::TRANSLATION_MODE => $this->_helper->getTranslationMode() )); - /** @var $block \Magento\Core\Block\Template */ - $block = $this->_objectManager->create('Magento\Core\Block\Template'); + /** @var $block \Magento\View\Block\Template */ + $block = $this->_objectManager->create('Magento\View\Block\Template'); $block->setArea($this->_parser->getDesignPackage()->getArea()); $block->setAjaxUrl($ajaxUrl); diff --git a/app/code/Magento/DesignEditor/Model/Url/NavigationMode.php b/app/code/Magento/DesignEditor/Model/Url/NavigationMode.php index dd79bfd35af46b9a6ba6309c7e7f348d37f042b8..4fb3d6e567f8e260cf1fade28838a4d507953977 100644 --- a/app/code/Magento/DesignEditor/Model/Url/NavigationMode.php +++ b/app/code/Magento/DesignEditor/Model/Url/NavigationMode.php @@ -55,11 +55,11 @@ class NavigationMode extends \Magento\Core\Model\Url /** * @param \Magento\App\Route\ConfigInterface $routeConfig * @param \Magento\App\RequestInterface $request - * @param \Magento\Core\Model\Url\SecurityInfoInterface $securityInfo + * @param \Magento\Core\Model\Url\SecurityInfoInterface $urlSecurityInfo * @param \Magento\DesignEditor\Helper\Data $helper * @param \Magento\Core\Model\Store\Config $coreStoreConfig * @param \Magento\Core\Model\App $app - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Session $session * @param string $areaCode * @param array $data @@ -67,11 +67,11 @@ class NavigationMode extends \Magento\Core\Model\Url public function __construct( \Magento\App\Route\ConfigInterface $routeConfig, \Magento\App\RequestInterface $request, - \Magento\Core\Model\Url\SecurityInfoInterface $securityInfo, + \Magento\Core\Model\Url\SecurityInfoInterface $urlSecurityInfo, \Magento\DesignEditor\Helper\Data $helper, \Magento\Core\Model\Store\Config $coreStoreConfig, \Magento\Core\Model\App $app, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Session $session, $areaCode, array $data = array() @@ -85,7 +85,7 @@ class NavigationMode extends \Magento\Core\Model\Url $this->_themeId = $data['themeId']; } parent::__construct( - $routeConfig, $request, $securityInfo, $coreStoreConfig, $app, $storeManager, $session, $areaCode, $data + $routeConfig, $request, $urlSecurityInfo, $coreStoreConfig, $app, $storeManager, $session, $areaCode, $data ); } diff --git a/app/code/Magento/DesignEditor/view/adminhtml/css/styles.css b/app/code/Magento/DesignEditor/view/adminhtml/css/styles.css index 259f42af44c3d34ab4e1ecda67a059fcf2c5a60c..f8be73ca08511bdb88e8af926ce87ba062978bc3 100644 --- a/app/code/Magento/DesignEditor/view/adminhtml/css/styles.css +++ b/app/code/Magento/DesignEditor/view/adminhtml/css/styles.css @@ -23,51 +23,6 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ -/* - Actions look like buttons --------------------------------------- */ -.action-theme-preview, -.action-theme-preview:visited, -.action-theme-assign, -.action-theme-assign:visited, -.action-save, -.action-save:visited { - font-family: 'CallunaSans'; - font-size: 13px; - font-weight: 500; - color: #676056; - position: relative; - display: inline-block; - padding: 4px 10px; - margin-bottom: 0; - line-height: 18px; - text-align: center; - text-decoration: none; - text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); - vertical-align: top; - cursor: pointer; - background: #ffffff; - background: -moz-linear-gradient(top, #ffffff 0%, #e6e6e6 100%); - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ffffff), color-stop(100%, #e6e6e6)); - background: -webkit-linear-gradient(top, #ffffff 0%, #e6e6e6 100%); - background: -o-linear-gradient(top, #ffffff 0%, #e6e6e6 100%); - background: -ms-linear-gradient(top, #ffffff 0%, #e6e6e6 100%); - background: linear-gradient(to bottom, #ffffff 0%, #e6e6e6 100%); - border: 1px solid #c0bcb8; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - border-radius: 4px; - -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); - -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); - -webkit-touch-callout: none; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - - - /* Actions look like links -------------------------------------- */ @@ -534,30 +489,6 @@ color: #959393; } -.theme-assigned-data .action-edit { - background: #f47b20; - color: #fff; - border-color: transparent; -} - -.theme-assigned-data .action-edit:hover { - background: #e2701a; - color: #fff; - text-shadow: 0 -1px 2px #955326; -} - -.eq-ie8 .theme-assigned-data .action-edit, -.eq-ie8 .theme-assigned-data .action-edit:hover, -.eq-ie8 .theme-assigned-data .action-edit:active, -.eq-ie8 .theme-assigned-data .action-edit:focus, -.eq-ie8 .theme-assigned-data .action-edit[disabled] { - filter: none; -} - -.theme-assigned-data .action-edit:active { - box-shadow: 0 1px 5px #955326 inset; -} - /* Theme Title Quick Save Form -------------------------------------- */ diff --git a/app/code/Magento/DesignEditor/view/adminhtml/editor/toolbar.phtml b/app/code/Magento/DesignEditor/view/adminhtml/editor/toolbar.phtml index a30a903542f62feca348ae26a1e4607e394e8cc9..843d6e216b5ef91d891142e5082074373ce108a9 100644 --- a/app/code/Magento/DesignEditor/view/adminhtml/editor/toolbar.phtml +++ b/app/code/Magento/DesignEditor/view/adminhtml/editor/toolbar.phtml @@ -24,7 +24,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -<?php /** @var $this \Magento\Core\Block\Template */ ?> +<?php /** @var $this \Magento\View\Block\Template */ ?> <div id="vde_toolbar_row" class="header"> <div class="vde_toolbar_row_inner"> <?php echo $this->getChildHtml(); ?> diff --git a/app/code/Magento/DesignEditor/view/frontend/translate_inline.phtml b/app/code/Magento/DesignEditor/view/frontend/translate_inline.phtml index badd77b3fc0c3bbefe337e24463dd70bb68f9323..74990f09fa318e7d4fee6bb20d7b5e42cbff105a 100644 --- a/app/code/Magento/DesignEditor/view/frontend/translate_inline.phtml +++ b/app/code/Magento/DesignEditor/view/frontend/translate_inline.phtml @@ -24,7 +24,7 @@ */ ?> -<?php /** @var $this \Magento\Core\Block\Template */ ?> +<?php /** @var $this \Magento\View\Block\Template */ ?> <script type="text/javascript" src="<?php echo $this->getViewFileUrl('mage/translate.js') ?>"></script> <script type="text/javascript" src="<?php echo $this->getViewFileUrl('mage/loader.js') ?>"></script> <script type="text/javascript" src="<?php echo $this->getViewFileUrl('mage/bootstrap.js') ?>"></script> diff --git a/app/code/Magento/Directory/Block/Adminhtml/Frontend/Currency/Base.php b/app/code/Magento/Directory/Block/Adminhtml/Frontend/Currency/Base.php index 9fd4e67e9ba1b95808c1bb5332328cc797e54435..263662232da51dfa5e8f881c04886c5ede63b8b5 100644 --- a/app/code/Magento/Directory/Block/Adminhtml/Frontend/Currency/Base.php +++ b/app/code/Magento/Directory/Block/Adminhtml/Frontend/Currency/Base.php @@ -31,29 +31,6 @@ namespace Magento\Directory\Block\Adminhtml\Frontend\Currency; class Base extends \Magento\Backend\Block\System\Config\Form\Field { - /** - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\App $application - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param array $data - */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\App $application, - \Magento\Core\Model\StoreManagerInterface $storeManager, - array $data = array() - ) { - parent::__construct($coreData, $context, $application, $data); - $this->_storeManager = $storeManager; - } - /** * @param \Magento\Data\Form\Element\AbstractElement $element * @return string diff --git a/app/code/Magento/Directory/Block/Currency.php b/app/code/Magento/Directory/Block/Currency.php index aae83c4bb0e4582653322bbad24b09c886c6adce..5d55b1fbecafd871a1a4e48566b170072d735122 100644 --- a/app/code/Magento/Directory/Block/Currency.php +++ b/app/code/Magento/Directory/Block/Currency.php @@ -29,13 +29,8 @@ */ namespace Magento\Directory\Block; -class Currency extends \Magento\Core\Block\Template +class Currency extends \Magento\View\Block\Template { - /** - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - /** * Directory url * @@ -43,39 +38,28 @@ class Currency extends \Magento\Core\Block\Template */ protected $_directoryUrl = null; - /** - * @var \Magento\Core\Model\LocaleInterface - */ - protected $_locale; - /** * @var \Magento\Directory\Model\CurrencyFactory */ protected $_currencyFactory; /** - * @param \Magento\Directory\Helper\Url $directoryUrl - * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context - * @param \Magento\Core\Model\LocaleInterface $locale + * @param \Magento\Directory\Helper\Url $directoryUrl * @param \Magento\Directory\Model\CurrencyFactory $currencyFactory * @param array $data */ public function __construct( - \Magento\Directory\Helper\Url $directoryUrl, - \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, - \Magento\Core\Model\LocaleInterface $locale, + \Magento\Directory\Helper\Url $directoryUrl, \Magento\Directory\Model\CurrencyFactory $currencyFactory, array $data = array() ) { $this->_directoryUrl = $directoryUrl; - $this->_storeManager = $storeManager; - $this->_locale = $locale; $this->_currencyFactory = $currencyFactory; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Directory/Block/Data.php b/app/code/Magento/Directory/Block/Data.php index 01bf250cdf412a3c22db44069c84f4fc325dee64..f78cc0037f64216ce86b1e7281061cb9e9eac91f 100644 --- a/app/code/Magento/Directory/Block/Data.php +++ b/app/code/Magento/Directory/Block/Data.php @@ -29,18 +29,13 @@ */ namespace Magento\Directory\Block; -class Data extends \Magento\Core\Block\Template +class Data extends \Magento\View\Block\Template { /** * @var \Magento\App\Cache\Type\Config */ protected $_configCacheType; - /** - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - /** * @var \Magento\Directory\Model\Resource\Region\CollectionFactory */ @@ -52,26 +47,23 @@ class Data extends \Magento\Core\Block\Template protected $_countryCollFactory; /** - * @param \Magento\App\Cache\Type\Config $configCacheType + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\App\Cache\Type\Config $configCacheType * @param \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollFactory * @param \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollFactory * @param array $data */ public function __construct( - \Magento\App\Cache\Type\Config $configCacheType, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\App\Cache\Type\Config $configCacheType, \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollFactory, \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollFactory, array $data = array() ) { - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); $this->_configCacheType = $configCacheType; - $this->_storeManager = $storeManager; $this->_regionCollFactory = $regionCollFactory; $this->_countryCollFactory = $countryCollFactory; } @@ -119,7 +111,7 @@ class Data extends \Magento\Core\Block\Template $options = $this->getCountryCollection()->toOptionArray(); $this->_configCacheType->save(serialize($options), $cacheKey); } - $html = $this->getLayout()->createBlock('Magento\Core\Block\Html\Select') + $html = $this->getLayout()->createBlock('Magento\View\Block\Html\Select') ->setName($name) ->setId($id) ->setTitle(__($title)) @@ -162,7 +154,7 @@ class Data extends \Magento\Core\Block\Template $options = $this->getRegionCollection()->toOptionArray(); $this->_configCacheType->save(serialize($options), $cacheKey); } - $html = $this->getLayout()->createBlock('Magento\Core\Block\Html\Select') + $html = $this->getLayout()->createBlock('Magento\View\Block\Html\Select') ->setName('region') ->setTitle(__('State/Province')) ->setId('state') diff --git a/app/code/Magento/Directory/Controller/Adminhtml/Json.php b/app/code/Magento/Directory/Controller/Adminhtml/Json.php index ef66c1561dd29c962fb43c5db0de1142f1114d9e..170049a8fcbb6b83c09c3c94fa3005ac30866529 100644 --- a/app/code/Magento/Directory/Controller/Adminhtml/Json.php +++ b/app/code/Magento/Directory/Controller/Adminhtml/Json.php @@ -33,7 +33,7 @@ */ namespace Magento\Directory\Controller\Adminhtml; -class Json extends \Magento\Backend\Controller\Adminhtml\Action +class Json extends \Magento\Backend\App\Action { /** * Return JSON-encoded array of country regions diff --git a/app/code/Magento/Directory/Controller/Currency.php b/app/code/Magento/Directory/Controller/Currency.php index ea080cae6723e366b55c2a5e7adc21a99e27a51c..d1829d69ba3a63c4752a7b2ad2a5554cea8a955d 100644 --- a/app/code/Magento/Directory/Controller/Currency.php +++ b/app/code/Magento/Directory/Controller/Currency.php @@ -29,7 +29,7 @@ */ namespace Magento\Directory\Controller; -class Currency extends \Magento\Core\Controller\Front\Action +class Currency extends \Magento\App\Action\Action { public function switchAction() { @@ -39,6 +39,7 @@ class Currency extends \Magento\Core\Controller\Front\Action if ($currency) { $storeManager->getStore()->setCurrentCurrencyCode($currency); } - $this->_redirectReferer($storeManager->getStore()->getBaseUrl()); + $storeUrl = $storeManager->getStore()->getBaseUrl(); + $this->getResponse()->setRedirect($this->_redirect->getRedirectUrl($storeUrl)); } } diff --git a/app/code/Magento/Directory/Helper/Data.php b/app/code/Magento/Directory/Helper/Data.php index 7e19fb1ab1ecc0fbf42047db39c570ca3e798b8b..333cfd1a637b1031fe991d95b34ae398e8b0f1ec 100644 --- a/app/code/Magento/Directory/Helper/Data.php +++ b/app/code/Magento/Directory/Helper/Data.php @@ -29,7 +29,7 @@ */ namespace Magento\Directory\Helper; -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { /** * Config value that lists ISO2 country codes which have optional Zip/Postal pre-configured @@ -97,7 +97,7 @@ class Data extends \Magento\Core\Helper\AbstractHelper protected $_coreHelper; /** - * @var \Magento\Core\Model\StoreManager + * @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; @@ -112,7 +112,7 @@ class Data extends \Magento\Core\Helper\AbstractHelper protected $_config; /** - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\App\Cache\Type\Config $configCacheType * @param \Magento\Directory\Model\Resource\Country\Collection $countryCollection * @param \Magento\Directory\Model\Resource\Region\CollectionFactory $regCollFactory, @@ -122,7 +122,7 @@ class Data extends \Magento\Core\Helper\AbstractHelper * @param \Magento\Core\Model\Config $config */ public function __construct( - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\App\Cache\Type\Config $configCacheType, \Magento\Directory\Model\Resource\Country\Collection $countryCollection, \Magento\Directory\Model\Resource\Region\CollectionFactory $regCollFactory, diff --git a/app/code/Magento/Directory/Helper/Url.php b/app/code/Magento/Directory/Helper/Url.php index 63da82dad6299c61571e43432606bc4463dea72d..4715813156bb04363b752b05dcc573e839894653 100644 --- a/app/code/Magento/Directory/Helper/Url.php +++ b/app/code/Magento/Directory/Helper/Url.php @@ -40,13 +40,13 @@ class Url extends \Magento\Core\Helper\Url /** * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Helper\Context $context - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\App\Helper\Context $context + * @param \Magento\Core\Model\StoreManagerInterface $storeManager */ public function __construct( \Magento\Core\Helper\Data $coreData, - \Magento\Core\Helper\Context $context, - \Magento\Core\Model\StoreManager $storeManager + \Magento\App\Helper\Context $context, + \Magento\Core\Model\StoreManagerInterface $storeManager ) { $this->_coreData = $coreData; parent::__construct($context, $storeManager); @@ -68,7 +68,7 @@ class Url extends \Magento\Core\Helper\Url } else { $url = $this->getCurrentUrl(); } - $params[\Magento\Core\Controller\Front\Action::PARAM_NAME_URL_ENCODED] = $this->_coreData->urlEncode($url); + $params[\Magento\App\Action\Action::PARAM_NAME_URL_ENCODED] = $this->_coreData->urlEncode($url); return $this->_getUrl('directory/currency/switch', $params); } } diff --git a/app/code/Magento/Directory/Model/Observer.php b/app/code/Magento/Directory/Model/Observer.php index 4b570fef2a1cb9ef0f6e62a014c0ae103d0b00d8..3951c8e6d9c0e404a721b8f17fdfaec2ef4823a1 100644 --- a/app/code/Magento/Directory/Model/Observer.php +++ b/app/code/Magento/Directory/Model/Observer.php @@ -59,7 +59,7 @@ class Observer protected $_translate; /** - * @var \Magento\Core\Model\Email\TemplateFactory + * @var \Magento\Email\Model\TemplateFactory */ protected $_emailTemplateFactory; @@ -77,7 +77,7 @@ class Observer * @param \Magento\Directory\Model\Currency\Import\Factory $importFactory * @param \Magento\Core\Model\Store\Config $coreStoreConfig * @param \Magento\Core\Model\Translate $translate - * @param \Magento\Core\Model\Email\TemplateFactory $emailTemplateFactory + * @param \Magento\Email\Model\TemplateFactory $emailTemplateFactory * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Directory\Model\CurrencyFactory $currencyFactory */ @@ -85,7 +85,7 @@ class Observer \Magento\Directory\Model\Currency\Import\Factory $importFactory, \Magento\Core\Model\Store\Config $coreStoreConfig, \Magento\Core\Model\Translate $translate, - \Magento\Core\Model\Email\TemplateFactory $emailTemplateFactory, + \Magento\Email\Model\TemplateFactory $emailTemplateFactory, \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Directory\Model\CurrencyFactory $currencyFactory ) { @@ -131,7 +131,7 @@ class Observer } else { $this->_translate->setTranslateInline(false); - /* @var $mailTemplate \Magento\Core\Model\Email\Template */ + /* @var $mailTemplate \Magento\Email\Model\Template */ $mailTemplate = $this->_emailTemplateFactory->create(); $mailTemplate->setDesignConfig(array( 'area' => \Magento\Core\Model\App\Area::AREA_FRONTEND, diff --git a/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable.php b/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable.php index c4855296498851f6d1f511328843d7e5801a4aa7..066f947eb7c88dc2fc10f9517307800970e37d33 100644 --- a/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable.php +++ b/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable.php @@ -54,20 +54,20 @@ class Downloadable */ protected $_coreRegistry = null; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Links.php b/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Links.php index 2cf96009ce8eab8658e91c0595c2bf78734a70d6..78dff1cca1eccae9e43ec3bb252e928745edd50f 100644 --- a/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Links.php +++ b/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Links.php @@ -66,11 +66,6 @@ class Links */ protected $_coreFileStorageDb = null; - /** - * @var \Magento\Core\Model\StoreManager - */ - protected $_storeManager; - /** * Core registry * @@ -98,41 +93,38 @@ class Links */ protected $_urlFactory; - /** - * @param \Magento\Core\Helper\File\Storage\Database $coreFileStorageDatabase - * @param \Magento\Downloadable\Helper\File $downloadableFile - * @param \Magento\Core\Model\StoreManager $storeManager - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $coreRegistry - * @param \Magento\Backend\Model\Config\Source\Yesno $sourceModel - * @param \Magento\Downloadable\Model\Link $link - * @param \Magento\Eav\Model\Entity\AttributeFactory $attributeFactory - * @param \Magento\Backend\Model\UrlFactory $urlFactory - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Helper\File\Storage\Database $coreFileStorageDatabase + * @param \Magento\Downloadable\Helper\File $downloadableFile + * @param \Magento\Core\Model\Registry $coreRegistry + * @param \Magento\Backend\Model\Config\Source\Yesno $sourceModel + * @param \Magento\Downloadable\Model\Link $link + * @param \Magento\Eav\Model\Entity\AttributeFactory $attributeFactory + * @param \Magento\Backend\Model\UrlFactory $urlFactory + * @param array $data */ - public function __construct( - \Magento\Core\Helper\File\Storage\Database $coreFileStorageDatabase, - \Magento\Downloadable\Helper\File $downloadableFile, - \Magento\Core\Model\StoreManager $storeManager, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $coreRegistry, - \Magento\Backend\Model\Config\Source\Yesno $sourceModel, - \Magento\Downloadable\Model\Link $link, - \Magento\Eav\Model\Entity\AttributeFactory $attributeFactory, - \Magento\Backend\Model\UrlFactory $urlFactory, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Helper\File\Storage\Database $coreFileStorageDatabase, + \Magento\Downloadable\Helper\File $downloadableFile, + \Magento\Core\Model\Registry $coreRegistry, + \Magento\Backend\Model\Config\Source\Yesno $sourceModel, + \Magento\Downloadable\Model\Link $link, + \Magento\Eav\Model\Entity\AttributeFactory $attributeFactory, + \Magento\Backend\Model\UrlFactory $urlFactory, + array $data = array() + ) { $this->_coreRegistry = $coreRegistry; $this->_coreFileStorageDb = $coreFileStorageDatabase; $this->_downloadableFile = $downloadableFile; - $this->_storeManager = $storeManager; $this->_sourceModel = $sourceModel; $this->_link = $link; $this->_attributeFactory = $attributeFactory; $this->_urlFactory = $urlFactory; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Samples.php b/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Samples.php index e6e03dc6075bc6fd97be45a79f8857f03416c721..e254ad3c958a78d02bf07f5c18ed23b569331fbc 100644 --- a/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Samples.php +++ b/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Samples.php @@ -59,11 +59,6 @@ class Samples */ protected $_coreFileStorageDb = null; - /** - * @var \Magento\Core\Model\StoreManager - */ - protected $_storeManager; - /** * Core registry * @@ -81,36 +76,33 @@ class Samples */ protected $_urlFactory; - /** - * @param \Magento\Core\Helper\File\Storage\Database $coreFileStorageDatabase - * @param \Magento\Downloadable\Helper\File $downloadableFile - * @param \Magento\Core\Model\StoreManager $storeManager - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $coreRegistry - * @param \Magento\Downloadable\Model\Sample $sampleModel - * @param \Magento\Backend\Model\UrlFactory $urlFactory - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Helper\File\Storage\Database $coreFileStorageDatabase + * @param \Magento\Downloadable\Helper\File $downloadableFile + * @param \Magento\Core\Model\Registry $coreRegistry + * @param \Magento\Downloadable\Model\Sample $sampleModel + * @param \Magento\Backend\Model\UrlFactory $urlFactory + * @param array $data */ - public function __construct( - \Magento\Core\Helper\File\Storage\Database $coreFileStorageDatabase, - \Magento\Downloadable\Helper\File $downloadableFile, - \Magento\Core\Model\StoreManager $storeManager, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $coreRegistry, - \Magento\Downloadable\Model\Sample $sampleModel, - \Magento\Backend\Model\UrlFactory $urlFactory, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Helper\File\Storage\Database $coreFileStorageDatabase, + \Magento\Downloadable\Helper\File $downloadableFile, + \Magento\Core\Model\Registry $coreRegistry, + \Magento\Downloadable\Model\Sample $sampleModel, + \Magento\Backend\Model\UrlFactory $urlFactory, + array $data = array() + ) { $this->_coreFileStorageDb = $coreFileStorageDatabase; $this->_downloadableFile = $downloadableFile; - $this->_storeManager = $storeManager; $this->_coreRegistry = $coreRegistry; $this->_sampleModel = $sampleModel; $this->_urlFactory = $urlFactory; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Downloadable/Block/Adminhtml/Sales/Items/Column/Downloadable/Name.php b/app/code/Magento/Downloadable/Block/Adminhtml/Sales/Items/Column/Downloadable/Name.php index 89d68ca440aac9e0c38df72c8ce25fd470e35644..bbacefd508cc6059af323575621c0aec703334d1 100644 --- a/app/code/Magento/Downloadable/Block/Adminhtml/Sales/Items/Column/Downloadable/Name.php +++ b/app/code/Magento/Downloadable/Block/Adminhtml/Sales/Items/Column/Downloadable/Name.php @@ -43,28 +43,25 @@ class Name extends \Magento\Sales\Block\Adminhtml\Items\Column\Name */ protected $_itemsFactory; - /** - * @param \Magento\Catalog\Model\Product\OptionFactory $optionFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Filter\FilterManager $filter - * @param \Magento\Downloadable\Model\Link\PurchasedFactory $purchasedFactory - * @param \Magento\Downloadable\Model\Resource\Link\Purchased\Item\CollectionFactory $itemsFactory - * @param array $data - * @internal param \Magento\Core\Helper\String $coreString + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Catalog\Model\Product\OptionFactory $optionFactory + * @param \Magento\Downloadable\Model\Link\PurchasedFactory $purchasedFactory + * @param \Magento\Downloadable\Model\Resource\Link\Purchased\Item\CollectionFactory $itemsFactory + * @param array $data */ - public function __construct( - \Magento\Catalog\Model\Product\OptionFactory $optionFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Filter\FilterManager $filter, - \Magento\Downloadable\Model\Link\PurchasedFactory $purchasedFactory, - \Magento\Downloadable\Model\Resource\Link\Purchased\Item\CollectionFactory $itemsFactory, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Catalog\Model\Product\OptionFactory $optionFactory, + \Magento\Downloadable\Model\Link\PurchasedFactory $purchasedFactory, + \Magento\Downloadable\Model\Resource\Link\Purchased\Item\CollectionFactory $itemsFactory, + array $data = array() + ) { $this->_purchasedFactory = $purchasedFactory; $this->_itemsFactory = $itemsFactory; - parent::__construct($optionFactory, $coreData, $context, $filter, $data); + parent::__construct($context, $coreData, $optionFactory, $data); } public function getLinks() diff --git a/app/code/Magento/Downloadable/Block/Catalog/Product/Links.php b/app/code/Magento/Downloadable/Block/Catalog/Product/Links.php index ddff3a25299b41b6449de9af1fb9c77d3840f4f7..50c393864bb6fe8594346907a524d3fce86763e6 100644 --- a/app/code/Magento/Downloadable/Block/Catalog/Product/Links.php +++ b/app/code/Magento/Downloadable/Block/Catalog/Product/Links.php @@ -41,41 +41,29 @@ class Links extends \Magento\Catalog\Block\Product\AbstractProduct protected $_calculationModel; /** - * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\View\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Catalog\Model\Config $catalogConfig - * @param \Magento\Core\Model\Registry $coreRegistry + * @param \Magento\Core\Model\Registry $registry * @param \Magento\Tax\Helper\Data $taxData * @param \Magento\Catalog\Helper\Data $catalogData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Math\Random $mathRandom * @param \Magento\Tax\Model\Calculation $calculationModel * @param array $data */ public function __construct( - \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\View\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Catalog\Model\Config $catalogConfig, - \Magento\Core\Model\Registry $coreRegistry, + \Magento\Core\Model\Registry $registry, \Magento\Tax\Helper\Data $taxData, \Magento\Catalog\Helper\Data $catalogData, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Math\Random $mathRandom, \Magento\Tax\Model\Calculation $calculationModel, array $data = array() ) { $this->_calculationModel = $calculationModel; - parent::__construct( - $storeManager, - $catalogConfig, - $coreRegistry, - $taxData, - $catalogData, - $coreData, - $context, - $mathRandom, - $data - ); + parent::__construct($context, $coreData, $catalogConfig, $registry, $taxData, $catalogData, $mathRandom, $data); } /** diff --git a/app/code/Magento/Downloadable/Block/Checkout/Cart/Item/Renderer.php b/app/code/Magento/Downloadable/Block/Checkout/Cart/Item/Renderer.php index 662d021afb64e27590d647f0455cb954afc3533e..b0b99d4ec011c5c26c0151728c75e07e9ead6e21 100644 --- a/app/code/Magento/Downloadable/Block/Checkout/Cart/Item/Renderer.php +++ b/app/code/Magento/Downloadable/Block/Checkout/Cart/Item/Renderer.php @@ -44,23 +44,23 @@ class Renderer extends \Magento\Checkout\Block\Cart\Item\Renderer protected $_downloadProdConfig = null; /** - * @param \Magento\Catalog\Helper\Product\Configuration $productConfiguration + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context - * @param \Magento\Downloadable\Helper\Catalog\Product\Configuration $dwnCtlgProdConfig + * @param \Magento\Catalog\Helper\Product\Configuration $productConfig * @param \Magento\Checkout\Model\Session $checkoutSession + * @param \Magento\Downloadable\Helper\Catalog\Product\Configuration $dwnCtlgProdConfig * @param array $data */ public function __construct( - \Magento\Catalog\Helper\Product\Configuration $productConfiguration, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, - \Magento\Downloadable\Helper\Catalog\Product\Configuration $dwnCtlgProdConfig, + \Magento\Catalog\Helper\Product\Configuration $productConfig, \Magento\Checkout\Model\Session $checkoutSession, + \Magento\Downloadable\Helper\Catalog\Product\Configuration $dwnCtlgProdConfig, array $data = array() ) { $this->_downloadProdConfig = $dwnCtlgProdConfig; - parent::__construct($productConfiguration, $coreData, $context, $checkoutSession, $data); + parent::__construct($context, $coreData, $productConfig, $checkoutSession, $data); } /** diff --git a/app/code/Magento/Downloadable/Block/Customer/Products/ListProducts.php b/app/code/Magento/Downloadable/Block/Customer/Products/ListProducts.php index 529ef53c44561e3590a128238dc822e5b4007644..12217b84604214ab413728b549ed3569396a20d0 100644 --- a/app/code/Magento/Downloadable/Block/Customer/Products/ListProducts.php +++ b/app/code/Magento/Downloadable/Block/Customer/Products/ListProducts.php @@ -33,7 +33,7 @@ */ namespace Magento\Downloadable\Block\Customer\Products; -class ListProducts extends \Magento\Core\Block\Template +class ListProducts extends \Magento\View\Block\Template { /** * @var \Magento\Customer\Model\Session @@ -51,16 +51,16 @@ class ListProducts extends \Magento\Core\Block\Template protected $_itemsFactory; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Downloadable\Model\Resource\Link\Purchased\CollectionFactory $linksFactory * @param \Magento\Downloadable\Model\Resource\Link\Purchased\Item\CollectionFactory $itemsFactory * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Customer\Model\Session $customerSession, \Magento\Downloadable\Model\Resource\Link\Purchased\CollectionFactory $linksFactory, \Magento\Downloadable\Model\Resource\Link\Purchased\Item\CollectionFactory $itemsFactory, @@ -69,7 +69,7 @@ class ListProducts extends \Magento\Core\Block\Template $this->_customerSession = $customerSession; $this->_linksFactory = $linksFactory; $this->_itemsFactory = $itemsFactory; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Downloadable/Block/Sales/Order/Email/Items/Downloadable.php b/app/code/Magento/Downloadable/Block/Sales/Order/Email/Items/Downloadable.php index ca37b75b20c3cd688bcfa845be5f439b4de28104..0437bbcb168e4f915509f50f682cfc386e2101cb 100644 --- a/app/code/Magento/Downloadable/Block/Sales/Order/Email/Items/Downloadable.php +++ b/app/code/Magento/Downloadable/Block/Sales/Order/Email/Items/Downloadable.php @@ -52,22 +52,22 @@ class Downloadable extends \Magento\Sales\Block\Order\Email\Items\DefaultItems protected $_itemsFactory; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Downloadable\Model\Link\PurchasedFactory $purchasedFactory * @param \Magento\Downloadable\Model\Resource\Link\Purchased\Item\CollectionFactory $itemsFactory * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Downloadable\Model\Link\PurchasedFactory $purchasedFactory, \Magento\Downloadable\Model\Resource\Link\Purchased\Item\CollectionFactory $itemsFactory, array $data = array() ) { $this->_purchasedFactory = $purchasedFactory; $this->_itemsFactory = $itemsFactory; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } diff --git a/app/code/Magento/Downloadable/Block/Sales/Order/Email/Items/Order/Downloadable.php b/app/code/Magento/Downloadable/Block/Sales/Order/Email/Items/Order/Downloadable.php index 0ce97dbc0e1d4c71a9a4531ef5713c9146af95b1..b650ab0510162f9e0dc815b12f1582b2b4f3fea3 100644 --- a/app/code/Magento/Downloadable/Block/Sales/Order/Email/Items/Order/Downloadable.php +++ b/app/code/Magento/Downloadable/Block/Sales/Order/Email/Items/Order/Downloadable.php @@ -51,16 +51,23 @@ class Downloadable extends \Magento\Sales\Block\Order\Email\Items\Order\DefaultO */ protected $_itemsFactory; + /** + * @param \Magento\View\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Downloadable\Model\Link\PurchasedFactory $purchasedFactory + * @param \Magento\Downloadable\Model\Resource\Link\Purchased\Item\CollectionFactory $itemsFactory + * @param array $data + */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Downloadable\Model\Link\PurchasedFactory $purchasedFactory, \Magento\Downloadable\Model\Resource\Link\Purchased\Item\CollectionFactory $itemsFactory, array $data = array() ) { $this->_purchasedFactory = $purchasedFactory; $this->_itemsFactory = $itemsFactory; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Downloadable/Block/Sales/Order/Item/Renderer/Downloadable.php b/app/code/Magento/Downloadable/Block/Sales/Order/Item/Renderer/Downloadable.php index 4042c7e90cde7024a170f419f4c717cce244398d..f01a1cb70941f4dd1956d9f32bf88a7f45e243f9 100644 --- a/app/code/Magento/Downloadable/Block/Sales/Order/Item/Renderer/Downloadable.php +++ b/app/code/Magento/Downloadable/Block/Sales/Order/Item/Renderer/Downloadable.php @@ -47,28 +47,26 @@ class Downloadable extends \Magento\Sales\Block\Order\Item\Renderer\DefaultRende protected $_itemsFactory; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Stdlib\String $string * @param \Magento\Catalog\Model\Product\OptionFactory $productOptionFactory - * @param \Magento\Filter\FilterManager $filter * @param \Magento\Downloadable\Model\Link\PurchasedFactory $purchasedFactory * @param \Magento\Downloadable\Model\Resource\Link\Purchased\Item\CollectionFactory $itemsFactory * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Stdlib\String $string, \Magento\Catalog\Model\Product\OptionFactory $productOptionFactory, - \Magento\Filter\FilterManager $filter, \Magento\Downloadable\Model\Link\PurchasedFactory $purchasedFactory, \Magento\Downloadable\Model\Resource\Link\Purchased\Item\CollectionFactory $itemsFactory, array $data = array() ) { $this->_purchasedFactory = $purchasedFactory; $this->_itemsFactory = $itemsFactory; - parent::__construct($coreData, $context, $string, $productOptionFactory, $filter, $data); + parent::__construct($context, $coreData, $string, $productOptionFactory, $data); } public function getLinks() diff --git a/app/code/Magento/Downloadable/Controller/Adminhtml/Downloadable/File.php b/app/code/Magento/Downloadable/Controller/Adminhtml/Downloadable/File.php index e7fe03499a84b468286ff385f0af2d7f90764d6b..fbef1005b74054b108c432b6fb63f53ecf9ea76d 100644 --- a/app/code/Magento/Downloadable/Controller/Adminhtml/Downloadable/File.php +++ b/app/code/Magento/Downloadable/Controller/Adminhtml/Downloadable/File.php @@ -33,7 +33,7 @@ */ namespace Magento\Downloadable\Controller\Adminhtml\Downloadable; -class File extends \Magento\Backend\Controller\Adminhtml\Action +class File extends \Magento\Backend\App\Action { /** * @var \Magento\Downloadable\Model\Link @@ -46,12 +46,12 @@ class File extends \Magento\Backend\Controller\Adminhtml\Action protected $_sample; /** - * @param \Magento\Backend\Controller\Context $context + * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Downloadable\Model\Link $link * @param \Magento\Downloadable\Model\Sample $sample */ public function __construct( - \Magento\Backend\Controller\Context $context, + \Magento\Backend\App\Action\Context $context, \Magento\Downloadable\Model\Link $link, \Magento\Downloadable\Model\Sample $sample ) { diff --git a/app/code/Magento/Downloadable/Controller/Adminhtml/Downloadable/Product/Edit.php b/app/code/Magento/Downloadable/Controller/Adminhtml/Downloadable/Product/Edit.php index df8023646fe1dac59ea99279d6e74f51b5bcedf5..cb473f3e44507d84e24b71d02a50ee7dc44055a8 100644 --- a/app/code/Magento/Downloadable/Controller/Adminhtml/Downloadable/Product/Edit.php +++ b/app/code/Magento/Downloadable/Controller/Adminhtml/Downloadable/Product/Edit.php @@ -43,7 +43,7 @@ class Edit extends \Magento\Catalog\Controller\Adminhtml\Product { $this->_initProduct(); $this->getResponse()->setBody( - $this->getLayout() + $this->_view->getLayout() ->createBlock( 'Magento\Downloadable\Block\Adminhtml\Catalog\Product\Edit\Tab\Downloadable', 'admin.product.downloadable.information') diff --git a/app/code/Magento/Downloadable/Controller/Customer.php b/app/code/Magento/Downloadable/Controller/Customer.php index e0a0d3f3fe58e4ab090d2984a0d79b9df140e756..b9e844e63ac13cd4276a4b1fee9db08a86efe16c 100644 --- a/app/code/Magento/Downloadable/Controller/Customer.php +++ b/app/code/Magento/Downloadable/Controller/Customer.php @@ -33,7 +33,10 @@ */ namespace Magento\Downloadable\Controller; -class Customer extends \Magento\Core\Controller\Front\Action +use Magento\App\Action\NotFoundException; +use Magento\App\RequestInterface; + +class Customer extends \Magento\App\Action\Action { /** * @var \Magento\Customer\Model\Session @@ -41,11 +44,11 @@ class Customer extends \Magento\Core\Controller\Front\Action protected $_customerSession; /** - * @param \Magento\Core\Controller\Varien\Action\Context $context + * @param \Magento\App\Action\Context $context * @param \Magento\Customer\Model\Session $customerSession */ public function __construct( - \Magento\Core\Controller\Varien\Action\Context $context, + \Magento\App\Action\Context $context, \Magento\Customer\Model\Session $customerSession ) { $this->_customerSession = $customerSession; @@ -54,15 +57,18 @@ class Customer extends \Magento\Core\Controller\Front\Action /** * Check customer authentication + * + * @param RequestInterface $request + * @return mixed */ - public function preDispatch() + public function dispatch(RequestInterface $request) { - parent::preDispatch(); $loginUrl = $this->_objectManager->get('Magento\Customer\Helper\Data')->getLoginUrl(); if (!$this->_customerSession->authenticate($this, $loginUrl)) { - $this->setFlag('', self::FLAG_NO_DISPATCH, true); + $this->_actionFlag->set('', self::FLAG_NO_DISPATCH, true); } + return parent::dispatch($request); } /** @@ -71,16 +77,16 @@ class Customer extends \Magento\Core\Controller\Front\Action */ public function productsAction() { - $this->loadLayout(); - $this->_initLayoutMessages('Magento\Customer\Model\Session'); - if ($block = $this->getLayout()->getBlock('downloadable_customer_products_list')) { - $block->setRefererUrl($this->_getRefererUrl()); + $this->_view->loadLayout(); + $this->_view->getLayout()->initMessages('Magento\Customer\Model\Session'); + if ($block = $this->_view->getLayout()->getBlock('downloadable_customer_products_list')) { + $block->setRefererUrl($this->_redirect->getRefererUrl()); } - $headBlock = $this->getLayout()->getBlock('head'); + $headBlock = $this->_view->getLayout()->getBlock('head'); if ($headBlock) { $headBlock->setTitle(__('My Downloadable Products')); } - $this->renderLayout(); + $this->_view->renderLayout(); } } diff --git a/app/code/Magento/Downloadable/Controller/Download.php b/app/code/Magento/Downloadable/Controller/Download.php index 2ea9cd770b502d0481d943579627bab421255710..b432855005dbf7fa4ffc39ab2eddf671aa23bdf3 100644 --- a/app/code/Magento/Downloadable/Controller/Download.php +++ b/app/code/Magento/Downloadable/Controller/Download.php @@ -33,7 +33,7 @@ */ namespace Magento\Downloadable\Controller; -class Download extends \Magento\Core\Controller\Front\Action +class Download extends \Magento\App\Action\Action { /** @@ -120,7 +120,7 @@ class Download extends \Magento\Core\Controller\Front\Action $this->_getSession()->addError(__('Sorry, there was an error getting requested content. Please contact the store owner.')); } } - return $this->_redirectReferer(); + return $this->getResponse()->setRedirect($this->_redirect->getRedirectUrl()); } /** @@ -150,7 +150,7 @@ class Download extends \Magento\Core\Controller\Front\Action $this->_getCustomerSession()->addError(__('Sorry, there was an error getting requested content. Please contact the store owner.')); } } - return $this->_redirectReferer(); + return $this->getResponse()->setRedirect($this->_redirect->getRedirectUrl()); } /** diff --git a/app/code/Magento/Downloadable/Helper/Catalog/Product/Configuration.php b/app/code/Magento/Downloadable/Helper/Catalog/Product/Configuration.php index 60ac5da5e6741e72b0a588ac2c2c7ce234674dd0..7fc2ae64177d82c05254a92205b0c0ae78500dca 100644 --- a/app/code/Magento/Downloadable/Helper/Catalog/Product/Configuration.php +++ b/app/code/Magento/Downloadable/Helper/Catalog/Product/Configuration.php @@ -33,7 +33,7 @@ */ namespace Magento\Downloadable\Helper\Catalog\Product; -class Configuration extends \Magento\Core\Helper\AbstractHelper +class Configuration extends \Magento\App\Helper\AbstractHelper implements \Magento\Catalog\Helper\Product\Configuration\ConfigurationInterface { /** @@ -52,12 +52,12 @@ class Configuration extends \Magento\Core\Helper\AbstractHelper /** * @param \Magento\Catalog\Helper\Product\Configuration $productConfigur - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\Store\Config $coreStoreConfig */ public function __construct( \Magento\Catalog\Helper\Product\Configuration $productConfigur, - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Core\Model\Store\Config $coreStoreConfig ) { $this->_productConfigur = $productConfigur; diff --git a/app/code/Magento/Downloadable/Helper/Data.php b/app/code/Magento/Downloadable/Helper/Data.php index 7335d5d892ddcc745f934a53b0c41882dd7af8fa..7ae180bc1258fd550112755957b589bf32b15ef8 100644 --- a/app/code/Magento/Downloadable/Helper/Data.php +++ b/app/code/Magento/Downloadable/Helper/Data.php @@ -33,7 +33,7 @@ */ namespace Magento\Downloadable\Helper; -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { /** * Core store config @@ -43,11 +43,11 @@ class Data extends \Magento\Core\Helper\AbstractHelper protected $_coreStoreConfig; /** - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\Store\Config $coreStoreConfig */ public function __construct( - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Core\Model\Store\Config $coreStoreConfig ) { $this->_coreStoreConfig = $coreStoreConfig; diff --git a/app/code/Magento/Downloadable/Helper/Download.php b/app/code/Magento/Downloadable/Helper/Download.php index 2262d1e2aea6b2cc2852f41dea01840cfa947a4b..df7bba3f69fda63bbf7785ddb7a695eeffe80a93 100644 --- a/app/code/Magento/Downloadable/Helper/Download.php +++ b/app/code/Magento/Downloadable/Helper/Download.php @@ -29,7 +29,7 @@ namespace Magento\Downloadable\Helper; /** * Downloadable Products Download Helper */ -class Download extends \Magento\Core\Helper\AbstractHelper +class Download extends \Magento\App\Helper\AbstractHelper { /** * Link type url @@ -116,11 +116,6 @@ class Download extends \Magento\Core\Helper\AbstractHelper */ protected $_coreStoreConfig; - /** - * @var \Magento\Core\Model\App - */ - protected $_app; - /** * @var \Magento\App\Dir */ @@ -135,9 +130,8 @@ class Download extends \Magento\Core\Helper\AbstractHelper * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Downloadable\Helper\File $downloadableFile * @param \Magento\Core\Helper\File\Storage\Database $coreFileStorageDb - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\Store\Config $coreStoreConfig - * @param \Magento\Core\Model\App $app * @param \Magento\App\Dir $dirModel * @param \Magento\Filesystem $filesystem */ @@ -145,9 +139,8 @@ class Download extends \Magento\Core\Helper\AbstractHelper \Magento\Core\Helper\Data $coreData, \Magento\Downloadable\Helper\File $downloadableFile, \Magento\Core\Helper\File\Storage\Database $coreFileStorageDb, - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Core\Model\Store\Config $coreStoreConfig, - \Magento\Core\Model\App $app, \Magento\App\Dir $dirModel, \Magento\Filesystem $filesystem ) { @@ -155,7 +148,6 @@ class Download extends \Magento\Core\Helper\AbstractHelper $this->_downloadableFile = $downloadableFile; $this->_coreFileStorageDb = $coreFileStorageDb; $this->_coreStoreConfig = $coreStoreConfig; - $this->_app = $app; $this->_dirModel = $dirModel; $this->_filesystem = $filesystem; parent::__construct($context); @@ -340,26 +332,6 @@ class Download extends \Magento\Core\Helper\AbstractHelper return $this; } - /** - * Retrieve Http Request Object - * - * @return \Magento\App\RequestInterface - */ - public function getHttpRequest() - { - return $this->_app->getFrontController()->getRequest(); - } - - /** - * Retrieve Http Response Object - * - * @return \Magento\App\ResponseInterface - */ - public function getHttpResponse() - { - return $this->_app->getFrontController()->getResponse(); - } - public function output() { $handle = $this->_getHandle(); diff --git a/app/code/Magento/Downloadable/Helper/File.php b/app/code/Magento/Downloadable/Helper/File.php index 6fb282a610d8380f1f7f79d4f07b2a6c7c589b82..7f21b4c232221b63f18519ff260cfae5fd4dc1c8 100644 --- a/app/code/Magento/Downloadable/Helper/File.php +++ b/app/code/Magento/Downloadable/Helper/File.php @@ -33,7 +33,7 @@ */ namespace Magento\Downloadable\Helper; -class File extends \Magento\Core\Helper\AbstractHelper +class File extends \Magento\App\Helper\AbstractHelper { /** * Core file storage database @@ -44,12 +44,12 @@ class File extends \Magento\Core\Helper\AbstractHelper /** * @param \Magento\Core\Helper\File\Storage\Database $coreFileStorageDatabase - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param array $mimeTypes */ public function __construct( \Magento\Core\Helper\File\Storage\Database $coreFileStorageDatabase, - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, array $mimeTypes = array() ) { $this->_coreFileStorageDatabase = $coreFileStorageDatabase; diff --git a/app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Main/AbstractMain.php b/app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Main/AbstractMain.php index 28404ad8839af5d1428d0f4aeafc89736fadd493..335271e220794ea373cc597745c0ad16859b4b9c 100644 --- a/app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Main/AbstractMain.php +++ b/app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Main/AbstractMain.php @@ -50,11 +50,6 @@ abstract class AbstractMain * @var \Magento\Eav\Model\Entity\Attribute\Config */ protected $_attributeConfig; - - /** - * @var \Magento\Core\Model\LocaleInterface - */ - protected $_locale; /** * @var \Magento\Backend\Model\Config\Source\YesnoFactory @@ -66,36 +61,33 @@ abstract class AbstractMain */ protected $_inputTypeFactory; - /** - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Eav\Helper\Data $eavData - * @param \Magento\Core\Model\LocaleInterface $locale - * @param \Magento\Backend\Model\Config\Source\YesnoFactory $yesnoFactory - * @param \Magento\Eav\Model\Adminhtml\System\Config\Source\InputtypeFactory $inputTypeFactory - * @param \Magento\Eav\Model\Entity\Attribute\Config $attributeConfig - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Eav\Helper\Data $eavData + * @param \Magento\Backend\Model\Config\Source\YesnoFactory $yesnoFactory + * @param \Magento\Eav\Model\Adminhtml\System\Config\Source\InputtypeFactory $inputTypeFactory + * @param \Magento\Eav\Model\Entity\Attribute\Config $attributeConfig + * @param array $data */ - public function __construct( - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Eav\Helper\Data $eavData, - \Magento\Core\Model\LocaleInterface $locale, - \Magento\Backend\Model\Config\Source\YesnoFactory $yesnoFactory, - \Magento\Eav\Model\Adminhtml\System\Config\Source\InputtypeFactory $inputTypeFactory, - \Magento\Eav\Model\Entity\Attribute\Config $attributeConfig, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Eav\Helper\Data $eavData, + \Magento\Backend\Model\Config\Source\YesnoFactory $yesnoFactory, + \Magento\Eav\Model\Adminhtml\System\Config\Source\InputtypeFactory $inputTypeFactory, + \Magento\Eav\Model\Entity\Attribute\Config $attributeConfig, + array $data = array() + ) { $this->_eavData = $eavData; - $this->_locale = $locale; $this->_yesnoFactory = $yesnoFactory; $this->_inputTypeFactory = $inputTypeFactory; $this->_attributeConfig = $attributeConfig; - parent::__construct($registry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); } public function setAttributeObject($attribute) diff --git a/app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Options/AbstractOptions.php b/app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Options/AbstractOptions.php index e5c1026ce7fdd3955a508dbb0011073e56862683..fc523591ae7989f9c4cc6758117616d68e58578a 100644 --- a/app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Options/AbstractOptions.php +++ b/app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Options/AbstractOptions.php @@ -33,7 +33,7 @@ */ namespace Magento\Eav\Block\Adminhtml\Attribute\Edit\Options; -abstract class AbstractOptions extends \Magento\Core\Block\AbstractBlock +abstract class AbstractOptions extends \Magento\View\Block\AbstractBlock { /** * Preparing layout, adding buttons diff --git a/app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Options/Labels.php b/app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Options/Labels.php index 4fc003d727c9dd6f3a054656b7aa437da45fb153..f7cb50c8447ccb88856255f05f8dc77afec165f4 100644 --- a/app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Options/Labels.php +++ b/app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Options/Labels.php @@ -35,9 +35,6 @@ namespace Magento\Eav\Block\Adminhtml\Attribute\Edit\Options; class Labels extends \Magento\Backend\Block\Template { - /** @var \Magento\Core\Model\StoreManager */ - protected $_storeManager; - /** @var \Magento\Core\Model\Registry */ protected $_registry; @@ -46,22 +43,19 @@ class Labels extends \Magento\Backend\Block\Template */ protected $_template = 'Magento_Catalog::catalog/product/attribute/labels.phtml'; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManager $storeManager - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManager $storeManager, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { - parent::__construct($coreData, $context, $data); - $this->_storeManager = $storeManager; + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { + parent::__construct($context, $coreData, $data); $this->_registry = $registry; } diff --git a/app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Options/Options.php b/app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Options/Options.php index 42ae3f037c8be10c53e06a71150a9cfc936ce135..501864983b6773de9c256a74c89348a315ae2f27 100644 --- a/app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Options/Options.php +++ b/app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Options/Options.php @@ -35,9 +35,6 @@ namespace Magento\Eav\Block\Adminhtml\Attribute\Edit\Options; class Options extends \Magento\Backend\Block\Template { - /** @var \Magento\Core\Model\StoreManager */ - protected $_storeManager; - /** @var \Magento\Core\Model\Registry */ protected $_registry; @@ -54,26 +51,23 @@ class Options extends \Magento\Backend\Block\Template */ protected $_universalFactory; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManager $storeManager - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Eav\Model\Resource\Entity\Attribute\Option\CollectionFactory $attrOptCollFactory - * @param \Magento\Validator\UniversalFactory $universalFactory - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Eav\Model\Resource\Entity\Attribute\Option\CollectionFactory $attrOptCollFactory + * @param \Magento\Validator\UniversalFactory $universalFactory + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManager $storeManager, - \Magento\Core\Model\Registry $registry, - \Magento\Eav\Model\Resource\Entity\Attribute\Option\CollectionFactory $attrOptCollFactory, - \Magento\Validator\UniversalFactory $universalFactory, - array $data = array() - ) { - parent::__construct($coreData, $context, $data); - $this->_storeManager = $storeManager; + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Eav\Model\Resource\Entity\Attribute\Option\CollectionFactory $attrOptCollFactory, + \Magento\Validator\UniversalFactory $universalFactory, + array $data = array() + ) { + parent::__construct($context, $coreData, $data); $this->_registry = $registry; $this->_attrOptCollFactory = $attrOptCollFactory; $this->_universalFactory = $universalFactory; diff --git a/app/code/Magento/Eav/Helper/Data.php b/app/code/Magento/Eav/Helper/Data.php index c4f3f22ef98466159d7ea34f8ae02042419bded1..398a09f0cdeff0359136b94da028851c8aa6073e 100644 --- a/app/code/Magento/Eav/Helper/Data.php +++ b/app/code/Magento/Eav/Helper/Data.php @@ -29,7 +29,7 @@ */ namespace Magento\Eav\Helper; -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { /** * XML path to input types validator data in config @@ -53,12 +53,12 @@ class Data extends \Magento\Core\Helper\AbstractHelper protected $_attributeConfig; /** - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Eav\Model\Entity\Attribute\Config $attributeConfig * @param \Magento\Core\Model\Store\Config $coreStoreConfig */ public function __construct( - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Eav\Model\Entity\Attribute\Config $attributeConfig, \Magento\Core\Model\Store\Config $coreStoreConfig ) { diff --git a/app/code/Magento/Eav/Model/Entity.php b/app/code/Magento/Eav/Model/Entity.php index 49aae351f09adaf512b636497073da8de371ffe6..03bafbe99f434f45c5cd9ff7d9948ac551d20bda 100644 --- a/app/code/Magento/Eav/Model/Entity.php +++ b/app/code/Magento/Eav/Model/Entity.php @@ -51,7 +51,6 @@ class Entity extends \Magento\Eav\Model\Entity\AbstractEntity * @param \Magento\Core\Model\LocaleInterface $locale * @param \Magento\Eav\Model\Resource\Helper $resourceHelper * @param \Magento\Validator\UniversalFactory $universalFactory - * @param \Magento\App\Resource $coreResource * @param array $data */ public function __construct( @@ -61,7 +60,6 @@ class Entity extends \Magento\Eav\Model\Entity\AbstractEntity \Magento\Core\Model\LocaleInterface $locale, \Magento\Eav\Model\Resource\Helper $resourceHelper, \Magento\Validator\UniversalFactory $universalFactory, - \Magento\App\Resource $coreResource, $data = array() ) { parent::__construct( @@ -73,6 +71,6 @@ class Entity extends \Magento\Eav\Model\Entity\AbstractEntity $universalFactory, $data ); - $this->setConnection($coreResource->getConnection('eav_read')); + $this->setConnection($resource->getConnection('eav_read')); } } diff --git a/app/code/Magento/Eav/Model/Entity/Attribute.php b/app/code/Magento/Eav/Model/Entity/Attribute.php index 1093685ad246f9f047b574db48c045ff2623ad0e..913425b1f828484744387a3c0690ec188dda55d7 100644 --- a/app/code/Magento/Eav/Model/Entity/Attribute.php +++ b/app/code/Magento/Eav/Model/Entity/Attribute.php @@ -75,7 +75,7 @@ class Attribute extends \Magento\Eav\Model\Entity\Attribute\AbstractAttribute * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Eav\Model\Config $eavConfig * @param \Magento\Eav\Model\Entity\TypeFactory $eavTypeFactory - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Eav\Model\Resource\Helper $resourceHelper * @param \Magento\Validator\UniversalFactory $universalFactory * @param \Magento\Core\Model\LocaleInterface $locale @@ -90,7 +90,7 @@ class Attribute extends \Magento\Eav\Model\Entity\Attribute\AbstractAttribute \Magento\Core\Helper\Data $coreData, \Magento\Eav\Model\Config $eavConfig, \Magento\Eav\Model\Entity\TypeFactory $eavTypeFactory, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Eav\Model\Resource\Helper $resourceHelper, \Magento\Validator\UniversalFactory $universalFactory, \Magento\Core\Model\LocaleInterface $locale, diff --git a/app/code/Magento/Eav/Model/Entity/Attribute/AbstractAttribute.php b/app/code/Magento/Eav/Model/Entity/Attribute/AbstractAttribute.php index 28e6cfe1d205be36e9de5fceaa1893b6c649cff6..fb695c8defa7c05a1fbb33d2020250a3702bf368 100644 --- a/app/code/Magento/Eav/Model/Entity/Attribute/AbstractAttribute.php +++ b/app/code/Magento/Eav/Model/Entity/Attribute/AbstractAttribute.php @@ -107,7 +107,7 @@ abstract class AbstractAttribute protected $_eavTypeFactory; /** - * @var \Magento\Core\Model\StoreManager + * @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; @@ -127,7 +127,7 @@ abstract class AbstractAttribute * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Eav\Model\Config $eavConfig * @param \Magento\Eav\Model\Entity\TypeFactory $eavTypeFactory - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Eav\Model\Resource\Helper $resourceHelper * @param \Magento\Validator\UniversalFactory $universalFactory * @param \Magento\Core\Model\Resource\AbstractResource $resource @@ -140,7 +140,7 @@ abstract class AbstractAttribute \Magento\Core\Helper\Data $coreData, \Magento\Eav\Model\Config $eavConfig, \Magento\Eav\Model\Entity\TypeFactory $eavTypeFactory, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Eav\Model\Resource\Helper $resourceHelper, \Magento\Validator\UniversalFactory $universalFactory, \Magento\Core\Model\Resource\AbstractResource $resource = null, diff --git a/app/code/Magento/Eav/Model/Entity/Attribute/Backend/Store.php b/app/code/Magento/Eav/Model/Entity/Attribute/Backend/Store.php index 8d23498430bdd73729cb4505a5bec30ff319653e..91c30e2f4004b3f7d8d920e2843cc708eedef702 100644 --- a/app/code/Magento/Eav/Model/Entity/Attribute/Backend/Store.php +++ b/app/code/Magento/Eav/Model/Entity/Attribute/Backend/Store.php @@ -28,17 +28,17 @@ namespace Magento\Eav\Model\Entity\Attribute\Backend; class Store extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend { /** - * @var \Magento\Core\Model\StoreManager + * @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; /** * @param \Magento\Logger $logger - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager */ public function __construct( \Magento\Logger $logger, - \Magento\Core\Model\StoreManager $storeManager + \Magento\Core\Model\StoreManagerInterface $storeManager ) { $this->_storeManager = $storeManager; parent::__construct($logger); diff --git a/app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php b/app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php index 2c8aef9576e843f2024d7acb5b2c2a19dac9cb06..12ef2eb3f7bdccb41d1727b8fc86426e4290adb2 100644 --- a/app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php +++ b/app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php @@ -141,7 +141,7 @@ abstract class AbstractCollection extends \Magento\Data\Collection\Db * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy * @param \Magento\Core\Model\EntityFactory $entityFactory * @param \Magento\Eav\Model\Config $eavConfig - * @param \Magento\App\Resource $coreResource + * @param \Magento\App\Resource $resource * @param \Magento\Eav\Model\EntityFactory $eavEntityFactory * @param \Magento\Eav\Model\Resource\Helper $resourceHelper * @param \Magento\Validator\UniversalFactory $universalFactory @@ -152,14 +152,14 @@ abstract class AbstractCollection extends \Magento\Data\Collection\Db \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, \Magento\Core\Model\EntityFactory $entityFactory, \Magento\Eav\Model\Config $eavConfig, - \Magento\App\Resource $coreResource, + \Magento\App\Resource $resource, \Magento\Eav\Model\EntityFactory $eavEntityFactory, \Magento\Eav\Model\Resource\Helper $resourceHelper, \Magento\Validator\UniversalFactory $universalFactory ) { $this->_eventManager = $eventManager; $this->_eavConfig = $eavConfig; - $this->_resource = $coreResource; + $this->_resource = $resource; $this->_eavEntityFactory = $eavEntityFactory; $this->_resourceHelper = $resourceHelper; $this->_universalFactory = $universalFactory; diff --git a/app/code/Magento/Eav/Model/Form.php b/app/code/Magento/Eav/Model/Form.php index 5758d078baa35ab08cb493b32b476d30669c2315..37a467bbf352d60f6bfa68b04b477dc160dc6e52 100644 --- a/app/code/Magento/Eav/Model/Form.php +++ b/app/code/Magento/Eav/Model/Form.php @@ -125,7 +125,7 @@ abstract class Form protected $_validator = null; /** - * @var \Magento\Core\Model\StoreManager + * @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; @@ -160,7 +160,7 @@ abstract class Form protected $_validatorConfigFactory; /** - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Eav\Model\Config $eavConfig * @param \Magento\Module\Dir\Reader $modulesReader * @param \Magento\Eav\Model\AttributeDataFactory $attrDataFactory @@ -171,7 +171,7 @@ abstract class Form * @throws \Magento\Core\Exception */ public function __construct( - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Eav\Model\Config $eavConfig, \Magento\Module\Dir\Reader $modulesReader, \Magento\Eav\Model\AttributeDataFactory $attrDataFactory, diff --git a/app/code/Magento/Eav/Model/Form/Fieldset.php b/app/code/Magento/Eav/Model/Form/Fieldset.php index 16c710db45a169515b8db7e171ac970a995b4257..86fb5a999c106e450cb392eb8d4b6a933a48a28a 100644 --- a/app/code/Magento/Eav/Model/Form/Fieldset.php +++ b/app/code/Magento/Eav/Model/Form/Fieldset.php @@ -52,14 +52,14 @@ class Fieldset extends \Magento\Core\Model\AbstractModel protected $_eventPrefix = 'eav_form_fieldset'; /** - * @var \Magento\Core\Model\StoreManager + * @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; public function __construct( \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, array $data = array() diff --git a/app/code/Magento/Eav/Model/Resource/Attribute/Collection.php b/app/code/Magento/Eav/Model/Resource/Attribute/Collection.php index 5cb5da43e9df9b51bf5b191c47ed280498ef528b..da6f54a92f917a316f043a3f85f243d62dd4dec7 100644 --- a/app/code/Magento/Eav/Model/Resource/Attribute/Collection.php +++ b/app/code/Magento/Eav/Model/Resource/Attribute/Collection.php @@ -62,7 +62,7 @@ abstract class Collection protected $_eavConfig; /** - * @var \Magento\Core\Model\StoreManager + * @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; @@ -72,7 +72,7 @@ abstract class Collection * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy * @param \Magento\Core\Model\EntityFactory $entityFactory * @param \Magento\Eav\Model\Config $eavConfig - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Resource\Db\AbstractDb $resource */ public function __construct( @@ -81,7 +81,7 @@ abstract class Collection \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, \Magento\Core\Model\EntityFactory $entityFactory, \Magento\Eav\Model\Config $eavConfig, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Resource\Db\AbstractDb $resource = null ) { $this->_storeManager = $storeManager; diff --git a/app/code/Magento/Eav/Model/Resource/Entity/Attribute/Option/Collection.php b/app/code/Magento/Eav/Model/Resource/Entity/Attribute/Option/Collection.php index 452f1fdada3bc785e2838eaff3017eb435ea083e..c3ab70c971cafc58d9fb86c1ad6d4050737542b6 100644 --- a/app/code/Magento/Eav/Model/Resource/Entity/Attribute/Option/Collection.php +++ b/app/code/Magento/Eav/Model/Resource/Entity/Attribute/Option/Collection.php @@ -49,7 +49,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl protected $_coreResource; /** - * @var \Magento\Core\Model\StoreManager + * @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; @@ -59,7 +59,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy * @param \Magento\Core\Model\EntityFactory $entityFactory * @param \Magento\App\Resource $coreResource - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Resource\Db\AbstractDb $resource */ public function __construct( @@ -68,7 +68,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, \Magento\Core\Model\EntityFactory $entityFactory, \Magento\App\Resource $coreResource, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Resource\Db\AbstractDb $resource = null ) { $this->_storeManager = $storeManager; diff --git a/app/code/Magento/Eav/Model/Resource/Form/Attribute/Collection.php b/app/code/Magento/Eav/Model/Resource/Form/Attribute/Collection.php index 3f7f54a7ada43d3a8a22513cbb01c7815169f537..a30afd562b9f1d0c2a934396d2986a2127695e00 100644 --- a/app/code/Magento/Eav/Model/Resource/Form/Attribute/Collection.php +++ b/app/code/Magento/Eav/Model/Resource/Form/Attribute/Collection.php @@ -65,7 +65,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl protected $_entityType; /** - * @var \Magento\Core\Model\StoreManager + * @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; @@ -80,7 +80,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy * @param \Magento\Core\Model\EntityFactory $entityFactory * @param \Magento\Eav\Model\Config $eavConfig - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Resource\Db\AbstractDb $resource */ public function __construct( @@ -89,7 +89,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, \Magento\Core\Model\EntityFactory $entityFactory, \Magento\Eav\Model\Config $eavConfig, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Resource\Db\AbstractDb $resource = null ) { $this->_storeManager = $storeManager; diff --git a/app/code/Magento/Eav/Model/Resource/Form/Fieldset/Collection.php b/app/code/Magento/Eav/Model/Resource/Form/Fieldset/Collection.php index 2d9ae3a424be5827143b6991a3090a5b26389791..1053a8f980ae5b47fd1059e8df402f3a9b0e014d 100644 --- a/app/code/Magento/Eav/Model/Resource/Form/Fieldset/Collection.php +++ b/app/code/Magento/Eav/Model/Resource/Form/Fieldset/Collection.php @@ -44,7 +44,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl protected $_storeId; /** - * @var \Magento\Core\Model\StoreManager + * @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; @@ -53,7 +53,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl * @param \Magento\Logger $logger * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy * @param \Magento\Core\Model\EntityFactory $entityFactory - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Resource\Db\AbstractDb $resource */ public function __construct( @@ -61,7 +61,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl \Magento\Logger $logger, \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, \Magento\Core\Model\EntityFactory $entityFactory, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Resource\Db\AbstractDb $resource = null ) { $this->_storeManager = $storeManager; diff --git a/app/code/Magento/Backend/Block/System/Email/Template.php b/app/code/Magento/Email/Block/Adminhtml/Template.php similarity index 86% rename from app/code/Magento/Backend/Block/System/Email/Template.php rename to app/code/Magento/Email/Block/Adminhtml/Template.php index e8e00e46f57a555831fb799cbc1db27396dc2b4d..4ecc292e8b78bd4b75f919a79d1ec38023710dd5 100644 --- a/app/code/Magento/Backend/Block/System/Email/Template.php +++ b/app/code/Magento/Email/Block/Adminhtml/Template.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Magento - * @package Magento_Backend + * @package Magento_Email * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -28,25 +28,25 @@ * Adminhtml system templates page content block * * @category Magento - * @package Magento_Backend + * @package Magento_Email * @author Magento Core Team <core@magentocommerce.com> */ -namespace Magento\Backend\Block\System\Email; +namespace Magento\Email\Block\Adminhtml; class Template extends \Magento\Adminhtml\Block\Template { - protected $_template = 'Magento_Backend::system/email/template/list.phtml'; + protected $_template = 'template/list.phtml'; /** * Create add button and grid blocks * - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ protected function _prepareLayout() { - $this->addChild('add_button', 'Magento\Adminhtml\Block\Widget\Button', array( + $this->addChild('add_button', 'Magento\Backend\Block\Widget\Button', array( 'label' => __('Add New Template'), 'onclick' => "window.location='" . $this->getCreateUrl() . "'", 'class' => 'add' diff --git a/app/code/Magento/Backend/Block/System/Email/Template/Edit.php b/app/code/Magento/Email/Block/Adminhtml/Template/Edit.php similarity index 94% rename from app/code/Magento/Backend/Block/System/Email/Template/Edit.php rename to app/code/Magento/Email/Block/Adminhtml/Template/Edit.php index 337fe6274d0179f240eda3955b454a068d908347..b9d05532fe5c728ec2f2846f1247027e5ea3d6e9 100644 --- a/app/code/Magento/Backend/Block/System/Email/Template/Edit.php +++ b/app/code/Magento/Email/Block/Adminhtml/Template/Edit.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Magento - * @package Magento_Backend + * @package Magento_Email * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -28,11 +28,11 @@ * Adminhtml system template edit block * * @category Magento - * @package Magento_Backend + * @package Magento_Email * @author Magento Core Team <core@magentocommerce.com> * @method array getTemplateOptions() */ -namespace Magento\Backend\Block\System\Email\Template; +namespace Magento\Email\Block\Adminhtml\Template; class Edit extends \Magento\Adminhtml\Block\Widget { @@ -52,7 +52,7 @@ class Edit extends \Magento\Adminhtml\Block\Widget protected $_configStructure; /** - * @var \Magento\Core\Model\Email\Template\Config + * @var \Magento\Email\Model\Template\Config */ private $_emailConfig; @@ -61,31 +61,31 @@ class Edit extends \Magento\Adminhtml\Block\Widget * * @var string */ - protected $_template = 'Magento_Backend::system/email/template/edit.phtml'; - + protected $_template = 'template/edit.phtml'; + /** - * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Core\Model\Registry $registry * @param \Magento\Backend\Model\Menu\Config $menuConfig * @param \Magento\Backend\Model\Config\Structure $configStructure - * @param \Magento\Core\Model\Email\Template\Config $emailConfig + * @param \Magento\Email\Model\Template\Config $emailConfig * @param array $data */ public function __construct( - \Magento\Core\Helper\Data $coreData, \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Core\Model\Registry $registry, \Magento\Backend\Model\Menu\Config $menuConfig, \Magento\Backend\Model\Config\Structure $configStructure, - \Magento\Core\Model\Email\Template\Config $emailConfig, + \Magento\Email\Model\Template\Config $emailConfig, array $data = array() ) { $this->_registryManager = $registry; $this->_menuConfig = $menuConfig; $this->_configStructure = $configStructure; $this->_emailConfig = $emailConfig; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _prepareLayout() @@ -100,7 +100,6 @@ class Edit extends \Magento\Adminhtml\Block\Widget ) ) ); - $this->setChild('reset_button', $this->getLayout()->createBlock('Magento\Adminhtml\Block\Widget\Button') ->setData( @@ -110,7 +109,6 @@ class Edit extends \Magento\Adminhtml\Block\Widget ) ) ); - $this->setChild('delete_button', $this->getLayout()->createBlock('Magento\Adminhtml\Block\Widget\Button') ->setData( @@ -121,7 +119,6 @@ class Edit extends \Magento\Adminhtml\Block\Widget ) ) ); - $this->setChild('to_plain_button', $this->getLayout()->createBlock('Magento\Adminhtml\Block\Widget\Button') ->setData( @@ -132,7 +129,6 @@ class Edit extends \Magento\Adminhtml\Block\Widget ) ) ); - $this->setChild('to_html_button', $this->getLayout()->createBlock('Magento\Adminhtml\Block\Widget\Button') ->setData( @@ -144,7 +140,6 @@ class Edit extends \Magento\Adminhtml\Block\Widget ) ) ); - $this->setChild('toggle_button', $this->getLayout()->createBlock('Magento\Adminhtml\Block\Widget\Button') ->setData( @@ -155,7 +150,6 @@ class Edit extends \Magento\Adminhtml\Block\Widget ) ) ); - $this->setChild('preview_button', $this->getLayout()->createBlock('Magento\Adminhtml\Block\Widget\Button') ->setData( @@ -165,7 +159,6 @@ class Edit extends \Magento\Adminhtml\Block\Widget ) ) ); - $this->setChild('save_button', $this->getLayout()->createBlock('Magento\Adminhtml\Block\Widget\Button') ->setData( @@ -176,7 +169,6 @@ class Edit extends \Magento\Adminhtml\Block\Widget ) ) ); - $this->setChild('load_button', $this->getLayout()->createBlock('Magento\Adminhtml\Block\Widget\Button') ->setData( @@ -188,15 +180,14 @@ class Edit extends \Magento\Adminhtml\Block\Widget ) ) ); - - $this->addChild('form', 'Magento\Backend\Block\System\Email\Template\Edit\Form'); + $this->addChild('form', 'Magento\Email\Block\Adminhtml\Template\Edit\Form'); return parent::_prepareLayout(); } /** * Collect, sort and set template options * - * @return \Magento\Backend\Block\System\Email\Template\Edit + * @return \Magento\Email\Block\Adminhtml\Template\Edit */ protected function _beforeToHtml() { @@ -279,7 +270,7 @@ class Edit extends \Magento\Adminhtml\Block\Widget /** * Return edit flag for block * - * @return boolean + * @return int|null */ public function getEditMode() { @@ -347,7 +338,7 @@ class Edit extends \Magento\Adminhtml\Block\Widget /** * Retrive email template model * - * @return \Magento\Core\Model\Email\Template + * @return \Magento\Email\Model\Template */ public function getEmailTemplate() { @@ -372,7 +363,7 @@ class Edit extends \Magento\Adminhtml\Block\Widget */ public function getUsedDefaultForPaths($asJSON = true) { - /** @var $template \Magento\Backend\Model\Email\Template */ + /** @var $template \Magento\Email\Model\BackendTemplate */ $template = $this->getEmailTemplate(); $paths = $template->getSystemConfigPathsWhereUsedAsDefault(); $pathsParts = $this->_getSystemConfigPathsParts($paths); @@ -390,7 +381,7 @@ class Edit extends \Magento\Adminhtml\Block\Widget */ public function getUsedCurrentlyForPaths($asJSON = true) { - /** @var $template \Magento\Backend\Model\Email\Template */ + /** @var $template \Magento\Email\Model\BackendTemplate */ $template = $this->getEmailTemplate(); $paths = $template->getSystemConfigPathsWhereUsedCurrently(); $pathsParts = $this->_getSystemConfigPathsParts($paths); @@ -403,6 +394,7 @@ class Edit extends \Magento\Adminhtml\Block\Widget /** * Convert xml config pathes to decorated names * + * @SuppressWarnings(PHPMD.CyclomaticComplexity) * @param array $paths * @return array */ diff --git a/app/code/Magento/Backend/Block/System/Email/Template/Edit/Form.php b/app/code/Magento/Email/Block/Adminhtml/Template/Edit/Form.php similarity index 89% rename from app/code/Magento/Backend/Block/System/Email/Template/Edit/Form.php rename to app/code/Magento/Email/Block/Adminhtml/Template/Edit/Form.php index 6e0004524a88989e6728ed006e5adf561c8ba57f..950b2cd4d6ff229aa49b5d664d1962e86c4a3782 100644 --- a/app/code/Magento/Backend/Block/System/Email/Template/Edit/Form.php +++ b/app/code/Magento/Email/Block/Adminhtml/Template/Edit/Form.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Magento - * @package Magento_Backend + * @package Magento_Email * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -28,17 +28,12 @@ * Adminhtml system template edit form */ -namespace Magento\Backend\Block\System\Email\Template\Edit; +namespace Magento\Email\Block\Adminhtml\Template\Edit; class Form extends \Magento\Backend\Block\Widget\Form\Generic { /** - * @var \Magento\Backend\Model\Session - */ - protected $_backendSession; - - /** - * @var \Magento\Core\Model\Source\Email\Variables + * @var \Magento\Email\Model\Source\Variables */ protected $_variables; @@ -48,36 +43,33 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic protected $_variableFactory; /** - * @param \Magento\Core\Model\VariableFactory $variableFactory - * @param \Magento\Core\Model\Source\Email\Variables $variables - * @param \Magento\Backend\Model\Session $backendSession + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Core\Model\Registry $registry * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Model\VariableFactory $variableFactory + * @param \Magento\Email\Model\Source\Variables $variables * @param array $data */ public function __construct( - \Magento\Core\Model\VariableFactory $variableFactory, - \Magento\Core\Model\Source\Email\Variables $variables, - \Magento\Backend\Model\Session $backendSession, + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Core\Model\Registry $registry, \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Model\VariableFactory $variableFactory, + \Magento\Email\Model\Source\Variables $variables, array $data = array() ) { $this->_variableFactory = $variableFactory; $this->_variables = $variables; - $this->_backendSession = $backendSession; - parent::__construct($registry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); } /** * Prepare layout. * Add files to use dialog windows * - * @return \Magento\Backend\Block\System\Email\Template\Edit\Form + * @return \Magento\Email\Block\Adminhtml\Template\Edit\Form */ protected function _prepareLayout() { @@ -107,7 +99,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic 'magento-adminhtml-variables-js', 'Magento\Page\Block\Html\Head\Script', array( - 'file' => 'Magento_Backend::variables.js' + 'file' => 'Magento_Adminhtml::variables.js' ) ); } @@ -117,6 +109,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic /** * Add fields to form and create template info form * + * @SuppressWarnings(PHPMD.NPathComplexity) * @return \Magento\Adminhtml\Block\Widget\Form */ protected function _prepareForm() @@ -160,22 +153,18 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic 'required' => true )); - $fieldset->addField('template_subject', 'text', array( 'name'=>'template_subject', 'label' => __('Template Subject'), 'required' => true )); - $fieldset->addField('orig_template_variables', 'hidden', array( 'name' => 'orig_template_variables', )); - $fieldset->addField('variables', 'hidden', array( 'name' => 'variables', 'value' => \Zend_Json::encode($this->getVariables()) )); - $fieldset->addField('template_variables', 'hidden', array( 'name' => 'template_variables', )); @@ -224,7 +213,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic /** * Return current email template model * - * @return \Magento\Core\Model\Email\Template + * @return \Magento\Email\Model\Template */ public function getEmailTemplate() { @@ -244,7 +233,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic if ($customVariables) { $variables[] = $customVariables; } - /* @var $template \Magento\Core\Model\Email\Template */ + /* @var $template \Magento\Email\Model\Template */ $template = $this->_coreRegistry->registry('current_email_template'); if ($template->getId() && $templateVariables = $template->getVariablesOptionArray(true)) { $variables[] = $templateVariables; diff --git a/app/code/Magento/Backend/Block/System/Email/Template/Grid/Filter/Type.php b/app/code/Magento/Email/Block/Adminhtml/Template/Grid/Filter/Type.php similarity index 77% rename from app/code/Magento/Backend/Block/System/Email/Template/Grid/Filter/Type.php rename to app/code/Magento/Email/Block/Adminhtml/Template/Grid/Filter/Type.php index b178130deb949092ad03761d4ab1c187cf605b30..eb1b72f432005268c4c7808426e44c250cceb4d4 100644 --- a/app/code/Magento/Backend/Block/System/Email/Template/Grid/Filter/Type.php +++ b/app/code/Magento/Email/Block/Adminhtml/Template/Grid/Filter/Type.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Magento - * @package Magento_Backend + * @package Magento_Email * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -28,19 +28,18 @@ * Adminhtml system template grid type filter * * @category Magento - * @package Magento_Backend + * @package Magento_Email * @author Magento Core Team <core@magentocommerce.com> */ -namespace Magento\Backend\Block\System\Email\Template\Grid\Filter; +namespace Magento\Email\Block\Adminhtml\Template\Grid\Filter; -class Type - extends \Magento\Adminhtml\Block\Widget\Grid\Column\Filter\Select +class Type extends \Magento\Adminhtml\Block\Widget\Grid\Column\Filter\Select { protected static $_types = array( - null => null, - \Magento\Newsletter\Model\Template::TYPE_HTML => 'HTML', - \Magento\Newsletter\Model\Template::TYPE_TEXT => 'Text', + null => null, + \Magento\Email\Model\Template::TYPE_HTML => 'HTML', + \Magento\Email\Model\Template::TYPE_TEXT => 'Text', ); protected function _getOptions() @@ -56,7 +55,7 @@ class Type public function getCondition() { - if(is_null($this->getValue())) { + if (is_null($this->getValue())) { return null; } diff --git a/app/code/Magento/Backend/Block/System/Email/Template/Grid/Renderer/Action.php b/app/code/Magento/Email/Block/Adminhtml/Template/Grid/Renderer/Action.php similarity index 88% rename from app/code/Magento/Backend/Block/System/Email/Template/Grid/Renderer/Action.php rename to app/code/Magento/Email/Block/Adminhtml/Template/Grid/Renderer/Action.php index 2c1f2f54a505269f70230588d9b6b20e3b1a011c..6230cab8c583f321172d9d89fe3639d9f03a4c3a 100644 --- a/app/code/Magento/Backend/Block/System/Email/Template/Grid/Renderer/Action.php +++ b/app/code/Magento/Email/Block/Adminhtml/Template/Grid/Renderer/Action.php @@ -19,20 +19,20 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Magento - * @package Magento_Backend + * @package Magento_Email * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** - * Adminhtml newsletter templates grid block action item renderer + * Email templates grid block action item renderer * * @category Magento - * @package Magento_Backend + * @package Magento_Email * @author Magento Core Team <core@magentocommerce.com> */ -namespace Magento\Backend\Block\System\Email\Template\Grid\Renderer; +namespace Magento\Email\Block\Adminhtml\Template\Grid\Renderer; class Action extends \Magento\Adminhtml\Block\Widget\Grid\Column\Renderer\Action { @@ -53,7 +53,7 @@ class Action extends \Magento\Adminhtml\Block\Widget\Grid\Column\Renderer\Action protected function _getEscapedValue($value) { - return addcslashes(htmlspecialchars($value),'\\\''); + return addcslashes(htmlspecialchars($value), '\\\''); } protected function _actionsToHtml(array $actions) diff --git a/app/code/Magento/Backend/Block/System/Email/Template/Grid/Renderer/Sender.php b/app/code/Magento/Email/Block/Adminhtml/Template/Grid/Renderer/Sender.php similarity index 86% rename from app/code/Magento/Backend/Block/System/Email/Template/Grid/Renderer/Sender.php rename to app/code/Magento/Email/Block/Adminhtml/Template/Grid/Renderer/Sender.php index 0dda95acf89a39645e4fb35a287f659aad035019..0cc15b409bc0293972eae1240de2b7ec145e670d 100644 --- a/app/code/Magento/Backend/Block/System/Email/Template/Grid/Renderer/Sender.php +++ b/app/code/Magento/Email/Block/Adminhtml/Template/Grid/Renderer/Sender.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Magento - * @package Magento_Backend + * @package Magento_Email * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -28,11 +28,11 @@ * Adminhtml system templates grid block sender item renderer * * @category Magento - * @package Magento_Backend + * @package Magento_Email * @author Magento Core Team <core@magentocommerce.com> */ -namespace Magento\Backend\Block\System\Email\Template\Grid\Renderer; +namespace Magento\Email\Block\Adminhtml\Template\Grid\Renderer; class Sender extends \Magento\Adminhtml\Block\Widget\Grid\Column\Renderer\AbstractRenderer { @@ -40,15 +40,15 @@ class Sender extends \Magento\Adminhtml\Block\Widget\Grid\Column\Renderer\Abstra { $str = ''; - if($row->getTemplateSenderName()) { + if ($row->getTemplateSenderName()) { $str .= htmlspecialchars($row->getTemplateSenderName()) . ' '; } - if($row->getTemplateSenderEmail()) { + if ($row->getTemplateSenderEmail()) { $str .= '[' . $row->getTemplateSenderEmail() . ']'; } - if($str == '') { + if ($str == '') { $str .= '---'; } diff --git a/app/code/Magento/Backend/Block/System/Email/Template/Grid/Renderer/Type.php b/app/code/Magento/Email/Block/Adminhtml/Template/Grid/Renderer/Type.php similarity index 76% rename from app/code/Magento/Backend/Block/System/Email/Template/Grid/Renderer/Type.php rename to app/code/Magento/Email/Block/Adminhtml/Template/Grid/Renderer/Type.php index 367b713ee68a125c386275e2f367ab2526440712..84fea4a5b763ddd9ae895d2d9c6e885b85b68b14 100644 --- a/app/code/Magento/Backend/Block/System/Email/Template/Grid/Renderer/Type.php +++ b/app/code/Magento/Email/Block/Adminhtml/Template/Grid/Renderer/Type.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Magento - * @package Magento_Backend + * @package Magento_Email * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -28,25 +28,25 @@ * Adminhtml system templates grid block type item renderer * * @category Magento - * @package Magento_Backend + * @package Magento_Email * @author Magento Core Team <core@magentocommerce.com> */ -namespace Magento\Backend\Block\System\Email\Template\Grid\Renderer; +namespace Magento\Email\Block\Adminhtml\Template\Grid\Renderer; -class Type - extends \Magento\Adminhtml\Block\Widget\Grid\Column\Renderer\AbstractRenderer +class Type extends \Magento\Adminhtml\Block\Widget\Grid\Column\Renderer\AbstractRenderer { protected static $_types = array( - \Magento\Newsletter\Model\Template::TYPE_HTML => 'HTML', - \Magento\Newsletter\Model\Template::TYPE_TEXT => 'Text', + \Magento\Email\Model\Template::TYPE_HTML => 'HTML', + \Magento\Email\Model\Template::TYPE_TEXT => 'Text', ); + public function render(\Magento\Object $row) { $str = __('Unknown'); - if(isset(self::$_types[$row->getTemplateType()])) { + if (isset(self::$_types[$row->getTemplateType()])) { $str = self::$_types[$row->getTemplateType()]; } diff --git a/app/code/Magento/Backend/Block/System/Email/Template/Preview.php b/app/code/Magento/Email/Block/Adminhtml/Template/Preview.php similarity index 88% rename from app/code/Magento/Backend/Block/System/Email/Template/Preview.php rename to app/code/Magento/Email/Block/Adminhtml/Template/Preview.php index 3378f8e3a08f2c31485e8a4c526d601aaa4cae2a..f395693807b69d46e5ecae12b0bfbe8d32d4272b 100644 --- a/app/code/Magento/Backend/Block/System/Email/Template/Preview.php +++ b/app/code/Magento/Email/Block/Adminhtml/Template/Preview.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Magento - * @package Magento_Backend + * @package Magento_Email * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -28,10 +28,10 @@ * Adminhtml system template preview block * * @category Magento - * @package Magento_Backend + * @package Magento_Email * @author Magento Core Team <core@magentocommerce.com> */ -namespace Magento\Backend\Block\System\Email\Template; +namespace Magento\Email\Block\Adminhtml\Template; class Preview extends \Magento\Adminhtml\Block\Widget { @@ -41,27 +41,27 @@ class Preview extends \Magento\Adminhtml\Block\Widget protected $_maliciousCode; /** - * @var \Magento\Core\Model\Email\TemplateFactory + * @var \Magento\Email\Model\TemplateFactory */ protected $_emailFactory; /** - * @param \Magento\Core\Model\Input\Filter\MaliciousCode $maliciousCode - * @param \Magento\Core\Model\Email\TemplateFactory $emailFactory - * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Input\Filter\MaliciousCode $maliciousCode + * @param \Magento\Email\Model\TemplateFactory $emailFactory * @param array $data */ public function __construct( - \Magento\Core\Model\Input\Filter\MaliciousCode $maliciousCode, - \Magento\Core\Model\Email\TemplateFactory $emailFactory, - \Magento\Core\Helper\Data $coreData, \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Input\Filter\MaliciousCode $maliciousCode, + \Magento\Email\Model\TemplateFactory $emailFactory, array $data = array() ) { $this->_maliciousCode = $maliciousCode; $this->_emailFactory = $emailFactory; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** @@ -71,7 +71,7 @@ class Preview extends \Magento\Adminhtml\Block\Widget */ protected function _toHtml() { - /** @var $template \Magento\Core\Model\Email\Template */ + /** @var $template \Magento\Email\Model\Template */ $template = $this->_emailFactory->create( array('data' => array('area' => \Magento\Core\Model\App\Area::AREA_FRONTEND)) ); diff --git a/app/code/Magento/Backend/Controller/Adminhtml/System/Email/Template.php b/app/code/Magento/Email/Controller/Adminhtml/Email/Template.php similarity index 73% rename from app/code/Magento/Backend/Controller/Adminhtml/System/Email/Template.php rename to app/code/Magento/Email/Controller/Adminhtml/Email/Template.php index 43c7009bd8c73ea0bb79b4223ec9da4868e997a2..dccfe91d94da5311e5fabeb26ffbd0a2a8a92ddd 100644 --- a/app/code/Magento/Backend/Controller/Adminhtml/System/Email/Template.php +++ b/app/code/Magento/Email/Controller/Adminhtml/Email/Template.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Magento - * @package Magento_Backend + * @package Magento_Email * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -28,12 +28,12 @@ * System Template admin controller * * @category Magento - * @package Magento_Backend + * @package Magento_Email * @author Magento Core Team <core@magentocommerce.com> */ -namespace Magento\Backend\Controller\Adminhtml\System\Email; +namespace Magento\Email\Controller\Adminhtml\Email; -class Template extends \Magento\Backend\Controller\Adminhtml\Action +class Template extends \Magento\Backend\App\Action { /** * Core registry @@ -43,11 +43,11 @@ class Template extends \Magento\Backend\Controller\Adminhtml\Action protected $_coreRegistry = null; /** - * @param \Magento\Backend\Controller\Context $context + * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Core\Model\Registry $coreRegistry */ public function __construct( - \Magento\Backend\Controller\Context $context, + \Magento\Backend\App\Action\Context $context, \Magento\Core\Model\Registry $coreRegistry ) { $this->_coreRegistry = $coreRegistry; @@ -56,23 +56,23 @@ class Template extends \Magento\Backend\Controller\Adminhtml\Action public function indexAction() { - $this->_title(__('Email Templates')); + $this->_title->add(__('Email Templates')); if ($this->getRequest()->getQuery('ajax')) { $this->_forward('grid'); return; } - $this->loadLayout(); - $this->_setActiveMenu('Magento_Adminhtml::system_email_template'); + $this->_view->loadLayout(); + $this->_setActiveMenu('Magento_Email::template'); $this->_addBreadcrumb(__('Transactional Emails'), __('Transactional Emails')); - $this->renderLayout(); + $this->_view->renderLayout(); } public function gridAction() { - $this->loadLayout(false); - $this->renderLayout(); + $this->_view->loadLayout(false); + $this->_view->renderLayout(); } /** @@ -90,9 +90,9 @@ class Template extends \Magento\Backend\Controller\Adminhtml\Action */ public function editAction() { - $this->loadLayout(); + $this->_view->loadLayout(); $template = $this->_initTemplate('id'); - $this->_setActiveMenu('Magento_Adminhtml::system_email_template'); + $this->_setActiveMenu('Magento_Email::template'); $this->_addBreadcrumb(__('Transactional Emails'), __('Transactional Emails'), $this->getUrl('adminhtml/*')); if ($this->getRequest()->getParam('id')) { @@ -101,13 +101,13 @@ class Template extends \Magento\Backend\Controller\Adminhtml\Action $this->_addBreadcrumb(__('New Template'), __('New System Template')); } - $this->_title($template->getId() ? $template->getTemplateCode() : __('New Template')); + $this->_title->add($template->getId() ? $template->getTemplateCode() : __('New Template')); - $this->_addContent($this->getLayout() - ->createBlock('Magento\Backend\Block\System\Email\Template\Edit', 'template_edit') + $this->_addContent($this->_view->getLayout() + ->createBlock('Magento\Email\Block\Adminhtml\Template\Edit', 'template_edit') ->setEditMode((bool)$this->getRequest()->getParam('id')) ); - $this->renderLayout(); + $this->_view->renderLayout(); } public function saveAction() @@ -117,7 +117,7 @@ class Template extends \Magento\Backend\Controller\Adminhtml\Action $template = $this->_initTemplate('id'); if (!$template->getId() && $id) { - $this->_objectManager->get('Magento\Adminhtml\Model\Session') + $this->_objectManager->get('Magento\Backend\Model\Session') ->addError(__('This email template no longer exists.')); $this->_redirect('adminhtml/*/'); return; @@ -133,23 +133,23 @@ class Template extends \Magento\Backend\Controller\Adminhtml\Action ->setOrigTemplateVariables($request->getParam('orig_template_variables')); if (!$template->getId()) { - $template->setTemplateType(\Magento\Core\Model\Email\Template::TYPE_HTML); + $template->setTemplateType(\Magento\Email\Model\Template::TYPE_HTML); } if ($request->getParam('_change_type_flag')) { - $template->setTemplateType(\Magento\Core\Model\Email\Template::TYPE_TEXT); + $template->setTemplateType(\Magento\Email\Model\Template::TYPE_TEXT); $template->setTemplateStyles(''); } $template->save(); - $this->_objectManager->get('Magento\Adminhtml\Model\Session')->setFormData(false); - $this->_objectManager->get('Magento\Adminhtml\Model\Session') + $this->_objectManager->get('Magento\Backend\Model\Session')->setFormData(false); + $this->_objectManager->get('Magento\Backend\Model\Session') ->addSuccess(__('The email template has been saved.')); $this->_redirect('adminhtml/*'); } catch (\Exception $e) { - $this->_objectManager->get('Magento\Adminhtml\Model\Session') + $this->_objectManager->get('Magento\Backend\Model\Session') ->setData('email_template_form_data', $request->getParams()); - $this->_objectManager->get('Magento\Adminhtml\Model\Session')->addError($e->getMessage()); + $this->_objectManager->get('Magento\Backend\Model\Session')->addError($e->getMessage()); $this->_forward('new'); } @@ -162,7 +162,7 @@ class Template extends \Magento\Backend\Controller\Adminhtml\Action try { $template->delete(); // display success message - $this->_objectManager->get('Magento\Adminhtml\Model\Session') + $this->_objectManager->get('Magento\Backend\Model\Session') ->addSuccess(__('The email template has been deleted.')); // go to grid $this->_redirect('adminhtml/*/'); @@ -170,10 +170,12 @@ class Template extends \Magento\Backend\Controller\Adminhtml\Action } catch (\Magento\Core\Exception $e) { $this->_getSession()->addError($e->getMessage()); } catch (\Exception $e) { - $this->_getSession()->addError(__('An error occurred while deleting email template data. Please review log and try again.')); + $this->_getSession()->addError( + __('An error occurred while deleting email template data. Please review log and try again.') + ); $this->_objectManager->get('Magento\Logger')->logException($e); // save data in session - $this->_objectManager->get('Magento\Adminhtml\Model\Session') + $this->_objectManager->get('Magento\Backend\Model\Session') ->setFormData($this->getRequest()->getParams()); // redirect to edit form $this->_redirect('adminhtml/*/edit', array('id' => $template->getId())); @@ -181,7 +183,7 @@ class Template extends \Magento\Backend\Controller\Adminhtml\Action } } // display error message - $this->_objectManager->get('Magento\Adminhtml\Model\Session') + $this->_objectManager->get('Magento\Backend\Model\Session') ->addError(__('We can\'t find an email template to delete.')); // go to grid $this->_redirect('adminhtml/*/'); @@ -189,8 +191,8 @@ class Template extends \Magento\Backend\Controller\Adminhtml\Action public function previewAction() { - $this->loadLayout('adminhtml_system_preview'); - $this->renderLayout(); + $this->_view->loadLayout('systemPreview'); + $this->_view->renderLayout(); } /** @@ -206,7 +208,7 @@ class Template extends \Magento\Backend\Controller\Adminhtml\Action $template->setData('orig_template_code', $templateCode); $template->setData('template_variables', \Zend_Json::encode($template->getVariablesOptionArray(true))); - $templateBlock = $this->getLayout()->createBlock('Magento\Backend\Block\System\Email\Template\Edit'); + $templateBlock = $this->_view->getLayout()->createBlock('Magento\Email\Block\Adminhtml\Template\Edit'); $template->setData('orig_template_used_default_for', $templateBlock->getUsedDefaultForPaths(false)); $this->getResponse()->setBody( @@ -221,14 +223,14 @@ class Template extends \Magento\Backend\Controller\Adminhtml\Action * Load email template from request * * @param string $idFieldName - * @return \Magento\Backend\Model\Email\Template $model + * @return \Magento\Email\Model\BackendTemplate $model */ protected function _initTemplate($idFieldName = 'template_id') { - $this->_title(__('Email Templates')); + $this->_title->add(__('Email Templates')); $id = (int)$this->getRequest()->getParam($idFieldName); - $model = $this->_objectManager->create('Magento\Backend\Model\Email\Template'); + $model = $this->_objectManager->create('Magento\Email\Model\BackendTemplate'); if ($id) { $model->load($id); } @@ -243,6 +245,6 @@ class Template extends \Magento\Backend\Controller\Adminhtml\Action protected function _isAllowed() { - return $this->_authorization->isAllowed('Magento_Adminhtml::email_template'); + return $this->_authorization->isAllowed('Magento_Email::template'); } } diff --git a/app/code/Magento/Newsletter/Model/Message.php b/app/code/Magento/Email/Helper/Data.php similarity index 76% rename from app/code/Magento/Newsletter/Model/Message.php rename to app/code/Magento/Email/Helper/Data.php index cdb5bc40a344723d720ccea951f9fee0cd17dd17..ab7838ba37977f57d4df1bff44a46c5c71c41044 100644 --- a/app/code/Magento/Newsletter/Model/Message.php +++ b/app/code/Magento/Email/Helper/Data.php @@ -19,22 +19,13 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Magento - * @package Magento_Newsletter + * @package Magento_Email * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ - -/** - * Newsletter message model - * - * @category Magento - * @package Magento_Newsletter - * @author Magento Core Team <core@magentocommerce.com> - */ - -namespace Magento\Newsletter\Model; -class Message extends \Magento\Core\Model\Message +namespace Magento\Email\Helper; + +class Data extends \Magento\App\Helper\AbstractHelper { - } diff --git a/app/code/Magento/Backend/Model/Email/Template.php b/app/code/Magento/Email/Model/BackendTemplate.php similarity index 87% rename from app/code/Magento/Backend/Model/Email/Template.php rename to app/code/Magento/Email/Model/BackendTemplate.php index 5b6ed97a00791ce5e5f1ed49aae827913fdcffac..ccb18e293538aa6338bbd4bd5235bc2522ffa8c2 100644 --- a/app/code/Magento/Backend/Model/Email/Template.php +++ b/app/code/Magento/Email/Model/BackendTemplate.php @@ -18,23 +18,18 @@ * 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_Backend * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\Email\Model; + /** * Adminhtml email template model * - * @category Magento - * @package Magento_Backend - * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ - -namespace Magento\Backend\Model\Email; - -class Template extends \Magento\Core\Model\Email\Template +class BackendTemplate extends \Magento\Email\Model\Template { /** * @var \Magento\Core\Model\Config @@ -56,10 +51,10 @@ class Template extends \Magento\Core\Model\Email\Template * @param \Magento\View\DesignInterface $design * @param \Magento\Core\Model\Store\Config $coreStoreConfig * @param \Magento\Core\Model\Config $coreConfig - * @param \Magento\Core\Model\Email\Template\FilterFactory $emailFilterFactory - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Email\Model\Template\FilterFactory $emailFilterFactory + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\App\Dir $dir - * @param \Magento\Core\Model\Email\Template\Config $emailConfig + * @param \Magento\Email\Model\Template\Config $emailConfig * @param \Magento\Backend\Model\Config\Structure $structure * @param array $data * @@ -75,10 +70,10 @@ class Template extends \Magento\Core\Model\Email\Template \Magento\View\DesignInterface $design, \Magento\Core\Model\Store\Config $coreStoreConfig, \Magento\Core\Model\Config $coreConfig, - \Magento\Core\Model\Email\Template\FilterFactory $emailFilterFactory, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Email\Model\Template\FilterFactory $emailFilterFactory, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\App\Dir $dir, - \Magento\Core\Model\Email\Template\Config $emailConfig, + \Magento\Email\Model\Template\Config $emailConfig, \Magento\Backend\Model\Config\Structure $structure, array $data = array() ) { diff --git a/app/code/Magento/Core/Model/Email/Info.php b/app/code/Magento/Email/Model/Info.php similarity index 89% rename from app/code/Magento/Core/Model/Email/Info.php rename to app/code/Magento/Email/Model/Info.php index e65c233799096b9fb826a74e750b7526a5ccbf96..2e3f609e406a6f1107d4bb0ea2d8f484ea308c8d 100644 --- a/app/code/Magento/Core/Model/Email/Info.php +++ b/app/code/Magento/Email/Model/Info.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Magento - * @package Magento_Core + * @package Magento_Email * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -33,10 +33,10 @@ * without anyone else (including the To, Cc, and Bcc recipients) seeing who the tertiary recipients are * * @category Magento - * @package Magento_Core + * @package Magento_Email * @author Magento Core Team <core@magentocommerce.com> */ -namespace Magento\Core\Model\Email; +namespace Magento\Email\Model; class Info extends \Magento\Object { @@ -74,12 +74,12 @@ class Info extends \Magento\Object * * @param string $email * @param string|null $name - * @return \Magento\Core\Model\Email\Info + * @return \Magento\Email\Model\Info */ public function addBcc($email, $name = null) { - array_push($this->_bccNames, $name); - array_push($this->_bccEmails, $email); + $this->_bccNames[] = $name; + $this->_bccEmails[] = $email; return $this; } @@ -88,12 +88,12 @@ class Info extends \Magento\Object * * @param string $email * @param string|null $name - * @return \Magento\Core\Model\Email\Info + * @return \Magento\Email\Model\Info */ public function addTo($email, $name = null) { - array_push($this->_toNames, $name); - array_push($this->_toEmails, $email); + $this->_toNames[] = $name; + $this->_toEmails[] = $email; return $this; } diff --git a/app/code/Magento/Core/Model/Resource/Email/Template.php b/app/code/Magento/Email/Model/Resource/Template.php similarity index 91% rename from app/code/Magento/Core/Model/Resource/Email/Template.php rename to app/code/Magento/Email/Model/Resource/Template.php index dcc5f0ef537b89a6f75cdea2b1e57350e28f3a9f..b7f07521946db670f989bd0c51ecd798ea35ebe6 100644 --- a/app/code/Magento/Core/Model/Resource/Email/Template.php +++ b/app/code/Magento/Email/Model/Resource/Template.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Magento - * @package Magento_Core + * @package Magento_Email * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -29,10 +29,10 @@ * Template db resource * * @category Magento - * @package Magento_Core + * @package Magento_Email * @author Magento Core Team <core@magentocommerce.com> */ -namespace Magento\Core\Model\Resource\Email; +namespace Magento\Email\Model\Resource; class Template extends \Magento\Core\Model\Resource\Db\AbstractDb { @@ -57,7 +57,7 @@ class Template extends \Magento\Core\Model\Resource\Db\AbstractDb */ protected function _construct() { - $this->_init('core_email_template', 'template_id'); + $this->_init('email_template', 'template_id'); } /** @@ -82,10 +82,10 @@ class Template extends \Magento\Core\Model\Resource\Db\AbstractDb /** * Check usage of template code in other templates * - * @param \Magento\Core\Model\Email\Template $template + * @param \Magento\Email\Model\Template $template * @return boolean */ - public function checkCodeUsage(\Magento\Core\Model\Email\Template $template) + public function checkCodeUsage(\Magento\Email\Model\Template $template) { if ($template->getTemplateActual() != 0 || is_null($template->getTemplateActual())) { $select = $this->_getReadAdapter()->select() @@ -112,8 +112,8 @@ class Template extends \Magento\Core\Model\Resource\Db\AbstractDb /** * Set template type, added at and modified at time * - * @param \Magento\Core\Model\AbstractModel $object - * @return \Magento\Core\Model\Resource\Email\Template + * @param \Magento\Email\Model\Template $object + * @return \Magento\Email\Model\Resource\Template */ protected function _beforeSave(\Magento\Core\Model\AbstractModel $object) { diff --git a/app/code/Magento/Core/Model/Resource/Email/Template/Collection.php b/app/code/Magento/Email/Model/Resource/Template/Collection.php similarity index 88% rename from app/code/Magento/Core/Model/Resource/Email/Template/Collection.php rename to app/code/Magento/Email/Model/Resource/Template/Collection.php index dbd9899f4cb154404f3da01b7975e66d073ff972..40ea7452a4c737aabdfa5a23f4b6b36ee13b9f71 100644 --- a/app/code/Magento/Core/Model/Resource/Email/Template/Collection.php +++ b/app/code/Magento/Email/Model/Resource/Template/Collection.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Magento - * @package Magento_Core + * @package Magento_Email * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -29,10 +29,10 @@ * Templates collection * * @category Magento - * @package Magento_Core + * @package Magento_Email * @author Magento Core Team <core@magentocommerce.com> */ -namespace Magento\Core\Model\Resource\Email\Template; +namespace Magento\Email\Model\Resource\Template; class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractCollection { @@ -49,7 +49,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractCol */ public function _construct() { - $this->_init('Magento\Core\Model\Email\Template', 'Magento\Core\Model\Resource\Email\Template'); + $this->_init('Magento\Email\Model\Template', 'Magento\Email\Model\Resource\Template'); $this->_templateTable = $this->getMainTable(); } diff --git a/app/code/Magento/Core/Model/Sender.php b/app/code/Magento/Email/Model/Sender.php similarity index 83% rename from app/code/Magento/Core/Model/Sender.php rename to app/code/Magento/Email/Model/Sender.php index bc1a5acd7b1a786a8138617b5630bb916cf21be2..1f4b58e3c74cc73b64dc6243ccbc1cd264d6b6a1 100644 --- a/app/code/Magento/Core/Model/Sender.php +++ b/app/code/Magento/Email/Model/Sender.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Magento - * @package Magento_Core + * @package Magento_Email * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -28,30 +28,30 @@ * Common sender * * @category Magento - * @package Magento_Core + * @package Magento_Email * @author Magento Core Team <core@magentocommerce.com> */ -namespace Magento\Core\Model; +namespace Magento\Email\Model; class Sender { - /** @var \Magento\Core\Model\Email\Template\Mailer */ + /** @var \Magento\Email\Model\Template\Mailer */ protected $_mailer; - /** @var \Magento\Core\Model\Email\Info */ + /** @var \Magento\Email\Model\Info */ protected $_emailInfo; /** @var \Magento\Core\Model\Store */ protected $_store; /** - * @param \Magento\Core\Model\Email\Template\Mailer $mailer - * @param \Magento\Core\Model\Email\Info $info + * @param \Magento\Email\Model\Template\Mailer $mailer + * @param \Magento\Email\Model\Info $info * @param \Magento\Core\Model\StoreManagerInterface $storeManager */ public function __construct( - \Magento\Core\Model\Email\Template\Mailer $mailer, - \Magento\Core\Model\Email\Info $info, + \Magento\Email\Model\Template\Mailer $mailer, + \Magento\Email\Model\Info $info, \Magento\Core\Model\StoreManagerInterface $storeManager ) { $this->_mailer = $mailer; @@ -66,7 +66,7 @@ class Sender * @param string $sender * @param array $templateParams * @param int $storeId - * @return \Magento\Core\Model\Sender + * @return \Magento\Email\Model\Sender */ public function send($email, $name, $template, $sender, $templateParams = array(), $storeId) { diff --git a/app/code/Magento/Core/Model/Source/Email/Variables.php b/app/code/Magento/Email/Model/Source/Variables.php similarity index 97% rename from app/code/Magento/Core/Model/Source/Email/Variables.php rename to app/code/Magento/Email/Model/Source/Variables.php index fac4342823ebca189867a3f85fbf28a240129d95..df8da96db7cc0535ca3b34119207273623062a3c 100644 --- a/app/code/Magento/Core/Model/Source/Email/Variables.php +++ b/app/code/Magento/Email/Model/Source/Variables.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Magento - * @package Magento_Core + * @package Magento_Email * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -29,10 +29,10 @@ * Store Contact Information source model * * @category Magento - * @package Magento_Core + * @package Magento_Email * @author Magento Core Team <core@magentocommerce.com> */ -namespace Magento\Core\Model\Source\Email; +namespace Magento\Email\Model\Source; class Variables implements \Magento\Core\Model\Option\ArrayInterface { diff --git a/app/code/Magento/Core/Model/Email/Template.php b/app/code/Magento/Email/Model/Template.php similarity index 87% rename from app/code/Magento/Core/Model/Email/Template.php rename to app/code/Magento/Email/Model/Template.php index b4bebc8c152574cb954b7abeb58baad7aef40c2f..189a8549257dc6a1d9f4758f2b6a4a3133b33bef 100644 --- a/app/code/Magento/Core/Model/Email/Template.php +++ b/app/code/Magento/Email/Model/Template.php @@ -19,18 +19,20 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Magento - * @package Magento_Core + * @package Magento_Email * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\Email\Model; + /** * Template model * * Example: * * // Loading of template - * \Magento\Core\Model\Email\TemplateFactory $templateFactory + * \Magento\Email\Model\TemplateFactory $templateFactory * $templateFactory->create()->load($this->_coreStoreConfig->getConfig('path_to_email_template_id_config')); * $variables = array( * 'someObject' => $this->_coreResourceEmailTemplate @@ -38,37 +40,33 @@ * ); * $emailTemplate->send('some@domain.com', 'Name Of User', $variables); * - * @method \Magento\Core\Model\Resource\Email\Template _getResource() - * @method \Magento\Core\Model\Resource\Email\Template getResource() + * @method \Magento\Email\Model\Resource\Template _getResource() + * @method \Magento\Email\Model\Resource\Template getResource() * @method string getTemplateCode() - * @method \Magento\Core\Model\Email\Template setTemplateCode(string $value) + * @method \Magento\Email\Model\Template setTemplateCode(string $value) * @method string getTemplateText() - * @method \Magento\Core\Model\Email\Template setTemplateText(string $value) + * @method \Magento\Email\Model\Template setTemplateText(string $value) * @method string getTemplateStyles() - * @method \Magento\Core\Model\Email\Template setTemplateStyles(string $value) + * @method \Magento\Email\Model\Template setTemplateStyles(string $value) * @method int getTemplateType() - * @method \Magento\Core\Model\Email\Template setTemplateType(int $value) + * @method \Magento\Email\Model\Template setTemplateType(int $value) * @method string getTemplateSubject() - * @method \Magento\Core\Model\Email\Template setTemplateSubject(string $value) + * @method \Magento\Email\Model\Template setTemplateSubject(string $value) * @method string getTemplateSenderName() - * @method \Magento\Core\Model\Email\Template setTemplateSenderName(string $value) + * @method \Magento\Email\Model\Template setTemplateSenderName(string $value) * @method string getTemplateSenderEmail() - * @method \Magento\Core\Model\Email\Template setTemplateSenderEmail(string $value) + * @method \Magento\Email\Model\Template setTemplateSenderEmail(string $value) * @method string getAddedAt() - * @method \Magento\Core\Model\Email\Template setAddedAt(string $value) + * @method \Magento\Email\Model\Template setAddedAt(string $value) * @method string getModifiedAt() - * @method \Magento\Core\Model\Email\Template setModifiedAt(string $value) + * @method \Magento\Email\Model\Template setModifiedAt(string $value) * @method string getOrigTemplateCode() - * @method \Magento\Core\Model\Email\Template setOrigTemplateCode(string $value) + * @method \Magento\Email\Model\Template setOrigTemplateCode(string $value) * @method string getOrigTemplateVariables() - * @method \Magento\Core\Model\Email\Template setOrigTemplateVariables(string $value) + * @method \Magento\Email\Model\Template setOrigTemplateVariables(string $value) * - * @category Magento - * @package Magento_Core - * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ -namespace Magento\Core\Model\Email; - class Template extends \Magento\Core\Model\Template { /** @@ -79,6 +77,11 @@ class Template extends \Magento\Core\Model\Template const XML_PATH_DESIGN_EMAIL_LOGO = 'design/email/logo'; const XML_PATH_DESIGN_EMAIL_LOGO_ALT = 'design/email/logo_alt'; + /** + * Config path to mail sending setting that shows if email communications are disabled + */ + const XML_PATH_SYSTEM_SMTP_DISABLE = 'system/smtp/disable'; + protected $_templateFilter; protected $_preprocessFlag = false; protected $_bcc = array(); @@ -105,11 +108,6 @@ class Template extends \Magento\Core\Model\Template */ protected $_viewFileSystem; - /** - * @var \Magento\Logger - */ - protected $_logger; - /** * Core store config * @@ -118,7 +116,7 @@ class Template extends \Magento\Core\Model\Template protected $_coreStoreConfig; /** - * @var \Magento\Core\Model\Email\Template\Config + * @var \Magento\Email\Model\Template\Config */ private $_emailConfig; @@ -127,7 +125,7 @@ class Template extends \Magento\Core\Model\Template * * Email filter factory * - * @var \Magento\Core\Model\Email\Template\FilterFactory + * @var \Magento\Email\Model\Template\FilterFactory */ protected $_emailFilterFactory; @@ -136,6 +134,12 @@ class Template extends \Magento\Core\Model\Template */ protected $_dir; + /** + * Types of template + */ + const TYPE_TEXT = 1; + const TYPE_HTML = 2; + /** * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry @@ -146,10 +150,10 @@ class Template extends \Magento\Core\Model\Template * @param \Magento\View\DesignInterface $design * @param \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig * @param \Magento\Core\Model\ConfigInterface $coreConfig - * @param \Magento\Core\Model\Email\Template\FilterFactory $emailFilterFactory + * @param \Magento\Email\Model\Template\FilterFactory $emailFilterFactory * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\App\Dir $dir - * @param \Magento\Core\Model\Email\Template\Config $emailConfig + * @param \Magento\Email\Model\Template\Config $emailConfig * @param array $data * * @SuppressWarnings(PHPMD.ExcessiveParameterList) @@ -164,17 +168,16 @@ class Template extends \Magento\Core\Model\Template \Magento\View\DesignInterface $design, \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig, \Magento\Core\Model\ConfigInterface $coreConfig, - \Magento\Core\Model\Email\Template\FilterFactory $emailFilterFactory, + \Magento\Email\Model\Template\FilterFactory $emailFilterFactory, \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\App\Dir $dir, - \Magento\Core\Model\Email\Template\Config $emailConfig, + \Magento\Email\Model\Template\Config $emailConfig, array $data = array() ) { $this->_coreStoreConfig = $coreStoreConfig; $this->_filesystem = $filesystem; $this->_viewUrl = $viewUrl; $this->_viewFileSystem = $viewFileSystem; - $this->_logger = $context->getLogger(); $this->_coreConfig = $coreConfig; $this->_emailFilterFactory = $emailFilterFactory; $this->_dir = $dir; @@ -187,7 +190,7 @@ class Template extends \Magento\Core\Model\Template */ protected function _construct() { - $this->_init('Magento\Core\Model\Resource\Email\Template'); + $this->_init('Magento\Email\Model\Resource\Template'); } /** @@ -241,7 +244,7 @@ class Template extends \Magento\Core\Model\Template * Declare template processing filter * * @param \Magento\Filter\Template $filter - * @return \Magento\Core\Model\Email\Template + * @return \Magento\Email\Model\Template */ public function setTemplateFilter(\Magento\Filter\Template $filter) { @@ -252,7 +255,7 @@ class Template extends \Magento\Core\Model\Template /** * Get filter object for template processing log * - * @return \Magento\Core\Model\Email\Template\Filter + * @return \Magento\Email\Model\Template\Filter */ public function getTemplateFilter() { @@ -268,7 +271,7 @@ class Template extends \Magento\Core\Model\Template * Load template by code * * @param string $templateCode - * @return \Magento\Core\Model\Email\Template + * @return \Magento\Email\Model\Template */ public function loadByCode($templateCode) { @@ -280,7 +283,7 @@ class Template extends \Magento\Core\Model\Template * Load default email template * * @param string $templateId - * @return \Magento\Core\Model\Email\Template + * @return \Magento\Email\Model\Template */ public function loadDefault($templateId) { @@ -331,7 +334,7 @@ class Template extends \Magento\Core\Model\Template * Set id of template * * @param int $value - * @return \Magento\Core\Model\Email\Template + * @return \Magento\Email\Model\Template */ public function setId($value) { @@ -378,7 +381,7 @@ class Template extends \Magento\Core\Model\Template $variables['this'] = $this; } - if (isset($variables['subscriber']) && ($variables['subscriber'] instanceof \Magento\Newsletter\Model\Subscriber)) { + if (isset($variables['subscriber'])) { $processor->setStoreId($variables['subscriber']->getStoreId()); } @@ -440,6 +443,8 @@ class Template extends \Magento\Core\Model\Template /** * Send mail to recipient * + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) * @param array|string $email E-mail(s) * @param array|string|null $name receiver name(s) * @param array $variables template variables @@ -448,7 +453,9 @@ class Template extends \Magento\Core\Model\Template public function send($email, $name = null, array $variables = array()) { if (!$this->isValidForSend()) { - $this->_logger->logException(new \Exception('This letter cannot be sent.')); // translation is intentionally omitted + $this->_logger->logException( + new \Exception('This letter cannot be sent.') // translation is intentionally omitted + ); return false; } @@ -547,7 +554,7 @@ class Template extends \Magento\Core\Model\Template * @param string $name recipient name * @param array $vars variables which can be used in template * @param int|null $storeId - * @return \Magento\Core\Model\Email\Template + * @return \Magento\Email\Model\Template * @throws \Magento\Core\Exception */ public function sendTransactional($templateId, $sender, $email, $name, $vars = array(), $storeId = null) @@ -568,8 +575,12 @@ class Template extends \Magento\Core\Model\Template } if (!is_array($sender)) { - $this->setSenderName($this->_coreStoreConfig->getConfig('trans_email/ident_' . $sender . '/name', $storeId)); - $this->setSenderEmail($this->_coreStoreConfig->getConfig('trans_email/ident_' . $sender . '/email', $storeId)); + $this->setSenderName( + $this->_coreStoreConfig->getConfig('trans_email/ident_' . $sender . '/name', $storeId) + ); + $this->setSenderEmail( + $this->_coreStoreConfig->getConfig('trans_email/ident_' . $sender . '/email', $storeId) + ); } else { $this->setSenderName($sender['name']); $this->setSenderEmail($sender['email']); @@ -616,7 +627,7 @@ class Template extends \Magento\Core\Model\Template * Add email BCC * * @param string|array $bcc - * @return \Magento\Core\Model\Email\Template + * @return \Magento\Email\Model\Template */ public function addBcc($bcc) { @@ -628,7 +639,7 @@ class Template extends \Magento\Core\Model\Template * Set Return Path * * @param string $email - * @return \Magento\Core\Model\Email\Template + * @return \Magento\Email\Model\Template */ public function setReturnPath($email) { @@ -640,7 +651,7 @@ class Template extends \Magento\Core\Model\Template * Add Reply-To header * * @param string $email - * @return \Magento\Core\Model\Email\Template + * @return \Magento\Email\Model\Template */ public function setReplyTo($email) { @@ -695,7 +706,7 @@ class Template extends \Magento\Core\Model\Template * Validate email template code * * @throws \Magento\Core\Exception - * @return \Magento\Core\Model\Email\Template + * @return \Magento\Email\Model\Template */ protected function _beforeSave() { diff --git a/app/code/Magento/Core/Model/Email/Template/Config.php b/app/code/Magento/Email/Model/Template/Config.php similarity index 93% rename from app/code/Magento/Core/Model/Email/Template/Config.php rename to app/code/Magento/Email/Model/Template/Config.php index 64ff7e15c02a1b7dc2e50e252beda6544cd7396a..c382a29ee48c65d6326d3a8e29904c4445e8e494 100644 --- a/app/code/Magento/Core/Model/Email/Template/Config.php +++ b/app/code/Magento/Email/Model/Template/Config.php @@ -23,12 +23,12 @@ * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Core\Model\Email\Template; +namespace Magento\Email\Model\Template; class Config { /** - * @var \Magento\Core\Model\Email\Template\Config\Data + * @var \Magento\Email\Model\Template\Config\Data */ protected $_dataStorage; @@ -38,11 +38,11 @@ class Config protected $_moduleReader; /** - * @param \Magento\Core\Model\Email\Template\Config\Data $dataStorage + * @param \Magento\Email\Model\Template\Config\Data $dataStorage * @param \Magento\Module\Dir\Reader $moduleReader */ public function __construct( - \Magento\Core\Model\Email\Template\Config\Data $dataStorage, + \Magento\Email\Model\Template\Config\Data $dataStorage, \Magento\Module\Dir\Reader $moduleReader ) { $this->_dataStorage = $dataStorage; diff --git a/app/code/Magento/Core/Model/Email/Template/Config/Converter.php b/app/code/Magento/Email/Model/Template/Config/Converter.php similarity index 97% rename from app/code/Magento/Core/Model/Email/Template/Config/Converter.php rename to app/code/Magento/Email/Model/Template/Config/Converter.php index 9e7f245620f266391a567e5f57e91d1f6a57cfa0..97718a9b19d199e4065ec8a6a90d7abc9abc7f05 100644 --- a/app/code/Magento/Core/Model/Email/Template/Config/Converter.php +++ b/app/code/Magento/Email/Model/Template/Config/Converter.php @@ -23,7 +23,7 @@ * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Core\Model\Email\Template\Config; +namespace Magento\Email\Model\Template\Config; class Converter implements \Magento\Config\ConverterInterface { diff --git a/app/code/Magento/Core/Model/Email/Template/Config/Data.php b/app/code/Magento/Email/Model/Template/Config/Data.php similarity index 87% rename from app/code/Magento/Core/Model/Email/Template/Config/Data.php rename to app/code/Magento/Email/Model/Template/Config/Data.php index a0607393fa846fe842433ea8b58e12244a2f2cd9..6303e758c6dc24dbabe4012d477c6813e33ae1df 100644 --- a/app/code/Magento/Core/Model/Email/Template/Config/Data.php +++ b/app/code/Magento/Email/Model/Template/Config/Data.php @@ -23,16 +23,16 @@ * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Core\Model\Email\Template\Config; +namespace Magento\Email\Model\Template\Config; class Data extends \Magento\Config\Data { /** - * @param \Magento\Core\Model\Email\Template\Config\Reader $reader + * @param \Magento\Email\Model\Template\Config\Reader $reader * @param \Magento\Config\CacheInterface $cache */ public function __construct( - \Magento\Core\Model\Email\Template\Config\Reader $reader, + \Magento\Email\Model\Template\Config\Reader $reader, \Magento\Config\CacheInterface $cache ) { parent::__construct($reader, $cache, 'email_templates'); diff --git a/app/code/Magento/Core/Model/Email/Template/Config/Reader.php b/app/code/Magento/Email/Model/Template/Config/Reader.php similarity index 87% rename from app/code/Magento/Core/Model/Email/Template/Config/Reader.php rename to app/code/Magento/Email/Model/Template/Config/Reader.php index 70c9ef739cd40456b036ecd6316fdcb2faeb1bbc..dd27e292f98cec5e455775c05c8a0636278a5b78 100644 --- a/app/code/Magento/Core/Model/Email/Template/Config/Reader.php +++ b/app/code/Magento/Email/Model/Template/Config/Reader.php @@ -23,7 +23,7 @@ * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Core\Model\Email\Template\Config; +namespace Magento\Email\Model\Template\Config; class Reader extends \Magento\Config\Reader\Filesystem { @@ -34,15 +34,15 @@ class Reader extends \Magento\Config\Reader\Filesystem /** * @param \Magento\Config\FileResolverInterface $fileResolver - * @param \Magento\Core\Model\Email\Template\Config\Converter $converter - * @param \Magento\Core\Model\Email\Template\Config\SchemaLocator $schemaLocator + * @param \Magento\Email\Model\Template\Config\Converter $converter + * @param \Magento\Email\Model\Template\Config\SchemaLocator $schemaLocator * @param \Magento\Config\ValidationStateInterface $validationState * @param \Magento\Module\Dir\ReverseResolver $moduleDirResolver */ public function __construct( \Magento\Config\FileResolverInterface $fileResolver, - \Magento\Core\Model\Email\Template\Config\Converter $converter, - \Magento\Core\Model\Email\Template\Config\SchemaLocator $schemaLocator, + \Magento\Email\Model\Template\Config\Converter $converter, + \Magento\Email\Model\Template\Config\SchemaLocator $schemaLocator, \Magento\Config\ValidationStateInterface $validationState, \Magento\Module\Dir\ReverseResolver $moduleDirResolver ) { diff --git a/app/code/Magento/Core/Model/Email/Template/Config/SchemaLocator.php b/app/code/Magento/Email/Model/Template/Config/SchemaLocator.php similarity index 94% rename from app/code/Magento/Core/Model/Email/Template/Config/SchemaLocator.php rename to app/code/Magento/Email/Model/Template/Config/SchemaLocator.php index a29c6a87c2a5a6957f882fe631ffa9280d95158e..61fc6c30bc8af8e2dba75fe88b732accbd5982d9 100644 --- a/app/code/Magento/Core/Model/Email/Template/Config/SchemaLocator.php +++ b/app/code/Magento/Email/Model/Template/Config/SchemaLocator.php @@ -23,7 +23,7 @@ * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Core\Model\Email\Template\Config; +namespace Magento\Email\Model\Template\Config; class SchemaLocator implements \Magento\Config\SchemaLocatorInterface { @@ -39,7 +39,7 @@ class SchemaLocator implements \Magento\Config\SchemaLocatorInterface */ public function __construct(\Magento\Module\Dir\Reader $moduleReader) { - $this->_schema = $moduleReader->getModuleDir('etc', 'Magento_Core') . '/email_templates.xsd'; + $this->_schema = $moduleReader->getModuleDir('etc', 'Magento_Email') . '/email_templates.xsd'; } /** diff --git a/app/code/Magento/Core/Model/Email/Template/Filter.php b/app/code/Magento/Email/Model/Template/Filter.php similarity index 94% rename from app/code/Magento/Core/Model/Email/Template/Filter.php rename to app/code/Magento/Email/Model/Template/Filter.php index 3c458bbbab44bccb1fb341c267bc9a4e8bc6fba2..2b08ec583634ceb5672ac57d698c010d305b8f4c 100644 --- a/app/code/Magento/Core/Model/Email/Template/Filter.php +++ b/app/code/Magento/Email/Model/Template/Filter.php @@ -19,21 +19,18 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Magento - * @package Magento_Core + * @package Magento_Email * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\Email\Model\Template; /** * Core Email Template Filter Model * - * @category Magento - * @package Magento_Core - * @author Magento Core Team <core@magentocommerce.com> + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ -namespace Magento\Core\Model\Email\Template; - class Filter extends \Magento\Filter\Template { /** @@ -59,6 +56,9 @@ class Filter extends \Magento\Filter\Template protected $_storeId = null; + /** + * @var bool + */ protected $_plainTemplateMode = false; /** @@ -85,7 +85,7 @@ class Filter extends \Magento\Filter\Template protected $_variableFactory; /** - * @var \Magento\Core\Model\StoreManager + * @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; @@ -121,13 +121,14 @@ class Filter extends \Magento\Filter\Template protected $_appState; /** + * @SuppressWarnings(PHPMD.ExcessiveParameterList) * @param \Magento\Stdlib\String $string * @param \Magento\Logger $logger * @param \Magento\Escaper $escaper * @param \Magento\View\Url $viewUrl * @param \Magento\Core\Model\Store\Config $coreStoreConfig * @param \Magento\Core\Model\VariableFactory $coreVariableFactory - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\View\LayoutInterface $layout * @param \Magento\View\LayoutFactory $layoutFactory * @param \Magento\App\State $appState @@ -139,7 +140,7 @@ class Filter extends \Magento\Filter\Template \Magento\View\Url $viewUrl, \Magento\Core\Model\Store\Config $coreStoreConfig, \Magento\Core\Model\VariableFactory $coreVariableFactory, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\View\LayoutInterface $layout, \Magento\View\LayoutFactory $layoutFactory, \Magento\App\State $appState @@ -161,7 +162,7 @@ class Filter extends \Magento\Filter\Template * Set use absolute links flag * * @param bool $flag - * @return \Magento\Core\Model\Email\Template\Filter + * @return \Magento\Email\Model\Template\Filter */ public function setUseAbsoluteLinks($flag) { @@ -174,7 +175,7 @@ class Filter extends \Magento\Filter\Template * Doesn't set anything intentionally, since SID is not allowed in any kind of emails * * @param bool $flag - * @return \Magento\Core\Model\Email\Template\Filter + * @return \Magento\Email\Model\Template\Filter */ public function setUseSessionInUrl($flag) { @@ -186,7 +187,7 @@ class Filter extends \Magento\Filter\Template * Setter * * @param boolean $plainTemplateMode - * @return \Magento\Core\Model\Email\Template\Filter + * @return \Magento\Email\Model\Template\Filter */ public function setPlainTemplateMode($plainTemplateMode) { @@ -194,21 +195,11 @@ class Filter extends \Magento\Filter\Template return $this; } - /** - * Getter - * - * @return boolean - */ - public function getPlainTemplateMode() - { - return $this->_plainTemplateMode; - } - /** * Setter * * @param integer $storeId - * @return \Magento\Core\Model\Email\Template\Filter + * @return \Magento\Email\Model\Template\Filter */ public function setStoreId($storeId) { @@ -233,6 +224,8 @@ class Filter extends \Magento\Filter\Template /** * Retrieve Block html directive * + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) * @param array $construction * @return string */ @@ -314,7 +307,7 @@ class Filter extends \Magento\Filter\Template $rootBlock = false; foreach ($layout->getAllBlocks() as $block) { - /* @var $block \Magento\Core\Block\AbstractBlock */ + /* @var $block \Magento\View\Block\AbstractBlock */ if (!$block->getParentBlock() && !$rootBlock) { $rootBlock = $block; } @@ -573,7 +566,7 @@ class Filter extends \Magento\Filter\Template $variable = $this->_variableFactory->create() ->setStoreId($this->getStoreId()) ->loadByCode($params['code']); - $mode = $this->getPlainTemplateMode() + $mode = $this->_plainTemplateMode ? \Magento\Core\Model\Variable::TYPE_TEXT : \Magento\Core\Model\Variable::TYPE_HTML; $value = $variable->getValue($mode); @@ -588,6 +581,7 @@ class Filter extends \Magento\Filter\Template * Filter the string as template. * Rewrited for logging exceptions * + * @SuppressWarnings(PHPMD.ConstructorWithNameAsEnclosingClass) * @param string $value * @return string */ diff --git a/app/code/Magento/Core/Model/Email/Template/Mailer.php b/app/code/Magento/Email/Model/Template/Mailer.php similarity index 80% rename from app/code/Magento/Core/Model/Email/Template/Mailer.php rename to app/code/Magento/Email/Model/Template/Mailer.php index 686f8c20f2719c9efb2eaf44821d6b8feeeeab50..843a93a564ea77731dd2073d7d14eb287fd15f8b 100644 --- a/app/code/Magento/Core/Model/Email/Template/Mailer.php +++ b/app/code/Magento/Email/Model/Template/Mailer.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Magento - * @package Magento_Core + * @package Magento_Email * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -28,16 +28,16 @@ * Email Template Mailer Model * * @category Magento - * @package Magento_Core + * @package Magento_Email * @author Magento Core Team <core@magentocommerce.com> */ -namespace Magento\Core\Model\Email\Template; +namespace Magento\Email\Model\Template; class Mailer extends \Magento\Object { /** * List of email infos - * @see \Magento\Core\Model\Email\Info + * @see \Magento\Email\Model\Info * * @var array */ @@ -46,16 +46,16 @@ class Mailer extends \Magento\Object /** * Email template factory * - * @var \Magento\Core\Model\Email\TemplateFactory + * @var \Magento\Email\Model\TemplateFactory */ protected $_coreEmailTemplateFactory; /** - * @param \Magento\Core\Model\Email\TemplateFactory $coreEmailTemplateFactory + * @param \Magento\Email\Model\TemplateFactory $coreEmailTemplateFactory * @param array $data */ public function __construct( - \Magento\Core\Model\Email\TemplateFactory $coreEmailTemplateFactory, + \Magento\Email\Model\TemplateFactory $coreEmailTemplateFactory, array $data = array() ) { parent::__construct($data); @@ -65,12 +65,12 @@ class Mailer extends \Magento\Object /** * Add new email info to corresponding list * - * @param \Magento\Core\Model\Email\Info $emailInfo - * @return \Magento\Core\Model\Email\Template\Mailer + * @param \Magento\Email\Model\Info $emailInfo + * @return \Magento\Email\Model\Template\Mailer */ - public function addEmailInfo(\Magento\Core\Model\Email\Info $emailInfo) + public function addEmailInfo(\Magento\Email\Model\Info $emailInfo) { - array_push($this->_emailInfos, $emailInfo); + $this->_emailInfos[] = $emailInfo; return $this; } @@ -78,18 +78,18 @@ class Mailer extends \Magento\Object * Send all emails from email list * @see self::$_emailInfos * - * @return \Magento\Core\Model\Email\Template\Mailer + * @return \Magento\Email\Model\Template\Mailer */ public function send() { - /** @var $emailTemplate \Magento\Core\Model\Email\Template */ + /** @var $emailTemplate \Magento\Email\Model\Template */ $emailTemplate = $this->_coreEmailTemplateFactory->create(); // Send all emails from corresponding list while (!empty($this->_emailInfos)) { $emailInfo = array_pop($this->_emailInfos); // Handle "Bcc" recepients of the current email $emailTemplate->addBcc($emailInfo->getBccEmails()); - // Set required design parameters and delegate email sending to \Magento\Core\Model\Email\Template + // Set required design parameters and delegate email sending to \Magento\Email\Model\Template $designConfig = array( 'area' => \Magento\Core\Model\App\Area::AREA_FRONTEND, 'store' => $this->getStoreId() @@ -112,7 +112,7 @@ class Mailer extends \Magento\Object * Set email sender * * @param string|array $sender - * @return \Magento\Core\Model\Email\Template\Mailer + * @return \Magento\Email\Model\Template\Mailer */ public function setSender($sender) { @@ -133,7 +133,7 @@ class Mailer extends \Magento\Object * Set store id * * @param int $storeId - * @return \Magento\Core\Model\Email\Template\Mailer + * @return \Magento\Email\Model\Template\Mailer */ public function setStoreId($storeId) { @@ -154,7 +154,7 @@ class Mailer extends \Magento\Object * Set template id * * @param int $templateId - * @return \Magento\Core\Model\Email\Template\Mailer + * @return \Magento\Email\Model\Template\Mailer */ public function setTemplateId($templateId) { @@ -175,7 +175,7 @@ class Mailer extends \Magento\Object * Set tempate parameters * * @param array $templateParams - * @return \Magento\Core\Model\Email\Template\Mailer + * @return \Magento\Email\Model\Template\Mailer */ public function setTemplateParams(array $templateParams) { diff --git a/app/code/Magento/Core/Model/Email/Transport.php b/app/code/Magento/Email/Model/Transport.php similarity index 93% rename from app/code/Magento/Core/Model/Email/Transport.php rename to app/code/Magento/Email/Model/Transport.php index 06e8403ce27fd1a0bfb5a93eaef6bd6557a1ff2e..4dcfa2157ec2db9cab070f023e0bf97d91e7519d 100644 --- a/app/code/Magento/Core/Model/Email/Transport.php +++ b/app/code/Magento/Email/Model/Transport.php @@ -19,13 +19,13 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Magento - * @package Magento_Core + * @package Magento_Email * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Core\Model\Email; +namespace Magento\Email\Model; class Transport extends \Zend_Mail_Transport_Sendmail { diff --git a/app/code/Magento/Email/etc/adminhtml/acl.xml b/app/code/Magento/Email/etc/adminhtml/acl.xml new file mode 100644 index 0000000000000000000000000000000000000000..662fbf1a91faf3864f4647ff3780192f2feda22a --- /dev/null +++ b/app/code/Magento/Email/etc/adminhtml/acl.xml @@ -0,0 +1,40 @@ +<?xml version="1.0"?> +<!-- +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * 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_Email + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <acl> + <resources> + <resource id="Magento_Adminhtml::admin"> + <resource id="Magento_Adminhtml::marketing"> + <resource id="Magento_Adminhtml::marketing_communications" title="Communications" sortOrder="30"> + <resource id="Magento_Email::template" title="Email Templates" sortOrder="10" /> + </resource> + </resource> + </resource> + </resources> + </acl> +</config> diff --git a/app/code/Magento/Email/etc/adminhtml/menu.xml b/app/code/Magento/Email/etc/adminhtml/menu.xml new file mode 100644 index 0000000000000000000000000000000000000000..96a08efa93980c2ffb0a39a3ee39540801013102 --- /dev/null +++ b/app/code/Magento/Email/etc/adminhtml/menu.xml @@ -0,0 +1,32 @@ +<?xml version="1.0"?> +<!-- +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * 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_Email + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <menu> + <add id="Magento_Email::template" title="Email Templates" module="Magento_Email" sortOrder="10" parent="Magento_Adminhtml::marketing_communications" action="adminhtml/email_template" resource="Magento_Email::template"/> + </menu> +</config> diff --git a/app/code/Magento/Email/etc/adminhtml/routes.xml b/app/code/Magento/Email/etc/adminhtml/routes.xml new file mode 100644 index 0000000000000000000000000000000000000000..f708fad875cd6bd51a04571c5eb81068982a95e9 --- /dev/null +++ b/app/code/Magento/Email/etc/adminhtml/routes.xml @@ -0,0 +1,32 @@ +<?xml version="1.0"?> +<!-- +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <router id="admin"> + <route id="adminhtml"> + <module name="Magento_Email_Adminhtml" before="Magento_Adminhtml" /> + </route> + </router> +</config> \ No newline at end of file diff --git a/app/code/Magento/Email/etc/config.xml b/app/code/Magento/Email/etc/config.xml new file mode 100644 index 0000000000000000000000000000000000000000..06bfc9cf81c0328e23b91e766d47ec825b083d33 --- /dev/null +++ b/app/code/Magento/Email/etc/config.xml @@ -0,0 +1,69 @@ +<?xml version="1.0"?> +<!-- +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * 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_Email + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <default> + <system> + <media_storage_configuration> + <allowed_resources> + <email_folder>email</email_folder> + </allowed_resources> + </media_storage_configuration> + <emails> + <forgot_email_template>system_emails_forgot_email_template</forgot_email_template> + <forgot_email_identity>general</forgot_email_identity> + </emails> + <smtp> + <disable>0</disable> + <host>localhost</host> + <port>25</port> + </smtp> + </system> + <trans_email> + <ident_custom1> + <email>custom1@example.com</email> + <name>Custom 1</name> + </ident_custom1> + <ident_custom2> + <email>custom2@example.com</email> + <name>Custom 2</name> + </ident_custom2> + <ident_general> + <email>owner@example.com</email> + <name>Owner</name> + </ident_general> + <ident_sales> + <email>sales@example.com</email> + <name>Sales</name> + </ident_sales> + <ident_support> + <email>support@example.com</email> + <name>CustomerSupport</name> + </ident_support> + </trans_email> + </default> +</config> diff --git a/app/code/Magento/Email/etc/di.xml b/app/code/Magento/Email/etc/di.xml new file mode 100644 index 0000000000000000000000000000000000000000..083a2003fb610627cbf240005b8aaae17d26a9ae --- /dev/null +++ b/app/code/Magento/Email/etc/di.xml @@ -0,0 +1,27 @@ +<?xml version="1.0"?> +<!-- +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> +</config> diff --git a/app/code/Magento/Core/etc/email_templates.xsd b/app/code/Magento/Email/etc/email_templates.xsd similarity index 100% rename from app/code/Magento/Core/etc/email_templates.xsd rename to app/code/Magento/Email/etc/email_templates.xsd diff --git a/app/code/Magento/Core/etc/email_templates_file.xsd b/app/code/Magento/Email/etc/email_templates_file.xsd similarity index 100% rename from app/code/Magento/Core/etc/email_templates_file.xsd rename to app/code/Magento/Email/etc/email_templates_file.xsd diff --git a/app/code/Magento/Core/etc/email_templates_types.xsd b/app/code/Magento/Email/etc/email_templates_types.xsd similarity index 100% rename from app/code/Magento/Core/etc/email_templates_types.xsd rename to app/code/Magento/Email/etc/email_templates_types.xsd diff --git a/app/code/Magento/Email/etc/module.xml b/app/code/Magento/Email/etc/module.xml new file mode 100644 index 0000000000000000000000000000000000000000..c8e5e52a1ba212d5c3e49b457f5eb25e8899aba6 --- /dev/null +++ b/app/code/Magento/Email/etc/module.xml @@ -0,0 +1,33 @@ +<?xml version="1.0"?> +<!-- +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <module name="Magento_Email" version="1.0.0.0" active="true"> + <depends> + <module name="Magento_Core"/> + <module name="Magento_Cms" /> + </depends> + </module> +</config> diff --git a/app/code/Magento/Email/sql/email_setup/install-1.0.0.0.php b/app/code/Magento/Email/sql/email_setup/install-1.0.0.0.php new file mode 100644 index 0000000000000000000000000000000000000000..870f7c65d2656129c89c0e2b82b4df4468bf2617 --- /dev/null +++ b/app/code/Magento/Email/sql/email_setup/install-1.0.0.0.php @@ -0,0 +1,149 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +/* @var $installer \Magento\Core\Model\Resource\Setup */ +$installer = $this; + +/** + * Create table 'core_email_template' + */ +$table = $installer->getConnection() + ->newTable($installer->getTable('email_template')) + ->addColumn( + 'template_id', + \Magento\DB\Ddl\Table::TYPE_INTEGER, + null, + array( + 'identity' => true, + 'unsigned' => true, + 'nullable' => false, + 'primary' => true, + ), + 'Template Id' + ) + ->addColumn( + 'template_code', + \Magento\DB\Ddl\Table::TYPE_TEXT, + 150, + array( + 'nullable' => false + ), + 'Template Name' + ) + ->addColumn( + 'template_text', + \Magento\DB\Ddl\Table::TYPE_TEXT, + '64k', + array( + 'nullable' => false + ), + 'Template Content' + ) + ->addColumn( + 'template_styles', + \Magento\DB\Ddl\Table::TYPE_TEXT, + '64k', + array(), + 'Templste Styles' + ) + ->addColumn( + 'template_type', + \Magento\DB\Ddl\Table::TYPE_INTEGER, + null, + array( + 'unsigned' => true, + ), + 'Template Type' + ) + ->addColumn( + 'template_subject', + \Magento\DB\Ddl\Table::TYPE_TEXT, + 200, + array( + 'nullable' => false, + ), + 'Template Subject' + ) + ->addColumn( + 'template_sender_name', + \Magento\DB\Ddl\Table::TYPE_TEXT, + 200, + array(), + 'Template Sender Name' + ) + ->addColumn( + 'template_sender_email', + \Magento\DB\Ddl\Table::TYPE_TEXT, + 200, + array(), + 'Template Sender Email' + ) + ->addColumn( + 'added_at', + \Magento\DB\Ddl\Table::TYPE_TIMESTAMP, + null, + array(), + 'Date of Template Creation' + ) + ->addColumn( + 'modified_at', + \Magento\DB\Ddl\Table::TYPE_TIMESTAMP, + null, + array(), + 'Date of Template Modification' + ) + ->addColumn( + 'orig_template_code', + \Magento\DB\Ddl\Table::TYPE_TEXT, + 200, + array(), + 'Original Template Code' + ) + ->addColumn( + 'orig_template_variables', + \Magento\DB\Ddl\Table::TYPE_TEXT, + '64k', + array(), + 'Original Template Variables' + ) + ->addIndex( + $installer->getIdxName( + 'core_email_template', + array('template_code'), + \Magento\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE + ), + array('template_code'), + array('type' => \Magento\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE) + ) + ->addIndex( + $installer->getIdxName('core_email_template', array('added_at')), + array('added_at') + ) + ->addIndex( + $installer->getIdxName('core_email_template', array('modified_at')), + array('modified_at') + ) + ->setComment('Email Templates'); + +$installer->getConnection()->createTable($table); diff --git a/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_email_template_grid.xml b/app/code/Magento/Email/view/adminhtml/layout/adminhtml_email_template_grid.xml similarity index 94% rename from app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_email_template_grid.xml rename to app/code/Magento/Email/view/adminhtml/layout/adminhtml_email_template_grid.xml index ec44a9cdd5f99f0ca4a8c40f1ed0893da11baf11..55195bf0ecc094ca6fef397922ce19f1bea2ada4 100644 --- a/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_email_template_grid.xml +++ b/app/code/Magento/Email/view/adminhtml/layout/adminhtml_email_template_grid.xml @@ -25,6 +25,6 @@ --> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <update handle="formkey"/> - <update handle="adminhtml_system_email_template_grid_block"/> + <update handle="adminhtml_email_template_grid_block"/> <block class="Magento\Backend\Block\Widget\Grid\Container" name="adminhtml.system.email.template.container" template="Magento_Backend::widget/grid/container/empty.phtml" output="1"/> </layout> diff --git a/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_email_template_grid_block.xml b/app/code/Magento/Email/view/adminhtml/layout/adminhtml_email_template_grid_block.xml similarity index 95% rename from app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_email_template_grid_block.xml rename to app/code/Magento/Email/view/adminhtml/layout/adminhtml_email_template_grid_block.xml index 66fe5a010da4a32ec9a45aab3da38220787f2c0c..c9d8a4f878e9596103d14b9f819fb393acf0c3c9 100644 --- a/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_email_template_grid_block.xml +++ b/app/code/Magento/Email/view/adminhtml/layout/adminhtml_email_template_grid_block.xml @@ -28,7 +28,7 @@ <block class="Magento\Backend\Block\Widget\Grid" name="adminhtml.system.email.template.grid" as="grid"> <arguments> <argument name="id" xsi:type="string">systemEmailTemplateGrid</argument> - <argument name="dataSource" xsi:type="object">Magento\Core\Model\Resource\Email\Template\Collection</argument> + <argument name="dataSource" xsi:type="object">Magento\Email\Model\Resource\Template\Collection</argument> <argument name="use_ajax" xsi:type="string">1</argument> <argument name="save_parameters_in_session" xsi:type="string">1</argument> <argument name="grid_url" xsi:type="url" path="*/*/grid"> @@ -83,8 +83,8 @@ <arguments> <argument name="header" xsi:type="string" translate="true">Template Type</argument> <argument name="index" xsi:type="string">template_type</argument> - <argument name="filter" xsi:type="string">Magento\Backend\Block\System\Email\Template\Grid\Filter\Type</argument> - <argument name="renderer" xsi:type="string">Magento\Backend\Block\System\Email\Template\Grid\Renderer\Type</argument> + <argument name="filter" xsi:type="string">Magento\Email\Block\Adminhtml\Template\Grid\Filter\Type</argument> + <argument name="renderer" xsi:type="string">Magento\Email\Block\Adminhtml\Template\Grid\Renderer\Type</argument> </arguments> </block> <block class="Magento\Backend\Block\Widget\Grid\Column" as="action"> @@ -94,7 +94,7 @@ <argument name="sortable" xsi:type="string">0</argument> <argument name="filter" xsi:type="string">0</argument> <argument name="width" xsi:type="string">100px</argument> - <argument name="renderer" xsi:type="string">Magento\Backend\Block\System\Email\Template\Grid\Renderer\Action</argument> + <argument name="renderer" xsi:type="string">Magento\Email\Block\Adminhtml\Template\Grid\Renderer\Action</argument> </arguments> </block> </block> diff --git a/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_email_template_index.xml b/app/code/Magento/Email/view/adminhtml/layout/adminhtml_email_template_index.xml similarity index 85% rename from app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_email_template_index.xml rename to app/code/Magento/Email/view/adminhtml/layout/adminhtml_email_template_index.xml index 9fc97306f6acbfc019ea18b8a41a365f9577374f..56cdcf76a9c487433aca9fd18721a34a4fe43b35 100644 --- a/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_email_template_index.xml +++ b/app/code/Magento/Email/view/adminhtml/layout/adminhtml_email_template_index.xml @@ -24,8 +24,8 @@ */ --> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <update handle="adminhtml_system_email_template_grid_block"/> + <update handle="adminhtml_email_template_grid_block"/> <referenceContainer name="content"> - <block class="Magento\Backend\Block\System\Email\Template" name="adminhtml.system.email.template.container"/> + <block class="Magento\Email\Block\Adminhtml\Template" name="adminhtml.system.email.template.container"/> </referenceContainer> </layout> diff --git a/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_preview.xml b/app/code/Magento/Email/view/adminhtml/layout/systemPreview.xml similarity index 86% rename from app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_preview.xml rename to app/code/Magento/Email/view/adminhtml/layout/systemPreview.xml index 3e8595af2dfd003faf5af487c209fca1fb24a9b8..d77c6da59ffb1fd953c7b8409a88d6d865858ec0 100644 --- a/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_preview.xml +++ b/app/code/Magento/Email/view/adminhtml/layout/systemPreview.xml @@ -24,7 +24,7 @@ */ --> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <block class="Magento\Core\Block\Template" name="root" output="1" template="Magento_Backend::system/email/template/preview.phtml"> - <block class="Magento\Backend\Block\System\Email\Template\Preview" name="content" as="content"/> + <block class="Magento\View\Block\Template" name="root" output="1" template="Magento_Backend::system/email/template/preview.phtml"> + <block class="Magento\Email\Block\Adminhtml\Template\Preview" name="content" as="content"/> </block> </layout> diff --git a/app/code/Magento/Backend/view/adminhtml/system/email/template/edit.phtml b/app/code/Magento/Email/view/adminhtml/template/edit.phtml similarity index 97% rename from app/code/Magento/Backend/view/adminhtml/system/email/template/edit.phtml rename to app/code/Magento/Email/view/adminhtml/template/edit.phtml index bb574a0262374a9be75fb60ea2e973f48a86ba67..00e2c31a2530752222e21479ab58bde1da2fed6d 100644 --- a/app/code/Magento/Backend/view/adminhtml/system/email/template/edit.phtml +++ b/app/code/Magento/Email/view/adminhtml/template/edit.phtml @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design - * @package Magento_Backend + * @package default_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ @@ -202,10 +202,10 @@ }, - renderPaths: function(paths, fieldId){ + renderPaths: function(paths, fieldId) { var field = $(fieldId); - if(field){ - field.down('td').next('td').update(this.parsePath(paths, '<span class="path-delimiter"> -> </span>', '<br />')); + if (field) { + field.down('div').update(this.parsePath(paths, '<span class="path-delimiter"> -> </span>', '<br />')); } }, diff --git a/app/code/Magento/Backend/view/adminhtml/system/email/template/list.phtml b/app/code/Magento/Email/view/adminhtml/template/list.phtml similarity index 97% rename from app/code/Magento/Backend/view/adminhtml/system/email/template/list.phtml rename to app/code/Magento/Email/view/adminhtml/template/list.phtml index cddb9e6a45b23cb0b8b6af0af53df7547c0fa7ea..13b521b7a0e7ca701c8c7157f3c101e3a9e9b79f 100644 --- a/app/code/Magento/Backend/view/adminhtml/system/email/template/list.phtml +++ b/app/code/Magento/Email/view/adminhtml/template/list.phtml @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design - * @package Magento_Backend + * @package default_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/Magento/Backend/view/adminhtml/system/email/template/preview.phtml b/app/code/Magento/Email/view/adminhtml/template/preview.phtml similarity index 97% rename from app/code/Magento/Backend/view/adminhtml/system/email/template/preview.phtml rename to app/code/Magento/Email/view/adminhtml/template/preview.phtml index 4d76822f61cff9b40af119f330a6927c088c471b..e5cf6f527cf4dc9fc037d3b4cc4fefbbe1376c0c 100644 --- a/app/code/Magento/Backend/view/adminhtml/system/email/template/preview.phtml +++ b/app/code/Magento/Email/view/adminhtml/template/preview.phtml @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design - * @package Magento_Backend + * @package default_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/Magento/GiftMessage/Block/Adminhtml/Sales/Order/Create/Form.php b/app/code/Magento/GiftMessage/Block/Adminhtml/Sales/Order/Create/Form.php index a4d4b8c061cfe2eaec7d68f2517d44fce837a731..2c765dedfc49fcb4458dcd83868296ee010b2903 100644 --- a/app/code/Magento/GiftMessage/Block/Adminhtml/Sales/Order/Create/Form.php +++ b/app/code/Magento/GiftMessage/Block/Adminhtml/Sales/Order/Create/Form.php @@ -40,20 +40,20 @@ class Form extends \Magento\Adminhtml\Block\Template */ protected $_sessionQuote; - /** - * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote + * @param array $data */ - public function __construct( - \Magento\Adminhtml\Model\Session\Quote $sessionQuote, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Adminhtml\Model\Session\Quote $sessionQuote, + array $data = array() + ) { $this->_sessionQuote = $sessionQuote; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/GiftMessage/Block/Adminhtml/Sales/Order/View/Form.php b/app/code/Magento/GiftMessage/Block/Adminhtml/Sales/Order/View/Form.php index c37642db0dd1199d850a2792400382e8dd12ed8d..2bdca45b04ddb1e4a8b00340f35c626871865dfc 100644 --- a/app/code/Magento/GiftMessage/Block/Adminhtml/Sales/Order/View/Form.php +++ b/app/code/Magento/GiftMessage/Block/Adminhtml/Sales/Order/View/Form.php @@ -42,20 +42,20 @@ class Form extends \Magento\Backend\Block\Template */ protected $_coreRegistry = null; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/GiftMessage/Block/Message/Inline.php b/app/code/Magento/GiftMessage/Block/Message/Inline.php index 1a5a2c642b20768d435757f05130f4e731de3309..08424e77f2b3445b6650044674ea03961dce30ab 100644 --- a/app/code/Magento/GiftMessage/Block/Message/Inline.php +++ b/app/code/Magento/GiftMessage/Block/Message/Inline.php @@ -34,7 +34,7 @@ */ namespace Magento\GiftMessage\Block\Message; -class Inline extends \Magento\Core\Block\Template +class Inline extends \Magento\View\Block\Template { protected $_entity = null; protected $_type = null; @@ -55,22 +55,22 @@ class Inline extends \Magento\Core\Block\Template protected $_customerSession; /** + * @param \Magento\View\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\GiftMessage\Helper\Message $giftMessageMessage - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Customer\Model\Session $customerSession, \Magento\GiftMessage\Helper\Message $giftMessageMessage, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, array $data = array() ) { $this->_giftMessageMessage = $giftMessageMessage; $this->_customerSession = $customerSession; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/GiftMessage/Helper/Data.php b/app/code/Magento/GiftMessage/Helper/Data.php index 9cc3f87fc8d40d50f9cff747b96bb7092738dc88..531434ad85fb4bd39097d988ca4e5b52aab8a2b8 100644 --- a/app/code/Magento/GiftMessage/Helper/Data.php +++ b/app/code/Magento/GiftMessage/Helper/Data.php @@ -29,7 +29,7 @@ */ namespace Magento\GiftMessage\Helper; -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { } diff --git a/app/code/Magento/GiftMessage/Helper/Message.php b/app/code/Magento/GiftMessage/Helper/Message.php index 8ac53fd55c653cedff3685b6d438180b3c6b1f01..3ae7a15250c1c4b10c164381e9fed3ba12c94e4c 100644 --- a/app/code/Magento/GiftMessage/Helper/Message.php +++ b/app/code/Magento/GiftMessage/Helper/Message.php @@ -73,9 +73,9 @@ class Message extends \Magento\Core\Helper\Data protected $_escaper; /** - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\Store\Config $coreStoreConfig - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Locale $locale * @param \Magento\App\State $appState * @param \Magento\Catalog\Model\ProductFactory $productFactory @@ -85,9 +85,9 @@ class Message extends \Magento\Core\Helper\Data * @param bool $dbCompatibleMode */ public function __construct( - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Core\Model\Store\Config $coreStoreConfig, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Locale $locale, \Magento\App\State $appState, \Magento\Catalog\Model\ProductFactory $productFactory, diff --git a/app/code/Magento/GiftMessage/view/frontend/gift-options.js b/app/code/Magento/GiftMessage/view/frontend/gift-options.js index fbb910dd03644179a49f06c56f27f90e576f70ee..6f9b6cc23168a9f45a6075a2b5a2536916596510 100644 --- a/app/code/Magento/GiftMessage/view/frontend/gift-options.js +++ b/app/code/Magento/GiftMessage/view/frontend/gift-options.js @@ -76,7 +76,6 @@ .find('.giftmessage-area').val('').change().end() .find('.select').val('').change().end() .find('.checkbox:checked').prop('checked', false).click().prop('checked', false).end() - .find('a').parent().next().addClass(this.options.noDisplay).end() .find('.price-box').addClass(this.options.noDisplay).end(); } }, diff --git a/app/code/Magento/GiftMessage/view/frontend/inline.phtml b/app/code/Magento/GiftMessage/view/frontend/inline.phtml index b581f23b0ffe962af5acf03b695097ba453e1d7b..a284a2dcbbed3d3818ef1c3cfb334ea69c69a1e5 100644 --- a/app/code/Magento/GiftMessage/view/frontend/inline.phtml +++ b/app/code/Magento/GiftMessage/view/frontend/inline.phtml @@ -19,228 +19,285 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design - * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -<?php if ($this->isMessagesAvailable() || $this->isItemsAvailable()): ?> +<?php $_giftMessage = false; ?> +<?php if(!$this->getDontDisplayContainer()): ?> +<script type="text/javascript"> + head.js("<?php echo $this->getViewFileUrl('js/extra-options.js') ?>", function() { + jQuery('#checkoutSteps').extraOptions({additionalUrl: '<?php echo $this->getAdditionalUrl(); ?>'}); + }); +</script> +<?php endif ?> + <?php switch ($this->getType()): ?> <?php case 'onepage_checkout': ?> - <div class="gift-messages"> - <h3><?php echo __('Does your order include gift items?'); ?></h3> - <p> - <input type="checkbox" name="allow_gift_messages" id="allow_gift_messages" value="1" data-selector='{"id":"#allow-gift-message-container"}'<?php if($this->getItemsHasMesssages() || $this->getEntityHasMessage()): ?> checked="checked"<?php endif; ?> class="checkbox" /> - <label for="allow_gift_messages"><?php echo __('Add gift options.') ?></label> - </p> - </div> - <div class="gift-messages-form" id="allow-gift-message-container"> - <div class="inner-box"> - <?php if ($this->isMessagesAvailable()): ?> - <h4><?php echo __('Gift Options for the Entire Order'); ?></h4> - <p> - <input type="checkbox" name="allow_gift_messages_for_order" id="allow_gift_messages_for_order" value="1" data-selector='{"id":"#allow-gift-messages-for-order-container"}'<?php if($this->getEntityHasMessage()): ?> checked="checked"<?php endif; ?> class="checkbox" /> - <label for="allow_gift_messages_for_order"><?php echo __('Add gift options for the Entire Order') ?></label> - </p> - <div class="allow-gift-messages-for-order-container" id="allow-gift-messages-for-order-container" style="display:none"> - <p><?php echo __('You can leave this box empty if you don\'t want to add a gift message for the whole order.') ?></p> - <input type="hidden" name="giftmessage[<?php echo $this->getEntity()->getId() ?>][type]" value="quote" /> - <ul class="form-list"> - <li class="fields"> - <div class="field"> - <label for="gift-message-whole-from"><?php echo __('From') ?></label> - <div class="input-box"> - <input type="text" name="giftmessage[<?php echo $this->getEntity()->getId() ?>][from]" id="gift-message-whole-from" title="<?php echo __('From') ?>" value="<?php echo $this->getEscaped($this->getMessage()->getSender(), $this->getDefaultFrom()) ?>" class="input-text" /> + <fieldset class="fieldset gift message"> + <legend class="legend"><span><?php echo __('Do you have any gift items in your order?'); ?></span></legend><br> + + <div class="field choice" id="add-gift-options-<?php echo $this->getEntity()->getId() ?>"> + <input type="checkbox" name="allow_gift_options" id="allow_gift_options" value="1" data-selector='{"id":"#allow-gift-options-container"}'<?php if($this->getItemsHasMesssages() || $this->getEntityHasMessage()): ?> checked="checked"<?php endif; ?> class="checkbox" /> + <label for="allow_gift_options" class="label"><span><?php echo __('Add gift options') ?></span></label> + </div> + + <dl class="block items" id="allow-gift-options-container"> + <dt id="add-gift-options-for-order-<?php echo $this->getEntity()->getId() ?>" class="order"> + <div class="title"><span><?php echo __('Gift Options for the Entire Order'); ?></span></div> + <div class="field choice"> + <input type="checkbox" name="allow_gift_messages_for_order" id="allow_gift_options_for_order" value="1" data-selector='{"id":"#allow-gift-options-for-order-container"}'<?php if($this->getEntityHasMessage()): ?> checked="checked"<?php endif; ?> class="checkbox" /> + <label for="allow_gift_options_for_order" class="label"><span><?php echo __('Add gift options for the Entire Order') ?></span></label> + </div> + </dt> + + <dd id="allow-gift-options-for-order-container" class="options order"> + <div class="options-order-container" id="options-order-container-<?php echo $this->getEntity()->getId() ?>"></div> + <input type="hidden" name="giftoptions[<?php echo $this->getEntity()->getId() ?>][type]" value="quote" /> + <?php if ($this->isMessagesAvailable()): ?> + <a href="#" class="activate message" data-mage-init='{toggleAdvanced: {selectorsToggleClass:"no-display", toggleContainers:"#allow-gift-messages-for-order-container"}}'><?php echo __('Gift Message') ?></a> + <div id="allow-gift-messages-for-order-container" class="no-display"> + <fieldset class="fieldset"> + <input type="hidden" name="giftmessage[<?php echo $this->getEntity()->getId() ?>][type]" value="quote" /> + <p><?php echo __('If you don\'t want to leave a gift message for the entire order, leave this box blank.') ?></p> + <div class="field from"> + <label for="gift-message-whole-from" class="label"><span><?php echo __('From') ?></span></label> + <div class="control"> + <input type="text" name="giftmessage[<?php echo $this->getEntity()->getId() ?>][from]" id="gift-message-whole-from" title="<?php echo __('From') ?>" value="<?php echo $this->getEscaped($this->getMessage()->getSender(), $this->getDefaultFrom()) ?>" class="input-text"> </div> </div> - <div class="field"> - <label for="gift-message-whole-to"><?php echo __('To') ?></label> - <div class="input-box"> - <input type="text" name="giftmessage[<?php echo $this->getEntity()->getId() ?>][to]" id="gift-message-whole-to" title="<?php echo __('To') ?>" value="<?php echo $this->getEscaped($this->getMessage()->getRecipient(), $this->getDefaultTo()) ?>" class="input-text" /> + <div class="field to"> + <label for="gift-message-whole-to" class="label"><span><?php echo __('To') ?></span></label> + <div class="control"> + <input type="text" name="giftmessage[<?php echo $this->getEntity()->getId() ?>][to]" id="gift-message-whole-to" title="<?php echo __('To') ?>" value="<?php echo $this->getEscaped($this->getMessage()->getRecipient(), $this->getDefaultTo()) ?>" class="input-text"> </div> </div> - </li> - <li class="wide"> - <label for="gift-message-whole-message"><?php echo __('Message') ?></label> - <div class="input-box"> - <textarea id="gift-message-whole-message" class="input-text giftmessage-area" name="giftmessage[<?php echo $this->getEntity()->getId() ?>][message]" title="<?php echo __('Message') ?>" rows="5" cols="10"><?php echo $this->getEscaped($this->getMessage()->getMessage()) ?></textarea> + <div class="field text"> + <label for="gift-message-whole-message" class="label"><span><?php echo __('Message') ?></span></label> + <div class="control"> + <textarea id="gift-message-whole-message" class="input-text" name="giftmessage[<?php echo $this->getEntity()->getId() ?>][message]" title="<?php echo __('Message') ?>" rows="5" cols="10"><?php echo $this->getEscaped($this->getMessage()->getMessage()) ?></textarea> + </div> </div> - </li> - </ul> + </fieldset> + <script type="text/javascript"> + jQuery('#add-gift-options-<?php echo $this->getEntity()->getId() ?>') + .add('#add-gift-options-for-order-<?php echo $this->getEntity()->getId() ?>').removeClass('no-display'); + </script> + </div> + <?php endif ?> + </dd> + <?php if ($this->isItemsAvailable()): ?> + <dt id="add-gift-options-for-items-<?php echo $this->getEntity()->getId() ?>" class="individual"> + <div class="title"><span><?php echo __('Gift Options for Individual Items'); ?></span></div> + <div class="field choice"> + <input type="checkbox" name="allow_gift_options_for_items" id="allow_gift_options_for_items" value="1" data-selector='{"id":"#allow-gift-options-for-items-container"}'<?php if($this->getItemsHasMesssages()): ?> checked="checked"<?php endif; ?> class="checkbox" /> + <label for="allow_gift_options_for_items" class="label"><span><?php echo __('Add gift options for Individual Items') ?></span></label> </div> - <?php endif; ?> - <?php if($this->isItemsAvailable()): ?> - <h4><?php echo __('Gift Options for Individual Items'); ?></h4> - <p> - <input type="checkbox" name="allow_gift_messages_for_items" id="allow_gift_messages_for_items" value="1" data-selector='{"id":"#allow-gift-messages-for-items-container"}'<?php if($this->getItemsHasMesssages()): ?> checked="checked"<?php endif; ?> class="checkbox" /> - <label for="allow_gift_messages_for_items"><?php echo __('Add gift options for Individual Items') ?></label> - </p> - <div id="allow-gift-messages-for-items-container"> - <p><?php echo __('You can leave this box empty if you don\'t want to add a gift message to this item.') ?></p> - <ol> - <?php foreach($this->getItems() as $_index=>$_item): ?> - <?php $_product=$_item->getProduct() ?> - <li class="item"> - <div class="product-img-box"> - <p class="product-image"> - <img src="<?php echo $this->getThumbnailUrl($_product) ?>" width="<?php echo $this->getThumbnailSize()?>" height="<?php echo $this->getThumbnailSize()?>" alt="<?php echo $this->escapeHtml($_product->getName()) ?>" title="<?php echo $this->escapeHtml($_product->getName()) ?>" /> - </p> + </dt> + + <dd id="allow-gift-options-for-items-container" class="options individual"> + <ol> + <?php foreach($this->getItems() as $_index=>$_item): ?> + <?php $_product=$_item->getProduct() ?> + <li class="item"> + <input type="hidden" name="giftoptions[<?php echo $_item->getId() ?>][type]" value="quote_item" /> <p class="number"><?php echo __('Item %1 of %2', $_index+1, $this->countItems()) ?></p> - </div> - <div class="details"> - <div class="f-fix"> - <h5 class="product-name"><?php echo $this->escapeHtml($_product->getName()) ?></h5> - <input type="hidden" name="giftmessage[<?php echo $_item->getId() ?>][type]" value="quote_item" /> - <ul class="form-list"> - <li class="fields"> - <div class="field"> - <label for="gift-message-<?php echo $_item->getId() ?>-from"><?php echo __('From') ?></label> - <div class="input-box"> - <input type="text" name="giftmessage[<?php echo $_item->getId() ?>][from]" id="gift-message-<?php echo $_item->getId() ?>-from" title="<?php echo __('From') ?>" value="<?php echo $this->getEscaped($this->getMessage($_item)->getSender(), $this->getDefaultFrom()) ?>" class="input-text" /> + <div class="product"> + <div class="img photo container"> + <img src="<?php echo $this->getThumbnailUrl($_product); ?>" + width="<?php echo $this->getThumbnailSize()?>" + height="<?php echo $this->getThumbnailSize()?>" + alt="<?php echo $this->escapeHtml($_product->getName()) ?>" + title="<?php echo $this->escapeHtml($_product->getName()) ?>" /> + </div> + <strong class="product name"><?php echo $this->escapeHtml($_product->getName()) ?></strong> + </div> + <div class="item options"> + <div class="options-items-container" id="options-items-container-<?php echo $this->getEntity()->getId() ?>-<?php echo $_item->getId() ?>"></div> + <?php if ($this->isItemMessagesAvailable($_item)): ?> + <a href="#" class="activate message" data-mage-init='{toggleAdvanced: {selectorsToggleClass:"no-display", toggleContainers:"#gift-messages-for-item-container-<?php echo $_item->getId() ?>"}}'><?php echo __('Gift Message') ?></a> + <div id="gift-messages-for-item-container-<?php echo $_item->getId() ?>" class="block message no-display"> + <fieldset class="fieldset"> + <p><?php echo __('You can leave a box blank if you don\'t wish to add a gift message for the item.') ?></p> + <input type="hidden" name="giftmessage[<?php echo $_item->getId() ?>][type]" value="quote_item" > + <div class="field from"> + <label for="gift-message-<?php echo $_item->getId() ?>-from" class="label"><span><?php echo __('From') ?></span></label> + <div class="control"> + <input type="text" name="giftmessage[<?php echo $_item->getId() ?>][from]" id="gift-message-<?php echo $_item->getId() ?>-from" title="<?php echo __('From') ?>" value="<?php echo $this->getEscaped($this->getMessage($_item)->getSender(), $this->getDefaultFrom()) ?>" class="input-text"> </div> </div> - <div class="field"> - <label for="gift-message-<?php echo $_item->getId() ?>-to"><?php echo __('To') ?></label> - <div class="input-box"> - <input type="text" name="giftmessage[<?php echo $_item->getId() ?>][to]" id="gift-message-<?php echo $_item->getId() ?>-to" title="<?php echo __('To') ?>" value="<?php echo $this->getEscaped($this->getMessage($_item)->getRecipient(), $this->getDefaultTo()) ?>" class="input-text" /> - </div> + <div class="field to"> + <label for="gift-message-<?php echo $_item->getId() ?>-to" class="label"><span><?php echo __('To') ?></span></label> + <div class="control"> + <input type="text" name="giftmessage[<?php echo $_item->getId() ?>][to]" id="gift-message-<?php echo $_item->getId() ?>-to" title="<?php echo __('To') ?>" value="<?php echo $this->getEscaped($this->getMessage($_item)->getRecipient(), $this->getDefaultTo()) ?>" class="input-text"> + </div> </div> - </li> - <li class="wide"> - <label for="gift-message-<?php echo $_item->getId() ?>-message"><?php echo __('Message') ?></label> - <div class="input-box"> - <textarea id="gift-message-<?php echo $_item->getId() ?>-message" class="input-text giftmessage-area" name="giftmessage[<?php echo $_item->getId() ?>][message]" title="<?php echo __('Message') ?>" rows="5" cols="40"><?php echo $this->getEscaped($this->getMessage($_item)->getMessage()) ?></textarea> + <div class="field text"> + <label for="gift-message-<?php echo $_item->getId() ?>-message" class="label"><span><?php echo __('Message') ?></span></label> + <div class="control"> + <textarea id="gift-message-<?php echo $_item->getId() ?>-message" class="input-text giftmessage-area" name="giftmessage[<?php echo $_item->getId() ?>][message]" title="<?php echo __('Message') ?>" rows="5" cols="40"><?php echo $this->getEscaped($this->getMessage($_item)->getMessage()) ?></textarea> + </div> </div> - </li> - </ul> + </fieldset> + </div> + <?php endif; ?> </div> - </div> - </li> - <?php endforeach; ?> - </ol> - </div> - <?php endif; ?> - </div> - </div> + </li> + <?php endforeach; ?> + </ol> + </dd> + <script type="text/javascript"> + jQuery('#add-gift-options-<?php echo $this->getEntity()->getId() ?>') + .add('#add-gift-options-for-items-<?php echo $this->getEntity()->getId() ?>').removeClass('no-display'); + </script> + <?php endif; ?> + <dt class="extra-options-container" id="extra-options-container-<?php echo $this->getEntity()->getId() ?>"></dt> + </dl> + </fieldset> <script type="text/javascript"> head.js("<?php echo $this->getViewFileUrl('Magento_GiftMessage::gift-options.js')?>", function() { - jQuery('#allow_gift_messages') - .add('#allow_gift_messages_for_order') - .add('#allow_gift_messages_for_items').giftOptions(); + jQuery('#allow_gift_options') + .add('#allow_gift_options_for_order') + .add('#allow_gift_options_for_items').giftOptions(); }); </script> <?php break; ?> <?php case 'multishipping_adress_checkbox': ?> - <?php break; ?> + <?php case 'multishipping_address': ?> - <div class="gift-messages"> - <h3><?php echo __('Does your order include gift items?'); ?></h3> - <p> - <input type="checkbox" name="allow_gift_messages_<?php echo $this->getEntity()->getId() ?>" id="allow_gift_messages_<?php echo $this->getEntity()->getId() ?>" value="1" data-selector='{"id":"#allow-gift-message-container-<?php echo $this->getEntity()->getId() ?>"}'<?php if($this->getItemsHasMesssages() || $this->getEntityHasMessage()): ?> checked="checked"<?php endif ?> class="checkbox" /> - <label for="allow_gift_messages_<?php echo $this->getEntity()->getId() ?>"><?php echo __('Add gift options') ?></label> - </p> - </div> - <div class="gift-messages-form" id="allow-gift-message-container-<?php echo $this->getEntity()->getId() ?>"> - <div class="inner-box"> - <?php if ($this->isMessagesAvailable()): ?> - <h4><?php echo __('Gift Options for this address'); ?></h4> - <p> - <input type="checkbox" name="allow_gift_messages_for_order_<?php echo $this->getEntity()->getId() ?>" id="allow_gift_messages_for_order_<?php echo $this->getEntity()->getId() ?>" value="1" data-selector='{"id":"#allow-gift-messages-for-order-container-<?php echo $this->getEntity()->getId() ?>"}'<?php if($this->getEntityHasMessage()): ?> checked="checked"<?php endif; ?> class="checkbox" /> - <label for="allow_gift_messages_for_order"><?php echo __('Add gift options for the Entire Order') ?></label> - </p> - <div id="allow-gift-messages-for-order-container-<?php echo $this->getEntity()->getId() ?>"> - <p><?php echo __('You can leave this box empty if you don\'t want to add a gift message for this address.') ?></p> - <input type="hidden" name="giftmessage[<?php echo $this->getEntity()->getId() ?>][type]" value="quote_address" /> - <ul class="form-list"> - <li class="fields"> - <div class="field"> - <label for="gift-message-<?php echo $this->getEntity()->getId() ?>-from"><?php echo __('From') ?></label> - <div class="input-box"> - <input type="text" name="giftmessage[<?php echo $this->getEntity()->getId() ?>][from]" id="gift-message-<?php echo $this->getEntity()->getId() ?>-from" title="<?php echo __('From') ?>" value="<?php echo $this->getEscaped($this->getMessage()->getSender(), $this->getDefaultFrom()) ?>" class="input-text" /> + <fieldset id="add-gift-options-<?php echo $this->getEntity()->getId() ?>" class="fieldset gift message"> + <legend class="legend"><span><?php echo __('Do you have any gift items in your order?'); ?></span></legend><br> + + <div class="field choice" id="add-gift-options-<?php echo $this->getEntity()->getId() ?>"> + <input type="checkbox" name="allow_gift_options_<?php echo $this->getEntity()->getId() ?>" id="allow_gift_options_<?php echo $this->getEntity()->getId() ?>" value="1" data-selector='{"id":"#allow-gift-options-container-<?php echo $this->getEntity()->getId() ?>"}'<?php if($this->getItemsHasMesssages() || $this->getEntityHasMessage()): ?> checked="checked"<?php endif; ?> class="checkbox" /> + <label for="allow_gift_options_<?php echo $this->getEntity()->getId() ?>" class="label"><span><?php echo __('Add gift options') ?></span></label> + </div> + + <dl class="block items" id="allow-gift-options-container-<?php echo $this->getEntity()->getId() ?>"> + <dt id="add-gift-options-for-order-<?php echo $this->getEntity()->getId() ?>" class="order"> + <div class="title"><span><?php echo __('Gift Options for this address.'); ?></span></div> + <div class="field choice"> + <input type="checkbox" name="allow_gift_options_for_order_<?php echo $this->getEntity()->getId() ?>" id="allow_gift_options_for_order_<?php echo $this->getEntity()->getId() ?>" value="1" data-selector='{"id":"#allow-gift-options-for-order-container-<?php echo $this->getEntity()->getId() ?>"}'<?php if($this->getEntityHasMessage()): ?> checked="checked"<?php endif; ?> class="checkbox" /> + <label for="allow_gift_options_for_order_<?php echo $this->getEntity()->getId() ?>" class="label"><span><?php echo __('Add gift options for the Entire Order') ?></span></label> + </div> + </dt> + + <dd id="allow-gift-options-for-order-container-<?php echo $this->getEntity()->getId() ?>" class="options order"> + <div class="options-order-container" id="options-order-container-<?php echo $this->getEntity()->getId() ?>"></div> + <input type="hidden" name="giftoptions[<?php echo $this->getEntity()->getId() ?>][type]" value="quote_address" /> + <?php if ($this->isMessagesAvailable()): ?> + <?php $_giftMessage = true; ?> + <a href="#" class="activate message" data-mage-init='{toggleAdvanced: {selectorsToggleClass:"no-display", toggleContainers:"#gift-messages-for-order-container-<?php echo $this->getEntity()->getId() ?>"}}'><?php echo __('Gift Message') ?></a> + <div id="gift-messages-for-order-container-<?php echo $this->getEntity()->getId() ?>" class="block message no-display"> + <fieldset class="fieldset"> + <p><?php echo __('You can leave this box blank if you do not wish to add a gift message for this address.') ?></p> + <input type="hidden" name="giftmessage[<?php echo $this->getEntity()->getId() ?>][type]" value="quote_address" /> + <div class="field from"> + <label for="gift-message-<?php echo $this->getEntity()->getId() ?>-from" class="label"><span><?php echo __('From') ?></span></label> + <div class="control"> + <input type="text" name="giftmessage[<?php echo $this->getEntity()->getId() ?>][from]" id="gift-message-<?php echo $this->getEntity()->getId() ?>-from" title="<?php echo __('From') ?>" value="<?php echo $this->getEscaped($this->getMessage()->getSender(), $this->getDefaultFrom()) ?>" class="input-text"> + </div> </div> - </div> - <div class="field"> - <label for="gift-message-<?php echo $this->getEntity()->getId() ?>-to"><?php echo __('To') ?></label> - <div class="input-box"> - <input type="text" name="giftmessage[<?php echo $this->getEntity()->getId() ?>][to]" id="gift-message-<?php echo $this->getEntity()->getId() ?>-to" title="<?php echo __('To') ?>" value="<?php echo $this->getEscaped($this->getMessage()->getRecipient(), $this->getDefaultTo()) ?>" class="input-text" /> + <div class="field to"> + <label for="gift-message-<?php echo $this->getEntity()->getId() ?>-to" class="label"><span><?php echo __('To') ?></span></label> + <div class="control"> + <input type="text" name="giftmessage[<?php echo $this->getEntity()->getId() ?>][to]" id="gift-message-<?php echo $this->getEntity()->getId() ?>-to" title="<?php echo __('To') ?>" value="<?php echo $this->getEscaped($this->getMessage()->getRecipient(), $this->getDefaultTo()) ?>" class="input-text"> + </div> </div> - </div> - </li> - <li class="wide"> - <label for="gift-message-<?php echo $this->getEntity()->getId() ?>-message"><?php echo __('Message') ?></label> - <div class="input-box"> - <textarea id="gift-message-<?php echo $this->getEntity()->getId() ?>-message" class="input-text giftmessage-area" name="giftmessage[<?php echo $this->getEntity()->getId() ?>][message]" title="<?php echo __('Message') ?>" rows="5" cols="40"><?php echo $this->getEscaped($this->getMessage()->getMessage()) ?></textarea> - </div> - </li> - </ul> - </div> - <?php endif; ?> - <?php if($this->isItemsAvailable()): ?> - <h4><?php echo __('Gift Options for Individual Items'); ?></h4> - <p> - <input type="checkbox" name="allow_gift_messages_for_items_<?php echo $this->getEntity()->getId() ?>" id="allow_gift_messages_for_items_<?php echo $this->getEntity()->getId() ?>" value="1" data-selector='{"id":"#allow-gift-messages-for-items-container-<?php echo $this->getEntity()->getId() ?>"}'<?php if($this->getItemsHasMesssages()): ?> checked="checked"<?php endif; ?> class="checkbox" /> - <label for="allow_gift_messages_for_items_<?php echo $this->getEntity()->getId() ?>"><?php echo __('Add gift options for Individual Items') ?></label> - </p> - <div id="allow-gift-messages-for-items-container-<?php echo $this->getEntity()->getId() ?>"> - <p><?php echo __('You can leave this box empty if you don\'t want to add a gift message to this item.') ?></p> - <ol> - <?php foreach($this->getItems() as $_index=>$_item): ?> - <?php $_product=$_item->getProduct() ?> - <li class="item"> - <div class="product-img-box"> - <p class="product-image"><img src="<?php echo $this->getThumbnailUrl($_product) ?>" width="<?php echo $this->getThumbnailSize()?>" height="<?php echo $this->getThumbnailSize()?>" alt="<?php echo $this->escapeHtml($_product->getName()) ?>" title="<?php echo $this->escapeHtml($_product->getName()) ?>" /></p> + <div class="field text"> + <label for="gift-message-<?php echo $this->getEntity()->getId() ?>-message" class="label"><span><?php echo __('Message') ?></span></label> + <div class="control"> + <textarea id="gift-message-<?php echo $this->getEntity()->getId() ?>-message" class="input-text" name="giftmessage[<?php echo $this->getEntity()->getId() ?>][message]" title="<?php echo __('Message') ?>" rows="5" cols="40"><?php echo $this->getEscaped($this->getMessage()->getMessage()) ?></textarea> + </div> + </div> + </fieldset> + </div> + <?php endif; ?> + </dd> + + <?php if ($this->isItemsAvailable()): ?> + <dt id="add-gift-options-for-items-<?php echo $this->getEntity()->getId() ?>" class="individual"> + <div class="title"><span><?php echo __('Gift Options for Individual Items'); ?></span></div> + <div class="field choice"> + <input type="checkbox" name="allow_gift_options_for_items_<?php echo $this->getEntity()->getId() ?>" id="allow_gift_options_for_items_<?php echo $this->getEntity()->getId() ?>" value="1" data-selector='{"id":"#allow-gift-options-for-items-container-<?php echo $this->getEntity()->getId() ?>"}'<?php if($this->getItemsHasMesssages()): ?> checked="checked"<?php endif; ?> class="checkbox" /> + <label for="allow_gift_options_for_items_<?php echo $this->getEntity()->getId() ?>" class="label"><span><?php echo __('Add gift options for Individual Items') ?></span></label> + </div> + </dt> + + <dd id="allow-gift-options-for-items-container-<?php echo $this->getEntity()->getId() ?>" class="options individual"> + <ol> + <?php foreach($this->getItems() as $_index=>$_item): ?> + <?php $_product=$_item->getProduct() ?> + <li class="item"> <p class="number"><?php echo __('Item %1 of %2', $_index+1, $this->countItems()) ?></p> - </div> - <div class="details"> - <div class="f-fix"> - <input type="hidden" name="giftmessage[<?php echo $_item->getId() ?>][type]" value="quote_address_item" /> - <input type="hidden" name="giftmessage[<?php echo $_item->getId() ?>][address]" value="<?php echo $this->getEntity()->getId()?>" /> - <h5 class="product-name"><?php echo $this->escapeHtml($_product->getName()) ?></h5> - <ul class="form-list"> - <li class="fields"> - <div class="field"> - <label for="gift-message-<?php echo $_item->getId() ?>-from"><?php echo __('From') ?></label> - <div class="input-box"> - <input type="text" name="giftmessage[<?php echo $_item->getId() ?>][from]" id="gift-message-<?php echo $_item->getId() ?>-from" title="<?php echo __('From') ?>" value="<?php echo $this->getEscaped($this->getMessage($_item)->getSender(), $this->getDefaultFrom()) ?>" class="input-text" /> + <div class="product"> + <div class="img photo container"> + <img src="<?php echo $this->getThumbnailUrl($_product); ?>" + width="<?php echo $this->getThumbnailSize()?>" + height="<?php echo $this->getThumbnailSize()?>" + alt="<?php echo $this->escapeHtml($_product->getName()) ?>" + title="<?php echo $this->escapeHtml($_product->getName()) ?>" /> + </div> + <strong class="product name"><?php echo $this->escapeHtml($_product->getName()) ?></strong> + </div> + <div class="item options"> + <div class="options-items-container" id="options-items-container-<?php echo $this->getEntity()->getId() ?>-<?php echo $_item->getId() ?>"></div> + <input type="hidden" name="giftoptions[<?php echo $_item->getId() ?>][type]" value="quote_address_item" /> + <input type="hidden" name="giftoptions[<?php echo $_item->getId() ?>][address]" value="<?php echo $this->getEntity()->getId()?>" /> + + <?php if ($this->isItemMessagesAvailable($_item)): ?> + <?php $_giftMessage = true; ?> + <a href="#" class="activate message" data-mage-init='{toggleAdvanced: {selectorsToggleClass:"no-display", toggleContainers:"#gift-messages-for-item-container-<?php echo $_item->getId() ?>"}}'><?php echo __('Gift Message') ?></a> + <div id="gift-messages-for-item-container-<?php echo $_item->getId() ?>" class="block message no-display"> + <fieldset class="fieldset"> + <p><?php echo __('You can leave this box blank if you do not wish to add a gift message for the item.') ?></p> + <input type="hidden" name="giftmessage[<?php echo $_item->getId() ?>][type]" value="quote_address_item" /> + <input type="hidden" name="giftmessage[<?php echo $_item->getId() ?>][address]" value="<?php echo $this->getEntity()->getId()?>" /> + <div class="field from"> + <label for="gift-message-<?php echo $_item->getId() ?>-from" class="label"><span><?php echo __('From') ?></span></label> + <div class="control"> + <input type="text" name="giftmessage[<?php echo $_item->getId() ?>][from]" id="gift-message-<?php echo $_item->getId() ?>-from" title="<?php echo __('From') ?>" value="<?php echo $this->getEscaped($this->getMessage($_item)->getSender(), $this->getDefaultFrom()) ?>" class="input-text"> + </div> </div> - </div> - <div class="field"> - <label for="gift-message-<?php echo $_item->getId() ?>-to"><?php echo __('To') ?></label> - <div class="input-box"> - <input type="text" name="giftmessage[<?php echo $_item->getId() ?>][to]" id="gift-message-<?php echo $_item->getId() ?>-to" title="<?php echo __('To') ?>" value="<?php echo $this->getEscaped($this->getMessage($_item)->getRecipient(), $this->getDefaultTo()) ?>" class="input-text" /> + <div class="field to"> + <label for="gift-message-<?php echo $_item->getId() ?>-to" class="label"><span><?php echo __('To') ?></span></label> + <div class="control"> + <input type="text" name="giftmessage[<?php echo $_item->getId() ?>][to]" id="gift-message-<?php echo $_item->getId() ?>-to" title="<?php echo __('To') ?>" value="<?php echo $this->getEscaped($this->getMessage($_item)->getRecipient(), $this->getDefaultTo()) ?>" class="input-text"> + </div> + </div> + <div class="field text"> + <label for="gift-message-<?php echo $_item->getId() ?>-message" class="label"><span><?php echo __('Message') ?></span></label> + <div class="control"> + <textarea id="gift-message-<?php echo $_item->getId() ?>-message" class="input-text giftmessage-area" name="giftmessage[<?php echo $_item->getId() ?>][message]" title="<?php echo __('Message') ?>" rows="5" cols="10"><?php echo $this->getEscaped($this->getMessage($_item)->getMessage()) ?></textarea> + </div> </div> - </div> - </li> - <li class="wide"> - <label for="gift-message-<?php echo $_item->getId() ?>-message"><?php echo __('Message') ?></label> - <div class="input-box"> - <textarea id="gift-message-<?php echo $_item->getId() ?>-message" class="input-text giftmessage-area" name="giftmessage[<?php echo $_item->getId() ?>][message]" title="<?php echo __('Message') ?>" rows="5" cols="10"><?php echo $this->getEscaped($this->getMessage($_item)->getMessage()) ?></textarea> - </div> - </li> - </ul> + </fieldset> + </div> + <?php endif; ?> </div> - </div> - </li> - <?php endforeach; ?> - </ol> - </div> + </li> + <?php endforeach; ?> + </ol> + </dd> <?php endif; ?> - </div> - </div> + <dt class="extra-options-container" id="extra-options-container-<?php echo $this->getEntity()->getId() ?>"></dt> + </dl> + </fieldset> <script type="text/javascript"> (function($) { $(function() { head.js("<?php echo $this->getViewFileUrl('Magento_GiftMessage::gift-options.js')?>", function() { - $('#allow_gift_messages_<?php echo $this->getEntity()->getId() ?>') - .add('#allow_gift_messages_for_order_<?php echo $this->getEntity()->getId() ?>') - .add('#allow_gift_messages_for_items_<?php echo $this->getEntity()->getId() ?>').giftOptions(); + $('#allow_gift_options_<?php echo $this->getEntity()->getId() ?>') + .add('#allow_gift_options_for_order_<?php echo $this->getEntity()->getId() ?>') + .add('#allow_gift_options_for_items_<?php echo $this->getEntity()->getId() ?>').giftOptions(); }); }); })(jQuery); </script> <?php break; ?> <?php endswitch ?> +<?php if ($_giftMessage): ?> <script type="text/javascript"> head.js("<?php echo $this->getViewFileUrl('jquery/jquery.validate.js')?>", "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js')?>", diff --git a/app/code/Magento/GoogleAdwords/Block/Code.php b/app/code/Magento/GoogleAdwords/Block/Code.php index 8e56e7b55baacdb512d291342adf77b15092f70d..93012f878986a1eb2fe7d54a67975393bfa247c5 100644 --- a/app/code/Magento/GoogleAdwords/Block/Code.php +++ b/app/code/Magento/GoogleAdwords/Block/Code.php @@ -25,7 +25,7 @@ */ namespace Magento\GoogleAdwords\Block; -class Code extends \Magento\Core\Block\Template +class Code extends \Magento\View\Block\Template { /** * @var \Magento\GoogleAdwords\Helper\Data @@ -33,19 +33,19 @@ class Code extends \Magento\Core\Block\Template protected $_googleAdwordsData; /** - * @param \Magento\GoogleAdwords\Helper\Data $googleAdwordsData + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context + * @param \Magento\GoogleAdwords\Helper\Data $googleAdwordsData * @param array $data */ public function __construct( - \Magento\GoogleAdwords\Helper\Data $googleAdwordsData, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, + \Magento\GoogleAdwords\Helper\Data $googleAdwordsData, array $data = array() ) { $this->_googleAdwordsData = $googleAdwordsData; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/GoogleAdwords/Helper/Data.php b/app/code/Magento/GoogleAdwords/Helper/Data.php index 29fa546e0a74e74e86fe02c3a04581396a3f1f51..f393ea12d98ca0ae4d5ec76c0dc837cd27a5adc1 100644 --- a/app/code/Magento/GoogleAdwords/Helper/Data.php +++ b/app/code/Magento/GoogleAdwords/Helper/Data.php @@ -25,7 +25,7 @@ */ namespace Magento\GoogleAdwords\Helper; -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { /**#@+ * Google AdWords language codes @@ -87,13 +87,13 @@ class Data extends \Magento\Core\Helper\AbstractHelper protected $_registry; /** - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\Config $config * @param \Magento\Core\Model\Store\ConfigInterface $storeConfig * @param \Magento\Core\Model\Registry $registry */ public function __construct( - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Core\Model\Config $config, \Magento\Core\Model\Store\ConfigInterface $storeConfig, \Magento\Core\Model\Registry $registry diff --git a/app/code/Magento/GoogleAdwords/Model/Config/Backend/AbstractConversion.php b/app/code/Magento/GoogleAdwords/Model/Config/Backend/AbstractConversion.php index ae3b79c970a9a90437f73fa30c9fd9dda91dc631..7a6ad0e8307498302c9de29a8252dad590bc85f7 100644 --- a/app/code/Magento/GoogleAdwords/Model/Config/Backend/AbstractConversion.php +++ b/app/code/Magento/GoogleAdwords/Model/Config/Backend/AbstractConversion.php @@ -43,7 +43,7 @@ abstract class AbstractConversion extends \Magento\Core\Model\Config\Value /** * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Config $config * @param \Magento\Validator\Composite\VarienObjectFactory $validatorCompositeFactory * @param \Magento\GoogleAdwords\Model\Validator\Factory $validatorFactory @@ -53,7 +53,7 @@ abstract class AbstractConversion extends \Magento\Core\Model\Config\Value public function __construct( \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Config $config, \Magento\Validator\Composite\VarienObjectFactory $validatorCompositeFactory, \Magento\GoogleAdwords\Model\Validator\Factory $validatorFactory, diff --git a/app/code/Magento/GoogleAnalytics/Block/Ga.php b/app/code/Magento/GoogleAnalytics/Block/Ga.php index 49ac1a50985086148cd0b6265f1e7881b97ba856..34d45f11ab198633b58142ed5cc26cae836a53ba 100644 --- a/app/code/Magento/GoogleAnalytics/Block/Ga.php +++ b/app/code/Magento/GoogleAnalytics/Block/Ga.php @@ -34,7 +34,7 @@ */ namespace Magento\GoogleAnalytics\Block; -class Ga extends \Magento\Core\Block\Template +class Ga extends \Magento\View\Block\Template { /** * Google analytics data @@ -43,36 +43,28 @@ class Ga extends \Magento\Core\Block\Template */ protected $_googleAnalyticsData = null; - /** - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - /** * @var \Magento\Sales\Model\Resource\Order\CollectionFactory */ protected $_salesOrderCollection; /** - * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\View\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Sales\Model\Resource\Order\CollectionFactory $salesOrderCollection * @param \Magento\GoogleAnalytics\Helper\Data $googleAnalyticsData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param array $data */ public function __construct( - \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\View\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Sales\Model\Resource\Order\CollectionFactory $salesOrderCollection, \Magento\GoogleAnalytics\Helper\Data $googleAnalyticsData, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, array $data = array() ) { $this->_googleAnalyticsData = $googleAnalyticsData; $this->_salesOrderCollection = $salesOrderCollection; - $this->_storeManager = $storeManager; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/GoogleAnalytics/Helper/Data.php b/app/code/Magento/GoogleAnalytics/Helper/Data.php index 57d25e0fd0a9016f5d95dfe3063d97d2701312d2..3991c1c9a332e9f20a5d58175d5421cd75ea6318 100644 --- a/app/code/Magento/GoogleAnalytics/Helper/Data.php +++ b/app/code/Magento/GoogleAnalytics/Helper/Data.php @@ -33,7 +33,7 @@ */ namespace Magento\GoogleAnalytics\Helper; -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { /** * Config paths for using throughout the code @@ -49,11 +49,11 @@ class Data extends \Magento\Core\Helper\AbstractHelper protected $_coreStoreConfig; /** - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\Store\Config $coreStoreConfig */ public function __construct( - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Core\Model\Store\Config $coreStoreConfig ) { $this->_coreStoreConfig = $coreStoreConfig; diff --git a/app/code/Magento/GoogleAnalytics/Model/Observer.php b/app/code/Magento/GoogleAnalytics/Model/Observer.php index ef72ff212b345f6df05349dc46b8ba177016e77a..4e3b0c7911d6a4a94fe77f4340138e69d52b1aa8 100644 --- a/app/code/Magento/GoogleAnalytics/Model/Observer.php +++ b/app/code/Magento/GoogleAnalytics/Model/Observer.php @@ -49,9 +49,9 @@ class Observer protected $_googleAnalyticsData = null; /** - * @var \Magento\Core\Model\App + * @var \Magento\Core\Model\Layout */ - protected $_application; + protected $_layout; /** * @var \Magento\Core\Model\StoreManagerInterface @@ -60,16 +60,16 @@ class Observer /** * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\App $application + * @param \Magento\Core\Model\Layout $layout * @param \Magento\GoogleAnalytics\Helper\Data $googleAnalyticsData */ public function __construct( \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\App $application, + \Magento\Core\Model\Layout $layout, \Magento\GoogleAnalytics\Helper\Data $googleAnalyticsData ) { $this->_googleAnalyticsData = $googleAnalyticsData; - $this->_application = $application; + $this->_layout = $layout; $this->_storeManager = $storeManager; } @@ -84,7 +84,7 @@ class Observer if (empty($orderIds) || !is_array($orderIds)) { return; } - $block = $this->_application->getFrontController()->getAction()->getLayout()->getBlock('google_analytics'); + $block = $this->_layout->getBlock('google_analytics'); if ($block) { $block->setOrderIds($orderIds); } diff --git a/app/code/Magento/GoogleCheckout/Block/Adminhtml/Shipping/Merchant.php b/app/code/Magento/GoogleCheckout/Block/Adminhtml/Shipping/Merchant.php index 484498d391535ddc12ea3e38519db5b57df86fab..6da2a334f8c05dc471598ba4f55aa13466e233bd 100644 --- a/app/code/Magento/GoogleCheckout/Block/Adminhtml/Shipping/Merchant.php +++ b/app/code/Magento/GoogleCheckout/Block/Adminhtml/Shipping/Merchant.php @@ -47,28 +47,26 @@ class Merchant */ protected $shippingConfig; - /** - * @param \Magento\Core\Model\Website\Factory $websiteFactory - * @param \Magento\Core\Model\StoreFactory $storeFactory - * @param \Magento\Shipping\Model\Config $shippingConfig - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\App $application - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Website\Factory $websiteFactory + * @param \Magento\Core\Model\StoreFactory $storeFactory + * @param \Magento\Shipping\Model\Config $shippingConfig + * @param array $data */ - public function __construct( - \Magento\Core\Model\Website\Factory $websiteFactory, - \Magento\Core\Model\StoreFactory $storeFactory, - \Magento\Shipping\Model\Config $shippingConfig, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\App $application, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Website\Factory $websiteFactory, + \Magento\Core\Model\StoreFactory $storeFactory, + \Magento\Shipping\Model\Config $shippingConfig, + array $data = array() + ) { $this->websiteFactory = $websiteFactory; $this->storeFactory = $storeFactory; $this->shippingConfig = $shippingConfig; - parent::__construct($coreData, $context, $application, $data); + parent::__construct($context, $coreData, $data); } protected function _getElementHtml(\Magento\Data\Form\Element\AbstractElement $element) diff --git a/app/code/Magento/GoogleCheckout/Block/Link.php b/app/code/Magento/GoogleCheckout/Block/Link.php index f53c324247ff9bf0927f1e702789a7e65ebb5993..72d178489b5c2c4c95ad5189829d416a2b53bf78 100644 --- a/app/code/Magento/GoogleCheckout/Block/Link.php +++ b/app/code/Magento/GoogleCheckout/Block/Link.php @@ -33,7 +33,7 @@ */ namespace Magento\GoogleCheckout\Block; -class Link extends \Magento\Core\Block\Template +class Link extends \Magento\View\Block\Template { /** * @var \Magento\Checkout\Model\Session @@ -46,22 +46,22 @@ class Link extends \Magento\Core\Block\Template protected $paymentFactory; /** + * @param \Magento\View\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\GoogleCheckout\Model\PaymentFactory $paymentFactory * @param \Magento\Checkout\Model\Session $checkoutSession - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\GoogleCheckout\Model\PaymentFactory $paymentFactory, \Magento\Checkout\Model\Session $checkoutSession, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, array $data = array() ) { $this->paymentFactory = $paymentFactory; $this->checkoutSession = $checkoutSession; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } public function getImageStyle() diff --git a/app/code/Magento/GoogleCheckout/Controller/Api.php b/app/code/Magento/GoogleCheckout/Controller/Api.php index 2e39887fc57ccb517706586ec98db3619b1ef7f6..0831a5ab600b828076cd395dc12260d5c7621094 100644 --- a/app/code/Magento/GoogleCheckout/Controller/Api.php +++ b/app/code/Magento/GoogleCheckout/Controller/Api.php @@ -26,13 +26,13 @@ namespace Magento\GoogleCheckout\Controller; -class Api extends \Magento\Core\Controller\Front\Action +class Api extends \Magento\App\Action\Action { public function indexAction() { $res = $this->_objectManager->create('Magento\GoogleCheckout\Model\Api')->processCallback(); if ($res === false) { - $this->_forward('noRoute'); + $this->_forward('noroute'); } else { exit; } diff --git a/app/code/Magento/GoogleCheckout/Controller/Redirect.php b/app/code/Magento/GoogleCheckout/Controller/Redirect.php index 6d8e7c9b39ce050a1fb107432ad32cbcad088cad..20d624793ff1f4dcf8fbfe23192beba0c012e06f 100644 --- a/app/code/Magento/GoogleCheckout/Controller/Redirect.php +++ b/app/code/Magento/GoogleCheckout/Controller/Redirect.php @@ -31,7 +31,7 @@ */ namespace Magento\GoogleCheckout\Controller; -class Redirect extends \Magento\Core\Controller\Front\Action +class Redirect extends \Magento\App\Action\Action { /** * Send request to Google Checkout and return Response Api @@ -125,9 +125,9 @@ class Redirect extends \Magento\Core\Controller\Front\Action return; } else { $url = $api->getRedirectUrl(); - $this->loadLayout(); - $this->getLayout()->getBlock('googlecheckout_redirect')->setRedirectUrl($url); - $this->renderLayout(); + $this->_view->loadLayout(); + $this->_view->getLayout()->getBlock('googlecheckout_redirect')->setRedirectUrl($url); + $this->_view->renderLayout(); } } @@ -179,7 +179,7 @@ class Redirect extends \Magento\Core\Controller\Front\Action */ public function redirectLogin() { - $this->setFlag('', 'no-dispatch', true); + $this->_actionFlag->set('', 'no-dispatch', true); $this->getResponse()->setRedirect( $this->_objectManager->get('Magento\Core\Helper\Url')->addRequestParam( $this->_objectManager->get('Magento\Customer\Helper\Data')->getLoginUrl(), diff --git a/app/code/Magento/GoogleCheckout/Helper/Data.php b/app/code/Magento/GoogleCheckout/Helper/Data.php index f65dc25f34209122b732ccecc172a88e5a5fd09e..06d1364c24998d6afdaa3f8ea5ec065316b84974 100644 --- a/app/code/Magento/GoogleCheckout/Helper/Data.php +++ b/app/code/Magento/GoogleCheckout/Helper/Data.php @@ -29,7 +29,7 @@ */ namespace Magento\GoogleCheckout\Helper; -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { /** * Google Checkout settings @@ -81,11 +81,11 @@ class Data extends \Magento\Core\Helper\AbstractHelper protected $_coreStoreConfig; /** - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\Store\Config $coreStoreConfig */ public function __construct( - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Core\Model\Store\Config $coreStoreConfig ) { $this->_coreStoreConfig = $coreStoreConfig; diff --git a/app/code/Magento/GoogleOptimizer/Block/AbstractCode.php b/app/code/Magento/GoogleOptimizer/Block/AbstractCode.php index f6fcd8318f6b8d7ef02a3c0db0bafbadb063978d..693ad5078d01ee93a7711949b86a4eafc1aa2f7b 100644 --- a/app/code/Magento/GoogleOptimizer/Block/AbstractCode.php +++ b/app/code/Magento/GoogleOptimizer/Block/AbstractCode.php @@ -25,7 +25,7 @@ */ namespace Magento\GoogleOptimizer\Block; -abstract class AbstractCode extends \Magento\Core\Block\Template +abstract class AbstractCode extends \Magento\View\Block\Template { /** * @var Entity name in registry @@ -48,16 +48,16 @@ abstract class AbstractCode extends \Magento\Core\Block\Template protected $_codeHelper; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\GoogleOptimizer\Helper\Data $helper * @param \Magento\Core\Model\Registry $registry * @param \Magento\GoogleOptimizer\Helper\Code $codeHelper * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\GoogleOptimizer\Helper\Data $helper, \Magento\Core\Model\Registry $registry, \Magento\GoogleOptimizer\Helper\Code $codeHelper, @@ -66,7 +66,7 @@ abstract class AbstractCode extends \Magento\Core\Block\Template $this->_helper = $helper; $this->_registry = $registry; $this->_codeHelper = $codeHelper; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/GoogleOptimizer/Block/Adminhtml/AbstractTab.php b/app/code/Magento/GoogleOptimizer/Block/Adminhtml/AbstractTab.php index e231365284dc71996cc3ea1c35536b32f5f2d303..c1ba7ddc5fc2225056b26c212ac3f7892cd64fbd 100644 --- a/app/code/Magento/GoogleOptimizer/Block/Adminhtml/AbstractTab.php +++ b/app/code/Magento/GoogleOptimizer/Block/Adminhtml/AbstractTab.php @@ -48,27 +48,27 @@ abstract class AbstractTab */ protected $_formHelper; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\GoogleOptimizer\Helper\Data $helperData - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\GoogleOptimizer\Helper\Code $codeHelper - * @param \Magento\GoogleOptimizer\Helper\Form $formHelper - * @param \Magento\Data\FormFactory $formFactory - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\GoogleOptimizer\Helper\Data $helperData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\GoogleOptimizer\Helper\Code $codeHelper + * @param \Magento\GoogleOptimizer\Helper\Form $formHelper + * @param \Magento\Data\FormFactory $formFactory + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\GoogleOptimizer\Helper\Data $helperData, - \Magento\Core\Model\Registry $registry, - \Magento\GoogleOptimizer\Helper\Code $codeHelper, - \Magento\GoogleOptimizer\Helper\Form $formHelper, - \Magento\Data\FormFactory $formFactory, - array $data = array() - ) { - parent::__construct($coreData, $context, $data); + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\GoogleOptimizer\Helper\Data $helperData, + \Magento\Core\Model\Registry $registry, + \Magento\GoogleOptimizer\Helper\Code $codeHelper, + \Magento\GoogleOptimizer\Helper\Form $formHelper, + \Magento\Data\FormFactory $formFactory, + array $data = array() + ) { + parent::__construct($context, $coreData, $data); $this->_helperData = $helperData; $this->_registry = $registry; diff --git a/app/code/Magento/GoogleOptimizer/Block/Adminhtml/Catalog/Category/Edit/Tab/Googleoptimizer.php b/app/code/Magento/GoogleOptimizer/Block/Adminhtml/Catalog/Category/Edit/Tab/Googleoptimizer.php index 95ff1139a026e0c290c8a14a39cf75124d248a91..ec00f51d5bde705a3d36a0ca7c24ed281608890b 100644 --- a/app/code/Magento/GoogleOptimizer/Block/Adminhtml/Catalog/Category/Edit/Tab/Googleoptimizer.php +++ b/app/code/Magento/GoogleOptimizer/Block/Adminhtml/Catalog/Category/Edit/Tab/Googleoptimizer.php @@ -43,25 +43,25 @@ class Googleoptimizer */ protected $_formHelper; - /** - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\GoogleOptimizer\Helper\Code $codeHelper - * @param \Magento\GoogleOptimizer\Helper\Form $formHelper - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\GoogleOptimizer\Helper\Code $codeHelper + * @param \Magento\GoogleOptimizer\Helper\Form $formHelper + * @param array $data */ - public function __construct( - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\GoogleOptimizer\Helper\Code $codeHelper, - \Magento\GoogleOptimizer\Helper\Form $formHelper, - array $data = array() - ) { - parent::__construct($registry, $formFactory, $coreData, $context, $data); + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\GoogleOptimizer\Helper\Code $codeHelper, + \Magento\GoogleOptimizer\Helper\Form $formHelper, + array $data = array() + ) { + parent::__construct($context, $coreData, $registry, $formFactory, $data); $this->_codeHelper = $codeHelper; $this->_formHelper = $formHelper; diff --git a/app/code/Magento/GoogleOptimizer/Block/Code/Page.php b/app/code/Magento/GoogleOptimizer/Block/Code/Page.php index c9b199f617ca99c2004f76b522e425cfab69d894..1c1f9b3498569035c3604d72f309e79bd4f03def 100644 --- a/app/code/Magento/GoogleOptimizer/Block/Code/Page.php +++ b/app/code/Magento/GoogleOptimizer/Block/Code/Page.php @@ -33,8 +33,8 @@ class Page extends \Magento\GoogleOptimizer\Block\AbstractCode protected $_page; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\GoogleOptimizer\Helper\Data $helper * @param \Magento\Core\Model\Registry $registry * @param \Magento\GoogleOptimizer\Helper\Code $codeHelper @@ -42,8 +42,8 @@ class Page extends \Magento\GoogleOptimizer\Block\AbstractCode * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\GoogleOptimizer\Helper\Data $helper, \Magento\Core\Model\Registry $registry, \Magento\GoogleOptimizer\Helper\Code $codeHelper, @@ -52,7 +52,7 @@ class Page extends \Magento\GoogleOptimizer\Block\AbstractCode ) { // \Magento\Cms\Model\Page is singleton $this->_page = $page; - parent::__construct($coreData, $context, $helper, $registry, $codeHelper, $data); + parent::__construct($context, $coreData, $helper, $registry, $codeHelper, $data); } /** diff --git a/app/code/Magento/GoogleOptimizer/Helper/Data.php b/app/code/Magento/GoogleOptimizer/Helper/Data.php index a58f69746e92fce0f295b124167ccb3213e202df..55023406fc12b0bf46f1b0a68843fc2723233115 100644 --- a/app/code/Magento/GoogleOptimizer/Helper/Data.php +++ b/app/code/Magento/GoogleOptimizer/Helper/Data.php @@ -25,7 +25,7 @@ */ namespace Magento\GoogleOptimizer\Helper; -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { /** * Xml path google experiments enabled @@ -48,12 +48,12 @@ class Data extends \Magento\Core\Helper\AbstractHelper protected $_analyticsHelper; /** - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\Store\ConfigInterface $storeConfig * @param \Magento\GoogleAnalytics\Helper\Data $analyticsHelper */ public function __construct( - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Core\Model\Store\ConfigInterface $storeConfig, \Magento\GoogleAnalytics\Helper\Data $analyticsHelper ) { diff --git a/app/code/Magento/GoogleOptimizer/Helper/Form.php b/app/code/Magento/GoogleOptimizer/Helper/Form.php index dfbf27c44f17c1a6d6507c9e1b6f2cfe3fc365e4..dd0a3eacf5ff0195bb5facc1b870881a75977953 100644 --- a/app/code/Magento/GoogleOptimizer/Helper/Form.php +++ b/app/code/Magento/GoogleOptimizer/Helper/Form.php @@ -25,7 +25,7 @@ */ namespace Magento\GoogleOptimizer\Helper; -class Form extends \Magento\Core\Helper\AbstractHelper +class Form extends \Magento\App\Helper\AbstractHelper { /** * Prepare form diff --git a/app/code/Magento/GoogleShopping/Block/Adminhtml/Items.php b/app/code/Magento/GoogleShopping/Block/Adminhtml/Items.php index 36680cc9012c1025ac10abece6d7f96249ca9cfe..d522b25b1625b30a804c1bd74523992b9ddd5e32 100644 --- a/app/code/Magento/GoogleShopping/Block/Adminhtml/Items.php +++ b/app/code/Magento/GoogleShopping/Block/Adminhtml/Items.php @@ -45,20 +45,20 @@ class Items extends \Magento\Adminhtml\Block\Widget\Grid\Container */ protected $_flagFactory; - /** - * @param \Magento\GoogleShopping\Model\FlagFactory $flagFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\GoogleShopping\Model\FlagFactory $flagFactory + * @param array $data */ - public function __construct( - \Magento\GoogleShopping\Model\FlagFactory $flagFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\GoogleShopping\Model\FlagFactory $flagFactory, + array $data = array() + ) { $this->_flagFactory = $flagFactory; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } diff --git a/app/code/Magento/GoogleShopping/Block/Adminhtml/Items/Item.php b/app/code/Magento/GoogleShopping/Block/Adminhtml/Items/Item.php index 650bafa54f0b352d807d85ed94312cca21f9ef63..0bce35e6c9c80d5c01b6d2da901b1f95eab0afda 100644 --- a/app/code/Magento/GoogleShopping/Block/Adminhtml/Items/Item.php +++ b/app/code/Magento/GoogleShopping/Block/Adminhtml/Items/Item.php @@ -42,24 +42,22 @@ class Item extends \Magento\Backend\Block\Widget\Grid\Extended */ protected $_collectionFactory; - /** - * @param \Magento\GoogleShopping\Model\Resource\Item\CollectionFactory $collectionFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\GoogleShopping\Model\Resource\Item\CollectionFactory $collectionFactory + * @param array $data */ - public function __construct( - \Magento\GoogleShopping\Model\Resource\Item\CollectionFactory $collectionFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\GoogleShopping\Model\Resource\Item\CollectionFactory $collectionFactory, + array $data = array() + ) { $this->_collectionFactory = $collectionFactory; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $data); } protected function _construct() diff --git a/app/code/Magento/GoogleShopping/Block/Adminhtml/Items/Product.php b/app/code/Magento/GoogleShopping/Block/Adminhtml/Items/Product.php index 4bc78c52d07735f9f34e4a83fb7b393dc093584d..ace0afd8b60890b10fd78552f90800bbf69ceddf 100644 --- a/app/code/Magento/GoogleShopping/Block/Adminhtml/Items/Product.php +++ b/app/code/Magento/GoogleShopping/Block/Adminhtml/Items/Product.php @@ -63,33 +63,31 @@ class Product extends \Magento\Backend\Block\Widget\Grid\Extended */ protected $_itemCollectionFactory; - /** - * @param \Magento\GoogleShopping\Model\Resource\Item\CollectionFactory $itemCollectionFactory - * @param \Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory $eavCollectionFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param \Magento\Catalog\Model\Product\Type $productType - * @param \Magento\Catalog\Model\ProductFactory $productFactory - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\GoogleShopping\Model\Resource\Item\CollectionFactory $itemCollectionFactory + * @param \Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory $eavCollectionFactory + * @param \Magento\Catalog\Model\Product\Type $productType + * @param \Magento\Catalog\Model\ProductFactory $productFactory + * @param array $data */ - public function __construct( - \Magento\GoogleShopping\Model\Resource\Item\CollectionFactory $itemCollectionFactory, - \Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory $eavCollectionFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - \Magento\Catalog\Model\Product\Type $productType, - \Magento\Catalog\Model\ProductFactory $productFactory, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\GoogleShopping\Model\Resource\Item\CollectionFactory $itemCollectionFactory, + \Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory $eavCollectionFactory, + \Magento\Catalog\Model\Product\Type $productType, + \Magento\Catalog\Model\ProductFactory $productFactory, + array $data = array() + ) { $this->_itemCollectionFactory = $itemCollectionFactory; $this->_eavCollectionFactory = $eavCollectionFactory; $this->_productType = $productType; $this->_productFactory = $productFactory; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $data); } protected function _construct() diff --git a/app/code/Magento/GoogleShopping/Block/Adminhtml/Types/Edit.php b/app/code/Magento/GoogleShopping/Block/Adminhtml/Types/Edit.php index 03b30fdcdf379553e8a9f155491653bf7ec879d7..918564669a5334af3c25eabec74d8c9429467054 100644 --- a/app/code/Magento/GoogleShopping/Block/Adminhtml/Types/Edit.php +++ b/app/code/Magento/GoogleShopping/Block/Adminhtml/Types/Edit.php @@ -39,20 +39,20 @@ class Edit extends \Magento\Adminhtml\Block\Widget\Form\Container */ protected $_coreRegistry = null; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _construct() @@ -78,7 +78,7 @@ class Edit extends \Magento\Adminhtml\Block\Widget\Form\Container */ public function getFormInitScripts() { - return $this->getLayout()->createBlock('Magento\Core\Block\Template') + return $this->getLayout()->createBlock('Magento\View\Block\Template') ->setTemplate('Magento_GoogleShopping::types/edit.phtml') ->toHtml(); } diff --git a/app/code/Magento/GoogleShopping/Block/Adminhtml/Types/Edit/Attributes.php b/app/code/Magento/GoogleShopping/Block/Adminhtml/Types/Edit/Attributes.php index 663b9036c912fb07c5d4332ca69cc499f57bfbfc..3f9731d8953f9dfa6aeb1113dace40eb98d521a7 100644 --- a/app/code/Magento/GoogleShopping/Block/Adminhtml/Types/Edit/Attributes.php +++ b/app/code/Magento/GoogleShopping/Block/Adminhtml/Types/Edit/Attributes.php @@ -53,30 +53,30 @@ class Attributes */ protected $_attributeFactory; - /** - * @param \Magento\GoogleShopping\Model\Config $config - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\GoogleShopping\Model\AttributeFactory $attributeFactory - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\GoogleShopping\Model\Config $config + * @param \Magento\GoogleShopping\Model\AttributeFactory $attributeFactory + * @param array $data */ - public function __construct( - \Magento\GoogleShopping\Model\Config $config, - \Magento\Core\Helper\Data $coreData, - \Magento\GoogleShopping\Model\AttributeFactory $attributeFactory, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\GoogleShopping\Model\Config $config, + \Magento\GoogleShopping\Model\AttributeFactory $attributeFactory, + array $data = array() + ) { $this->_config = $config; $this->_attributeFactory = $attributeFactory; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** * Preparing global layout * - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ protected function _prepareLayout() { diff --git a/app/code/Magento/GoogleShopping/Block/Adminhtml/Types/Edit/Form.php b/app/code/Magento/GoogleShopping/Block/Adminhtml/Types/Edit/Form.php index dd2fa9a326ad5ba858e288503298a0f1bf456972..faad94c018b96e241e211d9da21ae5bb185b0878 100644 --- a/app/code/Magento/GoogleShopping/Block/Adminhtml/Types/Edit/Form.php +++ b/app/code/Magento/GoogleShopping/Block/Adminhtml/Types/Edit/Form.php @@ -82,32 +82,32 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic */ protected $_typeCollectionFactory; - /** - * @param \Magento\GoogleShopping\Model\Resource\Type\CollectionFactory $typeCollectionFactory - * @param \Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory $eavCollectionFactory - * @param \Magento\Catalog\Model\ProductFactory $productFactory - * @param \Magento\GoogleShopping\Model\Config $config - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Data\Form\Element\Factory $elementFactory - * @param \Magento\GoogleShopping\Helper\Category $googleShoppingCategory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\GoogleShopping\Model\Resource\Type\CollectionFactory $typeCollectionFactory + * @param \Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory $eavCollectionFactory + * @param \Magento\Catalog\Model\ProductFactory $productFactory + * @param \Magento\GoogleShopping\Model\Config $config + * @param \Magento\Data\Form\Element\Factory $elementFactory + * @param \Magento\GoogleShopping\Helper\Category $googleShoppingCategory + * @param array $data */ - public function __construct( - \Magento\GoogleShopping\Model\Resource\Type\CollectionFactory $typeCollectionFactory, - \Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory $eavCollectionFactory, - \Magento\Catalog\Model\ProductFactory $productFactory, - \Magento\GoogleShopping\Model\Config $config, - \Magento\Data\FormFactory $formFactory, - \Magento\Data\Form\Element\Factory $elementFactory, - \Magento\GoogleShopping\Helper\Category $googleShoppingCategory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\GoogleShopping\Model\Resource\Type\CollectionFactory $typeCollectionFactory, + \Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory $eavCollectionFactory, + \Magento\Catalog\Model\ProductFactory $productFactory, + \Magento\GoogleShopping\Model\Config $config, + \Magento\Data\Form\Element\Factory $elementFactory, + \Magento\GoogleShopping\Helper\Category $googleShoppingCategory, + array $data = array() + ) { $this->_typeCollectionFactory = $typeCollectionFactory; $this->_eavCollectionFactory = $eavCollectionFactory; $this->_productFactory = $productFactory; @@ -116,7 +116,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic $this->_googleShoppingCategory = $googleShoppingCategory; $this->_elementFactory = $elementFactory; $this->_formFactory = $formFactory; - parent::__construct($registry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); } /** diff --git a/app/code/Magento/GoogleShopping/Block/Adminhtml/Types/Renderer/Country.php b/app/code/Magento/GoogleShopping/Block/Adminhtml/Types/Renderer/Country.php index 5d5a00e79b367a890f46bf31610b642f6e5d3e7e..7a305fe0e03952710224386635f0ee9c616a50b8 100644 --- a/app/code/Magento/GoogleShopping/Block/Adminhtml/Types/Renderer/Country.php +++ b/app/code/Magento/GoogleShopping/Block/Adminhtml/Types/Renderer/Country.php @@ -44,16 +44,16 @@ class Country */ protected $_config; - /** - * @param \Magento\GoogleShopping\Model\Config $config - * @param \Magento\Backend\Block\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Context $context + * @param \Magento\GoogleShopping\Model\Config $config + * @param array $data */ - public function __construct( - \Magento\GoogleShopping\Model\Config $config, - \Magento\Backend\Block\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Context $context, + \Magento\GoogleShopping\Model\Config $config, + array $data = array() + ) { $this->_config = $config; parent::__construct($context, $data); } diff --git a/app/code/Magento/GoogleShopping/Block/SiteVerification.php b/app/code/Magento/GoogleShopping/Block/SiteVerification.php index eb71cde1ce096b8ee6c47cc52f90aa20854c7c9c..6028202a2ef74474f1826246feca4bfc9e19897e 100644 --- a/app/code/Magento/GoogleShopping/Block/SiteVerification.php +++ b/app/code/Magento/GoogleShopping/Block/SiteVerification.php @@ -27,18 +27,18 @@ namespace Magento\GoogleShopping\Block; /** * Google site verification <meta> tag */ -class SiteVerification extends \Magento\Core\Block\AbstractBlock +class SiteVerification extends \Magento\View\Block\AbstractBlock { /** @var \Magento\GoogleShopping\Model\Config */ protected $_config; /** - * @param \Magento\Core\Block\Context $context + * @param \Magento\View\Block\Context $context * @param \Magento\GoogleShopping\Model\Config $config * @param array $data */ public function __construct( - \Magento\Core\Block\Context $context, + \Magento\View\Block\Context $context, \Magento\GoogleShopping\Model\Config $config, array $data = array() ) { diff --git a/app/code/Magento/GoogleShopping/Controller/Adminhtml/Googleshopping/Items.php b/app/code/Magento/GoogleShopping/Controller/Adminhtml/Googleshopping/Items.php index 2506da12f33b7b7db31d87a261ec3546f4dd530a..377d6ddfaa8a6b68b38f2f50a84ef568af640737 100644 --- a/app/code/Magento/GoogleShopping/Controller/Adminhtml/Googleshopping/Items.php +++ b/app/code/Magento/GoogleShopping/Controller/Adminhtml/Googleshopping/Items.php @@ -31,10 +31,10 @@ * @package Magento_GoogleShopping * @name \Magento\GoogleShopping\Controller\Adminhtml\Googleshopping\Items * @author Magento Core Team <core@magentocommerce.com> -*/ + */ namespace Magento\GoogleShopping\Controller\Adminhtml\Googleshopping; -class Items extends \Magento\Backend\Controller\Adminhtml\Action +class Items extends \Magento\Backend\App\Action { /** * Initialize general settings for action @@ -43,8 +43,8 @@ class Items extends \Magento\Backend\Controller\Adminhtml\Action */ protected function _initAction() { - $this->loadLayout() - ->_setActiveMenu('Magento_GoogleShopping::catalog_googleshopping_items') + $this->_view->loadLayout(); + $this->_setActiveMenu('Magento_GoogleShopping::catalog_googleshopping_items') ->_addBreadcrumb(__('Catalog'), __('Catalog')) ->_addBreadcrumb(__('Google Content'), __('Google Content')); return $this; @@ -55,7 +55,7 @@ class Items extends \Magento\Backend\Controller\Adminhtml\Action */ public function indexAction() { - $this->_title(__('Google Content Items')); + $this->_title->add(__('Google Content Items')); if (0 === (int)$this->getRequest()->getParam('store')) { $this->_redirect('adminhtml/*/', array( @@ -68,7 +68,7 @@ class Items extends \Magento\Backend\Controller\Adminhtml\Action $this->_initAction(); - $contentBlock = $this->getLayout() + $contentBlock = $this->_view->getLayout() ->createBlock('Magento\GoogleShopping\Block\Adminhtml\Items')->setStore($this->_getStore()); if ($this->getRequest()->getParam('captcha_token') && $this->getRequest()->getParam('captcha_url')) { @@ -93,8 +93,8 @@ class Items extends \Magento\Backend\Controller\Adminhtml\Action } $this->_addBreadcrumb(__('Items'), __('Items')) - ->_addContent($contentBlock) - ->renderLayout(); + ->_addContent($contentBlock); + $this->_view->renderLayout(); } /** @@ -102,9 +102,9 @@ class Items extends \Magento\Backend\Controller\Adminhtml\Action */ public function gridAction() { - $this->loadLayout(); + $this->_view->loadLayout(); $this->getResponse()->setBody( - $this->getLayout() + $this->_view->getLayout() ->createBlock('Magento\GoogleShopping\Block\Adminhtml\Items\Item') ->setIndex($this->getRequest()->getParam('index')) ->toHtml() diff --git a/app/code/Magento/GoogleShopping/Controller/Adminhtml/Googleshopping/Selection.php b/app/code/Magento/GoogleShopping/Controller/Adminhtml/Googleshopping/Selection.php index 654e54bef4523455b5b8716bde947da369b53ed8..62a1a54a8fb5ee0f121a3e0635b8dd06f5b76e53 100644 --- a/app/code/Magento/GoogleShopping/Controller/Adminhtml/Googleshopping/Selection.php +++ b/app/code/Magento/GoogleShopping/Controller/Adminhtml/Googleshopping/Selection.php @@ -33,7 +33,7 @@ */ namespace Magento\GoogleShopping\Controller\Adminhtml\Googleshopping; -class Selection extends \Magento\Backend\Controller\Adminhtml\Action +class Selection extends \Magento\Backend\App\Action { /** * Search result grid with available products for Google Content @@ -41,7 +41,7 @@ class Selection extends \Magento\Backend\Controller\Adminhtml\Action public function searchAction() { $this->getResponse()->setBody( - $this->getLayout() + $this->_view->getLayout() ->createBlock('Magento\GoogleShopping\Block\Adminhtml\Items\Product') ->setIndex($this->getRequest()->getParam('index')) ->setFirstShow(true) @@ -54,9 +54,9 @@ class Selection extends \Magento\Backend\Controller\Adminhtml\Action */ public function gridAction() { - $this->loadLayout(); + $this->_view->loadLayout(); $this->getResponse()->setBody( - $this->getLayout() + $this->_view->getLayout() ->createBlock('Magento\GoogleShopping\Block\Adminhtml\Items\Product') ->setIndex($this->getRequest()->getParam('index')) ->toHtml() diff --git a/app/code/Magento/GoogleShopping/Controller/Adminhtml/Googleshopping/Types.php b/app/code/Magento/GoogleShopping/Controller/Adminhtml/Googleshopping/Types.php index 17a9648d2f61f422bda771bf06518fa80cae495d..1988ef4076dd362e0eda808826241c4e14ce899c 100644 --- a/app/code/Magento/GoogleShopping/Controller/Adminhtml/Googleshopping/Types.php +++ b/app/code/Magento/GoogleShopping/Controller/Adminhtml/Googleshopping/Types.php @@ -29,7 +29,9 @@ */ namespace Magento\GoogleShopping\Controller\Adminhtml\Googleshopping; -class Types extends \Magento\Backend\Controller\Adminhtml\Action +use Magento\App\RequestInterface; + +class Types extends \Magento\Backend\App\Action { /** * Core registry @@ -37,13 +39,12 @@ class Types extends \Magento\Backend\Controller\Adminhtml\Action * @var \Magento\Core\Model\Registry */ protected $_coreRegistry = null; - /** - * @param \Magento\Backend\Controller\Context $context + * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Core\Model\Registry $coreRegistry */ public function __construct( - \Magento\Backend\Controller\Context $context, + \Magento\Backend\App\Action\Context $context, \Magento\Core\Model\Registry $coreRegistry ) { $this->_coreRegistry = $coreRegistry; @@ -51,12 +52,15 @@ class Types extends \Magento\Backend\Controller\Adminhtml\Action } /** - * Dispatches controller_action_postdispatch_adminhtml Event (as not Adminhtml router) + * Dispatches controller_action_postdispatch_adminhtml Event + * + * @param RequestInterface $request + * @return $this|mixed|void */ - public function postDispatch() + public function dispatch(RequestInterface $request) { - parent::postDispatch(); - if ($this->getFlag('', self::FLAG_NO_POST_DISPATCH)) { + parent::dispatch($request); + if ($this->_actionFlag->get('', self::FLAG_NO_POST_DISPATCH)) { return; } $this->_eventManager->dispatch('controller_action_postdispatch_adminhtml', array('controller_action' => $this)); @@ -69,7 +73,7 @@ class Types extends \Magento\Backend\Controller\Adminhtml\Action */ protected function _initItemType() { - $this->_title(__('Google Content Attributes')); + $this->_title->add(__('Google Content Attributes')); $this->_coreRegistry ->register('current_item_type', $this->_objectManager->create('Magento\GoogleShopping\Model\Type')); @@ -87,8 +91,8 @@ class Types extends \Magento\Backend\Controller\Adminhtml\Action */ protected function _initAction() { - $this->loadLayout() - ->_setActiveMenu('Magento_GoogleShopping::catalog_googleshopping_types') + $this->_view->loadLayout(); + $this->_setActiveMenu('Magento_GoogleShopping::catalog_googleshopping_types') ->_addBreadcrumb(__('Catalog'), __('Catalog')) ->_addBreadcrumb(__('Google Content'), __('Google Content')); return $this; @@ -99,11 +103,11 @@ class Types extends \Magento\Backend\Controller\Adminhtml\Action */ public function indexAction() { - $this->_title(__('Google Content Attributes')); + $this->_title->add(__('Google Content Attributes')); $this->_initAction() - ->_addBreadcrumb(__('Attribute Maps'), __('Attribute Maps')) - ->renderLayout(); + ->_addBreadcrumb(__('Attribute Maps'), __('Attribute Maps')); + $this->_view->renderLayout(); } /** @@ -111,8 +115,8 @@ class Types extends \Magento\Backend\Controller\Adminhtml\Action */ public function gridAction() { - $this->loadLayout('false'); - $this->renderLayout(); + $this->_view->loadLayout('false'); + $this->_view->renderLayout(); } /** @@ -123,12 +127,14 @@ class Types extends \Magento\Backend\Controller\Adminhtml\Action try { $this->_initItemType(); - $this->_title(__('New Google Content Attribute Mapping')); + $this->_title->add(__('New Google Content Attribute Mapping')); $this->_initAction() ->_addBreadcrumb(__('New attribute set mapping'), __('New attribute set mapping')) - ->_addContent($this->getLayout()->createBlock('Magento\GoogleShopping\Block\Adminhtml\Types\Edit')) - ->renderLayout(); + ->_addContent($this->_view->getLayout() + ->createBlock('Magento\GoogleShopping\Block\Adminhtml\Types\Edit') + ); + $this->_view->renderLayout(); } catch (\Exception $e) { $this->_objectManager->get('Magento\Logger')->logException($e); $this->_getSession()->addError(__("We can't create Attribute Set Mapping.")); @@ -156,14 +162,17 @@ class Types extends \Magento\Backend\Controller\Adminhtml\Action } } - $this->_title(__('Google Content Attribute Mapping')); + $this->_title->add(__('Google Content Attribute Mapping')); $this->_coreRegistry->register('attributes', $result); $breadcrumbLabel = $typeId ? __('Edit attribute set mapping') : __('New attribute set mapping'); $this->_initAction() ->_addBreadcrumb($breadcrumbLabel, $breadcrumbLabel) - ->_addContent($this->getLayout()->createBlock('Magento\GoogleShopping\Block\Adminhtml\Types\Edit')) - ->renderLayout(); + ->_addContent($this->_view->getLayout()->createBlock( + 'Magento\GoogleShopping\Block\Adminhtml\Types\Edit' + ) + ); + $this->_view->renderLayout(); } catch (\Exception $e) { $this->_objectManager->get('Magento\Logger')->logException($e); $this->_getSession()->addError(__("We can't edit Attribute Set Mapping.")); @@ -258,7 +267,7 @@ class Types extends \Magento\Backend\Controller\Adminhtml\Action { try { $this->getResponse()->setBody( - $this->getLayout()->createBlock('Magento\GoogleShopping\Block\Adminhtml\Types\Edit\Attributes') + $this->_view->getLayout()->createBlock('Magento\GoogleShopping\Block\Adminhtml\Types\Edit\Attributes') ->setAttributeSetId($this->getRequest()->getParam('attribute_set_id')) ->setTargetCountry($this->getRequest()->getParam('target_country')) ->setAttributeSetSelected(true) @@ -278,7 +287,7 @@ class Types extends \Magento\Backend\Controller\Adminhtml\Action { try { $this->getResponse()->setBody( - $this->getLayout()->getBlockSingleton('Magento\GoogleShopping\Block\Adminhtml\Types\Edit\Form') + $this->_view->getLayout()->getBlockSingleton('Magento\GoogleShopping\Block\Adminhtml\Types\Edit\Form') ->getAttributeSetsSelectElement($this->getRequest()->getParam('target_country')) ->toHtml() ); diff --git a/app/code/Magento/GoogleShopping/Helper/Data.php b/app/code/Magento/GoogleShopping/Helper/Data.php index f4f195fc36cc747defe8d249fbd141f46ab4455e..8a6e8b848326cc0dd3a817d890ff6ff52426c209 100644 --- a/app/code/Magento/GoogleShopping/Helper/Data.php +++ b/app/code/Magento/GoogleShopping/Helper/Data.php @@ -33,7 +33,7 @@ */ namespace Magento\GoogleShopping\Helper; -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { /** * Magento string lib @@ -52,12 +52,12 @@ class Data extends \Magento\Core\Helper\AbstractHelper /** * @param \Magento\Stdlib\String $string * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context */ public function __construct( \Magento\Stdlib\String $string, \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Helper\Context $context + \Magento\App\Helper\Context $context ) { $this->string = $string; $this->_storeManager = $storeManager; diff --git a/app/code/Magento/GoogleShopping/Helper/Product.php b/app/code/Magento/GoogleShopping/Helper/Product.php index 9cb99dbc2a6ed7241ceeca64325d1d0525fffa7b..b8d0f2c168f6b7365e6615e120e372c90872efc7 100644 --- a/app/code/Magento/GoogleShopping/Helper/Product.php +++ b/app/code/Magento/GoogleShopping/Helper/Product.php @@ -33,7 +33,7 @@ */ namespace Magento\GoogleShopping\Helper; -class Product extends \Magento\Core\Helper\AbstractHelper +class Product extends \Magento\App\Helper\AbstractHelper { /** * Product attributes cache diff --git a/app/code/Magento/ImportExport/Block/Adminhtml/Export/Edit/Form.php b/app/code/Magento/ImportExport/Block/Adminhtml/Export/Edit/Form.php index f587142e923995ae06e47b011a678c5d2f344e7c..ee00cf2152c8407c2e7f13cc37c6d7b746982a20 100644 --- a/app/code/Magento/ImportExport/Block/Adminhtml/Export/Edit/Form.php +++ b/app/code/Magento/ImportExport/Block/Adminhtml/Export/Edit/Form.php @@ -45,27 +45,27 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic */ protected $_formatFactory; - /** - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\ImportExport\Model\Source\Export\EntityFactory $entityFactory - * @param \Magento\ImportExport\Model\Source\Export\FormatFactory $formatFactory - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\ImportExport\Model\Source\Export\EntityFactory $entityFactory + * @param \Magento\ImportExport\Model\Source\Export\FormatFactory $formatFactory + * @param array $data */ - public function __construct( - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\ImportExport\Model\Source\Export\EntityFactory $entityFactory, - \Magento\ImportExport\Model\Source\Export\FormatFactory $formatFactory, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\ImportExport\Model\Source\Export\EntityFactory $entityFactory, + \Magento\ImportExport\Model\Source\Export\FormatFactory $formatFactory, + array $data = array() + ) { $this->_entityFactory = $entityFactory; $this->_formatFactory = $formatFactory; - parent::__construct($registry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); } /** diff --git a/app/code/Magento/ImportExport/Block/Adminhtml/Export/Filter.php b/app/code/Magento/ImportExport/Block/Adminhtml/Export/Filter.php index a9b4ef4c74cc9f416dafe744db6ffc4f22a8de5b..73c0251aa90bde64a118e291fa8792bd3fe003b7 100644 --- a/app/code/Magento/ImportExport/Block/Adminhtml/Export/Filter.php +++ b/app/code/Magento/ImportExport/Block/Adminhtml/Export/Filter.php @@ -38,7 +38,7 @@ class Filter extends \Magento\Adminhtml\Block\Widget\Grid /** * Helper object. * - * @var \Magento\Core\Helper\AbstractHelper + * @var \Magento\App\Helper\AbstractHelper */ protected $_helper; @@ -49,32 +49,22 @@ class Filter extends \Magento\Adminhtml\Block\Widget\Grid */ protected $_importExportData = null; - /** - * @var \Magento\Core\Model\LocaleInterface - */ - protected $_locale; - - /** - * @param \Magento\ImportExport\Helper\Data $importExportData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param \Magento\Core\Model\LocaleInterface $locale - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\ImportExport\Helper\Data $importExportData + * @param array $data */ - public function __construct( - \Magento\ImportExport\Helper\Data $importExportData, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - \Magento\Core\Model\LocaleInterface $locale, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\ImportExport\Helper\Data $importExportData, + array $data = array() + ) { $this->_importExportData = $importExportData; - $this->_locale = $locale; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $data); } /** @@ -111,9 +101,9 @@ class Filter extends \Magento\Adminhtml\Block\Widget\Grid 'date_format' => $this->_locale->getDateFormat(\Magento\Core\Model\LocaleInterface::FORMAT_TYPE_SHORT), 'image' => $this->getViewFileUrl('images/grid-cal.gif') ); - /** @var $selectBlock \Magento\Core\Block\Html\Date */ + /** @var $selectBlock \Magento\View\Block\Html\Date */ $dateBlock = $this->_layout->getBlockFactory()->createBlock( - 'Magento\Core\Block\Html\Date', array('data' => $arguments) + 'Magento\View\Block\Html\Date', array('data' => $arguments) ); $fromValue = null; $toValue = null; @@ -173,9 +163,9 @@ class Filter extends \Magento\Adminhtml\Block\Widget\Grid 'class' => 'multiselect multiselect-export-filter', 'extra_params' => 'multiple="multiple" size="' . ($size > 5 ? 5 : ($size < 2 ? 2 : $size)) ); - /** @var $selectBlock \Magento\Core\Block\Html\Select */ + /** @var $selectBlock \Magento\View\Block\Html\Select */ $selectBlock = $this->_layout->getBlockFactory()->createBlock( - 'Magento\Core\Block\Html\Select', array('data' => $arguments) + 'Magento\View\Block\Html\Select', array('data' => $arguments) ); return $selectBlock->setOptions($options) ->setValue($value) @@ -242,9 +232,9 @@ class Filter extends \Magento\Adminhtml\Block\Widget\Grid 'id' => $this->getFilterElementId($attribute->getAttributeCode()), 'class' => 'select select-export-filter' ); - /** @var $selectBlock \Magento\Core\Block\Html\Select */ + /** @var $selectBlock \Magento\View\Block\Html\Select */ $selectBlock = $this->_layout->getBlockFactory()->createBlock( - 'Magento\Core\Block\Html\Select', array('data' => $arguments) + 'Magento\View\Block\Html\Select', array('data' => $arguments) ); return $selectBlock->setOptions($options) ->setValue($value) diff --git a/app/code/Magento/ImportExport/Block/Adminhtml/Form/After.php b/app/code/Magento/ImportExport/Block/Adminhtml/Form/After.php index 64e337529d084e293d171b5e779939f0237231b4..bd0c612860097f2b268fd56f4b67264e0e53811a 100644 --- a/app/code/Magento/ImportExport/Block/Adminhtml/Form/After.php +++ b/app/code/Magento/ImportExport/Block/Adminhtml/Form/After.php @@ -36,20 +36,20 @@ class After extends \Magento\Backend\Block\Template */ protected $_registry; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_registry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/ImportExport/Block/Adminhtml/Import/Edit/Before.php b/app/code/Magento/ImportExport/Block/Adminhtml/Import/Edit/Before.php index 5220bc0a9f5114f40fe59ecefa545b27a67297e5..5eb2f8746a94feb9261a782095a7c9f25c55431f 100644 --- a/app/code/Magento/ImportExport/Block/Adminhtml/Import/Edit/Before.php +++ b/app/code/Magento/ImportExport/Block/Adminhtml/Import/Edit/Before.php @@ -42,20 +42,20 @@ class Before extends \Magento\Backend\Block\Template */ protected $_importModel; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\ImportExport\Model\Import $importModel - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\ImportExport\Model\Import $importModel + * @param array $data */ - public function __construct( - \Magento\ImportExport\Model\Import $importModel, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\ImportExport\Model\Import $importModel, + array $data = array() + ) { $this->_importModel = $importModel; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/ImportExport/Block/Adminhtml/Import/Edit/Form.php b/app/code/Magento/ImportExport/Block/Adminhtml/Import/Edit/Form.php index d0defb28848073578669948c4178412195833ce4..a377f019bb224a9c7df2f24557cfe14a149cf79c 100644 --- a/app/code/Magento/ImportExport/Block/Adminhtml/Import/Edit/Form.php +++ b/app/code/Magento/ImportExport/Block/Adminhtml/Import/Edit/Form.php @@ -52,29 +52,29 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic */ protected $_behaviorFactory; - /** - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\ImportExport\Model\Import $importModel - * @param \Magento\ImportExport\Model\Source\Import\EntityFactory $entityFactory - * @param \Magento\ImportExport\Model\Source\Import\Behavior\Factory $behaviorFactory - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\ImportExport\Model\Import $importModel + * @param \Magento\ImportExport\Model\Source\Import\EntityFactory $entityFactory + * @param \Magento\ImportExport\Model\Source\Import\Behavior\Factory $behaviorFactory + * @param array $data */ - public function __construct( - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\ImportExport\Model\Import $importModel, - \Magento\ImportExport\Model\Source\Import\EntityFactory $entityFactory, - \Magento\ImportExport\Model\Source\Import\Behavior\Factory $behaviorFactory, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\ImportExport\Model\Import $importModel, + \Magento\ImportExport\Model\Source\Import\EntityFactory $entityFactory, + \Magento\ImportExport\Model\Source\Import\Behavior\Factory $behaviorFactory, + array $data = array() + ) { $this->_entityFactory = $entityFactory; $this->_behaviorFactory = $behaviorFactory; - parent::__construct($registry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); $this->_importModel = $importModel; } diff --git a/app/code/Magento/ImportExport/Block/Adminhtml/Import/Frame/Result.php b/app/code/Magento/ImportExport/Block/Adminhtml/Import/Frame/Result.php index 990008557d6512da8aba4e5f101b19890d2e3dbb..9d24b46024140cd47345059dab35cbe0ea0bf814 100644 --- a/app/code/Magento/ImportExport/Block/Adminhtml/Import/Frame/Result.php +++ b/app/code/Magento/ImportExport/Block/Adminhtml/Import/Frame/Result.php @@ -182,8 +182,8 @@ class Result extends \Magento\Adminhtml\Block\Template */ public function getMessagesHtml() { - /** @var $messagesBlock \Magento\Core\Block\Messages */ - $messagesBlock = $this->_layout->createBlock('Magento\Core\Block\Messages'); + /** @var $messagesBlock \Magento\View\Block\Messages */ + $messagesBlock = $this->_layout->createBlock('Magento\View\Block\Messages'); foreach ($this->_messages as $priority => $messages) { $method = "add{$priority}"; diff --git a/app/code/Magento/ImportExport/Controller/Adminhtml/Export.php b/app/code/Magento/ImportExport/Controller/Adminhtml/Export.php index bd10028a2cf996f9e550fa90f54cb66934a6b6b0..70420f30d4cda2b6f37ef864e235a615b7667322 100644 --- a/app/code/Magento/ImportExport/Controller/Adminhtml/Export.php +++ b/app/code/Magento/ImportExport/Controller/Adminhtml/Export.php @@ -33,8 +33,25 @@ */ namespace Magento\ImportExport\Controller\Adminhtml; -class Export extends \Magento\Backend\Controller\Adminhtml\Action +class Export extends \Magento\Backend\App\Action { + /** + * @var \Magento\App\Response\Http\FileFactory + */ + protected $_fileFactory; + + /** + * @param \Magento\Backend\App\Action\Context $context + * @param \Magento\App\Response\Http\FileFactory $fileFactory + */ + public function __construct( + \Magento\Backend\App\Action\Context $context, + \Magento\App\Response\Http\FileFactory $fileFactory + ) { + $this->_fileFactory = $fileFactory; + parent::__construct($context); + } + /** * Initialize layout. * @@ -42,9 +59,9 @@ class Export extends \Magento\Backend\Controller\Adminhtml\Action */ protected function _initAction() { - $this->_title(__('Import/Export')) - ->loadLayout() - ->_setActiveMenu('Magento_ImportExport::system_convert_export'); + $this->_title->add(__('Import/Export')); + $this->_view->loadLayout(); + $this->_setActiveMenu('Magento_ImportExport::system_convert_export'); return $this; } @@ -72,7 +89,7 @@ class Export extends \Magento\Backend\Controller\Adminhtml\Action $model = $this->_objectManager->create('Magento\ImportExport\Model\Export'); $model->setData($this->getRequest()->getParams()); - return $this->_prepareDownloadResponse( + return $this->_fileFactory->create( $model->getFileName(), $model->export(), $model->getContentType() @@ -96,11 +113,11 @@ class Export extends \Magento\Backend\Controller\Adminhtml\Action */ public function indexAction() { - $this->_initAction() - ->_title(__('Export')) - ->_addBreadcrumb(__('Export'), __('Export')); + $this->_initAction(); + $this->_title->add(__('Export')); + $this->_addBreadcrumb(__('Export'), __('Export')); - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -113,10 +130,10 @@ class Export extends \Magento\Backend\Controller\Adminhtml\Action $data = $this->getRequest()->getParams(); if ($this->getRequest()->isXmlHttpRequest() && $data) { try { - $this->loadLayout(); + $this->_view->loadLayout(); /** @var $attrFilterBlock \Magento\ImportExport\Block\Adminhtml\Export\Filter */ - $attrFilterBlock = $this->getLayout()->getBlock('export.filter'); + $attrFilterBlock = $this->_view->getLayout()->getBlock('export.filter'); /** @var $export \Magento\ImportExport\Model\Export */ $export = $this->_objectManager->create('Magento\ImportExport\Model\Export'); $export->setData($data); @@ -126,7 +143,7 @@ class Export extends \Magento\Backend\Controller\Adminhtml\Action $export->getEntityAttributeCollection() ) ); - $this->renderLayout(); + $this->_view->renderLayout(); return; } catch (\Exception $e) { $this->_getSession()->addError($e->getMessage()); diff --git a/app/code/Magento/ImportExport/Controller/Adminhtml/Import.php b/app/code/Magento/ImportExport/Controller/Adminhtml/Import.php index 31bf54ec3cc7f00b2d7eb8de30adb68785376035..cb6fa4abe66f9004dc325598fb99ab4acad03b25 100644 --- a/app/code/Magento/ImportExport/Controller/Adminhtml/Import.php +++ b/app/code/Magento/ImportExport/Controller/Adminhtml/Import.php @@ -33,8 +33,17 @@ */ namespace Magento\ImportExport\Controller\Adminhtml; -class Import extends \Magento\Backend\Controller\Adminhtml\Action +class Import extends \Magento\Backend\App\Action { + /** + * @param \Magento\Backend\App\Action\Context $context + */ + public function __construct( + \Magento\Backend\App\Action\Context $context + ) { + parent::__construct($context); + } + /** * Initialize layout. * @@ -42,9 +51,9 @@ class Import extends \Magento\Backend\Controller\Adminhtml\Action */ protected function _initAction() { - $this->_title(__('Import/Export')) - ->loadLayout() - ->_setActiveMenu('Magento_ImportExport::system_convert_import'); + $this->_title->add(__('Import/Export')); + $this->_view->loadLayout(); + $this->_setActiveMenu('Magento_ImportExport::system_convert_import'); return $this; } @@ -65,8 +74,10 @@ class Import extends \Magento\Backend\Controller\Adminhtml\Action { $this->_getSession()->addNotice($this->_objectManager->get('Magento\ImportExport\Helper\Data') ->getMaxUploadSizeMessage()); - $this->_initAction()->_title(__('Import'))->_addBreadcrumb(__('Import'), __('Import')); - $this->renderLayout(); + $this->_initAction(); + $this->_title->add(__('Import')); + $this->_addBreadcrumb(__('Import'), __('Import')); + $this->_view->renderLayout(); } /** @@ -76,10 +87,10 @@ class Import extends \Magento\Backend\Controller\Adminhtml\Action { $data = $this->getRequest()->getPost(); if ($data) { - $this->loadLayout(false); + $this->_view->loadLayout(false); /** @var $resultBlock \Magento\ImportExport\Block\Adminhtml\Import\Frame\Result */ - $resultBlock = $this->getLayout()->getBlock('import.frame.result'); + $resultBlock = $this->_view->getLayout()->getBlock('import.frame.result'); /** @var $importModel \Magento\ImportExport\Model\Import */ $importModel = $this->_objectManager->create('Magento\ImportExport\Model\Import'); @@ -90,12 +101,12 @@ class Import extends \Magento\Backend\Controller\Adminhtml\Action ->addAction('innerHTML', 'import_validation_container_header', __('Status')); } catch (\Exception $e) { $resultBlock->addError($e->getMessage()); - $this->renderLayout(); + $this->_view->renderLayout(); return; } $resultBlock->addAction('hide', array('edit_form', 'upload_button', 'messages')) ->addSuccess(__('Import successfully done')); - $this->renderLayout(); + $this->_view->renderLayout(); } else { $this->_redirect('adminhtml/*/index'); } @@ -108,9 +119,9 @@ class Import extends \Magento\Backend\Controller\Adminhtml\Action { $data = $this->getRequest()->getPost(); if ($data) { - $this->loadLayout(false); + $this->_view->loadLayout(false); /** @var $resultBlock \Magento\ImportExport\Block\Adminhtml\Import\Frame\Result */ - $resultBlock = $this->getLayout()->getBlock('import.frame.result'); + $resultBlock = $this->_view->getLayout()->getBlock('import.frame.result'); // common actions $resultBlock->addAction('show', 'import_validation_container') ->addAction('clear', array( @@ -152,12 +163,12 @@ class Import extends \Magento\Backend\Controller\Adminhtml\Action $resultBlock->addNotice(__('Please fix errors and re-upload file.')) ->addError($e->getMessage()); } - $this->renderLayout(); + $this->_view->renderLayout(); } elseif ($this->getRequest()->isPost() && empty($_FILES)) { - $this->loadLayout(false); - $resultBlock = $this->getLayout()->getBlock('import.frame.result'); + $this->_view->loadLayout(false); + $resultBlock = $this->_view->getLayout()->getBlock('import.frame.result'); $resultBlock->addError(__('File was not uploaded')); - $this->renderLayout(); + $this->_view->renderLayout(); } else { $this->_getSession()->addError(__('Data is invalid or file is not uploaded')); $this->_redirect('adminhtml/*/index'); diff --git a/app/code/Magento/ImportExport/Helper/Data.php b/app/code/Magento/ImportExport/Helper/Data.php index d0f0e8f8e9d4a2c5d55e1b32d1da760bdc6b21d4..e193521ffe980d292ff7fa9c8dceb82c23613677 100644 --- a/app/code/Magento/ImportExport/Helper/Data.php +++ b/app/code/Magento/ImportExport/Helper/Data.php @@ -48,18 +48,18 @@ class Data extends \Magento\Core\Helper\Data protected $_fileSize; /** - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\Store\Config $coreStoreConfig - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Locale $locale * @param \Magento\App\State $appState * @param \Magento\File\Size $fileSize * @param bool $dbCompatibleMode */ public function __construct( - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Core\Model\Store\Config $coreStoreConfig, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Locale $locale, \Magento\App\State $appState, \Magento\File\Size $fileSize, diff --git a/app/code/Magento/ImportExport/Model/Export/Entity/Product.php b/app/code/Magento/ImportExport/Model/Export/Entity/Product.php index 1be584e755ca477abccb63369c66403a6bb746a6..6fa192e70b7d5c1d933ae9abd58d8f37e95ea58c 100644 --- a/app/code/Magento/ImportExport/Model/Export/Entity/Product.php +++ b/app/code/Magento/ImportExport/Model/Export/Entity/Product.php @@ -197,7 +197,7 @@ class Product extends \Magento\ImportExport\Model\Export\Entity\AbstractEntity protected $_typeFactory; /** - * @param \Magento\Core\Model\LocaleInterface $localeInterface + * @param \Magento\Core\Model\LocaleInterface $locale * @param \Magento\Eav\Model\Config $config * @param \Magento\App\Resource $resource * @param \Magento\Core\Model\StoreManagerInterface $storeManager @@ -213,7 +213,7 @@ class Product extends \Magento\ImportExport\Model\Export\Entity\AbstractEntity * @param \Magento\ImportExport\Model\Export\Entity\Product\Type\Factory $_typeFactory */ public function __construct( - \Magento\Core\Model\LocaleInterface $localeInterface, + \Magento\Core\Model\LocaleInterface $locale, \Magento\Eav\Model\Config $config, \Magento\App\Resource $resource, \Magento\Core\Model\StoreManagerInterface $storeManager, @@ -240,7 +240,7 @@ class Product extends \Magento\ImportExport\Model\Export\Entity\AbstractEntity $this->_attributeColFactory = $attributeColFactory; $this->_typeFactory = $_typeFactory; - parent::__construct($localeInterface, $config, $resource, $storeManager); + parent::__construct($locale, $config, $resource, $storeManager); $this->_initTypeModels() ->_initAttributes() diff --git a/app/code/Magento/ImportExport/Model/Import/Entity/Product.php b/app/code/Magento/ImportExport/Model/Import/Entity/Product.php index 05cf9bbc4402962ffbec9566ce39ed9fe69545c8..bef3264b42052407757d57ebe4e30a779087eeb8 100644 --- a/app/code/Magento/ImportExport/Model/Import/Entity/Product.php +++ b/app/code/Magento/ImportExport/Model/Import/Entity/Product.php @@ -346,7 +346,7 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity protected $_productFactory; /** - * @var \Magento\Core\Model\StoreManager + * @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; @@ -413,7 +413,7 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity * @param \Magento\Catalog\Model\Resource\Category\CollectionFactory $categoryColFactory * @param \Magento\Customer\Model\Resource\Group\CollectionFactory $groupColFactory * @param \Magento\Catalog\Model\ProductFactory $productFactory - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\ImportExport\Model\Import\Entity\Product\Type\Factory $productTypeFactory * @param \Magento\Catalog\Model\Resource\Product\LinkFactory $linkFactory * @param \Magento\ImportExport\Model\Import\Proxy\ProductFactory $proxyProdFactory @@ -443,7 +443,7 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity \Magento\Catalog\Model\Resource\Category\CollectionFactory $categoryColFactory, \Magento\Customer\Model\Resource\Group\CollectionFactory $groupColFactory, \Magento\Catalog\Model\ProductFactory $productFactory, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\ImportExport\Model\Import\Entity\Product\Type\Factory $productTypeFactory, \Magento\Catalog\Model\Resource\Product\LinkFactory $linkFactory, \Magento\ImportExport\Model\Import\Proxy\ProductFactory $proxyProdFactory, diff --git a/app/code/Magento/ImportExport/view/adminhtml/layout/adminhtml_import_busy.xml b/app/code/Magento/ImportExport/view/adminhtml/layout/adminhtml_import_busy.xml index cdcc70687c0cfdc1e61e21269b16e087c50a024b..a48e1dd20f990bf4d6c865b1ff53fd6f323b1770 100644 --- a/app/code/Magento/ImportExport/view/adminhtml/layout/adminhtml_import_busy.xml +++ b/app/code/Magento/ImportExport/view/adminhtml/layout/adminhtml_import_busy.xml @@ -25,6 +25,6 @@ --> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <referenceContainer name="content"> - <block class="Magento\Core\Block\Template" template="Magento_ImportExport::busy.phtml" name="busy" as="busy"/> + <block class="Magento\View\Block\Template" template="Magento_ImportExport::busy.phtml" name="busy" as="busy"/> </referenceContainer> </layout> diff --git a/app/code/Magento/Index/Block/Adminhtml/Process/Edit.php b/app/code/Magento/Index/Block/Adminhtml/Process/Edit.php index dd7e9f9018ef1423f6def7ea713349052bf829bb..6d051b774a0dd7cdb834d5b2867067a259d42266 100644 --- a/app/code/Magento/Index/Block/Adminhtml/Process/Edit.php +++ b/app/code/Magento/Index/Block/Adminhtml/Process/Edit.php @@ -35,20 +35,20 @@ class Edit extends \Magento\Adminhtml\Block\Widget\Form\Container */ protected $_coreRegistry = null; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _construct() diff --git a/app/code/Magento/Index/Block/Adminhtml/Process/Grid.php b/app/code/Magento/Index/Block/Adminhtml/Process/Grid.php index 6724e973069b5c1d4441fbe1a40c0775ffeecda4..ed044631d8baad6e7ed51c91deb5ee16aa75fbbc 100644 --- a/app/code/Magento/Index/Block/Adminhtml/Process/Grid.php +++ b/app/code/Magento/Index/Block/Adminhtml/Process/Grid.php @@ -54,27 +54,25 @@ class Grid extends \Magento\Adminhtml\Block\Widget\Grid */ protected $_collectionFactory; - /** - * @param \Magento\Index\Model\Resource\Process\CollectionFactory $factory - * @param \Magento\Index\Model\Process $indexProcess - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param \Magento\Index\Model\EventRepository $eventRepository - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Index\Model\Resource\Process\CollectionFactory $factory + * @param \Magento\Index\Model\Process $indexProcess + * @param \Magento\Index\Model\EventRepository $eventRepository + * @param array $data */ - public function __construct( - \Magento\Index\Model\Resource\Process\CollectionFactory $factory, - \Magento\Index\Model\Process $indexProcess, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - \Magento\Index\Model\EventRepository $eventRepository, - array $data = array() - ) { - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Index\Model\Resource\Process\CollectionFactory $factory, + \Magento\Index\Model\Process $indexProcess, + \Magento\Index\Model\EventRepository $eventRepository, + array $data = array() + ) { + parent::__construct($context, $coreData, $urlModel, $data); $this->_eventRepository = $eventRepository; $this->_indexProcess = $indexProcess; $this->_collectionFactory = $factory; diff --git a/app/code/Magento/Index/Controller/Adminhtml/Process.php b/app/code/Magento/Index/Controller/Adminhtml/Process.php index c78ca4d13f583a3cf36b1cf40fe60ccf50aa7cc2..a93292cff0c03c11b75dc0cd5da8caf356c49b70 100644 --- a/app/code/Magento/Index/Controller/Adminhtml/Process.php +++ b/app/code/Magento/Index/Controller/Adminhtml/Process.php @@ -25,7 +25,9 @@ */ namespace Magento\Index\Controller\Adminhtml; -class Process extends \Magento\Backend\Controller\Adminhtml\Action +use Magento\Backend\App\Action; + +class Process extends \Magento\Backend\App\Action { /** * Core registry @@ -45,13 +47,13 @@ class Process extends \Magento\Backend\Controller\Adminhtml\Action protected $_indexer; /** - * @param \Magento\Backend\Controller\Context $context + * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Core\Model\Registry $coreRegistry * @param \Magento\Index\Model\ProcessFactory $processFactory * @param \Magento\Index\Model\Indexer $indexer */ public function __construct( - \Magento\Backend\Controller\Context $context, + \Magento\Backend\App\Action\Context $context, \Magento\Core\Model\Registry $coreRegistry, \Magento\Index\Model\ProcessFactory $processFactory, \Magento\Index\Model\Indexer $indexer @@ -85,12 +87,12 @@ class Process extends \Magento\Backend\Controller\Adminhtml\Action */ public function listAction() { - $this->_title(__('Index Management')); + $this->_title->add(__('Index Management')); - $this->loadLayout(); + $this->_view->loadLayout(); $this->_setActiveMenu('Magento_Index::system_index'); - $this->_addContent($this->getLayout()->createBlock('Magento\Index\Block\Adminhtml\Process')); - $this->renderLayout(); + $this->_addContent($this->_view->getLayout()->createBlock('Magento\Index\Block\Adminhtml\Process')); + $this->_view->renderLayout(); } /** @@ -101,15 +103,14 @@ class Process extends \Magento\Backend\Controller\Adminhtml\Action /** @var $process \Magento\Index\Model\Process */ $process = $this->_initProcess(); if ($process) { - $this->_title($process->getIndexCode()); - - $this->_title(__('System')) - ->_title(__('Index Management')) - ->_title(__($process->getIndexer()->getName())); + $this->_title->add($process->getIndexCode()); + $this->_title->add(__('System')); + $this->_title->add(__('Index Management')); + $this->_title->add(__($process->getIndexer()->getName())); $this->_coreRegistry->register('current_index_process', $process); - $this->loadLayout(); - $this->renderLayout(); + $this->_view->loadLayout(); + $this->_view->renderLayout(); } else { $this->_getSession()->addError( __('Cannot initialize the indexer process.') diff --git a/app/code/Magento/Index/Helper/Data.php b/app/code/Magento/Index/Helper/Data.php index 6bb8f397e6a55e589aa43584aee74e8340c3bc9f..721240e5ac80f1e691f171275089636f933f2c0f 100644 --- a/app/code/Magento/Index/Helper/Data.php +++ b/app/code/Magento/Index/Helper/Data.php @@ -26,7 +26,7 @@ namespace Magento\Index\Helper; -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { } diff --git a/app/code/Magento/Index/Model/Process.php b/app/code/Magento/Index/Model/Process.php index 800068cf3dd131194c0d3e3f8a8f96c4d04e7967..eca1e4506f94a3b5f1932a5e2192fbe330624b4c 100644 --- a/app/code/Magento/Index/Model/Process.php +++ b/app/code/Magento/Index/Model/Process.php @@ -96,13 +96,6 @@ class Process extends \Magento\Core\Model\AbstractModel */ protected $_eventRepository; - /** - * Core event manager proxy - * - * @var \Magento\Event\ManagerInterface - */ - protected $_eventManager = null; - /** * @var \Magento\Index\Model\IndexerFactory */ @@ -127,7 +120,6 @@ class Process extends \Magento\Core\Model\AbstractModel * @param \Magento\Index\Model\Resource\Event $resourceEvent * @param \Magento\Index\Model\Indexer\Factory $indexerFactory * @param \Magento\Index\Model\Indexer $indexer - * @param \Magento\Event\ManagerInterface $eventManager * @param \Magento\Core\Model\Context $context * @param \Magento\Index\Model\Indexer\ConfigInterface $indexerConfig * @param \Magento\Core\Model\Registry $registry @@ -143,7 +135,6 @@ class Process extends \Magento\Core\Model\AbstractModel \Magento\Index\Model\Resource\Event $resourceEvent, \Magento\Index\Model\Indexer\Factory $indexerFactory, \Magento\Index\Model\Indexer $indexer, - \Magento\Event\ManagerInterface $eventManager, \Magento\Core\Model\Context $context, \Magento\Index\Model\Indexer\ConfigInterface $indexerConfig, \Magento\Core\Model\Registry $registry, @@ -153,7 +144,6 @@ class Process extends \Magento\Core\Model\AbstractModel \Magento\Data\Collection\Db $resourceCollection = null, array $data = array() ) { - $this->_eventManager = $eventManager; parent::__construct($context, $registry, $resource, $resourceCollection, $data); $this->_indexerConfig = $indexerConfig; $this->_indexerFactory = $indexerFactory; diff --git a/app/code/Magento/Install/App/Action/Plugin/Design.php b/app/code/Magento/Install/App/Action/Plugin/Design.php new file mode 100644 index 0000000000000000000000000000000000000000..141bd171386fee6c98c22cac637d003eaa374991 --- /dev/null +++ b/app/code/Magento/Install/App/Action/Plugin/Design.php @@ -0,0 +1,98 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Install\App\Action\Plugin; + +class Design +{ + /** + * @var \Magento\App\RequestInterface + */ + protected $_request; + + /** + * @var \Magento\Core\Model\App + */ + protected $_app; + + /** + * @var \Magento\View\LayoutInterface + */ + protected $_layout; + + /** + * @var \Magento\Core\Model\Theme\CollectionFactory + */ + protected $_collectionFactory; + + /** + * @var \Magento\View\DesignInterface + */ + protected $_viewDesign; + + /** + * @param \Magento\App\RequestInterface $request + * @param \Magento\Core\Model\App $app + * @param \Magento\View\LayoutInterface $layout + * @param \Magento\View\DesignInterface $viewDesign + * @param \Magento\Core\Model\Theme\CollectionFactory $collectionFactory + */ + public function __construct( + \Magento\App\RequestInterface $request, + \Magento\Core\Model\App $app, + \Magento\View\LayoutInterface $layout, + \Magento\View\DesignInterface $viewDesign, + \Magento\Core\Model\Theme\CollectionFactory $collectionFactory + ) { + $this->_viewDesign = $viewDesign; + $this->_collectionFactory = $collectionFactory; + $this->_request = $request; + $this->_app = $app; + $this->_layout = $layout; + } + + /** + * Initialize design + * + * @param array $arguments + * @return array + */ + public function beforeDispatch(array $arguments = array()) + { + $areaCode = $this->_layout->getArea(); + $area = $this->_app->getArea($areaCode); + $area->load(\Magento\Core\Model\App\Area::PART_CONFIG); + + /** @var $themesCollection \Magento\Core\Model\Theme\Collection */ + $themesCollection = $this->_collectionFactory->create(); + $themeModel = $themesCollection->addDefaultPattern($areaCode) + ->addFilter('theme_path', $this->_viewDesign->getConfigurationDesignTheme($areaCode)) + ->getFirstItem(); + $this->_viewDesign->setArea($areaCode)->setDesignTheme($themeModel); + + $area->detectDesign($this->_request); + $area->load(\Magento\Core\Model\App\Area::PART_TRANSLATE); + return $arguments; + } +} diff --git a/app/code/Magento/Install/App/Action/Plugin/Dir.php b/app/code/Magento/Install/App/Action/Plugin/Dir.php new file mode 100644 index 0000000000000000000000000000000000000000..ef69bf6fdc83203699e52cbe1c4095e796fe7969 --- /dev/null +++ b/app/code/Magento/Install/App/Action/Plugin/Dir.php @@ -0,0 +1,69 @@ +<?php +/** + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Install\App\Action\Plugin; + +class Dir +{ + /** + * Application state + * + * @var \Magento\App\State + */ + protected $_appState; + + /** + * Directory list + * + * @var \Magento\App\Dir + */ + protected $_dir; + + /** + * @param \Magento\App\State $state + * @param \Magento\App\Dir $dir + */ + public function __construct(\Magento\App\State $state, \Magento\App\Dir $dir) + { + $this->_appState = $state; + $this->_dir = $dir; + } + + /** + * Clear temporary directories + * + * @param $arguments + * @return mixed + */ + public function beforeDispatch($arguments) + { + if (!$this->_appState->isInstalled()) { + foreach (glob($this->_dir->getDir(\Magento\App\Dir::VAR_DIR) . '/*', GLOB_ONLYDIR) as $dir) { + \Magento\Io\File::rmdirRecursive($dir); + } + } + return $arguments; + } +} \ No newline at end of file diff --git a/app/code/Magento/Install/Block/AbstractBlock.php b/app/code/Magento/Install/Block/AbstractBlock.php index 2fd793de1955b894180bd5e00cdb9a075da398ed..665037b57f599696ca45d661e3dea27d66bbfc8d 100644 --- a/app/code/Magento/Install/Block/AbstractBlock.php +++ b/app/code/Magento/Install/Block/AbstractBlock.php @@ -31,7 +31,7 @@ */ namespace Magento\Install\Block; -abstract class AbstractBlock extends \Magento\Core\Block\Template +abstract class AbstractBlock extends \Magento\View\Block\Template { /** * Installer model @@ -55,22 +55,22 @@ abstract class AbstractBlock extends \Magento\Core\Block\Template protected $_session; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Install\Model\Installer $installer * @param \Magento\Install\Model\Wizard $installWizard * @param \Magento\Core\Model\Session\Generic $session * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Install\Model\Installer $installer, \Magento\Install\Model\Wizard $installWizard, \Magento\Core\Model\Session\Generic $session, array $data = array() ) { - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); $this->_installer = $installer; $this->_installWizard = $installWizard; $this->_session = $session; diff --git a/app/code/Magento/Install/Block/Begin.php b/app/code/Magento/Install/Block/Begin.php index 4435ba3bb17f1562648160becb9d3adf9a8aae59..fba6e31329b91ecd8119c085d5ca53bdd45aaa56 100644 --- a/app/code/Magento/Install/Block/Begin.php +++ b/app/code/Magento/Install/Block/Begin.php @@ -41,24 +41,24 @@ class Begin extends \Magento\Install\Block\AbstractBlock protected $_eulaFile; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Install\Model\Installer $installer * @param \Magento\Install\Model\Wizard $installWizard * @param \Magento\Core\Model\Session\Generic $session * @param array $data - * @param string|null $eulaFile + * @param null $eulaFile */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Install\Model\Installer $installer, \Magento\Install\Model\Wizard $installWizard, \Magento\Core\Model\Session\Generic $session, - $eulaFile = null, - array $data = array() + array $data = array(), + $eulaFile = null ) { - parent::__construct($coreData, $context, $installer, $installWizard, $session, $data); + parent::__construct($context, $coreData, $installer, $installWizard, $session, $data); $this->_eulaFile = $eulaFile; } diff --git a/app/code/Magento/Install/Block/Config.php b/app/code/Magento/Install/Block/Config.php index 57d95f0f017f2068b7f6413ef8386c68a4462867..bfdf6e0bc093be407cdecce9fcc896e1225f9425 100644 --- a/app/code/Magento/Install/Block/Config.php +++ b/app/code/Magento/Install/Block/Config.php @@ -46,8 +46,8 @@ class Config extends \Magento\Install\Block\AbstractBlock protected $_installerConfig = null; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Install\Model\Installer $installer * @param \Magento\Install\Model\Wizard $installWizard * @param \Magento\Core\Model\Session\Generic $session @@ -55,15 +55,15 @@ class Config extends \Magento\Install\Block\AbstractBlock * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Install\Model\Installer $installer, \Magento\Install\Model\Wizard $installWizard, \Magento\Core\Model\Session\Generic $session, \Magento\Install\Model\Installer\Config $installerConfig, array $data = array() ) { - parent::__construct($coreData, $context, $installer, $installWizard, $session, $data); + parent::__construct($context, $coreData, $installer, $installWizard, $session, $data); $this->_installerConfig = $installerConfig; } @@ -129,7 +129,7 @@ class Config extends \Magento\Install\Block\AbstractBlock */ public function getSessionSaveSelect() { - $html = $this->getLayout()->createBlock('Magento\Core\Block\Html\Select') + $html = $this->getLayout()->createBlock('Magento\View\Block\Html\Select') ->setName('config[session_save]') ->setId('session_save') ->setTitle(__('Save Session Files In')) diff --git a/app/code/Magento/Install/Block/Db/Main.php b/app/code/Magento/Install/Block/Db/Main.php index 7f0d1bbb3ca16588b35071bcd4027697079211c8..b5d539b612c79d75dfa143c8d84bd331323ced84 100644 --- a/app/code/Magento/Install/Block/Db/Main.php +++ b/app/code/Magento/Install/Block/Db/Main.php @@ -29,7 +29,7 @@ */ namespace Magento\Install\Block\Db; -class Main extends \Magento\Core\Block\Template +class Main extends \Magento\View\Block\Template { /** * Array of Database blocks keyed by name @@ -53,20 +53,20 @@ class Main extends \Magento\Core\Block\Template protected $_session; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Install\Model\Installer\Config $installerConfig * @param \Magento\Core\Model\Session\Generic $session * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Install\Model\Installer\Config $installerConfig, \Magento\Core\Model\Session\Generic $session, array $data = array() ) { - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); $this->_installerConfig = $installerConfig; $this->_session = $session; } @@ -94,7 +94,7 @@ class Main extends \Magento\Core\Block\Template * Retrieve database block by type * * @param string $type database model type - * @return bool|\Magento\Core\Block\Template + * @return bool|\Magento\View\Block\Template */ public function getDatabaseBlock($type) { diff --git a/app/code/Magento/Install/Block/Db/Type.php b/app/code/Magento/Install/Block/Db/Type.php index f7d338eea6b50564d72441f5e34c0e0e2fed7216..da98e41996c9a901232483623d3304589cd0fb75 100644 --- a/app/code/Magento/Install/Block/Db/Type.php +++ b/app/code/Magento/Install/Block/Db/Type.php @@ -31,7 +31,7 @@ */ namespace Magento\Install\Block\Db; -class Type extends \Magento\Core\Block\Template +class Type extends \Magento\View\Block\Template { /** * Db title @@ -55,20 +55,20 @@ class Type extends \Magento\Core\Block\Template protected $_session; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Install\Model\Installer\Config $installerConfig * @param \Magento\Core\Model\Session\Generic $session * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Install\Model\Installer\Config $installerConfig, \Magento\Core\Model\Session\Generic $session, array $data = array() ) { - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); $this->_installerConfig = $installerConfig; $this->_session = $session; } diff --git a/app/code/Magento/Install/Block/Download.php b/app/code/Magento/Install/Block/Download.php index bd7b215abd92cdfedb3fd22526abdfb0d831dcef..2538c54aecd96bcd488d814edc1b906ccf5b006d 100644 --- a/app/code/Magento/Install/Block/Download.php +++ b/app/code/Magento/Install/Block/Download.php @@ -44,8 +44,8 @@ class Download extends \Magento\Install\Block\AbstractBlock protected $_moduleReader; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Install\Model\Installer $installer * @param \Magento\Install\Model\Wizard $installWizard * @param \Magento\Core\Model\Session\Generic $session @@ -53,15 +53,15 @@ class Download extends \Magento\Install\Block\AbstractBlock * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Install\Model\Installer $installer, \Magento\Install\Model\Wizard $installWizard, \Magento\Core\Model\Session\Generic $session, \Magento\Module\Dir\Reader $moduleReader, array $data = array() ) { - parent::__construct($coreData, $context, $installer, $installWizard, $session, $data); + parent::__construct($context, $coreData, $installer, $installWizard, $session, $data); $this->_moduleReader = $moduleReader; } diff --git a/app/code/Magento/Install/Block/End.php b/app/code/Magento/Install/Block/End.php index 8f3a7f3c0563f01ad52ebb5711f12492b60dad1d..1b40bb5aaa26157c35795fe1858de39b6a7e6d9f 100644 --- a/app/code/Magento/Install/Block/End.php +++ b/app/code/Magento/Install/Block/End.php @@ -56,29 +56,29 @@ class End extends \Magento\Install\Block\AbstractBlock protected $_cryptKey; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context - * @param \Magento\Core\Model\Config $coreConfig - * @param \Magento\AdminNotification\Model\Survey $survey - * @param \Magento\Core\Model\Session\Generic $cryptKey * @param \Magento\Install\Model\Installer $installer * @param \Magento\Install\Model\Wizard $installWizard * @param \Magento\Core\Model\Session\Generic $session + * @param \Magento\Core\Model\Config $coreConfig + * @param \Magento\AdminNotification\Model\Survey $survey + * @param $cryptKey * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, - \Magento\Core\Model\Config $coreConfig, - \Magento\AdminNotification\Model\Survey $survey, - $cryptKey, \Magento\Install\Model\Installer $installer, \Magento\Install\Model\Wizard $installWizard, \Magento\Core\Model\Session\Generic $session, + \Magento\Core\Model\Config $coreConfig, + \Magento\AdminNotification\Model\Survey $survey, + $cryptKey, array $data = array() ) { $this->_cryptKey = $cryptKey; - parent::__construct($coreData, $context, $installer, $installWizard, $session, $data); + parent::__construct($context, $coreData, $installer, $installWizard, $session, $data); $this->_coreConfig = $coreConfig; $this->_survey = $survey; } diff --git a/app/code/Magento/Install/Block/Locale.php b/app/code/Magento/Install/Block/Locale.php index 5e5aed3f4b7299a06149313ffa1ed03a64e45e1d..4ccad27be7102764ddbe3438352d76873292683c 100644 --- a/app/code/Magento/Install/Block/Locale.php +++ b/app/code/Magento/Install/Block/Locale.php @@ -38,34 +38,6 @@ class Locale extends \Magento\Install\Block\AbstractBlock protected $_template = 'locale.phtml'; - /** - * @var \Magento\Core\Model\LocaleInterface - */ - protected $_locale; - - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context - * @param \Magento\Install\Model\Installer $installer - * @param \Magento\Install\Model\Wizard $installWizard - * @param \Magento\Core\Model\Session\Generic $session - * @param \Magento\Core\Model\LocaleInterface $locale - * @param array $data - */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, - \Magento\Install\Model\Installer $installer, - \Magento\Install\Model\Wizard $installWizard, - \Magento\Core\Model\Session\Generic $session, - \Magento\Core\Model\LocaleInterface $locale, - array $data = array() - ) { - parent::__construct($coreData, $context, $installer, $installWizard, $session, $data); - $this->_locale = $locale; - } - - /** * Retrieve locale object * @@ -108,7 +80,7 @@ class Locale extends \Magento\Install\Block\AbstractBlock */ public function getLocaleSelect() { - $html = $this->getLayout()->createBlock('Magento\Core\Block\Html\Select') + $html = $this->getLayout()->createBlock('Magento\View\Block\Html\Select') ->setName('config[locale]') ->setId('locale') ->setTitle(__('Locale')) @@ -126,7 +98,7 @@ class Locale extends \Magento\Install\Block\AbstractBlock */ public function getTimezoneSelect() { - $html = $this->getLayout()->createBlock('Magento\Core\Block\Html\Select') + $html = $this->getLayout()->createBlock('Magento\View\Block\Html\Select') ->setName('config[timezone]') ->setId('timezone') ->setTitle(__('Time Zone')) @@ -160,7 +132,7 @@ class Locale extends \Magento\Install\Block\AbstractBlock */ public function getCurrencySelect() { - $html = $this->getLayout()->createBlock('Magento\Core\Block\Html\Select') + $html = $this->getLayout()->createBlock('Magento\View\Block\Html\Select') ->setName('config[currency]') ->setId('currency') ->setTitle(__('Default Currency')) diff --git a/app/code/Magento/Install/Block/State.php b/app/code/Magento/Install/Block/State.php index c4786b1e3288e3417753bf22472c9f11aab2e7c3..eb11b30b60ecb4c18271a4ab7ee37979a5c9fadf 100644 --- a/app/code/Magento/Install/Block/State.php +++ b/app/code/Magento/Install/Block/State.php @@ -33,7 +33,7 @@ */ namespace Magento\Install\Block; -class State extends \Magento\Core\Block\Template +class State extends \Magento\View\Block\Template { /** * @var string @@ -55,20 +55,20 @@ class State extends \Magento\Core\Block\Template protected $_cookie; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Install\Model\Wizard $wizard * @param \Magento\Core\Model\Cookie $cookie * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Install\Model\Wizard $wizard, \Magento\Core\Model\Cookie $cookie, array $data = array() ) { - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); $this->_wizard = $wizard; $this->_cookie = $cookie; diff --git a/app/code/Magento/Install/Controller/Action.php b/app/code/Magento/Install/Controller/Action.php index 7eabca0122d5046660379762ae267b0108c03488..79d74b607fdc38e99a39305afe9bb1abbe8a097f 100644 --- a/app/code/Magento/Install/Controller/Action.php +++ b/app/code/Magento/Install/Controller/Action.php @@ -24,102 +24,17 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ - namespace Magento\Install\Controller; -class Action extends \Magento\Core\Controller\Varien\Action +class Action extends \Magento\App\Action\Action { /** - * @var \Magento\Config\Scope - */ - protected $_configScope; - - /** - * @var \Magento\View\DesignInterface - */ - protected $_viewDesign; - - /** - * @var \Magento\Core\Model\Theme\CollectionFactory - */ - protected $collectionFactory; - - /** - * Application - * - * @var \Magento\Core\Model\App - */ - protected $_app; - - /** - * Application state - * - * @var \Magento\App\State - */ - protected $_appState; - - /** - * @param \Magento\Core\Controller\Varien\Action\Context $context + * @param \Magento\App\Action\Context $context * @param \Magento\Config\Scope $configScope - * @param \Magento\View\DesignInterface $viewDesign - * @param \Magento\Core\Model\Theme\CollectionFactory $collectionFactory - * @param \Magento\Core\Model\App $app - * @param \Magento\App\State $appState */ - public function __construct( - \Magento\Core\Controller\Varien\Action\Context $context, - \Magento\Config\Scope $configScope, - \Magento\View\DesignInterface $viewDesign, - \Magento\Core\Model\Theme\CollectionFactory $collectionFactory, - \Magento\Core\Model\App $app, - \Magento\App\State $appState - ) { - $this->_configScope = $configScope; - $this->_viewDesign = $viewDesign; - $this->collectionFactory = $collectionFactory; - $this->_app = $app; - $this->_appState = $appState; - parent::__construct($context); - } - - protected function _construct() + public function __construct(\Magento\App\Action\Context $context, \Magento\Config\Scope $configScope) { - parent::_construct(); - - $this->_configScope->setCurrentScope('install'); - $this->setFlag('', self::FLAG_NO_CHECK_INSTALLATION, true); - } - - /** - * Initialize area and design - * - * @return \Magento\Install\Controller\Action - */ - protected function _initDesign() - { - $areaCode = $this->getLayout()->getArea(); - $area = $this->_app->getArea($areaCode); - $area->load(\Magento\Core\Model\App\Area::PART_CONFIG); - $this->_initDefaultTheme($areaCode); - $area->detectDesign($this->getRequest()); - $area->load(\Magento\Core\Model\App\Area::PART_TRANSLATE); - return $this; - } - - /** - * Initialize theme - * - * @param string $areaCode - * @return \Magento\Install\Controller\Action - */ - protected function _initDefaultTheme($areaCode) - { - /** @var $themesCollection \Magento\Core\Model\Theme\Collection */ - $themesCollection = $this->collectionFactory->create(); - $themeModel = $themesCollection->addDefaultPattern($areaCode) - ->addFilter('theme_path', $this->_viewDesign->getConfigurationDesignTheme($areaCode)) - ->getFirstItem(); - $this->_viewDesign->setArea($areaCode)->setDesignTheme($themeModel); - return $this; + parent::__construct($context); + $configScope->setCurrentScope('install'); } } diff --git a/app/code/Magento/Install/Controller/Index.php b/app/code/Magento/Install/Controller/Index.php index 6c62e0aecd362779a78774b55c5ca2b9c721aa88..dad316c72178ae44c747ab42196a63c9d188d806 100644 --- a/app/code/Magento/Install/Controller/Index.php +++ b/app/code/Magento/Install/Controller/Index.php @@ -33,46 +33,14 @@ namespace Magento\Install\Controller; class Index extends \Magento\Install\Controller\Action { /** - * Core directory model - * - * @var \Magento\App\Dir - */ - protected $_coreDir; - - /** - * @param \Magento\Core\Controller\Varien\Action\Context $context + * @param \Magento\App\Action\Context $context * @param \Magento\Config\Scope $configScope - * @param \Magento\View\DesignInterface $viewDesign - * @param \Magento\Core\Model\Theme\CollectionFactory $collectionFactory - * @param \Magento\Core\Model\App $app - * @param \Magento\App\State $appState - * @param \Magento\App\Dir $coreDir */ public function __construct( - \Magento\Core\Controller\Varien\Action\Context $context, - \Magento\Config\Scope $configScope, - \Magento\View\DesignInterface $viewDesign, - \Magento\Core\Model\Theme\CollectionFactory $collectionFactory, - \Magento\Core\Model\App $app, - \Magento\App\State $appState, - \Magento\App\Dir $coreDir + \Magento\App\Action\Context $context, + \Magento\Config\Scope $configScope ) { - $this->_coreDir = $coreDir; - parent::__construct($context, $configScope, $viewDesign, $collectionFactory, $app, $appState); - } - - /** - * Dispatch event before action - */ - public function preDispatch() - { - $this->setFlag('', self::FLAG_NO_CHECK_INSTALLATION, true); - if (!$this->_appState->isInstalled()) { - foreach (glob($this->_coreDir->getDir(\Magento\App\Dir::VAR_DIR) . '/*', GLOB_ONLYDIR) as $dir) { - \Magento\Io\File::rmdirRecursive($dir); - } - } - parent::preDispatch(); + parent::__construct($context, $configScope); } /** diff --git a/app/code/Magento/Install/Controller/Wizard.php b/app/code/Magento/Install/Controller/Wizard.php index fca33f531d1a49f4b813b535b64ab36c9c762621..9fff9f4b7d5de2a4d37332f52519618bc9b6d676 100644 --- a/app/code/Magento/Install/Controller/Wizard.php +++ b/app/code/Magento/Install/Controller/Wizard.php @@ -29,8 +29,18 @@ */ namespace Magento\Install\Controller; +use Magento\App\Action\NotFoundException; +use Magento\App\RequestInterface; + class Wizard extends \Magento\Install\Controller\Action { + /** + * Application state + * + * @var \Magento\App\State + */ + protected $_appState; + /** * Installer Model * @@ -60,44 +70,32 @@ class Wizard extends \Magento\Install\Controller\Action protected $_dbUpdater; /** - * Store Manager - * - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - - /** - * @param \Magento\Core\Controller\Varien\Action\Context $context + * @param \Magento\App\Action\Context $context * @param \Magento\Config\Scope $configScope - * @param \Magento\View\DesignInterface $viewDesign - * @param \Magento\Core\Model\Theme\CollectionFactory $collectionFactory - * @param \Magento\Core\Model\App $app - * @param \Magento\App\State $appState * @param \Magento\Install\Model\Installer $installer * @param \Magento\Install\Model\Wizard $wizard * @param \Magento\Core\Model\Session\Generic $session * @param \Magento\Module\UpdaterInterface $dbUpdater * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\App\State $appState */ public function __construct( - \Magento\Core\Controller\Varien\Action\Context $context, + \Magento\App\Action\Context $context, \Magento\Config\Scope $configScope, - \Magento\View\DesignInterface $viewDesign, - \Magento\Core\Model\Theme\CollectionFactory $collectionFactory, - \Magento\Core\Model\App $app, - \Magento\App\State $appState, \Magento\Install\Model\Installer $installer, \Magento\Install\Model\Wizard $wizard, \Magento\Core\Model\Session\Generic $session, \Magento\Module\UpdaterInterface $dbUpdater, - \Magento\Core\Model\StoreManagerInterface $storeManager + \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\App\State $appState ) { + $this->_storeManager = $storeManager; + parent::__construct($context, $configScope); $this->_installer = $installer; $this->_wizard = $wizard; $this->_session = $session; $this->_dbUpdater = $dbUpdater; - $this->_storeManager = $storeManager; - parent::__construct($context, $configScope, $viewDesign, $collectionFactory, $app, $appState); + $this->_appState = $appState; } /** @@ -106,18 +104,16 @@ class Wizard extends \Magento\Install\Controller\Action * Redirect out if system is already installed * Throw a bootstrap exception if page cannot be displayed due to mis-configured base directories * - * @throws \Magento\BootstrapException + * @param RequestInterface $request + * @return mixed */ - public function preDispatch() + public function dispatch(RequestInterface $request) { if ($this->_appState->isInstalled()) { - $this->setFlag('', self::FLAG_NO_DISPATCH, true); + $this->_actionFlag->set('', self::FLAG_NO_DISPATCH, true); $this->_redirect('/'); - return; } - - $this->setFlag('', self::FLAG_NO_CHECK_INSTALLATION, true); - return parent::preDispatch(); + return parent::dispatch($request); } /** @@ -147,13 +143,13 @@ class Wizard extends \Magento\Install\Controller\Action */ protected function _prepareLayout() { - $this->loadLayout('install_wizard'); + $this->_view->loadLayout('install_wizard'); $step = $this->_getWizard()->getStepByRequest($this->getRequest()); if ($step) { $step->setActive(true); } - $this->getLayout()->addBlock('Magento\Install\Block\State', 'install.state', 'left'); + $this->_view->getLayout()->addBlock('Magento\Install\Block\State', 'install.state', 'left'); return $this; } @@ -189,15 +185,15 @@ class Wizard extends \Magento\Install\Controller\Action { $this->_checkIfInstalled(); - $this->setFlag('', self::FLAG_NO_DISPATCH_BLOCK_EVENT, true); - $this->setFlag('', self::FLAG_NO_POST_DISPATCH, true); + $this->_actionFlag->set('', self::FLAG_NO_DISPATCH_BLOCK_EVENT, true); + $this->_actionFlag->set('', self::FLAG_NO_POST_DISPATCH, true); $this->_prepareLayout(); - $this->_initLayoutMessages('Magento\Install\Model\Session'); + $this->_view->getLayout()->initMessages('Magento\Install\Model\Session'); - $this->getLayout()->addBlock('Magento\Install\Block\Begin', 'install.begin', 'content'); + $this->_view->getLayout()->addBlock('Magento\Install\Block\Begin', 'install.begin', 'content'); - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -221,14 +217,14 @@ class Wizard extends \Magento\Install\Controller\Action public function localeAction() { $this->_checkIfInstalled(); - $this->setFlag('', self::FLAG_NO_DISPATCH_BLOCK_EVENT, true); - $this->setFlag('', self::FLAG_NO_POST_DISPATCH, true); + $this->_actionFlag->set('', self::FLAG_NO_DISPATCH_BLOCK_EVENT, true); + $this->_actionFlag->set('', self::FLAG_NO_POST_DISPATCH, true); $this->_prepareLayout(); - $this->_initLayoutMessages('Magento\Install\Model\Session'); - $this->getLayout()->addBlock('Magento\Install\Block\Locale', 'install.locale', 'content'); + $this->_view->getLayout()->initMessages('Magento\Install\Model\Session'); + $this->_view->getLayout()->addBlock('Magento\Install\Block\Locale', 'install.locale', 'content'); - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -272,14 +268,14 @@ class Wizard extends \Magento\Install\Controller\Action public function downloadAction() { $this->_checkIfInstalled(); - $this->setFlag('', self::FLAG_NO_DISPATCH_BLOCK_EVENT, true); - $this->setFlag('', self::FLAG_NO_POST_DISPATCH, true); + $this->_actionFlag->set('', self::FLAG_NO_DISPATCH_BLOCK_EVENT, true); + $this->_actionFlag->set('', self::FLAG_NO_POST_DISPATCH, true); $this->_prepareLayout(); - $this->_initLayoutMessages('Magento\Install\Model\Session'); - $this->getLayout()->addBlock('Magento\Install\Block\Download', 'install.download', 'content'); + $this->_view->getLayout()->initMessages('Magento\Install\Model\Session'); + $this->_view->getLayout()->addBlock('Magento\Install\Block\Download', 'install.download', 'content'); - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -347,7 +343,7 @@ class Wizard extends \Magento\Install\Controller\Action $params['failure_callback'] = array($this, 'installFailureCallback'); } $pear->runHtmlConsole($params); - $this->_frontController->getResponse()->clearAllHeaders(); + $this->getResponse()->clearAllHeaders(); } /** @@ -383,8 +379,8 @@ class Wizard extends \Magento\Install\Controller\Action $this->_checkIfInstalled(); $this->_getInstaller()->checkServer(); - $this->setFlag('', self::FLAG_NO_DISPATCH_BLOCK_EVENT, true); - $this->setFlag('', self::FLAG_NO_POST_DISPATCH, true); + $this->_actionFlag->set('', self::FLAG_NO_DISPATCH_BLOCK_EVENT, true); + $this->_actionFlag->set('', self::FLAG_NO_POST_DISPATCH, true); $data = $this->getRequest()->getQuery('config'); if ($data) { @@ -392,10 +388,10 @@ class Wizard extends \Magento\Install\Controller\Action } $this->_prepareLayout(); - $this->_initLayoutMessages('Magento\Install\Model\Session'); - $this->getLayout()->addBlock('Magento\Install\Block\Config', 'install.config', 'content'); + $this->_view->getLayout()->initMessages('Magento\Install\Model\Session'); + $this->_view->getLayout()->addBlock('Magento\Install\Block\Config', 'install.config', 'content'); - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -461,10 +457,10 @@ class Wizard extends \Magento\Install\Controller\Action $this->_checkIfInstalled(); $this->_prepareLayout(); - $this->_initLayoutMessages('Magento\Install\Model\Session'); + $this->_view->getLayout()->initMessages('Magento\Install\Model\Session'); - $this->getLayout()->addBlock('Magento\Install\Block\Admin', 'install.administrator', 'content'); - $this->renderLayout(); + $this->_view->getLayout()->addBlock('Magento\Install\Block\Admin', 'install.administrator', 'content'); + $this->_view->renderLayout(); } /** @@ -511,10 +507,10 @@ class Wizard extends \Magento\Install\Controller\Action $this->_objectManager->get('Magento\AdminNotification\Model\Survey')->saveSurveyViewed(true); $this->_prepareLayout(); - $this->_initLayoutMessages('Magento\Install\Model\Session'); + $this->_view->getLayout()->initMessages('Magento\Install\Model\Session'); - $this->getLayout()->addBlock('Magento\Install\Block\End', 'install.end', 'content'); - $this->renderLayout(); + $this->_view->getLayout()->addBlock('Magento\Install\Block\End', 'install.end', 'content'); + $this->_view->renderLayout(); $this->_session->clear(); } } diff --git a/app/code/Magento/Install/Helper/Data.php b/app/code/Magento/Install/Helper/Data.php index 26e3afa8b42637735c4dc25883abd6c0f0937a39..b7bd0bb94d636e9dd933e41c5fa98307898caa4e 100644 --- a/app/code/Magento/Install/Helper/Data.php +++ b/app/code/Magento/Install/Helper/Data.php @@ -29,6 +29,6 @@ */ namespace Magento\Install\Helper; -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { } diff --git a/app/code/Magento/Install/Model/Installer/Console.php b/app/code/Magento/Install/Model/Installer/Console.php index 22d41dcbdc30dcc8e5615a334c28e1df6a4145ea..8eebe52e3f3c63be6ed1e5c6cea3e37d429f9dcd 100644 --- a/app/code/Magento/Install/Model/Installer/Console.php +++ b/app/code/Magento/Install/Model/Installer/Console.php @@ -374,7 +374,7 @@ class Console extends \Magento\Install\Model\Installer\AbstractInstaller return $encryptionKey; } catch (\Exception $e) { if ($e instanceof \Magento\Core\Exception) { - foreach ($e->getMessages(\Magento\Core\Model\Message::ERROR) as $errorMessage) { + foreach ($e->getMessages(\Magento\Message\Factory::ERROR) as $errorMessage) { $this->addError($errorMessage); } } else { diff --git a/app/code/Magento/Install/etc/install/di.xml b/app/code/Magento/Install/etc/install/di.xml index 68d9ba117725726978afa696427fa79c7459e2f4..b178b8905548b345b7869c720534335b309a812c 100644 --- a/app/code/Magento/Install/etc/install/di.xml +++ b/app/code/Magento/Install/etc/install/di.xml @@ -36,4 +36,11 @@ </value> </param> </type> + <type name="Magento\Install\Controller\Action"> + <plugin name="installInitializer" disabled="true" /> + <plugin name="designLoader" type="Magento\Install\App\Action\Plugin\Design" /> + </type> + <type name="Magento\Install\Controller\Index"> + <plugin name="directoryCleaner" type="Magento\Install\App\Action\Plugin\Dir" sortOrder="10"/> + </type> </config> diff --git a/app/code/Magento/Install/view/install/layout/install_wizard.xml b/app/code/Magento/Install/view/install/layout/install_wizard.xml index 275de31d64f2022c2bf278a7c08fe5d07c7f1e68..c955a0c29049384fc833642ca7cc105c94e32f03 100644 --- a/app/code/Magento/Install/view/install/layout/install_wizard.xml +++ b/app/code/Magento/Install/view/install/layout/install_wizard.xml @@ -24,7 +24,7 @@ */ --> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <block class="Magento\Core\Block\Template" name="root" output="1"> + <block class="Magento\View\Block\Template" name="root" output="1"> <action method="setTemplate"> <argument name="template" xsi:type="string">Magento_Install::page.phtml</argument> </action> diff --git a/app/code/Magento/Integration/Block/Adminhtml/Integration/Edit.php b/app/code/Magento/Integration/Block/Adminhtml/Integration/Edit.php index 457cd8a66c2e53e4cf99aa616975aaebe83533af..59f577305daa7b4d8f6479cbc9d3eeb007011b54 100644 --- a/app/code/Magento/Integration/Block/Adminhtml/Integration/Edit.php +++ b/app/code/Magento/Integration/Block/Adminhtml/Integration/Edit.php @@ -36,22 +36,20 @@ class Edit extends \Magento\Adminhtml\Block\Widget\Form\Container */ protected $_registry = null; - /** - * Initialize dependencies. - * - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_registry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Integration/Block/Adminhtml/Integration/Edit/Tab/Info.php b/app/code/Magento/Integration/Block/Adminhtml/Integration/Edit/Tab/Info.php index 1280eca8bfa944c76bead0c0640b1b90ccd84445..36a404873d3be687856bc8df18293e19040539ef 100644 --- a/app/code/Magento/Integration/Block/Adminhtml/Integration/Edit/Tab/Info.php +++ b/app/code/Magento/Integration/Block/Adminhtml/Integration/Edit/Tab/Info.php @@ -52,25 +52,23 @@ class Info extends \Magento\Backend\Block\Widget\Form\Generic const DATA_ENDPOINT = 'endpoint'; /**#@-*/ - /** - * Construct - * - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data - * @param \Magento\Integration\Model\Integration\Source\Authentication $authTypeSource + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Integration\Model\Integration\Source\Authentication $authTypeSource + * @param array $data */ - public function __construct( - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Integration\Model\Integration\Source\Authentication $authTypeSource, - array $data = array() - ) { - parent::__construct($registry, $formFactory, $coreData, $context, $data); + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Integration\Model\Integration\Source\Authentication $authTypeSource, + array $data = array() + ) { + parent::__construct($context, $coreData, $registry, $formFactory, $data); $this->_authTypeSource = $authTypeSource; } diff --git a/app/code/Magento/Integration/Controller/Adminhtml/Integration.php b/app/code/Magento/Integration/Controller/Adminhtml/Integration.php index c9af1a0b16bf98a797079d15306658405da9a008..5534a570ba037d9f7ca901f0bbf5cb4b575acdc8 100644 --- a/app/code/Magento/Integration/Controller/Adminhtml/Integration.php +++ b/app/code/Magento/Integration/Controller/Adminhtml/Integration.php @@ -23,11 +23,12 @@ */ namespace Magento\Integration\Controller\Adminhtml; +use Magento\Backend\App\Action; use Magento\Integration\Block\Adminhtml\Integration\Edit\Tab\Info; /** * Controller for integrations management. */ -class Integration extends \Magento\Backend\Controller\Adminhtml\Action +class Integration extends \Magento\Backend\App\Action { /** Param Key for extracting integration id from Request */ const PARAM_INTEGRATION_ID = 'id'; @@ -46,12 +47,12 @@ class Integration extends \Magento\Backend\Controller\Adminhtml\Action private $_integrationService; /** - * @param \Magento\Backend\Controller\Context $context + * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Integration\Service\IntegrationV1Interface $integrationService * @param \Magento\Core\Model\Registry $registry */ public function __construct( - \Magento\Backend\Controller\Context $context, + \Magento\Backend\App\Action\Context $context, \Magento\Integration\Service\IntegrationV1Interface $integrationService, \Magento\Core\Model\Registry $registry ) { @@ -65,11 +66,11 @@ class Integration extends \Magento\Backend\Controller\Adminhtml\Action */ public function indexAction() { - $this->loadLayout(); + $this->_view->loadLayout(); $this->_setActiveMenu('Magento_Integration::system_integrations'); $this->_addBreadcrumb(__('Integrations'), __('Integrations')); - $this->_title(__('Integrations')); - $this->renderLayout(); + $this->_title->add(__('Integrations')); + $this->_view->renderLayout(); } /** @@ -77,8 +78,8 @@ class Integration extends \Magento\Backend\Controller\Adminhtml\Action */ public function gridAction() { - $this->loadLayout(false); - $this->renderLayout(); + $this->_view->loadLayout(false); + $this->_view->renderLayout(); } /** @@ -96,17 +97,17 @@ class Integration extends \Magento\Backend\Controller\Adminhtml\Action */ public function newAction() { - $this->loadLayout(); + $this->_view->loadLayout(); $this->_setActiveMenu('Magento_Integration::system_integrations'); $this->_addBreadcrumb(__('New Integration'), __('New Integration')); - $this->_title(__('New Integration')); + $this->_title->add(__('New Integration')); /** Try to recover integration data from session if it was added during previous request which failed. */ $restoredIntegration = $this->_getSession()->getIntegrationData(); if ($restoredIntegration) { $this->_registry->register(self::REGISTRY_KEY_CURRENT_INTEGRATION, $restoredIntegration); $this->_getSession()->setIntegrationData(array()); } - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -135,15 +136,15 @@ class Integration extends \Magento\Backend\Controller\Adminhtml\Action $this->_redirect('*/*/'); return; } - $this->loadLayout(); + $this->_view->loadLayout(); $this->_getSession()->setIntegrationData(array()); $this->_setActiveMenu('Magento_Integration::system_integrations'); $this->_addBreadcrumb( __('Edit "%1" Integration', $integrationData[Info::DATA_NAME]), __('Edit "%1" Integration', $integrationData[Info::DATA_NAME]) ); - $this->_title(__('Edit "%1" Integration', $integrationData[Info::DATA_NAME])); - $this->renderLayout(); + $this->_title->add(__('Edit "%1" Integration', $integrationData[Info::DATA_NAME])); + $this->_view->renderLayout(); } /** diff --git a/app/code/Magento/Integration/Controller/Token.php b/app/code/Magento/Integration/Controller/Token.php index 8ce7183187705fadc44b2f38b41e2cde3eb1cf31..1a8c6185628b4216917422d8d41633b23dfaf626 100644 --- a/app/code/Magento/Integration/Controller/Token.php +++ b/app/code/Magento/Integration/Controller/Token.php @@ -27,7 +27,7 @@ */ namespace Magento\Integration\Controller; -class Token extends \Magento\Core\Controller\Front\Action +class Token extends \Magento\App\Action\Action { /** @var \Magento\Oauth\OauthInterface */ protected $_oauthService; @@ -35,13 +35,13 @@ class Token extends \Magento\Core\Controller\Front\Action /** @var \Magento\Oauth\Helper\Request */ protected $_helper; - /** + /*** + * @param \Magento\App\Action\Context $context * @param \Magento\Oauth\OauthInterface $oauthService - * @param \Magento\Core\Controller\Varien\Action\Context $context * @param \Magento\Oauth\Helper\Request $helper */ public function __construct( - \Magento\Core\Controller\Varien\Action\Context $context, + \Magento\App\Action\Context $context, \Magento\Oauth\OauthInterface $oauthService, \Magento\Oauth\Helper\Request $helper ) { diff --git a/app/code/Magento/Integration/Helper/Data.php b/app/code/Magento/Integration/Helper/Data.php index ff6e3ec78d520f6c98b0ea6565990c78c777b17f..88b0684b8e07fa11b93eb349872a4d329ab93dd3 100644 --- a/app/code/Magento/Integration/Helper/Data.php +++ b/app/code/Magento/Integration/Helper/Data.php @@ -26,7 +26,7 @@ namespace Magento\Integration\Helper; -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { } diff --git a/app/code/Magento/Integration/Model/Config/Api/Converter.php b/app/code/Magento/Integration/Model/Config/Api/Converter.php new file mode 100644 index 0000000000000000000000000000000000000000..a3aa892069ac279ef677e6f93f6425cb2a12047e --- /dev/null +++ b/app/code/Magento/Integration/Model/Config/Api/Converter.php @@ -0,0 +1,67 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +namespace Magento\Integration\Model\Config\Api; + +/** + * Converter of api.xml content into array format. + */ +class Converter implements \Magento\Config\ConverterInterface +{ + /**#@+ + * Array keys for config internal representation. + */ + const API_RESOURCES = 'resources'; + const API_RESOURCE_NAME = 'name'; + /**#@-*/ + + /** + * {@inheritdoc} + */ + public function convert($source) + { + $result = array(); + /** @var \DOMNodeList $integrations */ + $integrations = $source->getElementsByTagName('integration'); + /** @var \DOMElement $integration */ + foreach ($integrations as $integration) { + if ($integration->nodeType != XML_ELEMENT_NODE) { + continue; + } + $integrationId = $integration->attributes->getNamedItem('id')->nodeValue; + $result[$integrationId] = array(); + $result[$integrationId][self::API_RESOURCES] = array(); + /** @var \DOMNodeList $resources */ + $resources = $integration->getElementsByTagName('resource'); + /** @var \DOMElement $resource */ + foreach ($resources as $resource) { + if ($resource->nodeType != XML_ELEMENT_NODE) { + continue; + } + $resource = $resource->attributes->getNamedItem('name')->nodeValue; + $result[$integrationId][self::API_RESOURCES][] = $resource; + } + } + return $result; + } +} \ No newline at end of file diff --git a/app/code/Magento/Integration/Model/Config/Api/Reader.php b/app/code/Magento/Integration/Model/Config/Api/Reader.php new file mode 100644 index 0000000000000000000000000000000000000000..1e23f8f579a40d5a7fdd3e580607b27b7dcdd98b --- /dev/null +++ b/app/code/Magento/Integration/Model/Config/Api/Reader.php @@ -0,0 +1,57 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +namespace Magento\Integration\Model\Config\Api; + +/** + * Service config data reader. + */ +class Reader extends \Magento\Config\Reader\Filesystem +{ + /** + * List of id attributes for merge + * + * @var array + */ + protected $_idAttributes = array( + '/config/service' => 'class', + '/config/service/rest-route' => 'method', + ); + + /** + * @param \Magento\Config\FileResolverInterface $fileResolver + * @param \Magento\Integration\Model\Config\Api\Converter $converter + * @param \Magento\Integration\Model\Config\Api\SchemaLocator $schemeLocator + * @param \Magento\Config\ValidationStateInterface $validationState + * @param string $fileName + */ + public function __construct( + \Magento\Config\FileResolverInterface $fileResolver, + \Magento\Integration\Model\Config\Api\Converter $converter, + \Magento\Integration\Model\Config\Api\SchemaLocator $schemeLocator, + \Magento\Config\ValidationStateInterface $validationState, + $fileName = 'integration\api.xml' + ) { + parent::__construct($fileResolver, $converter, $schemeLocator, $validationState, $fileName); + } +} diff --git a/app/code/Magento/Integration/Model/Config/Api/SchemaLocator.php b/app/code/Magento/Integration/Model/Config/Api/SchemaLocator.php new file mode 100644 index 0000000000000000000000000000000000000000..4c20b5f22cbe18a14ed456d6c8f6297e51a058b8 --- /dev/null +++ b/app/code/Magento/Integration/Model/Config/Api/SchemaLocator.php @@ -0,0 +1,73 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +namespace Magento\Integration\Model\Config\Api; + +/** + * Integration config schema locator. + */ +class SchemaLocator implements \Magento\Config\SchemaLocatorInterface +{ + /** + * Path to corresponding XSD file with validation rules for merged config + * + * @var string + */ + protected $_schema = null; + + /** + * Path to corresponding XSD file with validation rules for separate config files + * + * @var string + */ + protected $_perFileSchema = null; + + /** + * @param \Magento\Module\Dir\Reader $moduleReader + */ + public function __construct(\Magento\Module\Dir\Reader $moduleReader) + { + $this->_schema = $moduleReader->getModuleDir('etc', 'Magento_Integration') . DIRECTORY_SEPARATOR . + DIRECTORY_SEPARATOR . 'integration' . DIRECTORY_SEPARATOR . 'api.xsd'; + } + + /** + * Get path to merged config schema + * + * @return string|null + */ + public function getSchema() + { + return $this->_schema; + } + + /** + * Get path to per file validation schema + * + * @return string|null + */ + public function getPerFileSchema() + { + return $this->_perFileSchema; + } +} diff --git a/app/code/Magento/Integration/Model/Config/Converter.php b/app/code/Magento/Integration/Model/Config/Converter.php new file mode 100644 index 0000000000000000000000000000000000000000..f7674e037d034fea87f0cffc85329b7ad0f5bd2b --- /dev/null +++ b/app/code/Magento/Integration/Model/Config/Converter.php @@ -0,0 +1,82 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +namespace Magento\Integration\Model\Config; + +/** + * Converter of integration.xml content into array format. + */ +class Converter implements \Magento\Config\ConverterInterface +{ + /**#@+ + * Array keys for config internal representation. + */ + const KEY_NAME = 'name'; + const KEY_EMAIL = 'email'; + const KEY_AUTHENTICATION = 'authentication'; + const KEY_AUTHENTICATION_TYPE = 'type'; + const KEY_AUTHENTICATION_ENDPOINT_URL = 'endpoint_url'; + /**#@-*/ + + /** + * {@inheritdoc} + */ + public function convert($source) + { + $result = array(); + /** @var \DOMNodeList $integrations */ + $integrations = $source->getElementsByTagName('integration'); + /** @var \DOMElement $integration */ + foreach ($integrations as $integration) { + if ($integration->nodeType != XML_ELEMENT_NODE) { + continue; + } + $integrationId = $integration->attributes->getNamedItem('id')->nodeValue; + $result[$integrationId] = array(); + + /** @var \DOMElement $name */ + $name = $integration->getElementsByTagName('name')->item(0)->nodeValue; + $result[$integrationId][self::KEY_NAME] = $name; + + /** @var \DOMElement $email */ + $email = $integration->getElementsByTagName('email')->item(0)->nodeValue; + $result[$integrationId][self::KEY_EMAIL] = $email; + + /** @var \DOMNodeList $authentication */ + $authentication = $integration->getElementsByTagName('authentication')->item(0); + + $authenticationType = $authentication->attributes->getNamedItem('type')->nodeValue; + $result[$integrationId][self::KEY_AUTHENTICATION] = array( + self::KEY_AUTHENTICATION_TYPE => $authenticationType + ); + + /** @var \DOMElement $endpointUrl */ + $endpointUrl = $integration->getElementsByTagName('endpoint_url')->item(0); + if ($endpointUrl) { + $result[$integrationId][self::KEY_AUTHENTICATION][self::KEY_AUTHENTICATION_ENDPOINT_URL] = + $endpointUrl->nodeValue; + } + } + return $result; + } +} diff --git a/app/code/Magento/Integration/Model/Config/Reader.php b/app/code/Magento/Integration/Model/Config/Reader.php new file mode 100644 index 0000000000000000000000000000000000000000..ed33b48afe185afba5a91670ae3ffe40801c9ba1 --- /dev/null +++ b/app/code/Magento/Integration/Model/Config/Reader.php @@ -0,0 +1,57 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +namespace Magento\Integration\Model\Config; + +/** + * Service config data reader. + */ +class Reader extends \Magento\Config\Reader\Filesystem +{ + /** + * List of id attributes for merge + * + * @var array + */ + protected $_idAttributes = array( + '/config/service' => 'class', + '/config/service/rest-route' => 'method', + ); + + /** + * @param \Magento\Config\FileResolverInterface $fileResolver + * @param \Magento\Integration\Model\Config\Converter $converter + * @param \Magento\Integration\Model\Config\SchemaLocator $schemeLocator + * @param \Magento\Config\ValidationStateInterface $validationState + * @param string $fileName + */ + public function __construct( + \Magento\Config\FileResolverInterface $fileResolver, + \Magento\Integration\Model\Config\Converter $converter, + \Magento\Integration\Model\Config\SchemaLocator $schemeLocator, + \Magento\Config\ValidationStateInterface $validationState, + $fileName = 'integration\config.xml' + ) { + parent::__construct($fileResolver, $converter, $schemeLocator, $validationState, $fileName); + } +} diff --git a/app/code/Magento/Integration/Model/Config/SchemaLocator.php b/app/code/Magento/Integration/Model/Config/SchemaLocator.php new file mode 100644 index 0000000000000000000000000000000000000000..1d64acb9b78135e0b62387968e7c743713e4d8d3 --- /dev/null +++ b/app/code/Magento/Integration/Model/Config/SchemaLocator.php @@ -0,0 +1,73 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +namespace Magento\Integration\Model\Config; + +/** + * Integration config schema locator. + */ +class SchemaLocator implements \Magento\Config\SchemaLocatorInterface +{ + /** + * Path to corresponding XSD file with validation rules for merged config + * + * @var string + */ + protected $_schema = null; + + /** + * Path to corresponding XSD file with validation rules for separate config files + * + * @var string + */ + protected $_perFileSchema = null; + + /** + * @param \Magento\Module\Dir\Reader $moduleReader + */ + public function __construct(\Magento\Module\Dir\Reader $moduleReader) + { + $this->_schema = $moduleReader->getModuleDir('etc', 'Magento_Integration') . DIRECTORY_SEPARATOR . + DIRECTORY_SEPARATOR . 'integration' . DIRECTORY_SEPARATOR . 'config.xsd'; + } + + /** + * Get path to merged config schema + * + * @return string|null + */ + public function getSchema() + { + return $this->_schema; + } + + /** + * Get path to per file validation schema + * + * @return string|null + */ + public function getPerFileSchema() + { + return $this->_perFileSchema; + } +} diff --git a/app/code/Magento/Integration/etc/integration/api.xsd b/app/code/Magento/Integration/etc/integration/api.xsd new file mode 100644 index 0000000000000000000000000000000000000000..4ebf914fc08a77781b3691582733daf42abc7df4 --- /dev/null +++ b/app/code/Magento/Integration/etc/integration/api.xsd @@ -0,0 +1,63 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +/** + * Schema for API integration configuration. + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> + <xs:element name="integrations" type="integrationsType"/> + <xs:complexType name="integrationsType"> + <xs:sequence> + <xs:element name="integration" type="integrationType" maxOccurs="unbounded" minOccurs="1"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="integrationType"> + <xs:sequence> + <xs:element name="resources" type="resourcesType"/> + </xs:sequence> + <xs:attribute name="id" type="integrationIdType" use="required"/> + </xs:complexType> + <xs:complexType name="resourcesType"> + <xs:sequence> + <xs:element name="resource" type="resourceType" maxOccurs="unbounded" minOccurs="1"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="resourceType"> + <xs:simpleContent> + <xs:extension base="xs:string"> + <xs:attribute name="name" type="resourceNameType" use="required"/> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + <xs:simpleType name="resourceNameType"> + <xs:restriction base="xs:string"> + <xs:pattern value=".+_.+::.+"/> + </xs:restriction> + </xs:simpleType> + <xs:simpleType name="integrationIdType"> + <xs:restriction base="xs:string"> + <xs:minLength value="2"/> + </xs:restriction> + </xs:simpleType> +</xs:schema> diff --git a/app/code/Magento/Integration/etc/integration/config.xsd b/app/code/Magento/Integration/etc/integration/config.xsd new file mode 100644 index 0000000000000000000000000000000000000000..5950721c7d8d5984fb8fe40eb0a038295f8e7992 --- /dev/null +++ b/app/code/Magento/Integration/etc/integration/config.xsd @@ -0,0 +1,75 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +/** + * Schema for integration configuration. + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> + <xs:element name="integrations" type="integrationsType"/> + <xs:complexType name="integrationsType"> + <xs:sequence> + <xs:element name="integration" type="integrationType" maxOccurs="unbounded" minOccurs="1"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="integrationType"> + <xs:sequence> + <xs:element name="name" type="integrationNameType"/> + <xs:element name="email" type="emailType"/> + <xs:element name="authentication" type="authenticationType"/> + </xs:sequence> + <xs:attribute name="id" type="integrationIdType" use="required"/> + </xs:complexType> + <xs:complexType name="authenticationType"> + <xs:sequence> + <xs:element name="endpoint_url" type="urlType" minOccurs="0"/> + </xs:sequence> + <xs:attribute name="type" type="authenticationTypeType" use="required"/> + </xs:complexType> + <xs:simpleType name="authenticationTypeType"> + <xs:restriction base="xs:string"> + <xs:enumeration value="oauth"/> + <xs:enumeration value="manual"/> + </xs:restriction> + </xs:simpleType> + <xs:simpleType name="urlType"> + <xs:restriction base="xs:anyURI"> + <xs:minLength value="4"/> + </xs:restriction> + </xs:simpleType> + <xs:simpleType name="integrationNameType"> + <xs:restriction base="xs:string"> + <xs:minLength value="2"/> + </xs:restriction> + </xs:simpleType> + <xs:simpleType name="emailType"> + <xs:restriction base="xs:string"> + <xs:pattern value="[^@]+@[^\.]+\..+"/> + </xs:restriction> + </xs:simpleType> + <xs:simpleType name="integrationIdType"> + <xs:restriction base="xs:string"> + <xs:minLength value="2"/> + </xs:restriction> + </xs:simpleType> +</xs:schema> diff --git a/app/code/Magento/Log/Helper/Data.php b/app/code/Magento/Log/Helper/Data.php index 18e5ecfd142f5e064974ad9576ffe37de486ded5..a084e77692276829bec342d03bbabe49407651e8 100644 --- a/app/code/Magento/Log/Helper/Data.php +++ b/app/code/Magento/Log/Helper/Data.php @@ -29,7 +29,7 @@ */ namespace Magento\Log\Helper; -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { } diff --git a/app/code/Magento/Log/Model/Cron.php b/app/code/Magento/Log/Model/Cron.php index 1081b70baa7f66240597f21c86a2903a8fd4801a..d94d838949aed09819b43025b6e38f5ed921ffa5 100644 --- a/app/code/Magento/Log/Model/Cron.php +++ b/app/code/Magento/Log/Model/Cron.php @@ -71,12 +71,12 @@ class Cron extends \Magento\Core\Model\AbstractModel protected $_log; /** - * @var \Magento\Core\Model\Email\TemplateFactory + * @var \Magento\Email\Model\TemplateFactory */ protected $_templateFactory; /** - * @param \Magento\Core\Model\Email\TemplateFactory $templateFactory + * @param \Magento\Email\Model\TemplateFactory $templateFactory * @param \Magento\Log\Model\Log $log * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Translate $translate @@ -88,7 +88,7 @@ class Cron extends \Magento\Core\Model\AbstractModel * @param array $data */ public function __construct( - \Magento\Core\Model\Email\TemplateFactory $templateFactory, + \Magento\Email\Model\TemplateFactory $templateFactory, \Magento\Log\Model\Log $log, \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Translate $translate, @@ -125,7 +125,7 @@ class Cron extends \Magento\Core\Model\AbstractModel $this->_translate->setTranslateInline(false); $emailTemplate = $this->_templateFactory->create(); - /* @var $emailTemplate \Magento\Core\Model\Email\Template */ + /* @var $emailTemplate \Magento\Email\Model\Template */ $emailTemplate->setDesignConfig( array( 'area' => 'backend', diff --git a/app/code/Magento/Log/Model/Visitor.php b/app/code/Magento/Log/Model/Visitor.php index 383955d049a4c5c27f75cf0446f0fac6333a029a..9e4deb50052b9e354437a7d3147e68283f6d43ce 100644 --- a/app/code/Magento/Log/Model/Visitor.php +++ b/app/code/Magento/Log/Model/Visitor.php @@ -54,13 +54,6 @@ class Visitor extends \Magento\Core\Model\AbstractModel */ protected $_ignoredUserAgents; - /** - * Core event manager proxy - * - * @var \Magento\Event\ManagerInterface - */ - protected $_eventManager = null; - /** * Core store config * @@ -124,7 +117,6 @@ class Visitor extends \Magento\Core\Model\AbstractModel * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry * @param \Magento\Core\Model\Store\Config $coreStoreConfig - * @param \Magento\Event\ManagerInterface $eventManager * @param \Magento\Customer\Model\CustomerFactory $customerFactory * @param \Magento\Sales\Model\QuoteFactory $quoteFactory * @param \Magento\Core\Model\Session $session @@ -146,7 +138,6 @@ class Visitor extends \Magento\Core\Model\AbstractModel \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, \Magento\Core\Model\Store\Config $coreStoreConfig, - \Magento\Event\ManagerInterface $eventManager, \Magento\Customer\Model\CustomerFactory $customerFactory, \Magento\Sales\Model\QuoteFactory $quoteFactory, \Magento\Core\Model\Session $session, @@ -163,7 +154,6 @@ class Visitor extends \Magento\Core\Model\AbstractModel \Magento\Data\Collection\Db $resourceCollection = null ) { $this->_coreStoreConfig = $coreStoreConfig; - $this->_eventManager = $eventManager; $this->_customerFactory = $customerFactory; $this->_quoteFactory = $quoteFactory; $this->_session = $session; diff --git a/app/code/Magento/Log/Model/Visitor/Online.php b/app/code/Magento/Log/Model/Visitor/Online.php index e526e35db4dffd1d774f2941bb59eb10cd14363a..379d0f05895fd5e507c00c226a72ca502dd1a697 100644 --- a/app/code/Magento/Log/Model/Visitor/Online.php +++ b/app/code/Magento/Log/Model/Visitor/Online.php @@ -61,12 +61,6 @@ class Online extends \Magento\Core\Model\AbstractModel protected $_coreStoreConfig; /** - * @var \Magento\App\CacheInterface - */ - protected $_cache; - - /** - * @param \Magento\App\CacheInterface $cache * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry * @param \Magento\Core\Model\Store\Config $coreStoreConfig @@ -75,7 +69,6 @@ class Online extends \Magento\Core\Model\AbstractModel * @param array $data */ public function __construct( - \Magento\App\CacheInterface $cache, \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, \Magento\Core\Model\Store\Config $coreStoreConfig, @@ -83,7 +76,6 @@ class Online extends \Magento\Core\Model\AbstractModel \Magento\Data\Collection\Db $resourceCollection = null, array $data = array() ) { - $this->_cache = $cache; $this->_coreStoreConfig = $coreStoreConfig; parent::__construct($context, $registry, $resource, $resourceCollection, $data); } @@ -125,7 +117,7 @@ class Online extends \Magento\Core\Model\AbstractModel */ public function getPrepareAt() { - return $this->_cache->load('log_visitor_online_prepare_at'); + return $this->_cacheManager->load('log_visitor_online_prepare_at'); } /** @@ -139,7 +131,7 @@ class Online extends \Magento\Core\Model\AbstractModel if (is_null($time)) { $time = time(); } - $this->_cache->save($time, 'log_visitor_online_prepare_at'); + $this->_cacheManager->save($time, 'log_visitor_online_prepare_at'); return $this; } diff --git a/app/code/Magento/Newsletter/Block/Subscribe.php b/app/code/Magento/Newsletter/Block/Subscribe.php index 314cbbd10779d0fbe5fdbd7159b9ca0e0b188106..146ffc73aa14814bfb8dc0b11092a86620512089 100644 --- a/app/code/Magento/Newsletter/Block/Subscribe.php +++ b/app/code/Magento/Newsletter/Block/Subscribe.php @@ -34,7 +34,7 @@ namespace Magento\Newsletter\Block; -class Subscribe extends \Magento\Core\Block\Template +class Subscribe extends \Magento\View\Block\Template { /** * Newsletter session @@ -44,20 +44,18 @@ class Subscribe extends \Magento\Core\Block\Template protected $_newsletterSession; /** - * Construct - * + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Newsletter\Model\Session $newsletterSession * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Newsletter\Model\Session $newsletterSession, array $data = array() ) { - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); $this->_newsletterSession = $newsletterSession; } diff --git a/app/code/Magento/Newsletter/Controller/Manage.php b/app/code/Magento/Newsletter/Controller/Manage.php index 325e322b440e0b793d739bedca2c955a8c57d875..90a8f9f0882997ded3ac7e87ce73308ddd265080 100644 --- a/app/code/Magento/Newsletter/Controller/Manage.php +++ b/app/code/Magento/Newsletter/Controller/Manage.php @@ -34,7 +34,10 @@ */ namespace Magento\Newsletter\Controller; -class Manage extends \Magento\Core\Controller\Front\Action +use Magento\App\Action\NotFoundException; +use Magento\App\RequestInterface; + +class Manage extends \Magento\App\Action\Action { /** * Customer session @@ -44,58 +47,63 @@ class Manage extends \Magento\Core\Controller\Front\Action protected $_customerSession; /** - * Store manager - * + * @var \Magento\Core\App\Action\FormKeyValidator + */ + protected $_formKeyValidator; + + /** * @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; /** - * Construct - * - * @param \Magento\Core\Controller\Varien\Action\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\App\Action\Context $context * @param \Magento\Customer\Model\Session $customerSession + * @param \Magento\Core\App\Action\FormKeyValidator $formKeyValidator + * @param \Magento\Core\Model\StoreManagerInterface $storeManager */ public function __construct( - \Magento\Core\Controller\Varien\Action\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Customer\Model\Session $customerSession + \Magento\App\Action\Context $context, + \Magento\Customer\Model\Session $customerSession, + \Magento\Core\App\Action\FormKeyValidator $formKeyValidator, + \Magento\Core\Model\StoreManagerInterface $storeManager ) { - parent::__construct($context); $this->_storeManager = $storeManager; + parent::__construct($context); + $this->_formKeyValidator = $formKeyValidator; $this->_customerSession = $customerSession; } /** - * Action predispatch - * * Check customer authentication for some actions + * + * @param RequestInterface $request + * @return mixed */ - public function preDispatch() + public function dispatch(RequestInterface $request) { - parent::preDispatch(); if (!$this->_customerSession->authenticate($this)) { - $this->setFlag('', 'no-dispatch', true); + $this->_actionFlag->set('', 'no-dispatch', true); } + return parent::dispatch($request); } public function indexAction() { - $this->loadLayout(); - $this->_initLayoutMessages('Magento\Customer\Model\Session'); - $this->_initLayoutMessages('Magento\Catalog\Model\Session'); + $this->_view->loadLayout(); + $this->_view->getLayout() + ->initMessages(array('Magento\Customer\Model\Session', 'Magento\Catalog\Model\Session')); - if ($block = $this->getLayout()->getBlock('customer_newsletter')) { - $block->setRefererUrl($this->_getRefererUrl()); + if ($block = $this->_view->getLayout()->getBlock('customer_newsletter')) { + $block->setRefererUrl($this->_redirect->getRefererUrl()); } - $this->getLayout()->getBlock('head')->setTitle(__('Newsletter Subscription')); - $this->renderLayout(); + $this->_view->getLayout()->getBlock('head')->setTitle(__('Newsletter Subscription')); + $this->_view->renderLayout(); } public function saveAction() { - if (!$this->_validateFormKey()) { + if (!$this->_formKeyValidator->validate($this->getRequest())) { return $this->_redirect('customer/account/'); } try { diff --git a/app/code/Magento/Newsletter/Controller/Subscriber.php b/app/code/Magento/Newsletter/Controller/Subscriber.php index a96db52b7f621ca41b87c1c6b5890d658b4a8b7a..4dae263feaa5e6eabbaf9459ed01f5ebe6d2d3ec 100644 --- a/app/code/Magento/Newsletter/Controller/Subscriber.php +++ b/app/code/Magento/Newsletter/Controller/Subscriber.php @@ -33,7 +33,7 @@ */ namespace Magento\Newsletter\Controller; -class Subscriber extends \Magento\Core\Controller\Front\Action +class Subscriber extends \Magento\App\Action\Action { /** * Session @@ -49,13 +49,6 @@ class Subscriber extends \Magento\Core\Controller\Front\Action */ protected $_customerSession; - /** - * Store manager - * - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - /** * Customer factory * @@ -71,27 +64,30 @@ class Subscriber extends \Magento\Core\Controller\Front\Action protected $_subscriberFactory; /** - * Construct - * - * @param \Magento\Core\Controller\Varien\Action\Context $context + * @var \Magento\Core\Model\StoreManagerInterface + */ + protected $_storeManager; + + /** + * @param \Magento\App\Action\Context $context * @param \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory * @param \Magento\Customer\Model\CustomerFactory $customerFactory - * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Core\Model\Session $session + * @param \Magento\Core\Model\StoreManagerInterface $storeManager */ public function __construct( - \Magento\Core\Controller\Varien\Action\Context $context, + \Magento\App\Action\Context $context, \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory, \Magento\Customer\Model\CustomerFactory $customerFactory, - \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Customer\Model\Session $customerSession, - \Magento\Core\Model\Session $session + \Magento\Core\Model\Session $session, + \Magento\Core\Model\StoreManagerInterface $storeManager ) { + $this->_storeManager = $storeManager; parent::__construct($context); $this->_subscriberFactory = $subscriberFactory; $this->_customerFactory = $customerFactory; - $this->_storeManager = $storeManager; $this->_customerSession = $customerSession; $this->_session = $session; } @@ -142,7 +138,7 @@ class Subscriber extends \Magento\Core\Controller\Front\Action $this->_session->addException($e, __('Something went wrong with the subscription.')); } } - $this->_redirectReferer(); + $this->getResponse()->setRedirect($this->_redirect->getRedirectUrl()); } /** @@ -168,7 +164,7 @@ class Subscriber extends \Magento\Core\Controller\Front\Action } } - $this->_redirectUrl($this->_storeManager->getStore()->getBaseUrl()); + $this->getResponse()->setRedirect($this->_storeManager->getStore()->getBaseUrl()); } /** @@ -193,6 +189,6 @@ class Subscriber extends \Magento\Core\Controller\Front\Action $this->_session->addException($e, __('Something went wrong with the un-subscription.')); } } - $this->_redirectReferer(); + $this->getResponse()->setRedirect($this->_redirect->getRedirectUrl()); } } diff --git a/app/code/Magento/Newsletter/Helper/Data.php b/app/code/Magento/Newsletter/Helper/Data.php index 1111128060d2cf06bc7b4bc13bca052444095d8c..7e8680c2ae783ab416b9d52aefc9c6dcc0bb9f88 100644 --- a/app/code/Magento/Newsletter/Helper/Data.php +++ b/app/code/Magento/Newsletter/Helper/Data.php @@ -34,29 +34,8 @@ */ namespace Magento\Newsletter\Helper; -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { - /** - * Url - * - * @var \Magento\UrlInterface - */ - protected $_url; - - /** - * Constructor - * - * @param \Magento\Core\Helper\Context $context - * @param \Magento\UrlInterface $url - */ - public function __construct( - \Magento\Core\Helper\Context $context, - \Magento\UrlInterface $url - ) { - parent::__construct($context); - $this->_url = $url; - } - /** * Retrieve subsription confirmation url * @@ -65,7 +44,7 @@ class Data extends \Magento\Core\Helper\AbstractHelper */ public function getConfirmationUrl($subscriber) { - return $this->_url->setStore($subscriber->getStoreId()) + return $this->_urlBuilder->setStore($subscriber->getStoreId()) ->getUrl('newsletter/subscriber/confirm', array( 'id' => $subscriber->getId(), 'code' => $subscriber->getCode(), @@ -81,7 +60,7 @@ class Data extends \Magento\Core\Helper\AbstractHelper */ public function getUnsubscribeUrl($subscriber) { - return $this->_url->setStore($subscriber->getStoreId()) + return $this->_urlBuilder->setStore($subscriber->getStoreId()) ->getUrl('newsletter/subscriber/unsubscribe', array( 'id' => $subscriber->getId(), 'code' => $subscriber->getCode(), diff --git a/app/code/Magento/Newsletter/Model/Queue.php b/app/code/Magento/Newsletter/Model/Queue.php index ae8e581e959264211f29fcb4a88139c531c8e781..42760efec49fe39d3f6d7536ff94844a4e333b11 100644 --- a/app/code/Magento/Newsletter/Model/Queue.php +++ b/app/code/Magento/Newsletter/Model/Queue.php @@ -63,7 +63,7 @@ class Queue extends \Magento\Core\Model\Template protected $_template; /** - * @var \Magento\Core\Model\Email\Template + * @var \Magento\Email\Model\Template */ protected $_emailTemplate = null; @@ -118,7 +118,7 @@ class Queue extends \Magento\Core\Model\Template /** * Email template factory * - * @var \Magento\Core\Model\Email\TemplateFactory + * @var \Magento\Email\Model\TemplateFactory */ protected $_emailTemplateFactory; @@ -149,7 +149,7 @@ class Queue extends \Magento\Core\Model\Template * @param \Magento\Core\Model\Date $date * @param \Magento\Newsletter\Model\TemplateFactory $templateFactory * @param \Magento\Newsletter\Model\ProblemFactory $problemFactory - * @param \Magento\Core\Model\Email\TemplateFactory $emailTemplateFactory + * @param \Magento\Email\Model\TemplateFactory $emailTemplateFactory * @param \Magento\Newsletter\Model\Resource\Subscriber\CollectionFactory $subscriberCollectionFactory * @param array $data */ @@ -164,7 +164,7 @@ class Queue extends \Magento\Core\Model\Template \Magento\Core\Model\Date $date, \Magento\Newsletter\Model\TemplateFactory $templateFactory, \Magento\Newsletter\Model\ProblemFactory $problemFactory, - \Magento\Core\Model\Email\TemplateFactory $emailTemplateFactory, + \Magento\Email\Model\TemplateFactory $emailTemplateFactory, \Magento\Newsletter\Model\Resource\Subscriber\CollectionFactory $subscriberCollectionFactory, array $data = array() ) { @@ -187,8 +187,8 @@ class Queue extends \Magento\Core\Model\Template $emailTemplate = $this->_getData('email_template'); if ($emailTemplate) { $this->unsetData('email_template'); - if (!($emailTemplate instanceof \Magento\Core\Model\Email\Template)) { - throw new \Exception('Instance of \Magento\Core\Model\Email\Template is expected.'); + if (!($emailTemplate instanceof \Magento\Email\Model\Template)) { + throw new \Exception('Instance of \Magento\Email\Model\Template is expected.'); } $this->_emailTemplate = $emailTemplate; } @@ -254,7 +254,7 @@ class Queue extends \Magento\Core\Model\Template ->setCurPage(1) ->load(); - /** @var \Magento\Core\Model\Email\Template $sender */ + /** @var \Magento\Email\Model\Template $sender */ $sender = $this->_emailTemplate ?: $this->_emailTemplateFactory->create(); $sender->setSenderName($this->getNewsletterSenderName()) ->setSenderEmail($this->getNewsletterSenderEmail()) diff --git a/app/code/Magento/Newsletter/Model/Subscriber.php b/app/code/Magento/Newsletter/Model/Subscriber.php index 29fbb3ab8f5ee769dafb492b18cbc134ee0d7823..e984546d0080119c4af94c8205df3c2d3d6d9d5a 100644 --- a/app/code/Magento/Newsletter/Model/Subscriber.php +++ b/app/code/Magento/Newsletter/Model/Subscriber.php @@ -132,7 +132,7 @@ class Subscriber extends \Magento\Core\Model\AbstractModel /** * Email template factory * - * @var \Magento\Core\Model\Email\TemplateFactory + * @var \Magento\Email\Model\TemplateFactory */ protected $_emailTemplateFactory; @@ -143,7 +143,7 @@ class Subscriber extends \Magento\Core\Model\AbstractModel * @param \Magento\Core\Model\Registry $registry * @param \Magento\Newsletter\Helper\Data $newsletterData * @param \Magento\Core\Model\Store\Config $coreStoreConfig - * @param \Magento\Core\Model\Email\TemplateFactory $emailTemplateFactory + * @param \Magento\Email\Model\TemplateFactory $emailTemplateFactory * @param \Magento\Customer\Model\CustomerFactory $customerFactory * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Translate $translate @@ -157,7 +157,7 @@ class Subscriber extends \Magento\Core\Model\AbstractModel \Magento\Core\Model\Registry $registry, \Magento\Newsletter\Helper\Data $newsletterData, \Magento\Core\Model\Store\Config $coreStoreConfig, - \Magento\Core\Model\Email\TemplateFactory $emailTemplateFactory, + \Magento\Email\Model\TemplateFactory $emailTemplateFactory, \Magento\Customer\Model\CustomerFactory $customerFactory, \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Translate $translate, @@ -605,7 +605,7 @@ class Subscriber extends \Magento\Core\Model\AbstractModel $this->_translate->setTranslateInline(false); - /** @var \Magento\Core\Model\Email\Template $email */ + /** @var \Magento\Email\Model\Template $email */ $email = $this->_emailTemplateFactory->create(); $email->sendTransactional( @@ -640,7 +640,7 @@ class Subscriber extends \Magento\Core\Model\AbstractModel $this->_translate->setTranslateInline(false); - /** @var \Magento\Core\Model\Email\Template $email */ + /** @var \Magento\Email\Model\Template $email */ $email = $this->_emailTemplateFactory->create(); $email->sendTransactional( @@ -674,7 +674,7 @@ class Subscriber extends \Magento\Core\Model\AbstractModel $this->_translate->setTranslateInline(false); - /** @var \Magento\Core\Model\Email\Template $email */ + /** @var \Magento\Email\Model\Template $email */ $email = $this->_emailTemplateFactory->create(); $email->sendTransactional( diff --git a/app/code/Magento/Newsletter/Model/Template.php b/app/code/Magento/Newsletter/Model/Template.php index 6df0cfd49aacc3243e54f57390d6a9b4baf3f84f..bd27e408093de574f37eec6710ae70aaa695fd58 100644 --- a/app/code/Magento/Newsletter/Model/Template.php +++ b/app/code/Magento/Newsletter/Model/Template.php @@ -58,6 +58,7 @@ namespace Magento\Newsletter\Model; class Template extends \Magento\Core\Model\Template { + /** * Template Text Preprocessed flag * @@ -351,7 +352,7 @@ class Template extends \Magento\Core\Model\Template */ public function isValidForSend() { - return !$this->_coreStoreConfig->getConfigFlag(\Magento\Core\Helper\Data::XML_PATH_SYSTEM_SMTP_DISABLE) + return !$this->_coreStoreConfig->getConfigFlag(\Magento\Email\Model\Template::XML_PATH_SYSTEM_SMTP_DISABLE) && $this->getTemplateSenderName() && $this->getTemplateSenderEmail() && $this->getTemplateSubject(); diff --git a/app/code/Magento/Ogone/Block/Paypage.php b/app/code/Magento/Ogone/Block/Paypage.php index 4f673d7d18c09f5f1e3c85ee3b354361145163e3..414cf73dbe579f8a7e5b76308cc05d4a4d7ea592 100644 --- a/app/code/Magento/Ogone/Block/Paypage.php +++ b/app/code/Magento/Ogone/Block/Paypage.php @@ -27,7 +27,7 @@ namespace Magento\Ogone\Block; -class Paypage extends \Magento\Core\Block\Template +class Paypage extends \Magento\View\Block\Template { protected $_template = 'paypage.phtml'; } diff --git a/app/code/Magento/Ogone/Block/Placeform.php b/app/code/Magento/Ogone/Block/Placeform.php index 8ceb4e11a346c6286c6c789b9d619593eb8af739..5c7885efc9d68fcd266fdd3e01a5ec379dc9e45b 100644 --- a/app/code/Magento/Ogone/Block/Placeform.php +++ b/app/code/Magento/Ogone/Block/Placeform.php @@ -24,10 +24,9 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ - namespace Magento\Ogone\Block; -class Placeform extends \Magento\Core\Block\Template +class Placeform extends \Magento\View\Block\Template { /** * @var \Magento\Sales\Model\OrderFactory @@ -45,25 +44,25 @@ class Placeform extends \Magento\Core\Block\Template protected $_ogoneApi; /** + * @param \Magento\View\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Checkout\Model\Session $checkoutSession * @param \Magento\Ogone\Model\Api $ogoneApi * @param \Magento\Sales\Model\OrderFactory $salesOrderFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Checkout\Model\Session $checkoutSession, \Magento\Ogone\Model\Api $ogoneApi, \Magento\Sales\Model\OrderFactory $salesOrderFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, array $data = array() ) { $this->_checkoutSession = $checkoutSession; $this->_ogoneApi = $ogoneApi; $this->_salesOrderFactory = $salesOrderFactory; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Ogone/Controller/Api.php b/app/code/Magento/Ogone/Controller/Api.php index 499170d62eb62837cdafe52296556fceecd73c90..e89f40805881d9d79071b35e94f1ec413909a2cb 100644 --- a/app/code/Magento/Ogone/Controller/Api.php +++ b/app/code/Magento/Ogone/Controller/Api.php @@ -29,7 +29,7 @@ */ namespace Magento\Ogone\Controller; -class Api extends \Magento\Core\Controller\Front\Action +class Api extends \Magento\App\Action\Action { /** * Order instance @@ -47,14 +47,14 @@ class Api extends \Magento\Core\Controller\Front\Action protected $_transactionFactory; /** + * @param \Magento\App\Action\Context $context * @param \Magento\Core\Model\Resource\TransactionFactory $transactionFactory * @param \Magento\Sales\Model\OrderFactory $salesOrderFactory - * @param \Magento\Core\Controller\Varien\Action\Context $context */ public function __construct( + \Magento\App\Action\Context $context, \Magento\Core\Model\Resource\TransactionFactory $transactionFactory, - \Magento\Sales\Model\OrderFactory $salesOrderFactory, - \Magento\Core\Controller\Varien\Action\Context $context + \Magento\Sales\Model\OrderFactory $salesOrderFactory ) { parent::__construct($context); $this->_transactionFactory = $transactionFactory; @@ -161,8 +161,8 @@ class Api extends \Magento\Core\Controller\Front\Action $this->_getCheckout()->setOgoneLastSuccessQuoteId($this->_getCheckout()->getLastSuccessQuoteId()); $this->_getCheckout()->clear(); - $this->loadLayout(); - $this->renderLayout(); + $this->_view->loadLayout(); + $this->_view->renderLayout(); } /** @@ -170,8 +170,8 @@ class Api extends \Magento\Core\Controller\Front\Action */ public function paypageAction() { - $this->loadLayout(); - $this->renderLayout(); + $this->_view->loadLayout(); + $this->_view->renderLayout(); } /** diff --git a/app/code/Magento/Ogone/Helper/Data.php b/app/code/Magento/Ogone/Helper/Data.php index 87d3944d54cd11228d16188430ee79f05afff03f..0465092c2d242eef967d90e40fd6d36ffb08a0bf 100644 --- a/app/code/Magento/Ogone/Helper/Data.php +++ b/app/code/Magento/Ogone/Helper/Data.php @@ -29,6 +29,6 @@ */ namespace Magento\Ogone\Helper; -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { } diff --git a/app/code/Magento/Ogone/view/frontend/form.phtml b/app/code/Magento/Ogone/view/frontend/form.phtml index e398596b0f7203c5a45a33ccba0cf55316f87d5f..1078fad890337ca6f986f24e134691e315ae9bcd 100644 --- a/app/code/Magento/Ogone/view/frontend/form.phtml +++ b/app/code/Magento/Ogone/view/frontend/form.phtml @@ -26,8 +26,8 @@ ?> <?php $_code=$this->getMethodCode() ?> -<ul class="form-list" id="payment_form_<?php echo $_code ?>" style="display:none;"> - <li> - <?php echo __('You will be redirected to Ogone website when you place an order.') ?> - </li> -</ul> +<fieldset class="fieldset items" id="payment_form_<?php echo $_code ?>" style="display:none;"> + <div class="message notice"> + <div><?php echo __('You will be redirected to Ogone website when you place an order.') ?></div> + </div> +</fieldset> diff --git a/app/code/Magento/Ogone/view/frontend/layout/ogone_api_placeform.xml b/app/code/Magento/Ogone/view/frontend/layout/ogone_api_placeform.xml index 2a9ae971609649b65ed310eae476b4de1cb6492c..750d5ed51af8376f47abe68fb07f6a1b336d3734 100644 --- a/app/code/Magento/Ogone/view/frontend/layout/ogone_api_placeform.xml +++ b/app/code/Magento/Ogone/view/frontend/layout/ogone_api_placeform.xml @@ -24,6 +24,7 @@ */ --> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <update handle="page_one_column"/> <referenceContainer name="content"> <block class="Magento\Ogone\Block\Placeform" name="ogone_placeform" template="placeform.phtml"/> </referenceContainer> diff --git a/app/code/Magento/Ogone/view/frontend/placeform.phtml b/app/code/Magento/Ogone/view/frontend/placeform.phtml index 1115bdba5bb8eb262987ab404ca922e83214f25a..9e0b09ddfd0984b0cb79930152c9e0f8fc102232 100644 --- a/app/code/Magento/Ogone/view/frontend/placeform.phtml +++ b/app/code/Magento/Ogone/view/frontend/placeform.phtml @@ -25,14 +25,14 @@ */ ?> -<p><strong><?php echo __('Please stand by. In a moment, this page will transfer your data to the Ogone payment gateway.'); ?></strong></p> +<div class="message info"><div><?php echo __('Please stand by. In a moment, this page will transfer your data to the Ogone payment gateway.'); ?></div></div> <form name="ogone" id="ogone-review-form" action="<?php echo $this->getFormAction();?>" method="post" accept-charset="ISO-8859-1"> <?php if ($formData = $this->getFormData()): ?> - <fieldset> + <div> <?php foreach ($formData as $name => $value) { ?> <input type="hidden" name="<?php echo $this->escapeHtml($name); ?>" value="<?php echo $this->escapeHtml($value); ?>" /> <?php }?> - </fieldset> + </div> <?php endif; ?> </form> <script type="text/javascript"> diff --git a/app/code/Magento/Page/Block/Html.php b/app/code/Magento/Page/Block/Html.php index 9d45c3953ddb9f0d941b97ff7ac3c8d015a4b714..3c0f942ab264be0df5b618e5f32746032235b4d2 100644 --- a/app/code/Magento/Page/Block/Html.php +++ b/app/code/Magento/Page/Block/Html.php @@ -33,40 +33,11 @@ */ namespace Magento\Page\Block; -class Html extends \Magento\Core\Block\Template +class Html extends \Magento\View\Block\Template { protected $_urls = array(); protected $_title = ''; - /** - * @var \Magento\Core\Model\LocaleInterface - */ - protected $_locale; - - /** - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - - /** - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\LocaleInterface $locale - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context - * @param array $data - */ - public function __construct( - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\LocaleInterface $locale, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, - array $data = array() - ) { - $this->_storeManager = $storeManager; - $this->_locale = $locale; - parent::__construct($coreData, $context, $data); - } - protected function _construct() { parent::_construct(); @@ -77,10 +48,7 @@ class Html extends \Magento\Core\Block\Template 'current' => $this->_request->getRequestUri() ); - $action = $this->_frontController->getAction(); - if ($action) { - $this->addBodyClass($action->getFullActionName('-')); - } + $this->addBodyClass($this->_request->getFullActionName('-')); $this->_beforeCacheUrl(); } diff --git a/app/code/Magento/Page/Block/Html/Breadcrumbs.php b/app/code/Magento/Page/Block/Html/Breadcrumbs.php index 43bc35a7f525b47f3319eb7a5cad26eeb832d392..ae7def360bbb255e26c156a66ed058c189acdab6 100644 --- a/app/code/Magento/Page/Block/Html/Breadcrumbs.php +++ b/app/code/Magento/Page/Block/Html/Breadcrumbs.php @@ -33,7 +33,7 @@ */ namespace Magento\Page\Block\Html; -class Breadcrumbs extends \Magento\Core\Block\Template +class Breadcrumbs extends \Magento\View\Block\Template { /** * Array of breadcrumbs diff --git a/app/code/Magento/Page/Block/Html/Footer.php b/app/code/Magento/Page/Block/Html/Footer.php index 083c13391a51267bdf063ec2a97d9d5007ed49de..189065b06f2916c02474e1715b47390b4fb4e713 100644 --- a/app/code/Magento/Page/Block/Html/Footer.php +++ b/app/code/Magento/Page/Block/Html/Footer.php @@ -33,38 +33,30 @@ */ namespace Magento\Page\Block\Html; -class Footer extends \Magento\Core\Block\Template +class Footer extends \Magento\View\Block\Template { protected $_copyright; - /** - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - /** * @var \Magento\Customer\Model\Session */ protected $_customerSession; /** - * @param \Magento\Customer\Model\Session $customerSession - * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context + * @param \Magento\Customer\Model\Session $customerSession * @param array $data */ public function __construct( - \Magento\Customer\Model\Session $customerSession, - \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, + \Magento\Customer\Model\Session $customerSession, array $data = array() ) { $this->_customerSession = $customerSession; - $this->_storeManager = $storeManager; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _construct() diff --git a/app/code/Magento/Page/Block/Html/Head.php b/app/code/Magento/Page/Block/Html/Head.php index 2ca8136a90ab209b0bd85257460aeb5e8c94b108..4e47cdef77380cb4a16a6e801eebcf8e3f2a3217 100644 --- a/app/code/Magento/Page/Block/Html/Head.php +++ b/app/code/Magento/Page/Block/Html/Head.php @@ -34,7 +34,7 @@ */ namespace Magento\Page\Block\Html; -class Head extends \Magento\Core\Block\Template +class Head extends \Magento\View\Block\Template { /** * Block template @@ -85,27 +85,9 @@ class Head extends \Magento\Core\Block\Template protected $_fileStorageDatabase = null; /** - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - - /** - * @var \Magento\App\Dir - */ - protected $_dir; - - /** - * @var \Magento\Core\Model\LocaleInterface - */ - protected $_locale; - - /** - * @param \Magento\Core\Model\LocaleInterface $locale - * @param \Magento\App\Dir $dir - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Helper\File\Storage\Database $fileStorageDatabase + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context + * @param \Magento\Core\Helper\File\Storage\Database $fileStorageDatabase * @param \Magento\ObjectManager $objectManager * @param \Magento\Core\Model\Page $page * @param \Magento\Core\Model\Page\Asset\MergeService $assetMergeService @@ -113,27 +95,21 @@ class Head extends \Magento\Core\Block\Template * @param array $data */ public function __construct( - \Magento\Core\Model\LocaleInterface $locale, - \Magento\App\Dir $dir, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Helper\File\Storage\Database $fileStorageDatabase, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, + \Magento\Core\Helper\File\Storage\Database $fileStorageDatabase, \Magento\ObjectManager $objectManager, \Magento\Core\Model\Page $page, \Magento\Core\Model\Page\Asset\MergeService $assetMergeService, \Magento\Core\Model\Page\Asset\MinifyService $assetMinifyService, array $data = array() ) { + parent::__construct($context, $coreData, $data); $this->_fileStorageDatabase = $fileStorageDatabase; - parent::__construct($coreData, $context, $data); $this->_objectManager = $objectManager; $this->_assetMergeService = $assetMergeService; $this->_assetMinifyService = $assetMinifyService; $this->_pageAssets = $page->getAssets(); - $this->_storeManager = $storeManager; - $this->_dir = $dir; - $this->_locale = $locale; } /** @@ -161,7 +137,7 @@ class Head extends \Magento\Core\Block\Template public function getCssJsHtml() { foreach ($this->getLayout()->getChildBlocks($this->getNameInLayout()) as $block) { - /** @var $block \Magento\Core\Block\AbstractBlock */ + /** @var $block \Magento\View\Block\AbstractBlock */ if ($block instanceof \Magento\Page\Block\Html\Head\AssetBlock) { /** @var \Magento\Core\Model\Page\Asset\AssetInterface $asset */ $asset = $block->getAsset(); @@ -415,7 +391,7 @@ class Head extends \Magento\Core\Block\Template $folderName = \Magento\Backend\Model\Config\Backend\Image\Favicon::UPLOAD_DIR; $storeConfig = $this->_storeConfig->getConfig('design/head/shortcut_icon'); $faviconFile = $this->_storeManager->getStore()->getBaseUrl('media') . $folderName . '/' . $storeConfig; - $absolutePath = $this->_dir->getDir('media') . '/' . $folderName . '/' . $storeConfig; + $absolutePath = $this->_dirs->getDir('media') . '/' . $folderName . '/' . $storeConfig; if (!is_null($storeConfig) && $this->_isFile($absolutePath)) { $url = $faviconFile; diff --git a/app/code/Magento/Page/Block/Html/Head/Css.php b/app/code/Magento/Page/Block/Html/Head/Css.php index ab64703aa454a85496f07fb2483e48dcc590938f..9c17ed16d9b4655a3399a91f3af3c5457a3015c6 100644 --- a/app/code/Magento/Page/Block/Html/Head/Css.php +++ b/app/code/Magento/Page/Block/Html/Head/Css.php @@ -29,18 +29,18 @@ namespace Magento\Page\Block\Html\Head; /** * Css page block */ -class Css extends \Magento\Core\Block\AbstractBlock +class Css extends \Magento\View\Block\AbstractBlock implements \Magento\Page\Block\Html\Head\AssetBlock { /** * Contructor * - * @param \Magento\Core\Block\Template\Context $context + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Model\Page\Asset\ViewFileFactory $viewFileFactory * @param array $data */ public function __construct( - \Magento\Core\Block\Template\Context $context, + \Magento\View\Block\Template\Context $context, \Magento\Core\Model\Page\Asset\ViewFileFactory $viewFileFactory, array $data = array() ) { diff --git a/app/code/Magento/Page/Block/Html/Head/Link.php b/app/code/Magento/Page/Block/Html/Head/Link.php index 7572c567b7e20b837ddd2f0ceb2c4ec88d47370c..74c8935314ae9e5b488cbe7be6962aefe00ab524 100644 --- a/app/code/Magento/Page/Block/Html/Head/Link.php +++ b/app/code/Magento/Page/Block/Html/Head/Link.php @@ -29,26 +29,24 @@ namespace Magento\Page\Block\Html\Head; /** * Link page block */ -class Link extends \Magento\Core\Block\Template +class Link extends \Magento\View\Block\Template implements \Magento\Page\Block\Html\Head\AssetBlock { const VIRTUAL_CONTENT_TYPE = 'link'; /** - * Contructor - * - * @param \Magento\Core\Block\Template\Context $context - * @param \Magento\Core\Model\Page\Asset\RemoteFactory $remoteFactory + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Page\Asset\RemoteFactory $remoteFactory * @param array $data */ public function __construct( - \Magento\Core\Block\Template\Context $context, - \Magento\Core\Model\Page\Asset\RemoteFactory $remoteFactory, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Page\Asset\RemoteFactory $remoteFactory, array $data = array() ) { - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); $this->setAsset( $remoteFactory->create(array( 'url' => (string)$this->getData('url'), diff --git a/app/code/Magento/Page/Block/Html/Head/Script.php b/app/code/Magento/Page/Block/Html/Head/Script.php index 0e9f99f13fd0ca0b776161392db3155873e061ff..43e54b42fa47edafd94ad35cb6fc6ece6e8a3d6f 100644 --- a/app/code/Magento/Page/Block/Html/Head/Script.php +++ b/app/code/Magento/Page/Block/Html/Head/Script.php @@ -29,18 +29,18 @@ namespace Magento\Page\Block\Html\Head; /** * Script page block */ -class Script extends \Magento\Core\Block\AbstractBlock +class Script extends \Magento\View\Block\AbstractBlock implements \Magento\Page\Block\Html\Head\AssetBlock { /** * Contructor * - * @param \Magento\Core\Block\Template\Context $context + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Model\Page\Asset\ViewFileFactory $viewFileFactory * @param array $data */ public function __construct( - \Magento\Core\Block\Template\Context $context, + \Magento\View\Block\Template\Context $context, \Magento\Core\Model\Page\Asset\ViewFileFactory $viewFileFactory, array $data = array() ) { diff --git a/app/code/Magento/Page/Block/Html/Header.php b/app/code/Magento/Page/Block/Html/Header.php index 4028d10002bff500bc6d7253374a859ff23b67f7..46e24c337faf48382c1c0130172cb243fe3a3fd3 100644 --- a/app/code/Magento/Page/Block/Html/Header.php +++ b/app/code/Magento/Page/Block/Html/Header.php @@ -33,7 +33,7 @@ */ namespace Magento\Page\Block\Html; -class Header extends \Magento\Core\Block\Template +class Header extends \Magento\View\Block\Template { /** * @var \Magento\Customer\Model\Session @@ -41,27 +41,19 @@ class Header extends \Magento\Core\Block\Template protected $_customerSession; /** - * @var \Magento\App\State - */ - protected $_appState; - - /** - * @param \Magento\App\State $appState - * @param \Magento\Customer\Model\Session $customerSession + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context + * @param \Magento\Customer\Model\Session $customerSession * @param array $data */ public function __construct( - \Magento\App\State $appState, - \Magento\Customer\Model\Session $customerSession, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, + \Magento\Customer\Model\Session $customerSession, array $data = array() ) { $this->_customerSession = $customerSession; - $this->_appState = $appState; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } public function _construct() diff --git a/app/code/Magento/Page/Block/Html/Notices.php b/app/code/Magento/Page/Block/Html/Notices.php index 627bc75d6f7396cf809bd6f7da72e789db03a036..e24dd186ed3ce5bff2542cc680839b8857e5a9f3 100644 --- a/app/code/Magento/Page/Block/Html/Notices.php +++ b/app/code/Magento/Page/Block/Html/Notices.php @@ -33,7 +33,7 @@ */ namespace Magento\Page\Block\Html; -class Notices extends \Magento\Core\Block\Template +class Notices extends \Magento\View\Block\Template { /** * @var \Magento\Core\Model\Url @@ -41,19 +41,19 @@ class Notices extends \Magento\Core\Block\Template protected $_urlModel; /** - * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context + * @param \Magento\Core\Model\Url $urlModel * @param array $data */ public function __construct( - \Magento\Core\Model\Url $urlModel, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, + \Magento\Core\Model\Url $urlModel, array $data = array() ) { $this->_urlModel = $urlModel; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Page/Block/Html/Pager.php b/app/code/Magento/Page/Block/Html/Pager.php index bfbde19c70cbd56b2038688845afdf3af1f75fc8..42c0009aa5ea4a5817c1901b17a42d537a271345 100644 --- a/app/code/Magento/Page/Block/Html/Pager.php +++ b/app/code/Magento/Page/Block/Html/Pager.php @@ -35,7 +35,7 @@ */ namespace Magento\Page\Block\Html; -class Pager extends \Magento\Core\Block\Template +class Pager extends \Magento\View\Block\Template { protected $_collection = null; protected $_pageVarName = 'p'; diff --git a/app/code/Magento/Page/Block/Html/Title.php b/app/code/Magento/Page/Block/Html/Title.php index 9fac40ecd3c755ec788c612bb405c7f0af006965..ce8d97e9bfd0cdd3fb873ba92ae4d231bf16b840 100644 --- a/app/code/Magento/Page/Block/Html/Title.php +++ b/app/code/Magento/Page/Block/Html/Title.php @@ -32,7 +32,7 @@ */ namespace Magento\Page\Block\Html; -class Title extends \Magento\Core\Block\Template +class Title extends \Magento\View\Block\Template { /** * Own page title to display on the page diff --git a/app/code/Magento/Page/Block/Html/Topmenu.php b/app/code/Magento/Page/Block/Html/Topmenu.php index 6c8e30a5106f24a2a15974abeae157cb8513a606..f72d63916238eccb11f5d0b1226674c53d54cf19 100644 --- a/app/code/Magento/Page/Block/Html/Topmenu.php +++ b/app/code/Magento/Page/Block/Html/Topmenu.php @@ -33,7 +33,7 @@ */ namespace Magento\Page\Block\Html; -class Topmenu extends \Magento\Core\Block\Template +class Topmenu extends \Magento\View\Block\Template { /** * Top menu data tree diff --git a/app/code/Magento/Page/Block/Html/Welcome.php b/app/code/Magento/Page/Block/Html/Welcome.php index 54a510c4ba284d0f735a2a913d38f57803124d88..d743579ae4e6e6c7573f0060066e32175100f477 100644 --- a/app/code/Magento/Page/Block/Html/Welcome.php +++ b/app/code/Magento/Page/Block/Html/Welcome.php @@ -29,19 +29,19 @@ namespace Magento\Page\Block\Html; /** * Html page block */ -class Welcome extends \Magento\Core\Block\Template +class Welcome extends \Magento\View\Block\Template { /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, array $data = array() ) { - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Page/Block/Js/Components.php b/app/code/Magento/Page/Block/Js/Components.php index 1c1e3116fbfbf187a5e063dfe0a90e5e6506a123..f5955061eb40b631188c44c3a248f56d90620327 100644 --- a/app/code/Magento/Page/Block/Js/Components.php +++ b/app/code/Magento/Page/Block/Js/Components.php @@ -26,29 +26,8 @@ namespace Magento\Page\Block\Js; -class Components extends \Magento\Core\Block\Template +class Components extends \Magento\View\Block\Template { - /** - * @var \Magento\App\State - */ - protected $_appState; - - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context - * @param \Magento\App\State $appState - * @param array $data - */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, - \Magento\App\State $appState, - array $data = array() - ) { - parent::__construct($coreData, $context, $data); - $this->_appState = $appState; - } - /** * @return bool */ diff --git a/app/code/Magento/Page/Block/Js/Cookie.php b/app/code/Magento/Page/Block/Js/Cookie.php index 7167b739faf58ac36fed86e6ba899f94610342be..bb7bcd874966c154adcbb78ff7ac25e5e00265b6 100644 --- a/app/code/Magento/Page/Block/Js/Cookie.php +++ b/app/code/Magento/Page/Block/Js/Cookie.php @@ -26,7 +26,7 @@ namespace Magento\Page\Block\Js; -class Cookie extends \Magento\Core\Block\Template +class Cookie extends \Magento\View\Block\Template { /** * @var \Magento\Core\Model\Cookie @@ -34,19 +34,19 @@ class Cookie extends \Magento\Core\Block\Template protected $_cookie; /** - * @param \Magento\Core\Model\Cookie $cookie + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context + * @param \Magento\Core\Model\Cookie $cookie * @param array $data */ public function __construct( - \Magento\Core\Model\Cookie $cookie, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, + \Magento\Core\Model\Cookie $cookie, array $data = array() ) { $this->_cookie = $cookie; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Page/Block/Js/Translate.php b/app/code/Magento/Page/Block/Js/Translate.php index b2ba6832bab50f29e93f395ed92891d4f4658f3f..bcee260cfa3d3008f2af8bf576a23ce82a24d1dc 100644 --- a/app/code/Magento/Page/Block/Js/Translate.php +++ b/app/code/Magento/Page/Block/Js/Translate.php @@ -32,6 +32,6 @@ */ namespace Magento\Page\Block\Js; -class Translate extends \Magento\Core\Block\Template +class Translate extends \Magento\View\Block\Template { } diff --git a/app/code/Magento/Page/Block/Link.php b/app/code/Magento/Page/Block/Link.php index eb93641abab365937b2cbdd1022ae5d9122a5836..621d1e8b3e0c95b4a9a8932a41dda9a93b85e6a5 100644 --- a/app/code/Magento/Page/Block/Link.php +++ b/app/code/Magento/Page/Block/Link.php @@ -31,7 +31,7 @@ namespace Magento\Page\Block; * @method string getPath() * @method string getTitle() */ -class Link extends \Magento\Core\Block\Template +class Link extends \Magento\View\Block\Template { /** @var string */ protected $_template = 'Magento_Page::link.phtml'; diff --git a/app/code/Magento/Page/Block/Link/Current.php b/app/code/Magento/Page/Block/Link/Current.php index 82611b37c396cc1f1f9f81f82ce8deaf4cde637c..fc6ac11cc1491858975cfd6aec4a988d45dd319e 100644 --- a/app/code/Magento/Page/Block/Link/Current.php +++ b/app/code/Magento/Page/Block/Link/Current.php @@ -34,7 +34,7 @@ namespace Magento\Page\Block\Link; * @method null|bool getCurrent() * @method \Magento\Page\Block\Link\Current setCurrent(bool $value) */ -class Current extends \Magento\Core\Block\Template +class Current extends \Magento\View\Block\Template { /** * @var string @@ -49,18 +49,18 @@ class Current extends \Magento\Core\Block\Template protected $_defaultPath; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\App\DefaultPathInterface $defaultPath * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\App\DefaultPathInterface $defaultPath, array $data = array() ) { - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); $this->_defaultPath = $defaultPath; } diff --git a/app/code/Magento/Page/Block/Links.php b/app/code/Magento/Page/Block/Links.php index 513b0b87cec543a277c12f88b6504ea0f8d9529b..d0d7f83a99c0b1e68f328b6692c422f218348315 100644 --- a/app/code/Magento/Page/Block/Links.php +++ b/app/code/Magento/Page/Block/Links.php @@ -27,7 +27,7 @@ namespace Magento\Page\Block; /** * Links list block */ -class Links extends \Magento\Core\Block\Template +class Links extends \Magento\View\Block\Template { /** @var string */ protected $_template = 'Magento_Page::links.phtml'; @@ -43,10 +43,10 @@ class Links extends \Magento\Core\Block\Template /** * Render Block * - * @param \Magento\Core\Block\AbstractBlock $link + * @param \Magento\View\Block\AbstractBlock $link * @return string */ - public function renderLink(\Magento\Core\Block\AbstractBlock $link) + public function renderLink(\Magento\View\Block\AbstractBlock $link) { return $this->_layout->renderElement($link->getNameInLayout()); } diff --git a/app/code/Magento/Page/Block/Redirect.php b/app/code/Magento/Page/Block/Redirect.php index f3a8f66a0308d6e1665164abb5629f56b6ca92ec..9f3bc8a31a3fca063ac3264c307e637f088a1554 100644 --- a/app/code/Magento/Page/Block/Redirect.php +++ b/app/code/Magento/Page/Block/Redirect.php @@ -34,7 +34,7 @@ */ namespace Magento\Page\Block; -class Redirect extends \Magento\Core\Block\Template +class Redirect extends \Magento\View\Block\Template { /** * HTML form hidden fields @@ -47,19 +47,19 @@ class Redirect extends \Magento\Core\Block\Template protected $_formFactory; /** - * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context + * @param \Magento\Data\FormFactory $formFactory * @param array $data */ public function __construct( - \Magento\Data\FormFactory $formFactory, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, + \Magento\Data\FormFactory $formFactory, array $data = array() ) { $this->_formFactory = $formFactory; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Page/Block/Switcher.php b/app/code/Magento/Page/Block/Switcher.php index f90edfcf9bea8316b6a95f9f8b9e2c3b2c0f8ec2..2e638715576b4142293afdb3df3d65d6721f0d0c 100644 --- a/app/code/Magento/Page/Block/Switcher.php +++ b/app/code/Magento/Page/Block/Switcher.php @@ -33,31 +33,10 @@ */ namespace Magento\Page\Block; -class Switcher extends \Magento\Core\Block\Template +class Switcher extends \Magento\View\Block\Template { protected $_storeInUrl; - /** - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param array $data - */ - public function __construct( - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, - array $data = array() - ) { - $this->_storeManager = $storeManager; - parent::__construct($coreData, $context, $data); - } - public function getCurrentWebsiteId() { return $this->_storeManager->getStore()->getWebsiteId(); diff --git a/app/code/Magento/Page/Block/Template/Container.php b/app/code/Magento/Page/Block/Template/Container.php index b6287ab096d73a470de65856c7e2fb9fe2264753..b0cb503af21670f8b4cc75918251ab5bee143a15 100644 --- a/app/code/Magento/Page/Block/Template/Container.php +++ b/app/code/Magento/Page/Block/Template/Container.php @@ -34,7 +34,7 @@ */ namespace Magento\Page\Block\Template; -class Container extends \Magento\Core\Block\Template +class Container extends \Magento\View\Block\Template { protected $_template = 'template/container.phtml'; diff --git a/app/code/Magento/Page/Block/Template/Links/Block.php b/app/code/Magento/Page/Block/Template/Links/Block.php index 98b9d007c0c1bc2a1ccd40dbfd1b5992dd3b1589..3b9b844e53b62c035781394818bf1de06d49d2c3 100644 --- a/app/code/Magento/Page/Block/Template/Links/Block.php +++ b/app/code/Magento/Page/Block/Template/Links/Block.php @@ -34,7 +34,7 @@ */ namespace Magento\Page\Block\Template\Links; -class Block extends \Magento\Core\Block\Template +class Block extends \Magento\View\Block\Template { /** diff --git a/app/code/Magento/Page/Helper/Data.php b/app/code/Magento/Page/Helper/Data.php index 0211cbb875de51ac270b9b49d0a83bd795546740..cbc6a151a36131aa14335f155140100bc982c79a 100644 --- a/app/code/Magento/Page/Helper/Data.php +++ b/app/code/Magento/Page/Helper/Data.php @@ -29,7 +29,7 @@ */ namespace Magento\Page\Helper; -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { } diff --git a/app/code/Magento/Page/Helper/Html.php b/app/code/Magento/Page/Helper/Html.php index fa353d78a67c38f0bce19bd2e544d70682bb7550..8eb193d743a95d8e758082211dd93cf8e5cfef2d 100644 --- a/app/code/Magento/Page/Helper/Html.php +++ b/app/code/Magento/Page/Helper/Html.php @@ -31,7 +31,7 @@ */ namespace Magento\Page\Helper; -class Html extends \Magento\Core\Helper\AbstractHelper +class Html extends \Magento\App\Helper\AbstractHelper { } diff --git a/app/code/Magento/Page/Helper/Layout.php b/app/code/Magento/Page/Helper/Layout.php index 10986749410fbe35ba17ec1b411f2358cfd65882..680c21a624c3c22c9ad8e9a2bf6f8095e251ff73 100644 --- a/app/code/Magento/Page/Helper/Layout.php +++ b/app/code/Magento/Page/Helper/Layout.php @@ -33,7 +33,7 @@ */ namespace Magento\Page\Helper; -class Layout extends \Magento\Core\Helper\AbstractHelper +class Layout extends \Magento\App\Helper\AbstractHelper { /** * @var \Magento\View\LayoutInterface @@ -48,12 +48,12 @@ class Layout extends \Magento\Core\Helper\AbstractHelper /** * @param \Magento\Page\Model\Config $config * @param \Magento\View\LayoutInterface $layout - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context */ public function __construct( \Magento\Page\Model\Config $config, \Magento\View\LayoutInterface $layout, - \Magento\Core\Helper\Context $context + \Magento\App\Helper\Context $context ) { parent::__construct($context); $this->_layout = $layout; diff --git a/app/code/Magento/Page/Helper/Robots.php b/app/code/Magento/Page/Helper/Robots.php index 7f8c115a7ca54f81aded3bd81a7300fca4170438..3ceaa0738d30b156dd7ac3d9877d4a6fe8a6df6a 100644 --- a/app/code/Magento/Page/Helper/Robots.php +++ b/app/code/Magento/Page/Helper/Robots.php @@ -33,7 +33,7 @@ */ namespace Magento\Page\Helper; -class Robots extends \Magento\Core\Helper\AbstractHelper +class Robots extends \Magento\App\Helper\AbstractHelper { const XML_PATH_ROBOTS_DEFAULT_CUSTOM_INSTRUCTIONS = 'design/search_engine_robots/default_custom_instructions'; @@ -45,11 +45,11 @@ class Robots extends \Magento\Core\Helper\AbstractHelper /** * Constructor * - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\Config $coreConfig */ public function __construct( - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Core\Model\Config $coreConfig ) { parent::__construct( diff --git a/app/code/Magento/Page/view/frontend/js/calendar.phtml b/app/code/Magento/Page/view/frontend/js/calendar.phtml index c809e33c75fb003c8ba24b311989c2fcdc088850..60228433b46e8c909276ee40a135c4344a8e07e1 100644 --- a/app/code/Magento/Page/view/frontend/js/calendar.phtml +++ b/app/code/Magento/Page/view/frontend/js/calendar.phtml @@ -28,7 +28,7 @@ /** * Calendar localization script. Should be put into page header. * - * @see \Magento\Core\Block\Html\Calendar + * @see \Magento\View\Block\Html\Calendar */ ?> diff --git a/app/code/Magento/Page/view/frontend/layout/default.xml b/app/code/Magento/Page/view/frontend/layout/default.xml index 14c3a8c96eb0eeaeb9b55037302ee41c2a157ece..f1fa0ada26fa7753b64b4dff45faf31e1d5b5ff3 100644 --- a/app/code/Magento/Page/view/frontend/layout/default.xml +++ b/app/code/Magento/Page/view/frontend/layout/default.xml @@ -60,8 +60,8 @@ <container name="columns.top" label="Before Main Columns" as="columns_top"> <block class="Magento\Page\Block\Html\Title" name="page.main.title" template="html/title.phtml"/> <container name="page.messages" label="invisible" htmlTag="div" htmlClass="page messages"> - <block class="Magento\Core\Block\Messages" name="global_messages" as="global_messages"/> - <block class="Magento\Core\Block\Messages" name="messages" as="messages"/> + <block class="Magento\View\Block\Messages" name="global_messages" as="global_messages"/> + <block class="Magento\View\Block\Messages" name="messages" as="messages"/> </container> </container> <container name="main" as="main" label="Main Content Container" htmlTag="div" htmlClass="column main"> @@ -80,7 +80,7 @@ <block class="Magento\Page\Block\Switcher" name="store_switcher" as="store_switcher" template="switch/stores.phtml"/> <block class="Magento\Page\Block\Links" name="footer_links"/> <block class="Magento\Page\Block\Html\Footer" name="copyright" template="html/copyright.phtml"/> - <block class="Magento\Core\Block\Template" name="report.bugs" template="Magento_Page::html/bugreport.phtml" /> + <block class="Magento\View\Block\Template" name="report.bugs" template="Magento_Page::html/bugreport.phtml" /> </container> </container> <container name="before_body_end" as="before_body_end" label="Page Bottom"> @@ -163,6 +163,7 @@ <argument name="file" xsi:type="string">mage/popup-window.js</argument> </arguments> </block> - <block class="Magento\Core\Block\Template" name="head.components" as="components" template="Magento_Page::js/components.phtml"/> + <block class="Magento\View\Block\Template" name="head.components" as="components" template="Magento_Page::js/components.phtml"/> </referenceBlock> + <update handle="default_head_blocks"/> </layout> diff --git a/app/code/Magento/Page/view/frontend/layout/default_head_blocks.xml b/app/code/Magento/Page/view/frontend/layout/default_head_blocks.xml new file mode 100644 index 0000000000000000000000000000000000000000..3e826235e57ff0179074a8a14b98bbe7a365a524 --- /dev/null +++ b/app/code/Magento/Page/view/frontend/layout/default_head_blocks.xml @@ -0,0 +1,122 @@ +<?xml version="1.0"?> +<!-- +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <referenceBlock name="head"> + <block class="Magento\Page\Block\Html\Head\Css" name="magento-calendar-css"> + <arguments> + <argument name="file" xsi:type="string">mage/calendar.css</argument> + <argument name="properties" xsi:type="array"> + <item name="attributes" xsi:type="string"/> + </argument> + </arguments> + </block> + <block class="Magento\Page\Block\Html\Head\Script" name="jquery-jquery-js"> + <arguments> + <argument name="file" xsi:type="string">jquery/jquery.js</argument> + </arguments> + </block> + <block class="Magento\Page\Block\Html\Head\Script" name="magento-jquery-no-conflict-js"> + <arguments> + <argument name="file" xsi:type="string">mage/jquery-no-conflict.js</argument> + </arguments> + </block> + <block class="Magento\Page\Block\Html\Head\Script" name="head-load-min-js"> + <arguments> + <argument name="file" xsi:type="string">head.load.min.js</argument> + </arguments> + </block> + <block class="Magento\Page\Block\Html\Head\Script" name="magento-magento-js"> + <arguments> + <argument name="file" xsi:type="string">mage/mage.js</argument> + </arguments> + </block> + <block class="Magento\Page\Block\Html\Head\Script" name="magento-decorate-js"> + <arguments> + <argument name="file" xsi:type="string">mage/decorate.js</argument> + </arguments> + </block> + <block class="Magento\Page\Block\Html\Head\Script" name="magento-translate-js"> + <arguments> + <argument name="file" xsi:type="string">mage/translate.js</argument> + </arguments> + </block> + <block class="Magento\Page\Block\Html\Head\Script" name="magento-cookies-js"> + <arguments> + <argument name="file" xsi:type="string">mage/cookies.js</argument> + </arguments> + </block> + <block class="Magento\Page\Block\Html\Head\Script" name="jquery-jquery-ui-js"> + <arguments> + <argument name="file" xsi:type="string">jquery/jquery-ui.js</argument> + </arguments> + </block> + <block class="Magento\Page\Block\Html\Head\Script" name="jquery-jquery-tmpl-min-js"> + <arguments> + <argument name="file" xsi:type="string">jquery/jquery.tmpl.min.js</argument> + </arguments> + </block> + <block class="Magento\Page\Block\Html\Head\Script" name="magento-bootstrap-js"> + <arguments> + <argument name="file" xsi:type="string">mage/bootstrap.js</argument> + </arguments> + </block> + <block class="Magento\Page\Block\Html\Head\Script" name="magento-page-js-truncate-js"> + <arguments> + <argument name="file" xsi:type="string">Magento_Page::js/truncate.js</argument> + </arguments> + </block> + <block class="Magento\Page\Block\Html\Head\Script" name="magento-common-js"> + <arguments> + <argument name="file" xsi:type="string">mage/common.js</argument> + </arguments> + </block> + <block class="Magento\Page\Block\Html\Head\Script" name="magento-toggle-js"> + <arguments> + <argument name="file" xsi:type="string">mage/toggle.js</argument> + </arguments> + </block> + <block class="Magento\Page\Block\Html\Head\Script" name="magento-popup-window-js"> + <arguments> + <argument name="file" xsi:type="string">mage/popup-window.js</argument> + </arguments> + </block> + <block class="Magento\Page\Block\Html\Head\Css" name="magento-page-css-tabs-css"> + <arguments> + <argument name="file" xsi:type="string">Magento_Page::css/tabs.css</argument> + <argument name="properties" xsi:type="array"> + <item name="attributes" xsi:type="string"/> + </argument> + </arguments> + </block> + <block class="Magento\Page\Block\Html\Head\Script" name="magento-loader-js"> + <arguments> + <argument name="file" xsi:type="string">mage/loader.js</argument> + </arguments> + </block> + <!-- Preload resources for widgets --> + <block class="Magento\Page\Block\Js\Components" name="head.components" as="components" template="Magento_Page::js/components.phtml"/> + </referenceBlock> +</layout> diff --git a/app/code/Magento/Page/view/frontend/layout/page_calendar.xml b/app/code/Magento/Page/view/frontend/layout/page_calendar.xml index 7cf88a598f8cd5981391ec9085ae1176c2cc0b1c..3ce05b304ebfc2f15d07bfbe98fa7a9dc48d7ec4 100644 --- a/app/code/Magento/Page/view/frontend/layout/page_calendar.xml +++ b/app/code/Magento/Page/view/frontend/layout/page_calendar.xml @@ -37,6 +37,6 @@ </block> </referenceBlock> <referenceContainer name="content"> - <block class="Magento\Core\Block\Html\Calendar" name="html_calendar" as="html_calendar" template="Magento_Page::js/calendar.phtml"/> + <block class="Magento\View\Block\Html\Calendar" name="html_calendar" as="html_calendar" template="Magento_Page::js/calendar.phtml"/> </referenceContainer> </layout> diff --git a/app/code/Magento/Page/view/frontend/layout/print.xml b/app/code/Magento/Page/view/frontend/layout/print.xml index c8cf050b3716296bd6b9036b16c7f8705667f7e0..80491f76177d44fdd318de840a3cce0c27e51aae 100644 --- a/app/code/Magento/Page/view/frontend/layout/print.xml +++ b/app/code/Magento/Page/view/frontend/layout/print.xml @@ -29,6 +29,7 @@ <container name="after_body_start" as="after_body_start" label="Page Top"/> <container name="content" as="content" label="Main Content Area"/> </block> + <update handle="default_head_blocks"/> <referenceBlock name="head"> <block class="Magento\Page\Block\Html\Head\Css" name="css-print-css"> <arguments> diff --git a/app/code/Magento/PageCache/Block/Adminhtml/Cache/Additional.php b/app/code/Magento/PageCache/Block/Adminhtml/Cache/Additional.php index b738778674bd6678cbec86b630f4f30a006fc2bd..89e03c5a3daf411da35225c4b957ff104c0c9075 100644 --- a/app/code/Magento/PageCache/Block/Adminhtml/Cache/Additional.php +++ b/app/code/Magento/PageCache/Block/Adminhtml/Cache/Additional.php @@ -42,20 +42,20 @@ class Additional extends \Magento\Backend\Block\Template */ protected $_pageCacheData = null; - /** - * @param \Magento\PageCache\Helper\Data $pageCacheData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\PageCache\Helper\Data $pageCacheData + * @param array $data */ - public function __construct( - \Magento\PageCache\Helper\Data $pageCacheData, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\PageCache\Helper\Data $pageCacheData, + array $data = array() + ) { $this->_pageCacheData = $pageCacheData; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/PageCache/Controller/Adminhtml/PageCache.php b/app/code/Magento/PageCache/Controller/Adminhtml/PageCache.php index f0f4723ffa6231932edc4c2ecc0a3558719105dc..c4f88d18c8dcb84619b2bb4be5e081b4b03ee491 100644 --- a/app/code/Magento/PageCache/Controller/Adminhtml/PageCache.php +++ b/app/code/Magento/PageCache/Controller/Adminhtml/PageCache.php @@ -33,7 +33,7 @@ */ namespace Magento\PageCache\Controller\Adminhtml; -class PageCache extends \Magento\Backend\Controller\Adminhtml\Action +class PageCache extends \Magento\Backend\App\Action { /** * Clean external cache action diff --git a/app/code/Magento/PageCache/Helper/Data.php b/app/code/Magento/PageCache/Helper/Data.php index 43e058effa8ff7910cb204bd7e30d8d48595d729..7bc45d76bd1c89cda574d213a1e887237d05bb5a 100644 --- a/app/code/Magento/PageCache/Helper/Data.php +++ b/app/code/Magento/PageCache/Helper/Data.php @@ -33,7 +33,7 @@ */ namespace Magento\PageCache\Helper; -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { /** * Paths to external cache config options @@ -64,13 +64,13 @@ class Data extends \Magento\Core\Helper\AbstractHelper protected $_coreStoreConfig; /** - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\PageCache\Model\CacheControlFactory $ccFactory * @param \Magento\Core\Model\Cookie $cookie * @param \Magento\Core\Model\Store\Config $coreStoreConfig */ function __construct( - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\PageCache\Model\CacheControlFactory $ccFactory, \Magento\Core\Model\Cookie $cookie, \Magento\Core\Model\Store\Config $coreStoreConfig diff --git a/app/code/Magento/PageCache/view/frontend/layout/catalog_product_view.xml b/app/code/Magento/PageCache/view/frontend/layout/catalog_product_view.xml index 024e6fc32e9e7a3d2e2743a04354f23083b4ca2c..773199f930a68bcf01cfa3a255561eb18464b0e0 100644 --- a/app/code/Magento/PageCache/view/frontend/layout/catalog_product_view.xml +++ b/app/code/Magento/PageCache/view/frontend/layout/catalog_product_view.xml @@ -25,6 +25,6 @@ --> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <referenceContainer name="content"> - <block class="Magento\Core\Block\Template" name="external.pagecache.cookie" template="Magento_PageCache::cookie.phtml"/> + <block class="Magento\View\Block\Template" name="external.pagecache.cookie" template="Magento_PageCache::cookie.phtml"/> </referenceContainer> </layout> diff --git a/app/code/Magento/Paygate/Controller/Adminhtml/Paygate/Authorizenet/Payment.php b/app/code/Magento/Paygate/Controller/Adminhtml/Paygate/Authorizenet/Payment.php index 28bda85ce6d4bfd2ecb595a8812f2b5c372c134c..80a4b863802fbdf52365c10d22d51a3fa5965750 100644 --- a/app/code/Magento/Paygate/Controller/Adminhtml/Paygate/Authorizenet/Payment.php +++ b/app/code/Magento/Paygate/Controller/Adminhtml/Paygate/Authorizenet/Payment.php @@ -33,7 +33,7 @@ */ namespace Magento\Paygate\Controller\Adminhtml\Paygate\Authorizenet; -class Payment extends \Magento\Backend\Controller\Adminhtml\Action +class Payment extends \Magento\Backend\App\Action { /** * Session quote @@ -43,11 +43,11 @@ class Payment extends \Magento\Backend\Controller\Adminhtml\Action protected $_sessionQuote; /** - * @param \Magento\Backend\Controller\Context $context + * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote */ public function __construct( - \Magento\Backend\Controller\Context $context, + \Magento\Backend\App\Action\Context $context, \Magento\Adminhtml\Model\Session\Quote $sessionQuote ) { $this->_sessionQuote = $sessionQuote; @@ -95,7 +95,7 @@ class Payment extends \Magento\Backend\Controller\Adminhtml\Action */ protected function _getPaymentMethodsHtml() { - $layout = $this->getLayout(); + $layout = $this->_view->getLayout(); $update = $layout->getUpdate(); $update->load('checkout_onepage_paymentmethod'); diff --git a/app/code/Magento/Paygate/Controller/Authorizenet/Payment.php b/app/code/Magento/Paygate/Controller/Authorizenet/Payment.php index ceefc90e318e042a630268abab6966b7cacb3177..2543ccb856ba41e333102f59dcb915b8d4f80bb7 100644 --- a/app/code/Magento/Paygate/Controller/Authorizenet/Payment.php +++ b/app/code/Magento/Paygate/Controller/Authorizenet/Payment.php @@ -33,7 +33,7 @@ */ namespace Magento\Paygate\Controller\Authorizenet; -class Payment extends \Magento\Core\Controller\Front\Action +class Payment extends \Magento\App\Action\Action { /** * Checkout session @@ -43,11 +43,11 @@ class Payment extends \Magento\Core\Controller\Front\Action protected $_session; /** - * @param \Magento\Core\Controller\Varien\Action\Context $context + * @param \Magento\App\Action\Context $context * @param \Magento\Checkout\Model\Session $session */ public function __construct( - \Magento\Core\Controller\Varien\Action\Context $context, + \Magento\App\Action\Context $context, \Magento\Checkout\Model\Session $session ) { $this->_session = $session; @@ -90,7 +90,7 @@ class Payment extends \Magento\Core\Controller\Front\Action */ protected function _getPaymentMethodsHtml() { - $layout = $this->getLayout(); + $layout = $this->_view->getLayout(); $update = $layout->getUpdate(); $update->load('checkout_onepage_paymentmethod'); $layout->generateXml(); diff --git a/app/code/Magento/Paygate/Helper/Data.php b/app/code/Magento/Paygate/Helper/Data.php index 2bc53c8d828c9e0a533f29d95eac3c53d954928d..4fea09a2e12801079e9e014964551103e62c2fcc 100644 --- a/app/code/Magento/Paygate/Helper/Data.php +++ b/app/code/Magento/Paygate/Helper/Data.php @@ -29,7 +29,7 @@ */ namespace Magento\Paygate\Helper; -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { /** * Converts a lot of messages to message diff --git a/app/code/Magento/Payment/Block/Catalog/Product/View/Profile.php b/app/code/Magento/Payment/Block/Catalog/Product/View/Profile.php index 82d34c7d521bb4ee2b1988983878693baf63a76f..5577a9c0e2128a2f670bec1cf55d558c8f9bff35 100644 --- a/app/code/Magento/Payment/Block/Catalog/Product/View/Profile.php +++ b/app/code/Magento/Payment/Block/Catalog/Product/View/Profile.php @@ -27,7 +27,7 @@ */ namespace Magento\Payment\Block\Catalog\Product\View; -class Profile extends \Magento\Core\Block\Template +class Profile extends \Magento\View\Block\Template { /** * Recurring profile instance @@ -41,14 +41,8 @@ class Profile extends \Magento\Core\Block\Template * * @var \Magento\Core\Model\Registry */ - protected $_coreRegistry = null; + protected $_registry = null; - /** - * Locale model - * - * @var \Magento\Core\Model\LocaleInterface - */ - protected $_locale; /** * Recurring profile factory @@ -58,26 +52,21 @@ class Profile extends \Magento\Core\Block\Template protected $_profileFactory; /** - * Construct - * + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Core\Model\LocaleInterface $locale * @param \Magento\Payment\Model\Recurring\ProfileFactory $profileFactory * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Core\Model\Registry $registry, - \Magento\Core\Model\LocaleInterface $locale, \Magento\Payment\Model\Recurring\ProfileFactory $profileFactory, array $data = array() ) { - parent::__construct($coreData, $context, $data); - $this->_coreRegistry = $registry; - $this->_locale = $locale; + parent::__construct($context, $coreData, $data); + $this->_registry = $registry; $this->_profileFactory = $profileFactory; } @@ -108,7 +97,7 @@ class Profile extends \Magento\Core\Block\Template if ($this->_profile->getStartDateIsEditable()) { $this->setDateHtmlId('recurring_start_date'); $calendar = $this->getLayout() - ->createBlock('Magento\Core\Block\Html\Date') + ->createBlock('Magento\View\Block\Html\Date') ->setId('recurring_start_date') ->setName(\Magento\Payment\Model\Recurring\Profile::BUY_REQUEST_START_DATETIME) ->setClass('datetime-picker input-text') @@ -126,7 +115,7 @@ class Profile extends \Magento\Core\Block\Template */ protected function _prepareLayout() { - $product = $this->_coreRegistry->registry('current_product'); + $product = $this->_registry->registry('current_product'); if ($product) { $this->_profile = $this->_profileFactory->create()->importProduct($product); } diff --git a/app/code/Magento/Payment/Block/Form.php b/app/code/Magento/Payment/Block/Form.php index 9029dd74e0a1e9861db0753c26657248f33af5da..15536b24333c69a2c3ba650e489e446515243499 100644 --- a/app/code/Magento/Payment/Block/Form.php +++ b/app/code/Magento/Payment/Block/Form.php @@ -29,7 +29,7 @@ */ namespace Magento\Payment\Block; -class Form extends \Magento\Core\Block\Template +class Form extends \Magento\View\Block\Template { /** * Retrieve payment method model diff --git a/app/code/Magento/Payment/Block/Form/Cc.php b/app/code/Magento/Payment/Block/Form/Cc.php index 61659fc9f63b91e816296ec66ca5a51d52db1b5c..91f7e34dc602dc480bfed1815e7f8c493fc16f98 100644 --- a/app/code/Magento/Payment/Block/Form/Cc.php +++ b/app/code/Magento/Payment/Block/Form/Cc.php @@ -39,20 +39,18 @@ class Cc extends \Magento\Payment\Block\Form protected $_paymentConfig; /** - * Construct - * + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Payment\Model\Config $paymentConfig * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Payment\Model\Config $paymentConfig, array $data = array() ) { - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); $this->_paymentConfig = $paymentConfig; } diff --git a/app/code/Magento/Payment/Block/Form/Container.php b/app/code/Magento/Payment/Block/Form/Container.php index 7426cb6e27e0d147617d85a1002af97447c797e6..1ae3e7242ec23c224690591d7a2c00c0db4797bd 100644 --- a/app/code/Magento/Payment/Block/Form/Container.php +++ b/app/code/Magento/Payment/Block/Form/Container.php @@ -35,7 +35,7 @@ */ namespace Magento\Payment\Block\Form; -class Container extends \Magento\Core\Block\Template +class Container extends \Magento\View\Block\Template { /** * Prepare children blocks diff --git a/app/code/Magento/Payment/Block/Info.php b/app/code/Magento/Payment/Block/Info.php index 75b70c91154443ae2eb27e129edd38c5db06a283..0a6bf7486514fec4804028f33f2aa5c2f0195d81 100644 --- a/app/code/Magento/Payment/Block/Info.php +++ b/app/code/Magento/Payment/Block/Info.php @@ -29,7 +29,7 @@ */ namespace Magento\Payment\Block; -class Info extends \Magento\Core\Block\Template +class Info extends \Magento\View\Block\Template { /** * Payment rendered specific information @@ -40,32 +40,6 @@ class Info extends \Magento\Core\Block\Template protected $_template = 'Magento_Payment::info/default.phtml'; - /** - * Store manager - * - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - - /** - * Construct - * - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param array $data - */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - array $data = array() - ) { - parent::__construct($coreData, $context, $data); - - $this->_storeManager = $storeManager; - } - /** * Retrieve info model * diff --git a/app/code/Magento/Payment/Block/Info/AbstractContainer.php b/app/code/Magento/Payment/Block/Info/AbstractContainer.php index 21b17dc29551254f06ebbd6b1472841e9a203d59..cf9e7f122527dc003e1f14997f57ca631c5bf6a8 100644 --- a/app/code/Magento/Payment/Block/Info/AbstractContainer.php +++ b/app/code/Magento/Payment/Block/Info/AbstractContainer.php @@ -33,7 +33,7 @@ */ namespace Magento\Payment\Block\Info; -abstract class AbstractContainer extends \Magento\Core\Block\Template +abstract class AbstractContainer extends \Magento\View\Block\Template { /** * Payment data @@ -43,19 +43,19 @@ abstract class AbstractContainer extends \Magento\Core\Block\Template protected $_paymentData = null; /** - * @param \Magento\Payment\Helper\Data $paymentData + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context + * @param \Magento\Payment\Helper\Data $paymentData * @param array $data */ public function __construct( - \Magento\Payment\Helper\Data $paymentData, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, + \Magento\Payment\Helper\Data $paymentData, array $data = array() ) { $this->_paymentData = $paymentData; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Payment/Block/Info/Cc.php b/app/code/Magento/Payment/Block/Info/Cc.php index 6ce354312d5c7db70c82f638f9ced426f675b3d2..7e4ce2c726560fa72437a667850722bebc5bc9a3 100644 --- a/app/code/Magento/Payment/Block/Info/Cc.php +++ b/app/code/Magento/Payment/Block/Info/Cc.php @@ -31,13 +31,6 @@ namespace Magento\Payment\Block\Info; class Cc extends \Magento\Payment\Block\Info { - /** - * Locale model - * - * @var \Magento\Core\Model\LocaleInterface - */ - protected $_locale; - /** * Payment config model * @@ -46,25 +39,18 @@ class Cc extends \Magento\Payment\Block\Info protected $_paymentConfig; /** - * Construct - * + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\LocaleInterface $locale * @param \Magento\Payment\Model\Config $paymentConfig * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\LocaleInterface $locale, \Magento\Payment\Model\Config $paymentConfig, array $data = array() ) { - parent::__construct($coreData, $context, $storeManager, $data); - $this->_locale = $locale; + parent::__construct($context, $coreData, $data); $this->_paymentConfig = $paymentConfig; } /** diff --git a/app/code/Magento/Payment/Helper/Data.php b/app/code/Magento/Payment/Helper/Data.php index c8abd936ef18fd500102a9c498511551acf3149d..ccf2dc17c03f06675a3eb5b5e51e580ac957c92c 100644 --- a/app/code/Magento/Payment/Helper/Data.php +++ b/app/code/Magento/Payment/Helper/Data.php @@ -27,7 +27,7 @@ */ namespace Magento\Payment\Helper; -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { const XML_PATH_PAYMENT_METHODS = 'payment'; @@ -72,7 +72,7 @@ class Data extends \Magento\Core\Helper\AbstractHelper /** * Construct * - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\Store\Config $coreStoreConfig * @param \Magento\View\LayoutInterface $layout * @param \Magento\Payment\Model\Method\Factory $paymentMethodFactory @@ -81,7 +81,7 @@ class Data extends \Magento\Core\Helper\AbstractHelper * @param \Magento\Payment\Model\Config $paymentConfig */ public function __construct( - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Core\Model\Store\Config $coreStoreConfig, \Magento\View\LayoutInterface $layout, \Magento\Payment\Model\Method\Factory $paymentMethodFactory, @@ -177,7 +177,7 @@ class Data extends \Magento\Core\Helper\AbstractHelper * Retrieve payment information block * * @param \Magento\Payment\Model\Info $info - * @return \Magento\Core\Block\Template + * @return \Magento\View\Block\Template */ public function getInfoBlock(\Magento\Payment\Model\Info $info) { diff --git a/app/code/Magento/Payment/Model/Method/Free.php b/app/code/Magento/Payment/Model/Method/Free.php index da2eb6c120ead6fa2eb483fd5e444d0e2dcc63da..f5da6215406179642da530fb453679255fdf4db6 100644 --- a/app/code/Magento/Payment/Model/Method/Free.php +++ b/app/code/Magento/Payment/Model/Method/Free.php @@ -54,7 +54,7 @@ class Free extends \Magento\Payment\Model\Method\AbstractMethod /** * Store manager * - * @var \Magento\Core\Model\StoreManager + * @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; diff --git a/app/code/Magento/Payment/view/frontend/form/cc.phtml b/app/code/Magento/Payment/view/frontend/form/cc.phtml index 55366ba176113a12bd2ffa2709fdb9e3e2db1bec..d2cdc7b285f3eb9af3151f6c85da48b294f98a7a 100644 --- a/app/code/Magento/Payment/view/frontend/form/cc.phtml +++ b/app/code/Magento/Payment/view/frontend/form/cc.phtml @@ -24,7 +24,7 @@ */ ?> <?php $_code=$this->getMethodCode() ?> -<fieldset class="fieldset items" id="payment_form_<?php echo $_code ?>" style="display: none;"> +<fieldset class="fieldset payment items ccard <?php echo $_code ?>" id="payment_form_<?php echo $_code ?>" style="display: none;"> <div class="field type required"> <label for="<?php echo $_code ?>_cc_type" class="label"><span><?php echo __('Credit Card Type') ?></span></label> <div class="control"> @@ -46,25 +46,30 @@ <div class="field date required" id="<?php echo $_code ?>_cc_type_exp_div"> <label for="<?php echo $_code ?>_expiration" class="label"><span><?php echo __('Expiration Date') ?></span></label> <div class="control"> - <div class="nested"> - <select id="<?php echo $_code ?>_expiration" name="payment[cc_exp_month]" class="select month" data-validate='{required:true, "validate-cc-exp":"#<?php echo $_code ?>_expiration_yr"}'> - <?php $_ccExpMonth = $this->getInfoData('cc_exp_month') ?> - <?php foreach ($this->getCcMonths() as $k=>$v): ?> - <option value="<?php echo $k?$k:'' ?>"<?php if($k==$_ccExpMonth): ?> selected="selected"<?php endif ?>><?php echo $v ?></option> - <?php endforeach ?> - </select> - </div> - <?php $_ccExpYear = $this->getInfoData('cc_exp_year') ?> - <div class="nested"> - <select id="<?php echo $_code ?>_expiration_yr" name="payment[cc_exp_year]" class="select year" data-validate='{required:true}'> - <?php foreach ($this->getCcYears() as $k=>$v): ?> - <option value="<?php echo $k?$k:'' ?>"<?php if($k==$_ccExpYear): ?> selected="selected"<?php endif ?>><?php echo $v ?></option> - <?php endforeach ?> - </select> + <div class="fields group group-2"> + <div class="field no-label month"> + <div class="control"> + <select id="<?php echo $_code ?>_expiration" name="payment[cc_exp_month]" class="select month" data-validate='{required:true, "validate-cc-exp":"#<?php echo $_code ?>_expiration_yr"}'> + <?php $_ccExpMonth = $this->getInfoData('cc_exp_month') ?> + <?php foreach ($this->getCcMonths() as $k=>$v): ?> + <option value="<?php echo $k?$k:'' ?>"<?php if($k==$_ccExpMonth): ?> selected="selected"<?php endif ?>><?php echo $v ?></option> + <?php endforeach ?> + </select> + </div> + </div> + <div class="field no-label year"> + <div class="control"> + <?php $_ccExpYear = $this->getInfoData('cc_exp_year') ?> + <select id="<?php echo $_code ?>_expiration_yr" name="payment[cc_exp_year]" class="select year" data-validate='{required:true}'> + <?php foreach ($this->getCcYears() as $k=>$v): ?> + <option value="<?php echo $k?$k:'' ?>"<?php if($k==$_ccExpYear): ?> selected="selected"<?php endif ?>><?php echo $v ?></option> + <?php endforeach ?> + </select> + </div> + </div> </div> </div> </div> - <?php echo $this->getChildHtml() ?> <?php if($this->hasVerification()): ?> <div class="field cvv required" id="<?php echo $_code ?>_cc_type_cvv_div"> <label for="<?php echo $_code ?>_cc_cid" class="label"><span><?php echo __('Card Verification Number') ?></span></label> @@ -98,19 +103,25 @@ <div class="field date required"> <label for="<?php echo $_code ?>_start_month" class="label"><span><?php echo __('Start Date') ?></span></label> <div class="control"> - <div class="nested"> - <select id="<?php echo $_code ?>_start_month" name="payment[cc_ss_start_month]" class="select month" data-validate='{"validate-cc-ukss":true}'> - <?php foreach ($this->getCcMonths() as $k=>$v): ?> - <option value="<?php echo $k?$k:'' ?>"<?php if($k==$this->getInfoData('cc_ss_start_month')): ?> selected="selected"<?php endif ?>><?php echo $v ?></option> - <?php endforeach ?> - </select> - </div> - <div class="nested"> - <select id="<?php echo $_code ?>_start_year" name="payment[cc_ss_start_year]" class="select year" data-validate='{"validate-cc-ukss":true}'> - <?php foreach ($this->getSsStartYears() as $k=>$v): ?> - <option value="<?php echo $k?$k:'' ?>"<?php if($k==$this->getInfoData('cc_ss_start_year')): ?> selected="selected"<?php endif ?>><?php echo $v ?></option> - <?php endforeach ?> - </select> + <div class="fields group group-2"> + <div class="field no-label"> + <div class="control"> + <select id="<?php echo $_code ?>_start_month" name="payment[cc_ss_start_month]" class="select month" data-validate='{"validate-cc-ukss":true}'> + <?php foreach ($this->getCcMonths() as $k=>$v): ?> + <option value="<?php echo $k?$k:'' ?>"<?php if($k==$this->getInfoData('cc_ss_start_month')): ?> selected="selected"<?php endif ?>><?php echo $v ?></option> + <?php endforeach ?> + </select> + </div> + </div> + <div class="field no-label"> + <div class="control"> + <select id="<?php echo $_code ?>_start_year" name="payment[cc_ss_start_year]" class="select year" data-validate='{"validate-cc-ukss":true}'> + <?php foreach ($this->getSsStartYears() as $k=>$v): ?> + <option value="<?php echo $k?$k:'' ?>"<?php if($k==$this->getInfoData('cc_ss_start_year')): ?> selected="selected"<?php endif ?>><?php echo $v ?></option> + <?php endforeach ?> + </select> + </div> + </div> </div> </div> </div> @@ -125,4 +136,5 @@ </script> </div> <?php endif; ?> + <?php echo $this->getChildHtml() ?> </fieldset> diff --git a/app/code/Magento/Payment/view/frontend/form/ccsave.phtml b/app/code/Magento/Payment/view/frontend/form/ccsave.phtml index 0513f139d289dbc5f211c8343b456215b2f7e3f3..5019764e241d87df74b789c3708a8737906607c5 100644 --- a/app/code/Magento/Payment/view/frontend/form/ccsave.phtml +++ b/app/code/Magento/Payment/view/frontend/form/ccsave.phtml @@ -24,7 +24,7 @@ */ ?> <?php $_code=$this->getMethodCode() ?> -<fieldset class="fieldset items" id="payment_form_<?php echo $_code ?>" style="display:none;"> +<fieldset class="fieldset payment items ccard <?php echo $_code ?>" id="payment_form_<?php echo $_code ?>" style="display:none;"> <div class="field name required"> <label for="<?php echo $_code ?>_cc_owner" class="label"><span><?php echo __('Name on Card') ?></span></label> <div class="control"> @@ -52,25 +52,30 @@ <div class="field date required"> <label for="<?php echo $_code ?>_expiration" class="label"><span><?php echo __('Expiration Date') ?></span></label> <div class="control"> - <div class="nested"> - <select id="<?php echo $_code ?>_expiration" name="payment[cc_exp_month]" class="month" data-validate='{required:true, "validate-cc-exp":"#<?php echo $_code ?>_expiration_yr"}'> - <?php $_ccExpMonth = $this->getInfoData('cc_exp_month') ?> - <?php foreach ($this->getCcMonths() as $k=>$v): ?> - <option value="<?php echo $k?$k:'' ?>"<?php if($k==$_ccExpMonth): ?> selected="selected"<?php endif ?>><?php echo $v ?></option> - <?php endforeach ?> - </select> - </div> - <div class="nested"> - <?php $_ccExpYear = $this->getInfoData('cc_exp_year') ?> - <select id="<?php echo $_code ?>_expiration_yr" name="payment[cc_exp_year]" class="year" data-validate='{required:true}'> - <?php foreach ($this->getCcYears() as $k=>$v): ?> - <option value="<?php echo $k?$k:'' ?>"<?php if($k==$_ccExpYear): ?> selected="selected"<?php endif ?>><?php echo $v ?></option> - <?php endforeach ?> - </select> + <div class="fields group group-2"> + <div class="field no-label month"> + <div class="control"> + <select id="<?php echo $_code ?>_expiration" name="payment[cc_exp_month]" class="month" data-validate='{required:true, "validate-cc-exp":"#<?php echo $_code ?>_expiration_yr"}'> + <?php $_ccExpMonth = $this->getInfoData('cc_exp_month') ?> + <?php foreach ($this->getCcMonths() as $k=>$v): ?> + <option value="<?php echo $k?$k:'' ?>"<?php if($k==$_ccExpMonth): ?> selected="selected"<?php endif ?>><?php echo $v ?></option> + <?php endforeach ?> + </select> + </div> + </div> + <div class="field no-label year"> + <div class="control"> + <?php $_ccExpYear = $this->getInfoData('cc_exp_year') ?> + <select id="<?php echo $_code ?>_expiration_yr" name="payment[cc_exp_year]" class="year" data-validate='{required:true}'> + <?php foreach ($this->getCcYears() as $k=>$v): ?> + <option value="<?php echo $k?$k:'' ?>"<?php if($k==$_ccExpYear): ?> selected="selected"<?php endif ?>><?php echo $v ?></option> + <?php endforeach ?> + </select> + </div> + </div> </div> </div> </div> - <?php echo $this->getChildHtml() ?> <?php if($this->hasVerification()): ?> <div class="field cvv required"> <label for="<?php echo $_code ?>_cc_cid" class="label"><span><?php echo __('Card Verification Number') ?></span></label> @@ -104,20 +109,27 @@ <div class="field date required"> <label for="<?php echo $_code ?>_start_month" class="label"><span><?php echo __('Start Date') ?></span></label> + <div class="control"> - <div class="nested"> - <select id="<?php echo $_code ?>_start_month" name="payment[cc_ss_start_month]" class="month" data-validate='{"validate-cc-ukss":true}'> - <?php foreach ($this->getCcMonths() as $k=>$v): ?> - <option value="<?php echo $k?$k:'' ?>"<?php if($k==$this->getInfoData('cc_ss_start_month')): ?> selected="selected"<?php endif ?>><?php echo $v ?></option> - <?php endforeach ?> - </select> - </div> - <div class="nested"> - <select id="<?php echo $_code ?>_start_year" name="payment[cc_ss_start_year]" class="year" data-validate='{"validate-cc-ukss":true}'> - <?php foreach ($this->getSsStartYears() as $k=>$v): ?> - <option value="<?php echo $k?$k:'' ?>"<?php if($k==$this->getInfoData('cc_ss_start_year')): ?> selected="selected"<?php endif ?>><?php echo $v ?></option> - <?php endforeach ?> - </select> + <div class="fields group group-2"> + <div class="field no-label"> + <div class="control"> + <select id="<?php echo $_code ?>_start_month" name="payment[cc_ss_start_month]" class="month" data-validate='{"validate-cc-ukss":true}'> + <?php foreach ($this->getCcMonths() as $k=>$v): ?> + <option value="<?php echo $k?$k:'' ?>"<?php if($k==$this->getInfoData('cc_ss_start_month')): ?> selected="selected"<?php endif ?>><?php echo $v ?></option> + <?php endforeach ?> + </select> + </div> + </div> + <div class="field no-label"> + <div class="control"> + <select id="<?php echo $_code ?>_start_year" name="payment[cc_ss_start_year]" class="year" data-validate='{"validate-cc-ukss":true}'> + <?php foreach ($this->getSsStartYears() as $k=>$v): ?> + <option value="<?php echo $k?$k:'' ?>"<?php if($k==$this->getInfoData('cc_ss_start_year')): ?> selected="selected"<?php endif ?>><?php echo $v ?></option> + <?php endforeach ?> + </select> + </div> + </div> </div> </div> </div> @@ -132,4 +144,5 @@ </script> </div> <?php endif; ?> + <?php echo $this->getChildHtml() ?> </fieldset> diff --git a/app/code/Magento/Payment/view/frontend/form/purchaseorder.phtml b/app/code/Magento/Payment/view/frontend/form/purchaseorder.phtml index 3c0dead5af6219483327a001d269538b8800a39f..a12476787229b1c197b31cc0127befb5a8073de3 100644 --- a/app/code/Magento/Payment/view/frontend/form/purchaseorder.phtml +++ b/app/code/Magento/Payment/view/frontend/form/purchaseorder.phtml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -<fieldset class="fieldset items" id="payment_form_<?php echo $this->getMethodCode() ?>" style="display: none"> +<fieldset class="fieldset items <?php echo $this->getMethodCode() ?>" id="payment_form_<?php echo $this->getMethodCode() ?>" style="display: none"> <div class="field number required"> <label for="po_number" class="label"><span><?php echo __('Purchase Order Number') ?></span></label> <div class="control"> diff --git a/app/code/Magento/Payment/view/frontend/layout/catalog_product_view.xml b/app/code/Magento/Payment/view/frontend/layout/catalog_product_view.xml index 7155d46d9797010d57d821d81539990f47c8c84e..7e01d578f9a6a88f8bbcc47d0e7b1759745e0cb2 100644 --- a/app/code/Magento/Payment/view/frontend/layout/catalog_product_view.xml +++ b/app/code/Magento/Payment/view/frontend/layout/catalog_product_view.xml @@ -24,7 +24,7 @@ */ --> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <referenceBlock name="product.info"> + <referenceBlock name="product.info.main"> <block class="Magento\Payment\Block\Catalog\Product\View\Profile" name="product.info.additional.recurring.schedule" as="recurring_info" template="catalog/product/view/profile/schedule.phtml" group="detailed_info"> <action method="setTitle"> <argument translate="true" name="value" xsi:type="string">Recurring Profile</argument> diff --git a/app/code/Magento/Paypal/Block/Adminhtml/Settlement/Details/Form.php b/app/code/Magento/Paypal/Block/Adminhtml/Settlement/Details/Form.php index 6218800cdadc2d7cf45d845c4a9e25c38b66e1b2..ca41e7aa837a10e38a0a2b44b75c250cd348915c 100644 --- a/app/code/Magento/Paypal/Block/Adminhtml/Settlement/Details/Form.php +++ b/app/code/Magento/Paypal/Block/Adminhtml/Settlement/Details/Form.php @@ -31,37 +31,29 @@ namespace Magento\Paypal\Block\Adminhtml\Settlement\Details; class Form extends \Magento\Backend\Block\Widget\Form\Generic { - /** - * @var \Magento\Core\Model\LocaleInterface - */ - protected $_locale; - /** * @var \Magento\Paypal\Model\Report\Settlement */ protected $_settlement; - /** - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\LocaleInterface $locale - * @param \Magento\Paypal\Model\Report\Settlement $settlement - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Paypal\Model\Report\Settlement $settlement + * @param array $data */ - public function __construct( - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\LocaleInterface $locale, - \Magento\Paypal\Model\Report\Settlement $settlement, - array $data = array() - ) { - $this->_locale = $locale; + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Paypal\Model\Report\Settlement $settlement, + array $data = array() + ) { $this->_settlement = $settlement; - parent::__construct($registry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); } /** diff --git a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Store.php b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Store.php index dfa16aa7a2b9c64f95f9963c14e98d215b8c62af..41080a46a66d7e9325bebe28ec0880d4b0c27e38 100644 --- a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Store.php +++ b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Store.php @@ -48,31 +48,19 @@ class Store protected $_coreConfig; /** - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - - /** - * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Core\Model\Config $coreConfig - * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param array $data */ public function __construct( - \Magento\Core\Helper\Data $coreData, \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Core\Model\Config $coreConfig, - \Magento\Core\Model\StoreManagerInterface $storeManager, array $data = array() ) { - parent::__construct( - $coreData, - $context, - $data - ); + parent::__construct($context, $coreData, $data); $this->_coreConfig = $coreConfig; - $this->_storeManager = $storeManager; } /** diff --git a/app/code/Magento/Paypal/Block/Express/Form.php b/app/code/Magento/Paypal/Block/Express/Form.php index c97c9acf6ef04e852f9f690b19e1915e6a2a6997..5583bc112b5fc9c9f89bd03a45a830238bf534e3 100644 --- a/app/code/Magento/Paypal/Block/Express/Form.php +++ b/app/code/Magento/Paypal/Block/Express/Form.php @@ -51,26 +51,24 @@ class Form extends \Magento\Paypal\Block\Standard\Form protected $_customerSession; /** - * @param \Magento\Paypal\Helper\Data $paypalData + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context - * @param \Magento\Core\Model\LocaleInterface $locale * @param \Magento\Paypal\Model\ConfigFactory $paypalConfigFactory + * @param \Magento\Paypal\Helper\Data $paypalData * @param \Magento\Customer\Model\Session $customerSession * @param array $data */ public function __construct( - \Magento\Paypal\Helper\Data $paypalData, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, - \Magento\Core\Model\LocaleInterface $locale, \Magento\Paypal\Model\ConfigFactory $paypalConfigFactory, + \Magento\Paypal\Helper\Data $paypalData, \Magento\Customer\Model\Session $customerSession, array $data = array() ) { $this->_paypalData = $paypalData; $this->_customerSession = $customerSession; - parent::__construct($coreData, $context, $locale, $paypalConfigFactory, $data); + parent::__construct($context, $coreData, $paypalConfigFactory, $data); } /** @@ -86,7 +84,7 @@ class Form extends \Magento\Paypal\Block\Standard\Form /** * Set data to block * - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ protected function _beforeToHtml() { diff --git a/app/code/Magento/Paypal/Block/Express/Review.php b/app/code/Magento/Paypal/Block/Express/Review.php index 0747dbc38169ce4ca7770269c6abee780f254303..6f55be3452b9709f93d738ca1842edb1da9e8a11 100644 --- a/app/code/Magento/Paypal/Block/Express/Review.php +++ b/app/code/Magento/Paypal/Block/Express/Review.php @@ -33,7 +33,7 @@ */ namespace Magento\Paypal\Block\Express; -class Review extends \Magento\Core\Block\Template +class Review extends \Magento\View\Block\Template { /** * @var \Magento\Sales\Model\Quote diff --git a/app/code/Magento/Paypal/Block/Express/Shortcut.php b/app/code/Magento/Paypal/Block/Express/Shortcut.php index 86c0b5e0a5d4a8634033058dff09fd7ec408807c..202a726da88c164e2a58b4a82e98317691b39e78 100644 --- a/app/code/Magento/Paypal/Block/Express/Shortcut.php +++ b/app/code/Magento/Paypal/Block/Express/Shortcut.php @@ -29,7 +29,7 @@ */ namespace Magento\Paypal\Block\Express; -class Shortcut extends \Magento\Core\Block\Template +class Shortcut extends \Magento\View\Block\Template { /** * Position of "OR" label against shortcut @@ -70,7 +70,7 @@ class Shortcut extends \Magento\Core\Block\Template * * @var \Magento\Core\Model\Registry */ - protected $_coreRegistry; + protected $_registry; /** * Payment data @@ -86,11 +86,6 @@ class Shortcut extends \Magento\Core\Block\Template */ protected $_paypalData; - /** - * @var \Magento\Core\Model\LocaleInterface - */ - protected $_locale; - /** * @var \Magento\Customer\Model\Session */ @@ -117,12 +112,11 @@ class Shortcut extends \Magento\Core\Block\Template protected $mathRandom; /** + * @param \Magento\View\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Paypal\Helper\Data $paypalData * @param \Magento\Payment\Helper\Data $paymentData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Core\Model\LocaleInterface $locale * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Paypal\Model\ConfigFactory $paypalConfigFactory * @param \Magento\Checkout\Model\Session $checkoutSession @@ -131,12 +125,11 @@ class Shortcut extends \Magento\Core\Block\Template * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Paypal\Helper\Data $paypalData, \Magento\Payment\Helper\Data $paymentData, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Core\Model\Registry $registry, - \Magento\Core\Model\LocaleInterface $locale, \Magento\Customer\Model\Session $customerSession, \Magento\Paypal\Model\ConfigFactory $paypalConfigFactory, \Magento\Checkout\Model\Session $checkoutSession, @@ -144,20 +137,19 @@ class Shortcut extends \Magento\Core\Block\Template \Magento\Math\Random $mathRandom, array $data = array() ) { - $this->_coreRegistry = $registry; + $this->_registry = $registry; $this->_paypalData = $paypalData; $this->_paymentData = $paymentData; - $this->_locale = $locale; $this->_customerSession = $customerSession; $this->_paypalConfigFactory = $paypalConfigFactory; $this->_checkoutSession = $checkoutSession; $this->_checkoutFactory = $checkoutFactory; $this->mathRandom = $mathRandom; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ protected function _beforeToHtml() { @@ -177,7 +169,7 @@ class Shortcut extends \Magento\Core\Block\Template if ($isInCatalog) { // Show PayPal shortcut on a product view page only if product has nonzero price /** @var $currentProduct \Magento\Catalog\Model\Product */ - $currentProduct = $this->_coreRegistry->registry('current_product'); + $currentProduct = $this->_registry->registry('current_product'); if (!is_null($currentProduct)) { $productPrice = (float)$currentProduct->getFinalPrice(); if (empty($productPrice) && !$currentProduct->isGrouped()) { diff --git a/app/code/Magento/Paypal/Block/Iframe.php b/app/code/Magento/Paypal/Block/Iframe.php index b3f13149320f2fe648a487e725d50aa271a632c9..2e8eb96bad9b236a8ab317aedc6eff52878c83fc 100644 --- a/app/code/Magento/Paypal/Block/Iframe.php +++ b/app/code/Magento/Paypal/Block/Iframe.php @@ -75,22 +75,22 @@ class Iframe extends \Magento\Payment\Block\Form protected $_checkoutSession; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Sales\Model\OrderFactory $orderFactory * @param \Magento\Checkout\Model\Session $checkoutSession * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Sales\Model\OrderFactory $orderFactory, \Magento\Checkout\Model\Session $checkoutSession, array $data = array() ) { $this->_orderFactory = $orderFactory; $this->_checkoutSession = $checkoutSession; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** @@ -164,7 +164,7 @@ class Iframe extends \Magento\Payment\Block\Form /** * Before rendering html, check if is block rendering needed * - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ protected function _beforeToHtml() { diff --git a/app/code/Magento/Paypal/Block/Logo.php b/app/code/Magento/Paypal/Block/Logo.php index c73a29b05f38eb2ecb8c2aca7e324c19d8c63bf8..c07fcde8f2ba642672d654dd6b1423b4d7fc4585 100644 --- a/app/code/Magento/Paypal/Block/Logo.php +++ b/app/code/Magento/Paypal/Block/Logo.php @@ -29,35 +29,27 @@ */ namespace Magento\Paypal\Block; -class Logo extends \Magento\Core\Block\Template +class Logo extends \Magento\View\Block\Template { - /** - * @var \Magento\Core\Model\LocaleInterface - */ - protected $_locale; - /** * @var \Magento\Paypal\Model\Config */ protected $_paypalConfig; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context - * @param \Magento\Core\Model\LocaleInterface $locale * @param \Magento\Paypal\Model\Config $paypalConfig * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, - \Magento\Core\Model\LocaleInterface $locale, \Magento\Paypal\Model\Config $paypalConfig, array $data = array() ) { - $this->_locale = $locale; $this->_paypalConfig = $paypalConfig; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Paypal/Block/Payflow/Link/Iframe.php b/app/code/Magento/Paypal/Block/Payflow/Link/Iframe.php index e867dcbed596e3f78872a1b4a934f1c6bfe4244e..dd80bd9909a78d3c8bd3722a27d5ee31dc2caf2a 100644 --- a/app/code/Magento/Paypal/Block/Payflow/Link/Iframe.php +++ b/app/code/Magento/Paypal/Block/Payflow/Link/Iframe.php @@ -39,23 +39,23 @@ class Iframe extends \Magento\Paypal\Block\Iframe protected $_paymentData = null; /** - * @param \Magento\Payment\Helper\Data $paymentData + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Sales\Model\OrderFactory $orderFactory * @param \Magento\Checkout\Model\Session $checkoutSession + * @param \Magento\Payment\Helper\Data $paymentData * @param array $data */ public function __construct( - \Magento\Payment\Helper\Data $paymentData, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Sales\Model\OrderFactory $orderFactory, \Magento\Checkout\Model\Session $checkoutSession, + \Magento\Payment\Helper\Data $paymentData, array $data = array() ) { $this->_paymentData = $paymentData; - parent::__construct($coreData, $context, $orderFactory, $checkoutSession, $data); + parent::__construct($context, $coreData, $orderFactory, $checkoutSession, $data); } /** diff --git a/app/code/Magento/Paypal/Block/Payment/Info.php b/app/code/Magento/Paypal/Block/Payment/Info.php index a21742b905cbf2ff4008325f36eff33602e179c4..43185675a35f8b806b9a36f4b9ce3f335e485ee3 100644 --- a/app/code/Magento/Paypal/Block/Payment/Info.php +++ b/app/code/Magento/Paypal/Block/Payment/Info.php @@ -38,25 +38,21 @@ class Info extends \Magento\Payment\Block\Info\Cc protected $_paypalInfoFactory; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\LocaleInterface $locale * @param \Magento\Payment\Model\Config $paymentConfig * @param \Magento\Paypal\Model\InfoFactory $paypalInfoFactory * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\LocaleInterface $locale, \Magento\Payment\Model\Config $paymentConfig, \Magento\Paypal\Model\InfoFactory $paypalInfoFactory, array $data = array() ) { $this->_paypalInfoFactory = $paypalInfoFactory; - parent::__construct($coreData, $context, $storeManager, $locale, $paymentConfig, $data); + parent::__construct($context, $coreData, $paymentConfig, $data); } /** diff --git a/app/code/Magento/Paypal/Block/Standard/Form.php b/app/code/Magento/Paypal/Block/Standard/Form.php index 330e67c4d9afd0810483cdd58d2461e532707a7a..24b4c428152858041e067b045f82fbf6617b7521 100644 --- a/app/code/Magento/Paypal/Block/Standard/Form.php +++ b/app/code/Magento/Paypal/Block/Standard/Form.php @@ -44,33 +44,25 @@ class Form extends \Magento\Payment\Block\Form */ protected $_config; - /** - * @var \Magento\Core\Model\LocaleInterface - */ - protected $_locale; - /** * @var \Magento\Paypal\Model\ConfigFactory */ protected $_paypalConfigFactory; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context - * @param \Magento\Core\Model\LocaleInterface $locale * @param \Magento\Paypal\Model\ConfigFactory $paypalConfigFactory * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, - \Magento\Core\Model\LocaleInterface $locale, \Magento\Paypal\Model\ConfigFactory $paypalConfigFactory, array $data = array() ) { - $this->_locale = $locale; $this->_paypalConfigFactory = $paypalConfigFactory; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** @@ -79,8 +71,8 @@ class Form extends \Magento\Payment\Block\Form protected function _construct() { $this->_config = $this->_paypalConfigFactory->create()->setMethod($this->getMethodCode()); - /** @var $mark \Magento\Core\Block\Template */ - $mark = $this->_layout->createBlock('Magento\Core\Block\Template'); + /** @var $mark \Magento\View\Block\Template */ + $mark = $this->_layout->createBlock('Magento\View\Block\Template'); $mark->setTemplate('Magento_Paypal::payment/mark.phtml') ->setPaymentAcceptanceMarkHref($this->_config->getPaymentMarkWhatIsPaypalUrl($this->_locale)) ->setPaymentAcceptanceMarkSrc($this->_config->getPaymentMarkImageUrl($this->_locale->getLocaleCode())); diff --git a/app/code/Magento/Paypal/Block/Standard/Redirect.php b/app/code/Magento/Paypal/Block/Standard/Redirect.php index ff2e99b4898c585ea9dc734459e15351fcd3827c..7756aae00407b67a4b72c80bf6d088b6800d636e 100644 --- a/app/code/Magento/Paypal/Block/Standard/Redirect.php +++ b/app/code/Magento/Paypal/Block/Standard/Redirect.php @@ -25,7 +25,7 @@ */ namespace Magento\Paypal\Block\Standard; -class Redirect extends \Magento\Core\Block\AbstractBlock +class Redirect extends \Magento\View\Block\AbstractBlock { /** * @var \Magento\Data\FormFactory @@ -48,17 +48,17 @@ class Redirect extends \Magento\Core\Block\AbstractBlock protected $mathRandom; /** + * @param \Magento\View\Block\Context $context * @param \Magento\Data\FormFactory $formFactory * @param \Magento\Data\Form\Element\Factory $elementFactory - * @param \Magento\Core\Block\Context $context * @param \Magento\Paypal\Model\StandardFactory $paypalStandardFactory * @param \Magento\Math\Random $mathRandom * @param array $data */ public function __construct( + \Magento\View\Block\Context $context, \Magento\Data\FormFactory $formFactory, \Magento\Data\Form\Element\Factory $elementFactory, - \Magento\Core\Block\Context $context, \Magento\Paypal\Model\StandardFactory $paypalStandardFactory, \Magento\Math\Random $mathRandom, array $data = array() diff --git a/app/code/Magento/Paypal/Controller/Adminhtml/Paypal/Reports.php b/app/code/Magento/Paypal/Controller/Adminhtml/Paypal/Reports.php index 5eb5e07bda37aaaabb97d8fabd2ddf0db90d49cc..a1150de185d2231f56aa36d106d5239261fb07cf 100644 --- a/app/code/Magento/Paypal/Controller/Adminhtml/Paypal/Reports.php +++ b/app/code/Magento/Paypal/Controller/Adminhtml/Paypal/Reports.php @@ -29,7 +29,7 @@ */ namespace Magento\Paypal\Controller\Adminhtml\Paypal; -class Reports extends \Magento\Backend\Controller\Adminhtml\Action +class Reports extends \Magento\Backend\App\Action { /** * Core registry @@ -54,21 +54,23 @@ class Reports extends \Magento\Backend\Controller\Adminhtml\Action protected $_logger; /** - * @param \Magento\Backend\Controller\Context $context + * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Core\Model\Registry $coreRegistry * @param \Magento\Paypal\Model\Report\Settlement\RowFactory $rowFactory * @param \Magento\Paypal\Model\Report\SettlementFactory $settlementFactory + * @param \Magento\Logger $logger */ public function __construct( - \Magento\Backend\Controller\Context $context, + \Magento\Backend\App\Action\Context $context, \Magento\Core\Model\Registry $coreRegistry, \Magento\Paypal\Model\Report\Settlement\RowFactory $rowFactory, - \Magento\Paypal\Model\Report\SettlementFactory $settlementFactory + \Magento\Paypal\Model\Report\SettlementFactory $settlementFactory, + \Magento\Logger $logger ) { $this->_coreRegistry = $coreRegistry; $this->_rowFactory = $rowFactory; $this->_settlementFactory = $settlementFactory; - $this->_logger = $context->getLogger(); + $this->_logger = $logger; parent::__construct($context); } @@ -77,7 +79,8 @@ class Reports extends \Magento\Backend\Controller\Adminhtml\Action */ public function indexAction() { - $this->_initAction()->renderLayout(); + $this->_initAction(); + $this->_view->renderLayout(); } /** @@ -85,8 +88,8 @@ class Reports extends \Magento\Backend\Controller\Adminhtml\Action */ public function gridAction() { - $this->loadLayout(false); - $this->renderLayout(); + $this->_view->loadLayout(false); + $this->_view->renderLayout(); } /** @@ -101,11 +104,13 @@ class Reports extends \Magento\Backend\Controller\Adminhtml\Action return; } $this->_coreRegistry->register('current_transaction', $row); - $this->_initAction() - ->_title(__('View Transaction')) - ->_addContent($this->getLayout() - ->createBlock('Magento\Paypal\Block\Adminhtml\Settlement\Details', 'settlementDetails')) - ->renderLayout(); + $this->_initAction(); + $this->_title->add(__('View Transaction')); + $this->_addContent( + $this->_view->getLayout() + ->createBlock('Magento\Paypal\Block\Adminhtml\Settlement\Details', 'settlementDetails') + ); + $this->_view->renderLayout(); } /** @@ -152,9 +157,9 @@ class Reports extends \Magento\Backend\Controller\Adminhtml\Action */ protected function _initAction() { - $this->_title(__('PayPal Settlement Reports')); - $this->loadLayout() - ->_setActiveMenu('Magento_Paypal::report_salesroot_paypal_settlement_reports') + $this->_title->add(__('PayPal Settlement Reports')); + $this->_view->loadLayout(); + $this->_setActiveMenu('Magento_Paypal::report_salesroot_paypal_settlement_reports') ->_addBreadcrumb(__('Reports'), __('Reports')) ->_addBreadcrumb(__('Sales'), __('Sales')) ->_addBreadcrumb(__('PayPal Settlement Reports'), __('PayPal Settlement Reports')); diff --git a/app/code/Magento/Paypal/Controller/Express.php b/app/code/Magento/Paypal/Controller/Express.php index 8445f06224ee8249c645d47af6978f08b9b41a66..d6fd4b8697b4385ffd9e891ebbb3990b498b9b70 100644 --- a/app/code/Magento/Paypal/Controller/Express.php +++ b/app/code/Magento/Paypal/Controller/Express.php @@ -61,9 +61,8 @@ class Express extends \Magento\Paypal\Controller\Express\AbstractExpress protected $_customerHelper; /** - * @param \Magento\Core\Controller\Varien\Action\Context $context + * @param \Magento\App\Action\Context $context * @param \Magento\Customer\Model\Session $customerSession - * @param \Magento\UrlInterface $urlBuilder * @param \Magento\Sales\Model\QuoteFactory $quoteFactory * @param \Magento\Checkout\Model\Session $checkoutSession * @param \Magento\Sales\Model\OrderFactory $orderFactory @@ -75,9 +74,8 @@ class Express extends \Magento\Paypal\Controller\Express\AbstractExpress * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( - \Magento\Core\Controller\Varien\Action\Context $context, + \Magento\App\Action\Context $context, \Magento\Customer\Model\Session $customerSession, - \Magento\UrlInterface $urlBuilder, \Magento\Sales\Model\QuoteFactory $quoteFactory, \Magento\Checkout\Model\Session $checkoutSession, \Magento\Sales\Model\OrderFactory $orderFactory, @@ -92,7 +90,6 @@ class Express extends \Magento\Paypal\Controller\Express\AbstractExpress parent::__construct( $context, $customerSession, - $urlBuilder, $quoteFactory, $checkoutSession, $orderFactory, @@ -106,8 +103,8 @@ class Express extends \Magento\Paypal\Controller\Express\AbstractExpress */ public function redirectLogin() { - $this->setFlag('', 'no-dispatch', true); - $this->_customerSession->setBeforeAuthUrl($this->_getRefererUrl()); + $this->_actionFlag->set('', 'no-dispatch', true); + $this->_customerSession->setBeforeAuthUrl($this->_redirect->getRefererUrl()); $this->getResponse()->setRedirect( $this->_urlHelper->addRequestParam($this->_customerHelper->getLoginUrl(), array('context' => 'checkout')) ); diff --git a/app/code/Magento/Paypal/Controller/Express/AbstractExpress.php b/app/code/Magento/Paypal/Controller/Express/AbstractExpress.php index c47bebf804a80b600567cf8cb82f531601a9440e..c1ad618cc43906bdd1439b33a43a61139a6244d6 100644 --- a/app/code/Magento/Paypal/Controller/Express/AbstractExpress.php +++ b/app/code/Magento/Paypal/Controller/Express/AbstractExpress.php @@ -29,7 +29,7 @@ */ namespace Magento\Paypal\Controller\Express; -abstract class AbstractExpress extends \Magento\Core\Controller\Front\Action +abstract class AbstractExpress extends \Magento\App\Action\Action { /** * @var \Magento\Paypal\Model\Express\Checkout @@ -79,11 +79,6 @@ abstract class AbstractExpress extends \Magento\Core\Controller\Front\Action */ protected $_customerSession; - /** - * @var \Magento\UrlInterface - */ - protected $_urlBuilder; - /** * @var \Magento\Sales\Model\QuoteFactory */ @@ -110,9 +105,8 @@ abstract class AbstractExpress extends \Magento\Core\Controller\Front\Action protected $_paypalSession; /** - * @param \Magento\Core\Controller\Varien\Action\Context $context + * @param \Magento\App\Action\Context $context * @param \Magento\Customer\Model\Session $customerSession - * @param \Magento\UrlInterface $urlBuilder * @param \Magento\Sales\Model\QuoteFactory $quoteFactory * @param \Magento\Checkout\Model\Session $checkoutSession * @param \Magento\Sales\Model\OrderFactory $orderFactory @@ -120,9 +114,8 @@ abstract class AbstractExpress extends \Magento\Core\Controller\Front\Action * @param \Magento\Core\Model\Session\Generic $paypalSession */ public function __construct( - \Magento\Core\Controller\Varien\Action\Context $context, + \Magento\App\Action\Context $context, \Magento\Customer\Model\Session $customerSession, - \Magento\UrlInterface $urlBuilder, \Magento\Sales\Model\QuoteFactory $quoteFactory, \Magento\Checkout\Model\Session $checkoutSession, \Magento\Sales\Model\OrderFactory $orderFactory, @@ -130,21 +123,12 @@ abstract class AbstractExpress extends \Magento\Core\Controller\Front\Action \Magento\Core\Model\Session\Generic $paypalSession ) { $this->_customerSession = $customerSession; - $this->_urlBuilder = $urlBuilder; $this->_quoteFactory = $quoteFactory; $this->_checkoutSession = $checkoutSession; $this->_orderFactory = $orderFactory; $this->_checkoutFactory = $checkoutFactory; $this->_paypalSession = $paypalSession; parent::__construct($context); - } - - /** - * Instantiate config - */ - protected function _construct() - { - parent::_construct(); $parameters = array('params' => array($this->_configMethod)); $this->_config = $this->_objectManager->create($this->_configType, $parameters); } @@ -178,14 +162,14 @@ abstract class AbstractExpress extends \Magento\Core\Controller\Front\Action // giropay $this->_checkout->prepareGiropayUrls( - $this->_urlBuilder->getUrl('checkout/onepage/success'), - $this->_urlBuilder->getUrl('paypal/express/cancel'), - $this->_urlBuilder->getUrl('checkout/onepage/success') + $this->_url->getUrl('checkout/onepage/success'), + $this->_url->getUrl('paypal/express/cancel'), + $this->_url->getUrl('checkout/onepage/success') ); $token = $this->_checkout->start( - $this->_urlBuilder->getUrl('*/*/return'), - $this->_urlBuilder->getUrl('*/*/cancel') + $this->_url->getUrl('*/*/return'), + $this->_url->getUrl('*/*/cancel') ); if ($token && $url = $this->_checkout->getRedirectUrl()) { $this->_initToken($token); @@ -278,15 +262,15 @@ abstract class AbstractExpress extends \Magento\Core\Controller\Front\Action try { $this->_initCheckout(); $this->_checkout->prepareOrderReview($this->_initToken()); - $this->loadLayout(); - $this->_initLayoutMessages('Magento\Paypal\Model\Session'); - $reviewBlock = $this->getLayout()->getBlock('paypal.express.review'); + $this->_view->loadLayout(); + $this->_view->getLayout()->initMessages('Magento\Paypal\Model\Session'); + $reviewBlock = $this->_view->getLayout()->getBlock('paypal.express.review'); $reviewBlock->setQuote($this->_getQuote()); $reviewBlock->getChildBlock('details')->setQuote($this->_getQuote()); if ($reviewBlock->getChildBlock('shipping_method')) { $reviewBlock->getChildBlock('shipping_method')->setQuote($this->_getQuote()); } - $this->renderLayout(); + $this->_view->renderLayout(); return; } catch (\Magento\Core\Exception $e) { $this->_checkoutSession->addError($e->getMessage()); @@ -322,8 +306,8 @@ abstract class AbstractExpress extends \Magento\Core\Controller\Front\Action $this->_initCheckout(); $this->_checkout->updateShippingMethod($this->getRequest()->getParam('shipping_method')); if ($isAjax) { - $this->loadLayout('paypal_express_review_details'); - $this->getResponse()->setBody($this->getLayout()->getBlock('root') + $this->_view->loadLayout('paypal_express_review_details'); + $this->getResponse()->setBody($this->_view->getLayout()->getBlock('root') ->setQuote($this->_getQuote()) ->toHtml()); return; @@ -336,7 +320,7 @@ abstract class AbstractExpress extends \Magento\Core\Controller\Front\Action } if ($isAjax) { $this->getResponse()->setBody('<script type="text/javascript">window.location.href = ' - . $this->_urlBuilder->getUrl('*/*/review') . ';</script>'); + . $this->_url->getUrl('*/*/review') . ';</script>'); } else { $this->_redirect('*/*/review'); } @@ -350,9 +334,9 @@ abstract class AbstractExpress extends \Magento\Core\Controller\Front\Action try { $this->_initCheckout(); $this->_checkout->prepareOrderReview($this->_initToken()); - $this->loadLayout('paypal_express_review'); + $this->_view->loadLayout('paypal_express_review'); - $this->getResponse()->setBody($this->getLayout()->getBlock('express.review.shipping.method') + $this->getResponse()->setBody($this->_view->getLayout()->getBlock('express.review.shipping.method') ->setQuote($this->_getQuote()) ->toHtml()); return; @@ -363,7 +347,7 @@ abstract class AbstractExpress extends \Magento\Core\Controller\Front\Action $this->_objectManager->get('Magento\Logger')->logException($e); } $this->getResponse()->setBody('<script type="text/javascript">window.location.href = ' - . $this->_urlBuilder->getUrl('*/*/review') . ';</script>'); + . $this->_url->getUrl('*/*/review') . ';</script>'); } /** @@ -376,8 +360,8 @@ abstract class AbstractExpress extends \Magento\Core\Controller\Front\Action $this->_initCheckout(); $this->_checkout->updateOrder($this->getRequest()->getParams()); if ($isAjax) { - $this->loadLayout('paypal_express_review_details'); - $this->getResponse()->setBody($this->getLayout()->getBlock('root') + $this->_view->loadLayout('paypal_express_review_details'); + $this->getResponse()->setBody($this->_view->getLayout()->getBlock('root') ->setQuote($this->_getQuote()) ->toHtml()); return; @@ -390,7 +374,7 @@ abstract class AbstractExpress extends \Magento\Core\Controller\Front\Action } if ($isAjax) { $this->getResponse()->setBody('<script type="text/javascript">window.location.href = ' - . $this->_urlBuilder->getUrl('*/*/review') . ';</script>'); + . $this->_url->getUrl('*/*/review') . ';</script>'); } else { $this->_redirect('*/*/review'); } @@ -562,7 +546,7 @@ abstract class AbstractExpress extends \Magento\Core\Controller\Front\Action */ public function redirectLogin() { - $this->setFlag('', 'no-dispatch', true); + $this->_actionFlag->set('', 'no-dispatch', true); $this->getResponse()->setRedirect( $this->_objectManager->get('Magento\Core\Helper\Url')->addRequestParam( $this->_objectManager->get('Magento\Customer\Helper\Data')->getLoginUrl(), diff --git a/app/code/Magento/Paypal/Controller/Hostedpro.php b/app/code/Magento/Paypal/Controller/Hostedpro.php index a861fc2efc9e75e0234e82d609155a7e09e12a16..8988380472819f82c5b77fef9b3bbe5fb8409213 100644 --- a/app/code/Magento/Paypal/Controller/Hostedpro.php +++ b/app/code/Magento/Paypal/Controller/Hostedpro.php @@ -31,7 +31,7 @@ */ namespace Magento\Paypal\Controller; -class Hostedpro extends \Magento\Core\Controller\Front\Action +class Hostedpro extends \Magento\App\Action\Action { /** * When a customer return to website from gateway. @@ -50,12 +50,12 @@ class Hostedpro extends \Magento\Core\Controller\Front\Action */ public function cancelAction() { - $this->loadLayout(false); + $this->_view->loadLayout(false); $gotoSection = $this->_cancelPayment(); - $redirectBlock = $this->getLayout()->getBlock('hosted.pro.iframe'); + $redirectBlock = $this->_view->getLayout()->getBlock('hosted.pro.iframe'); $redirectBlock->setGotoSection($gotoSection); //TODO: clarify return logic whether customer will be returned in iframe or in parent window - $this->renderLayout(); + $this->_view->renderLayout(); } /** diff --git a/app/code/Magento/Paypal/Controller/Ipn.php b/app/code/Magento/Paypal/Controller/Ipn.php index 194f0c9316aca0fe83ff174ee4fb97ad561c4879..fc5ba1bb79564c8ab8fe0617dea331b757d29fc5 100644 --- a/app/code/Magento/Paypal/Controller/Ipn.php +++ b/app/code/Magento/Paypal/Controller/Ipn.php @@ -27,7 +27,7 @@ */ namespace Magento\Paypal\Controller; -class Ipn extends \Magento\Core\Controller\Front\Action +class Ipn extends \Magento\App\Action\Action { /** * @var \Magento\Logger @@ -45,16 +45,17 @@ class Ipn extends \Magento\Core\Controller\Front\Action protected $_curlFactory; /** - * @param \Magento\Core\Controller\Varien\Action\Context $context + * @param \Magento\App\Action\Context $context * @param \Magento\Paypal\Model\IpnFactory $ipnFactory * @param \Magento\HTTP\Adapter\CurlFactory $curlFactory */ public function __construct( - \Magento\Core\Controller\Varien\Action\Context $context, + \Magento\App\Action\Context $context, \Magento\Paypal\Model\IpnFactory $ipnFactory, - \Magento\HTTP\Adapter\CurlFactory $curlFactory + \Magento\HTTP\Adapter\CurlFactory $curlFactory, + \Magento\Logger $logger ) { - $this->_logger = $context->getLogger(); + $this->_logger = $logger; $this->_ipnFactory = $ipnFactory; $this->_curlFactory = $curlFactory; parent::__construct($context); diff --git a/app/code/Magento/Paypal/Controller/Payflow.php b/app/code/Magento/Paypal/Controller/Payflow.php index a1b20ef02dc19aa0b2e25d00cdfce42b1ebe843c..98e490a39609c6e0e55f2c4346dcb3c14b4494c1 100644 --- a/app/code/Magento/Paypal/Controller/Payflow.php +++ b/app/code/Magento/Paypal/Controller/Payflow.php @@ -27,7 +27,7 @@ */ namespace Magento\Paypal\Controller; -class Payflow extends \Magento\Core\Controller\Front\Action +class Payflow extends \Magento\App\Action\Action { /** * @var \Magento\Checkout\Model\Session @@ -55,22 +55,23 @@ class Payflow extends \Magento\Core\Controller\Front\Action protected $_checkoutHelper; /** - * @param \Magento\Core\Controller\Varien\Action\Context $context + * @param \Magento\App\Action\Context $context * @param \Magento\Checkout\Model\Session $checkoutSession * @param \Magento\Sales\Model\OrderFactory $orderFactory * @param \Magento\Paypal\Model\PayflowlinkFactory $payflowlinkFactory * @param \Magento\Paypal\Helper\Checkout $checkoutHelper */ public function __construct( - \Magento\Core\Controller\Varien\Action\Context $context, + \Magento\App\Action\Context $context, \Magento\Checkout\Model\Session $checkoutSession, \Magento\Sales\Model\OrderFactory $orderFactory, \Magento\Paypal\Model\PayflowlinkFactory $payflowlinkFactory, - \Magento\Paypal\Helper\Checkout $checkoutHelper + \Magento\Paypal\Helper\Checkout $checkoutHelper, + \Magento\Logger $logger ) { $this->_checkoutSession = $checkoutSession; $this->_orderFactory = $orderFactory; - $this->_logger = $context->getLogger(); + $this->_logger = $logger; $this->_payflowlinkFactory = $payflowlinkFactory; $this->_checkoutHelper = $checkoutHelper; parent::__construct($context); @@ -81,11 +82,11 @@ class Payflow extends \Magento\Core\Controller\Front\Action */ public function cancelPaymentAction() { - $this->loadLayout(false); + $this->_view->loadLayout(false); $gotoSection = $this->_cancelPayment(); - $redirectBlock = $this->getLayout()->getBlock('payflow.link.iframe'); + $redirectBlock = $this->_view->getLayout()->getBlock('payflow.link.iframe'); $redirectBlock->setGotoSection($gotoSection); - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -93,8 +94,8 @@ class Payflow extends \Magento\Core\Controller\Front\Action */ public function returnUrlAction() { - $this->loadLayout(false); - $redirectBlock = $this->getLayout()->getBlock('payflow.link.iframe'); + $this->_view->loadLayout(false); + $redirectBlock = $this->_view->getLayout()->getBlock('payflow.link.iframe'); if ($this->_checkoutSession->getLastRealOrderId()) { $order = $this->_orderFactory->create()->loadByIncrementId($this->_checkoutSession->getLastRealOrderId()); @@ -115,7 +116,7 @@ class Payflow extends \Magento\Core\Controller\Front\Action } } - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -123,7 +124,7 @@ class Payflow extends \Magento\Core\Controller\Front\Action */ public function formAction() { - $this->loadLayout(false)->renderLayout(); + $this->_view->loadLayout(false)->renderLayout(); } /** diff --git a/app/code/Magento/Paypal/Controller/Payflowadvanced.php b/app/code/Magento/Paypal/Controller/Payflowadvanced.php index ed1b94c7dd8e56d259a3564098a29c585af22c74..482a20bf9e802374f8ee7b02f0501d4d9869b177 100644 --- a/app/code/Magento/Paypal/Controller/Payflowadvanced.php +++ b/app/code/Magento/Paypal/Controller/Payflowadvanced.php @@ -61,35 +61,32 @@ class Payflowadvanced extends \Magento\Paypal\Controller\Express\AbstractExpress protected $_checkoutHelper; /** - * @param \Magento\Core\Controller\Varien\Action\Context $context + * @param \Magento\App\Action\Context $context * @param \Magento\Customer\Model\Session $customerSession - * @param \Magento\UrlInterface $urlBuilder * @param \Magento\Sales\Model\QuoteFactory $quoteFactory * @param \Magento\Checkout\Model\Session $checkoutSession * @param \Magento\Sales\Model\OrderFactory $orderFactory * @param \Magento\Paypal\Model\Express\Checkout\Factory $checkoutFactory * @param \Magento\Core\Model\Session\Generic $paypalSession * @param \Magento\Paypal\Helper\Checkout $checkoutHelper - * - * @SuppressWarnings(PHPMD.ExcessiveParameterList) + * @param \Magento\Logger $logger */ public function __construct( - \Magento\Core\Controller\Varien\Action\Context $context, + \Magento\App\Action\Context $context, \Magento\Customer\Model\Session $customerSession, - \Magento\UrlInterface $urlBuilder, \Magento\Sales\Model\QuoteFactory $quoteFactory, \Magento\Checkout\Model\Session $checkoutSession, \Magento\Sales\Model\OrderFactory $orderFactory, \Magento\Paypal\Model\Express\Checkout\Factory $checkoutFactory, \Magento\Core\Model\Session\Generic $paypalSession, - \Magento\Paypal\Helper\Checkout $checkoutHelper + \Magento\Paypal\Helper\Checkout $checkoutHelper, + \Magento\Logger $logger ) { - $this->_logger = $context->getLogger(); + $this->_logger = $logger; $this->_checkoutHelper = $checkoutHelper; parent::__construct( $context, $customerSession, - $urlBuilder, $quoteFactory, $checkoutSession, $orderFactory, @@ -103,11 +100,11 @@ class Payflowadvanced extends \Magento\Paypal\Controller\Express\AbstractExpress */ public function cancelPaymentAction() { - $this->loadLayout(false); + $this->_view->loadLayout(false); $gotoSection = $this->_cancelPayment(); - $redirectBlock = $this->getLayout()->getBlock('payflow.advanced.iframe'); + $redirectBlock = $this->_view->getLayout()->getBlock('payflow.advanced.iframe'); $redirectBlock->setGotoSection($gotoSection); - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -115,8 +112,8 @@ class Payflowadvanced extends \Magento\Paypal\Controller\Express\AbstractExpress */ public function returnUrlAction() { - $this->loadLayout(false); - $redirectBlock = $this->getLayout()->getBlock('payflow.advanced.iframe');; + $this->_view->loadLayout(false); + $redirectBlock = $this->_view->getLayout()->getBlock('payflow.advanced.iframe');; if ($this->_checkoutSession->getLastRealOrderId()) { $order = $this->_orderFactory->create()->loadByIncrementId($this->_checkoutSession->getLastRealOrderId()); @@ -137,7 +134,7 @@ class Payflowadvanced extends \Magento\Paypal\Controller\Express\AbstractExpress } } - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -145,8 +142,8 @@ class Payflowadvanced extends \Magento\Paypal\Controller\Express\AbstractExpress */ public function formAction() { - $this->loadLayout(false)->renderLayout(); - $html = $this->getLayout()->getBlock('payflow.advanced.iframe')->toHtml(); + $this->_view->loadLayout(false)->renderLayout(); + $html = $this->_view->getLayout()->getBlock('payflow.advanced.iframe')->toHtml(); $this->getResponse()->setBody($html); } diff --git a/app/code/Magento/Paypal/Controller/Standard.php b/app/code/Magento/Paypal/Controller/Standard.php index 067d2eb018a0e33792b2509ca95c6f05d62d9b5a..f7870ef8675e06693f5edb27f96580a77d72d5bf 100644 --- a/app/code/Magento/Paypal/Controller/Standard.php +++ b/app/code/Magento/Paypal/Controller/Standard.php @@ -31,7 +31,7 @@ */ namespace Magento\Paypal\Controller; -class Standard extends \Magento\Core\Controller\Front\Action +class Standard extends \Magento\App\Action\Action { /** * Order instance @@ -76,7 +76,7 @@ class Standard extends \Magento\Core\Controller\Front\Action { $session = $this->_objectManager->get('Magento\Checkout\Model\Session'); $session->setPaypalStandardQuoteId($session->getQuoteId()); - $this->loadLayout(false)->renderLayout(); + $this->_view->loadLayout(false)->renderLayout(); $session->unsQuoteId(); $session->unsRedirectUrl(); } diff --git a/app/code/Magento/Paypal/Helper/Checkout.php b/app/code/Magento/Paypal/Helper/Checkout.php index e9bc2d9533ccbb14b91615ae9ad414cdf6950574..0631e8b5d992f44cae0fb024a1c702e266f664cf 100644 --- a/app/code/Magento/Paypal/Helper/Checkout.php +++ b/app/code/Magento/Paypal/Helper/Checkout.php @@ -27,7 +27,7 @@ */ namespace Magento\Paypal\Helper; -class Checkout extends \Magento\Core\Helper\AbstractHelper +class Checkout extends \Magento\App\Helper\AbstractHelper { /** * @var \Magento\Checkout\Model\SessionFactory diff --git a/app/code/Magento/Paypal/Helper/Data.php b/app/code/Magento/Paypal/Helper/Data.php index aece550bc223a4eae1127d0d9f47a290cf7c1dce..e74fa3a260e251b2c8331b3d8f3e99587cddbf78 100644 --- a/app/code/Magento/Paypal/Helper/Data.php +++ b/app/code/Magento/Paypal/Helper/Data.php @@ -27,7 +27,7 @@ */ namespace Magento\Paypal\Helper; -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { /** * Cache for shouldAskToCreateBillingAgreement() @@ -50,12 +50,12 @@ class Data extends \Magento\Core\Helper\AbstractHelper /** * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Sales\Model\Billing\AgreementFactory $agreementFactory */ public function __construct( \Magento\Core\Helper\Data $coreData, - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Sales\Model\Billing\AgreementFactory $agreementFactory ) { $this->_coreData = $coreData; diff --git a/app/code/Magento/Paypal/Helper/Hss.php b/app/code/Magento/Paypal/Helper/Hss.php index 01fa0368572fe5ade9da76a08f4a74c3d180cf7d..9fed6ca91ef73dc5b81abfa4b1c1d1dee4c2c398 100644 --- a/app/code/Magento/Paypal/Helper/Hss.php +++ b/app/code/Magento/Paypal/Helper/Hss.php @@ -27,7 +27,7 @@ */ namespace Magento\Paypal\Helper; -class Hss extends \Magento\Core\Helper\AbstractHelper +class Hss extends \Magento\App\Helper\AbstractHelper { /** * Hosted Sole Solution methods @@ -51,12 +51,12 @@ class Hss extends \Magento\Core\Helper\AbstractHelper protected $_layout; /** - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Checkout\Model\Session $checkoutSession * @param \Magento\View\LayoutInterface $layout */ public function __construct( - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Checkout\Model\Session $checkoutSession, \Magento\View\LayoutInterface $layout ) { diff --git a/app/code/Magento/Paypal/Model/Observer.php b/app/code/Magento/Paypal/Model/Observer.php index 702476d6b86ee29ac5b46aa0dcb0f873167eb968..bf3d0d42e1254a1b7ca2b9ba6498d68e97180df9 100644 --- a/app/code/Magento/Paypal/Model/Observer.php +++ b/app/code/Magento/Paypal/Model/Observer.php @@ -62,25 +62,33 @@ class Observer */ protected $_settlementFactory; + /** + * @var \Magento\App\ViewInterface + */ + protected $_view; + /** * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Paypal\Helper\Hss $paypalHss * @param \Magento\Core\Model\Registry $coreRegistry * @param \Magento\Logger $logger - * @param \Magento\Paypal\Model\Report\SettlementFactory $settlementFactory + * @param Report\SettlementFactory $settlementFactory + * @param \Magento\App\ViewInterface $view */ public function __construct( \Magento\Core\Helper\Data $coreData, \Magento\Paypal\Helper\Hss $paypalHss, \Magento\Core\Model\Registry $coreRegistry, \Magento\Logger $logger, - \Magento\Paypal\Model\Report\SettlementFactory $settlementFactory + \Magento\Paypal\Model\Report\SettlementFactory $settlementFactory, + \Magento\App\ViewInterface $view ) { $this->_coreData = $coreData; $this->_paypalHss = $paypalHss; $this->_coreRegistry = $coreRegistry; $this->_logger = $logger; $this->_settlementFactory = $settlementFactory; + $this->_view = $view; } /** @@ -146,7 +154,7 @@ class Observer if ($order && $order->getId()) { $payment = $order->getPayment(); if ($payment && in_array($payment->getMethod(), $this->_paypalHss->getHssMethods())) { - /* @var $controller \Magento\Core\Controller\Varien\Action */ + /* @var $controller \Magento\App\Action\Action */ $controller = $observer->getEvent()->getData('controller_action'); $result = $this->_coreData->jsonDecode( $controller->getResponse()->getBody('default'), @@ -154,8 +162,8 @@ class Observer ); if (empty($result['error'])) { - $controller->loadLayout('checkout_onepage_review'); - $html = $controller->getLayout()->getBlock('paypal.iframe')->toHtml(); + $this->_view->loadLayout('checkout_onepage_review'); + $html = $this->_view->getLayout()->getBlock('paypal.iframe')->toHtml(); $result['update_section'] = array( 'name' => 'paypaliframe', 'html' => $html diff --git a/app/code/Magento/Paypal/Model/Payment/Transaction.php b/app/code/Magento/Paypal/Model/Payment/Transaction.php index 2c7533f7cb4cf45fe1377c2746621760627d9193..85ed978e7ee8d620c20444bfdc7d823f95b1bb56 100644 --- a/app/code/Magento/Paypal/Model/Payment/Transaction.php +++ b/app/code/Magento/Paypal/Model/Payment/Transaction.php @@ -66,20 +66,12 @@ class Transaction extends \Magento\Core\Model\AbstractModel */ protected $_orderWebsiteId; - /** - * Core event manager proxy - * - * @var \Magento\Event\ManagerInterface - */ - protected $_eventManager; - /** * @var \Magento\Core\Model\DateFactory */ protected $_dateFactory; /** - * @param \Magento\Event\ManagerInterface $eventManager * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry * @param \Magento\Core\Model\DateFactory $dateFactory @@ -88,7 +80,6 @@ class Transaction extends \Magento\Core\Model\AbstractModel * @param array $data */ public function __construct( - \Magento\Event\ManagerInterface $eventManager, \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, \Magento\Core\Model\DateFactory $dateFactory, @@ -96,7 +87,6 @@ class Transaction extends \Magento\Core\Model\AbstractModel \Magento\Data\Collection\Db $resourceCollection = null, array $data = array() ) { - $this->_eventManager = $eventManager; $this->_dateFactory = $dateFactory; parent::__construct($context, $registry, $resource, $resourceCollection, $data); } diff --git a/app/code/Magento/Paypal/Model/System/Config/Backend/Cert.php b/app/code/Magento/Paypal/Model/System/Config/Backend/Cert.php index daaee2bfddf41c9f419ffed984ebb4cc3c356484..4ce45df4c52d0465e9a5db5fa02c4036f10a6d9e 100644 --- a/app/code/Magento/Paypal/Model/System/Config/Backend/Cert.php +++ b/app/code/Magento/Paypal/Model/System/Config/Backend/Cert.php @@ -44,7 +44,7 @@ class Cert extends \Magento\Core\Model\Config\Value /** * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Config $config * @param \Magento\Paypal\Model\CertFactory $certFactory * @param \Magento\Encryption\EncryptorInterface $encryptor @@ -55,7 +55,7 @@ class Cert extends \Magento\Core\Model\Config\Value public function __construct( \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Config $config, \Magento\Paypal\Model\CertFactory $certFactory, \Magento\Encryption\EncryptorInterface $encryptor, diff --git a/app/code/Magento/Paypal/Model/System/Config/Backend/Cron.php b/app/code/Magento/Paypal/Model/System/Config/Backend/Cron.php index 7609b247b002ed67e13009b480ce5185198e528a..675c0c6ecee273a5eb4d217ba36d57e3a7d03d25 100644 --- a/app/code/Magento/Paypal/Model/System/Config/Backend/Cron.php +++ b/app/code/Magento/Paypal/Model/System/Config/Backend/Cron.php @@ -39,7 +39,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\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Config $config * @param \Magento\Core\Model\Config\ValueFactory $configValueFactory * @param \Magento\Core\Model\Resource\AbstractResource $resource @@ -49,7 +49,7 @@ class Cron extends \Magento\Core\Model\Config\Value public function __construct( \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Config $config, \Magento\Core\Model\Config\ValueFactory $configValueFactory, \Magento\Core\Model\Resource\AbstractResource $resource = null, diff --git a/app/code/Magento/Paypal/view/frontend/hss/js.phtml b/app/code/Magento/Paypal/view/frontend/hss/js.phtml index 4872e69d749882bccc3833bdeccf694e8b63c2fb..59ca6558cdd918662e496fc80d00b84015183037 100644 --- a/app/code/Magento/Paypal/view/frontend/hss/js.phtml +++ b/app/code/Magento/Paypal/view/frontend/hss/js.phtml @@ -28,4 +28,3 @@ */ ?> <div id="checkout-paypaliframe-load" class="authentication"></div> - diff --git a/app/code/Magento/Paypal/view/frontend/layout/paypal_express_review.xml b/app/code/Magento/Paypal/view/frontend/layout/paypal_express_review.xml index c6a192834249bc650f4d108e7b421b9871da8547..7f3dda071f2ed264fb11ff42036bc73f6e510e3f 100644 --- a/app/code/Magento/Paypal/view/frontend/layout/paypal_express_review.xml +++ b/app/code/Magento/Paypal/view/frontend/layout/paypal_express_review.xml @@ -52,5 +52,5 @@ as="agreements" template="onepage/agreements.phtml"/> </block> </referenceContainer> - <container name="additional.product.info" label="Additional Product Info"/> + <block class="Magento\View\Block\Template" name="additional.product.info" template="Magento_Core::template.phtml"/> </layout> diff --git a/app/code/Magento/PaypalUk/Helper/Data.php b/app/code/Magento/PaypalUk/Helper/Data.php index 8b324df27ee6d906ee0c9db084cd2129a2026075..7bccf210b0bed00d8d4d36d67b77fc07f6229322 100644 --- a/app/code/Magento/PaypalUk/Helper/Data.php +++ b/app/code/Magento/PaypalUk/Helper/Data.php @@ -29,7 +29,7 @@ */ namespace Magento\PaypalUk\Helper; -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { } diff --git a/app/code/Magento/Persistent/Block/Form/Remember.php b/app/code/Magento/Persistent/Block/Form/Remember.php index 2db218eee5695d0a2f3ff5c5f09f6dc3aa7471f4..249c6320ff17d6a7bdcab9aff47d43614857c9d5 100644 --- a/app/code/Magento/Persistent/Block/Form/Remember.php +++ b/app/code/Magento/Persistent/Block/Form/Remember.php @@ -34,7 +34,7 @@ namespace Magento\Persistent\Block\Form; -class Remember extends \Magento\Core\Block\Template +class Remember extends \Magento\View\Block\Template { /** * Persistent data @@ -49,23 +49,22 @@ class Remember extends \Magento\Core\Block\Template protected $mathRandom; /** - * @param \Magento\Persistent\Helper\Data $persistentData + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context + * @param \Magento\Persistent\Helper\Data $persistentData * @param \Magento\Math\Random $mathRandom * @param array $data - * @param \Magento\Math\Random $mathRandom */ public function __construct( - \Magento\Persistent\Helper\Data $persistentData, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, + \Magento\Persistent\Helper\Data $persistentData, \Magento\Math\Random $mathRandom, array $data = array() ) { $this->_persistentData = $persistentData; $this->mathRandom = $mathRandom; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Persistent/Block/Header/Additional.php b/app/code/Magento/Persistent/Block/Header/Additional.php index 2d7ea6fbe0af4749a5d314ba7a45100452584632..9a748b9526c677e0512218bbad819a8a29bd4085 100644 --- a/app/code/Magento/Persistent/Block/Header/Additional.php +++ b/app/code/Magento/Persistent/Block/Header/Additional.php @@ -34,7 +34,7 @@ namespace Magento\Persistent\Block\Header; -class Additional extends \Magento\Core\Block\Html\Link +class Additional extends \Magento\View\Block\Html\Link { /** * Persistent session @@ -44,19 +44,19 @@ class Additional extends \Magento\Core\Block\Html\Link protected $_persistentSession = null; /** - * @param \Magento\Persistent\Helper\Session $persistentSession + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context + * @param \Magento\Persistent\Helper\Session $persistentSession * @param array $data */ public function __construct( - \Magento\Persistent\Helper\Session $persistentSession, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, + \Magento\Persistent\Helper\Session $persistentSession, array $data = array() ) { $this->_persistentSession = $persistentSession; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Persistent/Controller/Index.php b/app/code/Magento/Persistent/Controller/Index.php index eb5d2d70c4b00715f2ee92c99a31e7d5ad52111b..3c688069565d7aa804fe22bf6589016a9d15d796 100644 --- a/app/code/Magento/Persistent/Controller/Index.php +++ b/app/code/Magento/Persistent/Controller/Index.php @@ -29,7 +29,7 @@ */ namespace Magento\Persistent\Controller; -class Index extends \Magento\Core\Controller\Front\Action +class Index extends \Magento\App\Action\Action { /** * Whether clear checkout session when logout @@ -69,14 +69,14 @@ class Index extends \Magento\Core\Controller\Front\Action /** * Construct * - * @param \Magento\Core\Controller\Varien\Action\Context $context + * @param \Magento\App\Action\Context $context * @param \Magento\Core\Model\Session $session * @param \Magento\Persistent\Model\Observer $persistentObserver * @param \Magento\Checkout\Model\Session $checkoutSession * @param \Magento\Customer\Model\Session $customerSession */ public function __construct( - \Magento\Core\Controller\Varien\Action\Context $context, + \Magento\App\Action\Context $context, \Magento\Core\Model\Session $session, \Magento\Persistent\Model\Observer $persistentObserver, \Magento\Checkout\Model\Session $checkoutSession, @@ -156,8 +156,8 @@ class Index extends \Magento\Core\Controller\Front\Action $this->_persistentObserver->setQuoteGuest(); } - $checkoutUrl = $this->_getRefererUrl(); - $this->_redirectUrl($checkoutUrl . (strpos($checkoutUrl, '?') ? '&' : '?') . 'register'); + $checkoutUrl = $this->_redirect->getRefererUrl(); + $this->getResponse()->setRedirect($checkoutUrl . (strpos($checkoutUrl, '?') ? '&' : '?') . 'register'); } /** diff --git a/app/code/Magento/Persistent/Helper/Data.php b/app/code/Magento/Persistent/Helper/Data.php index 8d7d92ccedf1b869a95a882cc99cf1b6b0cea894..f3638e0ac0b6dfbbd3effba4465305ef54461ab6 100644 --- a/app/code/Magento/Persistent/Helper/Data.php +++ b/app/code/Magento/Persistent/Helper/Data.php @@ -77,21 +77,22 @@ class Data extends \Magento\Core\Helper\Data protected $_modulesReader; /** - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\Store\Config $coreStoreConfig - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Locale $locale * @param \Magento\App\State $appState * @param \Magento\Core\Helper\Url $coreUrl * @param \Magento\Checkout\Helper\Data $checkoutData * @param Session $persistentSession + * @param \Magento\Module\Dir\Reader $modulesReader * @param \Magento\Escaper $escaper * @param bool $dbCompatibleMode */ public function __construct( - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Core\Model\Store\Config $coreStoreConfig, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Locale $locale, \Magento\App\State $appState, \Magento\Core\Helper\Url $coreUrl, @@ -221,15 +222,6 @@ class Data extends \Magento\Core\Helper\Data */ public function canProcess($observer) { - $action = $observer->getEvent()->getAction(); - $controllerAction = $observer->getEvent()->getControllerAction(); - - if ($action instanceof \Magento\Core\Controller\Varien\Action) { - return !$action->getFlag('', \Magento\Core\Controller\Varien\Action::FLAG_NO_START_SESSION); - } - if ($controllerAction instanceof \Magento\Core\Controller\Varien\Action) { - return !$controllerAction->getFlag('', \Magento\Core\Controller\Varien\Action::FLAG_NO_START_SESSION); - } return true; } diff --git a/app/code/Magento/Persistent/Helper/Session.php b/app/code/Magento/Persistent/Helper/Session.php index d812ed31ae1b7c8202e06e72c37c58f12e56f32c..011470b2c57ce2cf3bb979125a8d38f4d385ee06 100644 --- a/app/code/Magento/Persistent/Helper/Session.php +++ b/app/code/Magento/Persistent/Helper/Session.php @@ -80,9 +80,9 @@ class Session extends \Magento\Core\Helper\Data protected $_checkoutSession; /** - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\Store\Config $coreStoreConfig - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Locale $locale * @param \Magento\App\State $appState * @param Data $persistentData @@ -92,9 +92,9 @@ class Session extends \Magento\Core\Helper\Data * @param bool $dbCompatibleMode */ public function __construct( - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Core\Model\Store\Config $coreStoreConfig, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Locale $locale, \Magento\App\State $appState, \Magento\Persistent\Helper\Data $persistentData, diff --git a/app/code/Magento/Persistent/Model/Observer.php b/app/code/Magento/Persistent/Model/Observer.php index 0a34b81d8bf19cb910d6f102d8bd5f29299b54da..4ccc784c9fc9e65dc3fb37c11255795b30858838 100644 --- a/app/code/Magento/Persistent/Model/Observer.php +++ b/app/code/Magento/Persistent/Model/Observer.php @@ -231,7 +231,7 @@ class Observer return $this; } - /** @var $block \Magento\Core\Block\AbstractBlock */ + /** @var $block \Magento\View\Block\AbstractBlock */ $block = $observer->getEvent()->getBlock(); if (!$block) { @@ -257,7 +257,7 @@ class Observer /** * Emulate 'welcome' block with persistent data * - * @param \Magento\Core\Block\AbstractBlock $block + * @param \Magento\View\Block\AbstractBlock $block * @return \Magento\Persistent\Model\Observer */ public function emulateWelcomeBlock($block) @@ -284,7 +284,7 @@ class Observer /** * Emulate 'top links' block with persistent data * - * @param \Magento\Core\Block\AbstractBlock $block + * @param \Magento\View\Block\AbstractBlock $block */ public function emulateTopLinks($block) { @@ -311,9 +311,7 @@ class Observer return; } - /** @var $action \Magento\Checkout\Controller\Onepage */ - $action = $observer->getEvent()->getControllerAction(); - $actionName = $action->getFullActionName(); + $actionName = $observer->getEvent()->getRequest()->getFullActionName(); if (in_array($actionName, $stopActions)) { return; @@ -475,7 +473,7 @@ class Observer return; } - /** @var $controllerAction \Magento\Core\Controller\Front\Action */ + /** @var $controllerAction \Magento\App\Action\Action */ $controllerAction = $observer->getEvent()->getControllerAction(); if (method_exists($controllerAction, 'redirectLogin')) { $this->_session->addNotice(__('To check out, please log in using your email address.')); diff --git a/app/code/Magento/Persistent/Model/Observer/Session.php b/app/code/Magento/Persistent/Model/Observer/Session.php index a0f0a31cfa3d97beb12f8b960ad829e24eeecce0..9cd0ceb598b7f1153ce4e2e73c7366db0ae78a0f 100644 --- a/app/code/Magento/Persistent/Model/Observer/Session.php +++ b/app/code/Magento/Persistent/Model/Observer/Session.php @@ -220,14 +220,14 @@ class Session return; } - /** @var $controllerAction \Magento\Core\Controller\Varien\Action */ - $controllerAction = $observer->getEvent()->getControllerAction(); - if ($controllerAction) { - $rememberMeCheckbox = $controllerAction->getRequest()->getPost('persistent_remember_me'); + /** @var $controllerAction \Magento\App\RequestInterface */ + $request = $observer->getEvent()->getRequest(); + if ($request) { + $rememberMeCheckbox = $request->getPost('persistent_remember_me'); $this->_persistentSession->setRememberMeChecked((bool)$rememberMeCheckbox); if ( - $controllerAction->getFullActionName() == 'checkout_onepage_saveBilling' - || $controllerAction->getFullActionName() == 'customer_account_createpost' + $request->getFullActionName() == 'checkout_onepage_saveBilling' + || $request->getFullActionName() == 'customer_account_createpost' ) { $this->_checkoutSession->setRememberMeChecked((bool)$rememberMeCheckbox); } @@ -248,12 +248,10 @@ class Session return; } - /** @var $controllerAction \Magento\Core\Controller\Front\Action */ - $controllerAction = $observer->getEvent()->getControllerAction(); + /** @var $request \Magento\App\RequestInterface */ + $request = $observer->getEvent()->getRequest(); - if ($this->_customerSession->isLoggedIn() - || $controllerAction->getFullActionName() == 'customer_account_logout' - ) { + if ($this->_customerSession->isLoggedIn() || $request->getFullActionName() == 'customer_account_logout') { $this->_cookie->renew( \Magento\Persistent\Model\Session::COOKIE_NAME, $this->_persistentData->getLifeTime() diff --git a/app/code/Magento/Persistent/view/frontend/layout/checkout_onepage_index.xml b/app/code/Magento/Persistent/view/frontend/layout/checkout_onepage_index.xml index 1147945ddc759eac1c57bddfb5c538af48916e40..71a0624c3dfd6e3084db7089aaf67af91baff7f1 100644 --- a/app/code/Magento/Persistent/view/frontend/layout/checkout_onepage_index.xml +++ b/app/code/Magento/Persistent/view/frontend/layout/checkout_onepage_index.xml @@ -26,10 +26,10 @@ <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <referenceContainer name="form.login.additional.info"> <block class="Magento\Persistent\Block\Form\Remember" name="persistent.remember.me" template="remember_me.phtml" before="-"/> - <block class="Magento\Core\Block\Template" name="persistent.remember.me.tooltip" template="Magento_Persistent::remember_me_tooltip.phtml"/> + <block class="Magento\View\Block\Template" name="persistent.remember.me.tooltip" template="Magento_Persistent::remember_me_tooltip.phtml"/> </referenceContainer> <referenceContainer name="form.billing.additional.info"> <block class="Magento\Persistent\Block\Form\Remember" name="persistent.remember.me.billing" template="remember_me.phtml" before="-"/> - <block class="Magento\Core\Block\Template" name="persistent.remember.me.tooltip.billing" template="Magento_Persistent::remember_me_tooltip.phtml"/> + <block class="Magento\View\Block\Template" name="persistent.remember.me.tooltip.billing" template="Magento_Persistent::remember_me_tooltip.phtml"/> </referenceContainer> </layout> diff --git a/app/code/Magento/Persistent/view/frontend/layout/customer_account_create.xml b/app/code/Magento/Persistent/view/frontend/layout/customer_account_create.xml index 8ac15eae415574b4ed80050985c33df2cbf52e11..448a2a52b693de2b73fa20c11357ffaa9642a7bd 100644 --- a/app/code/Magento/Persistent/view/frontend/layout/customer_account_create.xml +++ b/app/code/Magento/Persistent/view/frontend/layout/customer_account_create.xml @@ -26,6 +26,6 @@ <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <referenceContainer name="form.additional.info"> <block class="Magento\Persistent\Block\Form\Remember" name="persistent.remember.me" template="remember_me.phtml" before="-"/> - <block class="Magento\Core\Block\Template" name="persistent.remember.me.tooltip" template="Magento_Persistent::remember_me_tooltip.phtml"/> + <block class="Magento\View\Block\Template" name="persistent.remember.me.tooltip" template="Magento_Persistent::remember_me_tooltip.phtml"/> </referenceContainer> </layout> diff --git a/app/code/Magento/Persistent/view/frontend/layout/customer_account_login.xml b/app/code/Magento/Persistent/view/frontend/layout/customer_account_login.xml index 8ac15eae415574b4ed80050985c33df2cbf52e11..448a2a52b693de2b73fa20c11357ffaa9642a7bd 100644 --- a/app/code/Magento/Persistent/view/frontend/layout/customer_account_login.xml +++ b/app/code/Magento/Persistent/view/frontend/layout/customer_account_login.xml @@ -26,6 +26,6 @@ <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <referenceContainer name="form.additional.info"> <block class="Magento\Persistent\Block\Form\Remember" name="persistent.remember.me" template="remember_me.phtml" before="-"/> - <block class="Magento\Core\Block\Template" name="persistent.remember.me.tooltip" template="Magento_Persistent::remember_me_tooltip.phtml"/> + <block class="Magento\View\Block\Template" name="persistent.remember.me.tooltip" template="Magento_Persistent::remember_me_tooltip.phtml"/> </referenceContainer> </layout> diff --git a/app/code/Magento/Persistent/view/frontend/remember_me_tooltip.phtml b/app/code/Magento/Persistent/view/frontend/remember_me_tooltip.phtml index 8cefb973f327a517674ce61388d039faba2c2c83..918f120f611e4909e6d3a7e8482c97d487f42e40 100644 --- a/app/code/Magento/Persistent/view/frontend/remember_me_tooltip.phtml +++ b/app/code/Magento/Persistent/view/frontend/remember_me_tooltip.phtml @@ -29,7 +29,7 @@ * "Remember Me" popup template (when click on "What's this?") * */ -/** @var $this \Magento\Core\Block\Template */ +/** @var $this \Magento\View\Block\Template */ ?> <script type="text/javascript"> (function($) { diff --git a/app/code/Magento/ProductAlert/Block/Email/AbstractEmail.php b/app/code/Magento/ProductAlert/Block/Email/AbstractEmail.php index 78c46786fd46454483b0f6e1c7a2aa5886c3b12a..0d125e31ce5a2d900e176d9307ee9c205e450e0b 100644 --- a/app/code/Magento/ProductAlert/Block/Email/AbstractEmail.php +++ b/app/code/Magento/ProductAlert/Block/Email/AbstractEmail.php @@ -33,7 +33,7 @@ */ namespace Magento\ProductAlert\Block\Email; -abstract class AbstractEmail extends \Magento\Core\Block\Template +abstract class AbstractEmail extends \Magento\View\Block\Template { /** * Product collection array @@ -49,27 +49,6 @@ abstract class AbstractEmail extends \Magento\Core\Block\Template */ protected $_store; - /** - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param array $data - */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - array $data = array() - ) { - $this->_storeManager = $storeManager; - parent::__construct($coreData, $context, $data); - } - /** * Set Store scope * diff --git a/app/code/Magento/ProductAlert/Block/Product/View.php b/app/code/Magento/ProductAlert/Block/Product/View.php index 68150c9ddebf7a3f87f4f4db7770cd9189dc8e66..00e74527880f552339acbcae163f3f8de0a0b952 100644 --- a/app/code/Magento/ProductAlert/Block/Product/View.php +++ b/app/code/Magento/ProductAlert/Block/Product/View.php @@ -29,7 +29,7 @@ */ namespace Magento\ProductAlert\Block\Product; -class View extends \Magento\Core\Block\Template +class View extends \Magento\View\Block\Template { /** * @var \Magento\Core\Model\Registry @@ -51,20 +51,20 @@ class View extends \Magento\Core\Block\Template protected $_helper; /** - * @param \Magento\Core\Block\Template\Context $context + * @param \Magento\View\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\ProductAlert\Helper\Data $helper * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Core\Helper\Data $coreData * @param array $data */ public function __construct( - \Magento\Core\Block\Template\Context $context, + \Magento\View\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\ProductAlert\Helper\Data $helper, \Magento\Core\Model\Registry $registry, - \Magento\Core\Helper\Data $coreData, array $data = array() ) { - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); $this->_registry = $registry; $this->_helper = $helper; } diff --git a/app/code/Magento/ProductAlert/Controller/Add.php b/app/code/Magento/ProductAlert/Controller/Add.php index f024ba1bf5cd73cee42c75c229e6830bcdc53a21..74aaa8d6ad2b5f64e3728c5ad3678d3a22237afe 100644 --- a/app/code/Magento/ProductAlert/Controller/Add.php +++ b/app/code/Magento/ProductAlert/Controller/Add.php @@ -33,18 +33,38 @@ */ namespace Magento\ProductAlert\Controller; -class Add extends \Magento\Core\Controller\Front\Action +use Magento\App\Action\Context; +use Magento\App\RequestInterface; + +class Add extends \Magento\App\Action\Action { - public function preDispatch() - { - parent::preDispatch(); + /** + * @var \Magento\Core\Model\StoreManagerInterface + */ + protected $_storeManager; + /** + * @param Context $context + * @param \Magento\Core\Model\StoreManagerInterface $storeManager + */ + public function __construct( + \Magento\App\Action\Context $context, + \Magento\Core\Model\StoreManagerInterface $storeManager + ) { + $this->_storeManager = $storeManager; + parent::__construct($context); + } + + public function dispatch(RequestInterface $request) + { if (!$this->_objectManager->get('Magento\Customer\Model\Session')->authenticate($this)) { - $this->setFlag('', 'no-dispatch', true); - if(!$this->_objectManager->get('Magento\Customer\Model\Session')->getBeforeUrl()) { - $this->_objectManager->get('Magento\Customer\Model\Session')->setBeforeUrl($this->_getRefererUrl()); + $this->_actionFlag->set('', 'no-dispatch', true); + if (!$this->_objectManager->get('Magento\Customer\Model\Session')->getBeforeUrl()) { + $this->_objectManager->get('Magento\Customer\Model\Session') + ->setBeforeUrl($this->_redirect->getRefererUrl()); } } + return parent::dispatch($request); } public function testObserverAction() @@ -57,7 +77,7 @@ class Add extends \Magento\Core\Controller\Front\Action public function priceAction() { $session = $this->_objectManager->get('Magento\Catalog\Model\Session'); - $backUrl = $this->getRequest()->getParam(\Magento\Core\Controller\Front\Action::PARAM_NAME_URL_ENCODED); + $backUrl = $this->getRequest()->getParam(\Magento\App\Action\Action::PARAM_NAME_URL_ENCODED); $productId = (int) $this->getRequest()->getParam('product_id'); if (!$backUrl || !$productId) { $this->_redirect('/'); @@ -68,8 +88,8 @@ class Add extends \Magento\Core\Controller\Front\Action if (!$product->getId()) { /* @var $product \Magento\Catalog\Model\Product */ $session->addError(__('There are not enough parameters.')); - if ($this->_isUrlInternal($backUrl)) { - $this->_redirectUrl($backUrl); + if ($this->_isInternal($backUrl)) { + $this->getResponse()->setRedirect($backUrl); } else { $this->_redirect('/'); } @@ -90,14 +110,14 @@ class Add extends \Magento\Core\Controller\Front\Action catch (\Exception $e) { $session->addException($e, __('Unable to update the alert subscription.')); } - $this->_redirectReferer(); + $this->getResponse()->setRedirect($this->_redirect->getRedirectUrl()); } public function stockAction() { $session = $this->_objectManager->get('Magento\Catalog\Model\Session'); /* @var $session \Magento\Catalog\Model\Session */ - $backUrl = $this->getRequest()->getParam(\Magento\Core\Controller\Front\Action::PARAM_NAME_URL_ENCODED); + $backUrl = $this->getRequest()->getParam(\Magento\App\Action\Action::PARAM_NAME_URL_ENCODED); $productId = (int) $this->getRequest()->getParam('product_id'); if (!$backUrl || !$productId) { $this->_redirect('/'); @@ -107,7 +127,7 @@ class Add extends \Magento\Core\Controller\Front\Action if (!$product = $this->_objectManager->create('Magento\Catalog\Model\Product')->load($productId)) { /* @var $product \Magento\Catalog\Model\Product */ $session->addError(__('There are not enough parameters.')); - $this->_redirectUrl($backUrl); + $this->getResponse()->setRedirect($backUrl); return ; } @@ -124,6 +144,22 @@ class Add extends \Magento\Core\Controller\Front\Action catch (\Exception $e) { $session->addException($e, __('Unable to update the alert subscription.')); } - $this->_redirectReferer(); + $this->getResponse()->setRedirect($this->_redirect->getRedirectUrl()); + } + + /** + * Check if URL is internal + * + * @param string $url + * @return bool + */ + protected function _isInternal($url) + { + if (strpos($url, 'http') === false) { + return false; + } + $currentStore = $this->_storeManager->getStore(); + return strpos($url, $currentStore->getBaseUrl()) === 0 + || strpos($url, $currentStore->getBaseUrl($currentStore::URL_TYPE_LINK, true)) === 0; } } diff --git a/app/code/Magento/ProductAlert/Controller/Unsubscribe.php b/app/code/Magento/ProductAlert/Controller/Unsubscribe.php index 3be21feb952311a5c89fbfd9b988be59f8ffbc1d..406218de078a94e6b2dc56ef14d15d200ab024d6 100644 --- a/app/code/Magento/ProductAlert/Controller/Unsubscribe.php +++ b/app/code/Magento/ProductAlert/Controller/Unsubscribe.php @@ -34,18 +34,25 @@ */ namespace Magento\ProductAlert\Controller; -class Unsubscribe extends \Magento\Core\Controller\Front\Action +use Magento\App\Action\NotFoundException; +use Magento\App\RequestInterface; + +class Unsubscribe extends \Magento\App\Action\Action { - public function preDispatch() + /** + * @param RequestInterface $request + * @return mixed + */ + public function dispatch(RequestInterface $request) { - parent::preDispatch(); - if (!$this->_objectManager->get('Magento\Customer\Model\Session')->authenticate($this)) { - $this->setFlag('', 'no-dispatch', true); - if(!$this->_objectManager->get('Magento\Customer\Model\Session')->getBeforeUrl()) { - $this->_objectManager->get('Magento\Customer\Model\Session')->setBeforeUrl($this->_getRefererUrl()); + $this->_actionFlag->set('', 'no-dispatch', true); + if (!$this->_objectManager->get('Magento\Customer\Model\Session')->getBeforeUrl()) { + $this->_objectManager->get('Magento\Customer\Model\Session') + ->setBeforeUrl($this->_redirect->getRefererUrl()); } } + return parent::dispatch($request); } public function priceAction() @@ -84,7 +91,7 @@ class Unsubscribe extends \Magento\Core\Controller\Front\Action catch (\Exception $e) { $session->addException($e, __('Unable to update the alert subscription.')); } - $this->_redirectUrl($product->getProductUrl()); + $this->getResponse()->setRedirect($product->getProductUrl()); } public function priceAllAction() @@ -140,7 +147,7 @@ class Unsubscribe extends \Magento\Core\Controller\Front\Action catch (\Exception $e) { $session->addException($e, __('Unable to update the alert subscription.')); } - $this->_redirectUrl($product->getProductUrl()); + $this->getResponse()->setRedirect($product->getProductUrl()); } public function stockAllAction() diff --git a/app/code/Magento/ProductAlert/Helper/Data.php b/app/code/Magento/ProductAlert/Helper/Data.php index 993bdfb520cbb508c3a4a9e43cb7faa53a861436..2b2c68f40f399bb79f6a399da77f1f90086446af 100644 --- a/app/code/Magento/ProductAlert/Helper/Data.php +++ b/app/code/Magento/ProductAlert/Helper/Data.php @@ -68,16 +68,16 @@ class Data extends \Magento\Core\Helper\Url protected $_session; /** - * @param \Magento\Core\Helper\Context $context - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\App\Helper\Context $context + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Registry $coreRegistry * @param \Magento\View\LayoutInterface $layout * @param \Magento\Core\Model\Store\Config $coreStoreConfig * @param \Magento\Customer\Model\Session $session */ public function __construct( - \Magento\Core\Helper\Context $context, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\App\Helper\Context $context, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Registry $coreRegistry, \Magento\View\LayoutInterface $layout, \Magento\Core\Model\Store\Config $coreStoreConfig, @@ -129,15 +129,15 @@ class Data extends \Magento\Core\Helper\Url { return $this->_getUrl('productalert/add/' . $type, array( 'product_id' => $this->getProduct()->getId(), - \Magento\Core\Controller\Front\Action::PARAM_NAME_URL_ENCODED => $this->getEncodedUrl() + \Magento\App\Action\Action::PARAM_NAME_URL_ENCODED => $this->getEncodedUrl() )); } /** * Create block instance * - * @param string|\Magento\Core\Block\AbstractBlock $block - * @return \Magento\Core\Block\AbstractBlock + * @param string|\Magento\View\Block\AbstractBlock $block + * @return \Magento\View\Block\AbstractBlock * @throws \Magento\Core\Exception */ public function createBlock($block) @@ -147,7 +147,7 @@ class Data extends \Magento\Core\Helper\Url $block = $this->_layout->createBlock($block); } } - if (!$block instanceof \Magento\Core\Block\AbstractBlock) { + if (!$block instanceof \Magento\View\Block\AbstractBlock) { throw new \Magento\Core\Exception(__('Invalid block type: %1', $block)); } return $block; diff --git a/app/code/Magento/ProductAlert/Model/Email.php b/app/code/Magento/ProductAlert/Model/Email.php index bd7ec249087248e51dd041476fac6535204061d9..61c1cc7d4a49a0b92295272e78afffa9846563e5 100644 --- a/app/code/Magento/ProductAlert/Model/Email.php +++ b/app/code/Magento/ProductAlert/Model/Email.php @@ -119,7 +119,7 @@ class Email extends \Magento\Core\Model\AbstractModel protected $_appEmulation; /** - * @var \Magento\Core\Model\Email\TemplateFactory + * @var \Magento\Email\Model\TemplateFactory */ protected $_templateFactory; @@ -131,7 +131,7 @@ class Email extends \Magento\Core\Model\AbstractModel * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Customer\Model\CustomerFactory $customerFactory * @param \Magento\Core\Model\App\Emulation $appEmulation - * @param \Magento\Core\Model\Email\TemplateFactory $templateFactory + * @param \Magento\Email\Model\TemplateFactory $templateFactory * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection * @param array $data @@ -144,7 +144,7 @@ class Email extends \Magento\Core\Model\AbstractModel \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Customer\Model\CustomerFactory $customerFactory, \Magento\Core\Model\App\Emulation $appEmulation, - \Magento\Core\Model\Email\TemplateFactory $templateFactory, + \Magento\Email\Model\TemplateFactory $templateFactory, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, array $data = array() diff --git a/app/code/Magento/ProductAlert/Model/Observer.php b/app/code/Magento/ProductAlert/Model/Observer.php index 35f2c3207903be63239b7faeeb1f4c119d9b9dc9..e70f38bf494066a7a3ca1237b67d1030d27e041d 100644 --- a/app/code/Magento/ProductAlert/Model/Observer.php +++ b/app/code/Magento/ProductAlert/Model/Observer.php @@ -127,7 +127,7 @@ class Observer protected $_translate; /** - * @var \Magento\Core\Model\Email\TemplateFactory + * @var \Magento\Email\Model\TemplateFactory */ protected $_templateFactory; @@ -146,7 +146,7 @@ class Observer * @param \Magento\Core\Model\DateFactory $dateFactory * @param \Magento\ProductAlert\Model\Resource\Stock\CollectionFactory $stockColFactory * @param \Magento\Core\Model\Translate $translate - * @param \Magento\Core\Model\Email\TemplateFactory $templateFactory + * @param \Magento\Email\Model\TemplateFactory $templateFactory * @param \Magento\ProductAlert\Model\EmailFactory $emailFactory */ public function __construct( @@ -159,7 +159,7 @@ class Observer \Magento\Core\Model\DateFactory $dateFactory, \Magento\ProductAlert\Model\Resource\Stock\CollectionFactory $stockColFactory, \Magento\Core\Model\Translate $translate, - \Magento\Core\Model\Email\TemplateFactory $templateFactory, + \Magento\Email\Model\TemplateFactory $templateFactory, \Magento\ProductAlert\Model\EmailFactory $emailFactory ) { $this->_taxData = $taxData; @@ -382,7 +382,7 @@ class Observer $$this->_translate->setTranslateInline(false); - /* @var $emailTemplate \Magento\Core\Model\Email\Template */ + /* @var $emailTemplate \Magento\Email\Model\Template */ $this->_templateFactory->create()->setDesignConfig(array('area' => 'backend')) ->sendTransactional( $this->_coreStoreConfig->getConfig(self::XML_PATH_ERROR_TEMPLATE), diff --git a/app/code/Magento/Rating/Block/Adminhtml/Edit.php b/app/code/Magento/Rating/Block/Adminhtml/Edit.php index 52c2c97435fd351c9d06be50f25d771043e7955e..3a233582b5ef6622b88621bf4d4164b9052f4a43 100644 --- a/app/code/Magento/Rating/Block/Adminhtml/Edit.php +++ b/app/code/Magento/Rating/Block/Adminhtml/Edit.php @@ -46,23 +46,23 @@ class Edit extends \Magento\Adminhtml\Block\Widget\Form\Container protected $_ratingFactory; protected $_blockGroup = 'Magento_Rating'; - /** - * @param \Magento\Rating\Model\RatingFactory $ratingFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Rating\Model\RatingFactory $ratingFactory + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Rating\Model\RatingFactory $ratingFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Rating\Model\RatingFactory $ratingFactory, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_ratingFactory = $ratingFactory; $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _construct() diff --git a/app/code/Magento/Rating/Block/Adminhtml/Edit/Tab/Form.php b/app/code/Magento/Rating/Block/Adminhtml/Edit/Tab/Form.php index 68f53c58483ca4a2e777fad6b2c9d86471cc0366..03ed3e41e3731e25b5877e22aa3f5aebdb3e4cf7 100644 --- a/app/code/Magento/Rating/Block/Adminhtml/Edit/Tab/Form.php +++ b/app/code/Magento/Rating/Block/Adminhtml/Edit/Tab/Form.php @@ -29,13 +29,6 @@ namespace Magento\Rating\Block\Adminhtml\Edit\Tab; class Form extends \Magento\Backend\Block\Widget\Form\Generic { - /** - * Store manager instance - * - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - /** * System store * @@ -58,32 +51,31 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic protected $_optionFactory; /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory * @param \Magento\Rating\Model\Rating\OptionFactory $optionFactory * @param \Magento\Core\Model\Session\AbstractSession $session * @param \Magento\Core\Model\System\Store $systemStore - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Registry $coreRegistry * @param array $data */ public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, \Magento\Rating\Model\Rating\OptionFactory $optionFactory, \Magento\Core\Model\Session\AbstractSession $session, \Magento\Core\Model\System\Store $systemStore, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Registry $coreRegistry, array $data = array() ) { $this->_optionFactory = $optionFactory; $this->_session = $session; $this->_systemStore = $systemStore; - $this->_storeManager = $storeManager; - parent::__construct($coreRegistry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); } diff --git a/app/code/Magento/Rating/Block/Adminhtml/Edit/Tab/Options.php b/app/code/Magento/Rating/Block/Adminhtml/Edit/Tab/Options.php index b69d2f2fc3b56ffa5e533f3d99bc4d0ca590b3ea..32cd245a7488e64931005e284e95223f4bd43f87 100644 --- a/app/code/Magento/Rating/Block/Adminhtml/Edit/Tab/Options.php +++ b/app/code/Magento/Rating/Block/Adminhtml/Edit/Tab/Options.php @@ -35,24 +35,24 @@ class Options extends \Magento\Backend\Block\Widget\Form\Generic */ protected $_optionFactory; - /** - * @param \Magento\Rating\Model\Rating\OptionFactory $optionFactory - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Rating\Model\Rating\OptionFactory $optionFactory + * @param array $data */ - public function __construct( - \Magento\Rating\Model\Rating\OptionFactory $optionFactory, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Rating\Model\Rating\OptionFactory $optionFactory, + array $data = array() + ) { $this->_optionFactory = $optionFactory; - parent::__construct($registry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); } diff --git a/app/code/Magento/Rating/Block/Entity/Detailed.php b/app/code/Magento/Rating/Block/Entity/Detailed.php index e2b5f0ebe87edf32622821ffcfdb1a7cd6fba9bd..8514e417ca4457defeeda390468eaf60b8785a58 100644 --- a/app/code/Magento/Rating/Block/Entity/Detailed.php +++ b/app/code/Magento/Rating/Block/Entity/Detailed.php @@ -33,42 +33,32 @@ */ namespace Magento\Rating\Block\Entity; -class Detailed extends \Magento\Core\Block\Template +class Detailed extends \Magento\View\Block\Template { /** * @var string */ protected $_template = 'detailed.phtml'; - /** - * Store list manager - * - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - /** * @var \Magento\Rating\Model\RatingFactory */ protected $_ratingFactory; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Rating\Model\RatingFactory $ratingFactory * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Rating\Model\RatingFactory $ratingFactory, array $data = array() - ){ - $this->_storeManager = $storeManager; + ) { $this->_ratingFactory = $ratingFactory; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Rating/Controller/Adminhtml/Index.php b/app/code/Magento/Rating/Controller/Adminhtml/Index.php index da9cd113724b3a944237dd334ea4386c3ae386f2..835f2ace53f00b1accc1a268e705b3c518cebbd2 100644 --- a/app/code/Magento/Rating/Controller/Adminhtml/Index.php +++ b/app/code/Magento/Rating/Controller/Adminhtml/Index.php @@ -29,7 +29,9 @@ */ namespace Magento\Rating\Controller\Adminhtml; -class Index extends \Magento\Backend\Controller\Adminhtml\Action +use Magento\Backend\App\Action; + +class Index extends \Magento\Backend\App\Action { /** * Core registry @@ -39,11 +41,11 @@ class Index extends \Magento\Backend\Controller\Adminhtml\Action protected $_coreRegistry = null; /** - * @param \Magento\Backend\Controller\Context $context + * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Core\Model\Registry $coreRegistry */ public function __construct( - \Magento\Backend\Controller\Context $context, + \Magento\Backend\App\Action\Context $context, \Magento\Core\Model\Registry $coreRegistry ) { $this->_coreRegistry = $coreRegistry; @@ -53,32 +55,32 @@ class Index extends \Magento\Backend\Controller\Adminhtml\Action public function indexAction() { $this->_initEnityId(); - $this->loadLayout(); + $this->_view->loadLayout(); $this->_setActiveMenu('Magento_Review::catalog_reviews_ratings_ratings'); $this->_addBreadcrumb(__('Manage Ratings'), __('Manage Ratings')); - $this->renderLayout(); + $this->_view->renderLayout(); } public function editAction() { $this->_initEnityId(); - $this->loadLayout(); + $this->_view->loadLayout(); $ratingModel = $this->_objectManager->create('Magento\Rating\Model\Rating'); if ($this->getRequest()->getParam('id')) { $ratingModel->load($this->getRequest()->getParam('id')); } - $this->_title($ratingModel->getId() ? $ratingModel->getRatingCode() : __('New Rating')); + $this->_title->add($ratingModel->getId() ? $ratingModel->getRatingCode() : __('New Rating')); $this->_setActiveMenu('Magento_Review::catalog_reviews_ratings_ratings'); $this->_addBreadcrumb(__('Manage Ratings'), __('Manage Ratings')); - $this->_addContent($this->getLayout()->createBlock('Magento\Rating\Block\Adminhtml\Edit')) - ->_addLeft($this->getLayout()->createBlock('Magento\Rating\Block\Adminhtml\Edit\Tabs')); - $this->renderLayout(); + $this->_addContent($this->_view->getLayout()->createBlock('Magento\Rating\Block\Adminhtml\Edit')) + ->_addLeft($this->_view->getLayout()->createBlock('Magento\Rating\Block\Adminhtml\Edit\Tabs')); + $this->_view->renderLayout(); } public function newAction() @@ -164,7 +166,7 @@ class Index extends \Magento\Backend\Controller\Adminhtml\Action protected function _initEnityId() { - $this->_title(__('Ratings')); + $this->_title->add(__('Ratings')); $this->_coreRegistry->register( 'entityId', $this->_objectManager->create('Magento\Rating\Model\Rating\Entity')->getIdByCode('product') diff --git a/app/code/Magento/Rating/Helper/Data.php b/app/code/Magento/Rating/Helper/Data.php index 5017fcdfd981929bf69ad84ad75db01220424228..c7a96b9d609c977b07d6947ac14a26edebf2c882 100644 --- a/app/code/Magento/Rating/Helper/Data.php +++ b/app/code/Magento/Rating/Helper/Data.php @@ -29,7 +29,7 @@ */ namespace Magento\Rating\Helper; -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { } diff --git a/app/code/Magento/Rating/Model/Resource/Rating.php b/app/code/Magento/Rating/Model/Resource/Rating.php index d11f9b6b8454798a4a22a073342e3632337083f0..c7f415cc05386f04f4df6032d0015c61f5bf1a8e 100644 --- a/app/code/Magento/Rating/Model/Resource/Rating.php +++ b/app/code/Magento/Rating/Model/Resource/Rating.php @@ -40,7 +40,7 @@ class Rating extends \Magento\Core\Model\Resource\Db\AbstractDb /** * Store manager * - * @var \Magento\Core\Model\StoreManager + * @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; @@ -60,14 +60,14 @@ class Rating extends \Magento\Core\Model\Resource\Db\AbstractDb * @param \Magento\Logger $logger * @param \Magento\Rating\Helper\Data $ratingData * @param \Magento\App\Resource $resource - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Review\Model\Resource\Review\Summary $reviewSummary */ public function __construct( \Magento\Logger $logger, \Magento\Rating\Helper\Data $ratingData, \Magento\App\Resource $resource, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Review\Model\Resource\Review\Summary $reviewSummary ) { $this->_ratingData = $ratingData; diff --git a/app/code/Magento/Reports/Block/Adminhtml/Grid.php b/app/code/Magento/Reports/Block/Adminhtml/Grid.php index 4078764cf5a0f7386c6f7999ed23ba4523722fe6..4251f7b28e4bb969bfd1fd7682b63f95e91feb77 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Grid.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Grid.php @@ -95,33 +95,6 @@ class Grid extends \Magento\Backend\Block\Widget\Grid */ protected $_filterValues; - /** - * Locale instance - * - * @var \Magento\Core\Model\LocaleInterface - */ - protected $_locale; - - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param \Magento\Core\Model\LocaleInterface $locale - * @param array $data - */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - \Magento\Core\Model\LocaleInterface $locale, - array $data = array() - ) { - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); - $this->_locale = $locale; - } - /** * Apply sorting and filtering to collection * diff --git a/app/code/Magento/Reports/Block/Product/AbstractProduct.php b/app/code/Magento/Reports/Block/Product/AbstractProduct.php index 0ec548d4e41b9e043341395059f1906223d9b85e..a323af2d41bcca0eeba24ed7ddbfd44e29548000 100644 --- a/app/code/Magento/Reports/Block/Product/AbstractProduct.php +++ b/app/code/Magento/Reports/Block/Product/AbstractProduct.php @@ -61,46 +61,32 @@ abstract class AbstractProduct extends \Magento\Catalog\Block\Product\AbstractPr protected $_indexFactory; /** - * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\View\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Catalog\Model\Config $catalogConfig - * @param \Magento\Core\Model\Registry $coreRegistry + * @param \Magento\Core\Model\Registry $registry * @param \Magento\Tax\Helper\Data $taxData * @param \Magento\Catalog\Helper\Data $catalogData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Math\Random $mathRandom * @param \Magento\Catalog\Model\Product\Visibility $productVisibility * @param \Magento\Reports\Model\Product\Index\Factory $indexFactory * @param array $data - * - * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( - \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\View\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Catalog\Model\Config $catalogConfig, - \Magento\Core\Model\Registry $coreRegistry, + \Magento\Core\Model\Registry $registry, \Magento\Tax\Helper\Data $taxData, \Magento\Catalog\Helper\Data $catalogData, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Math\Random $mathRandom, \Magento\Catalog\Model\Product\Visibility $productVisibility, \Magento\Reports\Model\Product\Index\Factory $indexFactory, array $data = array() ) { + parent::__construct($context, $coreData, $catalogConfig, $registry, $taxData, $catalogData, $mathRandom, $data); $this->_productVisibility = $productVisibility; $this->_indexFactory = $indexFactory; - parent::__construct( - $storeManager, - $catalogConfig, - $coreRegistry, - $taxData, - $catalogData, - $coreData, - $context, - $mathRandom, - $data - ); } /** diff --git a/app/code/Magento/Reports/Helper/Data.php b/app/code/Magento/Reports/Helper/Data.php index 4b05f9cbb18b5b0920b83a6da5b6c6ad7dce8715..63405206a124cb9c906e0ba63e8fe85218fee1e3 100644 --- a/app/code/Magento/Reports/Helper/Data.php +++ b/app/code/Magento/Reports/Helper/Data.php @@ -29,7 +29,7 @@ */ namespace Magento\Reports\Helper; -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { const REPORT_PERIOD_TYPE_DAY = 'day'; const REPORT_PERIOD_TYPE_MONTH = 'month'; @@ -41,11 +41,11 @@ class Data extends \Magento\Core\Helper\AbstractHelper protected $_itemFactory; /** - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Adminhtml\Model\Report\ItemFactory $itemFactory */ public function __construct( - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Adminhtml\Model\Report\ItemFactory $itemFactory ) { parent::__construct($context); diff --git a/app/code/Magento/Reports/Model/Resource/Product/Collection.php b/app/code/Magento/Reports/Model/Resource/Product/Collection.php index 8872079ed392345b4510020075f045e2b1e69670..64d1977fb9efe8c2171144420deecf86c635932a 100644 --- a/app/code/Magento/Reports/Model/Resource/Product/Collection.php +++ b/app/code/Magento/Reports/Model/Resource/Product/Collection.php @@ -84,7 +84,7 @@ class Collection extends \Magento\Catalog\Model\Resource\Product\Collection * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy * @param \Magento\Core\Model\EntityFactory $entityFactory * @param \Magento\Eav\Model\Config $eavConfig - * @param \Magento\App\Resource $coreResource + * @param \Magento\App\Resource $resource * @param \Magento\Eav\Model\EntityFactory $eavEntityFactory * @param \Magento\Validator\UniversalFactory $universalFactory * @param \Magento\Core\Model\StoreManagerInterface $storeManager @@ -109,7 +109,7 @@ class Collection extends \Magento\Catalog\Model\Resource\Product\Collection \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, \Magento\Core\Model\EntityFactory $entityFactory, \Magento\Eav\Model\Config $eavConfig, - \Magento\App\Resource $coreResource, + \Magento\App\Resource $resource, \Magento\Eav\Model\EntityFactory $eavEntityFactory, \Magento\Validator\UniversalFactory $universalFactory, \Magento\Core\Model\StoreManagerInterface $storeManager, @@ -129,7 +129,7 @@ class Collection extends \Magento\Catalog\Model\Resource\Product\Collection $this->setProductEntityId($product->getEntityIdField()); $this->setProductEntityTableName($product->getEntityTable()); $this->setProductEntityTypeId($product->getTypeId()); - parent::__construct($eventManager, $logger, $fetchStrategy, $entityFactory, $eavConfig, $coreResource, + parent::__construct($eventManager, $logger, $fetchStrategy, $entityFactory, $eavConfig, $resource, $eavEntityFactory, $universalFactory, $storeManager, $catalogData, $catalogProductFlat, $coreStoreConfig, $productOptionFactory, $catalogUrl, $locale, $customerSession, $resourceHelper, $dateTime ); diff --git a/app/code/Magento/Reports/Model/Resource/Product/Index/Collection/AbstractCollection.php b/app/code/Magento/Reports/Model/Resource/Product/Index/Collection/AbstractCollection.php index 8bbedf56bf515918ca952990314edfc6cdc4bc20..0dd5e80667bffdb79d12dee0fbc51cad885b0ee3 100644 --- a/app/code/Magento/Reports/Model/Resource/Product/Index/Collection/AbstractCollection.php +++ b/app/code/Magento/Reports/Model/Resource/Product/Index/Collection/AbstractCollection.php @@ -57,7 +57,7 @@ abstract class AbstractCollection * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy * @param \Magento\Core\Model\EntityFactory $entityFactory * @param \Magento\Eav\Model\Config $eavConfig - * @param \Magento\App\Resource $coreResource + * @param \Magento\App\Resource $resource * @param \Magento\Eav\Model\EntityFactory $eavEntityFactory * @param \Magento\Validator\UniversalFactory $universalFactory * @param \Magento\Core\Model\StoreManagerInterface $storeManager @@ -80,7 +80,7 @@ abstract class AbstractCollection \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, \Magento\Core\Model\EntityFactory $entityFactory, \Magento\Eav\Model\Config $eavConfig, - \Magento\App\Resource $coreResource, + \Magento\App\Resource $resource, \Magento\Eav\Model\EntityFactory $eavEntityFactory, \Magento\Validator\UniversalFactory $universalFactory, \Magento\Core\Model\StoreManagerInterface $storeManager, @@ -95,7 +95,7 @@ abstract class AbstractCollection \Magento\Stdlib\DateTime $dateTime, \Magento\Log\Model\Visitor $logVisitor ) { - parent::__construct($eventManager, $logger, $fetchStrategy, $entityFactory, $eavConfig, $coreResource, + parent::__construct($eventManager, $logger, $fetchStrategy, $entityFactory, $eavConfig, $resource, $eavEntityFactory, $universalFactory, $storeManager, $catalogData, $catalogProductFlat, $coreStoreConfig, $productOptionFactory, $catalogUrl, $locale, $customerSession, $resourceHelper, $dateTime ); diff --git a/app/code/Magento/Reports/Model/Resource/Product/Lowstock/Collection.php b/app/code/Magento/Reports/Model/Resource/Product/Lowstock/Collection.php index 7adc9928b44347446f280ddc499eef736c5bd51c..ffdc8b4bbdcec1aa800a6f459f7763f218b0b053 100644 --- a/app/code/Magento/Reports/Model/Resource/Product/Lowstock/Collection.php +++ b/app/code/Magento/Reports/Model/Resource/Product/Lowstock/Collection.php @@ -70,7 +70,7 @@ class Collection extends \Magento\Reports\Model\Resource\Product\Collection * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy * @param \Magento\Core\Model\EntityFactory $entityFactory * @param \Magento\Eav\Model\Config $eavConfig - * @param \Magento\App\Resource $coreResource + * @param \Magento\App\Resource $resource * @param \Magento\Eav\Model\EntityFactory $eavEntityFactory * @param \Magento\Validator\UniversalFactory $universalFactory * @param \Magento\Core\Model\StoreManagerInterface $storeManager @@ -97,7 +97,7 @@ class Collection extends \Magento\Reports\Model\Resource\Product\Collection \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, \Magento\Core\Model\EntityFactory $entityFactory, \Magento\Eav\Model\Config $eavConfig, - \Magento\App\Resource $coreResource, + \Magento\App\Resource $resource, \Magento\Eav\Model\EntityFactory $eavEntityFactory, \Magento\Validator\UniversalFactory $universalFactory, \Magento\Core\Model\StoreManagerInterface $storeManager, @@ -116,7 +116,7 @@ class Collection extends \Magento\Reports\Model\Resource\Product\Collection \Magento\CatalogInventory\Helper\Data $catalogInventoryData, \Magento\CatalogInventory\Model\Resource\Stock\Item $itemResource ) { - parent::__construct($eventManager, $logger, $fetchStrategy, $entityFactory, $eavConfig, $coreResource, + parent::__construct($eventManager, $logger, $fetchStrategy, $entityFactory, $eavConfig, $resource, $eavEntityFactory, $universalFactory, $storeManager, $catalogData, $catalogProductFlat, $coreStoreConfig, $productOptionFactory, $catalogUrl, $locale, $customerSession, $resourceHelper, $dateTime, $product, $eventTypeFactory, $productType diff --git a/app/code/Magento/Review/Block/Customer/ListCustomer.php b/app/code/Magento/Review/Block/Customer/ListCustomer.php index 40f395d17f697d878d259c9c6b24fae189ad19fb..843db456b5e39c0f26c2ad88af2dd69706bde7b8 100644 --- a/app/code/Magento/Review/Block/Customer/ListCustomer.php +++ b/app/code/Magento/Review/Block/Customer/ListCustomer.php @@ -49,31 +49,23 @@ class ListCustomer extends \Magento\Customer\Block\Account\Dashboard protected $_collectionFactory; /** - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - - /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory * @param \Magento\Review\Model\Resource\Review\Product\CollectionFactory $collectionFactory - * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Customer\Model\Session $customerSession, \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory, \Magento\Review\Model\Resource\Review\Product\CollectionFactory $collectionFactory, - \Magento\Core\Model\StoreManagerInterface $storeManager, array $data = array() ) { $this->_collectionFactory = $collectionFactory; - $this->_storeManager = $storeManager; - parent::__construct($coreData, $context, $customerSession, $subscriberFactory, $data); + parent::__construct($context, $coreData, $customerSession, $subscriberFactory, $data); } protected function _initCollection() @@ -109,7 +101,7 @@ class ListCustomer extends \Magento\Customer\Block\Account\Dashboard /** * Initializes toolbar * - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ protected function _prepareLayout() { @@ -175,7 +167,7 @@ class ListCustomer extends \Magento\Customer\Block\Account\Dashboard } /** - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ protected function _beforeToHtml() { diff --git a/app/code/Magento/Review/Block/Customer/Recent.php b/app/code/Magento/Review/Block/Customer/Recent.php index ffb789472d38984841896e6f7b2dfcea3655f3a8..2bef95fbf734383ba1e852e4c9c9826b95255412 100644 --- a/app/code/Magento/Review/Block/Customer/Recent.php +++ b/app/code/Magento/Review/Block/Customer/Recent.php @@ -29,7 +29,7 @@ namespace Magento\Review\Block\Customer; /** * Recent Customer Reviews Block */ -class Recent extends \Magento\Core\Block\Template +class Recent extends \Magento\View\Block\Template { /** * @var string @@ -49,40 +49,22 @@ class Recent extends \Magento\Core\Block\Template protected $_customerSession; /** - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - - /** - * Filter manager - * - * @var \Magento\Filter\FilterManager - */ - protected $filter; - - /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Review\Model\Resource\Review\Product\CollectionFactory $collectionFactory * @param \Magento\Customer\Model\Session $customerSession - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Filter\FilterManager $filter * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Review\Model\Resource\Review\Product\CollectionFactory $collectionFactory, \Magento\Customer\Model\Session $customerSession, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Filter\FilterManager $filter, array $data = array() ) { $this->_collection = $collectionFactory->create(); $this->_customerSession = $customerSession; - $this->_storeManager = $storeManager; - $this->filter = $filter; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** @@ -97,7 +79,7 @@ class Recent extends \Magento\Core\Block\Template */ public function truncateString($value, $length = 80, $etc = '...', &$remainder = '', $breakWords = true) { - return $this->filter->truncate($value, array( + return $this->filterManager->truncate($value, array( 'length' => $length, 'etc' => $etc, 'remainder' => $remainder, diff --git a/app/code/Magento/Review/Block/Customer/View.php b/app/code/Magento/Review/Block/Customer/View.php index 5dafcd48a6cddc47e403aa44f77c7e38f8b13f02..aa674f80220a1abb24bf4a29f66c0e6f676de3d3 100644 --- a/app/code/Magento/Review/Block/Customer/View.php +++ b/app/code/Magento/Review/Block/Customer/View.php @@ -64,13 +64,12 @@ class View extends \Magento\Catalog\Block\Product\AbstractProduct protected $_customerSession; /** - * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\View\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Catalog\Model\Config $catalogConfig - * @param \Magento\Core\Model\Registry $coreRegistry + * @param \Magento\Core\Model\Registry $registry * @param \Magento\Tax\Helper\Data $taxData * @param \Magento\Catalog\Helper\Data $catalogData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Math\Random $mathRandom * @param \Magento\Catalog\Model\ProductFactory $productFactory * @param \Magento\Review\Model\ReviewFactory $reviewFactory @@ -80,13 +79,12 @@ class View extends \Magento\Catalog\Block\Product\AbstractProduct * @param array $data */ public function __construct( - \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\View\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Catalog\Model\Config $catalogConfig, - \Magento\Core\Model\Registry $coreRegistry, + \Magento\Core\Model\Registry $registry, \Magento\Tax\Helper\Data $taxData, \Magento\Catalog\Helper\Data $catalogData, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Math\Random $mathRandom, \Magento\Catalog\Model\ProductFactory $productFactory, \Magento\Review\Model\ReviewFactory $reviewFactory, @@ -100,17 +98,8 @@ class View extends \Magento\Catalog\Block\Product\AbstractProduct $this->_voteFactory = $voteFactory; $this->_ratingFactory = $ratingFactory; $this->_customerSession = $customerSession; - parent::__construct( - $storeManager, - $catalogConfig, - $coreRegistry, - $taxData, - $catalogData, - $coreData, - $context, - $mathRandom, - $data - ); + + parent::__construct($context, $coreData, $catalogConfig, $registry, $taxData, $catalogData, $mathRandom, $data); } diff --git a/app/code/Magento/Review/Block/Form.php b/app/code/Magento/Review/Block/Form.php index cba3af6447934d941349ee7048e35efe941295e8..67e9e2f2b807efa76ed8b2d8abc8a6d55a21f6ee 100644 --- a/app/code/Magento/Review/Block/Form.php +++ b/app/code/Magento/Review/Block/Form.php @@ -33,7 +33,7 @@ */ namespace Magento\Review\Block; -class Form extends \Magento\Core\Block\Template +class Form extends \Magento\View\Block\Template { /** * Review data @@ -57,36 +57,29 @@ class Form extends \Magento\Core\Block\Template */ protected $_ratingFactory; - /** - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - /** * @var \Magento\Review\Model\Session */ protected $_reviewSession; /** + * @param \Magento\View\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Core\Model\Session\Generic $reviewSession * @param \Magento\Review\Helper\Data $reviewData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Catalog\Model\ProductFactory $productFactory * @param \Magento\Rating\Model\RatingFactory $ratingFactory - * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Core\Model\Session\Generic $reviewSession, \Magento\Review\Helper\Data $reviewData, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Customer\Model\Session $customerSession, \Magento\Catalog\Model\ProductFactory $productFactory, \Magento\Rating\Model\RatingFactory $ratingFactory, - \Magento\Core\Model\StoreManagerInterface $storeManager, array $data = array() ) { $this->_reviewSession = $reviewSession; @@ -94,8 +87,7 @@ class Form extends \Magento\Core\Block\Template $this->_customerSession = $customerSession; $this->_productFactory = $productFactory; $this->_ratingFactory = $ratingFactory; - $this->_storeManager = $storeManager; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _construct() diff --git a/app/code/Magento/Review/Block/Helper.php b/app/code/Magento/Review/Block/Helper.php index 84a51af9dc292b697d83fe0e0306c362e4af09a9..8eb65421b13252d5fa909f51343eaa497491d229 100644 --- a/app/code/Magento/Review/Block/Helper.php +++ b/app/code/Magento/Review/Block/Helper.php @@ -33,40 +33,32 @@ */ namespace Magento\Review\Block; -class Helper extends \Magento\Core\Block\Template +class Helper extends \Magento\View\Block\Template { protected $_availableTemplates = array( 'default' => 'helper/summary.phtml', 'short' => 'helper/summary_short.phtml' ); - /** - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - /** * @var \Magento\Review\Model\ReviewFactory */ protected $_reviewFactory; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Review\Model\ReviewFactory $reviewFactory * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Review\Model\ReviewFactory $reviewFactory, array $data = array() ) { - $this->_storeManager = $storeManager; $this->_reviewFactory = $reviewFactory; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } public function getSummaryHtml($product, $templateType, $displayIfNoReviews) diff --git a/app/code/Magento/Review/Block/Product/View.php b/app/code/Magento/Review/Block/Product/View.php index adf3e77ad674e428d4d39ac1eb72f11e70a05c14..946d7081469da80e501edb00c0c23f96198eb059 100644 --- a/app/code/Magento/Review/Block/Product/View.php +++ b/app/code/Magento/Review/Block/Product/View.php @@ -46,53 +46,45 @@ class View extends \Magento\Catalog\Block\Product\View protected $_reviewsColFactory; /** - * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\View\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Catalog\Model\Config $catalogConfig - * @param \Magento\Catalog\Model\ProductFactory $productFactory - * @param \Magento\Core\Model\LocaleInterface $locale - * @param \Magento\Tax\Model\Calculation $taxCalculation - * @param \Magento\Core\Model\Registry $coreRegistry - * @param \Magento\Stdlib\String $string + * @param \Magento\Core\Model\Registry $registry * @param \Magento\Tax\Helper\Data $taxData * @param \Magento\Catalog\Helper\Data $catalogData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Math\Random $mathRandom + * @param \Magento\Catalog\Model\ProductFactory $productFactory + * @param \Magento\Tax\Model\Calculation $taxCalculation + * @param \Magento\Stdlib\String $string * @param \Magento\Review\Model\Resource\Review\CollectionFactory $collectionFactory * @param array $data - * - * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( - \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\View\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Catalog\Model\Config $catalogConfig, - \Magento\Catalog\Model\ProductFactory $productFactory, - \Magento\Core\Model\LocaleInterface $locale, - \Magento\Tax\Model\Calculation $taxCalculation, - \Magento\Core\Model\Registry $coreRegistry, - \Magento\Stdlib\String $string, + \Magento\Core\Model\Registry $registry, \Magento\Tax\Helper\Data $taxData, \Magento\Catalog\Helper\Data $catalogData, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Math\Random $mathRandom, + \Magento\Catalog\Model\ProductFactory $productFactory, + \Magento\Tax\Model\Calculation $taxCalculation, + \Magento\Stdlib\String $string, \Magento\Review\Model\Resource\Review\CollectionFactory $collectionFactory, array $data = array() ) { $this->_reviewsColFactory = $collectionFactory; parent::__construct( - $storeManager, + $context, + $coreData, $catalogConfig, - $productFactory, - $locale, - $taxCalculation, - $coreRegistry, - $string, + $registry, $taxData, $catalogData, - $coreData, - $context, $mathRandom, + $productFactory, + $taxCalculation, + $string, $data ); } diff --git a/app/code/Magento/Review/Block/Product/View/Other.php b/app/code/Magento/Review/Block/Product/View/Other.php index 43409f53f772613e5d870b038bb5f5c412842763..ce3a248e65934aef206ff77390f9d89106ec90dc 100644 --- a/app/code/Magento/Review/Block/Product/View/Other.php +++ b/app/code/Magento/Review/Block/Product/View/Other.php @@ -29,7 +29,7 @@ */ namespace Magento\Review\Block\Product\View; -class Other extends \Magento\Core\Block\Template +class Other extends \Magento\View\Block\Template { /** * @var \Magento\Core\Model\Registry @@ -37,19 +37,19 @@ class Other extends \Magento\Core\Block\Template protected $_registry; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Core\Model\Registry $registry * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Core\Model\Registry $registry, array $data = array() ) { $this->_registry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Review/Block/View.php b/app/code/Magento/Review/Block/View.php index 36e9ab9f4a591f2ab20d6326f7d07262c0a7b812..f28615023c4b5242c609b3df11dba16fd4dd0b02 100644 --- a/app/code/Magento/Review/Block/View.php +++ b/app/code/Magento/Review/Block/View.php @@ -54,29 +54,25 @@ class View extends \Magento\Catalog\Block\Product\AbstractProduct protected $_reviewFactory; /** - * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\View\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Catalog\Model\Config $catalogConfig - * @param \Magento\Core\Model\Registry $coreRegistry + * @param \Magento\Core\Model\Registry $registry * @param \Magento\Tax\Helper\Data $taxData * @param \Magento\Catalog\Helper\Data $catalogData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Math\Random $mathRandom * @param \Magento\Rating\Model\Rating\Option\VoteFactory $voteFactory * @param \Magento\Rating\Model\RatingFactory $ratingFactory * @param \Magento\Review\Model\ReviewFactory $reviewFactory * @param array $data - * - * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( - \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\View\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Catalog\Model\Config $catalogConfig, - \Magento\Core\Model\Registry $coreRegistry, + \Magento\Core\Model\Registry $registry, \Magento\Tax\Helper\Data $taxData, \Magento\Catalog\Helper\Data $catalogData, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Math\Random $mathRandom, \Magento\Rating\Model\Rating\Option\VoteFactory $voteFactory, \Magento\Rating\Model\RatingFactory $ratingFactory, @@ -84,19 +80,9 @@ class View extends \Magento\Catalog\Block\Product\AbstractProduct array $data = array() ) { $this->_voteFactory = $voteFactory; - $this->_ratingFactory = $ratingFactory; $this->_reviewFactory = $reviewFactory; - parent::__construct( - $storeManager, - $catalogConfig, - $coreRegistry, - $taxData, - $catalogData, - $coreData, - $context, - $mathRandom, - $data - ); + + parent::__construct($context, $coreData, $catalogConfig, $registry, $taxData, $catalogData, $mathRandom, $data); } /** diff --git a/app/code/Magento/Review/Controller/Customer.php b/app/code/Magento/Review/Controller/Customer.php index 962cc181e80f93fea4800732fe064b87ddb2b235..f08728c7fc228925d1e2e0a204d6907fb2432e75 100644 --- a/app/code/Magento/Review/Controller/Customer.php +++ b/app/code/Magento/Review/Controller/Customer.php @@ -34,7 +34,10 @@ namespace Magento\Review\Controller; -class Customer extends \Magento\Core\Controller\Front\Action +use Magento\App\Action\NotFoundException; +use Magento\App\RequestInterface; + +class Customer extends \Magento\App\Action\Action { /** * @var \Magento\Customer\Model\Session @@ -42,11 +45,11 @@ class Customer extends \Magento\Core\Controller\Front\Action protected $_customerSession; /** - * @param \Magento\Core\Controller\Varien\Action\Context $context + * @param \Magento\App\Action\Context $context * @param \Magento\Customer\Model\Session $customerSession */ public function __construct( - \Magento\Core\Controller\Varien\Action\Context $context, + \Magento\App\Action\Context $context, \Magento\Customer\Model\Session $customerSession ) { $this->_customerSession = $customerSession; @@ -54,42 +57,43 @@ class Customer extends \Magento\Core\Controller\Front\Action } /** - * Action predispatch - * * Check customer authentication for some actions + * + * @param RequestInterface $request + * @return mixed */ - public function preDispatch() + public function dispatch(RequestInterface $request) { - parent::preDispatch(); if (!$this->_customerSession->authenticate($this)) { - $this->setFlag('', self::FLAG_NO_DISPATCH, true); + $this->_actionFlag->set('', self::FLAG_NO_DISPATCH, true); } + return parent::dispatch($request); } public function indexAction() { - $this->loadLayout(); - $this->_initLayoutMessages('Magento\Catalog\Model\Session'); + $this->_view->loadLayout(); + $this->_view->getLayout()->initMessages('Magento\Catalog\Model\Session'); - if ($navigationBlock = $this->getLayout()->getBlock('customer_account_navigation')) { + if ($navigationBlock = $this->_view->getLayout()->getBlock('customer_account_navigation')) { $navigationBlock->setActive('review/customer'); } - if ($block = $this->getLayout()->getBlock('review_customer_list')) { - $block->setRefererUrl($this->_getRefererUrl()); + if ($block = $this->_view->getLayout()->getBlock('review_customer_list')) { + $block->setRefererUrl($this->_redirect->getRefererUrl()); } - $this->getLayout()->getBlock('head')->setTitle(__('My Product Reviews')); + $this->_view->getLayout()->getBlock('head')->setTitle(__('My Product Reviews')); - $this->renderLayout(); + $this->_view->renderLayout(); } public function viewAction() { - $this->loadLayout(); - if ($navigationBlock = $this->getLayout()->getBlock('customer_account_navigation')) { + $this->_view->loadLayout(); + if ($navigationBlock = $this->_view->getLayout()->getBlock('customer_account_navigation')) { $navigationBlock->setActive('review/customer'); } - $this->getLayout()->getBlock('head')->setTitle(__('Review Details')); - $this->renderLayout(); + $this->_view->getLayout()->getBlock('head')->setTitle(__('Review Details')); + $this->_view->renderLayout(); } } diff --git a/app/code/Magento/Review/Controller/Product.php b/app/code/Magento/Review/Controller/Product.php index e4dabd672c6d3c0fe8ad795e1f3ff22cea8993e9..34376721cca0cc1862becfe474d031b0cefc3bd3 100644 --- a/app/code/Magento/Review/Controller/Product.php +++ b/app/code/Magento/Review/Controller/Product.php @@ -33,15 +33,11 @@ */ namespace Magento\Review\Controller; -class Product extends \Magento\Core\Controller\Front\Action -{ - /** - * Action list where need check enabled cookie - * - * @var array - */ - protected $_cookieCheckActions = array('post'); +use Magento\App\Action\NotFoundException; +use Magento\App\RequestInterface; +class Product extends \Magento\App\Action\Action +{ /** * Core registry * @@ -54,21 +50,11 @@ class Product extends \Magento\Core\Controller\Front\Action */ protected $_customerSession; - /** - * @var \Magento\UrlInterface - */ - protected $_urlModel; - /** * @var \Magento\Review\Model\Session */ protected $_reviewSession; - /** - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - /** * @var \Magento\Catalog\Model\CategoryFactory */ @@ -105,11 +91,14 @@ class Product extends \Magento\Core\Controller\Front\Action protected $_catalogDesign; /** - * @param \Magento\Core\Controller\Varien\Action\Context $context + * @var \Magento\Core\Model\StoreManagerInterface + */ + protected $_storeManager; + + /** + * @param \Magento\App\Action\Context $context * @param \Magento\Core\Model\Registry $coreRegistry * @param \Magento\Customer\Model\Session $customerSession - * @param \Magento\UrlInterface $urlModel - * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory * @param \Magento\Logger $logger * @param \Magento\Catalog\Model\ProductFactory $productFactory @@ -118,13 +107,12 @@ class Product extends \Magento\Core\Controller\Front\Action * @param \Magento\Core\Model\Session $session * @param \Magento\Catalog\Model\Design $catalogDesign * @param \Magento\Core\Model\Session\Generic $reviewSession + * @param \Magento\Core\Model\StoreManagerInterface $storeManager */ public function __construct( - \Magento\Core\Controller\Varien\Action\Context $context, + \Magento\App\Action\Context $context, \Magento\Core\Model\Registry $coreRegistry, \Magento\Customer\Model\Session $customerSession, - \Magento\UrlInterface $urlModel, - \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Catalog\Model\CategoryFactory $categoryFactory, \Magento\Logger $logger, \Magento\Catalog\Model\ProductFactory $productFactory, @@ -132,13 +120,13 @@ class Product extends \Magento\Core\Controller\Front\Action \Magento\Rating\Model\RatingFactory $ratingFactory, \Magento\Core\Model\Session $session, \Magento\Catalog\Model\Design $catalogDesign, - \Magento\Core\Model\Session\Generic $reviewSession + \Magento\Core\Model\Session\Generic $reviewSession, + \Magento\Core\Model\StoreManagerInterface $storeManager ) { + $this->_storeManager = $storeManager; $this->_coreRegistry = $coreRegistry; $this->_customerSession = $customerSession; - $this->_urlModel = $urlModel; $this->_reviewSession = $reviewSession; - $this->_storeManager = $storeManager; $this->_categoryFactory = $categoryFactory; $this->_logger = $logger; $this->_productFactory = $productFactory; @@ -150,29 +138,35 @@ class Product extends \Magento\Core\Controller\Front\Action parent::__construct($context); } - public function preDispatch() + /** + * Dispatch request + * + * @param RequestInterface $request + * @return mixed + */ + public function dispatch(RequestInterface $request) { - parent::preDispatch(); - $allowGuest = $this->_objectManager->get('Magento\Review\Helper\Data')->getIsGuestAllowToWrite(); - if (!$this->getRequest()->isDispatched()) { - return; + if (!$request->isDispatched()) { + return parent::dispatch($request); } - $action = $this->getRequest()->getActionName(); - if (!$allowGuest && $action == 'post' && $this->getRequest()->isPost()) { + if (!$allowGuest && $request->getActionName() == 'post' && $request->isPost()) { if (!$this->_customerSession->isLoggedIn()) { - $this->setFlag('', self::FLAG_NO_DISPATCH, true); - $this->_customerSession->setBeforeAuthUrl($this->_urlModel->getUrl('*/*/*', array('_current' => true))); + $this->_actionFlag->set('', self::FLAG_NO_DISPATCH, true); + $this->_customerSession->setBeforeAuthUrl($this->_url->getUrl('*/*/*', array('_current' => true))); $this->_reviewSession - ->setFormData($this->getRequest()->getPost()) - ->setRedirectUrl($this->_getRefererUrl()); - $this->_redirectUrl($this->_objectManager->get('Magento\Customer\Helper\Data')->getLoginUrl()); + ->setFormData($request->getPost()) + ->setRedirectUrl($this->_redirect->getRefererUrl()); + $this->getResponse()->setRedirect( + $this->_objectManager->get('Magento\Customer\Helper\Data')->getLoginUrl() + ); } } - return $this; + return parent::dispatch($request); } + /** * Initialize and check product * @@ -320,10 +314,10 @@ class Product extends \Magento\Core\Controller\Front\Action $redirectUrl = $this->_reviewSession->getRedirectUrl(true); if ($redirectUrl) { - $this->_redirectUrl($redirectUrl); + $this->getResponse()->setRedirect($redirectUrl); return; } - $this->_redirectReferer(); + $this->getResponse()->setRedirect($this->_redirect->getRedirectUrl()); } /** @@ -344,7 +338,7 @@ class Product extends \Magento\Core\Controller\Front\Action $this->_initProductLayout($product); // update breadcrumbs - $breadcrumbsBlock = $this->getLayout()->getBlock('breadcrumbs'); + $breadcrumbsBlock = $this->_view->getLayout()->getBlock('breadcrumbs'); if ($breadcrumbsBlock) { $breadcrumbsBlock->addCrumb('product', array( 'label' => $product->getName(), @@ -354,9 +348,9 @@ class Product extends \Magento\Core\Controller\Front\Action $breadcrumbsBlock->addCrumb('reviews', array('label' => __('Product Reviews'))); } - $this->renderLayout(); + $this->_view->renderLayout(); } elseif (!$this->getResponse()->isRedirect()) { - $this->_forward('noRoute'); + $this->_forward('noroute'); } } @@ -378,10 +372,9 @@ class Product extends \Magento\Core\Controller\Front\Action return; } - $this->loadLayout(); - $this->_initLayoutMessages('Magento\Review\Model\Session'); - $this->_initLayoutMessages('Magento\Catalog\Model\Session'); - $this->renderLayout(); + $this->_view->loadLayout(); + $this->_view->getLayout()->initMessages(array('Magento\Review\Model\Session', 'Magento\Catalog\Model\Session')); + $this->_view->renderLayout(); } /** @@ -390,9 +383,9 @@ class Product extends \Magento\Core\Controller\Front\Action */ protected function _initProductLayout($product) { - $update = $this->getLayout()->getUpdate(); + $update = $this->_view->getLayout()->getUpdate(); $update->addHandle('default'); - $this->addPageLayoutHandles( + $this->_view->addPageLayoutHandles( array('id' => $product->getId(), 'sku' => $product->getSku(), 'type' => $product->getTypeId()) ); @@ -400,13 +393,14 @@ class Product extends \Magento\Core\Controller\Front\Action $this->_objectManager->get('Magento\Page\Helper\Layout') ->applyHandle($product->getPageLayout()); } - $this->loadLayoutUpdates(); + $this->_view->loadLayoutUpdates(); if ($product->getPageLayout()) { $this->_objectManager->get('Magento\Page\Helper\Layout') ->applyTemplate($product->getPageLayout()); } $update->addUpdate($product->getCustomLayoutUpdate()); - $this->generateLayoutXml()->generateLayoutBlocks(); + $this->_view->generateLayoutXml(); + $this->_view->generateLayoutBlocks(); } } diff --git a/app/code/Magento/Review/Helper/Action/Pager.php b/app/code/Magento/Review/Helper/Action/Pager.php index a20b596a1cc6b56f9db9435614cc64d8f4e97a71..75813d38db5cc9177ca6d418d129fd459ca7f986 100644 --- a/app/code/Magento/Review/Helper/Action/Pager.php +++ b/app/code/Magento/Review/Helper/Action/Pager.php @@ -31,7 +31,7 @@ */ namespace Magento\Review\Helper\Action; -class Pager extends \Magento\Core\Helper\AbstractHelper +class Pager extends \Magento\App\Helper\AbstractHelper { const STORAGE_PREFIX = 'search_result_ids'; @@ -52,11 +52,11 @@ class Pager extends \Magento\Core\Helper\AbstractHelper /** * @param \Magento\Backend\Model\Session $backendSession - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context */ public function __construct( \Magento\Backend\Model\Session $backendSession, - \Magento\Core\Helper\Context $context + \Magento\App\Helper\Context $context ) { $this->_backendSession = $backendSession; parent::__construct($context); diff --git a/app/code/Magento/Review/Helper/Data.php b/app/code/Magento/Review/Helper/Data.php index 4133b1a655d1c4439e925965ab35a51fce28f5d6..ff169bc5d67760d8e599f6e0aa9f4cd70a7a8268 100644 --- a/app/code/Magento/Review/Helper/Data.php +++ b/app/code/Magento/Review/Helper/Data.php @@ -29,7 +29,7 @@ namespace Magento\Review\Helper; /** * Default review helper */ -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { const XML_REVIEW_GUETS_ALLOW = 'catalog/review/allow_guest'; @@ -53,13 +53,13 @@ class Data extends \Magento\Core\Helper\AbstractHelper protected $_escaper; /** - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\Store\Config $coreStoreConfig * @param \Magento\Escaper $escaper * @param \Magento\Filter\FilterManager $filter */ public function __construct( - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Core\Model\Store\Config $coreStoreConfig, \Magento\Escaper $escaper, \Magento\Filter\FilterManager $filter diff --git a/app/code/Magento/Review/etc/frontend/di.xml b/app/code/Magento/Review/etc/frontend/di.xml index 6556df779a839713f0f8c5b5b2454066c5482968..0ce38e26e0ab151ca28b7a3e4258ae55c3814e7f 100644 --- a/app/code/Magento/Review/etc/frontend/di.xml +++ b/app/code/Magento/Review/etc/frontend/di.xml @@ -38,6 +38,7 @@ </param> </type> <type name="Magento\Review\Controller\Product"> + <plugin name="sessionInitializer" type="reviewProductInitSession" /> <param name="reviewSession"> <instance type="Magento\Review\Model\Session" /> </param> @@ -49,4 +50,11 @@ </value> </param> </type> + <virtualType name="reviewProductInitSession" type="Magento\Core\App\Action\Plugin\Session"> + <param name="cookieCheckActions"> + <value> + <productReviewPost>post</productReviewPost> + </value> + </param> + </virtualType> </config> diff --git a/app/code/Magento/Review/view/frontend/layout/review_product_list.xml b/app/code/Magento/Review/view/frontend/layout/review_product_list.xml index ee06566961a1dfd6d1f521e000676fb8a7d1fd35..8a1e673fbda49b5ff546d06c97e69f5171251203 100644 --- a/app/code/Magento/Review/view/frontend/layout/review_product_list.xml +++ b/app/code/Magento/Review/view/frontend/layout/review_product_list.xml @@ -53,7 +53,7 @@ <block class="Magento\Catalog\Block\Product\View" name="product.tierprices" as="tierprices" template="product/view/tierprices.phtml"/> <block class="Magento\Review\Block\Product\View\Other" name="product.info.other" as="other" template="Magento_Review::product/view/other.phtml"/> <block class="Magento\Page\Block\Html\Pager" name="product_review_list.toolbar"/> - <block class="Magento\Core\Block\Template" name="product_review_list.count" template="Magento_Review::product/view/count.phtml"/> + <block class="Magento\View\Block\Template" name="product_review_list.count" template="Magento_Review::product/view/count.phtml"/> <block class="Magento\Review\Block\Product\View\ListView" name="product.info.product_additional_data" as="product_additional_data" template="product/view/list.phtml"> <block class="Magento\Review\Block\Form" name="product.review.form" as="review_form"> <container name="product.review.form.fields.before" as="form_fields_before" label="Review Form Fields Before"/> diff --git a/app/code/Magento/Rss/App/Action/Plugin/Authentication.php b/app/code/Magento/Rss/App/Action/Plugin/Authentication.php new file mode 100644 index 0000000000000000000000000000000000000000..d75915b84ef3a9ca8bbe962abef1d75056770ec8 --- /dev/null +++ b/app/code/Magento/Rss/App/Action/Plugin/Authentication.php @@ -0,0 +1,123 @@ +<?php +/** + * RSS Authentication plugin + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +namespace Magento\Rss\App\Action\Plugin; + +class Authentication extends \Magento\Backend\App\Action\Plugin\Authentication +{ + /** + * @var \Magento\HTTP\Authentication + */ + protected $_httpAuthentication; + + /** + * @var \Magento\Core\Model\Logger + */ + protected $_logger; + + /** + * @var \Magento\AuthorizationInterface + */ + protected $_authorization; + + /** + * @var array + */ + protected $_aclResources = array( + 'authenticate' => 'Magento_Rss::rss', + 'catalog' => array( + 'notifystock' => 'Magento_Catalog::products', + 'review' => 'Magento_Review::reviews_all' + ), + 'order' => 'Magento_Sales::sales_order' + ); + + /** + * @param \Magento\Backend\Model\Auth $auth + * @param \Magento\Backend\Model\Session $session + * @param \Magento\Backend\Model\Url $url + * @param \Magento\App\ResponseInterface $response + * @param \Magento\App\ActionFlag $actionFlag + * @param \Magento\HTTP\Authentication $httpAuthentication + * @param \Magento\Logger $logger + * @param \Magento\AuthorizationInterface $authorization + */ + public function __construct( + \Magento\Backend\Model\Auth $auth, + \Magento\Backend\Model\Session $session, + \Magento\Backend\Model\Url $url, + \Magento\App\ResponseInterface $response, + \Magento\App\ActionFlag $actionFlag, + \Magento\HTTP\Authentication $httpAuthentication, + \Magento\Logger $logger, + \Magento\AuthorizationInterface $authorization + ) { + $this->_httpAuthentication = $httpAuthentication; + $this->_logger = $logger; + $this->_authorization = $authorization; + parent::__construct($auth, $session, $url, $response, $actionFlag); + } + + /** + * Replace standard admin login form with HTTP Basic authentication + * + * @param array $arguments + * @param \Magento\Code\Plugin\InvocationChain $invocationChain + * @return mixed + */ + public function aroundDispatch(array $arguments, \Magento\Code\Plugin\InvocationChain $invocationChain) + { + /** @var \Magento\App\RequestInterface $request */ + $request = $arguments[0]; + $resource = isset($this->_aclResources[$request->getControllerName()]) + ? (isset($this->_aclResources[$request->getControllerName()][$request->getActionName()]) + ? $this->_aclResources[$request->getControllerName()][$request->getActionName()] + : $this->_aclResources[$request->getControllerName()]) + : null; + if (!$resource) { + return parent::aroundDispatch($arguments, $invocationChain); + } + + $session = $this->_auth->getAuthStorage(); + + // Try to login using HTTP-authentication + if (!$session->isLoggedIn()) { + list($login, $password) = $this->_httpAuthentication->getCredentials(); + try { + $this->_auth->login($login, $password); + } catch (\Magento\Backend\Model\Auth\Exception $e) { + $this->_logger->logException($e); + } + } + + // Verify if logged in and authorized + if (!$session->isLoggedIn() || !$this->_authorization->isAllowed($resource)) { + $this->_httpAuthentication->setAuthenticationFailed('RSS Feeds'); + return null; + } + + return parent::aroundDispatch($arguments, $invocationChain); + } +} diff --git a/app/code/Magento/Rss/Block/AbstractBlock.php b/app/code/Magento/Rss/Block/AbstractBlock.php index 48362484032b26ab164d864d6a4431addef404c1..25da8573e46a3a0101550e81f0396b8fba2788d9 100644 --- a/app/code/Magento/Rss/Block/AbstractBlock.php +++ b/app/code/Magento/Rss/Block/AbstractBlock.php @@ -26,35 +26,27 @@ namespace Magento\Rss\Block; -class AbstractBlock extends \Magento\Core\Block\Template +class AbstractBlock extends \Magento\View\Block\Template { - /** - * @var \Magento\Core\Model\StoreManager - */ - protected $_storeManager; - /** * @var \Magento\Customer\Model\Session */ protected $_customerSession; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManager $storeManager * @param \Magento\Customer\Model\Session $customerSession * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, - \Magento\Core\Model\StoreManager $storeManager, \Magento\Customer\Model\Session $customerSession, array $data = array() ) { - $this->_storeManager = $storeManager; $this->_customerSession = $customerSession; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** @@ -65,8 +57,8 @@ class AbstractBlock extends \Magento\Core\Block\Template protected function _getStoreId() { $storeId = (int) $this->getRequest()->getParam('store_id'); - if($storeId == null) { - $storeId = $this->_storeManager->getStore()->getId(); + if ($storeId == null) { + $storeId = $this->_storeManager->getStore()->getId(); } return $storeId; } diff --git a/app/code/Magento/Rss/Block/Catalog/AbstractCatalog.php b/app/code/Magento/Rss/Block/Catalog/AbstractCatalog.php index e313d258f9629575a164683e622280244fd6b274..ca826facc6053322d41af28b7d8f090747e4bc89 100644 --- a/app/code/Magento/Rss/Block/Catalog/AbstractCatalog.php +++ b/app/code/Magento/Rss/Block/Catalog/AbstractCatalog.php @@ -68,30 +68,28 @@ class AbstractCatalog extends \Magento\Rss\Block\AbstractBlock protected $_catalogData = null; /** - * @param \Magento\Catalog\Helper\Data $catalogData + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManager $storeManager * @param \Magento\Customer\Model\Session $customerSession + * @param \Magento\Catalog\Helper\Data $catalogData * @param array $data */ public function __construct( - \Magento\Catalog\Helper\Data $catalogData, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, - \Magento\Core\Model\StoreManager $storeManager, \Magento\Customer\Model\Session $customerSession, + \Magento\Catalog\Helper\Data $catalogData, array $data = array() ) { $this->_catalogData = $catalogData; - parent::__construct($coreData, $context, $storeManager, $customerSession, $data); + parent::__construct($context, $coreData, $customerSession, $data); } /** * Return Price Block renderer for specified product type * * @param string $productTypeId Catalog Product type - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ protected function _getPriceBlock($productTypeId) { diff --git a/app/code/Magento/Rss/Block/Catalog/Category.php b/app/code/Magento/Rss/Block/Catalog/Category.php index 38391c7fb82a3dfbbbd20c3f257021fc0952db2c..4a2716f10c14fa66a1b7aafd9df30639ed62710a 100644 --- a/app/code/Magento/Rss/Block/Catalog/Category.php +++ b/app/code/Magento/Rss/Block/Catalog/Category.php @@ -57,11 +57,10 @@ class Category extends \Magento\Rss\Block\Catalog\AbstractCatalog protected $_collectionFactory; /** - * @param \Magento\Catalog\Helper\Data $catalogData + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManager $storeManager * @param \Magento\Customer\Model\Session $customerSession + * @param \Magento\Catalog\Helper\Data $catalogData * @param \Magento\Catalog\Model\Layer $catalogLayer * @param \Magento\Catalog\Model\Product\Visibility $visibility * @param \Magento\Rss\Model\RssFactory $rssFactory @@ -70,11 +69,10 @@ class Category extends \Magento\Rss\Block\Catalog\AbstractCatalog * @param array $data */ public function __construct( - \Magento\Catalog\Helper\Data $catalogData, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, - \Magento\Core\Model\StoreManager $storeManager, \Magento\Customer\Model\Session $customerSession, + \Magento\Catalog\Helper\Data $catalogData, \Magento\Catalog\Model\Layer $catalogLayer, \Magento\Catalog\Model\Product\Visibility $visibility, \Magento\Rss\Model\RssFactory $rssFactory, @@ -87,7 +85,7 @@ class Category extends \Magento\Rss\Block\Catalog\AbstractCatalog $this->_rssFactory = $rssFactory; $this->_categoryFactory = $categoryFactory; $this->_collectionFactory = $collectionFactory; - parent::__construct($catalogData, $coreData, $context, $storeManager, $customerSession, $data); + parent::__construct($context, $coreData, $customerSession, $catalogData, $data); } protected function _construct() diff --git a/app/code/Magento/Rss/Block/Catalog/NewCatalog.php b/app/code/Magento/Rss/Block/Catalog/NewCatalog.php index 48c7ffca0c2359f5efdccb1332e30f02d4be0602..04c8b050c68458888bfe23dd735a2aa4d16f30fe 100644 --- a/app/code/Magento/Rss/Block/Catalog/NewCatalog.php +++ b/app/code/Magento/Rss/Block/Catalog/NewCatalog.php @@ -41,11 +41,6 @@ class NewCatalog extends \Magento\Rss\Block\Catalog\AbstractCatalog */ protected $_productFactory; - /** - * @var \Magento\Core\Model\LocaleInterface - */ - protected $_locale; - /** * @var \Magento\Catalog\Model\Product\Visibility */ @@ -57,37 +52,32 @@ class NewCatalog extends \Magento\Rss\Block\Catalog\AbstractCatalog protected $_resourceIterator; /** - * @param \Magento\Catalog\Helper\Data $catalogData + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManager $storeManager * @param \Magento\Customer\Model\Session $customerSession + * @param \Magento\Catalog\Helper\Data $catalogData * @param \Magento\Rss\Model\RssFactory $rssFactory * @param \Magento\Catalog\Model\ProductFactory $productFactory - * @param \Magento\Core\Model\LocaleInterface $locale * @param \Magento\Catalog\Model\Product\Visibility $visibility * @param \Magento\Core\Model\Resource\Iterator $resourceIterator * @param array $data */ public function __construct( - \Magento\Catalog\Helper\Data $catalogData, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, - \Magento\Core\Model\StoreManager $storeManager, \Magento\Customer\Model\Session $customerSession, + \Magento\Catalog\Helper\Data $catalogData, \Magento\Rss\Model\RssFactory $rssFactory, \Magento\Catalog\Model\ProductFactory $productFactory, - \Magento\Core\Model\LocaleInterface $locale, \Magento\Catalog\Model\Product\Visibility $visibility, \Magento\Core\Model\Resource\Iterator $resourceIterator, array $data = array() ) { $this->_rssFactory = $rssFactory; $this->_productFactory = $productFactory; - $this->_locale = $locale; $this->_visibility = $visibility; $this->_resourceIterator = $resourceIterator; - parent::__construct($catalogData, $coreData, $context, $storeManager, $customerSession, $data); + parent::__construct($context, $coreData, $customerSession, $catalogData, $data); } protected function _toHtml() diff --git a/app/code/Magento/Rss/Block/Catalog/Salesrule.php b/app/code/Magento/Rss/Block/Catalog/Salesrule.php index 2f25dfe16ae2d503cfd41dcf74ec8fc0b473d3f2..3a240f76a1a45f26f6cc5c466a1e391283588c81 100644 --- a/app/code/Magento/Rss/Block/Catalog/Salesrule.php +++ b/app/code/Magento/Rss/Block/Catalog/Salesrule.php @@ -42,18 +42,16 @@ class Salesrule extends \Magento\Rss\Block\AbstractBlock protected $_collectionFactory; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManager $storeManager * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Rss\Model\RssFactory $rssFactory * @param \Magento\SalesRule\Model\Resource\Rule\CollectionFactory $collectionFactory * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, - \Magento\Core\Model\StoreManager $storeManager, \Magento\Customer\Model\Session $customerSession, \Magento\Rss\Model\RssFactory $rssFactory, \Magento\SalesRule\Model\Resource\Rule\CollectionFactory $collectionFactory, @@ -61,7 +59,7 @@ class Salesrule extends \Magento\Rss\Block\AbstractBlock ) { $this->_rssFactory = $rssFactory; $this->_collectionFactory = $collectionFactory; - parent::__construct($coreData, $context, $storeManager, $customerSession, $data); + parent::__construct($context, $coreData, $customerSession, $data); } protected function _construct() diff --git a/app/code/Magento/Rss/Block/Catalog/Special.php b/app/code/Magento/Rss/Block/Catalog/Special.php index 0a57b1efc399a397c94eab1d362b115b1d42a016..e6e2bacc310365d6032b1881b12e36f63ad52102 100644 --- a/app/code/Magento/Rss/Block/Catalog/Special.php +++ b/app/code/Magento/Rss/Block/Catalog/Special.php @@ -54,22 +54,20 @@ class Special extends \Magento\Rss\Block\Catalog\AbstractCatalog protected $_resourceIterator; /** - * @param \Magento\Catalog\Helper\Data $catalogData + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManager $storeManager * @param \Magento\Customer\Model\Session $customerSession + * @param \Magento\Catalog\Helper\Data $catalogData * @param \Magento\Catalog\Model\ProductFactory $productFactory * @param \Magento\Rss\Model\RssFactory $rssFactory * @param \Magento\Core\Model\Resource\Iterator $resourceIterator * @param array $data */ public function __construct( - \Magento\Catalog\Helper\Data $catalogData, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, - \Magento\Core\Model\StoreManager $storeManager, \Magento\Customer\Model\Session $customerSession, + \Magento\Catalog\Helper\Data $catalogData, \Magento\Catalog\Model\ProductFactory $productFactory, \Magento\Rss\Model\RssFactory $rssFactory, \Magento\Core\Model\Resource\Iterator $resourceIterator, @@ -78,7 +76,7 @@ class Special extends \Magento\Rss\Block\Catalog\AbstractCatalog $this->_productFactory = $productFactory; $this->_rssFactory = $rssFactory; $this->_resourceIterator = $resourceIterator; - parent::__construct($catalogData, $coreData, $context, $storeManager, $customerSession, $data); + parent::__construct($context, $coreData, $customerSession, $catalogData, $data); } protected function _construct() diff --git a/app/code/Magento/Rss/Block/ListBlock.php b/app/code/Magento/Rss/Block/ListBlock.php index 34384643359788d7949b096e6d47bbe4518c9784..b2285ce6a5a2491caddf658dc50de144b99345bf 100644 --- a/app/code/Magento/Rss/Block/ListBlock.php +++ b/app/code/Magento/Rss/Block/ListBlock.php @@ -29,17 +29,12 @@ */ namespace Magento\Rss\Block; -class ListBlock extends \Magento\Core\Block\Template +class ListBlock extends \Magento\View\Block\Template { const XML_PATH_RSS_METHODS = 'rss'; protected $_rssFeeds = array(); - /** - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - /** * @var \Magento\Customer\Model\Session */ @@ -51,25 +46,22 @@ class ListBlock extends \Magento\Core\Block\Template protected $_categoryFactory; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Customer\Model\Session $customerSession, \Magento\Catalog\Model\CategoryFactory $categoryFactory, array $data = array() ) { - $this->_storeManager = $storeManager; $this->_customerSession = $customerSession; $this->_categoryFactory = $categoryFactory; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** @@ -106,7 +98,7 @@ class ListBlock extends \Magento\Core\Block\Template * @param string $label * @param array $param * @param bool $customerGroup - * @return \Magento\Core\Helper\AbstractHelper + * @return \Magento\App\Helper\AbstractHelper */ public function addRssFeed($url, $label, $param = array(), $customerGroup = false) { diff --git a/app/code/Magento/Rss/Block/Order/Details.php b/app/code/Magento/Rss/Block/Order/Details.php index 5012d2af4f5143397b142ffb2831c9e8d95731fb..3c598e443531a8455b26b604e04c44477ab8254d 100644 --- a/app/code/Magento/Rss/Block/Order/Details.php +++ b/app/code/Magento/Rss/Block/Order/Details.php @@ -26,7 +26,7 @@ namespace Magento\Rss\Block\Order; -class Details extends \Magento\Core\Block\Template +class Details extends \Magento\View\Block\Template { protected $_template = 'order/details.phtml'; diff --git a/app/code/Magento/Rss/Block/Order/Status.php b/app/code/Magento/Rss/Block/Order/Status.php index d264201a6e3209fe45928aa3de76b6c2a2ac730c..af53dbb762b760087a046150d2307d435e6d0cd7 100644 --- a/app/code/Magento/Rss/Block/Order/Status.php +++ b/app/code/Magento/Rss/Block/Order/Status.php @@ -29,7 +29,7 @@ */ namespace Magento\Rss\Block\Order; -class Status extends \Magento\Core\Block\Template +class Status extends \Magento\View\Block\Template { /** * Core registry @@ -49,16 +49,16 @@ class Status extends \Magento\Core\Block\Template protected $_orderFactory; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Core\Model\Registry $registry * @param \Magento\Rss\Model\RssFactory $rssFactory * @param \Magento\Rss\Model\Resource\OrderFactory $orderFactory * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Core\Model\Registry $registry, \Magento\Rss\Model\RssFactory $rssFactory, \Magento\Rss\Model\Resource\OrderFactory $orderFactory, @@ -67,7 +67,7 @@ class Status extends \Magento\Core\Block\Template $this->_coreRegistry = $registry; $this->_rssFactory = $rssFactory; $this->_orderFactory = $orderFactory; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _construct() diff --git a/app/code/Magento/Rss/Block/Wishlist.php b/app/code/Magento/Rss/Block/Wishlist.php index 7c9f7dfa3940be742b77700de57fe8820adc7ae3..09c62d9e29357cef506a5a9c3fca84b765f74dd2 100644 --- a/app/code/Magento/Rss/Block/Wishlist.php +++ b/app/code/Magento/Rss/Block/Wishlist.php @@ -65,13 +65,12 @@ class Wishlist extends \Magento\Wishlist\Block\AbstractBlock protected $_rssFactory; /** - * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\View\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Catalog\Model\Config $catalogConfig - * @param \Magento\Core\Model\Registry $coreRegistry + * @param \Magento\Core\Model\Registry $registry * @param \Magento\Tax\Helper\Data $taxData * @param \Magento\Catalog\Helper\Data $catalogData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Math\Random $mathRandom * @param \Magento\Wishlist\Helper\Data $wishlistData * @param \Magento\Customer\Model\Session $customerSession @@ -80,17 +79,14 @@ class Wishlist extends \Magento\Wishlist\Block\AbstractBlock * @param \Magento\Customer\Model\CustomerFactory $customerFactory * @param \Magento\Rss\Model\RssFactory $rssFactory * @param array $data - * - * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( - \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\View\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Catalog\Model\Config $catalogConfig, - \Magento\Core\Model\Registry $coreRegistry, + \Magento\Core\Model\Registry $registry, \Magento\Tax\Helper\Data $taxData, \Magento\Catalog\Helper\Data $catalogData, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Math\Random $mathRandom, \Magento\Wishlist\Helper\Data $wishlistData, \Magento\Customer\Model\Session $customerSession, @@ -104,13 +100,12 @@ class Wishlist extends \Magento\Wishlist\Block\AbstractBlock $this->_customerFactory = $customerFactory; $this->_rssFactory = $rssFactory; parent::__construct( - $storeManager, + $context, + $coreData, $catalogConfig, - $coreRegistry, + $registry, $taxData, $catalogData, - $coreData, - $context, $mathRandom, $wishlistData, $customerSession, diff --git a/app/code/Magento/Rss/Controller/Adminhtml/Authenticate.php b/app/code/Magento/Rss/Controller/Adminhtml/Authenticate.php index 0626a74c08598d3c74479e5bf4dabdba215cc326..197de22c5519cde93dba27988e369ecb50de73cf 100644 --- a/app/code/Magento/Rss/Controller/Adminhtml/Authenticate.php +++ b/app/code/Magento/Rss/Controller/Adminhtml/Authenticate.php @@ -29,66 +29,16 @@ */ namespace Magento\Rss\Controller\Adminhtml; -class Authenticate extends \Magento\Backend\Controller\Adminhtml\Action -{ - /** - * @var \Magento\Core\Model\Logger - */ - protected $_logger; +use Magento\Backend\App\Action; +class Authenticate extends \Magento\Backend\App\Action +{ /** - * @param \Magento\Backend\Controller\Context $context + * @param Action\Context $context */ - public function __construct(\Magento\Backend\Controller\Context $context) + public function __construct(Action\Context $context) { - $this->_logger = $context->getLogger(); parent::__construct($context); $this->_objectManager->get('Magento\Backend\Model\Url')->turnOffSecretKey(); } - - /** - * Return required ACL resource for current action - * @return string - */ - protected function _getActionAclResource() - { - return 'Magento_Rss::rss'; - } - - /** - * Replace standard admin login form with HTTP Basic authentication - * @return bool|\Magento\Backend\Controller\AbstractAction - */ - protected function _initAuthentication() - { - $aclResource = $this->_getActionAclResource(); - if (!$aclResource) { - return parent::_initAuthentication(); - } - - /** @var $auth \Magento\Backend\Model\Auth */ - $auth = $this->_objectManager->create('Magento\Backend\Model\Auth'); - $session = $auth->getAuthStorage(); - - // Try to login using HTTP-authentication - if (!$session->isLoggedIn()) { - list($login, $password) = $this->_objectManager->get('Magento\HTTP\Authentication')->getCredentials(); - try { - $auth->login($login, $password); - } catch (\Magento\Backend\Model\Auth\Exception $e) { - $this->_logger->logException($e); - } - } - - // Verify if logged in and authorized - if (!$session->isLoggedIn() - || !$this->_objectManager->get('Magento\AuthorizationInterface')->isAllowed($aclResource) - ) { - $this->_objectManager->get('Magento\HTTP\Authentication')->setAuthenticationFailed('RSS Feeds'); - $this->setFlag('', self::FLAG_NO_DISPATCH, true); - return false; - } - - return true; - } } diff --git a/app/code/Magento/Rss/Controller/Adminhtml/Catalog.php b/app/code/Magento/Rss/Controller/Adminhtml/Catalog.php index 1a6edf76dad8ad39344cb523b9e5b43a22693e28..e0df9fb96f4f8bc6fab8c8b84001f138cff266c8 100644 --- a/app/code/Magento/Rss/Controller/Adminhtml/Catalog.php +++ b/app/code/Magento/Rss/Controller/Adminhtml/Catalog.php @@ -31,29 +31,14 @@ namespace Magento\Rss\Controller\Adminhtml; class Catalog extends \Magento\Rss\Controller\Adminhtml\Authenticate { - /** - * Return required ACL resource for current action - * - * @return bool|string - */ - protected function _getActionAclResource() - { - $acl = array( - 'notifystock' => 'Magento_Catalog::products', - 'review' => 'Magento_Review::reviews_all' - ); - $action = $this->getRequest()->getActionName(); - return isset($acl[$action]) ? $acl[$action] : false; - } - /** * Notify stock action */ public function notifystockAction() { $this->getResponse()->setHeader('Content-type', 'text/xml; charset=UTF-8'); - $this->loadLayout(false); - $this->renderLayout(); + $this->_view->loadLayout(false); + $this->_view->renderLayout(); } /** @@ -62,7 +47,7 @@ class Catalog extends \Magento\Rss\Controller\Adminhtml\Authenticate public function reviewAction() { $this->getResponse()->setHeader('Content-type', 'text/xml; charset=UTF-8'); - $this->loadLayout(false); - $this->renderLayout(); + $this->_view->loadLayout(false); + $this->_view->renderLayout(); } } diff --git a/app/code/Magento/Rss/Controller/Adminhtml/Order.php b/app/code/Magento/Rss/Controller/Adminhtml/Order.php index b11470376fd5e5a6cc0de8b763c077cfaeca488d..f6047e61c4d68867ea973440cd81bae1c605459e 100644 --- a/app/code/Magento/Rss/Controller/Adminhtml/Order.php +++ b/app/code/Magento/Rss/Controller/Adminhtml/Order.php @@ -31,23 +31,13 @@ namespace Magento\Rss\Controller\Adminhtml; class Order extends \Magento\Rss\Controller\Adminhtml\Authenticate { - /** - * Return required ACL resource for current action - * - * @return string - */ - protected function _getActionAclResource() - { - return 'Magento_Sales::sales_order'; - } - /** * New orders action */ public function newAction() { $this->getResponse()->setHeader('Content-type', 'text/xml; charset=UTF-8'); - $this->loadLayout(false); - $this->renderLayout(); + $this->_view->loadLayout(false); + $this->_view->renderLayout(); } } diff --git a/app/code/Magento/Rss/Controller/Catalog.php b/app/code/Magento/Rss/Controller/Catalog.php index a75bea291bf5454ebdaec02884d411aaf4928f9f..c6ac0780e4afe8fb42c5d38c1a922a0ba378d0ad 100644 --- a/app/code/Magento/Rss/Controller/Catalog.php +++ b/app/code/Magento/Rss/Controller/Catalog.php @@ -29,7 +29,7 @@ */ namespace Magento\Rss\Controller; -class Catalog extends \Magento\Core\Controller\Front\Action +class Catalog extends \Magento\App\Action\Action { /** * @var \Magento\Core\Model\Store\Config @@ -37,11 +37,11 @@ class Catalog extends \Magento\Core\Controller\Front\Action protected $_storeConfig; /** - * @param \Magento\Core\Controller\Varien\Action\Context $context + * @param \Magento\App\Action\Context $context * @param \Magento\Core\Model\Store\Config $storeConfig */ public function __construct( - \Magento\Core\Controller\Varien\Action\Context $context, + \Magento\App\Action\Context $context, \Magento\Core\Model\Store\Config $storeConfig ) { $this->_storeConfig = $storeConfig; @@ -99,7 +99,7 @@ class Catalog extends \Magento\Core\Controller\Front\Action protected function _render() { $this->getResponse()->setHeader('Content-Type', 'text/xml; charset=UTF-8'); - $this->loadLayout(false); - $this->renderLayout(); + $this->_view->loadLayout(false); + $this->_view->renderLayout(); } } diff --git a/app/code/Magento/Rss/Controller/Index.php b/app/code/Magento/Rss/Controller/Index.php index a96c00e259081efeb55787eb0b6954f58e06102c..815e5945ae2b501d5f5cad975fd41246c1550332 100644 --- a/app/code/Magento/Rss/Controller/Index.php +++ b/app/code/Magento/Rss/Controller/Index.php @@ -26,7 +26,9 @@ namespace Magento\Rss\Controller; -class Index extends \Magento\Core\Controller\Front\Action +use Magento\App\Action\NotFoundException; + +class Index extends \Magento\App\Action\Action { /** * Current wishlist @@ -48,11 +50,11 @@ class Index extends \Magento\Core\Controller\Front\Action protected $_storeConfig; /** - * @param \Magento\Core\Controller\Varien\Action\Context $context + * @param \Magento\App\Action\Context $context * @param \Magento\Core\Model\Store\Config $storeConfig */ public function __construct( - \Magento\Core\Controller\Varien\Action\Context $context, + \Magento\App\Action\Context $context, \Magento\Core\Model\Store\Config $storeConfig ) { $this->_storeConfig = $storeConfig; @@ -61,14 +63,16 @@ class Index extends \Magento\Core\Controller\Front\Action /** * Index action + * + * @throws NotFoundException */ public function indexAction() { if ($this->_storeConfig->getConfig('rss/config/active')) { - $this->loadLayout(); - $this->renderLayout(); + $this->_view->loadLayout(); + $this->_view->renderLayout(); } else { - $this->norouteAction(); + throw new NotFoundException(); } } @@ -99,8 +103,8 @@ class Index extends \Magento\Core\Controller\Front\Action && $wishlist->getCustomerId() == $this->_getCustomer()->getId()) ) { $this->getResponse()->setHeader('Content-Type', 'text/xml; charset=UTF-8'); - $this->loadLayout(false); - $this->renderLayout(); + $this->_view->loadLayout(false); + $this->_view->renderLayout(); return; } } diff --git a/app/code/Magento/Rss/Controller/Order.php b/app/code/Magento/Rss/Controller/Order.php index d10950960928a4d36e08cfc919bb4b39959bda6f..13960009444c476a32ec2940f7905115d7a61bcf 100644 --- a/app/code/Magento/Rss/Controller/Order.php +++ b/app/code/Magento/Rss/Controller/Order.php @@ -29,7 +29,7 @@ */ namespace Magento\Rss\Controller; -class Order extends \Magento\Core\Controller\Front\Action +class Order extends \Magento\App\Action\Action { /** * Core registry @@ -39,11 +39,11 @@ class Order extends \Magento\Core\Controller\Front\Action protected $_coreRegistry = null; /** - * @param \Magento\Core\Controller\Varien\Action\Context $context + * @param \Magento\App\Action\Context $context * @param \Magento\Core\Model\Registry $coreRegistry */ public function __construct( - \Magento\Core\Controller\Varien\Action\Context $context, + \Magento\App\Action\Context $context, \Magento\Core\Model\Registry $coreRegistry ) { $this->_coreRegistry = $coreRegistry; @@ -61,8 +61,8 @@ class Order extends \Magento\Core\Controller\Front\Action if (!is_null($order)) { $this->_coreRegistry->register('current_order', $order); $this->getResponse()->setHeader('Content-type', 'text/xml; charset=UTF-8'); - $this->loadLayout(false); - $this->renderLayout(); + $this->_view->loadLayout(false); + $this->_view->renderLayout(); return; } diff --git a/app/code/Magento/Rss/Helper/Order.php b/app/code/Magento/Rss/Helper/Order.php index 9026f39c89064739cfe8a022909151342cb77890..e7dae5db1860d0d608b2f43f00450dbd3b876e1c 100644 --- a/app/code/Magento/Rss/Helper/Order.php +++ b/app/code/Magento/Rss/Helper/Order.php @@ -31,7 +31,7 @@ */ namespace Magento\Rss\Helper; -class Order extends \Magento\Core\Helper\AbstractHelper +class Order extends \Magento\App\Helper\AbstractHelper { /** * @var \Magento\Core\Model\Store\Config @@ -44,12 +44,12 @@ class Order extends \Magento\Core\Helper\AbstractHelper protected $_orderFactory; /** - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\Store\Config $storeConfig * @param \Magento\Sales\Model\OrderFactory $orderFactory */ public function __construct( - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Core\Model\Store\Config $storeConfig, \Magento\Sales\Model\OrderFactory $orderFactory ) { diff --git a/app/code/Magento/Rss/Model/System/Config/Backend/Links.php b/app/code/Magento/Rss/Model/System/Config/Backend/Links.php index e1ceb53671716a989ce5e32ae8eb6b8c395dc283..56c899aed98e509fa3f2e621fa88496732c0ea3b 100644 --- a/app/code/Magento/Rss/Model/System/Config/Backend/Links.php +++ b/app/code/Magento/Rss/Model/System/Config/Backend/Links.php @@ -40,7 +40,7 @@ class Links extends \Magento\Core\Model\Config\Value /** * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Config $config * @param \Magento\App\Cache\TypeListInterface $cacheTypeList * @param \Magento\Core\Model\Resource\AbstractResource $resource @@ -50,7 +50,7 @@ class Links extends \Magento\Core\Model\Config\Value public function __construct( \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Config $config, \Magento\App\Cache\TypeListInterface $cacheTypeList, \Magento\Core\Model\Resource\AbstractResource $resource = null, @@ -68,7 +68,7 @@ class Links extends \Magento\Core\Model\Config\Value protected function _afterSave() { if ($this->isValueChanged()) { - $this->_cacheTypeList->invalidate(\Magento\Core\Block\AbstractBlock::CACHE_GROUP); + $this->_cacheTypeList->invalidate(\Magento\View\Block\AbstractBlock::CACHE_GROUP); } } } diff --git a/app/code/Magento/Rss/etc/adminhtml/di.xml b/app/code/Magento/Rss/etc/adminhtml/di.xml new file mode 100644 index 0000000000000000000000000000000000000000..297c9015947d067257104595057fd1f5e06e7eba --- /dev/null +++ b/app/code/Magento/Rss/etc/adminhtml/di.xml @@ -0,0 +1,30 @@ +<?xml version="1.0"?> +<!-- +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <type name="Magento\Rss\Controller\Adminhtml\Authenticate"> + <plugin name="adminAuthentication" type="Magento\Rss\App\Action\Plugin\Authentication"/> + </type> +</config> diff --git a/app/code/Magento/Rule/Block/Editable.php b/app/code/Magento/Rule/Block/Editable.php index 31a84265bdbd9c84f1ca338a30086fcf18a5b7bb..484b5128ece22fa42fbe219a32c16994091e574d 100644 --- a/app/code/Magento/Rule/Block/Editable.php +++ b/app/code/Magento/Rule/Block/Editable.php @@ -27,7 +27,7 @@ namespace Magento\Rule\Block; class Editable - extends \Magento\Core\Block\AbstractBlock + extends \Magento\View\Block\AbstractBlock implements \Magento\Data\Form\Element\Renderer\RendererInterface { /** @@ -38,26 +38,16 @@ class Editable protected $_coreData; /** - * Filter manager - * - * @var \Magento\Filter\FilterManager - */ - protected $filter; - - /** + * @param \Magento\View\Block\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Context $context - * @param \Magento\Filter\FilterManager $filter * @param array $data */ public function __construct( + \Magento\View\Block\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Context $context, - \Magento\Filter\FilterManager $filter, array $data = array() ) { $this->_coreData = $coreData; - $this->filter = $filter; parent::__construct($context, $data); } @@ -89,7 +79,7 @@ class Editable if ($this->_translator->isAllowed()) { $html .= $this->escapeHtml($valueName); } else { - $html .= $this->escapeHtml($this->filter->truncate($valueName, array('length' => 33, 'etc' => '...'))); + $html .= $this->escapeHtml($this->filterManager->truncate($valueName, array('length' => 33, 'etc' => '...'))); } $html .= '</a><span class="element"> ' . $element->getElementHtml(); diff --git a/app/code/Magento/Rule/Block/Newchild.php b/app/code/Magento/Rule/Block/Newchild.php index eb99333e2b5d669e9af348bfd37f933c04f619a2..02ac9061005a65d213ded0af0517f2b9bb648c59 100644 --- a/app/code/Magento/Rule/Block/Newchild.php +++ b/app/code/Magento/Rule/Block/Newchild.php @@ -27,7 +27,7 @@ namespace Magento\Rule\Block; -class Newchild extends \Magento\Core\Block\AbstractBlock +class Newchild extends \Magento\View\Block\AbstractBlock implements \Magento\Data\Form\Element\Renderer\RendererInterface { public function render(\Magento\Data\Form\Element\AbstractElement $element) diff --git a/app/code/Magento/Rule/Block/Rule.php b/app/code/Magento/Rule/Block/Rule.php index 7d563fcffb0434c7fd0b8274def2c89643bb15bb..3659b7b8621ef8696de8c27ebf702b4d9965b68b 100644 --- a/app/code/Magento/Rule/Block/Rule.php +++ b/app/code/Magento/Rule/Block/Rule.php @@ -27,7 +27,7 @@ namespace Magento\Rule\Block; -class Rule extends \Magento\Core\Block\AbstractBlock +class Rule extends \Magento\View\Block\AbstractBlock { } diff --git a/app/code/Magento/Rule/Helper/Data.php b/app/code/Magento/Rule/Helper/Data.php index a658c50590fa66aed76ed876e6aab03ad2730ecc..377148a3ad54903818521ccd2483f91ca07228ad 100644 --- a/app/code/Magento/Rule/Helper/Data.php +++ b/app/code/Magento/Rule/Helper/Data.php @@ -29,7 +29,7 @@ */ namespace Magento\Rule\Helper; -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { } diff --git a/app/code/Magento/Sales/Block/Adminhtml/Billing/Agreement/Grid.php b/app/code/Magento/Sales/Block/Adminhtml/Billing/Agreement/Grid.php index 7cae051afb9c67398bd90d40bf92b7dd8a73967b..f0afe1c4215356a2c5e11c44386defbe8c7deba1 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Billing/Agreement/Grid.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Billing/Agreement/Grid.php @@ -50,30 +50,28 @@ class Grid extends \Magento\Adminhtml\Block\Widget\Grid */ protected $_agreementModel; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Payment\Helper\Data $paymentData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param \Magento\Sales\Model\Resource\Billing\Agreement\CollectionFactory $agreementFactory - * @param \Magento\Sales\Model\Billing\Agreement $agreementModel - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Payment\Helper\Data $paymentData + * @param \Magento\Sales\Model\Resource\Billing\Agreement\CollectionFactory $agreementFactory + * @param \Magento\Sales\Model\Billing\Agreement $agreementModel + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Payment\Helper\Data $paymentData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - \Magento\Sales\Model\Resource\Billing\Agreement\CollectionFactory $agreementFactory, - \Magento\Sales\Model\Billing\Agreement $agreementModel, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Payment\Helper\Data $paymentData, + \Magento\Sales\Model\Resource\Billing\Agreement\CollectionFactory $agreementFactory, + \Magento\Sales\Model\Billing\Agreement $agreementModel, + array $data = array() + ) { $this->_paymentData = $paymentData; $this->_agreementFactory = $agreementFactory; $this->_agreementModel = $agreementModel; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $data); } /** diff --git a/app/code/Magento/Sales/Block/Adminhtml/Billing/Agreement/View.php b/app/code/Magento/Sales/Block/Adminhtml/Billing/Agreement/View.php index 29e0d14236159e05d6e5329528f537edabad5f7a..ab80e19e79588334dacaa6d21906c47b626d68fa 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Billing/Agreement/View.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Billing/Agreement/View.php @@ -40,20 +40,20 @@ class View extends \Magento\Backend\Block\Widget\Form\Container */ protected $_coreRegistry = null; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Sales/Block/Adminhtml/Billing/Agreement/View/Tab/Info.php b/app/code/Magento/Sales/Block/Adminhtml/Billing/Agreement/View/Tab/Info.php index 12d4b2466a307af6eb4575b308f2ec8b0740927b..c58dbc5fdfd31dcc3fe1e9e43d9a49baea785e89 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Billing/Agreement/View/Tab/Info.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Billing/Agreement/View/Tab/Info.php @@ -50,23 +50,23 @@ class Info extends \Magento\Backend\Block\Template */ protected $_customerFactory; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Customer\Model\CustomerFactory $customerFactory - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Customer\Model\CustomerFactory $customerFactory + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - \Magento\Customer\Model\CustomerFactory $customerFactory, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Customer\Model\CustomerFactory $customerFactory, + array $data = array() + ) { $this->_coreRegistry = $registry; $this->_customerFactory = $customerFactory; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Sales/Block/Adminhtml/Billing/Agreement/View/Tab/Orders.php b/app/code/Magento/Sales/Block/Adminhtml/Billing/Agreement/View/Tab/Orders.php index ae9b1b85bfdab928dfd8d48b512302bb8057631c..a870799ddf68e29d02d35612f3294343662d41fc 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Billing/Agreement/View/Tab/Orders.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Billing/Agreement/View/Tab/Orders.php @@ -31,7 +31,7 @@ */ namespace Magento\Sales\Block\Adminhtml\Billing\Agreement\View\Tab; -class Orders extends \Magento\Core\Block\Text\ListText +class Orders extends \Magento\View\Block\Text\ListText implements \Magento\Backend\Block\Widget\Tab\TabInterface { diff --git a/app/code/Magento/Sales/Block/Adminhtml/Creditmemo/Grid.php b/app/code/Magento/Sales/Block/Adminhtml/Creditmemo/Grid.php index bb414e6450be50a5a28f850e49dcf0b380a4be75..0f490d411e8f5053e0620c8d2e3af185dbed0840 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Creditmemo/Grid.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Creditmemo/Grid.php @@ -43,27 +43,25 @@ class Grid extends \Magento\Adminhtml\Block\Widget\Grid */ protected $_creditmemoFactory; - /** - * @param \Magento\Sales\Model\Order\CreditmemoFactory $creditmemoFactory - * @param \Magento\Sales\Model\Resource\Order\Creditmemo\Grid\CollectionFactory $collectionFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Sales\Model\Order\CreditmemoFactory $creditmemoFactory + * @param \Magento\Sales\Model\Resource\Order\Creditmemo\Grid\CollectionFactory $collectionFactory + * @param array $data */ - public function __construct( - \Magento\Sales\Model\Order\CreditmemoFactory $creditmemoFactory, - \Magento\Sales\Model\Resource\Order\Creditmemo\Grid\CollectionFactory $collectionFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Sales\Model\Order\CreditmemoFactory $creditmemoFactory, + \Magento\Sales\Model\Resource\Order\Creditmemo\Grid\CollectionFactory $collectionFactory, + array $data = array() + ) { $this->_creditmemoFactory = $creditmemoFactory; $this->_collectionFactory = $collectionFactory; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $data); } protected function _construct() diff --git a/app/code/Magento/Sales/Block/Adminhtml/Customer/Edit/Tab/Agreement.php b/app/code/Magento/Sales/Block/Adminhtml/Customer/Edit/Tab/Agreement.php index a91b35a808c4da5406ba4179e70db7811c0d0ab3..4315d23149ec645849d277c68e5f4e827af81413 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Customer/Edit/Tab/Agreement.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Customer/Edit/Tab/Agreement.php @@ -49,39 +49,28 @@ class Agreement */ protected $_coreRegistry = null; - /** - * @param \Magento\Core\Model\Registry $coreRegistry - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Payment\Helper\Data $paymentData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param \Magento\Sales\Model\Resource\Billing\Agreement\CollectionFactory $agreementFactory - * @param \Magento\Sales\Model\Billing\Agreement $agreementModel - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Payment\Helper\Data $paymentData + * @param \Magento\Sales\Model\Resource\Billing\Agreement\CollectionFactory $agreementFactory + * @param \Magento\Sales\Model\Billing\Agreement $agreementModel + * @param \Magento\Core\Model\Registry $coreRegistry + * @param array $data */ - public function __construct( - \Magento\Core\Model\Registry $coreRegistry, - \Magento\Core\Helper\Data $coreData, - \Magento\Payment\Helper\Data $paymentData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - \Magento\Sales\Model\Resource\Billing\Agreement\CollectionFactory $agreementFactory, - \Magento\Sales\Model\Billing\Agreement $agreementModel, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Payment\Helper\Data $paymentData, + \Magento\Sales\Model\Resource\Billing\Agreement\CollectionFactory $agreementFactory, + \Magento\Sales\Model\Billing\Agreement $agreementModel, + \Magento\Core\Model\Registry $coreRegistry, + array $data = array() + ) { $this->_coreRegistry = $coreRegistry; - parent::__construct( - $coreData, - $paymentData, - $context, - $storeManager, - $urlModel, - $agreementFactory, - $agreementModel, - $data - ); + parent::__construct($context, $coreData, $urlModel, $paymentData, $agreementFactory, $agreementModel, $data); } /** diff --git a/app/code/Magento/Sales/Block/Adminhtml/Customer/Edit/Tab/Recurring/Profile.php b/app/code/Magento/Sales/Block/Adminhtml/Customer/Edit/Tab/Recurring/Profile.php index 82100228ec118bf594b5ddcbffa92f2222089ab8..0b32b7384751b1105e2307fcde3b2a4a3ade0b49 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Customer/Edit/Tab/Recurring/Profile.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Customer/Edit/Tab/Recurring/Profile.php @@ -42,39 +42,28 @@ class Profile */ protected $_coreRegistry = null; - /** - * @param \Magento\Core\Model\Registry $coreRegistry - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Payment\Helper\Data $paymentData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param \Magento\Sales\Model\Resource\Recurring\Profile\CollectionFactory $profileCollection - * @param \Magento\Sales\Model\Recurring\ProfileFactory $recurringProfile - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Payment\Helper\Data $paymentData + * @param \Magento\Sales\Model\Resource\Recurring\Profile\CollectionFactory $profileCollection + * @param \Magento\Sales\Model\Recurring\ProfileFactory $recurringProfile + * @param \Magento\Core\Model\Registry $coreRegistry + * @param array $data */ - public function __construct( - \Magento\Core\Model\Registry $coreRegistry, - \Magento\Core\Helper\Data $coreData, - \Magento\Payment\Helper\Data $paymentData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - \Magento\Sales\Model\Resource\Recurring\Profile\CollectionFactory $profileCollection, - \Magento\Sales\Model\Recurring\ProfileFactory $recurringProfile, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Payment\Helper\Data $paymentData, + \Magento\Sales\Model\Resource\Recurring\Profile\CollectionFactory $profileCollection, + \Magento\Sales\Model\Recurring\ProfileFactory $recurringProfile, + \Magento\Core\Model\Registry $coreRegistry, + array $data = array() + ) { $this->_coreRegistry = $coreRegistry; - parent::__construct( - $coreData, - $paymentData, - $context, - $storeManager, - $urlModel, - $profileCollection, - $recurringProfile, - $data - ); + parent::__construct($context, $coreData, $urlModel, $paymentData, $profileCollection, $recurringProfile, $data); } /** diff --git a/app/code/Magento/Sales/Block/Adminhtml/Invoice/Grid.php b/app/code/Magento/Sales/Block/Adminhtml/Invoice/Grid.php index 7e2e8e984564ca09330aead15474a73386314347..171a82cf5792d0c42d06eacd6c129c76fddb625f 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Invoice/Grid.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Invoice/Grid.php @@ -43,27 +43,25 @@ class Grid extends \Magento\Adminhtml\Block\Widget\Grid */ protected $_invoiceFactory; - /** - * @param \Magento\Sales\Model\Order\InvoiceFactory $invoiceFactory - * @param \Magento\Sales\Model\Resource\Order\Invoice\Grid\CollectionFactory $collectionFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Sales\Model\Order\InvoiceFactory $invoiceFactory + * @param \Magento\Sales\Model\Resource\Order\Invoice\Grid\CollectionFactory $collectionFactory + * @param array $data */ - public function __construct( - \Magento\Sales\Model\Order\InvoiceFactory $invoiceFactory, - \Magento\Sales\Model\Resource\Order\Invoice\Grid\CollectionFactory $collectionFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Sales\Model\Order\InvoiceFactory $invoiceFactory, + \Magento\Sales\Model\Resource\Order\Invoice\Grid\CollectionFactory $collectionFactory, + array $data = array() + ) { $this->_invoiceFactory = $invoiceFactory; $this->_collectionFactory = $collectionFactory; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $data); } protected function _construct() diff --git a/app/code/Magento/Sales/Block/Adminhtml/Items/AbstractItems.php b/app/code/Magento/Sales/Block/Adminhtml/Items/AbstractItems.php index 0f72f8e7233b8d17666da14cf833458be11ffa3e..6fa5f43c2895ba990ff537a9908caf1c62844c4e 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Items/AbstractItems.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Items/AbstractItems.php @@ -65,23 +65,23 @@ class AbstractItems extends \Magento\Backend\Block\Template */ protected $_productFactory; - /** - * @param \Magento\Catalog\Model\ProductFactory $productFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data - */ - public function __construct( - \Magento\Catalog\Model\ProductFactory $productFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Catalog\Model\ProductFactory $productFactory + * @param \Magento\Core\Model\Registry $registry + * @param array $data + */ + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Catalog\Model\ProductFactory $productFactory, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_productFactory = $productFactory; $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** @@ -106,7 +106,7 @@ class AbstractItems extends \Magento\Backend\Block\Template * Retrieve item renderer block * * @param string $type - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock * @throws \RuntimeException */ public function getItemRenderer($type) @@ -126,7 +126,7 @@ class AbstractItems extends \Magento\Backend\Block\Template * * @param string $column * @param string $compositePart - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ public function getColumnRenderer($column, $compositePart = '') { diff --git a/app/code/Magento/Sales/Block/Adminhtml/Items/Column/DefaultColumn.php b/app/code/Magento/Sales/Block/Adminhtml/Items/Column/DefaultColumn.php index 1423103c04824acdd78e5dbfdea73e87ec650037..aad4ddb678c1560f2a9dd7ff5f9df90ef48e11ef 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Items/Column/DefaultColumn.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Items/Column/DefaultColumn.php @@ -41,20 +41,20 @@ class DefaultColumn extends \Magento\Adminhtml\Block\Template */ protected $_optionFactory; - /** - * @param \Magento\Catalog\Model\Product\OptionFactory $optionFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Catalog\Model\Product\OptionFactory $optionFactory + * @param array $data */ - public function __construct( - \Magento\Catalog\Model\Product\OptionFactory $optionFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Catalog\Model\Product\OptionFactory $optionFactory, + array $data = array() + ) { $this->_optionFactory = $optionFactory; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } diff --git a/app/code/Magento/Sales/Block/Adminhtml/Items/Column/Name.php b/app/code/Magento/Sales/Block/Adminhtml/Items/Column/Name.php index 1a0c85d96bd47b272f9cbffea06d31c93cf0f9aa..3a08b06e2611457b3255040a925850d27d119c02 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Items/Column/Name.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Items/Column/Name.php @@ -31,31 +31,6 @@ namespace Magento\Sales\Block\Adminhtml\Items\Column; */ class Name extends \Magento\Sales\Block\Adminhtml\Items\Column\DefaultColumn { - /** - * Core string - * - * @var \Magento\Filter\FilterManager - */ - protected $filter; - - /** - * @param \Magento\Catalog\Model\Product\OptionFactory $optionFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Filter\FilterManager $filter - * @param array $data - */ - public function __construct( - \Magento\Catalog\Model\Product\OptionFactory $optionFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Filter\FilterManager $filter, - array $data = array() - ) { - $this->filter = $filter; - parent::__construct($optionFactory, $coreData, $context, $data); - } - /** * Truncate string * @@ -68,7 +43,7 @@ class Name extends \Magento\Sales\Block\Adminhtml\Items\Column\DefaultColumn */ public function truncateString($value, $length = 80, $etc = '...', &$remainder = '', $breakWords = true) { - return $this->filter->truncate($value, array( + return $this->filterManager->truncate($value, array( 'length' => $length, 'etc' => $etc, 'remainder' => $remainder, diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/AbstractOrder.php b/app/code/Magento/Sales/Block/Adminhtml/Order/AbstractOrder.php index 7d309cc687296b9388b3ae91678cd334a7c4a032..62f1a861e18ece2ccbae254e00e88e6961b84907 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/AbstractOrder.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/AbstractOrder.php @@ -42,20 +42,20 @@ class AbstractOrder extends \Magento\Adminhtml\Block\Widget */ protected $_coreRegistry = null; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Address.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Address.php index 1b118ed2b7e984d8f679a82a034e561742327eae..2f67b1db59b9016c4ca0ce12d7edc5c5ec41faa2 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Address.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Address.php @@ -38,20 +38,20 @@ class Address extends \Magento\Adminhtml\Block\Widget\Form\Container */ protected $_coreRegistry = null; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _construct() diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Address/Form.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Address/Form.php index fc9c515019602ce3e4bd9dcabf76fbbc511e15a8..6f48f0ad4bdfd3a19cc6cb7cdd01866a9d27e9d2 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Address/Form.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Address/Form.php @@ -45,36 +45,41 @@ class Form */ protected $_coreRegistry = null; - /** - * @param \Magento\Customer\Model\AddressFactory $addressFactory - * @param \Magento\Customer\Model\FormFactory $customerFormFactory - * @param \Magento\Adminhtml\Helper\Addresses $adminhtmlAddresses - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote - * @param \Magento\Sales\Model\AdminOrder\Create $orderCreate - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data - * - * @SuppressWarnings(PHPMD.ExcessiveParameterList) + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote + * @param \Magento\Sales\Model\AdminOrder\Create $orderCreate + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Customer\Model\AddressFactory $addressFactory + * @param \Magento\Customer\Model\FormFactory $customerFormFactory + * @param \Magento\Adminhtml\Helper\Addresses $adminhtmlAddresses + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Customer\Model\AddressFactory $addressFactory, - \Magento\Customer\Model\FormFactory $customerFormFactory, - \Magento\Adminhtml\Helper\Addresses $adminhtmlAddresses, - \Magento\Data\FormFactory $formFactory, - \Magento\Adminhtml\Model\Session\Quote $sessionQuote, - \Magento\Sales\Model\AdminOrder\Create $orderCreate, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Adminhtml\Model\Session\Quote $sessionQuote, + \Magento\Sales\Model\AdminOrder\Create $orderCreate, + \Magento\Data\FormFactory $formFactory, + \Magento\Customer\Model\AddressFactory $addressFactory, + \Magento\Customer\Model\FormFactory $customerFormFactory, + \Magento\Adminhtml\Helper\Addresses $adminhtmlAddresses, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; - parent::__construct( - $addressFactory, $customerFormFactory, $adminhtmlAddresses, $formFactory, - $sessionQuote, $orderCreate, $coreData, $context, $data + parent::__construct( + $context, + $coreData, + $sessionQuote, + $orderCreate, + $formFactory, + $addressFactory, + $customerFormFactory, + $adminhtmlAddresses, + $data ); } diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Comments/View.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Comments/View.php index 7fb87d631616d05e80f8efc7a8eb3ed7e92ad8d1..210171e8a8838a3288dc7102964da3263dd62a21 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Comments/View.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Comments/View.php @@ -42,20 +42,20 @@ class View extends \Magento\Adminhtml\Block\Template */ protected $_salesData = null; - /** - * @param \Magento\Sales\Helper\Data $salesData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Sales\Helper\Data $salesData + * @param array $data */ - public function __construct( - \Magento\Sales\Helper\Data $salesData, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Sales\Helper\Data $salesData, + array $data = array() + ) { $this->_salesData = $salesData; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create.php index 0ab9282489286d45f36597d580ddc528b131b175..d47f24cee543517f2979bf6279405cc8f84db14c 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create.php @@ -41,20 +41,20 @@ class Create extends \Magento\Adminhtml\Block\Widget\Form\Container */ protected $_sessionQuote; - /** - * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote + * @param array $data */ - public function __construct( - \Magento\Adminhtml\Model\Session\Quote $sessionQuote, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Adminhtml\Model\Session\Quote $sessionQuote, + array $data = array() + ) { $this->_sessionQuote = $sessionQuote; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _construct() diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/AbstractCreate.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/AbstractCreate.php index 136078057a02980a788bc843579b62973c6c8c2c..2204c7df2823a4eb0a276bbddafe69eb715f5c9a 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/AbstractCreate.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/AbstractCreate.php @@ -45,16 +45,16 @@ abstract class AbstractCreate extends \Magento\Backend\Block\Widget */ protected $_orderCreate; - public function __construct( - \Magento\Adminhtml\Model\Session\Quote $sessionQuote, - \Magento\Sales\Model\AdminOrder\Create $orderCreate, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Adminhtml\Model\Session\Quote $sessionQuote, + \Magento\Sales\Model\AdminOrder\Create $orderCreate, + array $data = array() + ) { $this->_sessionQuote = $sessionQuote; $this->_orderCreate = $orderCreate; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Billing/Method/Form.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Billing/Method/Form.php index 4fea531412e0a0816662ecc176ced7651a2d68b7..4ab31bd7ceff7656788b077ad429a72150e8bc62 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Billing/Method/Form.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Billing/Method/Form.php @@ -41,19 +41,19 @@ class Form extends \Magento\Payment\Block\Form\Container protected $_sessionQuote; /** - * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context + * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote * @param array $data */ public function __construct( - \Magento\Adminhtml\Model\Session\Quote $sessionQuote, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, + \Magento\Adminhtml\Model\Session\Quote $sessionQuote, array $data = array() ) { $this->_sessionQuote = $sessionQuote; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Data.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Data.php index bc6ad105fb7ccca96b50a2db4fefd5469cdbd660..4a781628b99ceefcf010416ad46a6f65c3739695 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Data.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Data.php @@ -40,24 +40,24 @@ class Data extends \Magento\Sales\Block\Adminhtml\Order\Create\AbstractCreate */ protected $_currencyFactory; - /** - * @param \Magento\Directory\Model\CurrencyFactory $currencyFactory - * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote - * @param \Magento\Sales\Model\AdminOrder\Create $orderCreate - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote + * @param \Magento\Sales\Model\AdminOrder\Create $orderCreate + * @param \Magento\Directory\Model\CurrencyFactory $currencyFactory + * @param array $data */ - public function __construct( - \Magento\Directory\Model\CurrencyFactory $currencyFactory, - \Magento\Adminhtml\Model\Session\Quote $sessionQuote, - \Magento\Sales\Model\AdminOrder\Create $orderCreate, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Adminhtml\Model\Session\Quote $sessionQuote, + \Magento\Sales\Model\AdminOrder\Create $orderCreate, + \Magento\Directory\Model\CurrencyFactory $currencyFactory, + array $data = array() + ) { $this->_currencyFactory = $currencyFactory; - parent::__construct($sessionQuote, $orderCreate, $coreData, $context, $data); + parent::__construct($context, $coreData, $sessionQuote, $orderCreate, $data); } /** diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form.php index 70ab2f74d0dd9123e7cb0082964544c45e54271f..85e0b429c21de7311fd41ef1aba0d630de745584 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form.php @@ -41,24 +41,24 @@ class Form extends \Magento\Sales\Block\Adminhtml\Order\Create\AbstractCreate */ protected $_customerFormFactory; - /** - * @param \Magento\Customer\Model\FormFactory $customerFormFactory - * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote - * @param \Magento\Sales\Model\AdminOrder\Create $orderCreate - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote + * @param \Magento\Sales\Model\AdminOrder\Create $orderCreate + * @param \Magento\Customer\Model\FormFactory $customerFormFactory + * @param array $data */ - public function __construct( - \Magento\Customer\Model\FormFactory $customerFormFactory, - \Magento\Adminhtml\Model\Session\Quote $sessionQuote, - \Magento\Sales\Model\AdminOrder\Create $orderCreate, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Adminhtml\Model\Session\Quote $sessionQuote, + \Magento\Sales\Model\AdminOrder\Create $orderCreate, + \Magento\Customer\Model\FormFactory $customerFormFactory, + array $data = array() + ) { $this->_customerFormFactory = $customerFormFactory; - parent::__construct($sessionQuote, $orderCreate, $coreData, $context, $data); + parent::__construct($context, $coreData, $sessionQuote, $orderCreate, $data); } protected function _construct() diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/AbstractForm.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/AbstractForm.php index 826fe3f5870cfb666a452fcbc31f6a54547b9338..8a85c7f3b21364a5e5e55931f1e76e6faa1fe8a6 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/AbstractForm.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/AbstractForm.php @@ -49,24 +49,24 @@ abstract class AbstractForm */ protected $_form; - /** - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote - * @param \Magento\Sales\Model\AdminOrder\Create $orderCreate - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote + * @param \Magento\Sales\Model\AdminOrder\Create $orderCreate + * @param \Magento\Data\FormFactory $formFactory + * @param array $data */ - public function __construct( - \Magento\Data\FormFactory $formFactory, - \Magento\Adminhtml\Model\Session\Quote $sessionQuote, - \Magento\Sales\Model\AdminOrder\Create $orderCreate, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Adminhtml\Model\Session\Quote $sessionQuote, + \Magento\Sales\Model\AdminOrder\Create $orderCreate, + \Magento\Data\FormFactory $formFactory, + array $data = array() + ) { $this->_formFactory = $formFactory; - parent::__construct($sessionQuote, $orderCreate, $coreData, $context, $data); + parent::__construct($context, $coreData, $sessionQuote, $orderCreate, $data); } /** diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php index 7d1f082a730bae9a3211df7a96284877ff10be34..f66e3168ee586a72dfdefe7ae756d6977b751efd 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php @@ -43,29 +43,29 @@ class Account extends \Magento\Sales\Block\Adminhtml\Order\Create\Form\AbstractF */ protected $_customerFormFactory; - /** - * @param \Magento\Customer\Model\CustomerFactory $customerFactory - * @param \Magento\Customer\Model\FormFactory $customerFormFactory - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote - * @param \Magento\Sales\Model\AdminOrder\Create $orderCreate - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote + * @param \Magento\Sales\Model\AdminOrder\Create $orderCreate + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Customer\Model\CustomerFactory $customerFactory + * @param \Magento\Customer\Model\FormFactory $customerFormFactory + * @param array $data */ - public function __construct( - \Magento\Customer\Model\CustomerFactory $customerFactory, - \Magento\Customer\Model\FormFactory $customerFormFactory, - \Magento\Data\FormFactory $formFactory, - \Magento\Adminhtml\Model\Session\Quote $sessionQuote, - \Magento\Sales\Model\AdminOrder\Create $orderCreate, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Adminhtml\Model\Session\Quote $sessionQuote, + \Magento\Sales\Model\AdminOrder\Create $orderCreate, + \Magento\Data\FormFactory $formFactory, + \Magento\Customer\Model\CustomerFactory $customerFactory, + \Magento\Customer\Model\FormFactory $customerFormFactory, + array $data = array() + ) { $this->_customerFactory = $customerFactory; $this->_customerFormFactory = $customerFormFactory; - parent::__construct($formFactory, $sessionQuote, $orderCreate, $coreData, $context, $data); + parent::__construct($context, $coreData, $sessionQuote, $orderCreate, $formFactory, $data); } /** diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Address.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Address.php index d266e9182040e5d392cf547c33e54a8d4274578a..d4c7fcf7fd477b92d3df2dcb495e5e7ef796af8f 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Address.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Address.php @@ -60,32 +60,32 @@ class Address */ protected $_customerFormFactory; - /** - * @param \Magento\Customer\Model\AddressFactory $addressFactory - * @param \Magento\Customer\Model\FormFactory $customerFormFactory - * @param \Magento\Adminhtml\Helper\Addresses $adminhtmlAddresses - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote - * @param \Magento\Sales\Model\AdminOrder\Create $orderCreate - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote + * @param \Magento\Sales\Model\AdminOrder\Create $orderCreate + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Customer\Model\AddressFactory $addressFactory + * @param \Magento\Customer\Model\FormFactory $customerFormFactory + * @param \Magento\Adminhtml\Helper\Addresses $adminhtmlAddresses + * @param array $data */ - public function __construct( - \Magento\Customer\Model\AddressFactory $addressFactory, - \Magento\Customer\Model\FormFactory $customerFormFactory, - \Magento\Adminhtml\Helper\Addresses $adminhtmlAddresses, - \Magento\Data\FormFactory $formFactory, - \Magento\Adminhtml\Model\Session\Quote $sessionQuote, - \Magento\Sales\Model\AdminOrder\Create $orderCreate, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Adminhtml\Model\Session\Quote $sessionQuote, + \Magento\Sales\Model\AdminOrder\Create $orderCreate, + \Magento\Data\FormFactory $formFactory, + \Magento\Customer\Model\AddressFactory $addressFactory, + \Magento\Customer\Model\FormFactory $customerFormFactory, + \Magento\Adminhtml\Helper\Addresses $adminhtmlAddresses, + array $data = array() + ) { $this->_addressFactory = $addressFactory; $this->_customerFormFactory = $customerFormFactory; $this->_adminhtmlAddresses = $adminhtmlAddresses; - parent::__construct($formFactory, $sessionQuote, $orderCreate, $coreData, $context, $data); + parent::__construct($context, $coreData, $sessionQuote, $orderCreate, $formFactory, $data); } /** diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Giftmessage.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Giftmessage.php index d6449a662ea03c2f30202def0c04c516ad6f1edf..56d2bf809de2307a232a9d35bde33eba65ac86fe 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Giftmessage.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Giftmessage.php @@ -41,24 +41,24 @@ class Giftmessage extends \Magento\Sales\Block\Adminhtml\Order\Create\AbstractCr */ protected $_giftMessageSave; - /** - * @param \Magento\Adminhtml\Model\Giftmessage\Save $giftMessageSave - * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote - * @param \Magento\Sales\Model\AdminOrder\Create $orderCreate - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote + * @param \Magento\Sales\Model\AdminOrder\Create $orderCreate + * @param \Magento\Adminhtml\Model\Giftmessage\Save $giftMessageSave + * @param array $data */ - public function __construct( - \Magento\Adminhtml\Model\Giftmessage\Save $giftMessageSave, - \Magento\Adminhtml\Model\Session\Quote $sessionQuote, - \Magento\Sales\Model\AdminOrder\Create $orderCreate, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Adminhtml\Model\Session\Quote $sessionQuote, + \Magento\Sales\Model\AdminOrder\Create $orderCreate, + \Magento\Adminhtml\Model\Giftmessage\Save $giftMessageSave, + array $data = array() + ) { $this->_giftMessageSave = $giftMessageSave; - parent::__construct($sessionQuote, $orderCreate, $coreData, $context, $data); + parent::__construct($context, $coreData, $sessionQuote, $orderCreate, $data); } /** diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Giftmessage/Form.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Giftmessage/Form.php index 0ce354e5cfa24dc4b131f295a5ecae1ae3e85831..28abeafbe589daefcc5f88ad3d18337ffb709b73 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Giftmessage/Form.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Giftmessage/Form.php @@ -58,24 +58,24 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic */ protected $_sessionQuote; - /** - * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote + * @param array $data */ - public function __construct( - \Magento\Adminhtml\Model\Session\Quote $sessionQuote, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Adminhtml\Model\Session\Quote $sessionQuote, + array $data = array() + ) { $this->_sessionQuote = $sessionQuote; - parent::__construct($registry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); } /** diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Items/Grid.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Items/Grid.php index ffcc0bb9a874ddde53dc500d7c35dcee2d1f9a61..12718d2f4c9b1619c97bae15eb63cf265edbf50c 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Items/Grid.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Items/Grid.php @@ -64,33 +64,33 @@ class Grid extends \Magento\Sales\Block\Adminhtml\Order\Create\AbstractCreate */ protected $_taxConfig; - /** - * @param \Magento\Wishlist\Model\WishlistFactory $wishlistFactory - * @param \Magento\Adminhtml\Model\Giftmessage\Save $giftMessageSave - * @param \Magento\Tax\Model\Config $taxConfig - * @param \Magento\Tax\Helper\Data $taxData - * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote - * @param \Magento\Sales\Model\AdminOrder\Create $orderCreate - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote + * @param \Magento\Sales\Model\AdminOrder\Create $orderCreate + * @param \Magento\Wishlist\Model\WishlistFactory $wishlistFactory + * @param \Magento\Adminhtml\Model\Giftmessage\Save $giftMessageSave + * @param \Magento\Tax\Model\Config $taxConfig + * @param \Magento\Tax\Helper\Data $taxData + * @param array $data */ - public function __construct( - \Magento\Wishlist\Model\WishlistFactory $wishlistFactory, - \Magento\Adminhtml\Model\Giftmessage\Save $giftMessageSave, - \Magento\Tax\Model\Config $taxConfig, - \Magento\Tax\Helper\Data $taxData, - \Magento\Adminhtml\Model\Session\Quote $sessionQuote, - \Magento\Sales\Model\AdminOrder\Create $orderCreate, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Adminhtml\Model\Session\Quote $sessionQuote, + \Magento\Sales\Model\AdminOrder\Create $orderCreate, + \Magento\Wishlist\Model\WishlistFactory $wishlistFactory, + \Magento\Adminhtml\Model\Giftmessage\Save $giftMessageSave, + \Magento\Tax\Model\Config $taxConfig, + \Magento\Tax\Helper\Data $taxData, + array $data = array() + ) { $this->_wishlistFactory = $wishlistFactory; $this->_giftMessageSave = $giftMessageSave; $this->_taxConfig = $taxConfig; $this->_taxData = $taxData; - parent::__construct($sessionQuote, $orderCreate, $coreData, $context, $data); + parent::__construct($context, $coreData, $sessionQuote, $orderCreate, $data); } protected function _construct() @@ -427,7 +427,7 @@ class Grid extends \Magento\Sales\Block\Adminhtml\Order\Create\AbstractCreate * Get order item extra info block * * @param \Magento\Sales\Model\Quote\Item $item - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ public function getItemExtraInfo($item) { diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Load.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Load.php index ea339ba48e7aaa6a95ff0f381da25cc97a76486f..ee4283a7040315dcff9736673b99c154e8223927 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Load.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Load.php @@ -34,7 +34,7 @@ */ namespace Magento\Sales\Block\Adminhtml\Order\Create; -class Load extends \Magento\Core\Block\Template +class Load extends \Magento\View\Block\Template { /** * Adminhtml js @@ -44,19 +44,19 @@ class Load extends \Magento\Core\Block\Template protected $_adminhtmlJs = null; /** - * @param \Magento\Adminhtml\Helper\Js $adminhtmlJs + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context + * @param \Magento\Adminhtml\Helper\Js $adminhtmlJs * @param array $data */ public function __construct( - \Magento\Adminhtml\Helper\Js $adminhtmlJs, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, + \Magento\Adminhtml\Helper\Js $adminhtmlJs, array $data = array() ) { $this->_adminhtmlJs = $adminhtmlJs; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _toHtml() diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Messages.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Messages.php index 357ffd8e4db8e7388d110b46c35eda72969d1307..f786140b08a7c3967178f72992e509dcf750f0e0 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Messages.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Messages.php @@ -38,34 +38,34 @@ class Messages extends \Magento\Adminhtml\Block\Messages /** * @var \Magento\Adminhtml\Model\Session\Quote */ - protected $_sessionQuote; + protected $sessionQuote; /** - * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context - * @param \Magento\Core\Model\Message $message - * @param \Magento\Core\Model\Message\CollectionFactory $messageFactory + * @param \Magento\Message\Factory $messageFactory + * @param \Magento\Message\CollectionFactory $collectionFactory + * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote * @param array $data */ public function __construct( - \Magento\Adminhtml\Model\Session\Quote $sessionQuote, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, - \Magento\Core\Model\Message $message, - \Magento\Core\Model\Message\CollectionFactory $messageFactory, + \Magento\Message\Factory $messageFactory, + \Magento\Message\CollectionFactory $collectionFactory, + \Magento\Adminhtml\Model\Session\Quote $sessionQuote, array $data = array() ) { - $this->_sessionQuote = $sessionQuote; - parent::__construct($coreData, $context, $message, $messageFactory, $data); + $this->sessionQuote = $sessionQuote; + parent::__construct($context, $coreData, $messageFactory, $collectionFactory, $data); } /** - * @return \Magento\Core\Block\Messages + * @return \Magento\View\Block\Messages */ protected function _prepareLayout() { - $this->addMessages($this->_sessionQuote->getMessages(true)); + $this->addMessages($this->sessionQuote->getMessages(true)); parent::_prepareLayout(); } diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Search/Grid.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Search/Grid.php index 0338775e1aed1e3e1a80ee7b680fb638e43fe55b..b3b133a34b826644dad9a98b6920ba9ab222e2be 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Search/Grid.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Search/Grid.php @@ -55,33 +55,31 @@ class Grid extends \Magento\Adminhtml\Block\Widget\Grid */ protected $_productFactory; - /** - * @param \Magento\Catalog\Model\ProductFactory $productFactory - * @param \Magento\Catalog\Model\Config $catalogConfig - * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param \Magento\Sales\Model\Config $salesConfig - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Catalog\Model\ProductFactory $productFactory + * @param \Magento\Catalog\Model\Config $catalogConfig + * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote + * @param \Magento\Sales\Model\Config $salesConfig + * @param array $data */ - public function __construct( - \Magento\Catalog\Model\ProductFactory $productFactory, - \Magento\Catalog\Model\Config $catalogConfig, - \Magento\Adminhtml\Model\Session\Quote $sessionQuote, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - \Magento\Sales\Model\Config $salesConfig, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Catalog\Model\ProductFactory $productFactory, + \Magento\Catalog\Model\Config $catalogConfig, + \Magento\Adminhtml\Model\Session\Quote $sessionQuote, + \Magento\Sales\Model\Config $salesConfig, + array $data = array() + ) { $this->_productFactory = $productFactory; $this->_catalogConfig = $catalogConfig; $this->_sessionQuote = $sessionQuote; $this->_salesConfig = $salesConfig; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $data); } protected function _construct() diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Shipping/Method/Form.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Shipping/Method/Form.php index 4df2017d3b56fdc11b3295b6d0408d9d0ad83984..97c9dbb6a7a0650859baac29149706648ece26b8 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Shipping/Method/Form.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Shipping/Method/Form.php @@ -45,24 +45,24 @@ class Form */ protected $_taxData = null; - /** - * @param \Magento\Tax\Helper\Data $taxData - * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote - * @param \Magento\Sales\Model\AdminOrder\Create $orderCreate - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote + * @param \Magento\Sales\Model\AdminOrder\Create $orderCreate + * @param \Magento\Tax\Helper\Data $taxData + * @param array $data */ - public function __construct( - \Magento\Tax\Helper\Data $taxData, - \Magento\Adminhtml\Model\Session\Quote $sessionQuote, - \Magento\Sales\Model\AdminOrder\Create $orderCreate, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Adminhtml\Model\Session\Quote $sessionQuote, + \Magento\Sales\Model\AdminOrder\Create $orderCreate, + \Magento\Tax\Helper\Data $taxData, + array $data = array() + ) { $this->_taxData = $taxData; - parent::__construct($sessionQuote, $orderCreate, $coreData, $context, $data); + parent::__construct($context, $coreData, $sessionQuote, $orderCreate, $data); } protected function _construct() diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Sidebar/AbstractSidebar.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Sidebar/AbstractSidebar.php index 39e93009ad161d583e4f41c6bfa44c20a02cb324..6a629fa498b5f4b8eabd6e9198eb12a93bece206 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Sidebar/AbstractSidebar.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Sidebar/AbstractSidebar.php @@ -47,23 +47,23 @@ class AbstractSidebar extends \Magento\Sales\Block\Adminhtml\Order\Create\Abstra */ protected $_salesConfig; - /** - * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote - * @param \Magento\Sales\Model\AdminOrder\Create $orderCreate - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Sales\Model\Config $salesConfig - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote + * @param \Magento\Sales\Model\AdminOrder\Create $orderCreate + * @param \Magento\Sales\Model\Config $salesConfig + * @param array $data */ - public function __construct( - \Magento\Adminhtml\Model\Session\Quote $sessionQuote, - \Magento\Sales\Model\AdminOrder\Create $orderCreate, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Sales\Model\Config $salesConfig, - array $data = array() - ) { - parent::__construct($sessionQuote, $orderCreate, $coreData, $context, $data); + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Adminhtml\Model\Session\Quote $sessionQuote, + \Magento\Sales\Model\AdminOrder\Create $orderCreate, + \Magento\Sales\Model\Config $salesConfig, + array $data = array() + ) { + parent::__construct($context, $coreData, $sessionQuote, $orderCreate, $data); $this->_salesConfig = $salesConfig; } diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Sidebar/Pcompared.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Sidebar/Pcompared.php index 7b96ff1e80b0009754126963bfc31a8f4e5281ee..f7bddf65e4a842fb83c73c1478c8f4990a42e41a 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Sidebar/Pcompared.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Sidebar/Pcompared.php @@ -46,29 +46,29 @@ class Pcompared extends \Magento\Sales\Block\Adminhtml\Order\Create\Sidebar\Abst */ protected $_event; - /** - * @param \Magento\Reports\Model\Resource\Event $event - * @param \Magento\Catalog\Model\ProductFactory $productFactory - * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote - * @param \Magento\Sales\Model\AdminOrder\Create $orderCreate - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Sales\Model\Config $salesConfig - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote + * @param \Magento\Sales\Model\AdminOrder\Create $orderCreate + * @param \Magento\Sales\Model\Config $salesConfig + * @param \Magento\Reports\Model\Resource\Event $event + * @param \Magento\Catalog\Model\ProductFactory $productFactory + * @param array $data */ - public function __construct( - \Magento\Reports\Model\Resource\Event $event, - \Magento\Catalog\Model\ProductFactory $productFactory, - \Magento\Adminhtml\Model\Session\Quote $sessionQuote, - \Magento\Sales\Model\AdminOrder\Create $orderCreate, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Sales\Model\Config $salesConfig, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Adminhtml\Model\Session\Quote $sessionQuote, + \Magento\Sales\Model\AdminOrder\Create $orderCreate, + \Magento\Sales\Model\Config $salesConfig, + \Magento\Reports\Model\Resource\Event $event, + \Magento\Catalog\Model\ProductFactory $productFactory, + array $data = array() + ) { $this->_event = $event; $this->_productFactory = $productFactory; - parent::__construct($sessionQuote, $orderCreate, $coreData, $context, $salesConfig, $data); + parent::__construct($context, $coreData, $sessionQuote, $orderCreate, $salesConfig, $data); } protected function _construct() diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Sidebar/Pviewed.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Sidebar/Pviewed.php index 8f00cc5af3d484f48c2d461d49119d1ae179efb8..415a389c163bac9fd5ef2b123e3aa232353ef0c6 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Sidebar/Pviewed.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Sidebar/Pviewed.php @@ -46,29 +46,29 @@ class Pviewed extends \Magento\Sales\Block\Adminhtml\Order\Create\Sidebar\Abstra */ protected $_eventFactory; - /** - * @param \Magento\Reports\Model\EventFactory $eventFactory - * @param \Magento\Catalog\Model\ProductFactory $productFactory - * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote - * @param \Magento\Sales\Model\AdminOrder\Create $orderCreate - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Sales\Model\Config $salesConfig - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote + * @param \Magento\Sales\Model\AdminOrder\Create $orderCreate + * @param \Magento\Sales\Model\Config $salesConfig + * @param \Magento\Reports\Model\EventFactory $eventFactory + * @param \Magento\Catalog\Model\ProductFactory $productFactory + * @param array $data */ - public function __construct( - \Magento\Reports\Model\EventFactory $eventFactory, - \Magento\Catalog\Model\ProductFactory $productFactory, - \Magento\Adminhtml\Model\Session\Quote $sessionQuote, - \Magento\Sales\Model\AdminOrder\Create $orderCreate, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Sales\Model\Config $salesConfig, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Adminhtml\Model\Session\Quote $sessionQuote, + \Magento\Sales\Model\AdminOrder\Create $orderCreate, + \Magento\Sales\Model\Config $salesConfig, + \Magento\Reports\Model\EventFactory $eventFactory, + \Magento\Catalog\Model\ProductFactory $productFactory, + array $data = array() + ) { $this->_eventFactory = $eventFactory; $this->_productFactory = $productFactory; - parent::__construct($sessionQuote, $orderCreate, $coreData, $context, $salesConfig, $data); + parent::__construct($context, $coreData, $sessionQuote, $orderCreate, $salesConfig, $data); } protected function _construct() diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Sidebar/Reorder.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Sidebar/Reorder.php index e60e675b2c0feba3c2a7f8bd5108eb7c2f179066..5e56fe587e7e4ba2582bbe10b752449d1e8c0cf7 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Sidebar/Reorder.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Sidebar/Reorder.php @@ -47,26 +47,26 @@ class Reorder extends \Magento\Sales\Block\Adminhtml\Order\Create\Sidebar\Abstra */ protected $_ordersFactory; - /** - * @param \Magento\Sales\Model\Resource\Order\CollectionFactory $ordersFactory - * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote - * @param \Magento\Sales\Model\AdminOrder\Create $orderCreate - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Sales\Model\Config $salesConfig - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote + * @param \Magento\Sales\Model\AdminOrder\Create $orderCreate + * @param \Magento\Sales\Model\Config $salesConfig + * @param \Magento\Sales\Model\Resource\Order\CollectionFactory $ordersFactory + * @param array $data */ - public function __construct( - \Magento\Sales\Model\Resource\Order\CollectionFactory $ordersFactory, - \Magento\Adminhtml\Model\Session\Quote $sessionQuote, - \Magento\Sales\Model\AdminOrder\Create $orderCreate, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Sales\Model\Config $salesConfig, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Adminhtml\Model\Session\Quote $sessionQuote, + \Magento\Sales\Model\AdminOrder\Create $orderCreate, + \Magento\Sales\Model\Config $salesConfig, + \Magento\Sales\Model\Resource\Order\CollectionFactory $ordersFactory, + array $data = array() + ) { $this->_ordersFactory = $ordersFactory; - parent::__construct($sessionQuote, $orderCreate, $coreData, $context, $salesConfig, $data); + parent::__construct($context, $coreData, $sessionQuote, $orderCreate, $salesConfig, $data); } protected function _construct() diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals.php index 9b3b72e27fc4e29935b5f59fe8b211cf5834aba5..57b0210dfed76344e8da48a280a032c59d745dd2 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals.php @@ -51,27 +51,27 @@ class Totals extends \Magento\Sales\Block\Adminhtml\Order\Create\AbstractCreate */ protected $_salesConfig; - /** - * @param \Magento\Sales\Helper\Data $salesData - * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote - * @param \Magento\Sales\Model\AdminOrder\Create $orderCreate - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Sales\Model\Config $salesConfig - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote + * @param \Magento\Sales\Model\AdminOrder\Create $orderCreate + * @param \Magento\Sales\Helper\Data $salesData + * @param \Magento\Sales\Model\Config $salesConfig + * @param array $data */ - public function __construct( - \Magento\Sales\Helper\Data $salesData, - \Magento\Adminhtml\Model\Session\Quote $sessionQuote, - \Magento\Sales\Model\AdminOrder\Create $orderCreate, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Sales\Model\Config $salesConfig, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Adminhtml\Model\Session\Quote $sessionQuote, + \Magento\Sales\Model\AdminOrder\Create $orderCreate, + \Magento\Sales\Helper\Data $salesData, + \Magento\Sales\Model\Config $salesConfig, + array $data = array() + ) { $this->_salesData = $salesData; $this->_salesConfig = $salesConfig; - parent::__construct($sessionQuote, $orderCreate, $coreData, $context, $data); + parent::__construct($context, $coreData, $sessionQuote, $orderCreate, $data); } protected function _construct() diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Discount.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Discount.php index e90e8ce8d10282bf82d4597108f0a7bd975243a4..953121a3939a912ab7a9a8aff29f64dda4ce2b9d 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Discount.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Discount.php @@ -41,28 +41,28 @@ class Discount extends \Magento\Sales\Block\Adminhtml\Order\Create\Totals\Defaul */ protected $_taxConfig; - /** - * @param \Magento\Tax\Model\Config $taxConfig - * @param \Magento\Sales\Helper\Data $salesData - * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote - * @param \Magento\Sales\Model\AdminOrder\Create $orderCreate - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Sales\Model\Config $salesConfig - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote + * @param \Magento\Sales\Model\AdminOrder\Create $orderCreate + * @param \Magento\Sales\Helper\Data $salesData + * @param \Magento\Sales\Model\Config $salesConfig + * @param \Magento\Tax\Model\Config $taxConfig + * @param array $data */ - public function __construct( - \Magento\Tax\Model\Config $taxConfig, - \Magento\Sales\Helper\Data $salesData, - \Magento\Adminhtml\Model\Session\Quote $sessionQuote, - \Magento\Sales\Model\AdminOrder\Create $orderCreate, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Sales\Model\Config $salesConfig, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Adminhtml\Model\Session\Quote $sessionQuote, + \Magento\Sales\Model\AdminOrder\Create $orderCreate, + \Magento\Sales\Helper\Data $salesData, + \Magento\Sales\Model\Config $salesConfig, + \Magento\Tax\Model\Config $taxConfig, + array $data = array() + ) { $this->_taxConfig = $taxConfig; - parent::__construct($salesData, $sessionQuote, $orderCreate, $coreData, $context, $salesConfig, $data); + parent::__construct($context, $coreData, $sessionQuote, $orderCreate, $salesData, $salesConfig, $data); } public function displayBoth() diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Grandtotal.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Grandtotal.php index af595e7afb4244bd1558bd8c51e829aad455d85b..cc78c772a157641fc1b5030599647a4ed7ea185e 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Grandtotal.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Grandtotal.php @@ -41,28 +41,28 @@ class Grandtotal extends \Magento\Sales\Block\Adminhtml\Order\Create\Totals\Defa */ protected $_taxConfig; - /** - * @param \Magento\Tax\Model\Config $taxConfig - * @param \Magento\Sales\Helper\Data $salesData - * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote - * @param \Magento\Sales\Model\AdminOrder\Create $orderCreate - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Sales\Model\Config $salesConfig - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote + * @param \Magento\Sales\Model\AdminOrder\Create $orderCreate + * @param \Magento\Sales\Helper\Data $salesData + * @param \Magento\Sales\Model\Config $salesConfig + * @param \Magento\Tax\Model\Config $taxConfig + * @param array $data */ - public function __construct( - \Magento\Tax\Model\Config $taxConfig, - \Magento\Sales\Helper\Data $salesData, - \Magento\Adminhtml\Model\Session\Quote $sessionQuote, - \Magento\Sales\Model\AdminOrder\Create $orderCreate, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Sales\Model\Config $salesConfig, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Adminhtml\Model\Session\Quote $sessionQuote, + \Magento\Sales\Model\AdminOrder\Create $orderCreate, + \Magento\Sales\Helper\Data $salesData, + \Magento\Sales\Model\Config $salesConfig, + \Magento\Tax\Model\Config $taxConfig, + array $data = array() + ) { $this->_taxConfig = $taxConfig; - parent::__construct($salesData, $sessionQuote, $orderCreate, $coreData, $context, $salesConfig, $data); + parent::__construct($context, $coreData, $sessionQuote, $orderCreate, $salesData, $salesConfig, $data); } public function includeTax() diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Shipping.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Shipping.php index 07e051782bf256571c5af7c83bab38f5cb5974a8..e880922bdc809da0926e69afee3460e4a68a0b84 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Shipping.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Shipping.php @@ -42,28 +42,28 @@ class Shipping */ protected $_taxConfig; - /** - * @param \Magento\Tax\Model\Config $taxConfig - * @param \Magento\Sales\Helper\Data $salesData - * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote - * @param \Magento\Sales\Model\AdminOrder\Create $orderCreate - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Sales\Model\Config $salesConfig - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote + * @param \Magento\Sales\Model\AdminOrder\Create $orderCreate + * @param \Magento\Sales\Helper\Data $salesData + * @param \Magento\Sales\Model\Config $salesConfig + * @param \Magento\Tax\Model\Config $taxConfig + * @param array $data */ - public function __construct( - \Magento\Tax\Model\Config $taxConfig, - \Magento\Sales\Helper\Data $salesData, - \Magento\Adminhtml\Model\Session\Quote $sessionQuote, - \Magento\Sales\Model\AdminOrder\Create $orderCreate, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Sales\Model\Config $salesConfig, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Adminhtml\Model\Session\Quote $sessionQuote, + \Magento\Sales\Model\AdminOrder\Create $orderCreate, + \Magento\Sales\Helper\Data $salesData, + \Magento\Sales\Model\Config $salesConfig, + \Magento\Tax\Model\Config $taxConfig, + array $data = array() + ) { $this->_taxConfig = $taxConfig; - parent::__construct($salesData, $sessionQuote, $orderCreate, $coreData, $context, $salesConfig, $data); + parent::__construct($context, $coreData, $sessionQuote, $orderCreate, $salesData, $salesConfig, $data); } diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Subtotal.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Subtotal.php index fa1aca5861e4456ea3ac5e4116831ce99e48222d..adc4130d3b2d4938cd72ea1c5972a3a27a2363d6 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Subtotal.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Subtotal.php @@ -41,28 +41,28 @@ class Subtotal extends \Magento\Sales\Block\Adminhtml\Order\Create\Totals\Defaul */ protected $_taxConfig; - /** - * @param \Magento\Tax\Model\Config $taxConfig - * @param \Magento\Sales\Helper\Data $salesData - * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote - * @param \Magento\Sales\Model\AdminOrder\Create $orderCreate - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Sales\Model\Config $salesConfig - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Adminhtml\Model\Session\Quote $sessionQuote + * @param \Magento\Sales\Model\AdminOrder\Create $orderCreate + * @param \Magento\Sales\Helper\Data $salesData + * @param \Magento\Sales\Model\Config $salesConfig + * @param \Magento\Tax\Model\Config $taxConfig + * @param array $data */ - public function __construct( - \Magento\Tax\Model\Config $taxConfig, - \Magento\Sales\Helper\Data $salesData, - \Magento\Adminhtml\Model\Session\Quote $sessionQuote, - \Magento\Sales\Model\AdminOrder\Create $orderCreate, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Sales\Model\Config $salesConfig, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Adminhtml\Model\Session\Quote $sessionQuote, + \Magento\Sales\Model\AdminOrder\Create $orderCreate, + \Magento\Sales\Helper\Data $salesData, + \Magento\Sales\Model\Config $salesConfig, + \Magento\Tax\Model\Config $taxConfig, + array $data = array() + ) { $this->_taxConfig = $taxConfig; - parent::__construct($salesData, $sessionQuote, $orderCreate, $coreData, $context, $salesConfig, $data); + parent::__construct($context, $coreData, $sessionQuote, $orderCreate, $salesData, $salesConfig, $data); } /** diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Creditmemo/Create.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Creditmemo/Create.php index 9ac7b065b7bee456a9bf1e016b3fb58aa05df6b1..f78b111896f5e70494ca6000c61143bce7dcc079 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Creditmemo/Create.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Creditmemo/Create.php @@ -39,20 +39,20 @@ class Create extends \Magento\Adminhtml\Block\Widget\Form\Container */ protected $_coreRegistry = null; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _construct() diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Creditmemo/Create/Adjustments.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Creditmemo/Create/Adjustments.php index 09276f0da24b96becc6cf3b0ecf838b49226d792..f215f7e58e871b74751a0f9ca96df162e9c5c3cd 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Creditmemo/Create/Adjustments.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Creditmemo/Create/Adjustments.php @@ -34,20 +34,20 @@ class Adjustments extends \Magento\Adminhtml\Block\Template */ protected $_taxConfig; - /** - * @param \Magento\Tax\Model\Config $taxConfig - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Tax\Model\Config $taxConfig + * @param array $data */ - public function __construct( - \Magento\Tax\Model\Config $taxConfig, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Tax\Model\Config $taxConfig, + array $data = array() + ) { $this->_taxConfig = $taxConfig; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Creditmemo/Create/Items.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Creditmemo/Create/Items.php index dc102d6a13a2dda5492517e250630495fff7c7c3..4f400bb644a467754963448d1d14929ed1c38c8c 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Creditmemo/Create/Items.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Creditmemo/Create/Items.php @@ -40,24 +40,24 @@ class Items extends \Magento\Sales\Block\Adminhtml\Items\AbstractItems */ protected $_salesData = null; - /** - * @param \Magento\Sales\Helper\Data $salesData - * @param \Magento\Catalog\Model\ProductFactory $productFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Catalog\Model\ProductFactory $productFactory + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Sales\Helper\Data $salesData + * @param array $data */ - public function __construct( - \Magento\Sales\Helper\Data $salesData, - \Magento\Catalog\Model\ProductFactory $productFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Catalog\Model\ProductFactory $productFactory, + \Magento\Core\Model\Registry $registry, + \Magento\Sales\Helper\Data $salesData, + array $data = array() + ) { $this->_salesData = $salesData; - parent::__construct($productFactory, $coreData, $context, $registry, $data); + parent::__construct($context, $coreData, $productFactory, $registry, $data); } /** diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Creditmemo/View.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Creditmemo/View.php index 95f53817a5021f552b184929f96355a2191df229..ec495a54640d5c0a09b74c7b7ee13b50abc90655 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Creditmemo/View.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Creditmemo/View.php @@ -42,20 +42,20 @@ class View extends \Magento\Adminhtml\Block\Widget\Form\Container */ protected $_coreRegistry = null; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Creditmemo/View/Comments.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Creditmemo/View/Comments.php index 44f4e418c6098b088d7d7e56761888e9f2422858..5f16abe9e7d160585c7aa8d8cf55385a1e8d2ad2 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Creditmemo/View/Comments.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Creditmemo/View/Comments.php @@ -44,12 +44,12 @@ class Comments extends \Magento\Adminhtml\Block\Text\ListText protected $_coreRegistry = null; /** - * @param \Magento\Core\Block\Context $context + * @param \Magento\View\Block\Context $context * @param \Magento\Core\Model\Registry $registry * @param array $data */ public function __construct( - \Magento\Core\Block\Context $context, + \Magento\View\Block\Context $context, \Magento\Core\Model\Registry $registry, array $data = array() ) { diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Invoice/Create.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Invoice/Create.php index 5e18b9a4206d8c4bca890aa180aebb9d02c23bf7..ec74e3fe195521db3646ac193f708499a7ce5cd3 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Invoice/Create.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Invoice/Create.php @@ -39,20 +39,20 @@ class Create extends \Magento\Adminhtml\Block\Widget\Form\Container */ protected $_coreRegistry = null; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _construct() diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Invoice/Create/Items.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Invoice/Create/Items.php index 26a8ed456596c6fe7d6bf1077302be3b50b20324..cd199ec430250e196207d0cdec74ba45b9d5a4ce 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Invoice/Create/Items.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Invoice/Create/Items.php @@ -40,24 +40,24 @@ class Items extends \Magento\Sales\Block\Adminhtml\Items\AbstractItems */ protected $_salesData = null; - /** - * @param \Magento\Sales\Helper\Data $salesData - * @param \Magento\Catalog\Model\ProductFactory $productFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Catalog\Model\ProductFactory $productFactory + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Sales\Helper\Data $salesData + * @param array $data */ - public function __construct( - \Magento\Sales\Helper\Data $salesData, - \Magento\Catalog\Model\ProductFactory $productFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Catalog\Model\ProductFactory $productFactory, + \Magento\Core\Model\Registry $registry, + \Magento\Sales\Helper\Data $salesData, + array $data = array() + ) { $this->_salesData = $salesData; - parent::__construct($productFactory, $coreData, $context, $registry, $data); + parent::__construct($context, $coreData, $productFactory, $registry, $data); } /** diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Invoice/Create/Tracking.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Invoice/Create/Tracking.php index 989f685f53539c084adf760ff01fd9dd82af2461..bcda1bf125c856c5dbf0efa838b390f1cf91993a 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Invoice/Create/Tracking.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Invoice/Create/Tracking.php @@ -47,23 +47,23 @@ class Tracking extends \Magento\Adminhtml\Block\Template */ protected $_shippingConfig; - /** - * @param \Magento\Shipping\Model\Config $shippingConfig - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Shipping\Model\Config $shippingConfig + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Shipping\Model\Config $shippingConfig, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Shipping\Model\Config $shippingConfig, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_shippingConfig = $shippingConfig; $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } public function _construct() diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Invoice/View.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Invoice/View.php index 2b0fbbcbac0c2e4be19e212d7c7a011b0596b8e3..5e957e1fab7cd07b82ddc23a2adc0cea1e68cb3d 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Invoice/View.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Invoice/View.php @@ -54,23 +54,23 @@ class View extends \Magento\Adminhtml\Block\Widget\Form\Container */ protected $_backendSession; - /** - * @param \Magento\Backend\Model\Auth\Session $backendSession - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Backend\Model\Auth\Session $backendSession + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Backend\Model\Auth\Session $backendSession, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Backend\Model\Auth\Session $backendSession, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_backendSession = $backendSession; $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _construct() diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Invoice/View/Comments.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Invoice/View/Comments.php index d022228a7547389a07819bf2948dcb21802f170c..a0025c9c795b271a3d4182b971873877a1a20cd5 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Invoice/View/Comments.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Invoice/View/Comments.php @@ -44,12 +44,12 @@ class Comments extends \Magento\Adminhtml\Block\Text\ListText protected $_coreRegistry = null; /** - * @param \Magento\Core\Block\Context $context + * @param \Magento\View\Block\Context $context * @param \Magento\Core\Model\Registry $registry * @param array $data */ public function __construct( - \Magento\Core\Block\Context $context, + \Magento\View\Block\Context $context, \Magento\Core\Model\Registry $registry, array $data = array() ) { diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Payment.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Payment.php index 06472bbf98b51155e03be5cddda983741239a3ae..6a60a90b2013553516bbf04c2e9c0763b52b781a 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Payment.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Payment.php @@ -42,20 +42,20 @@ class Payment extends \Magento\Adminhtml\Block\Template */ protected $_paymentData = null; - /** - * @param \Magento\Payment\Helper\Data $paymentData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Payment\Helper\Data $paymentData + * @param array $data */ - public function __construct( - \Magento\Payment\Helper\Data $paymentData, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Payment\Helper\Data $paymentData, + array $data = array() + ) { $this->_paymentData = $paymentData; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/Create.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/Create.php index 6a5ee296de0df7c2fa347b17b7703b03342196f9..c127560b1c965be62ab2f56693613b2a0ed1439e 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/Create.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/Create.php @@ -39,20 +39,20 @@ class Create extends \Magento\Adminhtml\Block\Widget\Form\Container */ protected $_coreRegistry = null; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _construct() diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/Create/Items.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/Create/Items.php index cb507b61100feb2851c376e227daeb1a7099da6e..9008b47e820978d2def984655235128050da3554 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/Create/Items.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/Create/Items.php @@ -38,24 +38,24 @@ class Items extends \Magento\Sales\Block\Adminhtml\Items\AbstractItems */ protected $_salesData = null; - /** - * @param \Magento\Sales\Helper\Data $salesData - * @param \Magento\Catalog\Model\ProductFactory $productFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Catalog\Model\ProductFactory $productFactory + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Sales\Helper\Data $salesData + * @param array $data */ - public function __construct( - \Magento\Sales\Helper\Data $salesData, - \Magento\Catalog\Model\ProductFactory $productFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Catalog\Model\ProductFactory $productFactory, + \Magento\Core\Model\Registry $registry, + \Magento\Sales\Helper\Data $salesData, + array $data = array() + ) { $this->_salesData = $salesData; - parent::__construct($productFactory, $coreData, $context, $registry, $data); + parent::__construct($context, $coreData, $productFactory, $registry, $data); } /** diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/Create/Tracking.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/Create/Tracking.php index 2680a4bee3350108b7170cb9579c884a79caf736..c478ab9c0410d4771d96a771f87a1fba4808e116 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/Create/Tracking.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/Create/Tracking.php @@ -47,23 +47,23 @@ class Tracking extends \Magento\Adminhtml\Block\Template */ protected $_shippingConfig; - /** - * @param \Magento\Shipping\Model\Config $shippingConfig - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Shipping\Model\Config $shippingConfig + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Shipping\Model\Config $shippingConfig, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Shipping\Model\Config $shippingConfig, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_shippingConfig = $shippingConfig; $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/Packaging.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/Packaging.php index 7df64ccb17908699296ac1029d2dc4d64a295a19..25d76a88a0b455ada7897ba5b8e9065bc5f1140b 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/Packaging.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/Packaging.php @@ -44,23 +44,23 @@ class Packaging extends \Magento\Adminhtml\Block\Template */ protected $_coreRegistry = null; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Usa\Model\Shipping\Carrier\Usps\Source\Size $sourceSizeModel - * @param \Magento\Core\Model\Registry $coreRegistry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Usa\Model\Shipping\Carrier\Usps\Source\Size $sourceSizeModel + * @param \Magento\Core\Model\Registry $coreRegistry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Usa\Model\Shipping\Carrier\Usps\Source\Size $sourceSizeModel, - \Magento\Core\Model\Registry $coreRegistry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Usa\Model\Shipping\Carrier\Usps\Source\Size $sourceSizeModel, + \Magento\Core\Model\Registry $coreRegistry, + array $data = array() + ) { $this->_coreRegistry = $coreRegistry; $this->_sourceSizeModel = $sourceSizeModel; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/Packaging/Grid.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/Packaging/Grid.php index a82f082f5b36869fe23dad04a3ee3fe626c92079..de32d82c1b34a6a48b87f6d6c28736343f64754f 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/Packaging/Grid.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/Packaging/Grid.php @@ -50,23 +50,23 @@ class Grid extends \Magento\Adminhtml\Block\Template */ protected $_shipmentItemFactory; - /** - * @param \Magento\Sales\Model\Order\Shipment\ItemFactory $shipmentItemFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Sales\Model\Order\Shipment\ItemFactory $shipmentItemFactory + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Sales\Model\Order\Shipment\ItemFactory $shipmentItemFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Sales\Model\Order\Shipment\ItemFactory $shipmentItemFactory, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_shipmentItemFactory = $shipmentItemFactory; $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/View.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/View.php index 05a1e5611d11fdc38711c7bf97d0a43bb4910a63..4d5c1e9b073a586236cbb6dd8b4b82d2bf693c6c 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/View.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/View.php @@ -42,20 +42,20 @@ class View extends \Magento\Adminhtml\Block\Widget\Form\Container */ protected $_coreRegistry = null; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _construct() diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/View/Comments.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/View/Comments.php index d17c363c22168833b640f4b95405cd8d67e63c27..14e62ab052de85fa1af34ba0c38ab4265bffbc9b 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/View/Comments.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/View/Comments.php @@ -44,12 +44,12 @@ class Comments extends \Magento\Adminhtml\Block\Text\ListText protected $_coreRegistry = null; /** - * @param \Magento\Core\Block\Context $context + * @param \Magento\View\Block\Context $context * @param \Magento\Core\Model\Registry $registry * @param array $data */ public function __construct( - \Magento\Core\Block\Context $context, + \Magento\View\Block\Context $context, \Magento\Core\Model\Registry $registry, array $data = array() ) { diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/View/Tracking.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/View/Tracking.php index 5586fa558c8d4a3b82d5dbd5434ec464d9a72d38..4ec01e14e362af3b63d9fdac0a0c20732d9b5e2c 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/View/Tracking.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/View/Tracking.php @@ -47,23 +47,23 @@ class Tracking extends \Magento\Adminhtml\Block\Template */ protected $_shippingConfig; - /** - * @param \Magento\Shipping\Model\Config $shippingConfig - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Shipping\Model\Config $shippingConfig + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Shipping\Model\Config $shippingConfig, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Shipping\Model\Config $shippingConfig, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_shippingConfig = $shippingConfig; $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Status/Assign/Form.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Status/Assign/Form.php index 6f2cf6d67896527a62763de5e51c98f0ec84244c..443d4cb6f28b5acbb70ef60d3f744543224e09da 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Status/Assign/Form.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Status/Assign/Form.php @@ -41,27 +41,27 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic */ protected $_orderConfig; - /** - * @param \Magento\Sales\Model\Order\Config $orderConfig - * @param \Magento\Sales\Model\Resource\Order\Status\CollectionFactory $collectionFactory - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Sales\Model\Order\Config $orderConfig + * @param \Magento\Sales\Model\Resource\Order\Status\CollectionFactory $collectionFactory + * @param array $data */ - public function __construct( - \Magento\Sales\Model\Order\Config $orderConfig, - \Magento\Sales\Model\Resource\Order\Status\CollectionFactory $collectionFactory, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Sales\Model\Order\Config $orderConfig, + \Magento\Sales\Model\Resource\Order\Status\CollectionFactory $collectionFactory, + array $data = array() + ) { $this->_orderConfig = $orderConfig; $this->_collectionFactory = $collectionFactory; - parent::__construct($registry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); } protected function _construct() diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Totals/Tax.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Totals/Tax.php index 94fa4523465e55a473890c5ec7114059a3323b25..3ca69a76d8104359070f728a4a4b4f284fb91c72 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Totals/Tax.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Totals/Tax.php @@ -51,13 +51,8 @@ class Tax extends \Magento\Tax\Block\Sales\Order\Tax protected $_taxOrderFactory; /** - * @var \Magento\Core\Model\StoreManager - */ - protected $_storeManager; - - /** - * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Tax\Model\Config $taxConfig * @param \Magento\Tax\Helper\Data $taxHelper * @param \Magento\Tax\Model\Calculation $taxCalculation @@ -65,8 +60,8 @@ class Tax extends \Magento\Tax\Block\Sales\Order\Tax * @param array $data */ public function __construct( - \Magento\Core\Helper\Data $coreData, \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Tax\Model\Config $taxConfig, \Magento\Tax\Helper\Data $taxHelper, \Magento\Tax\Model\Calculation $taxCalculation, @@ -76,8 +71,7 @@ class Tax extends \Magento\Tax\Block\Sales\Order\Tax $this->_taxHelper = $taxHelper; $this->_taxCalculation = $taxCalculation; $this->_taxOrderFactory = $taxOrderFactory; - $this->_storeManager = $context->getStoreManager(); - parent::__construct($coreData, $context, $taxConfig, $data); + parent::__construct($context, $coreData, $taxConfig, $data); } /** diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/View.php b/app/code/Magento/Sales/Block/Adminhtml/Order/View.php index 3affddbf45784309c05358c07fd111cc5ed19c5e..fca1ea07cd78223a899dd8555691ae76dbbe763d 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/View.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/View.php @@ -52,23 +52,23 @@ class View extends \Magento\Backend\Block\Widget\Form\Container */ protected $_salesConfig; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Sales\Model\Config $salesConfig - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Sales\Model\Config $salesConfig + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - \Magento\Sales\Model\Config $salesConfig, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Sales\Model\Config $salesConfig, + array $data = array() + ) { $this->_coreRegistry = $registry; $this->_salesConfig = $salesConfig; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _construct() diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/View/Giftmessage.php b/app/code/Magento/Sales/Block/Adminhtml/Order/View/Giftmessage.php index 433065c6f69d761f5c7bdd8c942a2b9afc523b7e..48c77b0b1bee69e5b1f2116172d95ebc47b08fb8 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/View/Giftmessage.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/View/Giftmessage.php @@ -54,23 +54,23 @@ class Giftmessage extends \Magento\Adminhtml\Block\Widget */ protected $_messageFactory; - /** - * @param \Magento\GiftMessage\Model\MessageFactory $messageFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\GiftMessage\Model\MessageFactory $messageFactory + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\GiftMessage\Model\MessageFactory $messageFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\GiftMessage\Model\MessageFactory $messageFactory, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; $this->_messageFactory = $messageFactory; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/View/History.php b/app/code/Magento/Sales/Block/Adminhtml/Order/View/History.php index 0dee2b79693a732d89d4cdae0616d75f718e29fa..95503cd4d96ebf753bc86e54f3647c60a7460f37 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/View/History.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/View/History.php @@ -49,23 +49,23 @@ class History extends \Magento\Adminhtml\Block\Template */ protected $_salesData = null; - /** - * @param \Magento\Sales\Helper\Data $salesData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Sales\Helper\Data $salesData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Sales\Helper\Data $salesData, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Sales\Helper\Data $salesData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; $this->_salesData = $salesData; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _prepareLayout() diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/View/Info.php b/app/code/Magento/Sales/Block/Adminhtml/Order/View/Info.php index 38a023d3cc97b426d8a6cee071ef0053de99da6f..b370c769e572f41222321d7901968ce31e05be82 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/View/Info.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/View/Info.php @@ -55,34 +55,31 @@ class Info extends \Magento\Sales\Block\Adminhtml\Order\AbstractOrder */ protected $_eavConfig; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Customer\Model\GroupFactory $groupFactory - * @param \Magento\Customer\Model\CustomerFactory $customerFactory - * @param \Magento\Eav\Model\Config $eavConfig - * @param \Magento\Core\Model\StoreManager $storeManager - * @param \Magento\Eav\Model\AttributeDataFactory $attrDataFactory - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Customer\Model\GroupFactory $groupFactory + * @param \Magento\Customer\Model\CustomerFactory $customerFactory + * @param \Magento\Eav\Model\Config $eavConfig + * @param \Magento\Eav\Model\AttributeDataFactory $attrDataFactory + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - \Magento\Customer\Model\GroupFactory $groupFactory, - \Magento\Customer\Model\CustomerFactory $customerFactory, - \Magento\Eav\Model\Config $eavConfig, - \Magento\Core\Model\StoreManager $storeManager, - \Magento\Eav\Model\AttributeDataFactory $attrDataFactory, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Customer\Model\GroupFactory $groupFactory, + \Magento\Customer\Model\CustomerFactory $customerFactory, + \Magento\Eav\Model\Config $eavConfig, + \Magento\Eav\Model\AttributeDataFactory $attrDataFactory, + array $data = array() + ) { $this->_customerFactory = $customerFactory; $this->_groupFactory = $groupFactory; $this->_eavConfig = $eavConfig; - $this->_storeManager = $storeManager; $this->_attrDataFactory = $attrDataFactory; - parent::__construct($coreData, $context, $registry, $data); + parent::__construct($context, $coreData, $registry, $data); } /** diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/View/Messages.php b/app/code/Magento/Sales/Block/Adminhtml/Order/View/Messages.php index 1b16d9cdfd3ff85ec6a67a186153b212e294cb76..4eb45ad54125b25ab50551182a025ea78ab1615e 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/View/Messages.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/View/Messages.php @@ -40,31 +40,31 @@ class Messages extends \Magento\Adminhtml\Block\Messages * * @var \Magento\Core\Model\Registry */ - protected $_coreRegistry = null; + protected $coreRegistry = null; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context + * @param \Magento\Message\Factory $messageFactory + * @param \Magento\Message\CollectionFactory $collectionFactory * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Core\Model\Message $message - * @param \Magento\Core\Model\Message\CollectionFactory $messageFactory * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, + \Magento\Message\Factory $messageFactory, + \Magento\Message\CollectionFactory $collectionFactory, \Magento\Core\Model\Registry $registry, - \Magento\Core\Model\Message $message, - \Magento\Core\Model\Message\CollectionFactory $messageFactory, array $data = array() ) { - $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $message, $messageFactory, $data); + $this->coreRegistry = $registry; + parent::__construct($context, $coreData, $messageFactory, $collectionFactory, $data); } protected function _getOrder() { - return $this->_coreRegistry->registry('sales_order'); + return $this->coreRegistry->registry('sales_order'); } protected function _prepareLayout() diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/View/Tab/Creditmemos.php b/app/code/Magento/Sales/Block/Adminhtml/Order/View/Tab/Creditmemos.php index 133318058db680712d29de97efd52038a2cb1395..12aad575db38e0d42d21340a11ef59d58ac88941 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/View/Tab/Creditmemos.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/View/Tab/Creditmemos.php @@ -54,30 +54,28 @@ class Creditmemos */ protected $_collectionFactory; - /** - * @param \Magento\Sales\Model\Resource\Order\Collection\Factory $collectionFactory - * @param \Magento\Sales\Model\Order\Creditmemo $orderCreditmemo - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param \Magento\Core\Model\Registry $coreRegistry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Sales\Model\Resource\Order\Collection\Factory $collectionFactory + * @param \Magento\Sales\Model\Order\Creditmemo $orderCreditmemo + * @param \Magento\Core\Model\Registry $coreRegistry + * @param array $data */ - public function __construct( - \Magento\Sales\Model\Resource\Order\Collection\Factory $collectionFactory, - \Magento\Sales\Model\Order\Creditmemo $orderCreditmemo, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - \Magento\Core\Model\Registry $coreRegistry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Sales\Model\Resource\Order\Collection\Factory $collectionFactory, + \Magento\Sales\Model\Order\Creditmemo $orderCreditmemo, + \Magento\Core\Model\Registry $coreRegistry, + array $data = array() + ) { $this->_coreRegistry = $coreRegistry; $this->_orderCreditmemo = $orderCreditmemo; $this->_collectionFactory = $collectionFactory; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $data); } protected function _construct() diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/View/Tab/History.php b/app/code/Magento/Sales/Block/Adminhtml/Order/View/Tab/History.php index 59ca335157a6e96e8dbf32c1fe0f9cebab194aa4..5f722420d5dfedc67f30158e0b0f7c3fcda290d7 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/View/Tab/History.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/View/Tab/History.php @@ -47,20 +47,20 @@ class History */ protected $_coreRegistry = null; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/View/Tab/Invoices.php b/app/code/Magento/Sales/Block/Adminhtml/Order/View/Tab/Invoices.php index 5cd897248ad7b46e6caffb026b12a15c94729157..ddf5be61a8714409ab5016b325ccbe57f044bbcc 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/View/Tab/Invoices.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/View/Tab/Invoices.php @@ -54,30 +54,28 @@ class Invoices */ protected $_collectionFactory; - /** - * @param \Magento\Sales\Model\Resource\Order\Collection\Factory $collectionFactory - * @param \Magento\Sales\Model\Order\Invoice $orderInvoice - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param \Magento\Core\Model\Registry $coreRegistry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Sales\Model\Resource\Order\Collection\Factory $collectionFactory + * @param \Magento\Sales\Model\Order\Invoice $orderInvoice + * @param \Magento\Core\Model\Registry $coreRegistry + * @param array $data */ - public function __construct( - \Magento\Sales\Model\Resource\Order\Collection\Factory $collectionFactory, - \Magento\Sales\Model\Order\Invoice $orderInvoice, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - \Magento\Core\Model\Registry $coreRegistry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Sales\Model\Resource\Order\Collection\Factory $collectionFactory, + \Magento\Sales\Model\Order\Invoice $orderInvoice, + \Magento\Core\Model\Registry $coreRegistry, + array $data = array() + ) { $this->_coreRegistry = $coreRegistry; $this->_orderInvoice = $orderInvoice; $this->_collectionFactory = $collectionFactory; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $data); } protected function _construct() diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/View/Tab/Shipments.php b/app/code/Magento/Sales/Block/Adminhtml/Order/View/Tab/Shipments.php index 89768475eb29a2a9a00b832a3d6a71fffe882321..c8f4f3123eb90270c6657a3df2cd9014eeb3af77 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/View/Tab/Shipments.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/View/Tab/Shipments.php @@ -45,27 +45,25 @@ class Shipments */ protected $_collectionFactory; - /** - * @param \Magento\Sales\Model\Resource\Order\Collection\Factory $collectionFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param \Magento\Core\Model\Registry $coreRegistry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Sales\Model\Resource\Order\Collection\Factory $collectionFactory + * @param \Magento\Core\Model\Registry $coreRegistry + * @param array $data */ - public function __construct( - \Magento\Sales\Model\Resource\Order\Collection\Factory $collectionFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - \Magento\Core\Model\Registry $coreRegistry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Sales\Model\Resource\Order\Collection\Factory $collectionFactory, + \Magento\Core\Model\Registry $coreRegistry, + array $data = array() + ) { $this->_coreRegistry = $coreRegistry; $this->_collectionFactory = $collectionFactory; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $data); } protected function _construct() diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/View/Tabs.php b/app/code/Magento/Sales/Block/Adminhtml/Order/View/Tabs.php index 3632f9c70a93c8f5532f362d75fd62e7b61f47d3..bebf0f768b23801c8ae5be1dcaec9d48d00dcb07 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/View/Tabs.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/View/Tabs.php @@ -38,22 +38,22 @@ class Tabs extends \Magento\Backend\Block\Widget\Tabs */ protected $_coreRegistry = null; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Backend\Model\Auth\Session $authSession - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Backend\Model\Auth\Session $authSession + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Backend\Model\Auth\Session $authSession, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Backend\Model\Auth\Session $authSession, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $authSession, $data); + parent::__construct($context, $coreData, $authSession, $data); } /** diff --git a/app/code/Magento/Sales/Block/Adminhtml/Recurring/Profile/Edit/Form.php b/app/code/Magento/Sales/Block/Adminhtml/Recurring/Profile/Edit/Form.php index e5aee0c6bd607d9d20c32b6a36f0dedd2e9b10a2..375c72e90adebcbddd2436c2a807508bc263c314 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Recurring/Profile/Edit/Form.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Recurring/Profile/Edit/Form.php @@ -68,18 +68,18 @@ class Form extends \Magento\Backend\Block\AbstractBlock */ protected $_recurringProfile; - /** - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Backend\Block\Context $context - * @param \Magento\Sales\Model\Recurring\Profile $recurringProfile - * @param array $data + /** + * @param \Magento\Backend\Block\Context $context + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Sales\Model\Recurring\Profile $recurringProfile + * @param array $data */ - public function __construct( - \Magento\Data\FormFactory $formFactory, - \Magento\Backend\Block\Context $context, - \Magento\Sales\Model\Recurring\Profile $recurringProfile, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Context $context, + \Magento\Data\FormFactory $formFactory, + \Magento\Sales\Model\Recurring\Profile $recurringProfile, + array $data = array() + ) { $this->_formFactory = $formFactory; $this->_profile = $recurringProfile; parent::__construct($context, $data); diff --git a/app/code/Magento/Sales/Block/Adminhtml/Recurring/Profile/Grid.php b/app/code/Magento/Sales/Block/Adminhtml/Recurring/Profile/Grid.php index cc30f4d76f88caf2e4c8d29bd39d2d6d0156ae04..a3a0557d99d77d5ddcdf8b283f07b3cc3d183efb 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Recurring/Profile/Grid.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Recurring/Profile/Grid.php @@ -51,30 +51,28 @@ class Grid extends \Magento\Adminhtml\Block\Widget\Grid */ protected $_recurringProfile; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Payment\Helper\Data $paymentData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param \Magento\Sales\Model\Resource\Recurring\Profile\CollectionFactory $profileCollection - * @param \Magento\Sales\Model\Recurring\ProfileFactory $recurringProfile - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Payment\Helper\Data $paymentData + * @param \Magento\Sales\Model\Resource\Recurring\Profile\CollectionFactory $profileCollection + * @param \Magento\Sales\Model\Recurring\ProfileFactory $recurringProfile + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Payment\Helper\Data $paymentData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - \Magento\Sales\Model\Resource\Recurring\Profile\CollectionFactory $profileCollection, - \Magento\Sales\Model\Recurring\ProfileFactory $recurringProfile, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Payment\Helper\Data $paymentData, + \Magento\Sales\Model\Resource\Recurring\Profile\CollectionFactory $profileCollection, + \Magento\Sales\Model\Recurring\ProfileFactory $recurringProfile, + array $data = array() + ) { $this->_paymentData = $paymentData; $this->_profileCollection = $profileCollection; $this->_recurringProfile = $recurringProfile; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $data); } protected function _construct() diff --git a/app/code/Magento/Sales/Block/Adminhtml/Recurring/Profile/View.php b/app/code/Magento/Sales/Block/Adminhtml/Recurring/Profile/View.php index ff704fd7b9c1f63860f2e5c66a028c668e0dbc61..cc36ce42c02dc799a458d8f82ddc069735717243 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Recurring/Profile/View.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Recurring/Profile/View.php @@ -38,20 +38,20 @@ class View extends \Magento\Backend\Block\Widget\Container */ protected $_coreRegistry = null; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Sales/Block/Adminhtml/Recurring/Profile/View/Getawayinfo.php b/app/code/Magento/Sales/Block/Adminhtml/Recurring/Profile/View/Getawayinfo.php index c7ab5e8ca0665a3c695ff90a60320a42ad269b07..8d00e2f8cde812ccdd0a77690c287963ed4519fc 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Recurring/Profile/View/Getawayinfo.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Recurring/Profile/View/Getawayinfo.php @@ -42,20 +42,20 @@ class Getawayinfo extends \Magento\Adminhtml\Block\Widget */ protected $_coreRegistry = null; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Sales/Block/Adminhtml/Recurring/Profile/View/Info.php b/app/code/Magento/Sales/Block/Adminhtml/Recurring/Profile/View/Info.php index ba86127cf3652223c284b0ed3ab33568bd828417..8f366c50f3bfb5c8432dc38bb5858e12ab357c9f 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Recurring/Profile/View/Info.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Recurring/Profile/View/Info.php @@ -42,20 +42,20 @@ class Info extends \Magento\Adminhtml\Block\Widget */ protected $_coreRegistry = null; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Sales/Block/Adminhtml/Recurring/Profile/View/Items.php b/app/code/Magento/Sales/Block/Adminhtml/Recurring/Profile/View/Items.php index 334964897e06d25df4cdf84ea99c285b2d5f8fdf..cca8fcc7b3cf7c296b0721075b130180ded021ba 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Recurring/Profile/View/Items.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Recurring/Profile/View/Items.php @@ -35,31 +35,6 @@ namespace Magento\Sales\Block\Adminhtml\Recurring\Profile\View; class Items extends \Magento\Sales\Block\Adminhtml\Items\AbstractItems { - /** - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - - /** - * @param \Magento\Catalog\Model\ProductFactory $productFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param array $data - */ - public function __construct( - \Magento\Catalog\Model\ProductFactory $productFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - \Magento\Core\Model\StoreManagerInterface $storeManager, - array $data = array() - ) { - $this->_storeManager = $storeManager; - parent::__construct($productFactory, $coreData, $context, $registry, $data); - } - /** * Retrieve required options from parent */ diff --git a/app/code/Magento/Sales/Block/Adminhtml/Recurring/Profile/View/Tab/Orders.php b/app/code/Magento/Sales/Block/Adminhtml/Recurring/Profile/View/Tab/Orders.php index cc245cb59642eee69d29181db4e7019b8aafefec..d349e7225bc8471942f5d71e473d060d0b6a1ae1 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Recurring/Profile/View/Tab/Orders.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Recurring/Profile/View/Tab/Orders.php @@ -50,30 +50,28 @@ class Orders */ protected $_orderConfig; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param \Magento\Core\Model\Registry $coreRegistry - * @param \Magento\Sales\Model\Resource\Order\Grid\CollectionFactory $orderCollection - * @param \Magento\Sales\Model\Order\ConfigFactory $orderConfig - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Core\Model\Registry $coreRegistry + * @param \Magento\Sales\Model\Resource\Order\Grid\CollectionFactory $orderCollection + * @param \Magento\Sales\Model\Order\ConfigFactory $orderConfig + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - \Magento\Core\Model\Registry $coreRegistry, - \Magento\Sales\Model\Resource\Order\Grid\CollectionFactory $orderCollection, - \Magento\Sales\Model\Order\ConfigFactory $orderConfig, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Core\Model\Registry $coreRegistry, + \Magento\Sales\Model\Resource\Order\Grid\CollectionFactory $orderCollection, + \Magento\Sales\Model\Order\ConfigFactory $orderConfig, + array $data = array() + ) { $this->_coreRegistry = $coreRegistry; $this->_orderCollection = $orderCollection; $this->_orderConfig = $orderConfig; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $data); } /** diff --git a/app/code/Magento/Sales/Block/Adminhtml/Reorder/Renderer/Action.php b/app/code/Magento/Sales/Block/Adminhtml/Reorder/Renderer/Action.php index 483198292eed12d17eeb00768c7f613d79ced22f..119909cd97246216c840346233a48fe614b3981b 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Reorder/Renderer/Action.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Reorder/Renderer/Action.php @@ -51,16 +51,16 @@ class Action */ protected $_salesReorder = null; - /** - * @param \Magento\Sales\Helper\Reorder $salesReorder - * @param \Magento\Backend\Block\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Context $context + * @param \Magento\Sales\Helper\Reorder $salesReorder + * @param array $data */ - public function __construct( - \Magento\Sales\Helper\Reorder $salesReorder, - \Magento\Backend\Block\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Context $context, + \Magento\Sales\Helper\Reorder $salesReorder, + array $data = array() + ) { $this->_salesReorder = $salesReorder; parent::__construct($context, $data); } diff --git a/app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form.php b/app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form.php index e74f37b9cc71f3fd05cc4ff5dbfbe214ae3df250..67549195b5355806042a819af6dd8cc94f720214 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form.php @@ -40,24 +40,24 @@ class Form extends \Magento\Adminhtml\Block\Report\Filter\Form */ protected $_orderConfig; - /** - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Sales\Model\Order\ConfigFactory $orderConfig - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Sales\Model\Order\ConfigFactory $orderConfig + * @param array $data */ - public function __construct( - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Sales\Model\Order\ConfigFactory $orderConfig, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Sales\Model\Order\ConfigFactory $orderConfig, + array $data = array() + ) { $this->_orderConfig = $orderConfig; - parent::__construct($registry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); } /** diff --git a/app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form/Coupon.php b/app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form/Coupon.php index d9cffa1ab27295a3d1e1aa179680b09cde1e728a..43ba18ee490d090c1168dba5883a4f0016daab2e 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form/Coupon.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form/Coupon.php @@ -47,26 +47,26 @@ class Coupon extends \Magento\Sales\Block\Adminhtml\Report\Filter\Form */ protected $_reportRule; - /** - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Sales\Model\Order\ConfigFactory $orderConfig - * @param \Magento\SalesRule\Model\Resource\Report\RuleFactory $reportRule - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Sales\Model\Order\ConfigFactory $orderConfig + * @param \Magento\SalesRule\Model\Resource\Report\RuleFactory $reportRule + * @param array $data */ - public function __construct( - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Sales\Model\Order\ConfigFactory $orderConfig, - \Magento\SalesRule\Model\Resource\Report\RuleFactory $reportRule, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Sales\Model\Order\ConfigFactory $orderConfig, + \Magento\SalesRule\Model\Resource\Report\RuleFactory $reportRule, + array $data = array() + ) { $this->_reportRule = $reportRule; - parent::__construct($registry, $formFactory, $coreData, $context, $orderConfig, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $orderConfig, $data); } /** diff --git a/app/code/Magento/Sales/Block/Adminhtml/Shipment/Grid.php b/app/code/Magento/Sales/Block/Adminhtml/Shipment/Grid.php index 064767b07e00d72529ecaa09f05e34b6c8aa0e2f..40897ae3b1282487a61050bd165a726719053ef5 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Shipment/Grid.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Shipment/Grid.php @@ -38,24 +38,22 @@ class Grid extends \Magento\Adminhtml\Block\Widget\Grid */ protected $_collectionFactory; - /** - * @param \Magento\Sales\Model\Resource\Order\Collection\Factory $collectionFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Sales\Model\Resource\Order\Collection\Factory $collectionFactory + * @param array $data */ - public function __construct( - \Magento\Sales\Model\Resource\Order\Collection\Factory $collectionFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Sales\Model\Resource\Order\Collection\Factory $collectionFactory, + array $data = array() + ) { $this->_collectionFactory = $collectionFactory; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $data); } diff --git a/app/code/Magento/Sales/Block/Adminhtml/Transactions/Detail.php b/app/code/Magento/Sales/Block/Adminhtml/Transactions/Detail.php index dc8a19784531ba7e6f55ba218b8c570fdc21899f..d427dc9a4f41ffc6394c3e80e8e48c7f2bf0acfa 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Transactions/Detail.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Transactions/Detail.php @@ -49,20 +49,20 @@ class Detail extends \Magento\Adminhtml\Block\Widget\Container */ protected $_coreRegistry = null; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Sales/Block/Adminhtml/Transactions/Detail/Grid.php b/app/code/Magento/Sales/Block/Adminhtml/Transactions/Detail/Grid.php index 272cfe78ec3050c1e88312b873f4a4da3be58237..09237015c7a9363da8f419394d1acdec8a2db612 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Transactions/Detail/Grid.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Transactions/Detail/Grid.php @@ -47,27 +47,25 @@ class Grid extends \Magento\Adminhtml\Block\Widget\Grid */ protected $_collectionFactory; - /** - * @param \Magento\Data\CollectionFactory $collectionFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param \Magento\Core\Model\Registry $coreRegistry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Data\CollectionFactory $collectionFactory + * @param \Magento\Core\Model\Registry $coreRegistry + * @param array $data */ - public function __construct( - \Magento\Data\CollectionFactory $collectionFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - \Magento\Core\Model\Registry $coreRegistry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Data\CollectionFactory $collectionFactory, + \Magento\Core\Model\Registry $coreRegistry, + array $data = array() + ) { $this->_collectionFactory = $collectionFactory; $this->_coreRegistry = $coreRegistry; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $data); } /** diff --git a/app/code/Magento/Sales/Block/Adminhtml/Transactions/Grid.php b/app/code/Magento/Sales/Block/Adminhtml/Transactions/Grid.php index 26b7428a01f8512efd28eb0e1064da7bcf295cf5..d2c6a46bfb04e856bc07b35812fa7a29f82ec9ee 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Transactions/Grid.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Transactions/Grid.php @@ -59,33 +59,31 @@ class Grid extends \Magento\Adminhtml\Block\Widget\Grid */ protected $_collectionFactory; - /** - * @param \Magento\Sales\Model\Order\Payment\Transaction $transaction - * @param \Magento\Sales\Model\Resource\Order\Payment\Transaction\CollectionFactory $collectionFactory - * @param \Magento\Payment\Helper\Data $paymentData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param \Magento\Core\Model\Registry $coreRegistry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Sales\Model\Order\Payment\Transaction $transaction + * @param \Magento\Sales\Model\Resource\Order\Payment\Transaction\CollectionFactory $collectionFactory + * @param \Magento\Payment\Helper\Data $paymentData + * @param \Magento\Core\Model\Registry $coreRegistry + * @param array $data */ - public function __construct( - \Magento\Sales\Model\Order\Payment\Transaction $transaction, - \Magento\Sales\Model\Resource\Order\Payment\Transaction\CollectionFactory $collectionFactory, - \Magento\Payment\Helper\Data $paymentData, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - \Magento\Core\Model\Registry $coreRegistry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Sales\Model\Order\Payment\Transaction $transaction, + \Magento\Sales\Model\Resource\Order\Payment\Transaction\CollectionFactory $collectionFactory, + \Magento\Payment\Helper\Data $paymentData, + \Magento\Core\Model\Registry $coreRegistry, + array $data = array() + ) { $this->_coreRegistry = $coreRegistry; $this->_paymentData = $paymentData; $this->_transaction = $transaction; $this->_collectionFactory = $collectionFactory; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $data); } /** diff --git a/app/code/Magento/Sales/Block/Billing/Agreement/View.php b/app/code/Magento/Sales/Block/Billing/Agreement/View.php index 20cd583b0855b742dfe33f15102c4a70f90ecf26..e3b7078a0fcbdf4c4fad1bebbaa3bdd797612ecb 100644 --- a/app/code/Magento/Sales/Block/Billing/Agreement/View.php +++ b/app/code/Magento/Sales/Block/Billing/Agreement/View.php @@ -31,7 +31,7 @@ */ namespace Magento\Sales\Block\Billing\Agreement; -class View extends \Magento\Core\Block\Template +class View extends \Magento\View\Block\Template { /** * Payment methods array @@ -77,8 +77,8 @@ class View extends \Magento\Core\Block\Template protected $_orderConfig; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Core\Model\Registry $registry * @param \Magento\Sales\Model\Resource\Order\CollectionFactory $orderCollectionFactory * @param \Magento\Customer\Model\Session $customerSession @@ -86,8 +86,8 @@ class View extends \Magento\Core\Block\Template * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Core\Model\Registry $registry, \Magento\Sales\Model\Resource\Order\CollectionFactory $orderCollectionFactory, \Magento\Customer\Model\Session $customerSession, @@ -98,7 +98,7 @@ class View extends \Magento\Core\Block\Template $this->_customerSession = $customerSession; $this->_orderConfig = $orderConfig; $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** @@ -163,7 +163,7 @@ class View extends \Magento\Core\Block\Template /** * Set pager * - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ protected function _prepareLayout() { diff --git a/app/code/Magento/Sales/Block/Billing/Agreements.php b/app/code/Magento/Sales/Block/Billing/Agreements.php index 83b462597d300e14ca958a7cfc4303b8a4e6e875..f38db14ff448fe781126b98fefc1e35248e385a2 100644 --- a/app/code/Magento/Sales/Block/Billing/Agreements.php +++ b/app/code/Magento/Sales/Block/Billing/Agreements.php @@ -31,7 +31,7 @@ */ namespace Magento\Sales\Block\Billing; -class Agreements extends \Magento\Core\Block\Template +class Agreements extends \Magento\View\Block\Template { /** * Payment methods array @@ -58,28 +58,28 @@ class Agreements extends \Magento\Core\Block\Template protected $_agreementCollection; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Sales\Model\Resource\Billing\Agreement\CollectionFactory $agreementCollection * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Customer\Model\Session $customerSession, \Magento\Sales\Model\Resource\Billing\Agreement\CollectionFactory $agreementCollection, array $data = array() ) { $this->_customerSession = $customerSession; $this->_agreementCollection = $agreementCollection; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** * Set Billing Agreement instance * - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ protected function _prepareLayout() { diff --git a/app/code/Magento/Sales/Block/Guest/Link.php b/app/code/Magento/Sales/Block/Guest/Link.php index f7832a39027db2b1c2f657d2407c38d6109642df..029b43619a8d1d1a800868c6bddf2d7c20d5b5bd 100644 --- a/app/code/Magento/Sales/Block/Guest/Link.php +++ b/app/code/Magento/Sales/Block/Guest/Link.php @@ -35,18 +35,18 @@ class Link extends \Magento\Page\Block\Link protected $_customerSession; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Customer\Model\Session $customerSession * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Customer\Model\Session $customerSession, array $data = array() ) { - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); $this->_customerSession = $customerSession; } diff --git a/app/code/Magento/Sales/Block/Items/AbstractItems.php b/app/code/Magento/Sales/Block/Items/AbstractItems.php index b1d663541934af58f3a7c6e105e6260e305d062f..d64872e55bd9acf0bd3653050627bf732ca03387 100644 --- a/app/code/Magento/Sales/Block/Items/AbstractItems.php +++ b/app/code/Magento/Sales/Block/Items/AbstractItems.php @@ -33,7 +33,7 @@ */ namespace Magento\Sales\Block\Items; -class AbstractItems extends \Magento\Core\Block\Template +class AbstractItems extends \Magento\View\Block\Template { /** * Block alias fallback @@ -59,7 +59,7 @@ class AbstractItems extends \Magento\Core\Block\Template * Retrieve item renderer block * * @param string $type - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock * @throws \RuntimeException */ public function getItemRenderer($type) @@ -75,10 +75,10 @@ class AbstractItems extends \Magento\Core\Block\Template /** * Prepare item before output * - * @param \Magento\Core\Block\AbstractBlock $renderer + * @param \Magento\View\Block\AbstractBlock $renderer * @return \Magento\Sales\Block\Items\AbstractItems */ - protected function _prepareItem(\Magento\Core\Block\AbstractBlock $renderer) + protected function _prepareItem(\Magento\View\Block\AbstractBlock $renderer) { return $this; } diff --git a/app/code/Magento/Sales/Block/Order/Comments.php b/app/code/Magento/Sales/Block/Order/Comments.php index 551b6250ce0a98576f66700d9ab503a55ae3c573..d16edd3e4bb838e8e804c10181afc8dd56d276e2 100644 --- a/app/code/Magento/Sales/Block/Order/Comments.php +++ b/app/code/Magento/Sales/Block/Order/Comments.php @@ -25,22 +25,22 @@ */ namespace Magento\Sales\Block\Order; -class Comments extends \Magento\Core\Block\Template +class Comments extends \Magento\View\Block\Template { /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Sales\Model\ResourceFactory $resourceFactory * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Sales\Model\ResourceFactory $resourceFactory, array $data = array() ) { $this->_resourceFactory = $resourceFactory; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Sales/Block/Order/Creditmemo.php b/app/code/Magento/Sales/Block/Order/Creditmemo.php index 6061a0df4e508760de895d4970864d8a43620f3b..bfce082a79a2e648e4f399d4396a83caa4039adc 100644 --- a/app/code/Magento/Sales/Block/Order/Creditmemo.php +++ b/app/code/Magento/Sales/Block/Order/Creditmemo.php @@ -46,21 +46,21 @@ class Creditmemo extends \Magento\Sales\Block\Order\Creditmemo\Items protected $_customerSession; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Core\Model\Registry $registry * @param \Magento\Customer\Model\Session $customerSession * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Core\Model\Registry $registry, \Magento\Customer\Model\Session $customerSession, array $data = array() ) { $this->_customerSession = $customerSession; - parent::__construct($coreData, $context, $registry, $data); + parent::__construct($context, $coreData, $registry, $data); } protected function _prepareLayout() diff --git a/app/code/Magento/Sales/Block/Order/Creditmemo/Items.php b/app/code/Magento/Sales/Block/Order/Creditmemo/Items.php index ab29b5f68d13e920528b27f16318814f82444517..caff09b40165e465ae7646b5b444d71b1c9a110b 100644 --- a/app/code/Magento/Sales/Block/Order/Creditmemo/Items.php +++ b/app/code/Magento/Sales/Block/Order/Creditmemo/Items.php @@ -39,19 +39,19 @@ class Items extends \Magento\Sales\Block\Items\AbstractItems protected $_coreRegistry = null; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Core\Model\Registry $registry * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Core\Model\Registry $registry, array $data = array() ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Sales/Block/Order/Email/Creditmemo/Items.php b/app/code/Magento/Sales/Block/Order/Email/Creditmemo/Items.php index 7f6a7df36b67c58e255ddd4b4c257224e78d3a4d..c616d9cb5c05b0b0e5bd89203c88a3f2ff88d619 100644 --- a/app/code/Magento/Sales/Block/Order/Email/Creditmemo/Items.php +++ b/app/code/Magento/Sales/Block/Order/Email/Creditmemo/Items.php @@ -39,10 +39,10 @@ class Items extends \Magento\Sales\Block\Items\AbstractItems /** * Prepare item before output * - * @param \Magento\Core\Block\AbstractBlock $renderer + * @param \Magento\View\Block\AbstractBlock $renderer * @return \Magento\Sales\Block\Items\AbstractItems */ - protected function _prepareItem(\Magento\Core\Block\AbstractBlock $renderer) + protected function _prepareItem(\Magento\View\Block\AbstractBlock $renderer) { $renderer->getItem()->setOrder($this->getOrder()); $renderer->getItem()->setSource($this->getCreditmemo()); diff --git a/app/code/Magento/Sales/Block/Order/Email/Invoice/Items.php b/app/code/Magento/Sales/Block/Order/Email/Invoice/Items.php index a36fcb7f8334eb754cde2127dea3da9aa8a405a5..19ca544e709f01ae5ef6aad5288f31c0034fbfeb 100644 --- a/app/code/Magento/Sales/Block/Order/Email/Invoice/Items.php +++ b/app/code/Magento/Sales/Block/Order/Email/Invoice/Items.php @@ -39,10 +39,10 @@ class Items extends \Magento\Sales\Block\Items\AbstractItems /** * Prepare item before output * - * @param \Magento\Core\Block\AbstractBlock $renderer + * @param \Magento\View\Block\AbstractBlock $renderer * @return \Magento\Sales\Block\Items\AbstractItems */ - protected function _prepareItem(\Magento\Core\Block\AbstractBlock $renderer) + protected function _prepareItem(\Magento\View\Block\AbstractBlock $renderer) { $renderer->getItem()->setOrder($this->getOrder()); $renderer->getItem()->setSource($this->getInvoice()); diff --git a/app/code/Magento/Sales/Block/Order/Email/Items/DefaultItems.php b/app/code/Magento/Sales/Block/Order/Email/Items/DefaultItems.php index 1e37fb756d6a165166d6f62870bac1c3141e273d..f55802e36a1c76f05cd6642795c064b595ff1e9e 100644 --- a/app/code/Magento/Sales/Block/Order/Email/Items/DefaultItems.php +++ b/app/code/Magento/Sales/Block/Order/Email/Items/DefaultItems.php @@ -34,7 +34,7 @@ */ namespace Magento\Sales\Block\Order\Email\Items; -class DefaultItems extends \Magento\Core\Block\Template +class DefaultItems extends \Magento\View\Block\Template { /** * Retrieve current order model instance @@ -85,7 +85,7 @@ class DefaultItems extends \Magento\Core\Block\Template /** * Return product additional information block * - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ public function getProductAdditionalInformationBlock() { diff --git a/app/code/Magento/Sales/Block/Order/Email/Items/Order/DefaultOrder.php b/app/code/Magento/Sales/Block/Order/Email/Items/Order/DefaultOrder.php index eb2651b37cc2aa87fb0a3abd66e37358f0a3fa40..7edd9af7113e7b74543ecaf80c8544cbf1e8967f 100644 --- a/app/code/Magento/Sales/Block/Order/Email/Items/Order/DefaultOrder.php +++ b/app/code/Magento/Sales/Block/Order/Email/Items/Order/DefaultOrder.php @@ -34,7 +34,7 @@ */ namespace Magento\Sales\Block\Order\Email\Items\Order; -class DefaultOrder extends \Magento\Core\Block\Template +class DefaultOrder extends \Magento\View\Block\Template { /** * Retrieve current order model instance @@ -85,7 +85,7 @@ class DefaultOrder extends \Magento\Core\Block\Template /** * Return product additional information block * - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ public function getProductAdditionalInformationBlock() { diff --git a/app/code/Magento/Sales/Block/Order/Email/Shipment/Items.php b/app/code/Magento/Sales/Block/Order/Email/Shipment/Items.php index 1f210a57c59195d99c2f4f2b0906f3accba69253..523f208ca5cffd944a7e892ccdcfbf3f1ba684a1 100644 --- a/app/code/Magento/Sales/Block/Order/Email/Shipment/Items.php +++ b/app/code/Magento/Sales/Block/Order/Email/Shipment/Items.php @@ -39,10 +39,10 @@ class Items extends \Magento\Sales\Block\Items\AbstractItems /** * Prepare item before output * - * @param \Magento\Core\Block\AbstractBlock $renderer + * @param \Magento\View\Block\AbstractBlock $renderer * @return \Magento\Sales\Block\Items\AbstractItems */ - protected function _prepareItem(\Magento\Core\Block\AbstractBlock $renderer) + protected function _prepareItem(\Magento\View\Block\AbstractBlock $renderer) { $renderer->getItem()->setOrder($this->getOrder()); $renderer->getItem()->setSource($this->getShipment()); diff --git a/app/code/Magento/Sales/Block/Order/History.php b/app/code/Magento/Sales/Block/Order/History.php index a7fe11a3ef7bc029325a6ae563023f8c1a9550e8..50cff2756839838b876ee1102c3e0d8431f4cbf2 100644 --- a/app/code/Magento/Sales/Block/Order/History.php +++ b/app/code/Magento/Sales/Block/Order/History.php @@ -29,7 +29,7 @@ */ namespace Magento\Sales\Block\Order; -class History extends \Magento\Core\Block\Template +class History extends \Magento\View\Block\Template { /** * @var string @@ -52,40 +52,31 @@ class History extends \Magento\Core\Block\Template protected $_orderConfig; /** - * @var \Magento\Core\Model\App - */ - protected $_coreApp; - - /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Sales\Model\Resource\Order\CollectionFactory $orderCollectionFactory * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Sales\Model\Order\Config $orderConfig - * @param \Magento\Core\Model\App $coreApp * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Sales\Model\Resource\Order\CollectionFactory $orderCollectionFactory, \Magento\Customer\Model\Session $customerSession, \Magento\Sales\Model\Order\Config $orderConfig, - \Magento\Core\Model\App $coreApp, array $data = array() ) { $this->_orderCollectionFactory = $orderCollectionFactory; $this->_customerSession = $customerSession; $this->_orderConfig = $orderConfig; - $this->_coreApp = $coreApp; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _construct() { parent::_construct(); - $orders = $this->_orderCollectionFactory->create() ->addFieldToSelect('*') ->addFieldToFilter('customer_id', $this->_customerSession->getCustomer()->getId()) @@ -94,15 +85,13 @@ class History extends \Magento\Core\Block\Template $this->setOrders($orders); - if ($this->_coreApp->getFrontController()->getAction()) { - $this->_coreApp->getFrontController()->getAction()->getLayout()->getBlock('root')->setHeaderTitle( - __('My Orders') - ); + if ($this->_layout->getBlock('root')) { + $this->_layout->getBlock('root')->setHeaderTitle(__('My Orders')); } } /** - * @return $this|\Magento\Core\Block\AbstractBlock + * @return $this|\Magento\View\Block\AbstractBlock */ protected function _prepareLayout() { diff --git a/app/code/Magento/Sales/Block/Order/Info.php b/app/code/Magento/Sales/Block/Order/Info.php index 2e1c1edeb12b2895a4b8fb3c42277859fe47665c..d1a77779afd7d8127b1dac652708c43e88dd1eba 100644 --- a/app/code/Magento/Sales/Block/Order/Info.php +++ b/app/code/Magento/Sales/Block/Order/Info.php @@ -34,7 +34,7 @@ */ namespace Magento\Sales\Block\Order; -class Info extends \Magento\Core\Block\Template +class Info extends \Magento\View\Block\Template { protected $_template = 'order/info.phtml'; @@ -46,19 +46,19 @@ class Info extends \Magento\Core\Block\Template protected $_coreRegistry = null; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Core\Model\Registry $registry * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Core\Model\Registry $registry, array $data = array() ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _prepareLayout() diff --git a/app/code/Magento/Sales/Block/Order/Info/Buttons.php b/app/code/Magento/Sales/Block/Order/Info/Buttons.php index f399ddf24a49a7e3313cab84b6c5eead7ef75a45..4934749a5e6a5b27c0fd613a017d8827a8aa0782 100644 --- a/app/code/Magento/Sales/Block/Order/Info/Buttons.php +++ b/app/code/Magento/Sales/Block/Order/Info/Buttons.php @@ -30,7 +30,7 @@ */ namespace Magento\Sales\Block\Order\Info; -class Buttons extends \Magento\Core\Block\Template +class Buttons extends \Magento\View\Block\Template { /** * @var string @@ -50,22 +50,22 @@ class Buttons extends \Magento\Core\Block\Template protected $_customerSession; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Core\Model\Registry $registry * @param \Magento\Customer\Model\Session $customerSession * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Core\Model\Registry $registry, \Magento\Customer\Model\Session $customerSession, array $data = array() ) { $this->_coreRegistry = $registry; $this->_customerSession = $customerSession; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Sales/Block/Order/Invoice.php b/app/code/Magento/Sales/Block/Order/Invoice.php index d1dcd523e515d18cf7c012521e394048d3365793..e88783358d7a848a94244ff965229df9be695706 100644 --- a/app/code/Magento/Sales/Block/Order/Invoice.php +++ b/app/code/Magento/Sales/Block/Order/Invoice.php @@ -42,21 +42,21 @@ class Invoice extends \Magento\Sales\Block\Order\Invoice\Items protected $_customerSession; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Core\Model\Registry $registry * @param \Magento\Customer\Model\Session $customerSession * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Core\Model\Registry $registry, \Magento\Customer\Model\Session $customerSession, array $data = array() ) { $this->_customerSession = $customerSession; - parent::__construct($coreData, $context, $registry, $data); + parent::__construct($context, $coreData, $registry, $data); } protected function _prepareLayout() diff --git a/app/code/Magento/Sales/Block/Order/Invoice/Items.php b/app/code/Magento/Sales/Block/Order/Invoice/Items.php index 730b224d71239a2209fee1bdbbca7fd6572a25ef..415f10cd6a7a8b4dcb2cefeee9ceed0fb273e7e4 100644 --- a/app/code/Magento/Sales/Block/Order/Invoice/Items.php +++ b/app/code/Magento/Sales/Block/Order/Invoice/Items.php @@ -43,19 +43,19 @@ class Items extends \Magento\Sales\Block\Items\AbstractItems protected $_coreRegistry = null; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Core\Model\Registry $registry * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Core\Model\Registry $registry, array $data = array() ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Sales/Block/Order/Item/Renderer/DefaultRenderer.php b/app/code/Magento/Sales/Block/Order/Item/Renderer/DefaultRenderer.php index 6b44b07343ce049b0d0c2870edb5d20a5335295e..92f690775d16cf78f9451697f485a45371a0148f 100644 --- a/app/code/Magento/Sales/Block/Order/Item/Renderer/DefaultRenderer.php +++ b/app/code/Magento/Sales/Block/Order/Item/Renderer/DefaultRenderer.php @@ -29,15 +29,8 @@ namespace Magento\Sales\Block\Order\Item\Renderer; /** * Order item render block */ -class DefaultRenderer extends \Magento\Core\Block\Template +class DefaultRenderer extends \Magento\View\Block\Template { - /** - * Filter manager - * - * @var \Magento\Filter\FilterManager - */ - protected $filter; - /** * Magento string lib * @@ -51,26 +44,22 @@ class DefaultRenderer extends \Magento\Core\Block\Template protected $_productOptionFactory; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Stdlib\String $string * @param \Magento\Catalog\Model\Product\OptionFactory $productOptionFactory - * @param \Magento\Filter\FilterManager $filter - * @param \Magento\Stdlib\String $string * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Stdlib\String $string, \Magento\Catalog\Model\Product\OptionFactory $productOptionFactory, - \Magento\Filter\FilterManager $filter, array $data = array() ) { $this->string = $string; $this->_productOptionFactory = $productOptionFactory; - $this->filter = $filter; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } public function setItem(\Magento\Object $item) @@ -179,7 +168,7 @@ class DefaultRenderer extends \Magento\Core\Block\Template $truncatedValue = nl2br($truncatedValue); return array('value' => $truncatedValue); } else { - $truncatedValue = $this->filter->truncate($optionValue, array('length' => 55, 'etc' => '')); + $truncatedValue = $this->filterManager->truncate($optionValue, array('length' => 55, 'etc' => '')); $truncatedValue = nl2br($truncatedValue); } @@ -207,7 +196,7 @@ class DefaultRenderer extends \Magento\Core\Block\Template /** * Return product additional information block * - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ public function getProductAdditionalInformationBlock() { diff --git a/app/code/Magento/Sales/Block/Order/Items.php b/app/code/Magento/Sales/Block/Order/Items.php index fab9485db6c6e4433bc7199d49cd7cfda6df05ab..c5635f4ed399c4bdff8ee728d4fa187ccf1cc7df 100644 --- a/app/code/Magento/Sales/Block/Order/Items.php +++ b/app/code/Magento/Sales/Block/Order/Items.php @@ -43,19 +43,19 @@ class Items extends \Magento\Sales\Block\Items\AbstractItems protected $_coreRegistry = null; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Core\Model\Registry $registry * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Core\Model\Registry $registry, array $data = array() ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Sales/Block/Order/Link.php b/app/code/Magento/Sales/Block/Order/Link.php index 705d747215522cb3993ebe1261615eff7f00fad5..783a125b22e570c9d9cc07e7431b90848a7ff2d2 100644 --- a/app/code/Magento/Sales/Block/Order/Link.php +++ b/app/code/Magento/Sales/Block/Order/Link.php @@ -33,20 +33,20 @@ class Link extends \Magento\Page\Block\Link\Current protected $_registry; /** - * @param \Magento\Core\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData * @param \Magento\App\DefaultPathInterface $defaultPath + * @param \Magento\Core\Model\Registry $registry * @param array $data */ public function __construct( - \Magento\Core\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, \Magento\App\DefaultPathInterface $defaultPath, + \Magento\Core\Model\Registry $registry, array $data = array() ) { - parent::__construct($coreData, $context, $defaultPath, $data); + parent::__construct($context, $coreData, $defaultPath, $data); $this->_registry = $registry; } diff --git a/app/code/Magento/Sales/Block/Order/PrintOrder/Creditmemo.php b/app/code/Magento/Sales/Block/Order/PrintOrder/Creditmemo.php index 451275416eb0e5fece180b7dd5b2aa0ceed4dfaa..fdbbbf0dccb20d1116a728e3ade0ccccc99ef615 100644 --- a/app/code/Magento/Sales/Block/Order/PrintOrder/Creditmemo.php +++ b/app/code/Magento/Sales/Block/Order/PrintOrder/Creditmemo.php @@ -39,19 +39,19 @@ class Creditmemo extends \Magento\Sales\Block\Items\AbstractItems protected $_coreRegistry = null; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Core\Model\Registry $registry * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Core\Model\Registry $registry, array $data = array() ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _prepareLayout() @@ -99,7 +99,7 @@ class Creditmemo extends \Magento\Sales\Block\Items\AbstractItems return $this->_coreRegistry->registry('current_creditmemo'); } - protected function _prepareItem(\Magento\Core\Block\AbstractBlock $renderer) + protected function _prepareItem(\Magento\View\Block\AbstractBlock $renderer) { $renderer->setPrintStatus(true); return parent::_prepareItem($renderer); diff --git a/app/code/Magento/Sales/Block/Order/PrintOrder/Invoice.php b/app/code/Magento/Sales/Block/Order/PrintOrder/Invoice.php index 0109513eb3ac326fc3da3d89930d1639c6589611..9be5e65d40788d0ad15b97b7a3b60a41808d2a31 100644 --- a/app/code/Magento/Sales/Block/Order/PrintOrder/Invoice.php +++ b/app/code/Magento/Sales/Block/Order/PrintOrder/Invoice.php @@ -39,19 +39,19 @@ class Invoice extends \Magento\Sales\Block\Items\AbstractItems protected $_coreRegistry = null; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Core\Model\Registry $registry * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Core\Model\Registry $registry, array $data = array() ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _prepareLayout() @@ -100,7 +100,7 @@ class Invoice extends \Magento\Sales\Block\Items\AbstractItems return $this->_coreRegistry->registry('current_invoice'); } - protected function _prepareItem(\Magento\Core\Block\AbstractBlock $renderer) + protected function _prepareItem(\Magento\View\Block\AbstractBlock $renderer) { $renderer->setPrintStatus(true); return parent::_prepareItem($renderer); diff --git a/app/code/Magento/Sales/Block/Order/PrintOrder/Shipment.php b/app/code/Magento/Sales/Block/Order/PrintOrder/Shipment.php index edca37e2b69b4dc9050d38f8b96fa6f542f4f664..81b3a5720d0a419ed2a846898bb374c623e33832 100644 --- a/app/code/Magento/Sales/Block/Order/PrintOrder/Shipment.php +++ b/app/code/Magento/Sales/Block/Order/PrintOrder/Shipment.php @@ -53,19 +53,19 @@ class Shipment extends \Magento\Sales\Block\Items\AbstractItems protected $_coreRegistry = null; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Core\Model\Registry $registry * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Core\Model\Registry $registry, array $data = array() ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** @@ -138,7 +138,7 @@ class Shipment extends \Magento\Sales\Block\Items\AbstractItems return $this->_coreRegistry->registry('current_shipment'); } - protected function _prepareItem(\Magento\Core\Block\AbstractBlock $renderer) + protected function _prepareItem(\Magento\View\Block\AbstractBlock $renderer) { $renderer->setPrintStatus(true); diff --git a/app/code/Magento/Sales/Block/Order/PrintShipment.php b/app/code/Magento/Sales/Block/Order/PrintShipment.php index 85473cad80570c456f3727f0c8a26fb35c7cceb6..bff6cf0fa6baa6549202f9cd31e644c760a7737d 100644 --- a/app/code/Magento/Sales/Block/Order/PrintShipment.php +++ b/app/code/Magento/Sales/Block/Order/PrintShipment.php @@ -43,19 +43,19 @@ class PrintShipment extends \Magento\Sales\Block\Items\AbstractItems protected $_coreRegistry = null; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Core\Model\Registry $registry * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Core\Model\Registry $registry, array $data = array() ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _prepareLayout() @@ -79,7 +79,7 @@ class PrintShipment extends \Magento\Sales\Block\Items\AbstractItems return $this->_coreRegistry->registry('current_order'); } - protected function _prepareItem(\Magento\Core\Block\AbstractBlock $renderer) + protected function _prepareItem(\Magento\View\Block\AbstractBlock $renderer) { $renderer->setPrintStatus(true); diff --git a/app/code/Magento/Sales/Block/Order/Recent.php b/app/code/Magento/Sales/Block/Order/Recent.php index 327513c11ae98e063ea6407b84d8d7f4b23e60e0..603339c14d8ac6a439f22da0ab3a75f4762ca52f 100644 --- a/app/code/Magento/Sales/Block/Order/Recent.php +++ b/app/code/Magento/Sales/Block/Order/Recent.php @@ -29,7 +29,7 @@ */ namespace Magento\Sales\Block\Order; -class Recent extends \Magento\Core\Block\Template +class Recent extends \Magento\View\Block\Template { /** * @var \Magento\Sales\Model\Resource\Order\CollectionFactory @@ -47,16 +47,16 @@ class Recent extends \Magento\Core\Block\Template protected $_orderConfig; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Sales\Model\Resource\Order\CollectionFactory $orderCollectionFactory * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Sales\Model\Order\Config $orderConfig * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Sales\Model\Resource\Order\CollectionFactory $orderCollectionFactory, \Magento\Customer\Model\Session $customerSession, \Magento\Sales\Model\Order\Config $orderConfig, @@ -65,7 +65,7 @@ class Recent extends \Magento\Core\Block\Template $this->_orderCollectionFactory = $orderCollectionFactory; $this->_customerSession = $customerSession; $this->_orderConfig = $orderConfig; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _construct() diff --git a/app/code/Magento/Sales/Block/Order/Shipment.php b/app/code/Magento/Sales/Block/Order/Shipment.php index 4434dce4ba77ab62a795e342b775095d6e8e9c4d..5febabbfb3e86ab7a552a27fd1b6965ed1f05cb6 100644 --- a/app/code/Magento/Sales/Block/Order/Shipment.php +++ b/app/code/Magento/Sales/Block/Order/Shipment.php @@ -29,7 +29,7 @@ */ namespace Magento\Sales\Block\Order; -class Shipment extends \Magento\Core\Block\Template +class Shipment extends \Magento\View\Block\Template { /** * @var string @@ -49,22 +49,22 @@ class Shipment extends \Magento\Core\Block\Template protected $_customerSession; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Core\Model\Registry $registry * @param \Magento\Customer\Model\Session $customerSession * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Core\Model\Registry $registry, \Magento\Customer\Model\Session $customerSession, array $data = array() ) { $this->_coreRegistry = $registry; $this->_customerSession = $customerSession; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _prepareLayout() diff --git a/app/code/Magento/Sales/Block/Order/Shipment/Items.php b/app/code/Magento/Sales/Block/Order/Shipment/Items.php index d97696458aea68806a44a5215d2b6fa952ac1b65..99606bb83bfecf08cf85cd118dca77166749a1cd 100644 --- a/app/code/Magento/Sales/Block/Order/Shipment/Items.php +++ b/app/code/Magento/Sales/Block/Order/Shipment/Items.php @@ -43,19 +43,19 @@ class Items extends \Magento\Sales\Block\Items\AbstractItems protected $_coreRegistry = null; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Core\Model\Registry $registry * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Core\Model\Registry $registry, array $data = array() ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Sales/Block/Order/Totals.php b/app/code/Magento/Sales/Block/Order/Totals.php index 37c2114eebf44b3285046a86e491bfacc842eeb0..837b3eb68b7fee109ef800e4be738485132b222f 100644 --- a/app/code/Magento/Sales/Block/Order/Totals.php +++ b/app/code/Magento/Sales/Block/Order/Totals.php @@ -25,7 +25,7 @@ */ namespace Magento\Sales\Block\Order; -class Totals extends \Magento\Core\Block\Template +class Totals extends \Magento\View\Block\Template { /** * Associated array of totals @@ -46,19 +46,19 @@ class Totals extends \Magento\Core\Block\Template protected $_coreRegistry = null; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Core\Model\Registry $registry * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Core\Model\Registry $registry, array $data = array() ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Sales/Block/Order/View.php b/app/code/Magento/Sales/Block/Order/View.php index 0628ff92a8e314a399d7263c579203e77306aad3..aa532d026f989923ee60076646023ff4c40766f6 100644 --- a/app/code/Magento/Sales/Block/Order/View.php +++ b/app/code/Magento/Sales/Block/Order/View.php @@ -29,7 +29,7 @@ */ namespace Magento\Sales\Block\Order; -class View extends \Magento\Core\Block\Template +class View extends \Magento\View\Block\Template { /** * @var string @@ -49,22 +49,22 @@ class View extends \Magento\Core\Block\Template protected $_customerSession; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Core\Model\Registry $registry * @param \Magento\Customer\Model\Session $customerSession * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Core\Model\Registry $registry, \Magento\Customer\Model\Session $customerSession, array $data = array() ) { $this->_coreRegistry = $registry; $this->_customerSession = $customerSession; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _prepareLayout() diff --git a/app/code/Magento/Sales/Block/Payment/Form/Billing/Agreement.php b/app/code/Magento/Sales/Block/Payment/Form/Billing/Agreement.php index cf55ca3bf6af6915d931fd2661cca523698ec3e3..39363c0452ccdbe1c6d28f0b6eb2c7ae98eac624 100644 --- a/app/code/Magento/Sales/Block/Payment/Form/Billing/Agreement.php +++ b/app/code/Magento/Sales/Block/Payment/Form/Billing/Agreement.php @@ -42,19 +42,19 @@ class Agreement extends \Magento\Payment\Block\Form protected $_agreementFactory; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Sales\Model\Billing\AgreementFactory $agreementFactory * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Sales\Model\Billing\AgreementFactory $agreementFactory, array $data = array() ) { $this->_agreementFactory = $agreementFactory; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _construct() diff --git a/app/code/Magento/Sales/Block/Recurring/Profile/Grid.php b/app/code/Magento/Sales/Block/Recurring/Profile/Grid.php index 5e59d7df117e480944e8a0da0021356761de9d15..b1136de470f96f7459adbf350746a2ebb1af8e7d 100644 --- a/app/code/Magento/Sales/Block/Recurring/Profile/Grid.php +++ b/app/code/Magento/Sales/Block/Recurring/Profile/Grid.php @@ -41,11 +41,6 @@ class Grid extends \Magento\Sales\Block\Recurring\Profiles */ protected $_recurringProfile; - /** - * @var \Magento\Core\Model\StoreManager - */ - protected $_storeManager; - /** * Profiles collection * @@ -54,25 +49,23 @@ class Grid extends \Magento\Sales\Block\Recurring\Profiles protected $_profiles = null; /** - * @param \Magento\Core\Block\Template\Context $context + * @param \Magento\View\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Sales\Model\Recurring\Profile $profile * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Core\Model\StoreManager $storeManager - * @param \Magento\Core\Helper\Data $coreData * @param array $data */ public function __construct( - \Magento\Core\Block\Template\Context $context, + \Magento\View\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Sales\Model\Recurring\Profile $profile, \Magento\Core\Model\Registry $registry, - \Magento\Core\Model\StoreManager $storeManager, - \Magento\Core\Helper\Data $coreData, array $data = array() ) { - parent::__construct($coreData, $context, $data); $this->_recurringProfile = $profile; $this->_registry = $registry; - $this->_storeManager = $storeManager; + parent::__construct($context, $coreData, $data); + } /** @@ -137,7 +130,7 @@ class Grid extends \Magento\Sales\Block\Recurring\Profiles $profiles = array(); $store = $this->_storeManager->getStore(); foreach ($this->_profiles as $profile) { - $profile->setStore($store)->setLocale($this->locale); + $profile->setStore($store)->setLocale($this->_locale); $profiles[] = new \Magento\Object(array( 'reference_id' => $profile->getReferenceId(), 'reference_id_link_url' => $this->getUrl( diff --git a/app/code/Magento/Sales/Block/Recurring/Profile/Related/Orders/Grid.php b/app/code/Magento/Sales/Block/Recurring/Profile/Related/Orders/Grid.php index 309551ceac0d90ace5f29285180a697415e24d97..23caafb65c4c70090afd41dd53b86a09e0893c1b 100644 --- a/app/code/Magento/Sales/Block/Recurring/Profile/Related/Orders/Grid.php +++ b/app/code/Magento/Sales/Block/Recurring/Profile/Related/Orders/Grid.php @@ -41,26 +41,22 @@ class Grid extends \Magento\Sales\Block\Recurring\Profile\View protected $_config; /** - * @param \Magento\Core\Block\Template\Context $context + * @param \Magento\View\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Core\Model\StoreManager $storeManager - * @param \Magento\Core\Model\LocaleInterface $locale * @param \Magento\Sales\Model\Resource\Order\Collection $collection * @param \Magento\Sales\Model\Order\Config $config - * @param \Magento\Core\Helper\Data $coreData * @param array $data */ public function __construct( - \Magento\Core\Block\Template\Context $context, + \Magento\View\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Core\Model\Registry $registry, - \Magento\Core\Model\StoreManager $storeManager, - \Magento\Core\Model\LocaleInterface $locale, \Magento\Sales\Model\Resource\Order\Collection $collection, \Magento\Sales\Model\Order\Config $config, - \Magento\Core\Helper\Data $coreData, array $data = array() ) { - parent::__construct($context, $registry, $storeManager, $locale, $coreData, $data); + parent::__construct($context, $coreData, $registry, $data); $this->_orderCollection = $collection; $this->_config = $config; } diff --git a/app/code/Magento/Sales/Block/Recurring/Profile/View.php b/app/code/Magento/Sales/Block/Recurring/Profile/View.php index cd0d6bf8f9e430aef626e3bc48dfed31a7c7c3b9..388cf363ccf5968f8080f08770f464c9363a3945 100644 --- a/app/code/Magento/Sales/Block/Recurring/Profile/View.php +++ b/app/code/Magento/Sales/Block/Recurring/Profile/View.php @@ -29,7 +29,7 @@ */ namespace Magento\Sales\Block\Recurring\Profile; -class View extends \Magento\Core\Block\Template +class View extends \Magento\View\Block\Template { /** * @var \Magento\Sales\Model\Recurring\Profile @@ -62,16 +62,6 @@ class View extends \Magento\Core\Block\Template */ protected $_registry; - /** - * @var \Magento\Core\Model\StoreManager - */ - protected $_storeManager; - - /** - * @var \Magento\Core\Model\LocaleInterface - */ - protected $_locale; - /** * Path to template file in theme. * @@ -80,25 +70,20 @@ class View extends \Magento\Core\Block\Template protected $_template = 'recurring/profile/view/info.phtml'; /** - * @param \Magento\Core\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Core\Model\StoreManager $storeManager - * @param \Magento\Core\Model\LocaleInterface $locale + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry * @param array $data */ public function __construct( - \Magento\Core\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - \Magento\Core\Model\StoreManager $storeManager, - \Magento\Core\Model\LocaleInterface $locale, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, array $data = array() ) { - parent::__construct($coreData, $context, $data); $this->_registry = $registry; - $this->_storeManager = $storeManager; - $this->_locale = $locale; + parent::__construct($context, $coreData, $data); + } /** diff --git a/app/code/Magento/Sales/Block/Recurring/Profile/View/Address.php b/app/code/Magento/Sales/Block/Recurring/Profile/View/Address.php index b5a307b4d50f05a8b8f36f382590cdb8f0d5f51c..b799ff96f25936cafaa35c7868a856ac5d1eed06 100644 --- a/app/code/Magento/Sales/Block/Recurring/Profile/View/Address.php +++ b/app/code/Magento/Sales/Block/Recurring/Profile/View/Address.php @@ -31,26 +31,21 @@ namespace Magento\Sales\Block\Recurring\Profile\View; */ class Address extends \Magento\Sales\Block\Recurring\Profile\View { - /** - * @param \Magento\Core\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Core\Model\StoreManager $storeManager - * @param \Magento\Core\Model\LocaleInterface $locale + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry * @param \Magento\Sales\Model\Order\AddressFactory $addressFactory * @param array $data */ public function __construct( - \Magento\Core\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - \Magento\Core\Model\StoreManager $storeManager, - \Magento\Core\Model\LocaleInterface $locale, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, \Magento\Sales\Model\Order\AddressFactory $addressFactory, array $data = array() ) { - parent::__construct($context, $registry, $storeManager, $locale, $coreData, $data); + parent::__construct($context, $coreData, $registry, $data); $this->_addressFactory = $addressFactory; } diff --git a/app/code/Magento/Sales/Block/Recurring/Profile/View/Item.php b/app/code/Magento/Sales/Block/Recurring/Profile/View/Item.php index 083cc9ac0a52ac89e2b943338b4e36e428f78b1c..3785093d5cfb664befb2b6b04d6ee824a844793f 100644 --- a/app/code/Magento/Sales/Block/Recurring/Profile/View/Item.php +++ b/app/code/Magento/Sales/Block/Recurring/Profile/View/Item.php @@ -41,28 +41,24 @@ class Item extends \Magento\Sales\Block\Recurring\Profile\View protected $_product; /** - * @param \Magento\Core\Block\Template\Context $context + * @param \Magento\View\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Core\Model\StoreManager $storeManager - * @param \Magento\Core\Model\LocaleInterface $locale * @param \Magento\Catalog\Model\Product\Option $option * @param \Magento\Catalog\Model\Product $product - * @param \Magento\Core\Helper\Data $coreData * @param array $data */ public function __construct( - \Magento\Core\Block\Template\Context $context, + \Magento\View\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Core\Model\Registry $registry, - \Magento\Core\Model\StoreManager $storeManager, - \Magento\Core\Model\LocaleInterface $locale, \Magento\Catalog\Model\Product\Option $option, \Magento\Catalog\Model\Product $product, - \Magento\Core\Helper\Data $coreData, array $data = array() ) { $this->_option = $option; $this->_product = $product; - parent::__construct($context, $registry, $storeManager, $locale, $coreData, $data); + parent::__construct($context, $coreData, $registry, $data); } /** diff --git a/app/code/Magento/Sales/Block/Recurring/Profiles.php b/app/code/Magento/Sales/Block/Recurring/Profiles.php index e22544cc343ccd940fb085a03ec355af7cbf2f9c..728deaa35eb0cf2b1854afc4e36738a420916bf2 100644 --- a/app/code/Magento/Sales/Block/Recurring/Profiles.php +++ b/app/code/Magento/Sales/Block/Recurring/Profiles.php @@ -29,7 +29,7 @@ */ namespace Magento\Sales\Block\Recurring; -class Profiles extends \Magento\Core\Block\Template +class Profiles extends \Magento\View\Block\Template { /** diff --git a/app/code/Magento/Sales/Block/Reorder/Sidebar.php b/app/code/Magento/Sales/Block/Reorder/Sidebar.php index bbd47b98c394f346e834e2214f2a6129f364ed48..cd826ab68ec60acb185c9588ba6ae35e6a4b183c 100644 --- a/app/code/Magento/Sales/Block/Reorder/Sidebar.php +++ b/app/code/Magento/Sales/Block/Reorder/Sidebar.php @@ -29,7 +29,7 @@ */ namespace Magento\Sales\Block\Reorder; -class Sidebar extends \Magento\Core\Block\Template +class Sidebar extends \Magento\View\Block\Template { /** * @var string @@ -46,41 +46,31 @@ class Sidebar extends \Magento\Core\Block\Template */ protected $_orderConfig; - /** - * Store list manager - * - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - /** * @var \Magento\Customer\Model\Session */ protected $_customerSession; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Sales\Model\Resource\Order\CollectionFactory $orderCollectionFactory * @param \Magento\Sales\Model\Order\Config $orderConfig - * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Customer\Model\Session $customerSession * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Sales\Model\Resource\Order\CollectionFactory $orderCollectionFactory, \Magento\Sales\Model\Order\Config $orderConfig, - \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Customer\Model\Session $customerSession, array $data = array() ) { $this->_orderCollectionFactory = $orderCollectionFactory; $this->_orderConfig = $orderConfig; - $this->_storeManager = $storeManager; $this->_customerSession = $customerSession; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Sales/Block/Status/Grid/Column/State.php b/app/code/Magento/Sales/Block/Status/Grid/Column/State.php index 5617e747da1c4c407efd718d95b1078b8a6280cc..3066ab14194171ca2f524413d8c01dddb81c633b 100644 --- a/app/code/Magento/Sales/Block/Status/Grid/Column/State.php +++ b/app/code/Magento/Sales/Block/Status/Grid/Column/State.php @@ -33,19 +33,19 @@ class State extends \Magento\Backend\Block\Widget\Grid\Column */ protected $_config; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Sales\Model\Order\Config $config - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Sales\Model\Order\Config $config + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Sales\Model\Order\Config $config, - array $data = array() - ) { - parent::__construct($coreData, $context, $data); + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Sales\Model\Order\Config $config, + array $data = array() + ) { + parent::__construct($context, $coreData, $data); $this->_config = $config; } diff --git a/app/code/Magento/Sales/Block/Widget/Guest/Form.php b/app/code/Magento/Sales/Block/Widget/Guest/Form.php index 33d23fa082297b3eaa4d5c4919371605a11f3147..30468f65764ba3912c4f3d9357f0fa38662ff9c1 100644 --- a/app/code/Magento/Sales/Block/Widget/Guest/Form.php +++ b/app/code/Magento/Sales/Block/Widget/Guest/Form.php @@ -30,7 +30,7 @@ namespace Magento\Sales\Block\Widget\Guest; class Form - extends \Magento\Core\Block\Template + extends \Magento\View\Block\Template implements \Magento\Widget\Block\BlockInterface { /** @@ -39,19 +39,19 @@ class Form protected $_customerSession; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Customer\Model\Session $customerSession * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Customer\Model\Session $customerSession, array $data = array() ) { $this->_customerSession = $customerSession; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** @@ -71,7 +71,7 @@ class Form */ public function getTypeSelectHtml() { - $select = $this->getLayout()->createBlock('Magento\Core\Block\Html\Select') + $select = $this->getLayout()->createBlock('Magento\View\Block\Html\Select') ->setData(array( 'id' => 'quick_search_type_id', 'class' => 'select guest-select', diff --git a/app/code/Magento/Sales/Controller/AbstractController.php b/app/code/Magento/Sales/Controller/AbstractController.php index abd58bf234283623e8309cd08754042800d42384..7dcfd917fa9cc652340812cb4afe827c684f8bbd 100644 --- a/app/code/Magento/Sales/Controller/AbstractController.php +++ b/app/code/Magento/Sales/Controller/AbstractController.php @@ -29,7 +29,7 @@ */ namespace Magento\Sales\Controller; -abstract class AbstractController extends \Magento\Core\Controller\Front\Action +abstract class AbstractController extends \Magento\App\Action\Action { /** * Core registry @@ -39,11 +39,11 @@ abstract class AbstractController extends \Magento\Core\Controller\Front\Action protected $_coreRegistry = null; /** - * @param \Magento\Core\Controller\Varien\Action\Context $context + * @param \Magento\App\Action\Context $context * @param \Magento\Core\Model\Registry $coreRegistry */ public function __construct( - \Magento\Core\Controller\Varien\Action\Context $context, + \Magento\App\Action\Context $context, \Magento\Core\Model\Registry $coreRegistry ) { $this->_coreRegistry = $coreRegistry; @@ -77,14 +77,14 @@ abstract class AbstractController extends \Magento\Core\Controller\Front\Action return; } - $this->loadLayout(); - $this->_initLayoutMessages('Magento\Catalog\Model\Session'); + $this->_view->loadLayout(); + $this->_view->getLayout()->initMessages('Magento\Catalog\Model\Session'); - $navigationBlock = $this->getLayout()->getBlock('customer_account_navigation'); + $navigationBlock = $this->_view->getLayout()->getBlock('customer_account_navigation'); if ($navigationBlock) { $navigationBlock->setActive('sales/order/history'); } - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -99,7 +99,7 @@ abstract class AbstractController extends \Magento\Core\Controller\Front\Action $orderId = (int) $this->getRequest()->getParam('order_id'); } if (!$orderId) { - $this->_forward('noRoute'); + $this->_forward('noroute'); return false; } @@ -189,8 +189,8 @@ abstract class AbstractController extends \Magento\Core\Controller\Front\Action if (!$this->_loadValidOrder()) { return; } - $this->loadLayout('print'); - $this->renderLayout(); + $this->_view->loadLayout('print'); + $this->_view->renderLayout(); } /** @@ -212,8 +212,8 @@ abstract class AbstractController extends \Magento\Core\Controller\Front\Action if (isset($invoice)) { $this->_coreRegistry->register('current_invoice', $invoice); } - $this->loadLayout('print'); - $this->renderLayout(); + $this->_view->loadLayout('print'); + $this->_view->renderLayout(); } else { if ($this->_objectManager->get('Magento\Customer\Model\Session')->isLoggedIn()) { $this->_redirect('*/*/history'); @@ -241,8 +241,8 @@ abstract class AbstractController extends \Magento\Core\Controller\Front\Action if (isset($shipment)) { $this->_coreRegistry->register('current_shipment', $shipment); } - $this->loadLayout('print'); - $this->renderLayout(); + $this->_view->loadLayout('print'); + $this->_view->renderLayout(); } else { if ($this->_objectManager->get('Magento\Customer\Model\Session')->isLoggedIn()) { $this->_redirect('*/*/history'); @@ -271,8 +271,8 @@ abstract class AbstractController extends \Magento\Core\Controller\Front\Action if (isset($creditmemo)) { $this->_coreRegistry->register('current_creditmemo', $creditmemo); } - $this->loadLayout('print'); - $this->renderLayout(); + $this->_view->loadLayout('print'); + $this->_view->renderLayout(); } else { if ($this->_objectManager->get('Magento\Customer\Model\Session')->isLoggedIn()) { $this->_redirect('*/*/history'); diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Billing/Agreement.php b/app/code/Magento/Sales/Controller/Adminhtml/Billing/Agreement.php index 2c23216d1be9f08d9373fd47b7c1bec0875d2fc9..2d59a3cc15994e99dce961ec6c59a53f1c483ab6 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Billing/Agreement.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Billing/Agreement.php @@ -29,7 +29,7 @@ */ namespace Magento\Sales\Controller\Adminhtml\Billing; -class Agreement extends \Magento\Backend\Controller\Adminhtml\Action +class Agreement extends \Magento\Backend\App\Action { /** * Core registry @@ -39,11 +39,11 @@ class Agreement extends \Magento\Backend\Controller\Adminhtml\Action protected $_coreRegistry = null; /** - * @param \Magento\Backend\Controller\Context $context + * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Core\Model\Registry $coreRegistry */ public function __construct( - \Magento\Backend\Controller\Context $context, + \Magento\Backend\App\Action\Context $context, \Magento\Core\Model\Registry $coreRegistry ) { $this->_coreRegistry = $coreRegistry; @@ -56,11 +56,11 @@ class Agreement extends \Magento\Backend\Controller\Adminhtml\Action */ public function indexAction() { - $this->_title(__('Billing Agreements')); + $this->_title->add(__('Billing Agreements')); - $this->loadLayout() - ->_setActiveMenu('Magento_Sales::sales_billing_agreement') - ->renderLayout(); + $this->_view->loadLayout(); + $this->_setActiveMenu('Magento_Sales::sales_billing_agreement'); + $this->_view->renderLayout(); } /** @@ -69,8 +69,8 @@ class Agreement extends \Magento\Backend\Controller\Adminhtml\Action */ public function gridAction() { - $this->loadLayout(false) - ->renderLayout(); + $this->_view->loadLayout(false); + $this->_view->renderLayout(); } /** @@ -82,12 +82,12 @@ class Agreement extends \Magento\Backend\Controller\Adminhtml\Action $agreementModel = $this->_initBillingAgreement(); if ($agreementModel) { - $this->_title(__('Billing Agreements')) - ->_title(sprintf("#%s", $agreementModel->getReferenceId())); + $this->_title->add(__('Billing Agreements')); + $this->_title->add(sprintf("#%s", $agreementModel->getReferenceId())); - $this->loadLayout() - ->_setActiveMenu('Magento_Sales::sales_billing_agreement') - ->renderLayout(); + $this->_view->loadLayout(); + $this->_setActiveMenu('Magento_Sales::sales_billing_agreement'); + $this->_view->renderLayout(); return; } @@ -102,8 +102,8 @@ class Agreement extends \Magento\Backend\Controller\Adminhtml\Action public function ordersGridAction() { $this->_initBillingAgreement(); - $this->loadLayout(false) - ->renderLayout(); + $this->_view->loadLayout(false); + $this->_view->renderLayout(); } /** @@ -113,8 +113,8 @@ class Agreement extends \Magento\Backend\Controller\Adminhtml\Action public function customerGridAction() { $this->_initCustomer(); - $this->loadLayout(false) - ->renderLayout(); + $this->_view->loadLayout(false); + $this->_view->renderLayout(); } /** diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Creditmemo.php b/app/code/Magento/Sales/Controller/Adminhtml/Creditmemo.php index c96b3bfd68b78bb367b016377053f2b9e26d663c..8e25d6ee57ad5f7f5a6256373a599b4d613b2f84 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Creditmemo.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Creditmemo.php @@ -39,8 +39,8 @@ class Creditmemo extends \Magento\Sales\Controller\Adminhtml\Creditmemo\Abstract public function exportCsvAction() { $fileName = 'creditmemos.csv'; - $grid = $this->getLayout()->createBlock('Magento\Sales\Block\Adminhtml\Creditmemo\Grid'); - $this->_prepareDownloadResponse($fileName, $grid->getCsvFile()); + $grid = $this->_view->getLayout()->createBlock('Magento\Sales\Block\Adminhtml\Creditmemo\Grid'); + return $this->_fileFactory->create($fileName, $grid->getCsvFile()); } /** @@ -49,8 +49,8 @@ class Creditmemo extends \Magento\Sales\Controller\Adminhtml\Creditmemo\Abstract public function exportExcelAction() { $fileName = 'creditmemos.xml'; - $grid = $this->getLayout()->createBlock('Magento\Sales\Block\Adminhtml\Creditmemo\Grid'); - $this->_prepareDownloadResponse($fileName, $grid->getExcelFile($fileName)); + $grid = $this->_view->getLayout()->createBlock('Magento\Sales\Block\Adminhtml\Creditmemo\Grid'); + return $this->_fileFactory->create($fileName, $grid->getExcelFile($fileName)); } /** @@ -58,7 +58,7 @@ class Creditmemo extends \Magento\Sales\Controller\Adminhtml\Creditmemo\Abstract */ public function indexAction() { - $this->_title(__('Credit Memos')); + $this->_title->add(__('Credit Memos')); parent::indexAction(); } } diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Creditmemo/AbstractCreditmemo.php b/app/code/Magento/Sales/Controller/Adminhtml/Creditmemo/AbstractCreditmemo.php index 4d035e0ff2957941f15ed68820b2b69ea2c0e492..f8d5310a097aa42c5051860bb014d6ebbed18074 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Creditmemo/AbstractCreditmemo.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Creditmemo/AbstractCreditmemo.php @@ -31,8 +31,25 @@ */ namespace Magento\Sales\Controller\Adminhtml\Creditmemo; -class AbstractCreditmemo extends \Magento\Backend\Controller\Adminhtml\Action +class AbstractCreditmemo extends \Magento\Backend\App\Action { + /** + * @var \Magento\App\Response\Http\FileFactory + */ + protected $_fileFactory; + + /** + * @param \Magento\Backend\App\Action\Context $context + * @param \Magento\App\Response\Http\FileFactory $fileFactory + */ + public function __construct( + \Magento\Backend\App\Action\Context $context, + \Magento\App\Response\Http\FileFactory $fileFactory + ) { + $this->_fileFactory = $fileFactory; + parent::__construct($context); + } + /** * Init layout, menu and breadcrumb * @@ -40,8 +57,8 @@ class AbstractCreditmemo extends \Magento\Backend\Controller\Adminhtml\Action */ protected function _initAction() { - $this->loadLayout() - ->_setActiveMenu('Magento_Sales::sales_creditmemo') + $this->_view->loadLayout(); + $this->_setActiveMenu('Magento_Sales::sales_creditmemo') ->_addBreadcrumb(__('Sales'), __('Sales')) ->_addBreadcrumb(__('Credit Memos'), __('Credit Memos')); return $this; @@ -53,8 +70,8 @@ class AbstractCreditmemo extends \Magento\Backend\Controller\Adminhtml\Action public function indexAction() { $this->_initAction() - ->_addContent($this->getLayout()->createBlock('Magento\Sales\Block\Adminhtml\Creditmemo')) - ->renderLayout(); + ->_addContent($this->_view->getLayout()->createBlock('Magento\Sales\Block\Adminhtml\Creditmemo')); + $this->_view->renderLayout(); } /** @@ -65,7 +82,7 @@ class AbstractCreditmemo extends \Magento\Backend\Controller\Adminhtml\Action if ($creditmemoId = $this->getRequest()->getParam('creditmemo_id')) { $this->_forward('view', 'order_creditmemo', null, array('come_from' => 'sales_creditmemo')); } else { - $this->_forward('noRoute'); + $this->_forward('noroute'); } } @@ -111,7 +128,7 @@ class AbstractCreditmemo extends \Magento\Backend\Controller\Adminhtml\Action } $date = $this->_objectManager->get('Magento\Core\Model\Date')->date('Y-m-d_H-i-s'); - return $this->_prepareDownloadResponse('creditmemo' . $date . '.pdf', $pdf->render(), 'application/pdf'); + return $this->_fileFactory->create('creditmemo' . $date . '.pdf', $pdf->render(), 'application/pdf'); } $this->_redirect('sales/*/'); } @@ -126,10 +143,10 @@ class AbstractCreditmemo extends \Magento\Backend\Controller\Adminhtml\Action $pdf = $this->_objectManager->create('Magento\Sales\Model\Order\Pdf\Creditmemo') ->getPdf(array($creditmemo)); $date = $this->_objectManager->get('Magento\Core\Model\Date')->date('Y-m-d_H-i-s'); - $this->_prepareDownloadResponse('creditmemo' . $date . '.pdf', $pdf->render(), 'application/pdf'); + return $this->_fileFactory->create('creditmemo' . $date . '.pdf', $pdf->render(), 'application/pdf'); } } else { - $this->_forward('noRoute'); + $this->_forward('noroute'); } } diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Invoice.php b/app/code/Magento/Sales/Controller/Adminhtml/Invoice.php index 8cf5779656ed9e4c9d66e480db7318c4106bbba2..0dc2a2618e6450082045fbfa976ed1c025f7b48c 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Invoice.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Invoice.php @@ -39,8 +39,8 @@ class Invoice extends \Magento\Sales\Controller\Adminhtml\Invoice\AbstractInvoic public function exportCsvAction() { $fileName = 'invoices.csv'; - $grid = $this->getLayout()->createBlock('Magento\Sales\Block\Adminhtml\Invoice\Grid'); - $this->_prepareDownloadResponse($fileName, $grid->getCsvFile()); + $grid = $this->_view->getLayout()->createBlock('Magento\Sales\Block\Adminhtml\Invoice\Grid'); + return $this->_fileFactory->create($fileName, $grid->getCsvFile()); } /** @@ -49,7 +49,7 @@ class Invoice extends \Magento\Sales\Controller\Adminhtml\Invoice\AbstractInvoic public function exportExcelAction() { $fileName = 'invoices.xml'; - $grid = $this->getLayout()->createBlock('Magento\Sales\Block\Adminhtml\Invoice\Grid'); - $this->_prepareDownloadResponse($fileName, $grid->getExcelFile($fileName)); + $grid = $this->_view->getLayout()->createBlock('Magento\Sales\Block\Adminhtml\Invoice\Grid'); + return $this->_fileFactory->create($fileName, $grid->getExcelFile($fileName)); } } diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Invoice/AbstractInvoice.php b/app/code/Magento/Sales/Controller/Adminhtml/Invoice/AbstractInvoice.php index a1c56f63357713292b3a78ee966f6f9de5c0bdf5..65ddd74d129bd8e81cd4fa558c6fda8d62e8d233 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Invoice/AbstractInvoice.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Invoice/AbstractInvoice.php @@ -32,8 +32,24 @@ namespace Magento\Sales\Controller\Adminhtml\Invoice; class AbstractInvoice - extends \Magento\Backend\Controller\Adminhtml\Action + extends \Magento\Backend\App\Action { + /** + * @var \Magento\App\Response\Http\FileFactory + */ + protected $_fileFactory; + + /** + * @param \Magento\Backend\App\Action\Context $context + * @param \Magento\App\Response\Http\FileFactory $fileFactory + */ + public function __construct( + \Magento\Backend\App\Action\Context $context, + \Magento\App\Response\Http\FileFactory $fileFactory + ) { + $this->_fileFactory = $fileFactory; + parent::__construct($context); + } /** * Init layout, menu and breadcrumb * @@ -41,8 +57,8 @@ class AbstractInvoice */ protected function _initAction() { - $this->loadLayout() - ->_setActiveMenu('Magento_Sales::sales_invoice') + $this->_view->loadLayout(); + $this->_setActiveMenu('Magento_Sales::sales_invoice') ->_addBreadcrumb(__('Sales'), __('Sales')) ->_addBreadcrumb(__('Invoices'), __('Invoices')); return $this; @@ -53,9 +69,9 @@ class AbstractInvoice */ public function gridAction() { - $this->loadLayout(); + $this->_view->loadLayout(); $this->getResponse()->setBody( - $this->getLayout()->createBlock('Magento\Sales\Block\Adminhtml\Invoice\Grid')->toHtml() + $this->_view->getLayout()->createBlock('Magento\Sales\Block\Adminhtml\Invoice\Grid')->toHtml() ); } @@ -64,11 +80,11 @@ class AbstractInvoice */ public function indexAction() { - $this->_title(__('Invoices')); + $this->_title->add(__('Invoices')); $this->_initAction() - ->_addContent($this->getLayout()->createBlock('Magento\Sales\Block\Adminhtml\Invoice')) - ->renderLayout(); + ->_addContent($this->_view->getLayout()->createBlock('Magento\Sales\Block\Adminhtml\Invoice')); + $this->_view->renderLayout(); } /** @@ -79,7 +95,7 @@ class AbstractInvoice if ($invoiceId = $this->getRequest()->getParam('invoice_id')) { $this->_forward('view', 'order_invoice', null, array('come_from'=>'invoice')); } else { - $this->_forward('noRoute'); + $this->_forward('noroute'); } } @@ -114,10 +130,10 @@ class AbstractInvoice if ($invoice) { $pdf = $this->_objectManager->create('Magento\Sales\Model\Order\Pdf\Invoice')->getPdf(array($invoice)); $date = $this->_objectManager->get('Magento\Core\Model\Date')->date('Y-m-d_H-i-s'); - $this->_prepareDownloadResponse('invoice' . $date . '.pdf', $pdf->render(), 'application/pdf'); + return $this->_fileFactory->create('invoice' . $date . '.pdf', $pdf->render(), 'application/pdf'); } } else { - $this->_forward('noRoute'); + $this->_forward('noroute'); } } @@ -137,7 +153,7 @@ class AbstractInvoice } $date = $this->_objectManager->get('Magento\Core\Model\Date')->date('Y-m-d_H-i-s'); - return $this->_prepareDownloadResponse('invoice' . $date . '.pdf', $pdf->render(), 'application/pdf'); + return $this->_fileFactory->create('invoice' . $date . '.pdf', $pdf->render(), 'application/pdf'); } $this->_redirect('sales/*/'); } diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Order.php b/app/code/Magento/Sales/Controller/Adminhtml/Order.php index bcb3048c40e2105b14ef13128500df9632a9aa29..185ee1ac0d178bd21e21a7f2c44e586396429367 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Order.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Order.php @@ -33,7 +33,9 @@ */ namespace Magento\Sales\Controller\Adminhtml; -class Order extends \Magento\Backend\Controller\Adminhtml\Action +use Magento\Backend\App\Action; + +class Order extends \Magento\Backend\App\Action { /** * Array of actions which can be processed without secret key validation @@ -50,14 +52,29 @@ class Order extends \Magento\Backend\Controller\Adminhtml\Action protected $_coreRegistry = null; /** - * @param \Magento\Backend\Controller\Context $context + * @var \Magento\App\Response\Http\FileFactory + */ + protected $_fileFactory; + + /** + * @var \Magento\Core\Model\Translate + */ + protected $_translator; + + /** + * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Core\Model\Registry $coreRegistry + * @param \Magento\App\Response\Http\FileFactory $fileFactory */ public function __construct( - \Magento\Backend\Controller\Context $context, - \Magento\Core\Model\Registry $coreRegistry + Action\Context $context, + \Magento\Core\Model\Registry $coreRegistry, + \Magento\App\Response\Http\FileFactory $fileFactory, + \Magento\Core\Model\Translate $translator ) { $this->_coreRegistry = $coreRegistry; + $this->_fileFactory = $fileFactory; + $this->_translator = $translator; parent::__construct($context); } @@ -68,8 +85,8 @@ class Order extends \Magento\Backend\Controller\Adminhtml\Action */ protected function _initAction() { - $this->loadLayout() - ->_setActiveMenu('Magento_Sales::sales_order') + $this->_view->loadLayout(); + $this->_setActiveMenu('Magento_Sales::sales_order') ->_addBreadcrumb(__('Sales'), __('Sales')) ->_addBreadcrumb(__('Orders'), __('Orders')); return $this; @@ -88,7 +105,7 @@ class Order extends \Magento\Backend\Controller\Adminhtml\Action if (!$order->getId()) { $this->_getSession()->addError(__('This order no longer exists.')); $this->_redirect('sales/*/'); - $this->setFlag('', self::FLAG_NO_DISPATCH, true); + $this->_actionFlag->set('', self::FLAG_NO_DISPATCH, true); return false; } $this->_coreRegistry->register('sales_order', $order); @@ -101,8 +118,9 @@ class Order extends \Magento\Backend\Controller\Adminhtml\Action */ public function indexAction() { - $this->_title(__('Orders')); - $this->_initAction()->renderLayout(); + $this->_title->add(__('Orders')); + $this->_initAction(); + $this->_view->renderLayout(); } /** @@ -110,8 +128,8 @@ class Order extends \Magento\Backend\Controller\Adminhtml\Action */ public function gridAction() { - $this->loadLayout(false); - $this->renderLayout(); + $this->_view->loadLayout(false); + $this->_view->renderLayout(); } /** @@ -119,13 +137,13 @@ class Order extends \Magento\Backend\Controller\Adminhtml\Action */ public function viewAction() { - $this->_title(__('Orders')); + $this->_title->add(__('Orders')); $order = $this->_initOrder(); if ($order) { $this->_initAction(); - $this->_title(sprintf("#%s", $order->getRealOrderId())); - $this->renderLayout(); + $this->_title->add(sprintf("#%s", $order->getRealOrderId())); + $this->_view->renderLayout(); } } @@ -290,8 +308,8 @@ class Order extends \Magento\Backend\Controller\Adminhtml\Action $order->save(); $order->sendOrderUpdateEmail($notify, $comment); - $this->loadLayout('empty'); - $this->renderLayout(); + $this->_view->loadLayout('empty'); + $this->_view->renderLayout(); } catch (\Magento\Core\Exception $e) { $response = array( 'error' => true, @@ -317,7 +335,7 @@ class Order extends \Magento\Backend\Controller\Adminhtml\Action { $this->_initOrder(); $this->getResponse()->setBody( - $this->getLayout()->createBlock('Magento\Sales\Block\Adminhtml\Order\View\Tab\Invoices')->toHtml() + $this->_view->getLayout()->createBlock('Magento\Sales\Block\Adminhtml\Order\View\Tab\Invoices')->toHtml() ); } @@ -328,7 +346,7 @@ class Order extends \Magento\Backend\Controller\Adminhtml\Action { $this->_initOrder(); $this->getResponse()->setBody( - $this->getLayout()->createBlock('Magento\Sales\Block\Adminhtml\Order\View\Tab\Shipments')->toHtml() + $this->_view->getLayout()->createBlock('Magento\Sales\Block\Adminhtml\Order\View\Tab\Shipments')->toHtml() ); } @@ -339,7 +357,7 @@ class Order extends \Magento\Backend\Controller\Adminhtml\Action { $this->_initOrder(); $this->getResponse()->setBody( - $this->getLayout()->createBlock('Magento\Sales\Block\Adminhtml\Order\View\Tab\Creditmemos')->toHtml() + $this->_view->getLayout()->createBlock('Magento\Sales\Block\Adminhtml\Order\View\Tab\Creditmemos')->toHtml() ); } @@ -349,7 +367,8 @@ class Order extends \Magento\Backend\Controller\Adminhtml\Action public function commentsHistoryAction() { $this->_initOrder(); - $html = $this->getLayout()->createBlock('Magento\Sales\Block\Adminhtml\Order\View\Tab\History')->toHtml(); + $html = $this->_view->getLayout() + ->createBlock('Magento\Sales\Block\Adminhtml\Order\View\Tab\History')->toHtml(); if ($this->_translator->isAllowed()) { $this->_translator->processResponseBody($html); } @@ -496,7 +515,7 @@ class Order extends \Magento\Backend\Controller\Adminhtml\Action } } if ($flag) { - return $this->_prepareDownloadResponse( + return $this->_fileFactory->create( 'invoice' . $this->_objectManager->get('Magento\Core\Model\Date')->date('Y-m-d_H-i-s') . '.pdf', $pdf->render(), 'application/pdf' @@ -534,7 +553,7 @@ class Order extends \Magento\Backend\Controller\Adminhtml\Action } } if ($flag) { - return $this->_prepareDownloadResponse( + return $this->_fileFactory->create( 'packingslip' . $this->_objectManager->get('Magento\Core\Model\Date')->date('Y-m-d_H-i-s') . '.pdf', $pdf->render(), 'application/pdf' @@ -572,7 +591,7 @@ class Order extends \Magento\Backend\Controller\Adminhtml\Action } } if ($flag) { - return $this->_prepareDownloadResponse( + return $this->_fileFactory->create( 'creditmemo' . $this->_objectManager->get('Magento\Core\Model\Date')->date('Y-m-d_H-i-s') . '.pdf', $pdf->render(), 'application/pdf' @@ -636,7 +655,7 @@ class Order extends \Magento\Backend\Controller\Adminhtml\Action } } if ($flag) { - return $this->_prepareDownloadResponse( + return $this->_fileFactory->create( 'docs' . $this->_objectManager->get('Magento\Core\Model\Date')->date('Y-m-d_H-i-s') . '.pdf', $pdf->render(), 'application/pdf' @@ -723,11 +742,11 @@ class Order extends \Magento\Backend\Controller\Adminhtml\Action */ public function exportCsvAction() { - $this->loadLayout(); + $this->_view->loadLayout(); $fileName = 'orders.csv'; /** @var \Magento\Backend\Block\Widget\Grid\ExportInterface $exportBlock */ - $exportBlock = $this->getLayout()->getChildBlock('sales.order.grid', 'grid.export'); - $this->_prepareDownloadResponse($fileName, $exportBlock->getCsvFile()); + $exportBlock = $this->_view->getLayout()->getChildBlock('sales.order.grid', 'grid.export'); + return $this->_fileFactory->create($fileName, $exportBlock->getCsvFile()); } /** @@ -735,11 +754,11 @@ class Order extends \Magento\Backend\Controller\Adminhtml\Action */ public function exportExcelAction() { - $this->loadLayout(); + $this->_view->loadLayout(); $fileName = 'orders.xml'; /** @var \Magento\Backend\Block\Widget\Grid\ExportInterface $exportBlock */ - $exportBlock = $this->getLayout()->getChildBlock('sales.order.grid', 'grid.export'); - $this->_prepareDownloadResponse($fileName, $exportBlock->getExcelFile($fileName)); + $exportBlock = $this->_view->getLayout()->getChildBlock('sales.order.grid', 'grid.export'); + return $this->_fileFactory->create($fileName, $exportBlock->getExcelFile($fileName)); } /** @@ -749,8 +768,8 @@ class Order extends \Magento\Backend\Controller\Adminhtml\Action public function transactionsAction() { $this->_initOrder(); - $this->loadLayout(false); - $this->renderLayout(); + $this->_view->loadLayout(false); + $this->_view->renderLayout(); } /** @@ -762,14 +781,14 @@ class Order extends \Magento\Backend\Controller\Adminhtml\Action $address = $this->_objectManager->create('Magento\Sales\Model\Order\Address')->load($addressId); if ($address->getId()) { $this->_coreRegistry->register('order_address', $address); - $this->loadLayout(); + $this->_view->loadLayout(); // Do not display VAT validation button on edit order address form - $addressFormContainer = $this->getLayout()->getBlock('sales_order_address.form.container'); + $addressFormContainer = $this->_view->getLayout()->getBlock('sales_order_address.form.container'); if ($addressFormContainer) { $addressFormContainer->getChildBlock('form')->setDisplayVatValidationButton(false); } - $this->renderLayout(); + $this->_view->renderLayout(); } else { $this->_redirect('sales/*/'); } diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Order/Create.php b/app/code/Magento/Sales/Controller/Adminhtml/Order/Create.php index 4516a53e762cfc0843d96919bda09182ab2d865d..6a427b22c64cfccf3d7842d6d397e3391da5c6db 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Order/Create.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/Create.php @@ -33,16 +33,22 @@ */ namespace Magento\Sales\Controller\Adminhtml\Order; -class Create extends \Magento\Backend\Controller\Adminhtml\Action +use Magento\Backend\App\Action; + +class Create extends \Magento\Backend\App\Action { /** - * Additional initialization - * + * @param Action\Context $context + * @param \Magento\Catalog\Helper\Product $productHelper + * @param \Magento\App\Action\Title $title */ - protected function _construct() + public function __construct( + Action\Context $context, + \Magento\Catalog\Helper\Product $productHelper + ) { - // During order creation in the backend admin has ability to add any products to order - $this->_objectManager->get('Magento\Catalog\Helper\Product')->setSkipSaleableCheck(true); + parent::__construct($context); + $productHelper->setSkipSaleableCheck(true); } /** @@ -334,12 +340,13 @@ class Create extends \Magento\Backend\Controller\Adminhtml\Action */ public function indexAction() { - $this->_title(__('Orders'))->_title(__('New Order')); + $this->_title->add(__('Orders')); + $this->_title->add(__('New Order')); $this->_initSession(); - $this->loadLayout(); + $this->_view->loadLayout(); - $this->_setActiveMenu('Magento_Sales::sales_order') - ->renderLayout(); + $this->_setActiveMenu('Magento_Sales::sales_order'); + $this->_view->renderLayout(); } @@ -349,7 +356,7 @@ class Create extends \Magento\Backend\Controller\Adminhtml\Action $orderId = $this->getRequest()->getParam('order_id'); $order = $this->_objectManager->create('Magento\Sales\Model\Order')->load($orderId); if (!$this->_objectManager->get('Magento\Sales\Helper\Reorder')->canReorder($order)) { - return $this->_forward('noRoute'); + return $this->_forward('noroute'); } if ($order->getId()) { @@ -394,7 +401,7 @@ class Create extends \Magento\Backend\Controller\Adminhtml\Action $asJson= $request->getParam('json'); $block = $request->getParam('block'); - $update = $this->getLayout()->getUpdate(); + $update = $this->_view->getLayout()->getUpdate(); if ($asJson) { $update->addHandle('sales_order_create_load_block_json'); } else { @@ -411,8 +418,10 @@ class Create extends \Magento\Backend\Controller\Adminhtml\Action $update->addHandle('sales_order_create_load_block_' . $block); } } - $this->loadLayoutUpdates()->generateLayoutXml()->generateLayoutBlocks(); - $result = $this->getLayout()->renderElement('content'); + $this->_view->loadLayoutUpdates(); + $this->_view->generateLayoutXml(); + $this->_view->generateLayoutBlocks(); + $result = $this->_view->getLayout()->renderElement('content'); if ($request->getParam('as_js_varname')) { $this->_objectManager->get('Magento\Adminhtml\Model\Session')->setUpdateResult($result); $this->_redirect('sales/*/showUpdateResult'); @@ -571,7 +580,7 @@ class Create extends \Magento\Backend\Controller\Adminhtml\Action // Render page $this->_objectManager->get('Magento\Catalog\Helper\Product\Composite') - ->renderConfigureResult($this, $configureResult); + ->renderConfigureResult($configureResult); return $this; } @@ -614,7 +623,7 @@ class Create extends \Magento\Backend\Controller\Adminhtml\Action // Render page $this->_objectManager->get('Magento\Catalog\Helper\Product\Composite') - ->renderConfigureResult($this, $configureResult); + ->renderConfigureResult($configureResult); return $this; } diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Order/Creditmemo.php b/app/code/Magento/Sales/Controller/Adminhtml/Order/Creditmemo.php index 1dc4cf18ba4ccf917e85213e07d943e7ea25d4f4..5039f25a65f016586661130456fea2e95bb15af9 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Order/Creditmemo.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/Creditmemo.php @@ -107,7 +107,7 @@ class Creditmemo */ protected function _initCreditmemo($update = false) { - $this->_title(__('Credit Memos')); + $this->_title->add(__('Credit Memos')); $creditmemo = false; $creditmemoId = $this->getRequest()->getParam('creditmemo_id'); @@ -201,18 +201,18 @@ class Creditmemo $creditmemo = $this->_initCreditmemo(); if ($creditmemo) { if ($creditmemo->getInvoice()) { - $this->_title(__("View Memo for #%1", $creditmemo->getInvoice()->getIncrementId())); + $this->_title->add(__("View Memo for #%1", $creditmemo->getInvoice()->getIncrementId())); } else { - $this->_title(__("View Memo")); + $this->_title->add(__("View Memo")); } - $this->loadLayout(); - $this->getLayout()->getBlock('sales_creditmemo_view') + $this->_view->loadLayout(); + $this->_view->getLayout()->getBlock('sales_creditmemo_view') ->updateBackButtonUrl($this->getRequest()->getParam('come_from')); - $this->_setActiveMenu('Magento_Sales::sales_creditmemo') - ->renderLayout(); + $this->_setActiveMenu('Magento_Sales::sales_creditmemo'); + $this->_view->renderLayout(); } else { - $this->_forward('noRoute'); + $this->_forward('noroute'); } } @@ -234,20 +234,20 @@ class Creditmemo { if ($creditmemo = $this->_initCreditmemo()) { if ($creditmemo->getInvoice()) { - $this->_title(__("New Memo for #%1", $creditmemo->getInvoice()->getIncrementId())); + $this->_title->add(__("New Memo for #%1", $creditmemo->getInvoice()->getIncrementId())); } else { - $this->_title(__("New Memo")); + $this->_title->add(__("New Memo")); } if ($comment = $this->_objectManager->get('Magento\Adminhtml\Model\Session')->getCommentText(true)) { $creditmemo->setCommentText($comment); } - $this->loadLayout() - ->_setActiveMenu('Magento_Sales::sales_order') - ->renderLayout(); + $this->_view->loadLayout(); + $this->_setActiveMenu('Magento_Sales::sales_order'); + $this->_view->renderLayout(); } else { - $this->_forward('noRoute'); + $this->_forward('noroute'); } } @@ -258,8 +258,8 @@ class Creditmemo { try { $creditmemo = $this->_initCreditmemo(true); - $this->loadLayout(); - $response = $this->getLayout()->getBlock('order_items')->toHtml(); + $this->_view->loadLayout(); + $response = $this->_view->getLayout()->getBlock('order_items')->toHtml(); } catch (\Magento\Core\Exception $e) { $response = array( 'error' => true, @@ -333,7 +333,7 @@ class Creditmemo $this->_redirect('sales/order/view', array('order_id' => $creditmemo->getOrderId())); return; } else { - $this->_forward('noRoute'); + $this->_forward('noroute'); return; } } catch (\Magento\Core\Exception $e) { @@ -364,7 +364,7 @@ class Creditmemo } $this->_redirect('sales/*/view', array('creditmemo_id'=>$creditmemo->getId())); } else { - $this->_forward('noRoute'); + $this->_forward('noroute'); } } @@ -386,7 +386,7 @@ class Creditmemo } $this->_redirect('sales/*/view', array('creditmemo_id'=>$creditmemo->getId())); } else { - $this->_forward('noRoute'); + $this->_forward('noroute'); } } @@ -413,8 +413,8 @@ class Creditmemo $comment->save(); $creditmemo->sendUpdateEmail(!empty($data['is_customer_notified']), $data['comment']); - $this->loadLayout(); - $response = $this->getLayout()->getBlock('creditmemo_comments')->toHtml(); + $this->_view->loadLayout(); + $response = $this->_view->getLayout()->getBlock('creditmemo_comments')->toHtml(); } catch (\Magento\Core\Exception $e) { $response = array( 'error' => true, diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Order/Edit.php b/app/code/Magento/Sales/Controller/Adminhtml/Order/Edit.php index a821af1b50483309dc722660571f7f30510cd82a..50c0d283af2ac819d0684612d2af66a0e224dd63 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Order/Edit.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/Edit.php @@ -67,12 +67,13 @@ class Edit extends \Magento\Sales\Controller\Adminhtml\Order\Create */ public function indexAction() { - $this->_title(__('Orders'))->_title(__('Edit Order')); - $this->loadLayout(); + $this->_title->add(__('Orders')); + $this->_title->add(__('Edit Order')); + $this->_view->loadLayout(); $this->_initSession() - ->_setActiveMenu('Magento_Sales::sales_order') - ->renderLayout(); + ->_setActiveMenu('Magento_Sales::sales_order'); + $this->_view->renderLayout(); } /** diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Order/Invoice.php b/app/code/Magento/Sales/Controller/Adminhtml/Order/Invoice.php index 05f55d07f0c9569c3523fd86b75f49efaa5ec4a6..0a90b0393820a6be682c5560d2cb7e25a97d41d1 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Order/Invoice.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/Invoice.php @@ -43,15 +43,22 @@ class Invoice extends \Magento\Sales\Controller\Adminhtml\Invoice\AbstractInvoic protected $_coreRegistry = null; /** - * @param \Magento\Backend\Controller\Context $context + * @var \Magento\App\Action\Title + */ + protected $_title; + + /** + * @param \Magento\Backend\App\Action\Context $context + * @param \Magento\App\Response\Http\FileFactory $fileFactory * @param \Magento\Core\Model\Registry $coreRegistry */ public function __construct( - \Magento\Backend\Controller\Context $context, + \Magento\Backend\App\Action\Context $context, + \Magento\App\Response\Http\FileFactory $fileFactory, \Magento\Core\Model\Registry $coreRegistry ) { $this->_coreRegistry = $coreRegistry; - parent::__construct($context); + parent::__construct($context, $fileFactory); } /** @@ -76,7 +83,7 @@ class Invoice extends \Magento\Sales\Controller\Adminhtml\Invoice\AbstractInvoic */ protected function _initInvoice($update = false) { - $this->_title(__('Invoices')); + $this->_title->add(__('Invoices')); $invoice = false; $invoiceId = $this->getRequest()->getParam('invoice_id'); @@ -167,15 +174,15 @@ class Invoice extends \Magento\Sales\Controller\Adminhtml\Invoice\AbstractInvoic { $invoice = $this->_initInvoice(); if ($invoice) { - $this->_title(sprintf("#%s", $invoice->getIncrementId())); + $this->_title->add(sprintf("#%s", $invoice->getIncrementId())); - $this->loadLayout() - ->_setActiveMenu('Magento_Sales::sales_order'); - $this->getLayout()->getBlock('sales_invoice_view') + $this->_view->loadLayout(); + $this->_setActiveMenu('Magento_Sales::sales_order'); + $this->_view->getLayout()->getBlock('sales_invoice_view') ->updateBackButtonUrl($this->getRequest()->getParam('come_from')); - $this->renderLayout(); + $this->_view->renderLayout(); } else { - $this->_forward('noRoute'); + $this->_forward('noroute'); } } @@ -198,16 +205,16 @@ class Invoice extends \Magento\Sales\Controller\Adminhtml\Invoice\AbstractInvoic { $invoice = $this->_initInvoice(); if ($invoice) { - $this->_title(__('New Invoice')); + $this->_title->add(__('New Invoice')); $comment = $this->_objectManager->get('Magento\Adminhtml\Model\Session')->getCommentText(true); if ($comment) { $invoice->setCommentText($comment); } - $this->loadLayout() - ->_setActiveMenu('Magento_Sales::sales_order') - ->renderLayout(); + $this->_view->loadLayout(); + $this->_setActiveMenu('Magento_Sales::sales_order'); + $this->_view->renderLayout(); } else { $this->_redirect('sales/order/view', array('order_id'=>$this->getRequest()->getParam('order_id'))); } @@ -225,8 +232,8 @@ class Invoice extends \Magento\Sales\Controller\Adminhtml\Invoice\AbstractInvoic $invoiceRawCommentText = $invoiceRawData['comment_text']; $invoice->setCommentText($invoiceRawCommentText); - $this->loadLayout(); - $response = $this->getLayout()->getBlock('order_items')->toHtml(); + $this->_view->loadLayout(); + $response = $this->_view->getLayout()->getBlock('order_items')->toHtml(); } catch (\Magento\Core\Exception $e) { $response = array( 'error' => true, @@ -356,7 +363,7 @@ class Invoice extends \Magento\Sales\Controller\Adminhtml\Invoice\AbstractInvoic } $this->_redirect('sales/*/view', array('invoice_id'=>$invoice->getId())); } else { - $this->_forward('noRoute'); + $this->_forward('noroute'); } } @@ -378,7 +385,7 @@ class Invoice extends \Magento\Sales\Controller\Adminhtml\Invoice\AbstractInvoic } $this->_redirect('sales/*/view', array('invoice_id' => $invoice->getId())); } else { - $this->_forward('noRoute'); + $this->_forward('noroute'); } } @@ -400,7 +407,7 @@ class Invoice extends \Magento\Sales\Controller\Adminhtml\Invoice\AbstractInvoic } $this->_redirect('sales/*/view', array('invoice_id' => $invoice->getId())); } else { - $this->_forward('noRoute'); + $this->_forward('noroute'); } } @@ -421,8 +428,8 @@ class Invoice extends \Magento\Sales\Controller\Adminhtml\Invoice\AbstractInvoic $invoice->sendUpdateEmail(!empty($data['is_customer_notified']), $data['comment']); $invoice->save(); - $this->loadLayout(); - $response = $this->getLayout()->getBlock('invoice_comments')->toHtml(); + $this->_view->loadLayout(); + $response = $this->_view->getLayout()->getBlock('invoice_comments')->toHtml(); } catch (\Magento\Core\Exception $e) { $response = array( 'error' => true, diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Order/Shipment.php b/app/code/Magento/Sales/Controller/Adminhtml/Order/Shipment.php index a63326e3c96435de15805ebbf5ea56c3dd954e4f..4df921a97042f097273c3701c378bb9c4eb4bc25 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Order/Shipment.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/Shipment.php @@ -43,15 +43,23 @@ class Shipment extends \Magento\Sales\Controller\Adminhtml\Shipment\AbstractShip protected $_coreRegistry = null; /** - * @param \Magento\Backend\Controller\Context $context + * @var \Magento\App\Response\Http\FileFactory + */ + protected $_fileFactory; + + /** + * @param \Magento\Backend\App\Action\Context $context + * @param \Magento\App\Response\Http\FileFactory $fileFactory * @param \Magento\Core\Model\Registry $coreRegistry */ public function __construct( - \Magento\Backend\Controller\Context $context, + \Magento\Backend\App\Action\Context $context, + \Magento\App\Response\Http\FileFactory $fileFactory, \Magento\Core\Model\Registry $coreRegistry ) { $this->_coreRegistry = $coreRegistry; - parent::__construct($context); + $this->_fileFactory = $fileFactory; + parent::__construct($context, $fileFactory); } /** @@ -75,7 +83,7 @@ class Shipment extends \Magento\Sales\Controller\Adminhtml\Shipment\AbstractShip */ protected function _initShipment() { - $this->_title(__('Shipments')); + $this->_title->add(__('Shipments')); $shipment = false; $shipmentId = $this->getRequest()->getParam('shipment_id'); @@ -151,14 +159,14 @@ class Shipment extends \Magento\Sales\Controller\Adminhtml\Shipment\AbstractShip { $shipment = $this->_initShipment(); if ($shipment) { - $this->_title("#" . $shipment->getIncrementId()); - $this->loadLayout(); - $this->getLayout()->getBlock('sales_shipment_view') + $this->_title->add("#" . $shipment->getIncrementId()); + $this->_view->loadLayout(); + $this->_view->getLayout()->getBlock('sales_shipment_view') ->updateBackButtonUrl($this->getRequest()->getParam('come_from')); - $this->_setActiveMenu('Magento_Sales::sales_order') - ->renderLayout(); + $this->_setActiveMenu('Magento_Sales::sales_order'); + $this->_view->renderLayout(); } else { - $this->_forward('noRoute'); + $this->_forward('noroute'); } } @@ -180,16 +188,16 @@ class Shipment extends \Magento\Sales\Controller\Adminhtml\Shipment\AbstractShip { $shipment = $this->_initShipment(); if ($shipment) { - $this->_title(__('New Shipment')); + $this->_title->add(__('New Shipment')); $comment = $this->_objectManager->get('Magento\Adminhtml\Model\Session')->getCommentText(true); if ($comment) { $shipment->setCommentText($comment); } - $this->loadLayout() - ->_setActiveMenu('Magento_Sales::sales_order') - ->renderLayout(); + $this->_view->loadLayout(); + $this->_setActiveMenu('Magento_Sales::sales_order'); + $this->_view->renderLayout(); } else { $this->_redirect('sales/order/view', array('order_id' => $this->getRequest()->getParam('order_id'))); } @@ -211,7 +219,7 @@ class Shipment extends \Magento\Sales\Controller\Adminhtml\Shipment\AbstractShip try { $shipment = $this->_initShipment(); if (!$shipment) { - $this->_forward('noRoute'); + $this->_forward('noroute'); return; } @@ -330,8 +338,8 @@ class Shipment extends \Magento\Sales\Controller\Adminhtml\Shipment\AbstractShip $shipment->addTrack($track) ->save(); - $this->loadLayout(); - $response = $this->getLayout()->getBlock('shipment_tracking')->toHtml(); + $this->_view->loadLayout(); + $response = $this->_view->getLayout()->getBlock('shipment_tracking')->toHtml(); } else { $response = array( 'error' => true, @@ -367,8 +375,8 @@ class Shipment extends \Magento\Sales\Controller\Adminhtml\Shipment\AbstractShip if ($this->_initShipment()) { $track->delete(); - $this->loadLayout(); - $response = $this->getLayout()->getBlock('shipment_tracking')->toHtml(); + $this->_view->loadLayout(); + $response = $this->_view->getLayout()->getBlock('shipment_tracking')->toHtml(); } else { $response = array( 'error' => true, @@ -454,8 +462,8 @@ class Shipment extends \Magento\Sales\Controller\Adminhtml\Shipment\AbstractShip $shipment->sendUpdateEmail(!empty($data['is_customer_notified']), $data['comment']); $shipment->save(); - $this->loadLayout(false); - $response = $this->getLayout()->getBlock('shipment_comments')->toHtml(); + $this->_view->loadLayout(false); + $response = $this->_view->getLayout()->getBlock('shipment_comments')->toHtml(); } catch (\Magento\Core\Exception $e) { $response = array( 'error' => true, @@ -572,7 +580,7 @@ class Shipment extends \Magento\Sales\Controller\Adminhtml\Shipment\AbstractShip $pdfContent = $pdf->render(); } - return $this->_prepareDownloadResponse( + return $this->_fileFactory->create( 'ShippingLabel(' . $shipment->getIncrementId() . ').pdf', $pdfContent, 'application/pdf' @@ -601,13 +609,13 @@ class Shipment extends \Magento\Sales\Controller\Adminhtml\Shipment\AbstractShip if ($shipment) { $pdf = $this->_objectManager->create('Magento\Sales\Model\Order\Pdf\Shipment\Packaging')->getPdf($shipment); - $this->_prepareDownloadResponse( + return $this->_fileFactory->create( 'packingslip' . $this->_objectManager->get('Magento\Core\Model\Date')->date('Y-m-d_H-i-s') . '.pdf', $pdf->render(), 'application/pdf' ); } else { - $this->_forward('noRoute'); + $this->_forward('noroute'); } } @@ -654,7 +662,7 @@ class Shipment extends \Magento\Sales\Controller\Adminhtml\Shipment\AbstractShip if (!empty($labelsContent)) { $outputPdf = $this->_combineLabelsPdf($labelsContent); - $this->_prepareDownloadResponse('ShippingLabels.pdf', $outputPdf->render(), 'application/pdf'); + $this->_fileFactory->create('ShippingLabels.pdf', $outputPdf->render(), 'application/pdf'); return; } @@ -734,7 +742,7 @@ class Shipment extends \Magento\Sales\Controller\Adminhtml\Shipment\AbstractShip { $this->_initShipment(); return $this->getResponse()->setBody( - $this->getLayout() + $this->_view->getLayout() ->createBlock('Magento\Sales\Block\Adminhtml\Order\Shipment\Packaging\Grid') ->setIndex($this->getRequest()->getParam('index')) ->toHtml() diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Order/Status.php b/app/code/Magento/Sales/Controller/Adminhtml/Order/Status.php index 3cc88cfed64809d0cbdb405dc8c5e6819e0545ee..d943c7d9e4edcbf72f109f043080aa28204e097f 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Order/Status.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/Status.php @@ -33,7 +33,7 @@ */ namespace Magento\Sales\Controller\Adminhtml\Order; -class Status extends \Magento\Backend\Controller\Adminhtml\Action +class Status extends \Magento\Backend\App\Action { /** * Core registry @@ -43,11 +43,11 @@ class Status extends \Magento\Backend\Controller\Adminhtml\Action protected $_coreRegistry = null; /** - * @param \Magento\Backend\Controller\Context $context + * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Core\Model\Registry $coreRegistry */ public function __construct( - \Magento\Backend\Controller\Context $context, + \Magento\Backend\App\Action\Context $context, \Magento\Core\Model\Registry $coreRegistry ) { $this->_coreRegistry = $coreRegistry; @@ -75,8 +75,10 @@ class Status extends \Magento\Backend\Controller\Adminhtml\Action */ public function indexAction() { - $this->_title(__('Order Status')); - $this->loadLayout()->_setActiveMenu('Magento_Sales::system_order_statuses')->renderLayout(); + $this->_title->add(__('Order Status')); + $this->_view->loadLayout(); + $this->_setActiveMenu('Magento_Sales::system_order_statuses'); + $this->_view->renderLayout(); } /** @@ -90,10 +92,11 @@ class Status extends \Magento\Backend\Controller\Adminhtml\Action ->setData($data); $this->_coreRegistry->register('current_status', $status); } - $this->_title(__('Order Status'))->_title(__('Create New Order Status')); - $this->loadLayout() - ->_setActiveMenu('Magento_Sales::system_order_statuses') - ->renderLayout(); + $this->_title->add(__('Order Status')); + $this->_title->add(__('Create New Order Status')); + $this->_view->loadLayout(); + $this->_setActiveMenu('Magento_Sales::system_order_statuses'); + $this->_view->renderLayout(); } /** @@ -104,10 +107,11 @@ class Status extends \Magento\Backend\Controller\Adminhtml\Action $status = $this->_initStatus(); if ($status) { $this->_coreRegistry->register('current_status', $status); - $this->_title(__('Order Status'))->_title(__('Edit Order Status')); - $this->loadLayout() - ->_setActiveMenu('Magento_Sales::system_order_statuses') - ->renderLayout(); + $this->_title->add(__('Order Status')); + $this->_title->add(__('Edit Order Status')); + $this->_view->loadLayout(); + $this->_setActiveMenu('Magento_Sales::system_order_statuses'); + $this->_view->renderLayout(); } else { $this->_getSession()->addError( __('We can\'t find this order status.') @@ -181,10 +185,11 @@ class Status extends \Magento\Backend\Controller\Adminhtml\Action */ public function assignAction() { - $this->_title(__('Order Status'))->_title(__('Assign Order Status to State')); - $this->loadLayout() - ->_setActiveMenu('Magento_Sales::system_order_statuses') - ->renderLayout(); + $this->_title->add(__('Order Status')); + $this->_title->add(__('Assign Order Status to State')); + $this->_view->loadLayout(); + $this->_setActiveMenu('Magento_Sales::system_order_statuses'); + $this->_view->renderLayout(); } /** diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Order/View/Giftmessage.php b/app/code/Magento/Sales/Controller/Adminhtml/Order/View/Giftmessage.php index 111f0a7fa96c8a4f8638b08b6e9ab500bd8c5227..5a31069c3ff4f39b8604fecff78ef68c2d81bb5e 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Order/View/Giftmessage.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/View/Giftmessage.php @@ -34,7 +34,7 @@ */ namespace Magento\Sales\Controller\Adminhtml\Order\View; -class Giftmessage extends \Magento\Backend\Controller\Adminhtml\Action +class Giftmessage extends \Magento\Backend\App\Action { public function saveAction() { diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Recurring/Profile.php b/app/code/Magento/Sales/Controller/Adminhtml/Recurring/Profile.php index 94e36507b9562669acfee84897f20fa5ebc370a2..0e6f98c7436d627d1557b890438ff7c4e626c3e7 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Recurring/Profile.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Recurring/Profile.php @@ -31,7 +31,9 @@ */ namespace Magento\Sales\Controller\Adminhtml\Recurring; -class Profile extends \Magento\Backend\Controller\Adminhtml\Action +use Magento\App\Action\NotFoundException; + +class Profile extends \Magento\Backend\App\Action { /** * Core registry @@ -41,11 +43,11 @@ class Profile extends \Magento\Backend\Controller\Adminhtml\Action protected $_coreRegistry = null; /** - * @param \Magento\Backend\Controller\Context $context + * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Core\Model\Registry $coreRegistry */ public function __construct( - \Magento\Backend\Controller\Context $context, + \Magento\Backend\App\Action\Context $context, \Magento\Core\Model\Registry $coreRegistry ) { $this->_coreRegistry = $coreRegistry; @@ -57,10 +59,10 @@ class Profile extends \Magento\Backend\Controller\Adminhtml\Action */ public function indexAction() { - $this->_title(__('Recurring Billing Profiles')) - ->loadLayout() - ->_setActiveMenu('Magento_Sales::sales_recurring_profile') - ->renderLayout(); + $this->_title->add(__('Recurring Billing Profiles')); + $this->_view->loadLayout(); + $this->_setActiveMenu('Magento_Sales::sales_recurring_profile'); + $this->_view->renderLayout(); return $this; } @@ -70,12 +72,12 @@ class Profile extends \Magento\Backend\Controller\Adminhtml\Action public function viewAction() { try { - $this->_title(__('Recurring Billing Profiles')); + $this->_title->add(__('Recurring Billing Profiles')); $profile = $this->_initProfile(); - $this->loadLayout() - ->_setActiveMenu('Magento_Sales::sales_recurring_profile') - ->_title(__('Profile #%1', $profile->getReferenceId())) - ->renderLayout(); + $this->_view->loadLayout(); + $this->_setActiveMenu('Magento_Sales::sales_recurring_profile'); + $this->_title->add(__('Profile #%1', $profile->getReferenceId())); + $this->_view->renderLayout(); return; } catch (\Magento\Core\Exception $e) { $this->_getSession()->addError($e->getMessage()); @@ -91,7 +93,7 @@ class Profile extends \Magento\Backend\Controller\Adminhtml\Action public function gridAction() { try { - $this->loadLayout()->renderLayout(); + $this->_view->loadLayout()->renderLayout(); return; } catch (\Magento\Core\Exception $e) { $this->_getSession()->addError($e->getMessage()); @@ -103,15 +105,17 @@ class Profile extends \Magento\Backend\Controller\Adminhtml\Action /** * Profile orders ajax grid + * + * @throws NotFoundException */ public function ordersAction() { try { $this->_initProfile(); - $this->loadLayout()->renderLayout(); + $this->_view->loadLayout()->renderLayout(); } catch (\Exception $e) { $this->_objectManager->get('Magento\Logger')->logException($e); - $this->norouteAction(); + throw new NotFoundException(); } } @@ -184,8 +188,8 @@ class Profile extends \Magento\Backend\Controller\Adminhtml\Action public function customerGridAction() { $this->_initCustomer(); - $this->loadLayout(false) - ->renderLayout(); + $this->_view->loadLayout(false); + $this->_view->renderLayout(); } /** diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Shipment.php b/app/code/Magento/Sales/Controller/Adminhtml/Shipment.php index 5231462ee5966442cd25048b0bc52eb1d5b0951c..5ec56277eeed75a06e8809d5628cae2d860b1fd1 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Shipment.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Shipment.php @@ -39,8 +39,8 @@ class Shipment extends \Magento\Sales\Controller\Adminhtml\Shipment\AbstractShip public function exportCsvAction() { $fileName = 'shipments.csv'; - $grid = $this->getLayout()->createBlock('Magento\Sales\Block\Adminhtml\Shipment\Grid'); - $this->_prepareDownloadResponse($fileName, $grid->getCsvFile()); + $grid = $this->_view->getLayout()->createBlock('Magento\Sales\Block\Adminhtml\Shipment\Grid'); + return $this->_fileFactory->create($fileName, $grid->getCsvFile()); } /** @@ -49,7 +49,7 @@ class Shipment extends \Magento\Sales\Controller\Adminhtml\Shipment\AbstractShip public function exportExcelAction() { $fileName = 'shipments.xml'; - $grid = $this->getLayout()->createBlock('Magento\Sales\Block\Adminhtml\Shipment\Grid'); - $this->_prepareDownloadResponse($fileName, $grid->getExcelFile($fileName)); + $grid = $this->_view->getLayout()->createBlock('Magento\Sales\Block\Adminhtml\Shipment\Grid'); + return $this->_fileFactory->create($fileName, $grid->getExcelFile($fileName)); } } diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Shipment/AbstractShipment.php b/app/code/Magento/Sales/Controller/Adminhtml/Shipment/AbstractShipment.php index bd066fd5df69c134b4f27605a4a0e10ed7783ce1..0ed1470ba8d9999dbd3073d0463edaadebbfcb82 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Shipment/AbstractShipment.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Shipment/AbstractShipment.php @@ -31,8 +31,24 @@ */ namespace Magento\Sales\Controller\Adminhtml\Shipment; -class AbstractShipment extends \Magento\Backend\Controller\Adminhtml\Action +class AbstractShipment extends \Magento\Backend\App\Action { + /** + * @var \Magento\App\Response\Http\FileFactory + */ + protected $_fileFactory; + + /** + * @param \Magento\Backend\App\Action\Context $context + * @param \Magento\App\Response\Http\FileFactory $fileFactory + */ + public function __construct( + \Magento\Backend\App\Action\Context $context, + \Magento\App\Response\Http\FileFactory $fileFactory + ) { + $this->_fileFactory = $fileFactory; + parent::__construct($context); + } /** * Init layout, menu and breadcrumb * @@ -40,8 +56,8 @@ class AbstractShipment extends \Magento\Backend\Controller\Adminhtml\Action */ protected function _initAction() { - $this->loadLayout() - ->_setActiveMenu('Magento_Sales::sales_shipment') + $this->_view->loadLayout(); + $this->_setActiveMenu('Magento_Sales::sales_shipment') ->_addBreadcrumb(__('Sales'), __('Sales')) ->_addBreadcrumb(__('Shipments'), __('Shipments')); return $this; @@ -52,11 +68,11 @@ class AbstractShipment extends \Magento\Backend\Controller\Adminhtml\Action */ public function indexAction() { - $this->_title(__('Shipments')); + $this->_title->add(__('Shipments')); $this->_initAction() - ->_addContent($this->getLayout()->createBlock('Magento\Sales\Block\Adminhtml\Shipment')) - ->renderLayout(); + ->_addContent($this->_view->getLayout()->createBlock('Magento\Sales\Block\Adminhtml\Shipment')); + $this->_view->renderLayout(); } /** @@ -67,7 +83,7 @@ class AbstractShipment extends \Magento\Backend\Controller\Adminhtml\Action if ($shipmentId = $this->getRequest()->getParam('shipment_id')) { $this->_forward('view', 'order_shipment', null, array('come_from'=>'shipment')); } else { - $this->_forward('noRoute'); + $this->_forward('noroute'); } } @@ -86,7 +102,7 @@ class AbstractShipment extends \Magento\Backend\Controller\Adminhtml\Action $pdf->pages = array_merge ($pdf->pages, $pages->pages); } $date = $this->_objectManager->get('Magento\Core\Model\Date')->date('Y-m-d_H-i-s'); - return $this->_prepareDownloadResponse('packingslip' . $date . '.pdf', $pdf->render(), 'application/pdf'); + return $this->_fileFactory->create('packingslip' . $date . '.pdf', $pdf->render(), 'application/pdf'); } $this->_redirect('sales/*/'); } @@ -101,10 +117,10 @@ class AbstractShipment extends \Magento\Backend\Controller\Adminhtml\Action $pdf = $this->_objectManager->create('Magento\Sales\Model\Order\Pdf\Shipment') ->getPdf(array($shipment)); $date = $this->_objectManager->get('Magento\Core\Model\Date')->date('Y-m-d_H-i-s'); - $this->_prepareDownloadResponse('packingslip' . $date . '.pdf', $pdf->render(), 'application/pdf'); + $this->_fileFactory->create('packingslip' . $date . '.pdf', $pdf->render(), 'application/pdf'); } } else { - $this->_forward('noRoute'); + $this->_forward('noroute'); } } diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Transactions.php b/app/code/Magento/Sales/Controller/Adminhtml/Transactions.php index d0447eb1fb82b1bd7b2374beada2070524af8db7..3e5a3bdeb0e27194f3c32af8969d15e4910a04a3 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Transactions.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Transactions.php @@ -31,7 +31,9 @@ */ namespace Magento\Sales\Controller\Adminhtml; -class Transactions extends \Magento\Backend\Controller\Adminhtml\Action +use Magento\Backend\App\Action; + +class Transactions extends \Magento\Backend\App\Action { /** * Core registry @@ -41,11 +43,11 @@ class Transactions extends \Magento\Backend\Controller\Adminhtml\Action protected $_coreRegistry = null; /** - * @param \Magento\Backend\Controller\Context $context + * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Core\Model\Registry $coreRegistry */ public function __construct( - \Magento\Backend\Controller\Context $context, + \Magento\Backend\App\Action\Context $context, \Magento\Core\Model\Registry $coreRegistry ) { $this->_coreRegistry = $coreRegistry; @@ -66,7 +68,7 @@ class Transactions extends \Magento\Backend\Controller\Adminhtml\Action if (!$txn->getId()) { $this->_getSession()->addError(__('Please correct the transaction ID and try again.')); $this->_redirect('sales/*/'); - $this->setFlag('', self::FLAG_NO_DISPATCH, true); + $this->_actionFlag->set('', self::FLAG_NO_DISPATCH, true); return false; } $orderId = $this->getRequest()->getParam('order_id'); @@ -82,11 +84,11 @@ class Transactions extends \Magento\Backend\Controller\Adminhtml\Action public function indexAction() { - $this->_title(__('Transactions')); + $this->_title->add(__('Transactions')); - $this->loadLayout() - ->_setActiveMenu('Magento_Sales::sales_transactions') - ->renderLayout(); + $this->_view->loadLayout(); + $this->_setActiveMenu('Magento_Sales::sales_transactions'); + $this->_view->renderLayout(); } /** @@ -94,8 +96,8 @@ class Transactions extends \Magento\Backend\Controller\Adminhtml\Action */ public function gridAction() { - $this->loadLayout(false); - $this->renderLayout(); + $this->_view->loadLayout(false); + $this->_view->renderLayout(); } /** @@ -107,12 +109,12 @@ class Transactions extends \Magento\Backend\Controller\Adminhtml\Action if (!$txn) { return; } - $this->_title(__('Transactions')) - ->_title(sprintf("#%s", $txn->getTxnId())); + $this->_title->add(__('Transactions')); + $this->_title->add(sprintf("#%s", $txn->getTxnId())); - $this->loadLayout() - ->_setActiveMenu('Magento_Sales::sales_transactions') - ->renderLayout(); + $this->_view->loadLayout(); + $this->_setActiveMenu('Magento_Sales::sales_transactions'); + $this->_view->renderLayout(); } /** diff --git a/app/code/Magento/Sales/Controller/Billing/Agreement.php b/app/code/Magento/Sales/Controller/Billing/Agreement.php index 050f959ceb7757bed7c3838371f5c38f92c65ad7..53b92572e274b06f328a0ec8017e5b66e3d9a080 100644 --- a/app/code/Magento/Sales/Controller/Billing/Agreement.php +++ b/app/code/Magento/Sales/Controller/Billing/Agreement.php @@ -29,7 +29,10 @@ */ namespace Magento\Sales\Controller\Billing; -class Agreement extends \Magento\Core\Controller\Front\Action +use Magento\App\Action\NotFoundException; +use Magento\App\RequestInterface; + +class Agreement extends \Magento\App\Action\Action { /** * Core registry @@ -39,15 +42,23 @@ class Agreement extends \Magento\Core\Controller\Front\Action protected $_coreRegistry = null; /** - * @param \Magento\Core\Controller\Varien\Action\Context $context + * @var \Magento\App\Action\Title + */ + protected $_title; + + /** + * @param \Magento\App\Action\Context $context * @param \Magento\Core\Model\Registry $coreRegistry + * @param \Magento\App\Action\Title $title */ public function __construct( - \Magento\Core\Controller\Varien\Action\Context $context, - \Magento\Core\Model\Registry $coreRegistry + \Magento\App\Action\Context $context, + \Magento\Core\Model\Registry $coreRegistry, + \Magento\App\Action\Title $title ) { $this->_coreRegistry = $coreRegistry; parent::__construct($context); + $this->_title = $title; } /** @@ -56,26 +67,28 @@ class Agreement extends \Magento\Core\Controller\Front\Action */ public function indexAction() { - $this->_title(__('Billing Agreements')); - $this->loadLayout(); - $this->_initLayoutMessages('Magento\Customer\Model\Session'); - $this->renderLayout(); + $this->_title->add(__('Billing Agreements')); + $this->_view->loadLayout(); + $this->_view->getLayout()->initMessages('Magento\Customer\Model\Session'); + $this->_view->renderLayout(); } + /** - * Action predispatch - * * Check customer authentication + * + * @param RequestInterface $request + * @return mixed */ - public function preDispatch() + public function dispatch(RequestInterface $request) { - parent::preDispatch(); - if (!$this->getRequest()->isDispatched()) { - return; + if (!$request->isDispatched()) { + return parent::dispatch($request); } if (!$this->_getSession()->authenticate($this)) { - $this->setFlag('', 'no-dispatch', true); + $this->_actionFlag->set('', 'no-dispatch', true); } + return parent::dispatch($request); } /** @@ -87,15 +100,15 @@ class Agreement extends \Magento\Core\Controller\Front\Action if (!$agreement = $this->_initAgreement()) { return; } - $this->_title(__('Billing Agreements')) - ->_title(__('Billing Agreement # %1', $agreement->getReferenceId())); - $this->loadLayout(); - $this->_initLayoutMessages('Magento\Customer\Model\Session'); - $navigationBlock = $this->getLayout()->getBlock('customer_account_navigation'); + $this->_title->add(__('Billing Agreements')); + $this->_title->add(__('Billing Agreement # %1', $agreement->getReferenceId())); + $this->_view->loadLayout(); + $this->_view->getLayout()->initMessages('Magento\Customer\Model\Session'); + $navigationBlock = $this->_view->getLayout()->getBlock('customer_account_navigation'); if ($navigationBlock) { $navigationBlock->setActive('sales/billing_agreement/'); } - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -116,7 +129,7 @@ class Agreement extends \Magento\Core\Controller\Front\Action ->setCancelUrl($this->_objectManager->create('Magento\Core\Model\Url') ->getUrl('*/*/cancelWizard', array('payment_method' => $paymentCode))); - $this->_redirectUrl($agreement->initToken()); + $this->getResponse()->setRedirect($agreement->initToken()); return $this; } catch (\Magento\Core\Exception $e) { $this->_getSession()->addError($e->getMessage()); diff --git a/app/code/Magento/Sales/Controller/Download.php b/app/code/Magento/Sales/Controller/Download.php index 0e786bf34d81e1759d034e1fad6bbd895480ef0e..dad4241ca3b7761476d2edea3a69633275641762 100644 --- a/app/code/Magento/Sales/Controller/Download.php +++ b/app/code/Magento/Sales/Controller/Download.php @@ -33,8 +33,25 @@ */ namespace Magento\Sales\Controller; -class Download extends \Magento\Core\Controller\Front\Action +class Download extends \Magento\App\Action\Action { + /** + * @var \Magento\App\Response\Http\FileFactory + */ + protected $_fileResponseFactory; + + /** + * @param \Magento\App\Action\Context $context + * @param \Magento\App\Response\Http\FileFactory $fileResponseFactory + */ + public function __construct( + \Magento\App\Action\Context $context, + \Magento\App\Response\Http\FileFactory $fileResponseFactory + ) { + $this->_fileResponseFactory = $fileResponseFactory; + parent::__construct($context); + } + /** * Custom options downloader * @@ -58,12 +75,12 @@ class Download extends \Magento\Core\Controller\Front\Action throw new \Exception(); } } - $this->_prepareDownloadResponse($info['title'], array( + $this->_fileResponseFactory->create($info['title'], array( 'value' => $filePath, 'type' => 'filename' )); } catch (\Exception $e) { - $this->_forward('noRoute'); + $this->_forward('noroute'); } } @@ -112,7 +129,7 @@ class Download extends \Magento\Core\Controller\Front\Action ->load($this->getRequest()->getParam('id')); if (!$recurringProfile->getId()) { - $this->_forward('noRoute'); + $this->_forward('noroute'); } $orderItemInfo = $recurringProfile->getData('order_item_info'); @@ -120,30 +137,30 @@ class Download extends \Magento\Core\Controller\Front\Action $request = unserialize($orderItemInfo['info_buyRequest']); if ($request['product'] != $orderItemInfo['product_id']) { - $this->_forward('noRoute'); + $this->_forward('noroute'); return; } $optionId = $this->getRequest()->getParam('option_id'); if (!isset($request['options'][$optionId])) { - $this->_forward('noRoute'); + $this->_forward('noroute'); return; } // Check if the product exists $product = $this->_objectManager->create('Magento\Catalog\Model\Product')->load($request['product']); if (!$product || !$product->getId()) { - $this->_forward('noRoute'); + $this->_forward('noroute'); return; } // Try to load the option $option = $product->getOptionById($optionId); if (!$option || !$option->getId() || $option->getType() != 'file') { - $this->_forward('noRoute'); + $this->_forward('noroute'); return; } $this->_downloadFileAction($request['options'][$this->getRequest()->getParam('option_id')]); } catch (\Exception $e) { - $this->_forward('noRoute'); + $this->_forward('noroute'); } } @@ -157,7 +174,7 @@ class Download extends \Magento\Core\Controller\Front\Action $option = $this->_objectManager->create('Magento\Sales\Model\Quote\Item\Option')->load($quoteItemOptionId); if (!$option->getId()) { - $this->_forward('noRoute'); + $this->_forward('noroute'); return; } @@ -176,7 +193,7 @@ class Download extends \Magento\Core\Controller\Front\Action if (!$productOption || !$productOption->getId() || $productOption->getProductId() != $option->getProductId() || $productOption->getType() != 'file' ) { - $this->_forward('noRoute'); + $this->_forward('noroute'); return; } @@ -184,7 +201,7 @@ class Download extends \Magento\Core\Controller\Front\Action $info = unserialize($option->getValue()); $this->_downloadFileAction($info); } catch (\Exception $e) { - $this->_forward('noRoute'); + $this->_forward('noroute'); } exit(0); } diff --git a/app/code/Magento/Sales/Controller/Guest.php b/app/code/Magento/Sales/Controller/Guest.php index 8f630c51cc4e3cf1f82efac9b2925173bfe3df89..9c4fce3583df9d575e877e7ec675417588f3362d 100644 --- a/app/code/Magento/Sales/Controller/Guest.php +++ b/app/code/Magento/Sales/Controller/Guest.php @@ -63,9 +63,9 @@ class Guest extends \Magento\Sales\Controller\AbstractController return; } - $this->loadLayout(); - $this->_objectManager->get('Magento\Sales\Helper\Guest')->getBreadcrumbs($this); - $this->renderLayout(); + $this->_view->loadLayout(); + $this->_objectManager->get('Magento\Sales\Helper\Guest')->getBreadcrumbs(); + $this->_view->renderLayout(); } /** @@ -77,10 +77,10 @@ class Guest extends \Magento\Sales\Controller\AbstractController $this->_redirect('customer/account/'); return; } - $this->loadLayout(); - $this->getLayout()->getBlock('head')->setTitle(__('Orders and Returns')); - $this->_objectManager->get('Magento\Sales\Helper\Guest')->getBreadcrumbs($this); - $this->renderLayout(); + $this->_view->loadLayout(); + $this->_view->getLayout()->getBlock('head')->setTitle(__('Orders and Returns')); + $this->_objectManager->get('Magento\Sales\Helper\Guest')->getBreadcrumbs(); + $this->_view->renderLayout(); } public function printInvoiceAction() @@ -101,8 +101,8 @@ class Guest extends \Magento\Sales\Controller\AbstractController if (isset($invoice)) { $this->_coreRegistry->register('current_invoice', $invoice); } - $this->loadLayout('print'); - $this->renderLayout(); + $this->_view->loadLayout('print'); + $this->_view->renderLayout(); } else { $this->_redirect('sales/guest/form'); } @@ -125,8 +125,8 @@ class Guest extends \Magento\Sales\Controller\AbstractController if (isset($shipment)) { $this->_coreRegistry->register('current_shipment', $shipment); } - $this->loadLayout('print'); - $this->renderLayout(); + $this->_view->loadLayout('print'); + $this->_view->renderLayout(); } else { $this->_redirect('sales/guest/form'); } @@ -150,8 +150,8 @@ class Guest extends \Magento\Sales\Controller\AbstractController if (isset($creditmemo)) { $this->_coreRegistry->register('current_creditmemo', $creditmemo); } - $this->loadLayout('print'); - $this->renderLayout(); + $this->_view->loadLayout('print'); + $this->_view->renderLayout(); } else { $this->_redirect('sales/guest/form'); } diff --git a/app/code/Magento/Sales/Controller/Order.php b/app/code/Magento/Sales/Controller/Order.php index 43fa5b52c724fe1fd93d3e63bd67be4b05494009..6ead3cd7485360ec147f79033e9fdb840dc99524 100644 --- a/app/code/Magento/Sales/Controller/Order.php +++ b/app/code/Magento/Sales/Controller/Order.php @@ -29,21 +29,25 @@ */ namespace Magento\Sales\Controller; +use Magento\App\Action\NotFoundException; +use Magento\App\RequestInterface; + class Order extends \Magento\Sales\Controller\AbstractController { /** - * Action predispatch - * * Check customer authentication for some actions + * + * @param RequestInterface $request + * @return mixed */ - public function preDispatch() + public function dispatch(RequestInterface $request) { - parent::preDispatch(); $loginUrl = $this->_objectManager->get('Magento\Customer\Helper\Data')->getLoginUrl(); if (!$this->_objectManager->get('Magento\Customer\Model\Session')->authenticate($this, $loginUrl)) { - $this->setFlag('', self::FLAG_NO_DISPATCH, true); + $this->_actionFlag->set('', self::FLAG_NO_DISPATCH, true); } + return parent::dispatch($request); } /** @@ -51,15 +55,15 @@ class Order extends \Magento\Sales\Controller\AbstractController */ public function historyAction() { - $this->loadLayout(); - $this->_initLayoutMessages('Magento\Catalog\Model\Session'); + $this->_view->loadLayout(); + $this->_view->getLayout()->initMessages('Magento\Catalog\Model\Session'); - $this->getLayout()->getBlock('head')->setTitle(__('My Orders')); + $this->_view->getLayout()->getBlock('head')->setTitle(__('My Orders')); - $block = $this->getLayout()->getBlock('customer.account.link.back'); + $block = $this->_view->getLayout()->getBlock('customer.account.link.back'); if ($block) { - $block->setRefererUrl($this->_getRefererUrl()); + $block->setRefererUrl($this->_redirect->getRefererUrl()); } - $this->renderLayout(); + $this->_view->renderLayout(); } } diff --git a/app/code/Magento/Sales/Controller/Recurring/Profile.php b/app/code/Magento/Sales/Controller/Recurring/Profile.php index 74cff74a97e4fad42af070155e57039a0dc14c49..596cec0f59d3d21283deb6e5de00ea89f34e2fed 100644 --- a/app/code/Magento/Sales/Controller/Recurring/Profile.php +++ b/app/code/Magento/Sales/Controller/Recurring/Profile.php @@ -29,7 +29,10 @@ */ namespace Magento\Sales\Controller\Recurring; -class Profile extends \Magento\Core\Controller\Front\Action +use Magento\App\Action\NotFoundException; +use Magento\App\RequestInterface; + +class Profile extends \Magento\App\Action\Action { /** * @@ -45,31 +48,42 @@ class Profile extends \Magento\Core\Controller\Front\Action protected $_coreRegistry = null; /** - * @param \Magento\Core\Controller\Varien\Action\Context $context + * @var \Magento\App\Action\Title + */ + protected $_title; + + /** + * @param \Magento\App\Action\Context $context * @param \Magento\Core\Model\Registry $coreRegistry + * @param \Magento\App\Action\Title $title */ public function __construct( - \Magento\Core\Controller\Varien\Action\Context $context, - \Magento\Core\Model\Registry $coreRegistry + \Magento\App\Action\Context $context, + \Magento\Core\Model\Registry $coreRegistry, + \Magento\App\Action\Title $title ) { $this->_coreRegistry = $coreRegistry; parent::__construct($context); + $this->_title = $title; } /** * Make sure customer is logged in and put it into registry + * + * @param RequestInterface $request + * @return mixed */ - public function preDispatch() + public function dispatch(RequestInterface $request) { - parent::preDispatch(); - if (!$this->getRequest()->isDispatched()) { - return; + if (!$request->isDispatched()) { + return parent::dispatch($request); } $this->_session = $this->_objectManager->get('Magento\Customer\Model\Session'); if (!$this->_session->authenticate($this)) { - $this->setFlag('', 'no-dispatch', true); + $this->_actionFlag->set('', 'no-dispatch', true); } $this->_coreRegistry->register('current_customer', $this->_session->getCustomer()); + return parent::dispatch($request); } /** @@ -77,10 +91,10 @@ class Profile extends \Magento\Core\Controller\Front\Action */ public function indexAction() { - $this->_title(__('Recurring Billing Profiles')); - $this->loadLayout(); - $this->_initLayoutMessages('Magento\Customer\Model\Session'); - $this->renderLayout(); + $this->_title->add(__('Recurring Billing Profiles')); + $this->_view->loadLayout(); + $this->_view->getLayout()->initMessages('Magento\Customer\Model\Session'); + $this->_view->renderLayout(); } /** @@ -162,14 +176,15 @@ class Profile extends \Magento\Core\Controller\Front\Action { try { $profile = $this->_initProfile(); - $this->_title(__('Recurring Billing Profiles'))->_title(__('Profile #%1', $profile->getReferenceId())); - $this->loadLayout(); - $this->_initLayoutMessages('Magento\Customer\Model\Session'); - $navigationBlock = $this->getLayout()->getBlock('customer_account_navigation'); + $this->_title->add(__('Recurring Billing Profiles')); + $this->_title->add(__('Profile #%1', $profile->getReferenceId())); + $this->_view->loadLayout(); + $this->_view->getLayout()->initMessages('Magento\Customer\Model\Session'); + $navigationBlock = $this->_view->getLayout()->getBlock('customer_account_navigation'); if ($navigationBlock) { $navigationBlock->setActive('sales/recurring_profile/'); } - $this->renderLayout(); + $this->_view->renderLayout(); return; } catch (\Magento\Core\Exception $e) { $this->_session->addError($e->getMessage()); diff --git a/app/code/Magento/Sales/Helper/Admin.php b/app/code/Magento/Sales/Helper/Admin.php index aa04a32ed6f84f989eb8e42c9e5b03b2671794da..47d1aea6e192f0f2444602b27da5b07e0619b082 100644 --- a/app/code/Magento/Sales/Helper/Admin.php +++ b/app/code/Magento/Sales/Helper/Admin.php @@ -26,7 +26,7 @@ namespace Magento\Sales\Helper; -class Admin extends \Magento\Core\Helper\AbstractHelper +class Admin extends \Magento\App\Helper\AbstractHelper { /** * @var \Magento\Sales\Model\Config @@ -34,18 +34,18 @@ class Admin extends \Magento\Core\Helper\AbstractHelper protected $_salesConfig; /** - * @var \Magento\Core\Model\StoreManager + * @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; /** - * @param \Magento\Core\Model\StoreManager $storeManager - * @param \Magento\Core\Helper\Context $context + * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\App\Helper\Context $context * @param \Magento\Sales\Model\Config $salesConfig */ public function __construct( - \Magento\Core\Model\StoreManager $storeManager, - \Magento\Core\Helper\Context $context, + \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\App\Helper\Context $context, \Magento\Sales\Model\Config $salesConfig ) { $this->_storeManager = $storeManager; diff --git a/app/code/Magento/Sales/Helper/Guest.php b/app/code/Magento/Sales/Helper/Guest.php index 6d26213988ca3c9c832e559827f62cd9a6805255..8bea985d11ccfd2a3bad83089445e37ed1b2e29f 100644 --- a/app/code/Magento/Sales/Helper/Guest.php +++ b/app/code/Magento/Sales/Helper/Guest.php @@ -57,20 +57,10 @@ class Guest extends \Magento\Core\Helper\Data */ protected $_coreCookie; - /** - * @var \Magento\Core\Model\App - */ - protected $_coreApp; - - /** - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - /** * @var \Magento\Core\Model\Session */ - protected $_coreSession; + protected $_session; /** * @var \Magento\Sales\Model\OrderFactory @@ -78,39 +68,39 @@ class Guest extends \Magento\Core\Helper\Data protected $_orderFactory; /** - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\Store\Config $coreStoreConfig - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Locale $locale * @param \Magento\App\State $appState * @param \Magento\Core\Model\Registry $coreRegistry * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Core\Model\Cookie $coreCookie - * @param \Magento\Core\Model\App $coreApp * @param \Magento\Core\Model\Session $coreSession * @param \Magento\Sales\Model\OrderFactory $orderFactory + * @param \Magento\App\ViewInterface $view * @param bool $dbCompatibleMode */ public function __construct( - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Core\Model\Store\Config $coreStoreConfig, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Locale $locale, \Magento\App\State $appState, \Magento\Core\Model\Registry $coreRegistry, \Magento\Customer\Model\Session $customerSession, \Magento\Core\Model\Cookie $coreCookie, - \Magento\Core\Model\App $coreApp, \Magento\Core\Model\Session $coreSession, \Magento\Sales\Model\OrderFactory $orderFactory, + \Magento\App\ViewInterface $view, $dbCompatibleMode = true ) { $this->_coreRegistry = $coreRegistry; $this->_customerSession = $customerSession; $this->_coreCookie = $coreCookie; - $this->_coreApp = $coreApp; - $this->_coreSession = $coreSession; + $this->_session = $coreSession; $this->_orderFactory = $orderFactory; + $this->_view = $view; parent::__construct( $context, $coreStoreConfig, @@ -129,18 +119,18 @@ class Guest extends \Magento\Core\Helper\Data public function loadValidOrder() { if ($this->_customerSession->isLoggedIn()) { - $this->_coreApp->getResponse()->setRedirect($this->_urlBuilder->getUrl('sales/order/history')); + $this->_app->getResponse()->setRedirect($this->_urlBuilder->getUrl('sales/order/history')); return false; } - $post = $this->_coreApp->getRequest()->getPost(); + $post = $this->_app->getRequest()->getPost(); $errors = false; /** @var $order \Magento\Sales\Model\Order */ $order = $this->_orderFactory->create(); if (empty($post) && !$this->_coreCookie->get($this->_cookieName)) { - $this->_coreApp->getResponse()->setRedirect($this->_urlBuilder->getUrl('sales/guest/form')); + $this->_app->getResponse()->setRedirect($this->_urlBuilder->getUrl('sales/guest/form')); return false; } elseif (!empty($post) && isset($post['oar_order_id']) && isset($post['oar_type'])) { $type = $post['oar_type']; @@ -194,21 +184,19 @@ class Guest extends \Magento\Core\Helper\Data return true; } - $this->_coreSession->addError( + $this->_session->addError( __('You entered incorrect data. Please try again.') ); - $this->_coreApp->getResponse()->setRedirect($this->_urlBuilder->getUrl('sales/guest/form')); + $this->_app->getResponse()->setRedirect($this->_urlBuilder->getUrl('sales/guest/form')); return false; } /** * Get Breadcrumbs for current controller action - * - * @param \Magento\Core\Controller\Front\Action $controller */ - public function getBreadcrumbs($controller) + public function getBreadcrumbs() { - $breadcrumbs = $controller->getLayout()->getBlock('breadcrumbs'); + $breadcrumbs = $this->_view->getLayout()->getBlock('breadcrumbs'); $breadcrumbs->addCrumb( 'home', array( diff --git a/app/code/Magento/Sales/Helper/Reorder.php b/app/code/Magento/Sales/Helper/Reorder.php index 3f6fa04683c76bc44e495dc44d6b6aa0270e8af2..cce18fe35e9021efc6e92838b381862eae438bec 100644 --- a/app/code/Magento/Sales/Helper/Reorder.php +++ b/app/code/Magento/Sales/Helper/Reorder.php @@ -39,18 +39,18 @@ class Reorder extends \Magento\Core\Helper\Data protected $_customerSession; /** - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\Store\Config $coreStoreConfig - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Locale $locale * @param \Magento\App\State $appState * @param \Magento\Customer\Model\Session $customerSession * @param bool $dbCompatibleMode */ public function __construct( - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Core\Model\Store\Config $coreStoreConfig, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Locale $locale, \Magento\App\State $appState, \Magento\Customer\Model\Session $customerSession, diff --git a/app/code/Magento/Sales/Model/Email/Template.php b/app/code/Magento/Sales/Model/Email/Template.php index 26b8a1db2dea2b4f35015b5d3fcd53c2e01e6d1f..0afe2e529f53bef599828905b46b56fce3d149a5 100644 --- a/app/code/Magento/Sales/Model/Email/Template.php +++ b/app/code/Magento/Sales/Model/Email/Template.php @@ -27,7 +27,7 @@ namespace Magento\Sales\Model\Email; -class Template extends \Magento\Core\Model\Email\Template +class Template extends \Magento\Email\Model\Template { /** * @param string $template diff --git a/app/code/Magento/Sales/Model/Order.php b/app/code/Magento/Sales/Model/Order.php index ff892f85f5917d16f58a26dc64733cc0d0075e96..9aebb0b9d6e11c09c3a0e4a77afab7a35a5b9856 100644 --- a/app/code/Magento/Sales/Model/Order.php +++ b/app/code/Magento/Sales/Model/Order.php @@ -416,13 +416,6 @@ class Order extends \Magento\Sales\Model\AbstractModel */ protected $_paymentData; - /** - * Core event manager proxy - * - * @var \Magento\Event\ManagerInterface - */ - protected $_eventManager; - /** * Core store config * @@ -451,12 +444,12 @@ class Order extends \Magento\Sales\Model\AbstractModel protected $_productFactory; /** - * @var \Magento\Core\Model\Email\Template\MailerFactory + * @var \Magento\Email\Model\Template\MailerFactory */ protected $_templateMailerFactory; /** - * @var \Magento\Core\Model\Email\InfoFactory + * @var \Magento\Email\Model\InfoFactory */ protected $_emailInfoFactory; @@ -506,8 +499,6 @@ class Order extends \Magento\Sales\Model\AbstractModel protected $_carrierFactory; /** - * @param \Magento\Event\ManagerInterface $eventManager - * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Payment\Helper\Data $paymentData * @param \Magento\Sales\Helper\Data $salesData * @param \Magento\Core\Model\Context $context @@ -516,20 +507,20 @@ class Order extends \Magento\Sales\Model\AbstractModel * @param \Magento\Core\Model\LocaleInterface $coreLocale * @param \Magento\Stdlib\DateTime $dateTime * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Sales\Model\ResourceFactory $resourceFactory - * @param \Magento\Sales\Model\Order\Config $orderConfig + * @param ResourceFactory $resourceFactory + * @param Order\Config $orderConfig * @param \Magento\Catalog\Model\ProductFactory $productFactory - * @param \Magento\Core\Model\Email\Template\MailerFactory $templateMailerFactory - * @param \Magento\Core\Model\Email\InfoFactory $emailInfoFactory - * @param \Magento\Sales\Model\Resource\Order\Item\CollectionFactory $orderItemCollFactory + * @param \Magento\Email\Model\Template\MailerFactory $templateMailerFactory + * @param \Magento\Email\Model\InfoFactory $emailInfoFactory + * @param Resource\Order\Item\CollectionFactory $orderItemCollFactory * @param \Magento\Catalog\Model\Product\Visibility $productVisibility * @param \Magento\Tax\Model\Calculation $taxCalculation - * @param \Magento\Sales\Model\Service\OrderFactory $serviceOrderFactory + * @param Service\OrderFactory $serviceOrderFactory * @param \Magento\Directory\Model\CurrencyFactory $currencyFactory * @param \Magento\Eav\Model\Config $eavConfig - * @param \Magento\Sales\Model\Order\Status\HistoryFactory $orderHistoryFactory + * @param Order\Status\HistoryFactory $orderHistoryFactory * @param \Magento\Tax\Model\Resource\Sales\Order\Tax\CollectionFactory $orderTaxCollFactory - * @param \Magento\Sales\Model\CarrierFactory $carrierFactory + * @param CarrierFactory $carrierFactory * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection * @param array $data @@ -537,7 +528,6 @@ class Order extends \Magento\Sales\Model\AbstractModel * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( - \Magento\Event\ManagerInterface $eventManager, \Magento\Payment\Helper\Data $paymentData, \Magento\Sales\Helper\Data $salesData, \Magento\Core\Model\Context $context, @@ -549,8 +539,8 @@ class Order extends \Magento\Sales\Model\AbstractModel \Magento\Sales\Model\ResourceFactory $resourceFactory, \Magento\Sales\Model\Order\Config $orderConfig, \Magento\Catalog\Model\ProductFactory $productFactory, - \Magento\Core\Model\Email\Template\MailerFactory $templateMailerFactory, - \Magento\Core\Model\Email\InfoFactory $emailInfoFactory, + \Magento\Email\Model\Template\MailerFactory $templateMailerFactory, + \Magento\Email\Model\InfoFactory $emailInfoFactory, \Magento\Sales\Model\Resource\Order\Item\CollectionFactory $orderItemCollFactory, \Magento\Catalog\Model\Product\Visibility $productVisibility, \Magento\Tax\Model\Calculation $taxCalculation, @@ -564,7 +554,6 @@ class Order extends \Magento\Sales\Model\AbstractModel \Magento\Data\Collection\Db $resourceCollection = null, array $data = array() ) { - $this->_eventManager = $eventManager; $this->_paymentData = $paymentData; $this->_salesData = $salesData; $this->_coreStoreConfig = $coreStoreConfig; diff --git a/app/code/Magento/Sales/Model/Order/Address.php b/app/code/Magento/Sales/Model/Order/Address.php index 2678eef123c7ae8e13c8fd02929378df69e5cdcc..600a32d43ed0c678edd19f5e5bd46ee7ce19bafa 100644 --- a/app/code/Magento/Sales/Model/Order/Address.php +++ b/app/code/Magento/Sales/Model/Order/Address.php @@ -91,7 +91,6 @@ class Address extends \Magento\Customer\Model\Address\AbstractAddress protected $_orderFactory; /** - * @param \Magento\Event\ManagerInterface $eventManager * @param \Magento\Directory\Helper\Data $directoryData * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry @@ -107,7 +106,6 @@ class Address extends \Magento\Customer\Model\Address\AbstractAddress * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( - \Magento\Event\ManagerInterface $eventManager, \Magento\Directory\Helper\Data $directoryData, \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, @@ -121,7 +119,6 @@ class Address extends \Magento\Customer\Model\Address\AbstractAddress array $data = array() ) { parent::__construct( - $eventManager, $directoryData, $context, $registry, diff --git a/app/code/Magento/Sales/Model/Order/Creditmemo.php b/app/code/Magento/Sales/Model/Order/Creditmemo.php index 91408d289e2630e1ac09f5719cffd594601c9607..72324f31eefef149536a1501d498d6bc63289807 100644 --- a/app/code/Magento/Sales/Model/Order/Creditmemo.php +++ b/app/code/Magento/Sales/Model/Order/Creditmemo.php @@ -179,13 +179,6 @@ class Creditmemo extends \Magento\Sales\Model\AbstractModel */ protected $_paymentData; - /** - * Core event manager proxy - * - * @var \Magento\Event\ManagerInterface - */ - protected $_eventManager; - /** * Core store config * @@ -229,32 +222,32 @@ class Creditmemo extends \Magento\Sales\Model\AbstractModel protected $_commentCollFactory; /** - * @var \Magento\Core\Model\Email\Template\MailerFactory + * @var \Magento\Email\Model\Template\MailerFactory */ protected $_templateMailerFactory; /** - * @var \Magento\Core\Model\Email\InfoFactory + * @var \Magento\Email\Model\InfoFactory */ protected $_emailInfoFactory; /** - * @param \Magento\Event\ManagerInterface $eventManager * @param \Magento\Payment\Helper\Data $paymentData * @param \Magento\Sales\Helper\Data $salesData * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry * @param \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig * @param \Magento\Core\Model\LocaleInterface $coreLocale - * @param \Magento\Sales\Model\Order\Creditmemo\Config $creditmemoConfig + * @param \Magento\Stdlib\DateTime $dateTime + * @param Creditmemo\Config $creditmemoConfig * @param \Magento\Sales\Model\OrderFactory $orderFactory * @param \Magento\Sales\Model\Resource\Order\Creditmemo\Item\CollectionFactory $cmItemCollFactory * @param \Magento\Core\Model\CalculatorFactory $calculatorFactory * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Sales\Model\Order\Creditmemo\CommentFactory $commentFactory + * @param Creditmemo\CommentFactory $commentFactory * @param \Magento\Sales\Model\Resource\Order\Creditmemo\Comment\CollectionFactory $commentCollFactory - * @param \Magento\Core\Model\Email\Template\MailerFactory $templateMailerFactory - * @param \Magento\Core\Model\Email\InfoFactory $emailInfoFactory + * @param \Magento\Email\Model\Template\MailerFactory $templateMailerFactory + * @param \Magento\Email\Model\InfoFactory $emailInfoFactory * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection * @param array $data @@ -262,7 +255,6 @@ class Creditmemo extends \Magento\Sales\Model\AbstractModel * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( - \Magento\Event\ManagerInterface $eventManager, \Magento\Payment\Helper\Data $paymentData, \Magento\Sales\Helper\Data $salesData, \Magento\Core\Model\Context $context, @@ -277,13 +269,12 @@ class Creditmemo extends \Magento\Sales\Model\AbstractModel \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Sales\Model\Order\Creditmemo\CommentFactory $commentFactory, \Magento\Sales\Model\Resource\Order\Creditmemo\Comment\CollectionFactory $commentCollFactory, - \Magento\Core\Model\Email\Template\MailerFactory $templateMailerFactory, - \Magento\Core\Model\Email\InfoFactory $emailInfoFactory, + \Magento\Email\Model\Template\MailerFactory $templateMailerFactory, + \Magento\Email\Model\InfoFactory $emailInfoFactory, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, array $data = array() ) { - $this->_eventManager = $eventManager; $this->_paymentData = $paymentData; $this->_salesData = $salesData; $this->_coreStoreConfig = $coreStoreConfig; diff --git a/app/code/Magento/Sales/Model/Order/Invoice.php b/app/code/Magento/Sales/Model/Order/Invoice.php index 25e21dccd3f95873a784441f53d3ddad99f1855d..f94e8af9426624b1cbf622a235ef26e929c0649b 100644 --- a/app/code/Magento/Sales/Model/Order/Invoice.php +++ b/app/code/Magento/Sales/Model/Order/Invoice.php @@ -185,13 +185,6 @@ class Invoice extends \Magento\Sales\Model\AbstractModel */ protected $_paymentData; - /** - * Core event manager proxy - * - * @var \Magento\Event\ManagerInterface - */ - protected $_eventManager; - /** * Core store config * @@ -235,32 +228,32 @@ class Invoice extends \Magento\Sales\Model\AbstractModel protected $_commentCollFactory; /** - * @var \Magento\Core\Model\Email\Template\MailerFactory + * @var \Magento\Email\Model\Template\MailerFactory */ protected $_templateMailerFactory; /** - * @var \Magento\Core\Model\Email\InfoFactory + * @var \Magento\Email\Model\InfoFactory */ protected $_emailInfoFactory; /** - * @param \Magento\Event\ManagerInterface $eventManager * @param \Magento\Payment\Helper\Data $paymentData * @param \Magento\Sales\Helper\Data $salesData * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry * @param \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig * @param \Magento\Core\Model\LocaleInterface $coreLocale - * @param \Magento\Sales\Model\Order\Invoice\Config $invoiceConfig + * @param \Magento\Stdlib\DateTime $dateTime + * @param Invoice\Config $invoiceConfig * @param \Magento\Sales\Model\OrderFactory $orderFactory * @param \Magento\Sales\Model\Resource\OrderFactory $orderResourceFactory * @param \Magento\Core\Model\CalculatorFactory $calculatorFactory * @param \Magento\Sales\Model\Resource\Order\Invoice\Item\CollectionFactory $invoiceItemCollFactory - * @param \Magento\Sales\Model\Order\Invoice\CommentFactory $invoiceCommentFactory + * @param Invoice\CommentFactory $invoiceCommentFactory * @param \Magento\Sales\Model\Resource\Order\Invoice\Comment\CollectionFactory $commentCollFactory - * @param \Magento\Core\Model\Email\Template\MailerFactory $templateMailerFactory - * @param \Magento\Core\Model\Email\InfoFactory $emailInfoFactory + * @param \Magento\Email\Model\Template\MailerFactory $templateMailerFactory + * @param \Magento\Email\Model\InfoFactory $emailInfoFactory * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection * @param array $data @@ -268,7 +261,6 @@ class Invoice extends \Magento\Sales\Model\AbstractModel * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( - \Magento\Event\ManagerInterface $eventManager, \Magento\Payment\Helper\Data $paymentData, \Magento\Sales\Helper\Data $salesData, \Magento\Core\Model\Context $context, @@ -283,13 +275,12 @@ class Invoice extends \Magento\Sales\Model\AbstractModel \Magento\Sales\Model\Resource\Order\Invoice\Item\CollectionFactory $invoiceItemCollFactory, \Magento\Sales\Model\Order\Invoice\CommentFactory $invoiceCommentFactory, \Magento\Sales\Model\Resource\Order\Invoice\Comment\CollectionFactory $commentCollFactory, - \Magento\Core\Model\Email\Template\MailerFactory $templateMailerFactory, - \Magento\Core\Model\Email\InfoFactory $emailInfoFactory, + \Magento\Email\Model\Template\MailerFactory $templateMailerFactory, + \Magento\Email\Model\InfoFactory $emailInfoFactory, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, array $data = array() ) { - $this->_eventManager = $eventManager; $this->_paymentData = $paymentData; $this->_salesData = $salesData; $this->_coreStoreConfig = $coreStoreConfig; diff --git a/app/code/Magento/Sales/Model/Order/Item.php b/app/code/Magento/Sales/Model/Order/Item.php index e24de1cdf3ef78daf00869f6bdc9f5ec7b0a2552..432ea182582d5867e2ec507967060a5dd2c1d576 100644 --- a/app/code/Magento/Sales/Model/Order/Item.php +++ b/app/code/Magento/Sales/Model/Order/Item.php @@ -218,13 +218,6 @@ class Item extends \Magento\Core\Model\AbstractModel protected $_parentItem = null; protected $_children = array(); - /** - * Core event manager proxy - * - * @var \Magento\Event\ManagerInterface - */ - protected $_eventManager = null; - /** * @var \Magento\Sales\Model\OrderFactory */ @@ -236,7 +229,6 @@ class Item extends \Magento\Core\Model\AbstractModel protected $_productFactory; /** - * @param \Magento\Event\ManagerInterface $eventManager * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry * @param \Magento\Sales\Model\OrderFactory $orderFactory @@ -246,7 +238,6 @@ class Item extends \Magento\Core\Model\AbstractModel * @param array $data */ public function __construct( - \Magento\Event\ManagerInterface $eventManager, \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, \Magento\Sales\Model\OrderFactory $orderFactory, @@ -255,7 +246,6 @@ class Item extends \Magento\Core\Model\AbstractModel \Magento\Data\Collection\Db $resourceCollection = null, array $data = array() ) { - $this->_eventManager = $eventManager; $this->_orderFactory = $orderFactory; $this->_productFactory = $productFactory; parent::__construct($context, $registry, $resource, $resourceCollection, $data); diff --git a/app/code/Magento/Sales/Model/Order/Payment.php b/app/code/Magento/Sales/Model/Order/Payment.php index 3fc93e3b8fadc374506bf2f4899af2336bdc59d8..98308de75bb5d6d5f4ad5912aef85c9dc379e8e3 100644 --- a/app/code/Magento/Sales/Model/Order/Payment.php +++ b/app/code/Magento/Sales/Model/Order/Payment.php @@ -184,13 +184,6 @@ class Payment extends \Magento\Payment\Model\Info */ protected $_transactionAdditionalInfo = array(); - /** - * Core event manager proxy - * - * @var \Magento\Event\ManagerInterface - */ - protected $_eventManager = null; - /** * @var \Magento\Sales\Model\Service\Order */ @@ -217,7 +210,6 @@ class Payment extends \Magento\Payment\Model\Info protected $_storeManager; /** - * @param \Magento\Event\ManagerInterface $eventManager * @param \Magento\Payment\Helper\Data $paymentData * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry @@ -232,7 +224,6 @@ class Payment extends \Magento\Payment\Model\Info * @param array $data */ public function __construct( - \Magento\Event\ManagerInterface $eventManager, \Magento\Payment\Helper\Data $paymentData, \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, @@ -246,7 +237,6 @@ class Payment extends \Magento\Payment\Model\Info \Magento\Data\Collection\Db $resourceCollection = null, array $data = array() ) { - $this->_eventManager = $eventManager; $this->_serviceOrderFactory = $serviceOrderFactory; $this->_transactionFactory = $transactionFactory; $this->_transactionCollFactory = $transactionCollFactory; diff --git a/app/code/Magento/Sales/Model/Order/Payment/Transaction.php b/app/code/Magento/Sales/Model/Order/Payment/Transaction.php index 98282ab5a127b256b4a66cb99f32d9c762e0f98a..c38def57172d35b9747be9d2d8d4d042dee18b32 100644 --- a/app/code/Magento/Sales/Model/Order/Payment/Transaction.php +++ b/app/code/Magento/Sales/Model/Order/Payment/Transaction.php @@ -145,13 +145,6 @@ class Transaction extends \Magento\Core\Model\AbstractModel */ protected $_orderWebsiteId = null; - /** - * Core event manager proxy - * - * @var \Magento\Event\ManagerInterface - */ - protected $_eventManager = null; - /** * @var \Magento\Sales\Model\Order\PaymentFactory */ @@ -168,7 +161,6 @@ class Transaction extends \Magento\Core\Model\AbstractModel protected $_dateFactory; /** - * @param \Magento\Event\ManagerInterface $eventManager * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry * @param \Magento\Sales\Model\Order\PaymentFactory $paymentFactory @@ -179,7 +171,6 @@ class Transaction extends \Magento\Core\Model\AbstractModel * @param array $data */ public function __construct( - \Magento\Event\ManagerInterface $eventManager, \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, \Magento\Sales\Model\Order\PaymentFactory $paymentFactory, @@ -189,7 +180,6 @@ class Transaction extends \Magento\Core\Model\AbstractModel \Magento\Data\Collection\Db $resourceCollection = null, array $data = array() ) { - $this->_eventManager = $eventManager; $this->_paymentFactory = $paymentFactory; $this->_orderFactory = $orderFactory; $this->_dateFactory = $dateFactory; diff --git a/app/code/Magento/Sales/Model/Order/Shipment.php b/app/code/Magento/Sales/Model/Order/Shipment.php index 4f3c69a50f6520c9d20a19af9fdc5175e7c9772f..8d5a87f4693758b9513a89ad64df611cc183c747 100644 --- a/app/code/Magento/Sales/Model/Order/Shipment.php +++ b/app/code/Magento/Sales/Model/Order/Shipment.php @@ -137,12 +137,12 @@ class Shipment extends \Magento\Sales\Model\AbstractModel protected $_commentCollFactory; /** - * @var \Magento\Core\Model\Email\Template\MailerFactory + * @var \Magento\Email\Model\Template\MailerFactory */ protected $_templateMailerFactory; /** - * @var \Magento\Core\Model\Email\InfoFactory + * @var \Magento\Email\Model\InfoFactory */ protected $_emailInfoFactory; @@ -159,8 +159,8 @@ class Shipment extends \Magento\Sales\Model\AbstractModel * @param \Magento\Sales\Model\Resource\Order\Shipment\Track\CollectionFactory $trackCollFactory * @param \Magento\Sales\Model\Order\Shipment\CommentFactory $commentFactory * @param \Magento\Sales\Model\Resource\Order\Shipment\Comment\CollectionFactory $commentCollFactory - * @param \Magento\Core\Model\Email\Template\MailerFactory $templateMailerFactory - * @param \Magento\Core\Model\Email\InfoFactory $emailInfoFactory + * @param \Magento\Email\Model\Template\MailerFactory $templateMailerFactory + * @param \Magento\Email\Model\InfoFactory $emailInfoFactory * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection * @param array $data @@ -180,8 +180,8 @@ class Shipment extends \Magento\Sales\Model\AbstractModel \Magento\Sales\Model\Resource\Order\Shipment\Track\CollectionFactory $trackCollFactory, \Magento\Sales\Model\Order\Shipment\CommentFactory $commentFactory, \Magento\Sales\Model\Resource\Order\Shipment\Comment\CollectionFactory $commentCollFactory, - \Magento\Core\Model\Email\Template\MailerFactory $templateMailerFactory, - \Magento\Core\Model\Email\InfoFactory $emailInfoFactory, + \Magento\Email\Model\Template\MailerFactory $templateMailerFactory, + \Magento\Email\Model\InfoFactory $emailInfoFactory, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, array $data = array() @@ -532,7 +532,7 @@ class Shipment extends \Magento\Sales\Model\AbstractModel $customerName = $order->getCustomerName(); } - /** @var $mailer \Magento\Core\Model\Email\Template\Mailer */ + /** @var $mailer \Magento\Email\Model\Template\Mailer */ $mailer = $this->_templateMailerFactory->create(); if ($notifyCustomer) { $emailInfo = $this->_emailInfoFactory->create(); diff --git a/app/code/Magento/Sales/Model/Order/Status.php b/app/code/Magento/Sales/Model/Order/Status.php index dc072cf05b14e68eca93fdbd18e4403adc8657e4..9261b707924c45b620257928669d58e6b5ba8e2b 100644 --- a/app/code/Magento/Sales/Model/Order/Status.php +++ b/app/code/Magento/Sales/Model/Order/Status.php @@ -99,7 +99,7 @@ class Status extends \Magento\Core\Model\AbstractModel $this->_getResource()->unassignState($this->getStatus(), $state); $this->_getResource()->commit(); $params = array('status' => $this->getStatus(), 'state' => $state); - $this->_eventDispatcher->dispatch('sales_order_status_unassign', $params); + $this->_eventManager->dispatch('sales_order_status_unassign', $params); } catch (\Exception $e) { $this->_getResource()->rollBack(); throw $e; diff --git a/app/code/Magento/Sales/Model/Quote.php b/app/code/Magento/Sales/Model/Quote.php index e09e442f1f7c10b6416ac75f8c83a85376e5a57a..ed219119323273fa6573dc7c5f16ef766dce2188 100644 --- a/app/code/Magento/Sales/Model/Quote.php +++ b/app/code/Magento/Sales/Model/Quote.php @@ -207,13 +207,6 @@ class Quote extends \Magento\Core\Model\AbstractModel */ protected $_salesData; - /** - * Core event manager proxy - * - * @var \Magento\Event\ManagerInterface - */ - protected $_eventManager; - /** * Core store config * @@ -257,9 +250,9 @@ class Quote extends \Magento\Core\Model\AbstractModel protected $_quoteItemFactory; /** - * @var \Magento\Core\Model\Message + * @var \Magento\Message\Factory */ - protected $_message; + protected $messageFactory; /** * @var \Magento\Sales\Model\Status\ListFactory @@ -305,7 +298,7 @@ class Quote extends \Magento\Core\Model\AbstractModel * @param \Magento\Customer\Model\GroupFactory $customerGroupFactory * @param \Magento\Sales\Model\Resource\Quote\Item\CollectionFactory $quoteItemCollFactory * @param \Magento\Sales\Model\Quote\ItemFactory $quoteItemFactory - * @param \Magento\Core\Model\Message $message + * @param \Magento\Message\Factory $messageFactory * @param \Magento\Sales\Model\Status\ListFactory $statusListFactory * @param \Magento\Catalog\Model\ProductFactory $productFactory * @param \Magento\Sales\Model\Quote\PaymentFactory $quotePaymentFactory @@ -319,7 +312,6 @@ class Quote extends \Magento\Core\Model\AbstractModel * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( - \Magento\Event\ManagerInterface $eventManager, \Magento\Sales\Helper\Data $salesData, \Magento\Catalog\Helper\Product $catalogProduct, \Magento\Core\Model\Context $context, @@ -332,7 +324,7 @@ class Quote extends \Magento\Core\Model\AbstractModel \Magento\Customer\Model\GroupFactory $customerGroupFactory, \Magento\Sales\Model\Resource\Quote\Item\CollectionFactory $quoteItemCollFactory, \Magento\Sales\Model\Quote\ItemFactory $quoteItemFactory, - \Magento\Core\Model\Message $message, + \Magento\Message\Factory $messageFactory, \Magento\Sales\Model\Status\ListFactory $statusListFactory, \Magento\Catalog\Model\ProductFactory $productFactory, \Magento\Sales\Model\Quote\PaymentFactory $quotePaymentFactory, @@ -343,7 +335,6 @@ class Quote extends \Magento\Core\Model\AbstractModel \Magento\Data\Collection\Db $resourceCollection = null, array $data = array() ) { - $this->_eventManager = $eventManager; $this->_salesData = $salesData; $this->_catalogProduct = $catalogProduct; $this->_coreStoreConfig = $coreStoreConfig; @@ -354,7 +345,7 @@ class Quote extends \Magento\Core\Model\AbstractModel $this->_customerGroupFactory = $customerGroupFactory; $this->_quoteItemCollFactory = $quoteItemCollFactory; $this->_quoteItemFactory = $quoteItemFactory; - $this->_message = $message; + $this->messageFactory = $messageFactory; $this->_statusListFactory = $statusListFactory; $this->_productFactory = $productFactory; $this->_quotePaymentFactory = $quotePaymentFactory; @@ -1661,7 +1652,7 @@ class Quote extends \Magento\Core\Model\AbstractModel } if (is_string($message)) { - $message = $this->_message->error($message); + $message = $this->messageFactory->error($message); } $messages[$index] = $message; @@ -1693,8 +1684,8 @@ class Quote extends \Magento\Core\Model\AbstractModel { $errors = array(); foreach ($this->getMessages() as $message) { - /* @var $error \Magento\Core\Model\Message\AbstractMessage */ - if ($message->getType() == \Magento\Core\Model\Message::ERROR) { + /* @var $error \Magento\Message\AbstractMessage */ + if ($message->getType() == \Magento\Message\Factory::ERROR) { array_push($errors, $message); } } @@ -1836,7 +1827,7 @@ class Quote extends \Magento\Core\Model\AbstractModel } $message = $messages[$type]; - if ($message instanceof \Magento\Core\Model\Message\AbstractMessage) { + if ($message instanceof \Magento\Message\AbstractMessage) { $message = $message->getText(); } elseif (!is_string($message)) { return $this; diff --git a/app/code/Magento/Sales/Model/Quote/Address.php b/app/code/Magento/Sales/Model/Quote/Address.php index f1cd3e161a57e724bd2a982c62fff2c9edf09d56..659949e3a44262e135cf0e9a635798dd59de65c7 100644 --- a/app/code/Magento/Sales/Model/Quote/Address.php +++ b/app/code/Magento/Sales/Model/Quote/Address.php @@ -250,12 +250,6 @@ class Address extends \Magento\Customer\Model\Address\AbstractAddress protected $_addressTotalFactory; /** - * @var \Magento\Object\Copy - */ - protected $_objectCopyService; - - /** - * @param \Magento\Event\ManagerInterface $eventManager * @param \Magento\Directory\Helper\Data $directoryData * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry @@ -265,23 +259,22 @@ class Address extends \Magento\Customer\Model\Address\AbstractAddress * @param \Magento\Directory\Model\CountryFactory $countryFactory * @param \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig * @param \Magento\Customer\Model\AddressFactory $addressFactory - * @param \Magento\Sales\Model\Quote\Address\ItemFactory $addressItemFactory + * @param Address\ItemFactory $addressItemFactory * @param \Magento\Sales\Model\Resource\Quote\Address\Item\CollectionFactory $itemCollFactory - * @param \Magento\Sales\Model\Quote\Address\RateFactory $addressRateFactory + * @param Address\RateFactory $addressRateFactory * @param \Magento\Shipping\Model\ShippingFactory $shippingFactory * @param \Magento\Sales\Model\Resource\Quote\Address\Rate\CollectionFactory $rateCollFactory * @param \Magento\Shipping\Model\Rate\RequestFactory $rateRequestFactory - * @param \Magento\Sales\Model\Quote\Address\Total\CollectorFactory $totalCollectorFactory - * @param \Magento\Sales\Model\Quote\Address\TotalFactory $addressTotalFactory + * @param Address\Total\CollectorFactory $totalCollectorFactory + * @param Address\TotalFactory $addressTotalFactory * @param \Magento\Object\Copy $objectCopyService * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection * @param array $data - * + * * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( - \Magento\Event\ManagerInterface $eventManager, \Magento\Directory\Helper\Data $directoryData, \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, @@ -316,7 +309,6 @@ class Address extends \Magento\Customer\Model\Address\AbstractAddress $this->_addressTotalFactory = $addressTotalFactory; $this->_objectCopyService = $objectCopyService; parent::__construct( - $eventManager, $directoryData, $context, $registry, diff --git a/app/code/Magento/Sales/Model/Quote/Item.php b/app/code/Magento/Sales/Model/Quote/Item.php index 95199f7377258228155f45a36ab3e897bc8c7063..74a5d7ea70b1c175c71c32bf0f3fdcc4e2eba504 100644 --- a/app/code/Magento/Sales/Model/Quote/Item.php +++ b/app/code/Magento/Sales/Model/Quote/Item.php @@ -190,13 +190,6 @@ class Item extends \Magento\Sales\Model\Quote\Item\AbstractItem */ protected $_errorInfos; - /** - * Core event manager proxy - * - * @var \Magento\Event\ManagerInterface - */ - protected $_eventManager = null; - /** * @var \Magento\Core\Model\LocaleInterface */ @@ -208,7 +201,6 @@ class Item extends \Magento\Sales\Model\Quote\Item\AbstractItem protected $_itemOptionFactory; /** - * @param \Magento\Event\ManagerInterface $eventManager * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry * @param \Magento\Catalog\Model\ProductFactory $productFactory @@ -222,7 +214,6 @@ class Item extends \Magento\Sales\Model\Quote\Item\AbstractItem * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( - \Magento\Event\ManagerInterface $eventManager, \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, \Magento\Catalog\Model\ProductFactory $productFactory, @@ -233,7 +224,6 @@ class Item extends \Magento\Sales\Model\Quote\Item\AbstractItem \Magento\Data\Collection\Db $resourceCollection = null, array $data = array() ) { - $this->_eventManager = $eventManager; $this->_errorInfos = $statusListFactory->create(); $this->_locale = $locale; $this->_itemOptionFactory = $itemOptionFactory; diff --git a/app/code/Magento/Sales/Model/Quote/Payment.php b/app/code/Magento/Sales/Model/Quote/Payment.php index 296a061d4907f385cc62927790f81c805e010507..2554dff3dc53bdb6d2c54c5decae72a64b9b642c 100644 --- a/app/code/Magento/Sales/Model/Quote/Payment.php +++ b/app/code/Magento/Sales/Model/Quote/Payment.php @@ -77,37 +77,6 @@ class Payment extends \Magento\Payment\Model\Info protected $_quote; - /** - * Core event manager proxy - * - * @var \Magento\Event\ManagerInterface - */ - protected $_eventManager = null; - - /** - * @param \Magento\Event\ManagerInterface $eventManager - * @param \Magento\Payment\Helper\Data $paymentData - * @param \Magento\Core\Model\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Encryption\EncryptorInterface $encryptor - * @param \Magento\Core\Model\Resource\AbstractResource $resource - * @param \Magento\Data\Collection\Db $resourceCollection - * @param array $data - */ - public function __construct( - \Magento\Event\ManagerInterface $eventManager, - \Magento\Payment\Helper\Data $paymentData, - \Magento\Core\Model\Context $context, - \Magento\Core\Model\Registry $registry, - \Magento\Encryption\EncryptorInterface $encryptor, - \Magento\Core\Model\Resource\AbstractResource $resource = null, - \Magento\Data\Collection\Db $resourceCollection = null, - array $data = array() - ) { - $this->_eventManager = $eventManager; - parent::__construct($paymentData, $context, $registry, $encryptor, $resource, $resourceCollection, $data); - } - /** * Initialize resource model */ diff --git a/app/code/Magento/Sales/view/adminhtml/layout/sales_order_create_index.xml b/app/code/Magento/Sales/view/adminhtml/layout/sales_order_create_index.xml index ea64a7c7d224c799b4cd5af5889e56e80fc6b528..e172280e9d985f84b7c0ee8c2cbef1051d151742 100644 --- a/app/code/Magento/Sales/view/adminhtml/layout/sales_order_create_index.xml +++ b/app/code/Magento/Sales/view/adminhtml/layout/sales_order_create_index.xml @@ -111,7 +111,7 @@ <block class="Magento\Adminhtml\Block\Template" name="gift_options" template="Magento_Sales::order/giftoptions.phtml"> <block class="Magento\Sales\Block\Adminhtml\Order\Create\Giftmessage" template="order/create/giftmessage.phtml" name="giftmessage"/> </block> - <block class="Magento\Core\Block\Text\ListText" name="order_item_extra_info"/> + <block class="Magento\View\Block\Text\ListText" name="order_item_extra_info"/> </block> </block> </block> diff --git a/app/code/Magento/Sales/view/adminhtml/layout/sales_order_create_load_block_data.xml b/app/code/Magento/Sales/view/adminhtml/layout/sales_order_create_load_block_data.xml index 0e97b9c64d7814230d03407b92ddcbbf04779c40..fe3896f2619edb138f5cccb9baee43ba06671a7c 100644 --- a/app/code/Magento/Sales/view/adminhtml/layout/sales_order_create_load_block_data.xml +++ b/app/code/Magento/Sales/view/adminhtml/layout/sales_order_create_load_block_data.xml @@ -62,7 +62,7 @@ <block class="Magento\Adminhtml\Block\Template" name="gift_options" template="Magento_Sales::order/giftoptions.phtml"> <block class="Magento\Sales\Block\Adminhtml\Order\Create\Giftmessage" template="order/create/giftmessage.phtml" name="giftmessage"/> </block> - <block class="Magento\Core\Block\Text\ListText" name="order_item_extra_info"/> + <block class="Magento\View\Block\Text\ListText" name="order_item_extra_info"/> </block> </referenceContainer> </layout> diff --git a/app/code/Magento/Sales/view/adminhtml/layout/sales_order_create_load_block_items.xml b/app/code/Magento/Sales/view/adminhtml/layout/sales_order_create_load_block_items.xml index 342847b839dc9025f57f8bc34a8c0de0ecdd1b53..48ba2ab37f3a0802263458b2b8d81c0dba27936f 100644 --- a/app/code/Magento/Sales/view/adminhtml/layout/sales_order_create_load_block_items.xml +++ b/app/code/Magento/Sales/view/adminhtml/layout/sales_order_create_load_block_items.xml @@ -32,6 +32,6 @@ </block> </block> </block> - <block class="Magento\Core\Block\Text\ListText" name="order_item_extra_info"/> + <block class="Magento\View\Block\Text\ListText" name="order_item_extra_info"/> </referenceContainer> </layout> diff --git a/app/code/Magento/Sales/view/adminhtml/layout/sales_order_creditmemo_new.xml b/app/code/Magento/Sales/view/adminhtml/layout/sales_order_creditmemo_new.xml index 88e5265a8b07b513f53fce5e49fdbbd0fe95b799..7f1d7025dc5526bbc41bb54f78f600ef0014b412 100644 --- a/app/code/Magento/Sales/view/adminhtml/layout/sales_order_creditmemo_new.xml +++ b/app/code/Magento/Sales/view/adminhtml/layout/sales_order_creditmemo_new.xml @@ -34,7 +34,7 @@ <block class="Magento\Sales\Block\Adminhtml\Items\Column\Qty" name="column_qty" template="items/column/qty.phtml" group="column"/> <block class="Magento\Sales\Block\Adminhtml\Items\Column\Name" name="column_name" template="items/column/name.phtml" group="column"/> <block class="Magento\Sales\Block\Adminhtml\Items\Column\Name\Grouped" name="column_name_grouped" template="items/column/name.phtml" group="column"/> - <block class="Magento\Core\Block\Text\ListText" name="order_item_extra_info"/> + <block class="Magento\View\Block\Text\ListText" name="order_item_extra_info"/> <block class="Magento\Sales\Block\Adminhtml\Order\Totalbar" name="order_totalbar" template="order/totalbar.phtml"/> <block class="Magento\Sales\Block\Adminhtml\Order\Creditmemo\Totals" name="creditmemo_totals" template="order/totals.phtml"> <block class="Magento\Sales\Block\Adminhtml\Order\Creditmemo\Create\Adjustments" name="adjustments" template="order/creditmemo/create/totals/adjustments.phtml"/> diff --git a/app/code/Magento/Sales/view/adminhtml/layout/sales_order_creditmemo_updateqty.xml b/app/code/Magento/Sales/view/adminhtml/layout/sales_order_creditmemo_updateqty.xml index 15553f15632927b260e31d1254baaf2ff15e7495..9ea4985b568eeb67e7f5621f6588910e2dc6dc0e 100644 --- a/app/code/Magento/Sales/view/adminhtml/layout/sales_order_creditmemo_updateqty.xml +++ b/app/code/Magento/Sales/view/adminhtml/layout/sales_order_creditmemo_updateqty.xml @@ -29,7 +29,7 @@ <block class="Magento\Sales\Block\Adminhtml\Items\Column\Qty" name="column_qty" template="items/column/qty.phtml" group="column"/> <block class="Magento\Sales\Block\Adminhtml\Items\Column\Name" name="column_name" template="items/column/name.phtml" group="column"/> <block class="Magento\Sales\Block\Adminhtml\Items\Column\Name\Grouped" name="column_name_grouped" template="items/column/name.phtml" group="column"/> - <block class="Magento\Core\Block\Text\ListText" name="order_item_extra_info"/> + <block class="Magento\View\Block\Text\ListText" name="order_item_extra_info"/> <block class="Magento\Sales\Block\Adminhtml\Order\Totalbar" name="order_totalbar" template="order/totalbar.phtml"/> <block class="Magento\Sales\Block\Adminhtml\Order\Creditmemo\Totals" name="creditmemo_totals" template="order/totals.phtml"> <block class="Magento\Sales\Block\Adminhtml\Order\Creditmemo\Create\Adjustments" name="adjustments" template="order/creditmemo/create/totals/adjustments.phtml"/> diff --git a/app/code/Magento/Sales/view/adminhtml/layout/sales_order_creditmemo_view.xml b/app/code/Magento/Sales/view/adminhtml/layout/sales_order_creditmemo_view.xml index 590a3663a4d4db9bc6739875c08cdc4d8f68a727..00bcfbd0837d3ce5417dc7c8818a98dec166a881 100644 --- a/app/code/Magento/Sales/view/adminhtml/layout/sales_order_creditmemo_view.xml +++ b/app/code/Magento/Sales/view/adminhtml/layout/sales_order_creditmemo_view.xml @@ -34,7 +34,7 @@ <block class="Magento\Sales\Block\Adminhtml\Items\Column\Qty" name="column_qty" template="items/column/qty.phtml" group="column"/> <block class="Magento\Sales\Block\Adminhtml\Items\Column\Name" name="column_name" template="items/column/name.phtml" group="column"/> <block class="Magento\Sales\Block\Adminhtml\Items\Column\Name\Grouped" name="column_name_grouped" template="items/column/name.phtml" group="column"/> - <block class="Magento\Core\Block\Text\ListText" name="order_item_extra_info"/> + <block class="Magento\View\Block\Text\ListText" name="order_item_extra_info"/> </block> <block class="Magento\Sales\Block\Adminhtml\Order\Comments\View" name="order_comments" template="order/comments/view.phtml"> <action method="setParentType"> diff --git a/app/code/Magento/Sales/view/adminhtml/layout/sales_order_invoice_new.xml b/app/code/Magento/Sales/view/adminhtml/layout/sales_order_invoice_new.xml index d61ec84080cf8141f83e102d8da4263fd2fa500f..ab9d01d5f6533f1700b7e24c206a2fa0300d7780 100644 --- a/app/code/Magento/Sales/view/adminhtml/layout/sales_order_invoice_new.xml +++ b/app/code/Magento/Sales/view/adminhtml/layout/sales_order_invoice_new.xml @@ -34,7 +34,7 @@ <block class="Magento\Sales\Block\Adminhtml\Items\Column\Qty" name="column_qty" template="items/column/qty.phtml" group="column"/> <block class="Magento\Sales\Block\Adminhtml\Items\Column\Name" name="column_name" template="items/column/name.phtml" group="column"/> <block class="Magento\Sales\Block\Adminhtml\Items\Column\Name\Grouped" name="column_name_grouped" template="items/column/name.phtml" group="column"/> - <block class="Magento\Core\Block\Text\ListText" name="order_item_extra_info"/> + <block class="Magento\View\Block\Text\ListText" name="order_item_extra_info"/> <block class="Magento\Sales\Block\Adminhtml\Order\Totalbar" name="order_totalbar" template="order/totalbar.phtml"/> <block class="Magento\Sales\Block\Adminhtml\Order\Invoice\Totals" name="invoice_totals" template="order/totals.phtml"> <block class="Magento\Sales\Block\Adminhtml\Order\Totals\Tax" name="tax" template="order/totals/tax.phtml"/> diff --git a/app/code/Magento/Sales/view/adminhtml/layout/sales_order_invoice_updateqty.xml b/app/code/Magento/Sales/view/adminhtml/layout/sales_order_invoice_updateqty.xml index 4ea586a7b16f101b5962457c3aa0b9dabd5224af..bb65f6231a0808c8c3ed18e7e10ac606fc15b702 100644 --- a/app/code/Magento/Sales/view/adminhtml/layout/sales_order_invoice_updateqty.xml +++ b/app/code/Magento/Sales/view/adminhtml/layout/sales_order_invoice_updateqty.xml @@ -29,7 +29,7 @@ <block class="Magento\Sales\Block\Adminhtml\Items\Column\Qty" name="column_qty" template="items/column/qty.phtml" group="column"/> <block class="Magento\Sales\Block\Adminhtml\Items\Column\Name" name="column_name" template="items/column/name.phtml" group="column"/> <block class="Magento\Sales\Block\Adminhtml\Items\Column\Name\Grouped" name="column_name_grouped" template="items/column/name.phtml" group="column"/> - <block class="Magento\Core\Block\Text\ListText" name="order_item_extra_info"/> + <block class="Magento\View\Block\Text\ListText" name="order_item_extra_info"/> <block class="Magento\Sales\Block\Adminhtml\Order\Totalbar" name="order_totalbar" template="order/totalbar.phtml"/> <block class="Magento\Sales\Block\Adminhtml\Order\Invoice\Totals" name="invoice_totals" template="order/totals.phtml"> <block class="Magento\Sales\Block\Adminhtml\Order\Totals\Tax" name="tax" template="order/totals/tax.phtml"/> diff --git a/app/code/Magento/Sales/view/adminhtml/layout/sales_order_invoice_view.xml b/app/code/Magento/Sales/view/adminhtml/layout/sales_order_invoice_view.xml index 9125683162063efecd0beab08f605e0efe6ceff9..ce540e078422a69d9ba29262e810bc0c068b5079 100644 --- a/app/code/Magento/Sales/view/adminhtml/layout/sales_order_invoice_view.xml +++ b/app/code/Magento/Sales/view/adminhtml/layout/sales_order_invoice_view.xml @@ -34,7 +34,7 @@ <block class="Magento\Sales\Block\Adminhtml\Items\Column\Qty" name="column_qty" template="items/column/qty.phtml" group="column"/> <block class="Magento\Sales\Block\Adminhtml\Items\Column\Name" name="column_name" template="items/column/name.phtml" group="column"/> <block class="Magento\Sales\Block\Adminhtml\Items\Column\Name\Grouped" name="column_name_grouped" template="items/column/name.phtml" group="column"/> - <block class="Magento\Core\Block\Text\ListText" name="order_item_extra_info"/> + <block class="Magento\View\Block\Text\ListText" name="order_item_extra_info"/> </block> <block class="Magento\Sales\Block\Adminhtml\Order\Comments\View" name="order_comments" template="order/comments/view.phtml"> <action method="setParentType"> diff --git a/app/code/Magento/Sales/view/adminhtml/layout/sales_order_shipment_new.xml b/app/code/Magento/Sales/view/adminhtml/layout/sales_order_shipment_new.xml index b315840b7fee749b9e95bb7f3e37d151defd3459..c27ac0177649985edc7aa58d8d2946be5b42869c 100644 --- a/app/code/Magento/Sales/view/adminhtml/layout/sales_order_shipment_new.xml +++ b/app/code/Magento/Sales/view/adminhtml/layout/sales_order_shipment_new.xml @@ -41,7 +41,7 @@ <block class="Magento\Sales\Block\Adminhtml\Items\Renderer\DefaultRenderer" as="default" template="order/shipment/create/items/renderer/default.phtml"/> <block class="Magento\Sales\Block\Adminhtml\Items\Column\Qty" name="column_qty" template="items/column/qty.phtml" group="column"/> <block class="Magento\Sales\Block\Adminhtml\Items\Column\Name" name="column_name" template="items/column/name.phtml" group="column"/> - <block class="Magento\Core\Block\Text\ListText" name="order_item_extra_info"/> + <block class="Magento\View\Block\Text\ListText" name="order_item_extra_info"/> </block> <block class="Magento\Sales\Block\Adminhtml\Order\Shipment\Packaging" name="shipment_packaging" template="order/shipment/packaging/popup.phtml"/> </block> diff --git a/app/code/Magento/Sales/view/adminhtml/layout/sales_order_shipment_view.xml b/app/code/Magento/Sales/view/adminhtml/layout/sales_order_shipment_view.xml index 68771ba31306beb30ad04e25d2aa26a8bce29737..a53d752e8ee6b66edd44fdc8d28a1227ccb45058 100644 --- a/app/code/Magento/Sales/view/adminhtml/layout/sales_order_shipment_view.xml +++ b/app/code/Magento/Sales/view/adminhtml/layout/sales_order_shipment_view.xml @@ -41,7 +41,7 @@ <block class="Magento\Sales\Block\Adminhtml\Items\Renderer\DefaultRenderer" as="default" template="order/shipment/view/items/renderer/default.phtml"/> <block class="Magento\Sales\Block\Adminhtml\Items\Column\Qty" name="column_qty" template="items/column/qty.phtml" group="column"/> <block class="Magento\Sales\Block\Adminhtml\Items\Column\Name" name="column_name" template="items/column/name.phtml" group="column"/> - <block class="Magento\Core\Block\Text\ListText" name="order_item_extra_info"/> + <block class="Magento\View\Block\Text\ListText" name="order_item_extra_info"/> </block> <block class="Magento\Sales\Block\Adminhtml\Order\Invoice\Create\Tracking" name="invoice_tracking" template="order/shipment/create/tracking.phtml"/> <block class="Magento\Sales\Block\Adminhtml\Order\Comments\View" name="order_comments" template="order/comments/view.phtml"> diff --git a/app/code/Magento/Sales/view/adminhtml/layout/sales_order_view.xml b/app/code/Magento/Sales/view/adminhtml/layout/sales_order_view.xml index a796f65243e8d1b1f1a7c9a2fd0cf4d8497a08a2..641aa08275ab0002567e8ca81b18446b7ddb6521 100644 --- a/app/code/Magento/Sales/view/adminhtml/layout/sales_order_view.xml +++ b/app/code/Magento/Sales/view/adminhtml/layout/sales_order_view.xml @@ -49,7 +49,7 @@ <block class="Magento\Sales\Block\Adminhtml\Items\Column\Qty" name="column_qty" template="items/column/qty.phtml" group="column"/> <block class="Magento\Sales\Block\Adminhtml\Items\Column\Name" name="column_name" template="items/column/name.phtml" group="column"/> <block class="Magento\Sales\Block\Adminhtml\Items\Column\Name\Grouped" name="column_name_grouped" template="items/column/name.phtml" group="column"/> - <block class="Magento\Core\Block\Text\ListText" name="order_item_extra_info"/> + <block class="Magento\View\Block\Text\ListText" name="order_item_extra_info"/> </block> <block class="Magento\Sales\Block\Adminhtml\Order\Payment" name="order_payment"/> <block class="Magento\Sales\Block\Adminhtml\Order\View\History" name="order_history" template="order/view/history.phtml"/> diff --git a/app/code/Magento/Sales/view/email/shipment_new.html b/app/code/Magento/Sales/view/email/shipment_new.html index 268002c805ac43082980086d96fa48f1a2ff66b7..7516bff4297faeba71947958d88df895c2d5dd90 100644 --- a/app/code/Magento/Sales/view/email/shipment_new.html +++ b/app/code/Magento/Sales/view/email/shipment_new.html @@ -13,7 +13,7 @@ "var order.shipping_address.format('html')":"Shipping Address", "var order.shipping_description":"Shipping Description", "layout handle=\"sales_email_order_shipment_items\" shipment=$shipment order=$order":"Shipment Items Grid", -"block type='Magento\Core\Block\Template' area='frontend' template='email/shipment/track.phtml' shipment=$shipment order=$order":"Shipment Track Details", +"block type='Magento\View\Block\Template' area='frontend' template='email/shipment/track.phtml' shipment=$shipment order=$order":"Shipment Track Details", "var comment":"Shipment Comment"} @--> <!--@styles @@ -96,7 +96,7 @@ body,td { color:#2f2f2f; font:11px/1.35em Verdana, Arial, Helvetica, sans-serif; </table> <br/> {{layout handle="sales_email_order_shipment_items" shipment=$shipment order=$order}} - {{block type='Magento\Core\Block\Template' area='frontend' template='Magento_Sales::email/shipment/track.phtml' shipment=$shipment order=$order}} + {{block type='Magento\View\Block\Template' area='frontend' template='Magento_Sales::email/shipment/track.phtml' shipment=$shipment order=$order}} <p style="font-size:12px; margin:0 10px 10px 0">{{var comment}}</p> </td> </tr> diff --git a/app/code/Magento/Sales/view/email/shipment_new_guest.html b/app/code/Magento/Sales/view/email/shipment_new_guest.html index 6375e735d87612835cb4df98c382c3ee8938f550..c9744c4f55684cf0cebaec872d43d121913ebb65 100644 --- a/app/code/Magento/Sales/view/email/shipment_new_guest.html +++ b/app/code/Magento/Sales/view/email/shipment_new_guest.html @@ -12,7 +12,7 @@ "var order.shipping_address.format('html')":"Shipping Address", "var order.shipping_description":"Shipping Description", "layout handle=\"sales_email_order_shipment_items\" shipment=$shipment order=$order":"Shipment Items Grid", -"block type='Magento\Core\Block\Template' area='frontend' template='email/shipment/track.phtml' shipment=$shipment order=$order":"Shipment Track Details", +"block type='Magento\View\Block\Template' area='frontend' template='email/shipment/track.phtml' shipment=$shipment order=$order":"Shipment Track Details", "var comment":"Shipment Comment"} @--> <!--@styles @@ -94,7 +94,7 @@ body,td { color:#2f2f2f; font:11px/1.35em Verdana, Arial, Helvetica, sans-serif; </table> <br/> {{layout handle="sales_email_order_shipment_items" shipment=$shipment order=$order}} - {{block type='Magento\Core\Block\Template' area='frontend' template='Magento_Sales::email/shipment/track.phtml' shipment=$shipment order=$order}} + {{block type='Magento\View\Block\Template' area='frontend' template='Magento_Sales::email/shipment/track.phtml' shipment=$shipment order=$order}} <p style="font-size:12px; margin:0 10px 10px 0">{{var comment}}</p> </td> </tr> diff --git a/app/code/Magento/Sales/view/frontend/layout/sales_email_order_creditmemo_items.xml b/app/code/Magento/Sales/view/frontend/layout/sales_email_order_creditmemo_items.xml index ee81d2f1fd547c629f4a78bf2bb32c00e7a519c2..56dab0aeb58f3836de337c351d0eb50ebd497da6 100644 --- a/app/code/Magento/Sales/view/frontend/layout/sales_email_order_creditmemo_items.xml +++ b/app/code/Magento/Sales/view/frontend/layout/sales_email_order_creditmemo_items.xml @@ -35,5 +35,5 @@ <block class="Magento\Tax\Block\Sales\Order\Tax" name="tax" template="order/tax.phtml"/> </block> </block> - <container name="additional.product.info" label="Additional Product Info"/> + <block class="Magento\View\Block\Template" name="additional.product.info" template="Magento_Core::template.phtml"/> </layout> diff --git a/app/code/Magento/Sales/view/frontend/layout/sales_email_order_invoice_items.xml b/app/code/Magento/Sales/view/frontend/layout/sales_email_order_invoice_items.xml index 460f70256dfb681ca6e5d564943e14b75b4a0ae4..f4b71a1e02a90fdcd48ec152ea6fb93c460d17fb 100644 --- a/app/code/Magento/Sales/view/frontend/layout/sales_email_order_invoice_items.xml +++ b/app/code/Magento/Sales/view/frontend/layout/sales_email_order_invoice_items.xml @@ -35,5 +35,5 @@ <block class="Magento\Tax\Block\Sales\Order\Tax" name="tax" template="order/tax.phtml"/> </block> </block> - <container name="additional.product.info" label="Additional Product Info"/> + <block class="Magento\View\Block\Template" name="additional.product.info" template="Magento_Core::template.phtml"/> </layout> diff --git a/app/code/Magento/Sales/view/frontend/layout/sales_email_order_items.xml b/app/code/Magento/Sales/view/frontend/layout/sales_email_order_items.xml index be51800c3cca78b3504f251a7c995d88c1d137e4..d9319b2aa69443cdc9b12165d4461df970b26304 100644 --- a/app/code/Magento/Sales/view/frontend/layout/sales_email_order_items.xml +++ b/app/code/Magento/Sales/view/frontend/layout/sales_email_order_items.xml @@ -39,5 +39,5 @@ </block> </block> </block> - <container name="additional.product.info" label="Additional Product Info"/> + <block class="Magento\View\Block\Template" name="additional.product.info" template="Magento_Core::template.phtml"/> </layout> diff --git a/app/code/Magento/Sales/view/frontend/layout/sales_email_order_shipment_items.xml b/app/code/Magento/Sales/view/frontend/layout/sales_email_order_shipment_items.xml index 4832ea1604f857e4fe6584e04b6b73fb8d2595b3..65af8bae6d361627503d1e567e99632a236cd886 100644 --- a/app/code/Magento/Sales/view/frontend/layout/sales_email_order_shipment_items.xml +++ b/app/code/Magento/Sales/view/frontend/layout/sales_email_order_shipment_items.xml @@ -27,5 +27,5 @@ <block class="Magento\Sales\Block\Order\Email\Shipment\Items" name="items" template="email/shipment/items.phtml"> <block class="Magento\Sales\Block\Order\Email\Items\DefaultItems" as="default" template="email/items/shipment/default.phtml"/> </block> - <container name="additional.product.info" label="Additional Product Info"/> + <block class="Magento\View\Block\Template" name="additional.product.info" template="Magento_Core::template.phtml"/> </layout> diff --git a/app/code/Magento/Sales/view/frontend/layout/sales_order_creditmemo.xml b/app/code/Magento/Sales/view/frontend/layout/sales_order_creditmemo.xml index 65eca5ac25feace77cc45565e5a7aa9c3f0c1a57..9e3b76ec779b4d8a1a6967fba96095176c7ae50c 100644 --- a/app/code/Magento/Sales/view/frontend/layout/sales_order_creditmemo.xml +++ b/app/code/Magento/Sales/view/frontend/layout/sales_order_creditmemo.xml @@ -45,5 +45,5 @@ </block> </referenceContainer> <update handle="sales_order_info_links"/> - <container name="additional.product.info" label="Additional Product Info"/> + <block class="Magento\View\Block\Template" name="additional.product.info" template="Magento_Core::template.phtml"/> </layout> diff --git a/app/code/Magento/Sales/view/frontend/layout/sales_order_invoice.xml b/app/code/Magento/Sales/view/frontend/layout/sales_order_invoice.xml index 483fcf55d56ee7617f63269fad47aa5d65b5de45..2a043a9834cd5fa70f697fd0fa013a884d20b8ab 100644 --- a/app/code/Magento/Sales/view/frontend/layout/sales_order_invoice.xml +++ b/app/code/Magento/Sales/view/frontend/layout/sales_order_invoice.xml @@ -45,5 +45,5 @@ </block> </referenceContainer> <update handle="sales_order_info_links"/> - <container name="additional.product.info" label="Additional Product Info"/> + <block class="Magento\View\Block\Template" name="additional.product.info" template="Magento_Core::template.phtml"/> </layout> diff --git a/app/code/Magento/Sales/view/frontend/layout/sales_order_print.xml b/app/code/Magento/Sales/view/frontend/layout/sales_order_print.xml index 26800320ee74c86a0a1c6afb1026e760e66712b5..4a7d0a4b1c065610dc892eccc36132a34e353e0b 100644 --- a/app/code/Magento/Sales/view/frontend/layout/sales_order_print.xml +++ b/app/code/Magento/Sales/view/frontend/layout/sales_order_print.xml @@ -41,5 +41,5 @@ </block> </block> </referenceContainer> - <container name="additional.product.info" label="Additional Product Info"/> + <block class="Magento\View\Block\Template" name="additional.product.info" template="Magento_Core::template.phtml"/> </layout> diff --git a/app/code/Magento/Sales/view/frontend/layout/sales_order_printcreditmemo.xml b/app/code/Magento/Sales/view/frontend/layout/sales_order_printcreditmemo.xml index ff1495acf1f69f9b30b3b199688a20987b0628bb..fc90247dbe2ef18fa7ebc18002a3fd13790a7d7c 100644 --- a/app/code/Magento/Sales/view/frontend/layout/sales_order_printcreditmemo.xml +++ b/app/code/Magento/Sales/view/frontend/layout/sales_order_printcreditmemo.xml @@ -37,5 +37,5 @@ </block> </block> </referenceContainer> - <container name="additional.product.info" label="Additional Product Info"/> + <block class="Magento\View\Block\Template" name="additional.product.info" template="Magento_Core::template.phtml"/> </layout> diff --git a/app/code/Magento/Sales/view/frontend/layout/sales_order_printinvoice.xml b/app/code/Magento/Sales/view/frontend/layout/sales_order_printinvoice.xml index 9ec6691978c4e51895bbee2902ebd8e602c3a7de..242df26c3793570437210b0dee3a0e89fc165365 100644 --- a/app/code/Magento/Sales/view/frontend/layout/sales_order_printinvoice.xml +++ b/app/code/Magento/Sales/view/frontend/layout/sales_order_printinvoice.xml @@ -37,5 +37,5 @@ </block> </block> </referenceContainer> - <container name="additional.product.info" label="Additional Product Info"/> + <block class="Magento\View\Block\Template" name="additional.product.info" template="Magento_Core::template.phtml"/> </layout> diff --git a/app/code/Magento/Sales/view/frontend/layout/sales_order_printshipment.xml b/app/code/Magento/Sales/view/frontend/layout/sales_order_printshipment.xml index 4804aed2ab7a308241a26499eb675219d026176d..e99fb03cb3a93e8cf3538602787375ae9b460458 100644 --- a/app/code/Magento/Sales/view/frontend/layout/sales_order_printshipment.xml +++ b/app/code/Magento/Sales/view/frontend/layout/sales_order_printshipment.xml @@ -29,5 +29,5 @@ <block class="Magento\Sales\Block\Order\Item\Renderer\DefaultRenderer" as="default" template="order/shipment/items/renderer/default.phtml"/> </block> </referenceContainer> - <container name="additional.product.info" label="Additional Product Info"/> + <block class="Magento\View\Block\Template" name="additional.product.info" template="Magento_Core::template.phtml"/> </layout> diff --git a/app/code/Magento/Sales/view/frontend/layout/sales_order_shipment.xml b/app/code/Magento/Sales/view/frontend/layout/sales_order_shipment.xml index e3d20d51e694cc2bb4572a29737a4f3687f0dfe0..aa77b807dc935685bcec4848cfddf29b99c7fdf4 100644 --- a/app/code/Magento/Sales/view/frontend/layout/sales_order_shipment.xml +++ b/app/code/Magento/Sales/view/frontend/layout/sales_order_shipment.xml @@ -37,5 +37,5 @@ </block> </referenceContainer> <update handle="sales_order_info_links"/> - <container name="additional.product.info" label="Additional Product Info"/> + <block class="Magento\View\Block\Template" name="additional.product.info" template="Magento_Core::template.phtml"/> </layout> diff --git a/app/code/Magento/Sales/view/frontend/layout/sales_order_view.xml b/app/code/Magento/Sales/view/frontend/layout/sales_order_view.xml index 3bdaf1b391c3da5f0f20cff727e8dcef1e36281f..128fbaa960105f2594c76e2df25241de8a19df22 100644 --- a/app/code/Magento/Sales/view/frontend/layout/sales_order_view.xml +++ b/app/code/Magento/Sales/view/frontend/layout/sales_order_view.xml @@ -44,5 +44,5 @@ </block> </referenceContainer> <update handle="sales_order_info_links"/> - <container name="additional.product.info" label="Additional Product Info"/> + <block class="Magento\View\Block\Template" name="additional.product.info" template="Magento_Core::template.phtml"/> </layout> diff --git a/app/code/Magento/Sales/view/frontend/layout/sales_recurring_profile_view__tabs.xml b/app/code/Magento/Sales/view/frontend/layout/sales_recurring_profile_view__tabs.xml index 691930054943edea3cb448631a1dce8620e221fd..c733d4f48f7c40b8853982bc246691936e16b2f0 100644 --- a/app/code/Magento/Sales/view/frontend/layout/sales_recurring_profile_view__tabs.xml +++ b/app/code/Magento/Sales/view/frontend/layout/sales_recurring_profile_view__tabs.xml @@ -34,7 +34,7 @@ <action method="setShouldPrepareInfoTabs"> <argument name="value" xsi:type="string">1</argument> </action> - <block class="Magento\Core\Block\Text" as="profile_info" name="sales.recurring.profile.view.tab.profile" group="info_tabs"> + <block class="Magento\View\Block\Text" as="profile_info" name="sales.recurring.profile.view.tab.profile" group="info_tabs"> <action method="setViewLabel"> <argument translate="true" name="value" xsi:type="string">Profile Information</argument> </action> @@ -43,7 +43,7 @@ </action> </block> <!-- not implemented - <block class="Magento\Core\Block\Text" as="history" name="sales.recurring.profile.view.tab.history"> + <block class="Magento\View\Block\Text" as="history" name="sales.recurring.profile.view.tab.history"> <action method="addToParentGroup"> <argument name="value" xsi:type="string">info_tabs</argument> </action> @@ -55,7 +55,7 @@ </action> </block> --> - <block class="Magento\Core\Block\Text" as="related_orders" name="sales.recurring.profile.view.tab.orders" group="info_tabs"> + <block class="Magento\View\Block\Text" as="related_orders" name="sales.recurring.profile.view.tab.orders" group="info_tabs"> <action method="setViewLabel"> <argument translate="true" name="value" xsi:type="string">Related Orders</argument> </action> @@ -64,7 +64,7 @@ </action> </block> <!-- not implemented - <block class="Magento\Core\Block\Text" as="vendor_info" name="sales.recurring.profile.view.tab.vendor"> + <block class="Magento\View\Block\Text" as="vendor_info" name="sales.recurring.profile.view.tab.vendor"> <action method="addToParentGroup"> <argument name="value" xsi:type="string">info_tabs</argument> </action> diff --git a/app/code/Magento/Sales/view/frontend/recurring/grid.phtml b/app/code/Magento/Sales/view/frontend/recurring/grid.phtml index dadad046132eee85163ba523f68b821b9270b37c..e3dc07b950942adca32c93a3bdd7e2dd438e885e 100644 --- a/app/code/Magento/Sales/view/frontend/recurring/grid.phtml +++ b/app/code/Magento/Sales/view/frontend/recurring/grid.phtml @@ -24,7 +24,7 @@ */ ?> -<?php /* @var $this \Magento\Core\Block\Template */ ?> +<?php /* @var $this \Magento\View\Block\Template */ ?> <div <?php echo $this->getGridHtmlClass() ? ' class="' . $this->getGridHtmlClass() . '"' : '' ?><?php echo $this->getGridHtmlCss() ? ' style="' . $this->getGridHtmlCss() . '"' : '' ?>> <?php if ($caption = $this->getGridCaption()): ?> diff --git a/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit.php b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit.php index ad87f52d5b099beeca6ecaea086b7155440eb4ff..448a9a6bf63a47910bc7811f78fb3f0fc55f8a23 100644 --- a/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit.php +++ b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit.php @@ -39,20 +39,20 @@ class Edit extends \Magento\Adminhtml\Block\Widget\Form\Container */ protected $_coreRegistry = null; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Actions.php b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Actions.php index 514c8ce38b03346e8df88db55562f99f66302063..bfe2ff3655b4c4ecc50b6f2e6f24d51591d8f549 100644 --- a/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Actions.php +++ b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Actions.php @@ -47,30 +47,30 @@ class Actions */ protected $_sourceYesno; - /** - * @param \Magento\Backend\Model\Config\Source\Yesno $sourceYesno - * @param \Magento\Rule\Block\Actions $ruleActions - * @param \Magento\Backend\Block\Widget\Form\Renderer\Fieldset $rendererFieldset - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Backend\Model\Config\Source\Yesno $sourceYesno + * @param \Magento\Rule\Block\Actions $ruleActions + * @param \Magento\Backend\Block\Widget\Form\Renderer\Fieldset $rendererFieldset + * @param array $data */ - public function __construct( - \Magento\Backend\Model\Config\Source\Yesno $sourceYesno, - \Magento\Rule\Block\Actions $ruleActions, - \Magento\Backend\Block\Widget\Form\Renderer\Fieldset $rendererFieldset, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Backend\Model\Config\Source\Yesno $sourceYesno, + \Magento\Rule\Block\Actions $ruleActions, + \Magento\Backend\Block\Widget\Form\Renderer\Fieldset $rendererFieldset, + array $data = array() + ) { $this->_rendererFieldset = $rendererFieldset; $this->_ruleActions = $ruleActions; $this->_sourceYesno = $sourceYesno; - parent::__construct($registry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); } /** diff --git a/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Conditions.php b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Conditions.php index 0cf0c968e6369bdf5d01873c1e0dc67a9b5d2d99..d098332594b5c683de17d08df905b502bc2b22b7 100644 --- a/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Conditions.php +++ b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Conditions.php @@ -42,27 +42,27 @@ class Conditions */ protected $_conditions; - /** - * @param \Magento\Rule\Block\Conditions $conditions - * @param \Magento\Backend\Block\Widget\Form\Renderer\Fieldset $rendererFieldset - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Rule\Block\Conditions $conditions + * @param \Magento\Backend\Block\Widget\Form\Renderer\Fieldset $rendererFieldset + * @param array $data */ - public function __construct( - \Magento\Rule\Block\Conditions $conditions, - \Magento\Backend\Block\Widget\Form\Renderer\Fieldset $rendererFieldset, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Rule\Block\Conditions $conditions, + \Magento\Backend\Block\Widget\Form\Renderer\Fieldset $rendererFieldset, + array $data = array() + ) { $this->_rendererFieldset = $rendererFieldset; $this->_conditions = $conditions; - parent::__construct($registry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); } /** diff --git a/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Coupons.php b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Coupons.php index db45eaec6f7c4e0e81b6ea99604b7759d4f3058d..b0e2330e902a595ab96db9c4d1ee09f2984ae738 100644 --- a/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Coupons.php +++ b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Coupons.php @@ -46,11 +46,11 @@ class Coupons /** * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Core\Block\Context $context + * @param \Magento\View\Block\Context $context * @param array $data */ public function __construct( - \Magento\Core\Block\Context $context, + \Magento\View\Block\Context $context, \Magento\Core\Model\Registry $registry, array $data = array() ) { diff --git a/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Coupons/Form.php b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Coupons/Form.php index 651cf4d5d5c90c9c3b1bf5b7e0fbf54c479a1541..dd44dee5bae4c519063645736c8b44724b6c332b 100644 --- a/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Coupons/Form.php +++ b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Coupons/Form.php @@ -44,24 +44,24 @@ class Form */ protected $_salesRuleCoupon = null; - /** - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\SalesRule\Helper\Coupon $salesRuleCoupon - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\SalesRule\Helper\Coupon $salesRuleCoupon + * @param array $data */ - public function __construct( - \Magento\Data\FormFactory $formFactory, - \Magento\SalesRule\Helper\Coupon $salesRuleCoupon, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\SalesRule\Helper\Coupon $salesRuleCoupon, + array $data = array() + ) { $this->_salesRuleCoupon = $salesRuleCoupon; - parent::__construct($registry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); } /** diff --git a/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Coupons/Grid.php b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Coupons/Grid.php index e6946a597ee6f2d35a614f491b33de46096e1cf9..8914ddee4400942b354a435fac95326e5603c698 100644 --- a/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Coupons/Grid.php +++ b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Coupons/Grid.php @@ -48,27 +48,25 @@ class Grid extends \Magento\Adminhtml\Block\Widget\Grid */ protected $_salesRuleCoupon; - /** - * @param \Magento\SalesRule\Model\Resource\Coupon\CollectionFactory $salesRuleCoupon - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param \Magento\Core\Model\Registry $coreRegistry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\SalesRule\Model\Resource\Coupon\CollectionFactory $salesRuleCoupon + * @param \Magento\Core\Model\Registry $coreRegistry + * @param array $data */ - public function __construct( - \Magento\SalesRule\Model\Resource\Coupon\CollectionFactory $salesRuleCoupon, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - \Magento\Core\Model\Registry $coreRegistry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\SalesRule\Model\Resource\Coupon\CollectionFactory $salesRuleCoupon, + \Magento\Core\Model\Registry $coreRegistry, + array $data = array() + ) { $this->_coreRegistry = $coreRegistry; $this->_salesRuleCoupon = $salesRuleCoupon; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $data); } /** diff --git a/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Labels.php b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Labels.php index ddfca9b85f33f562a7b0e806ae1fda7383d8b823..711950c7a9643c5e5379a3b078e1707d87faa5e8 100644 --- a/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Labels.php +++ b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Labels.php @@ -31,30 +31,22 @@ class Labels implements \Magento\Backend\Block\Widget\Tab\TabInterface { /** - * Store manager instance - * - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - - /** - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory * @param \Magento\Core\Model\Registry $coreRegistry * @param array $data */ public function __construct( - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, \Magento\Core\Model\Registry $coreRegistry, array $data = array() ) { - $this->_storeManager = $storeManager; - parent::__construct($coreRegistry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); } /** diff --git a/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Main.php b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Main.php index 349b0a53de96f6199b7f8d5e76a9252bd2034fdc..7cb3453463ca4d05e0d768a76885507a43461c74 100644 --- a/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Main.php +++ b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Main.php @@ -37,13 +37,6 @@ class Main extends \Magento\Backend\Block\Widget\Form\Generic implements \Magento\Backend\Block\Widget\Tab\TabInterface { - /** - * Store manager instance - * - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - /** * @var \Magento\Core\Model\System\Store */ @@ -60,30 +53,29 @@ class Main protected $_salesRule; /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory * @param \Magento\SalesRule\Model\RuleFactory $salesRule * @param \Magento\Customer\Model\Resource\Group\CollectionFactory $customerGroup * @param \Magento\Core\Model\System\Store $systemStore - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context * @param array $data */ public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, \Magento\SalesRule\Model\RuleFactory $salesRule, \Magento\Customer\Model\Resource\Group\CollectionFactory $customerGroup, \Magento\Core\Model\System\Store $systemStore, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, array $data = array() ) { - $this->_storeManager = $context->getStoreManager(); $this->_systemStore = $systemStore; $this->_customerGroup = $customerGroup; $this->_salesRule = $salesRule; - parent::__construct($registry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); } /** diff --git a/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Main/Renderer/Checkbox.php b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Main/Renderer/Checkbox.php index 9f6aee1ea6606f6123c03b76b4df3721419c4de2..0d989ff35c64f780a46b67563dd69362f084e95d 100644 --- a/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Main/Renderer/Checkbox.php +++ b/app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Main/Renderer/Checkbox.php @@ -42,16 +42,16 @@ class Checkbox */ protected $_elementFactory; - /** - * @param \Magento\Data\Form\Element\Factory $elementFactory - * @param \Magento\Backend\Block\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Context $context + * @param \Magento\Data\Form\Element\Factory $elementFactory + * @param array $data */ - public function __construct( - \Magento\Data\Form\Element\Factory $elementFactory, - \Magento\Backend\Block\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Context $context, + \Magento\Data\Form\Element\Factory $elementFactory, + array $data = array() + ) { $this->_elementFactory = $elementFactory; parent::__construct($context, $data); } diff --git a/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote.php b/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote.php index 887d8847b79034a9d110f0665a9e007d4d60334e..0a3d7b0305f0b8280ae85b2e2f3da194f4d9d71a 100644 --- a/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote.php +++ b/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote.php @@ -26,7 +26,7 @@ namespace Magento\SalesRule\Controller\Adminhtml\Promo; -class Quote extends \Magento\Backend\Controller\Adminhtml\Action +class Quote extends \Magento\Backend\App\Action { /** * Core registry @@ -36,20 +36,36 @@ class Quote extends \Magento\Backend\Controller\Adminhtml\Action protected $_coreRegistry = null; /** - * @param \Magento\Backend\Controller\Context $context + * @var \Magento\App\Response\Http\FileFactory + */ + protected $_fileFactory; + + /** + * @var \Magento\Core\Filter\Date + */ + protected $_dateFilter; + + /** + * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Core\Model\Registry $coreRegistry + * @param \Magento\App\Response\Http\FileFactory $fileFactory + * @param \Magento\Core\Filter\Date $dateFilter */ public function __construct( - \Magento\Backend\Controller\Context $context, - \Magento\Core\Model\Registry $coreRegistry + \Magento\Backend\App\Action\Context $context, + \Magento\Core\Model\Registry $coreRegistry, + \Magento\App\Response\Http\FileFactory $fileFactory, + \Magento\Core\Filter\Date $dateFilter ) { - $this->_coreRegistry = $coreRegistry; parent::__construct($context); + $this->_coreRegistry = $coreRegistry; + $this->_fileFactory = $fileFactory; + $this->_dateFilter = $dateFilter; } protected function _initRule() { - $this->_title(__('Cart Price Rules')); + $this->_title->add(__('Cart Price Rules')); $this->_coreRegistry->register('current_promo_quote_rule', $this->_objectManager->create('Magento\SalesRule\Model\Rule')); $id = (int)$this->getRequest()->getParam('id'); @@ -65,8 +81,8 @@ class Quote extends \Magento\Backend\Controller\Adminhtml\Action protected function _initAction() { - $this->loadLayout() - ->_setActiveMenu('Magento_SalesRule::promo_quote') + $this->_view->loadLayout(); + $this->_setActiveMenu('Magento_SalesRule::promo_quote') ->_addBreadcrumb(__('Promotions'), __('Promotions')) ; return $this; @@ -74,11 +90,11 @@ class Quote extends \Magento\Backend\Controller\Adminhtml\Action public function indexAction() { - $this->_title(__('Cart Price Rules')); + $this->_title->add(__('Cart Price Rules')); $this->_initAction() - ->_addBreadcrumb(__('Catalog'), __('Catalog')) - ->renderLayout(); + ->_addBreadcrumb(__('Catalog'), __('Catalog')); + $this->_view->renderLayout(); } public function newAction() @@ -101,7 +117,7 @@ class Quote extends \Magento\Backend\Controller\Adminhtml\Action } } - $this->_title($model->getRuleId() ? $model->getName() : __('New Cart Price Rule')); + $this->_title->add($model->getRuleId() ? $model->getName() : __('New Cart Price Rule')); // set entered data if was error when we do save $data = $this->_objectManager->get('Magento\Adminhtml\Model\Session')->getPageData(true); @@ -114,16 +130,16 @@ class Quote extends \Magento\Backend\Controller\Adminhtml\Action $this->_coreRegistry->register('current_promo_quote_rule', $model); - $this->_initAction()->getLayout()->getBlock('promo_quote_edit') + $this->_initAction(); + $this->_view->getLayout()->getBlock('promo_quote_edit') ->setData('action', $this->getUrl('sales_rule/*/save')); - $this - ->_addBreadcrumb( + $this->_addBreadcrumb( $id ? __('Edit Rule') : __('New Rule'), $id ? __('Edit Rule') - : __('New Rule')) - ->renderLayout(); + : __('New Rule')); + $this->_view->renderLayout(); } @@ -141,7 +157,9 @@ class Quote extends \Magento\Backend\Controller\Adminhtml\Action 'adminhtml_controller_salesrule_prepare_save', array('request' => $this->getRequest())); $data = $this->getRequest()->getPost(); - $data = $this->_filterDates($data, array('from_date', 'to_date')); + $inputFilter = new \Zend_Filter_Input( + array('from_date' => $this->_dateFilter, 'to_date' => $this->_dateFilter), array(), $data); + $data = $inputFilter->getUnescaped(); $id = $this->getRequest()->getParam('rule_id'); if ($id) { $model->load($id); @@ -290,7 +308,7 @@ class Quote extends \Magento\Backend\Controller\Adminhtml\Action public function applyRulesAction() { $this->_initAction(); - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -299,7 +317,7 @@ class Quote extends \Magento\Backend\Controller\Adminhtml\Action public function couponsGridAction() { $this->_initRule(); - $this->loadLayout()->renderLayout(); + $this->_view->loadLayout()->renderLayout(); } /** @@ -313,10 +331,10 @@ class Quote extends \Magento\Backend\Controller\Adminhtml\Action $rule = $this->_coreRegistry->registry('current_promo_quote_rule'); if ($rule->getId()) { $fileName = 'coupon_codes.xml'; - $content = $this->getLayout() + $content = $this->_view->getLayout() ->createBlock('Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab\Coupons\Grid') ->getExcelFile($fileName); - $this->_prepareDownloadResponse($fileName, $content); + return $this->_fileFactory->create($fileName, $content); } else { $this->_redirect('sales_rule/*/detail', array('_current' => true)); return; @@ -334,10 +352,10 @@ class Quote extends \Magento\Backend\Controller\Adminhtml\Action $rule = $this->_coreRegistry->registry('current_promo_quote_rule'); if ($rule->getId()) { $fileName = 'coupon_codes.csv'; - $content = $this->getLayout() + $content = $this->_view->getLayout() ->createBlock('Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab\Coupons\Grid') ->getCsvFile(); - $this->_prepareDownloadResponse($fileName, $content); + return $this->_fileFactory->create($fileName, $content); } else { $this->_redirect('sales_rule/*/detail', array('_current' => true)); return; @@ -353,7 +371,7 @@ class Quote extends \Magento\Backend\Controller\Adminhtml\Action $rule = $this->_coreRegistry->registry('current_promo_quote_rule'); if (!$rule->getId()) { - $this->_forward('noRoute'); + $this->_forward('noroute'); } $codesIds = $this->getRequest()->getParam('ids'); @@ -375,7 +393,7 @@ class Quote extends \Magento\Backend\Controller\Adminhtml\Action public function generateAction() { if (!$this->getRequest()->isAjax()) { - $this->_forward('noRoute'); + $this->_forward('noroute'); return; } $result = array(); @@ -390,7 +408,8 @@ class Quote extends \Magento\Backend\Controller\Adminhtml\Action try { $data = $this->getRequest()->getParams(); if (!empty($data['to_date'])) { - $data = array_merge($data, $this->_filterDates($data, array('to_date'))); + $inputFilter = new \Zend_Filter_Input(array('to_date' => $this->_dateFilter), array(), $data); + $data = $inputFilter->getUnescaped(); } /** @var $generator \Magento\SalesRule\Model\Coupon\Massgenerator */ @@ -402,8 +421,8 @@ class Quote extends \Magento\Backend\Controller\Adminhtml\Action $generator->generatePool(); $generated = $generator->getGeneratedCount(); $this->_getSession()->addSuccess(__('%1 coupon(s) have been generated.', $generated)); - $this->_initLayoutMessages('Magento\Adminhtml\Model\Session'); - $result['messages'] = $this->getLayout()->getMessagesBlock()->getGroupedHtml(); + $this->_view->getLayout()->initMessages('Magento\Adminhtml\Model\Session'); + $result['messages'] = $this->_view->getLayout()->getMessagesBlock()->getGroupedHtml(); } } catch (\Magento\Core\Exception $e) { $result['error'] = $e->getMessage(); @@ -421,7 +440,7 @@ class Quote extends \Magento\Backend\Controller\Adminhtml\Action public function chooserAction() { $uniqId = $this->getRequest()->getParam('uniq_id'); - $chooserBlock = $this->getLayout() + $chooserBlock = $this->_view->getLayout() ->createBlock('Magento\CatalogRule\Block\Adminhtml\Promo\Widget\Chooser', '', array('data' => array('id' => $uniqId))); $this->getResponse()->setBody($chooserBlock->toHtml()); } diff --git a/app/code/Magento/SalesRule/Helper/Coupon.php b/app/code/Magento/SalesRule/Helper/Coupon.php index 2207d03e4408716298f68c5b3df90065c69a3eb5..f4626b3811d32e70cc2b46cd927e000c988676d0 100644 --- a/app/code/Magento/SalesRule/Helper/Coupon.php +++ b/app/code/Magento/SalesRule/Helper/Coupon.php @@ -33,7 +33,7 @@ */ namespace Magento\SalesRule\Helper; -class Coupon extends \Magento\Core\Helper\AbstractHelper +class Coupon extends \Magento\App\Helper\AbstractHelper { /** * Constants which defines all possible coupon codes formats @@ -69,12 +69,12 @@ class Coupon extends \Magento\Core\Helper\AbstractHelper protected $_coreStoreConfig; /** - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\Store\Config $coreStoreConfig * @param array $couponParameters */ public function __construct( - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Core\Model\Store\Config $coreStoreConfig, array $couponParameters ) { diff --git a/app/code/Magento/SalesRule/Helper/Data.php b/app/code/Magento/SalesRule/Helper/Data.php index 362f438ce2706cafd0d7438bd055b8c5dec9e579..29d8ea2969263cc9d4cb5180b2f3876ea62df4a6 100644 --- a/app/code/Magento/SalesRule/Helper/Data.php +++ b/app/code/Magento/SalesRule/Helper/Data.php @@ -29,7 +29,7 @@ */ namespace Magento\SalesRule\Helper; -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { /** * Set store and base price which will be used during discount calculation to item object diff --git a/app/code/Magento/SalesRule/Model/Plugin/QuoteConfigProductAttributes.php b/app/code/Magento/SalesRule/Model/Plugin/QuoteConfigProductAttributes.php index f43debbe9bba76057d7b2603cbe4a05553fea907..ac626c8b0b577c8121757e65b519fa3e5f86bce2 100644 --- a/app/code/Magento/SalesRule/Model/Plugin/QuoteConfigProductAttributes.php +++ b/app/code/Magento/SalesRule/Model/Plugin/QuoteConfigProductAttributes.php @@ -31,18 +31,18 @@ class QuoteConfigProductAttributes /** @var \Magento\Customer\Model\Session */ protected $_customerSession; - /** @var \Magento\Core\Model\StoreManager */ + /** @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; /** * @param \Magento\SalesRule\Model\Resource\Rule $ruleResource * @param \Magento\Customer\Model\Session $customerSession - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager */ public function __construct( \Magento\SalesRule\Model\Resource\Rule $ruleResource, \Magento\Customer\Model\Session $customerSession, - \Magento\Core\Model\StoreManager $storeManager + \Magento\Core\Model\StoreManagerInterface $storeManager ) { $this->_ruleResource = $ruleResource; $this->_customerSession = $customerSession; diff --git a/app/code/Magento/SalesRule/Model/Rule.php b/app/code/Magento/SalesRule/Model/Rule.php index a75c144cb949542eec0ed126d516b5393aeaa6ec..357fce529ade1ed60627c36888d02ae2a21b2336 100644 --- a/app/code/Magento/SalesRule/Model/Rule.php +++ b/app/code/Magento/SalesRule/Model/Rule.php @@ -177,13 +177,6 @@ class Rule extends \Magento\Rule\Model\AbstractModel */ protected $_validatedAddresses = array(); - /** - * Core event manager proxy - * - * @var \Magento\Event\ManagerInterface - */ - protected $_eventManager = null; - /** * @var \Magento\SalesRule\Model\CouponFactory */ @@ -215,7 +208,6 @@ class Rule extends \Magento\Rule\Model\AbstractModel protected $_storeManager; /** - * @param \Magento\Event\ManagerInterface $eventManager * @param \Magento\Data\FormFactory $formFactory * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry @@ -231,7 +223,6 @@ class Rule extends \Magento\Rule\Model\AbstractModel * @param array $data */ public function __construct( - \Magento\Event\ManagerInterface $eventManager, \Magento\Data\FormFactory $formFactory, \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, @@ -246,7 +237,6 @@ class Rule extends \Magento\Rule\Model\AbstractModel \Magento\Data\Collection\Db $resourceCollection = null, array $data = array() ) { - $this->_eventManager = $eventManager; $this->_couponFactory = $couponFactory; $this->_codegenFactory = $codegenFactory; $this->_condCombineFactory = $condCombineFactory; diff --git a/app/code/Magento/SalesRule/Model/Validator.php b/app/code/Magento/SalesRule/Model/Validator.php index 217433cadc9e77e96830179be637abc5ec49ef6b..73d6478997e3e46b8f8a0370d0e84acb5e705d85 100644 --- a/app/code/Magento/SalesRule/Model/Validator.php +++ b/app/code/Magento/SalesRule/Model/Validator.php @@ -84,13 +84,6 @@ class Validator extends \Magento\Core\Model\AbstractModel */ protected $_taxData = null; - /** - * Core event manager proxy - * - * @var \Magento\Event\ManagerInterface - */ - protected $_eventManager = null; - /** * @var \Magento\SalesRule\Model\Resource\Rule\CollectionFactory */ @@ -113,7 +106,6 @@ class Validator extends \Magento\Core\Model\AbstractModel /** * @param \Magento\SalesRule\Model\Resource\Coupon\UsageFactory $usageFactory * @param \Magento\SalesRule\Model\Resource\Rule\CollectionFactory $collectionFactory - * @param \Magento\Event\ManagerInterface $eventManager * @param \Magento\Tax\Helper\Data $taxData * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry @@ -126,7 +118,6 @@ class Validator extends \Magento\Core\Model\AbstractModel public function __construct( \Magento\SalesRule\Model\Resource\Coupon\UsageFactory $usageFactory, \Magento\SalesRule\Model\Resource\Rule\CollectionFactory $collectionFactory, - \Magento\Event\ManagerInterface $eventManager, \Magento\Tax\Helper\Data $taxData, \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, @@ -138,7 +129,6 @@ class Validator extends \Magento\Core\Model\AbstractModel ) { $this->_usageFactory = $usageFactory; $this->_collectionFactory = $collectionFactory; - $this->_eventManager = $eventManager; $this->_taxData = $taxData; $this->_couponFactory = $couponFactory; $this->_customerFactory = $customerFactory; diff --git a/app/code/Magento/Sendfriend/Block/Send.php b/app/code/Magento/Sendfriend/Block/Send.php index b6fb70bf1924e8bb5493345d7b42b3fe491cdea5..e643eba74d5c060ce700f7b8c0fb4599b729dc7e 100644 --- a/app/code/Magento/Sendfriend/Block/Send.php +++ b/app/code/Magento/Sendfriend/Block/Send.php @@ -34,7 +34,7 @@ */ namespace Magento\Sendfriend\Block; -class Send extends \Magento\Core\Block\Template +class Send extends \Magento\View\Block\Template { /** * Sendfriend data @@ -56,25 +56,25 @@ class Send extends \Magento\Core\Block\Template protected $_customerSession; /** + * @param \Magento\View\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Sendfriend\Helper\Data $sendfriendData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Core\Model\Registry $registry * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Customer\Model\Session $customerSession, \Magento\Sendfriend\Helper\Data $sendfriendData, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Core\Model\Registry $registry, array $data = array() ) { $this->_customerSession = $customerSession; $this->_coreRegistry = $registry; $this->_sendfriendData = $sendfriendData; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Sendfriend/Controller/Product.php b/app/code/Magento/Sendfriend/Controller/Product.php index 3c70dc469fc42bc52e5d8354ec2f1ac7b947897b..3e8047fefd1135a8cb192a2a26da15e13a61bcba 100644 --- a/app/code/Magento/Sendfriend/Controller/Product.php +++ b/app/code/Magento/Sendfriend/Controller/Product.php @@ -33,7 +33,10 @@ */ namespace Magento\Sendfriend\Controller; -class Product extends \Magento\Core\Controller\Front\Action +use Magento\App\Action\NotFoundException; +use Magento\App\RequestInterface; + +class Product extends \Magento\App\Action\Action { /** * Core registry @@ -43,51 +46,57 @@ class Product extends \Magento\Core\Controller\Front\Action protected $_coreRegistry = null; /** - * @param \Magento\Core\Controller\Varien\Action\Context $context + * @var \Magento\Core\App\Action\FormKeyValidator + */ + protected $_formKeyValidator; + + /** + * @param \Magento\App\Action\Context $context * @param \Magento\Core\Model\Registry $coreRegistry + * @param \Magento\Core\App\Action\FormKeyValidator $formKeyValidator */ public function __construct( - \Magento\Core\Controller\Varien\Action\Context $context, - \Magento\Core\Model\Registry $coreRegistry + \Magento\App\Action\Context $context, + \Magento\Core\Model\Registry $coreRegistry, + \Magento\Core\App\Action\FormKeyValidator $formKeyValidator ) { $this->_coreRegistry = $coreRegistry; + $this->_formKeyValidator = $formKeyValidator; parent::__construct($context); } /** - * Predispatch: check is enable module + * Check if module is enabled * If allow only for customer - redirect to login page * - * @return \Magento\Sendfriend\Controller\Product + * @param RequestInterface $request + * @return mixed + * @throws \Magento\App\Action\NotFoundException */ - public function preDispatch() + public function dispatch(RequestInterface $request) { - parent::preDispatch(); - /* @var $helper \Magento\Sendfriend\Helper\Data */ $helper = $this->_objectManager->get('Magento\Sendfriend\Helper\Data'); /* @var $session \Magento\Customer\Model\Session */ $session = $this->_objectManager->get('Magento\Customer\Model\Session'); if (!$helper->isEnabled()) { - $this->norouteAction(); - return $this; + throw new NotFoundException(); } if (!$helper->isAllowForGuest() && !$session->authenticate($this)) { - $this->setFlag('', self::FLAG_NO_DISPATCH, true); + $this->_actionFlag->set('', self::FLAG_NO_DISPATCH, true); if ($this->getRequest()->getActionName() == 'sendemail') { $session->setBeforeAuthUrl($this->_objectManager - ->create('Magento\Core\Model\Url') - ->getUrl('*/*/send', array( - '_current' => true - ))); + ->create('Magento\Core\Model\Url') + ->getUrl('*/*/send', array( + '_current' => true + ))); $this->_objectManager->get('Magento\Catalog\Model\Session') - ->setSendfriendFormData($this->getRequest()->getPost()); + ->setSendfriendFormData($request->getPost()); } } - - return $this; + return parent::dispatch($request); } /** @@ -148,7 +157,7 @@ class Product extends \Magento\Core\Controller\Front\Action $model = $this->_initSendToFriendModel(); if (!$product) { - $this->_forward('noRoute'); + $this->_forward('noroute'); return; } /* @var $session \Magento\Catalog\Model\Session */ @@ -160,20 +169,20 @@ class Product extends \Magento\Core\Controller\Front\Action ); } - $this->loadLayout(); - $this->_initLayoutMessages('Magento\Catalog\Model\Session'); + $this->_view->loadLayout(); + $this->_view->getLayout()->initMessages('Magento\Catalog\Model\Session'); $this->_eventManager->dispatch('sendfriend_product', array('product' => $product)); $data = $catalogSession->getSendfriendFormData(); if ($data) { $catalogSession->setSendfriendFormData(true); - $block = $this->getLayout()->getBlock('sendfriend.send'); + $block = $this->_view->getLayout()->getBlock('sendfriend.send'); if ($block) { $block->setFormData($data); } } - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -182,7 +191,7 @@ class Product extends \Magento\Core\Controller\Front\Action */ public function sendmailAction() { - if (!$this->_validateFormKey()) { + if (!$this->_formKeyValidator->validate($this->getRequest())) { return $this->_redirect('*/*/send', array('_current' => true)); } @@ -191,7 +200,7 @@ class Product extends \Magento\Core\Controller\Front\Action $data = $this->getRequest()->getPost(); if (!$product || !$data) { - $this->_forward('noRoute'); + $this->_forward('noroute'); return; } @@ -214,7 +223,8 @@ class Product extends \Magento\Core\Controller\Front\Action if ($validate === true) { $model->send(); $catalogSession->addSuccess(__('The link to a friend was sent.')); - $this->_redirectSuccess($product->getProductUrl()); + $url = $product->getProductUrl(); + $this->getResponse()->setRedirect($this->_redirect->success($url)); return; } else { @@ -235,10 +245,9 @@ class Product extends \Magento\Core\Controller\Front\Action // save form data $catalogSession->setSendfriendFormData($data); - $this->_redirectError( - $this->_objectManager - ->create('Magento\Core\Model\Url') - ->getUrl('*/*/send', array('_current' => true)) - ); + $url = $this->_objectManager + ->create('Magento\Core\Model\Url') + ->getUrl('*/*/send', array('_current' => true)); + $this->getResponse()->setRedirect($this->_redirect->error($url)); } } diff --git a/app/code/Magento/Sendfriend/Helper/Data.php b/app/code/Magento/Sendfriend/Helper/Data.php index 0abff90891abe6adbe7c588bae450c3170ff9b7c..f385a0e717512b0a556f57bec878865fb3e75983 100644 --- a/app/code/Magento/Sendfriend/Helper/Data.php +++ b/app/code/Magento/Sendfriend/Helper/Data.php @@ -34,7 +34,7 @@ */ namespace Magento\Sendfriend\Helper; -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { const XML_PATH_ENABLED = 'sendfriend/email/enabled'; const XML_PATH_ALLOW_FOR_GUEST = 'sendfriend/email/allow_guest'; @@ -56,11 +56,11 @@ class Data extends \Magento\Core\Helper\AbstractHelper protected $_coreStoreConfig; /** - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\Store\Config $coreStoreConfig */ public function __construct( - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Core\Model\Store\Config $coreStoreConfig ) { $this->_coreStoreConfig = $coreStoreConfig; diff --git a/app/code/Magento/Sendfriend/Model/Sendfriend.php b/app/code/Magento/Sendfriend/Model/Sendfriend.php index d38fd027750914caebb631c40b1d6bd2399ca627..705600f5b4f6e63183ce31aea652ece42eb4d2b8 100644 --- a/app/code/Magento/Sendfriend/Model/Sendfriend.php +++ b/app/code/Magento/Sendfriend/Model/Sendfriend.php @@ -99,7 +99,7 @@ class Sendfriend extends \Magento\Core\Model\AbstractModel protected $_catalogImage = null; /** - * @var \Magento\Core\Model\Email\TemplateFactory + * @var \Magento\Email\Model\TemplateFactory */ protected $_templateFactory; @@ -115,7 +115,7 @@ class Sendfriend extends \Magento\Core\Model\AbstractModel /** * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Email\TemplateFactory $templateFactory + * @param \Magento\Email\Model\TemplateFactory $templateFactory * @param \Magento\Core\Model\Translate $translate * @param \Magento\Catalog\Helper\Image $catalogImage * @param \Magento\Sendfriend\Helper\Data $sendfriendData @@ -128,7 +128,7 @@ class Sendfriend extends \Magento\Core\Model\AbstractModel */ public function __construct( \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Email\TemplateFactory $templateFactory, + \Magento\Email\Model\TemplateFactory $templateFactory, \Magento\Core\Model\Translate $translate, \Magento\Catalog\Helper\Image $catalogImage, \Magento\Sendfriend\Helper\Data $sendfriendData, @@ -179,7 +179,7 @@ class Sendfriend extends \Magento\Core\Model\AbstractModel $translate = $this->_translate; $translate->setTranslateInline(false); - /* @var $mailTemplate \Magento\Core\Model\Email\Template */ + /* @var $mailTemplate \Magento\Email\Model\Template */ $mailTemplate = $this->_templateFactory->create(); $message = nl2br(htmlspecialchars($this->getSender()->getMessage())); diff --git a/app/code/Magento/Shipping/Block/Tracking/Ajax.php b/app/code/Magento/Shipping/Block/Tracking/Ajax.php index 81bb5990e226081aa2779a49bbeba1c95e50c6e2..1e077be4cfe756bf88763cf29bbf90884a169168 100644 --- a/app/code/Magento/Shipping/Block/Tracking/Ajax.php +++ b/app/code/Magento/Shipping/Block/Tracking/Ajax.php @@ -26,7 +26,7 @@ namespace Magento\Shipping\Block\Tracking; -class Ajax extends \Magento\Core\Block\Template +class Ajax extends \Magento\View\Block\Template { } diff --git a/app/code/Magento/Shipping/Block/Tracking/Popup.php b/app/code/Magento/Shipping/Block/Tracking/Popup.php index 05e171a187e7386817c4c0dd90e8868dfbca79ea..768f21fcea83cd514652a95c5b3be717420285a6 100644 --- a/app/code/Magento/Shipping/Block/Tracking/Popup.php +++ b/app/code/Magento/Shipping/Block/Tracking/Popup.php @@ -26,39 +26,29 @@ namespace Magento\Shipping\Block\Tracking; -class Popup extends \Magento\Core\Block\Template +class Popup extends \Magento\View\Block\Template { /** * Core registry * * @var \Magento\Core\Model\Registry */ - protected $_coreRegistry; - - /** - * Core registry - * - * @var \Magento\Core\Model\LocaleInterface - */ - protected $_locale; + protected $_registry; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Core\Model\LocaleInterface $locale * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Core\Model\Registry $registry, - \Magento\Core\Model\LocaleInterface $locale, array $data = array() ) { - $this->_coreRegistry = $registry; - $this->_locale = $locale; - parent::__construct($coreData, $context, $data); + $this->_registry = $registry; + parent::__construct($context, $coreData, $data); } /** @@ -69,7 +59,7 @@ class Popup extends \Magento\Core\Block\Template public function getTrackingInfo() { /* @var $info \Magento\Shipping\Model\Info */ - $info = $this->_coreRegistry->registry('current_shipping_info'); + $info = $this->_registry->registry('current_shipping_info'); return $info->getTrackingInfo(); } diff --git a/app/code/Magento/Shipping/Controller/Tracking.php b/app/code/Magento/Shipping/Controller/Tracking.php index 092658e267709e55ba4668abeb2f2c3529994b4b..7f867f318deda3ba52bc904f4b9239e5c1bd8191 100644 --- a/app/code/Magento/Shipping/Controller/Tracking.php +++ b/app/code/Magento/Shipping/Controller/Tracking.php @@ -34,7 +34,9 @@ namespace Magento\Shipping\Controller; -class Tracking extends \Magento\Core\Controller\Front\Action +use Magento\App\Action\NotFoundException; + +class Tracking extends \Magento\App\Action\Action { /** * Core registry @@ -54,14 +56,14 @@ class Tracking extends \Magento\Core\Controller\Front\Action protected $_orderFactory; /** - * @param \Magento\Core\Controller\Varien\Action\Context $context + * @param \Magento\App\Action\Context $context * @param \Magento\Core\Model\Registry $coreRegistry * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Shipping\Model\InfoFactory $shippingInfoFactory * @param \Magento\Sales\Model\OrderFactory $orderFactory */ public function __construct( - \Magento\Core\Controller\Varien\Action\Context $context, + \Magento\App\Action\Context $context, \Magento\Core\Model\Registry $coreRegistry, \Magento\Customer\Model\Session $customerSession, \Magento\Shipping\Model\InfoFactory $shippingInfoFactory, @@ -85,8 +87,8 @@ class Tracking extends \Magento\Core\Controller\Front\Action $response = ''; $tracks = $order->getTracksCollection(); - $block = $this->_objectManager->create('Magento\Core\Block\Template'); - $block->setType('Magento\Core\Block\Template') + $block = $this->_objectManager->create('Magento\View\Block\Template'); + $block->setType('Magento\View\Block\Template') ->setTemplate('order/trackinginfo.phtml'); foreach ($tracks as $track) { @@ -102,17 +104,18 @@ class Tracking extends \Magento\Core\Controller\Front\Action /** * Popup action * Shows tracking info if it's present, otherwise redirects to 404 + * + * @throws NotFoundException */ public function popupAction() { $shippingInfoModel = $this->_shippingInfoFactory->create()->loadByHash($this->getRequest()->getParam('hash')); $this->_coreRegistry->register('current_shipping_info', $shippingInfoModel); if (count($shippingInfoModel->getTrackingInfo()) == 0) { - $this->norouteAction(); - return; + throw new NotFoundException(); } - $this->loadLayout(); - $this->renderLayout(); + $this->_view->loadLayout(); + $this->_view->renderLayout(); } diff --git a/app/code/Magento/Shipping/Helper/Data.php b/app/code/Magento/Shipping/Helper/Data.php index c44210defeb940e81770b7a581031a341b3c135c..a66382ed64311a131e95f28ec23000b510722656 100644 --- a/app/code/Magento/Shipping/Helper/Data.php +++ b/app/code/Magento/Shipping/Helper/Data.php @@ -29,7 +29,7 @@ */ namespace Magento\Shipping\Helper; -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { /** * Allowed hash keys @@ -59,13 +59,13 @@ class Data extends \Magento\Core\Helper\AbstractHelper /** * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\Store\Config $coreStoreConfig * @param \Magento\Core\Model\StoreManagerInterface $storeManager */ public function __construct( \Magento\Core\Helper\Data $coreData, - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Core\Model\Store\Config $coreStoreConfig, \Magento\Core\Model\StoreManagerInterface $storeManager ) { diff --git a/app/code/Magento/Shipping/Model/Config/Backend/Tablerate.php b/app/code/Magento/Shipping/Model/Config/Backend/Tablerate.php index 05a25a27d43ea580011c32e8595fb62c87b5608d..2787709e6bcc029441ff3eb68bb778a68f090942 100644 --- a/app/code/Magento/Shipping/Model/Config/Backend/Tablerate.php +++ b/app/code/Magento/Shipping/Model/Config/Backend/Tablerate.php @@ -44,7 +44,7 @@ class Tablerate extends \Magento\Core\Model\Config\Value /** * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Config $config * @param \Magento\Shipping\Model\Resource\Carrier\TablerateFactory $tablerateFactory * @param \Magento\Core\Model\Resource\AbstractResource $resource @@ -54,7 +54,7 @@ class Tablerate extends \Magento\Core\Model\Config\Value public function __construct( \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Config $config, \Magento\Shipping\Model\Resource\Carrier\TablerateFactory $tablerateFactory, \Magento\Core\Model\Resource\AbstractResource $resource = null, diff --git a/app/code/Magento/Shipping/view/frontend/layout/shipping_tracking_popup.xml b/app/code/Magento/Shipping/view/frontend/layout/shipping_tracking_popup.xml index 9d08f3e45c1bebd96ccd96e34c4c910b926e15ea..5dcef9aa067a275f8be8e0da2e1487c01abf7dbb 100644 --- a/app/code/Magento/Shipping/view/frontend/layout/shipping_tracking_popup.xml +++ b/app/code/Magento/Shipping/view/frontend/layout/shipping_tracking_popup.xml @@ -24,11 +24,7 @@ */ --> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <referenceBlock name="root"> - <action method="setTemplate"> - <argument name="template" xsi:type="string">popup.phtml</argument> - </action> - </referenceBlock> + <update handle="page_empty" /> <referenceContainer name="content"> <block class="Magento\Shipping\Block\Tracking\Popup" name="shipping.tracking.popup" template="tracking/popup.phtml"/> </referenceContainer> diff --git a/app/code/Magento/Shipping/view/frontend/tracking/popup.phtml b/app/code/Magento/Shipping/view/frontend/tracking/popup.phtml index 66b76bc24340025fca67344de99d88be9d382258..b94144e3d8a8681a910bdabdba6e06c5acd25289 100644 --- a/app/code/Magento/Shipping/view/frontend/tracking/popup.phtml +++ b/app/code/Magento/Shipping/view/frontend/tracking/popup.phtml @@ -19,159 +19,156 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design - * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> <?php /** @var $this \Magento\Shipping\Block\Tracking\Popup */ ?> <?php $_results = $this->getTrackingInfo(); ?> -<div class="page-title title-buttons"> - <h1><?php echo __('Tracking Information'); ?></h1> - <button class="button" onclick="window.close(); window.opener.focus();"><span><span><?php echo __('Close Window') ?></span></span></button> -</div> -<?php if(sizeof($_results)>0): ?> -<?php foreach($_results as $shipid => $_result): ?> - <?php if($shipid): ?> - <h2 class="sub-title"><?php echo __('Shipment #').$shipid; ?></h2> - <?php endif; ?> - <?php if(sizeof($_result)>0): ?> - <?php $rowCount = sizeof($_result); $counter = 1; ?> - <?php $_id = 0; foreach($_result as $track): ?> - <table class="tracking-table-popup data-table" id="tracking-table-popup-<?php echo $_id ?>"> - <col width="15%" /> - <col /> - <tbody> - <?php if(is_object($track)): ?> - <tr> - <th class="label"><?php echo __('Tracking Number:'); ?></th> - <td class="value"><?php echo $this->escapeHtml($track->getTracking()); ?></td> - </tr> - <?php if ($track->getCarrierTitle()): ?> - <tr> - <th class="label"><?php echo __('Carrier:'); ?></th> - <td class="value"><?php echo $this->escapeHtml($track->getCarrierTitle()); ?></td> - </tr> - <?php endif; ?> - <?php if($track->getErrorMessage()): ?> - <tr> - <th class="label"><?php echo __('Error:'); ?></th> - <td class="error"><?php echo __('Tracking information is not available. Please '); if ($this->getContactUsEnabled()) : ?><a href="<?php echo $this->getContactUs() ?>" title="<?php echo __('contact us') ?>" onclick="this.target='_blank'"><?php echo __('contact us') ?></a><?php echo __(' for more information or '); endif; echo __('email us at '); ?><a href="mailto:<?php echo $this->getStoreSupportEmail() ?>"><?php echo $this->getStoreSupportEmail() ?></a></td> - </tr> - <?php elseif($track->getTrackSummary()): ?> - <tr> - <th class="label"><?php echo __('Info:'); ?></th> - <td class="value"><?php echo $track->getTrackSummary(); ?></td> - </tr> - <?php elseif($track->getUrl()): ?> - <tr> - <th class="label"><?php echo __('Track:'); ?></th> - <td class="value"><a href="<?php echo $this->escapeHtml($track->getUrl()); ?>" onclick="this.target='_blank'"><?php echo $this->escapeHtml($track->getUrl()); ?></a></td> - </tr> - <?php else: ?> - <?php if ($track->getStatus()): ?> +<div class="page tracking"> + <div class="page title"> + <h1 class="title"> + <span class="base"><?php echo __('Tracking Information'); ?></span> + </h1> + </div> + <?php if(sizeof($_results)>0): ?> + <?php foreach($_results as $shipid => $_result): ?> + <?php if($shipid): ?> + <div class="order subtitle caption"><?php echo __('Shipment #').$shipid; ?></div> + <?php endif; ?> + <?php if(sizeof($_result)>0): ?> + <?php $rowCount = sizeof($_result); $counter = 1; ?> + <?php $_id = 0; foreach($_result as $track): ?> + <table class="data table order tracking" id="tracking-table-popup-<?php echo $_id ?>"> + <tbody> + <?php if(is_object($track)): ?> <tr> - <th class="label"><?php echo __('Status:'); ?></th> - <td class="value"><?php echo $track->getStatus(); ?></td> + <th class="col label"><?php echo __('Tracking Number:'); ?></th> + <td class="col value"><?php echo $this->escapeHtml($track->getTracking()); ?></td> </tr> - <?php endif; ?> - - <?php if ($track->getDeliverydate()): ?> + <?php if ($track->getCarrierTitle()): ?> <tr> - <th class="label"><?php echo __('Delivered on:'); ?></th> - <td class="value"><?php echo $this->formatDeliveryDateTime($track->getDeliverydate(),$track->getDeliverytime()); ?></td> + <th class="col label"><?php echo __('Carrier:'); ?></th> + <td class="col value"><?php echo $this->escapeHtml($track->getCarrierTitle()); ?></td> </tr> <?php endif; ?> - - <?php if ($track->getSignedby()): ?> + <?php if($track->getErrorMessage()): ?> <tr> - <th class="label"><?php echo __('Signed by:'); ?></th> - <td class="value"><?php echo $track->getSignedby(); ?></td> + <th class="col label"><?php echo __('Error:'); ?></th> + <td class="col error"><?php echo __('Tracking information is currently not available. Please '); if ($this->getContactUsEnabled()) : ?><a href="<?php echo $this->getContactUs() ?>" title="<?php echo __('contact us') ?>" onclick="this.target='_blank'"><?php echo __('contact us') ?></a><?php echo __(' for more information or '); endif; echo __('email us at '); ?><a href="mailto:<?php echo $this->getStoreSupportEmail() ?>"><?php echo $this->getStoreSupportEmail() ?></a></td> </tr> - <?php endif; ?> - - <?php if ($track->getDeliveryLocation()): ?> + <?php elseif($track->getTrackSummary()): ?> <tr> - <th class="label"><?php echo __('Delivered to:'); ?></th> - <td class="value"><?php echo $track->getDeliveryLocation(); ?></td> + <th class="col label"><?php echo __('Info:'); ?></th> + <td class="col value"><?php echo $track->getTrackSummary(); ?></td> </tr> - <?php endif; ?> - - <?php if ($track->getShippedDate()): ?> + <?php elseif($track->getUrl()): ?> <tr> - <th class="label"><?php echo __('Shipped or billed on:'); ?></th> - <td class="value"><?php echo $track->getShippedDate(); ?></td> + <th class="col label"><?php echo __('Track:'); ?></th> + <td class="col value"><a href="<?php echo $this->escapeHtml($track->getUrl()); ?>" onclick="this.target='_blank'"><?php echo $this->escapeHtml($track->getUrl()); ?></a></td> </tr> - <?php endif; ?> + <?php else: ?> + <?php if ($track->getStatus()): ?> + <tr> + <th class="col label"><?php echo __('Status:'); ?></th> + <td class="col value"><?php echo $track->getStatus(); ?></td> + </tr> + <?php endif; ?> - <?php if ($track->getService()): ?> - <tr> - <th class="label"><?php echo __('Service Type:'); ?></th> - <td class="value"><?php echo $track->getService(); ?></td> - </tr> - <?php endif; ?> + <?php if ($track->getDeliverydate()): ?> + <tr> + <th class="col label"><?php echo __('Delivered on:'); ?></th> + <td class="col value"><?php echo $this->formatDeliveryDateTime($track->getDeliverydate(),$track->getDeliverytime()); ?></td> + </tr> + <?php endif; ?> - <?php if ($track->getWeight()): ?> - <tr> - <th class="label"><?php echo __('Weight:'); ?></th> - <td class="value"><?php echo $track->getWeight(); ?></td> - </tr> + <?php if ($track->getSignedby()): ?> + <tr> + <th class="col label"><?php echo __('Signed by:'); ?></th> + <td class="col value"><?php echo $track->getSignedby(); ?></td> + </tr> + <?php endif; ?> + + <?php if ($track->getDeliveryLocation()): ?> + <tr> + <th class="col label"><?php echo __('Delivered to:'); ?></th> + <td class="col value"><?php echo $track->getDeliveryLocation(); ?></td> + </tr> + <?php endif; ?> + + <?php if ($track->getShippedDate()): ?> + <tr> + <th class="col label"><?php echo __('Shipped or billed on:'); ?></th> + <td class="col value"><?php echo $track->getShippedDate(); ?></td> + </tr> + <?php endif; ?> + + <?php if ($track->getService()): ?> + <tr> + <th class="col label"><?php echo __('Service Type:'); ?></th> + <td class="col value"><?php echo $track->getService(); ?></td> + </tr> + <?php endif; ?> + + <?php if ($track->getWeight()): ?> + <tr> + <th class="col label"><?php echo __('Weight:'); ?></th> + <td class="col value"><?php echo $track->getWeight(); ?></td> + </tr> + <?php endif; ?> <?php endif; ?> - <?php endif; ?> - <?php elseif(isset($track['title']) && isset($track['number']) && $track['number']): ?> - <!--if the tracking is custom value--> - <tr> - <th class="label"><?php echo ($track['title'] ? $this->escapeHtml($track['title']) : __('N/A')); ?>:</th> - <td class="value"><?php echo (isset($track['number']) ? $this->escapeHtml($track['number']) : ''); ?></td> - </tr> - <?php endif; ?> - </tbody> - </table> - <script type="text/javascript">(function($) {$('#tracking-table-popup-<?php echo $_id++ ?>').decorate('table')})(jQuery)</script> - <?php if (is_object($track) && sizeof($track->getProgressdetail())>0): ?> - <br /> - <table class="data-table" id="track-history-table-<?php echo $track->getTracking(); ?>"> - <col /> - <col width="1" /> - <col width="1" /> - <col /> - <thead> + <?php elseif(isset($track['title']) && isset($track['number']) && $track['number']): ?> + <?php /* if the tracking is custom value */ ?> <tr> - <th><?php echo __('Location') ?></th> - <th><?php echo __('Date') ?></th> - <th><?php echo __('Local Time') ?></th> - <th><?php echo __('Description') ?></th> + <th class="col label"><?php echo ($track['title'] ? $this->escapeHtml($track['title']) : __('N/A')); ?>:</th> + <td class="col value"><?php echo (isset($track['number']) ? $this->escapeHtml($track['number']) : ''); ?></td> </tr> - </thead> - <tbody> - <?php foreach($track->getProgressdetail() as $_detail): ?> - <?php $_detailDate = (isset($_detail['deliverydate']) ? $this->formatDeliveryDate($_detail['deliverydate']) : '') ?> - <?php $_detailTime = (isset($_detail['deliverytime']) ? $this->formatDeliveryTime($_detail['deliverytime'], $_detail['deliverydate']) : '') ?> - <tr> - <td><?php echo (isset($_detail['deliverylocation']) ? $_detail['deliverylocation'] : ''); ?></td> - <td><span class="nobr"><?php echo $_detailDate ?></span></td> - <td><span class="nobr"><?php echo $_detailTime ?></span></td> - <td><?php echo (isset($_detail['activity']) ? $_detail['activity'] : '') ?></td> - </tr> - <?php endforeach; ?> - </tbody> + <?php endif; ?> + </tbody> </table> - <script type="text/javascript">(function($) {$('#track-history-table-<?php echo $track->getTracking(); ?>').decorate('table')})(jQuery)</script> - <?php endif; ?> - <div class="divider"></div> - <?php if($counter!=$rowCount): ?> - <?php endif; ?> - <?php $counter++; ?> - <!--end for each tracking information--> - <?php endforeach; ?> + <?php if (is_object($track) && sizeof($track->getProgressdetail())>0): ?> + <table class="data table order tracking" id="track-history-table-<?php echo $track->getTracking(); ?>"> + <thead> + <tr> + <th class="col location"><?php echo __('Location') ?></th> + <th class="col date"><?php echo __('Date') ?></th> + <th class="col time"><?php echo __('Local Time') ?></th> + <th class="col description"><?php echo __('Description') ?></th> + </tr> + </thead> + <tbody> + <?php foreach($track->getProgressdetail() as $_detail): ?> + <?php $_detailDate = (isset($_detail['deliverydate']) ? $this->formatDeliveryDate($_detail['deliverydate']) : '') ?> + <?php $_detailTime = (isset($_detail['deliverytime']) ? $this->formatDeliveryTime($_detail['deliverytime'], $_detail['deliverydate']) : '') ?> + <tr> + <td class="col location"><?php echo (isset($_detail['deliverylocation']) ? $_detail['deliverylocation'] : ''); ?></td> + <td class="col date"><?php echo $_detailDate ?></td> + <td class="col time"><?php echo $_detailTime ?></td> + <td class="col description"><?php echo (isset($_detail['activity']) ? $_detail['activity'] : '') ?></td> + </tr> + <?php endforeach; ?> + </tbody> + </table> + <?php endif; ?> + <?php if($counter!=$rowCount): ?> + <?php endif; ?> + <?php $counter++; ?> + <?php /* end for each tracking information */ ?> + <?php endforeach; ?> + <?php else: ?> + <p class="empty"><?php echo __('There is no tracking available for this shipment.'); ?></p> + <?php endif; ?> + + <?php endforeach; ?> <?php else: ?> - <p><?php echo __('There is no tracking available for this shipment.'); ?></p> + <p class="empty"><?php echo __('There is no tracking available.'); ?></p> <?php endif; ?> - -<?php endforeach; ?> -<?php else: ?> - <p><?php echo __('There is no tracking available.'); ?></p> -<?php endif; ?> -<div class="buttons-set"> - <button type="button" title="<?php echo __('Close Window') ?>" class="button" onclick="window.close(); window.opener.focus();"><span><span><?php echo __('Close Window') ?></span></span></button> -</div> + <div class="actions"> + <button type="button" + title="<?php echo __('Close Window') ?>" + class="action close" + onclick="window.close(); window.opener.focus();"> + <span><?php echo __('Close Window') ?></span> + </button> + </div> +</div> \ No newline at end of file diff --git a/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap.php b/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap.php index 13931fb8b441bf6c0ae4087eb4daa3f0f1e3f966..faf3fc143532de0dd5fe5621cfc168abb242fb01 100644 --- a/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap.php +++ b/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap.php @@ -30,7 +30,9 @@ */ namespace Magento\Sitemap\Controller\Adminhtml; -class Sitemap extends \Magento\Backend\Controller\Adminhtml\Action +use Magento\Backend\App\Action; + +class Sitemap extends \Magento\Backend\App\Action { /** * Core registry @@ -40,11 +42,11 @@ class Sitemap extends \Magento\Backend\Controller\Adminhtml\Action protected $_coreRegistry = null; /** - * @param \Magento\Backend\Controller\Context $context + * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Core\Model\Registry $coreRegistry */ public function __construct( - \Magento\Backend\Controller\Context $context, + \Magento\Backend\App\Action\Context $context, \Magento\Core\Model\Registry $coreRegistry ) { $this->_coreRegistry = $coreRegistry; @@ -59,8 +61,8 @@ class Sitemap extends \Magento\Backend\Controller\Adminhtml\Action protected function _initAction() { // load layout, set active menu and breadcrumbs - $this->loadLayout() - ->_setActiveMenu('Magento_Sitemap::catalog_sitemap') + $this->_view->loadLayout(); + $this->_setActiveMenu('Magento_Sitemap::catalog_sitemap') ->_addBreadcrumb( __('Catalog'), __('Catalog')) @@ -76,9 +78,9 @@ class Sitemap extends \Magento\Backend\Controller\Adminhtml\Action */ public function indexAction() { - $this->_title(__('Site Map')); + $this->_title->add(__('Site Map')); $this->_initAction(); - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -95,7 +97,7 @@ class Sitemap extends \Magento\Backend\Controller\Adminhtml\Action */ public function editAction() { - $this->_title(__('Site Map')); + $this->_title->add(__('Site Map')); // 1. Get ID and create model $id = $this->getRequest()->getParam('sitemap_id'); @@ -112,7 +114,7 @@ class Sitemap extends \Magento\Backend\Controller\Adminhtml\Action } } - $this->_title($model->getId() ? $model->getSitemapFilename() : __('New Site Map')); + $this->_title->add($model->getId() ? $model->getSitemapFilename() : __('New Site Map')); // 3. Set entered data if was error when we do save $data = $this->_objectManager->get('Magento\Adminhtml\Model\Session')->getFormData(true); @@ -129,8 +131,8 @@ class Sitemap extends \Magento\Backend\Controller\Adminhtml\Action $id ? __('Edit Sitemap') : __('New Sitemap'), $id ? __('Edit Sitemap') : __('New Sitemap') ) - ->_addContent($this->getLayout()->createBlock('Magento\Adminhtml\Block\Sitemap\Edit')) - ->renderLayout(); + ->_addContent($this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Sitemap\Edit')); + $this->_view->renderLayout(); } /** diff --git a/app/code/Magento/Sitemap/Helper/Data.php b/app/code/Magento/Sitemap/Helper/Data.php index daea65d4deeb480aa633f39409aef5936fa2107c..7ea7ff4c2a8e42301fbfa78423d69a304a53eb9f 100644 --- a/app/code/Magento/Sitemap/Helper/Data.php +++ b/app/code/Magento/Sitemap/Helper/Data.php @@ -32,7 +32,7 @@ */ namespace Magento\Sitemap\Helper; -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { /**#@+ * Limits xpath config settings @@ -73,11 +73,11 @@ class Data extends \Magento\Core\Helper\AbstractHelper protected $_coreStoreConfig; /** - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\Store\Config $coreStoreConfig */ public function __construct( - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Core\Model\Store\Config $coreStoreConfig ) { $this->_coreStoreConfig = $coreStoreConfig; diff --git a/app/code/Magento/Sitemap/Model/Observer.php b/app/code/Magento/Sitemap/Model/Observer.php index 47721e449c3187d2e30cbc3e6128c5c33df25274..49c7858dcf4eaa8bb265a79715d7143ef1b458c6 100644 --- a/app/code/Magento/Sitemap/Model/Observer.php +++ b/app/code/Magento/Sitemap/Model/Observer.php @@ -75,7 +75,7 @@ class Observer protected $_collectionFactory; /** - * @var \Magento\Core\Model\Email\TemplateFactory + * @var \Magento\Email\Model\TemplateFactory */ protected $_templateFactory; @@ -88,13 +88,13 @@ class Observer * @param \Magento\Core\Model\Store\Config $coreStoreConfig * @param \Magento\Sitemap\Model\Resource\Sitemap\CollectionFactory $collectionFactory * @param \Magento\Core\Model\Translate $translateModel - * @param \Magento\Core\Model\Email\TemplateFactory $templateFactory + * @param \Magento\Email\Model\TemplateFactory $templateFactory */ public function __construct( \Magento\Core\Model\Store\Config $coreStoreConfig, \Magento\Sitemap\Model\Resource\Sitemap\CollectionFactory $collectionFactory, \Magento\Core\Model\Translate $translateModel, - \Magento\Core\Model\Email\TemplateFactory $templateFactory + \Magento\Email\Model\TemplateFactory $templateFactory ) { $this->_coreStoreConfig = $coreStoreConfig; $this->_collectionFactory = $collectionFactory; @@ -133,7 +133,7 @@ class Observer $this->_translateModel->setTranslateInline(false); $emailTemplate = $this->_templateFactory->create(); - /* @var $emailTemplate \Magento\Core\Model\Email\Template */ + /* @var $emailTemplate \Magento\Email\Model\Template */ $emailTemplate->setDesignConfig(array('area' => 'backend')) ->sendTransactional( $this->_coreStoreConfig->getConfig(self::XML_PATH_ERROR_TEMPLATE), diff --git a/app/code/Magento/Tax/Block/Adminhtml/Rate/Form.php b/app/code/Magento/Tax/Block/Adminhtml/Rate/Form.php index 5316acc056b9004be7c28abd9e256a769a3ad605..02954e3541b3acf9b02347d2c16272aac3c9bcaa 100644 --- a/app/code/Magento/Tax/Block/Adminhtml/Rate/Form.php +++ b/app/code/Magento/Tax/Block/Adminhtml/Rate/Form.php @@ -74,39 +74,39 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic */ protected $_regionFactory; - /** - * @param \Magento\Directory\Model\RegionFactory $regionFactory - * @param \Magento\Directory\Model\Config\Source\Country $country - * @param \Magento\Tax\Block\Adminhtml\Rate\Title\Fieldset $fieldset - * @param \Magento\Tax\Model\Calculation\RateFactory $rateFactory - * @param \Magento\Tax\Model\Calculation\Rate $rate - * @param \Magento\Tax\Helper\Data $taxData - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Directory\Model\RegionFactory $regionFactory + * @param \Magento\Directory\Model\Config\Source\Country $country + * @param \Magento\Tax\Block\Adminhtml\Rate\Title\Fieldset $fieldset + * @param \Magento\Tax\Model\Calculation\RateFactory $rateFactory + * @param \Magento\Tax\Model\Calculation\Rate $rate + * @param \Magento\Tax\Helper\Data $taxData + * @param array $data */ - public function __construct( - \Magento\Directory\Model\RegionFactory $regionFactory, - \Magento\Directory\Model\Config\Source\Country $country, - \Magento\Tax\Block\Adminhtml\Rate\Title\Fieldset $fieldset, - \Magento\Tax\Model\Calculation\RateFactory $rateFactory, - \Magento\Tax\Model\Calculation\Rate $rate, - \Magento\Tax\Helper\Data $taxData, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Directory\Model\RegionFactory $regionFactory, + \Magento\Directory\Model\Config\Source\Country $country, + \Magento\Tax\Block\Adminhtml\Rate\Title\Fieldset $fieldset, + \Magento\Tax\Model\Calculation\RateFactory $rateFactory, + \Magento\Tax\Model\Calculation\Rate $rate, + \Magento\Tax\Helper\Data $taxData, + array $data = array() + ) { $this->_regionFactory = $regionFactory; $this->_country = $country; $this->_fieldset = $fieldset; $this->_rateFactory = $rateFactory; $this->_rate = $rate; $this->_taxData = $taxData; - parent::__construct($registry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); } protected function _construct() @@ -243,7 +243,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic $this->setChild( 'form_after', - $this->getLayout()->createBlock('Magento\Core\Block\Template') + $this->getLayout()->createBlock('Magento\View\Block\Template') ->setTemplate('Magento_Tax::rate/js.phtml') ); diff --git a/app/code/Magento/Tax/Block/Adminhtml/Rate/ImportExport.php b/app/code/Magento/Tax/Block/Adminhtml/Rate/ImportExport.php index 972d6fed65d766cf9de51caa7aa50d79ec15db19..1b24e9301226a7be03c5d90a3eaf230ae22744cb 100644 --- a/app/code/Magento/Tax/Block/Adminhtml/Rate/ImportExport.php +++ b/app/code/Magento/Tax/Block/Adminhtml/Rate/ImportExport.php @@ -31,17 +31,17 @@ class ImportExport extends \Magento\Adminhtml\Block\Widget { protected $_template = 'importExport.phtml'; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { - parent::__construct($coreData, $context, $data); + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + array $data = array() + ) { + parent::__construct($context, $coreData, $data); $this->setUseContainer(true); } } diff --git a/app/code/Magento/Tax/Block/Adminhtml/Rate/Title.php b/app/code/Magento/Tax/Block/Adminhtml/Rate/Title.php index 7961349ee2dd65435b675c8d8b7a000942481288..3771a3a5598948754159ee53db21930503eff400 100644 --- a/app/code/Magento/Tax/Block/Adminhtml/Rate/Title.php +++ b/app/code/Magento/Tax/Block/Adminhtml/Rate/Title.php @@ -32,7 +32,7 @@ */ namespace Magento\Tax\Block\Adminhtml\Rate; -class Title extends \Magento\Core\Block\Template +class Title extends \Magento\View\Block\Template { protected $_titles; @@ -49,22 +49,22 @@ class Title extends \Magento\Core\Block\Template protected $_storeFactory; /** + * @param \Magento\View\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Core\Model\StoreFactory $storeFactory * @param \Magento\Tax\Model\Calculation\Rate $rate - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Core\Model\StoreFactory $storeFactory, \Magento\Tax\Model\Calculation\Rate $rate, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, array $data = array() ) { $this->_rate = $rate; $this->_storeFactory = $storeFactory; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } public function getTitles() diff --git a/app/code/Magento/Tax/Block/Adminhtml/Rule/Edit.php b/app/code/Magento/Tax/Block/Adminhtml/Rule/Edit.php index 2d0bb43b12ec60dfc4ce1c25cfdfbb5892dd0473..9b9040739b99466b92f4c4cd326edf93c2f25137 100644 --- a/app/code/Magento/Tax/Block/Adminhtml/Rule/Edit.php +++ b/app/code/Magento/Tax/Block/Adminhtml/Rule/Edit.php @@ -39,20 +39,20 @@ class Edit extends \Magento\Adminhtml\Block\Widget\Form\Container */ protected $_coreRegistry = null; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Tax/Block/Adminhtml/Rule/Edit/Form.php b/app/code/Magento/Tax/Block/Adminhtml/Rule/Edit/Form.php index 4902c5520df40cebefd3bd039099cd4ca19ac384..45a94a4b1be06dfcffea446dc6944a2bf1c48e7b 100644 --- a/app/code/Magento/Tax/Block/Adminhtml/Rule/Edit/Form.php +++ b/app/code/Magento/Tax/Block/Adminhtml/Rule/Edit/Form.php @@ -36,24 +36,24 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic */ protected $_rateFactory; - /** - * @param \Magento\Tax\Model\Calculation\RateFactory $rateFactory - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Tax\Model\Calculation\RateFactory $rateFactory + * @param array $data */ - public function __construct( - \Magento\Tax\Model\Calculation\RateFactory $rateFactory, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Tax\Model\Calculation\RateFactory $rateFactory, + array $data = array() + ) { $this->_rateFactory = $rateFactory; - parent::__construct($registry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); } /** diff --git a/app/code/Magento/Tax/Block/Checkout/Discount.php b/app/code/Magento/Tax/Block/Checkout/Discount.php index a78b07f865291f43f0cf380acde5e34d83a18a4f..d3dd5589a8bc4e5ef66ab18ffff4c3bfce2655a1 100644 --- a/app/code/Magento/Tax/Block/Checkout/Discount.php +++ b/app/code/Magento/Tax/Block/Checkout/Discount.php @@ -37,30 +37,27 @@ class Discount extends \Magento\Checkout\Block\Total\DefaultTotal protected $_taxConfig; /** - * @param \Magento\Catalog\Helper\Data $catalogData + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context - * @param \Magento\Sales\Model\Config $salesConfig + * @param \Magento\Catalog\Helper\Data $catalogData * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Checkout\Model\Session $checkoutSession - * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\Sales\Model\Config $salesConfig * @param \Magento\Tax\Model\Config $taxConfig * @param array $data */ public function __construct( - \Magento\Catalog\Helper\Data $catalogData, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, - \Magento\Sales\Model\Config $salesConfig, + \Magento\Catalog\Helper\Data $catalogData, \Magento\Customer\Model\Session $customerSession, \Magento\Checkout\Model\Session $checkoutSession, - \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\Sales\Model\Config $salesConfig, \Magento\Tax\Model\Config $taxConfig, array $data = array() ) { $this->_taxConfig = $taxConfig; - parent::__construct($catalogData, $coreData, $context, $salesConfig, $customerSession, $checkoutSession, - $storeManager, $data); + parent::__construct($context, $coreData, $catalogData, $customerSession, $checkoutSession, $salesConfig, $data); } /** diff --git a/app/code/Magento/Tax/Block/Checkout/Grandtotal.php b/app/code/Magento/Tax/Block/Checkout/Grandtotal.php index 980e97ad3db96e76d8602646e5a4fbaa9318d951..5cfe55c58e2f3dcb8dd80c129fbee7e0315234dd 100644 --- a/app/code/Magento/Tax/Block/Checkout/Grandtotal.php +++ b/app/code/Magento/Tax/Block/Checkout/Grandtotal.php @@ -44,30 +44,27 @@ class Grandtotal extends \Magento\Checkout\Block\Total\DefaultTotal protected $_taxConfig; /** - * @param \Magento\Catalog\Helper\Data $catalogData + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context - * @param \Magento\Sales\Model\Config $salesConfig + * @param \Magento\Catalog\Helper\Data $catalogData * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Checkout\Model\Session $checkoutSession - * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\Sales\Model\Config $salesConfig * @param \Magento\Tax\Model\Config $taxConfig * @param array $data */ public function __construct( - \Magento\Catalog\Helper\Data $catalogData, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, - \Magento\Sales\Model\Config $salesConfig, + \Magento\Catalog\Helper\Data $catalogData, \Magento\Customer\Model\Session $customerSession, \Magento\Checkout\Model\Session $checkoutSession, - \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\Sales\Model\Config $salesConfig, \Magento\Tax\Model\Config $taxConfig, array $data = array() ) { $this->_taxConfig = $taxConfig; - parent::__construct($catalogData, $coreData, $context, $salesConfig, $customerSession, $checkoutSession, - $storeManager, $data); + parent::__construct($context, $coreData, $catalogData, $customerSession, $checkoutSession, $salesConfig, $data); } /** diff --git a/app/code/Magento/Tax/Block/Checkout/Shipping.php b/app/code/Magento/Tax/Block/Checkout/Shipping.php index f62e8f057d00b325541a6759aed16b886335f129..8dca75257146fa03557bcca96529ddb06a390f5c 100644 --- a/app/code/Magento/Tax/Block/Checkout/Shipping.php +++ b/app/code/Magento/Tax/Block/Checkout/Shipping.php @@ -44,30 +44,27 @@ class Shipping extends \Magento\Checkout\Block\Total\DefaultTotal protected $_taxConfig; /** - * @param \Magento\Catalog\Helper\Data $catalogData + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context - * @param \Magento\Sales\Model\Config $salesConfig + * @param \Magento\Catalog\Helper\Data $catalogData * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Checkout\Model\Session $checkoutSession - * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\Sales\Model\Config $salesConfig * @param \Magento\Tax\Model\Config $taxConfig * @param array $data */ public function __construct( - \Magento\Catalog\Helper\Data $catalogData, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, - \Magento\Sales\Model\Config $salesConfig, + \Magento\Catalog\Helper\Data $catalogData, \Magento\Customer\Model\Session $customerSession, \Magento\Checkout\Model\Session $checkoutSession, - \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\Sales\Model\Config $salesConfig, \Magento\Tax\Model\Config $taxConfig, array $data = array() ) { $this->_taxConfig = $taxConfig; - parent::__construct($catalogData, $coreData, $context, $salesConfig, $customerSession, $checkoutSession, - $storeManager, $data); + parent::__construct($context, $coreData, $catalogData, $customerSession, $checkoutSession, $salesConfig, $data); } /** diff --git a/app/code/Magento/Tax/Block/Checkout/Subtotal.php b/app/code/Magento/Tax/Block/Checkout/Subtotal.php index 25a3959b6c2b3702445d4864219baa376fb8e15c..d2889222c43e61b69c2851f34c96320036ed8aa8 100644 --- a/app/code/Magento/Tax/Block/Checkout/Subtotal.php +++ b/app/code/Magento/Tax/Block/Checkout/Subtotal.php @@ -44,30 +44,27 @@ class Subtotal extends \Magento\Checkout\Block\Total\DefaultTotal protected $_taxConfig; /** - * @param \Magento\Catalog\Helper\Data $catalogData + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context - * @param \Magento\Sales\Model\Config $salesConfig + * @param \Magento\Catalog\Helper\Data $catalogData * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Checkout\Model\Session $checkoutSession - * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\Sales\Model\Config $salesConfig * @param \Magento\Tax\Model\Config $taxConfig * @param array $data */ public function __construct( - \Magento\Catalog\Helper\Data $catalogData, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, - \Magento\Sales\Model\Config $salesConfig, + \Magento\Catalog\Helper\Data $catalogData, \Magento\Customer\Model\Session $customerSession, \Magento\Checkout\Model\Session $checkoutSession, - \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\Sales\Model\Config $salesConfig, \Magento\Tax\Model\Config $taxConfig, array $data = array() ) { $this->_taxConfig = $taxConfig; - parent::__construct($catalogData, $coreData, $context, $salesConfig, $customerSession, - $checkoutSession, $storeManager, $data); + parent::__construct($context, $coreData, $catalogData, $customerSession, $checkoutSession, $salesConfig, $data); } /** diff --git a/app/code/Magento/Tax/Block/Sales/Order/Tax.php b/app/code/Magento/Tax/Block/Sales/Order/Tax.php index aaeae5387c1b263d8073187e3d2f046e5fe5c880..37af06d674069952d08e0a6b8205598a1abd3419 100644 --- a/app/code/Magento/Tax/Block/Sales/Order/Tax.php +++ b/app/code/Magento/Tax/Block/Sales/Order/Tax.php @@ -29,7 +29,7 @@ */ namespace Magento\Tax\Block\Sales\Order; -class Tax extends \Magento\Core\Block\Template +class Tax extends \Magento\View\Block\Template { /** * Tax configuration model @@ -41,19 +41,19 @@ class Tax extends \Magento\Core\Block\Template protected $_source; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Tax\Model\Config $taxConfig * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Tax\Model\Config $taxConfig, array $data = array() ) { $this->_config = $taxConfig; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Tax/Controller/Adminhtml/Rate.php b/app/code/Magento/Tax/Controller/Adminhtml/Rate.php index a71debda121354ddf9871603a6fdde130ae39ba7..a75cf47a8a28a5c15b764d0e532b91fa95d4ab8f 100644 --- a/app/code/Magento/Tax/Controller/Adminhtml/Rate.php +++ b/app/code/Magento/Tax/Controller/Adminhtml/Rate.php @@ -34,19 +34,36 @@ namespace Magento\Tax\Controller\Adminhtml; -class Rate extends \Magento\Backend\Controller\Adminhtml\Action +class Rate extends \Magento\Backend\App\Action { + /** + * @var \Magento\App\Response\Http\FileFactory + */ + protected $_fileFactory; + + /** + * @param \Magento\Backend\App\Action\Context $context + * @param \Magento\App\Response\Http\FileFactory $fileFactory + */ + public function __construct( + \Magento\Backend\App\Action\Context $context, + \Magento\App\Response\Http\FileFactory $fileFactory + ) { + $this->_fileFactory = $fileFactory; + parent::__construct($context); + } + /** * Show Main Grid * */ public function indexAction() { - $this->_title(__('Tax Zones and Rates')); + $this->_title->add(__('Tax Zones and Rates')); $this->_initAction() ->_addBreadcrumb(__('Manage Tax Rates'), __('Manage Tax Rates')); - $this ->renderLayout(); + $this->_view->renderLayout(); } /** @@ -58,9 +75,9 @@ class Rate extends \Magento\Backend\Controller\Adminhtml\Action $rateModel = $this->_objectManager->get('Magento\Tax\Model\Calculation\Rate') ->load(null); - $this->_title(__('Tax Zones and Rates')); + $this->_title->add(__('Tax Zones and Rates')); - $this->_title(__('New Tax Rate')); + $this->_title->add(__('New Tax Rate')); $rateModel->setData($this->_objectManager->get('Magento\Adminhtml\Model\Session')->getFormData(true)); @@ -72,13 +89,13 @@ class Rate extends \Magento\Backend\Controller\Adminhtml\Action ->_addBreadcrumb(__('Manage Tax Rates'), __('Manage Tax Rates'), $this->getUrl('tax/rate')) ->_addBreadcrumb(__('New Tax Rate'), __('New Tax Rate')) ->_addContent( - $this->getLayout()->createBlock('Magento\Tax\Block\Adminhtml\Rate\Toolbar\Save') + $this->_view->getLayout()->createBlock('Magento\Tax\Block\Adminhtml\Rate\Toolbar\Save') ->assign('header', __('Add New Tax Rate')) ->assign('form', - $this->getLayout()->createBlock('Magento\Tax\Block\Adminhtml\Rate\Form', 'tax_rate_form') + $this->_view->getLayout()->createBlock('Magento\Tax\Block\Adminhtml\Rate\Form', 'tax_rate_form') ) - ) - ->renderLayout(); + ); + $this->_view->renderLayout(); } /** @@ -113,7 +130,7 @@ class Rate extends \Magento\Backend\Controller\Adminhtml\Action $this->_objectManager->get('Magento\Adminhtml\Model\Session')->addError($e->getMessage()); } - $this->_redirectReferer(); + $this->getResponse()->setRedirect($this->_redirect->getRedirectUrl($this->getUrl('*'))); return; } $this->getResponse()->setRedirect($this->getUrl('tax/rate')); @@ -179,7 +196,7 @@ class Rate extends \Magento\Backend\Controller\Adminhtml\Action */ public function editAction() { - $this->_title(__('Tax Zones and Rates')); + $this->_title->add(__('Tax Zones and Rates')); $rateId = (int)$this->getRequest()->getParam('rate'); $rateModel = $this->_objectManager->get('Magento\Tax\Model\Calculation\Rate')->load($rateId); @@ -192,20 +209,20 @@ class Rate extends \Magento\Backend\Controller\Adminhtml\Action $rateModel->setTaxPostcode($rateModel->getZipFrom() . '-' . $rateModel->getZipTo()); } - $this->_title(sprintf("%s", $rateModel->getCode())); + $this->_title->add(sprintf("%s", $rateModel->getCode())); $this->_initAction() ->_addBreadcrumb(__('Manage Tax Rates'), __('Manage Tax Rates'), $this->getUrl('tax/rate')) ->_addBreadcrumb(__('Edit Tax Rate'), __('Edit Tax Rate')) ->_addContent( - $this->getLayout()->createBlock('Magento\Tax\Block\Adminhtml\Rate\Toolbar\Save') + $this->_view->getLayout()->createBlock('Magento\Tax\Block\Adminhtml\Rate\Toolbar\Save') ->assign('header', __('Edit Tax Rate')) ->assign('form', - $this->getLayout()->createBlock('Magento\Tax\Block\Adminhtml\Rate\Form', 'tax_rate_form') + $this->_view->getLayout()->createBlock('Magento\Tax\Block\Adminhtml\Rate\Form', 'tax_rate_form') ->setShowLegend(true) ) - ) - ->renderLayout(); + ); + $this->_view->renderLayout(); } /** @@ -283,9 +300,9 @@ class Rate extends \Magento\Backend\Controller\Adminhtml\Action */ public function exportCsvAction() { - $this->loadLayout(false); - $content = $this->getLayout()->getChildBlock('adminhtml.tax.rate.grid','grid.export'); - $this->_prepareDownloadResponse('rates.csv', $content->getCsvFile()); + $this->_view->loadLayout(false); + $content = $this->_view->getLayout()->getChildBlock('adminhtml.tax.rate.grid','grid.export'); + return $this->_fileFactory->create('rates.csv', $content->getCsvFile()); } /** @@ -293,20 +310,20 @@ class Rate extends \Magento\Backend\Controller\Adminhtml\Action */ public function exportXmlAction() { - $this->loadLayout(false); - $content = $this->getLayout()->getChildBlock('adminhtml.tax.rate.grid','grid.export'); - $this->_prepareDownloadResponse('rates.xml', $content->getExcelFile()); + $this->_view->loadLayout(false); + $content = $this->_view->getLayout()->getChildBlock('adminhtml.tax.rate.grid','grid.export'); + return $this->_fileFactory->create('rates.xml', $content->getExcelFile()); } /** * Initialize action * - * @return \Magento\Backend\Controller\Adminhtml\Action + * @return \Magento\Backend\App\Action */ protected function _initAction() { - $this->loadLayout() - ->_setActiveMenu('Magento_Tax::sales_tax_rates') + $this->_view->loadLayout(); + $this->_setActiveMenu('Magento_Tax::sales_tax_rates') ->_addBreadcrumb(__('Sales'), __('Sales')) ->_addBreadcrumb(__('Tax'), __('Tax')); return $this; @@ -318,15 +335,15 @@ class Rate extends \Magento\Backend\Controller\Adminhtml\Action */ public function importExportAction() { - $this->_title(__('Tax Zones and Rates')); + $this->_title->add(__('Tax Zones and Rates')); - $this->_title(__('Import and Export Tax Rates')); + $this->_title->add(__('Import and Export Tax Rates')); - $this->loadLayout() - ->_setActiveMenu('Magento_Tax::system_convert_tax') - ->_addContent($this->getLayout()->createBlock('Magento\Tax\Block\Adminhtml\Rate\ImportExportHeader')) - ->_addContent($this->getLayout()->createBlock('Magento\Tax\Block\Adminhtml\Rate\ImportExport')) - ->renderLayout(); + $this->_view->loadLayout(); + $this->_setActiveMenu('Magento_Tax::system_convert_tax') + ->_addContent($this->_view->getLayout()->createBlock('Magento\Tax\Block\Adminhtml\Rate\ImportExportHeader')) + ->_addContent($this->_view->getLayout()->createBlock('Magento\Tax\Block\Adminhtml\Rate\ImportExport')); + $this->_view->renderLayout(); } /** @@ -354,7 +371,7 @@ class Rate extends \Magento\Backend\Controller\Adminhtml\Action $this->_objectManager->get('Magento\Adminhtml\Model\Session') ->addError(__('Invalid file upload attempt')); } - $this->_redirectReferer(); + $this->getResponse()->setRedirect($this->_redirect->getRedirectUrl($this->getUrl('*'))); } /** @@ -419,8 +436,8 @@ class Rate extends \Magento\Backend\Controller\Adminhtml\Action $content .= $rate->toString($template) . "\n"; } - $this->loadLayout(); - $this->_prepareDownloadResponse('tax_rates.csv', $content); + $this->_view->loadLayout(); + return $this->_fileFactory->create('tax_rates.csv', $content); } protected function _isAllowed() diff --git a/app/code/Magento/Tax/Controller/Adminhtml/Rule.php b/app/code/Magento/Tax/Controller/Adminhtml/Rule.php index 4084f0bb4454a38991b0027d34b178291fc2d9bd..f9c8805e67781f3767940e7d31c33582f7e2773e 100644 --- a/app/code/Magento/Tax/Controller/Adminhtml/Rule.php +++ b/app/code/Magento/Tax/Controller/Adminhtml/Rule.php @@ -33,7 +33,9 @@ */ namespace Magento\Tax\Controller\Adminhtml; -class Rule extends \Magento\Backend\Controller\Adminhtml\Action +use Magento\Backend\App\Action; + +class Rule extends \Magento\Backend\App\Action { /** * Core registry @@ -43,11 +45,11 @@ class Rule extends \Magento\Backend\Controller\Adminhtml\Action protected $_coreRegistry = null; /** - * @param \Magento\Backend\Controller\Context $context + * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Core\Model\Registry $coreRegistry */ public function __construct( - \Magento\Backend\Controller\Context $context, + \Magento\Backend\App\Action\Context $context, \Magento\Core\Model\Registry $coreRegistry ) { $this->_coreRegistry = $coreRegistry; @@ -56,9 +58,9 @@ class Rule extends \Magento\Backend\Controller\Adminhtml\Action public function indexAction() { - $this->_title(__('Tax Rules')); + $this->_title->add(__('Tax Rules')); $this->_initAction(); - $this->renderLayout(); + $this->_view->renderLayout(); return $this; } @@ -70,7 +72,7 @@ class Rule extends \Magento\Backend\Controller\Adminhtml\Action public function editAction() { - $this->_title(__('Tax Rules')); + $this->_title->add(__('Tax Rules')); $taxRuleId = $this->getRequest()->getParam('rule'); $ruleModel = $this->_objectManager->create('Magento\Tax\Model\Calculation\Rule'); @@ -89,13 +91,13 @@ class Rule extends \Magento\Backend\Controller\Adminhtml\Action $ruleModel->setData($data); } - $this->_title($ruleModel->getId() ? sprintf("%s", $ruleModel->getCode()) : __('New Tax Rule')); + $this->_title->add($ruleModel->getId() ? sprintf("%s", $ruleModel->getCode()) : __('New Tax Rule')); $this->_coreRegistry->register('tax_rule', $ruleModel); $this->_initAction() - ->_addBreadcrumb($taxRuleId ? __('Edit Rule') : __('New Rule'), $taxRuleId ? __('Edit Rule') : __('New Rule')) - ->renderLayout(); + ->_addBreadcrumb($taxRuleId ? __('Edit Rule') : __('New Rule'), $taxRuleId ? __('Edit Rule') : __('New Rule')); + $this->_view->renderLayout(); } public function saveAction() @@ -125,7 +127,7 @@ class Rule extends \Magento\Backend\Controller\Adminhtml\Action } $this->_objectManager->get('Magento\Adminhtml\Model\Session')->setRuleData($postData); - $this->_redirectReferer(); + $this->getResponse()->setRedirect($this->_redirect->getRedirectUrl($this->getUrl('*'))); return; } $this->getResponse()->setRedirect($this->getUrl('tax/rule')); @@ -155,18 +157,18 @@ class Rule extends \Magento\Backend\Controller\Adminhtml\Action $this->_objectManager->get('Magento\Adminhtml\Model\Session')->addError(__('Something went wrong deleting this tax rule.')); } - $this->_redirectReferer(); + $this->getResponse()->setRedirect($this->_redirect->getRedirectUrl($this->getUrl('*'))); } /** * Initialize action * - * @return \Magento\Backend\Controller\Adminhtml\Action + * @return \Magento\Backend\App\Action */ protected function _initAction() { - $this->loadLayout() - ->_setActiveMenu('Magento_Tax::sales_tax_rules') + $this->_view->loadLayout(); + $this->_setActiveMenu('Magento_Tax::sales_tax_rules') ->_addBreadcrumb(__('Tax'), __('Tax')) ->_addBreadcrumb(__('Tax Rules'), __('Tax Rules')); return $this; diff --git a/app/code/Magento/Tax/Controller/Adminhtml/Tax.php b/app/code/Magento/Tax/Controller/Adminhtml/Tax.php index ee63bfce948fb7590e07292439ed7fa05363a428..627df4a5681a2170f2fa92d43252ba8aa3f69da6 100644 --- a/app/code/Magento/Tax/Controller/Adminhtml/Tax.php +++ b/app/code/Magento/Tax/Controller/Adminhtml/Tax.php @@ -33,7 +33,7 @@ */ namespace Magento\Tax\Controller\Adminhtml; -class Tax extends \Magento\Backend\Controller\Adminhtml\Action +class Tax extends \Magento\Backend\App\Action { /** * Save Tax Class via AJAX diff --git a/app/code/Magento/Tax/Helper/Data.php b/app/code/Magento/Tax/Helper/Data.php index 971273adba3971ec2ffefa2bc43219a39fd8a2a7..cc4dd9bb9247c0f15e3621fa8b54eabd615b648d 100644 --- a/app/code/Magento/Tax/Helper/Data.php +++ b/app/code/Magento/Tax/Helper/Data.php @@ -29,7 +29,7 @@ */ namespace Magento\Tax\Helper; -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { const PRICE_CONVERSION_PLUS = 1; const PRICE_CONVERSION_MINUS = 2; @@ -108,7 +108,7 @@ class Data extends \Magento\Core\Helper\AbstractHelper /** * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\Registry $coreRegistry * @param \Magento\Core\Model\Store\Config $coreStoreConfig * @param \Magento\Tax\Model\Config $taxConfig @@ -120,7 +120,7 @@ class Data extends \Magento\Core\Helper\AbstractHelper */ public function __construct( \Magento\Core\Helper\Data $coreData, - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Core\Model\Registry $coreRegistry, \Magento\Core\Model\Store\Config $coreStoreConfig, \Magento\Tax\Model\Config $taxConfig, diff --git a/app/code/Magento/Tax/Model/Calculation.php b/app/code/Magento/Tax/Model/Calculation.php index 59748ea26dc67a291f069d52ecf6e2ab155916f4..f786d9076afc5ebb951ca06822e1932684fc4319 100644 --- a/app/code/Magento/Tax/Model/Calculation.php +++ b/app/code/Magento/Tax/Model/Calculation.php @@ -272,7 +272,7 @@ class Calculation extends \Magento\Core\Model\AbstractModel $this->unsRateValue(); $this->unsCalculationProcess(); $this->unsEventModuleId(); - $this->_eventDispatcher->dispatch('tax_rate_data_fetch', array('request' => $request, 'sender' => $this)); + $this->_eventManager->dispatch('tax_rate_data_fetch', array('request' => $request, 'sender' => $this)); if (!$this->hasRateValue()) { $rateInfo = $this->_getResource()->getRateInfo($request); $this->setCalculationProcess($rateInfo['process']); diff --git a/app/code/Magento/Tax/Model/Calculation/Rate.php b/app/code/Magento/Tax/Model/Calculation/Rate.php index 5f03df955fd166a5e793e9a9c2a6771c7bb2eec7..348a0a2db79f62bf449fcc88f6b530bb313ab906 100644 --- a/app/code/Magento/Tax/Model/Calculation/Rate.php +++ b/app/code/Magento/Tax/Model/Calculation/Rate.php @@ -53,13 +53,6 @@ class Rate extends \Magento\Core\Model\AbstractModel protected $_titles = null; protected $_titleModel = null; - /** - * Core event manager proxy - * - * @var \Magento\Event\ManagerInterface - */ - protected $_eventManager; - /** * @var \Magento\Directory\Model\RegionFactory */ @@ -71,7 +64,6 @@ class Rate extends \Magento\Core\Model\AbstractModel protected $_titleFactory; /** - * @param \Magento\Event\ManagerInterface $eventManager * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry * @param \Magento\Directory\Model\RegionFactory $regionFactory @@ -81,7 +73,6 @@ class Rate extends \Magento\Core\Model\AbstractModel * @param array $data */ public function __construct( - \Magento\Event\ManagerInterface $eventManager, \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, \Magento\Directory\Model\RegionFactory $regionFactory, @@ -90,7 +81,6 @@ class Rate extends \Magento\Core\Model\AbstractModel \Magento\Data\Collection\Db $resourceCollection = null, array $data = array() ) { - $this->_eventManager = $eventManager; $this->_regionFactory = $regionFactory; $this->_titleFactory = $taxTitleFactory; parent::__construct($context, $registry, $resource, $resourceCollection, $data); diff --git a/app/code/Magento/Tax/Model/Calculation/Rule.php b/app/code/Magento/Tax/Model/Calculation/Rule.php index b47da0fc18d1ecf53ea419aa0bf2338f7a1a82e8..3132ee04c6fd4353b2775944cc4ebac388d9db80 100644 --- a/app/code/Magento/Tax/Model/Calculation/Rule.php +++ b/app/code/Magento/Tax/Model/Calculation/Rule.php @@ -69,20 +69,12 @@ class Rule extends \Magento\Core\Model\AbstractModel */ protected $_taxClass; - /** - * Core event manager proxy - * - * @var \Magento\Event\ManagerInterface - */ - protected $_eventManager; - /** * @var \Magento\Tax\Model\Calculation */ protected $_calculation; /** - * @param \Magento\Event\ManagerInterface $eventManager * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry * @param \Magento\Tax\Helper\Data $taxHelper @@ -93,7 +85,6 @@ class Rule extends \Magento\Core\Model\AbstractModel * @param array $data */ public function __construct( - \Magento\Event\ManagerInterface $eventManager, \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, \Magento\Tax\Helper\Data $taxHelper, @@ -103,7 +94,6 @@ class Rule extends \Magento\Core\Model\AbstractModel \Magento\Data\Collection\Db $resourceCollection = null, array $data = array() ) { - $this->_eventManager = $eventManager; $this->_calculation = $calculation; parent::__construct($context, $registry, $resource, $resourceCollection, $data); diff --git a/app/code/Magento/Tax/Model/Config/Price/IncludePrice.php b/app/code/Magento/Tax/Model/Config/Price/IncludePrice.php index d1137e54abb456e307f529ec88a7ce724c6e79ec..52480e0c9006f0e49199d6f4314edc1f7262dc61 100644 --- a/app/code/Magento/Tax/Model/Config/Price/IncludePrice.php +++ b/app/code/Magento/Tax/Model/Config/Price/IncludePrice.php @@ -36,7 +36,7 @@ class IncludePrice extends \Magento\Core\Model\Config\Value /** * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Config $config * @param \Magento\Core\Model\App $app * @param \Magento\Core\Model\Resource\AbstractResource $resource @@ -46,7 +46,7 @@ class IncludePrice extends \Magento\Core\Model\Config\Value public function __construct( \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Config $config, \Magento\Core\Model\App $app, \Magento\Core\Model\Resource\AbstractResource $resource = null, diff --git a/app/code/Magento/Tax/Model/Rate/CsvImportHandler.php b/app/code/Magento/Tax/Model/Rate/CsvImportHandler.php index b3f3731aa899e799ea483ffacccb4a2f2defa289..8dba3cba894dbf7569be655da535beea48953d98 100644 --- a/app/code/Magento/Tax/Model/Rate/CsvImportHandler.php +++ b/app/code/Magento/Tax/Model/Rate/CsvImportHandler.php @@ -171,6 +171,7 @@ class CsvImportHandler // skip empty rows if (count($dataRow) <= 1) { unset($rateRawData[$rowIndex]); + continue; } // unset invalid fields from data row foreach ($dataRow as $fieldIndex => $fieldValue) { diff --git a/app/code/Magento/Tax/etc/sales.xml b/app/code/Magento/Tax/etc/sales.xml index 136e916ec08c532ec7c091455a14216875b8e45b..e4ec4f79cdedeadde7d9a4ae6d09fde8f382ded1 100644 --- a/app/code/Magento/Tax/etc/sales.xml +++ b/app/code/Magento/Tax/etc/sales.xml @@ -29,24 +29,24 @@ <item name="tax_subtotal" instance="Magento\Tax\Model\Sales\Total\Quote\Subtotal" sort_order="200"/> <item name="tax_shipping" instance="Magento\Tax\Model\Sales\Total\Quote\Shipping" sort_order="300"/> <item name="tax" instance="Magento\Tax\Model\Sales\Total\Quote\Tax" sort_order="450"> - <renderer name="frontend" instance="Magento\Tax\Block\Checkout\Tax"/> <renderer name="adminhtml" instance="Magento\Sales\Block\Adminhtml\Order\Create\Totals\Tax"/> + <renderer name="frontend" instance="Magento\Tax\Block\Checkout\Tax"/> </item> <item name="subtotal"> - <renderer name="frontend" instance="Magento\Tax\Block\Checkout\Subtotal"/> <renderer name="adminhtml" instance="Magento\Sales\Block\Adminhtml\Order\Create\Totals\Subtotal"/> + <renderer name="frontend" instance="Magento\Tax\Block\Checkout\Subtotal"/> </item> <item name="shipping"> - <renderer name="frontend" instance="Magento\Tax\Block\Checkout\Shipping"/> <renderer name="adminhtml" instance="Magento\Sales\Block\Adminhtml\Order\Create\Totals\Shipping"/> + <renderer name="frontend" instance="Magento\Tax\Block\Checkout\Shipping"/> </item> <item name="discount"> - <renderer name="frontend" instance="Magento\Tax\Block\Checkout\Discount"/> <renderer name="adminhtml" instance="Magento\Sales\Block\Adminhtml\Order\Create\Totals\Discount"/> + <renderer name="frontend" instance="Magento\Tax\Block\Checkout\Discount"/> </item> <item name="grand_total"> - <renderer name="frontend" instance="Magento\Tax\Block\Checkout\Grandtotal"/> <renderer name="adminhtml" instance="Magento\Sales\Block\Adminhtml\Order\Create\Totals\Grandtotal"/> + <renderer name="frontend" instance="Magento\Tax\Block\Checkout\Grandtotal"/> </item> </group> <group name="nominal_totals"> diff --git a/app/code/Magento/Tax/view/frontend/checkout/grandtotal.phtml b/app/code/Magento/Tax/view/frontend/checkout/grandtotal.phtml index 4880152304ddb2919c4f771f984682abb4f61cad..b5508a52bd0652f2fd2d8320506130f9fe86acde 100644 --- a/app/code/Magento/Tax/view/frontend/checkout/grandtotal.phtml +++ b/app/code/Magento/Tax/view/frontend/checkout/grandtotal.phtml @@ -19,39 +19,37 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design - * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /** * @var $this \Magento\Tax\Block\Checkout\Grandtotal - * @see \Magento\Tax\Block\Checkout\Grandtotal */ ?> <?php if ($this->includeTax() && $this->getTotalExclTax()>=0):?> -<tr> - <td style="<?php echo $this->getStyle() ?>" class="a-right" colspan="<?php echo $this->getColspan(); ?>"> +<tr class="totals grand excl"> + <td style="<?php echo $this->getStyle() ?>" class="mark" colspan="<?php echo $this->getColspan(); ?>"> <strong><?php echo __('Grand Total Excl. Tax')?></strong> </td> - <td style="<?php echo $this->getStyle() ?>" class="a-right"> + <td style="<?php echo $this->getStyle() ?>" class="amount"> <strong><?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($this->getTotalExclTax()) ?></strong> </td> </tr> <?php echo $this->renderTotals('taxes', $this->getColspan()); ?> -<tr> - <td style="<?php echo $this->getStyle() ?>" class="a-right" colspan="<?php echo $this->getColspan(); ?>"> +<tr class="totals grand incl"> + <td style="<?php echo $this->getStyle() ?>" class="mark" colspan="<?php echo $this->getColspan(); ?>"> <strong><?php echo __('Grand Total Incl. Tax')?></strong> </td> - <td style="<?php echo $this->getStyle() ?>" class="a-right"> + <td style="<?php echo $this->getStyle() ?>" class="amount"> <strong><?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($this->getTotal()->getValue()) ?></strong> </td> </tr> <?php else:?> -<tr> - <td style="<?php echo $this->getStyle() ?>" class="a-right" colspan="<?php echo $this->getColspan(); ?>"> +<tr class="grand totals"> + <td style="<?php echo $this->getStyle() ?>" class="mark" colspan="<?php echo $this->getColspan(); ?>"> <strong><?php echo $this->getTotal()->getTitle() ?></strong> </td> - <td style="<?php echo $this->getStyle() ?>" class="a-right"> + <td style="<?php echo $this->getStyle() ?>" class="amount"> <strong><?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($this->getTotal()->getValue()) ?></strong> </td> </tr> diff --git a/app/code/Magento/Tax/view/frontend/checkout/shipping.phtml b/app/code/Magento/Tax/view/frontend/checkout/shipping.phtml index 9ca9c4e6adb10585aff79e57ffe0b6a2fb93eea6..6ef7b85313e0c48149a060974e12427eae8c835d 100644 --- a/app/code/Magento/Tax/view/frontend/checkout/shipping.phtml +++ b/app/code/Magento/Tax/view/frontend/checkout/shipping.phtml @@ -19,7 +19,6 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design - * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ @@ -29,37 +28,37 @@ */ ?> <?php if ($this->displayBoth()):?> -<tr> - <td style="<?php echo $this->getStyle() ?>" class="a-right" colspan="<?php echo $this->getColspan(); ?>"> +<tr class="totals shipping excl"> + <td style="<?php echo $this->getStyle() ?>" class="mark" colspan="<?php echo $this->getColspan(); ?>"> <?php echo $this->getExcludeTaxLabel() ?> </td> - <td style="<?php echo $this->getStyle() ?>" class="a-right"> + <td style="<?php echo $this->getStyle() ?>" class="amount"> <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($this->getShippingExcludeTax()) ?> </td> </tr> -<tr> - <td style="<?php echo $this->getStyle() ?>" class="a-right" colspan="<?php echo $this->getColspan(); ?>"> +<tr class="totals shipping incl"> + <td style="<?php echo $this->getStyle() ?>" class="mark" colspan="<?php echo $this->getColspan(); ?>"> <?php echo $this->getIncludeTaxLabel() ?> </td> - <td style="<?php echo $this->getStyle() ?>" class="a-right"> + <td style="<?php echo $this->getStyle() ?>" class="amount"> <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($this->getShippingIncludeTax()) ?> </td> </tr> <?php elseif($this->displayIncludeTax()) : ?> -<tr> - <td style="<?php echo $this->getStyle() ?>" class="a-right" colspan="<?php echo $this->getColspan(); ?>"> +<tr class="totals shipping incl"> + <td style="<?php echo $this->getStyle() ?>" class="mark" colspan="<?php echo $this->getColspan(); ?>"> <?php echo $this->getTotal()->getTitle() ?> </td> - <td style="<?php echo $this->getStyle() ?>" class="a-right"> + <td style="<?php echo $this->getStyle() ?>" class="amount"> <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($this->getShippingIncludeTax()) ?> </td> </tr> <?php else:?> -<tr> - <td style="<?php echo $this->getStyle() ?>" class="a-right" colspan="<?php echo $this->getColspan(); ?>"> +<tr class="totals shipping excl"> + <td style="<?php echo $this->getStyle() ?>" class="mark" colspan="<?php echo $this->getColspan(); ?>"> <?php echo $this->escapeHtml($this->getTotal()->getTitle()) ?> </td> - <td style="<?php echo $this->getStyle() ?>" class="a-right"> + <td style="<?php echo $this->getStyle() ?>" class="amount"> <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($this->getShippingExcludeTax()) ?> </td> </tr> diff --git a/app/code/Magento/Tax/view/frontend/checkout/subtotal.phtml b/app/code/Magento/Tax/view/frontend/checkout/subtotal.phtml index bebb5a108879bf4b1ee453a98bebb1302702d6a6..6a0771d4fbe2394ef8079c8154a9ea9cd072e924 100644 --- a/app/code/Magento/Tax/view/frontend/checkout/subtotal.phtml +++ b/app/code/Magento/Tax/view/frontend/checkout/subtotal.phtml @@ -19,7 +19,6 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design - * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ @@ -29,28 +28,28 @@ */ ?> <?php if ($this->displayBoth()):?> -<tr> - <td style="<?php echo $this->getStyle() ?>" class="a-right" colspan="<?php echo $this->getColspan(); ?>"> +<tr class="totals sub excl"> + <td style="<?php echo $this->getStyle() ?>" class="mark" colspan="<?php echo $this->getColspan(); ?>"> <?php echo __('Subtotal (Excl. Tax)') ?> </td> - <td style="<?php echo $this->getStyle() ?>" class="a-right"> + <td style="<?php echo $this->getStyle() ?>" class="amount"> <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($this->getTotal()->getValueExclTax()) ?> </td> </tr> -<tr> - <td style="<?php echo $this->getStyle() ?>" class="a-right" colspan="<?php echo $this->getColspan(); ?>"> +<tr class="totals sub incl"> + <td style="<?php echo $this->getStyle() ?>" class="mark" colspan="<?php echo $this->getColspan(); ?>"> <?php echo __('Subtotal (Incl. Tax)') ?> </td> - <td style="<?php echo $this->getStyle() ?>" class="a-right"> + <td style="<?php echo $this->getStyle() ?>" class="amount"> <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($this->getTotal()->getValueInclTax()) ?> </td> </tr> <?php else : ?> -<tr> - <td style="<?php echo $this->getStyle() ?>" class="a-right" colspan="<?php echo $this->getColspan(); ?>"> +<tr class="totals sub"> + <td style="<?php echo $this->getStyle() ?>" class="mark" colspan="<?php echo $this->getColspan(); ?>"> <?php echo $this->getTotal()->getTitle() ?> </td> - <td style="<?php echo $this->getStyle() ?>" class="a-right"> + <td style="<?php echo $this->getStyle() ?>" class="amount"> <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($this->getTotal()->getValue()) ?> </td> </tr> diff --git a/app/code/Magento/Tax/view/frontend/checkout/tax.phtml b/app/code/Magento/Tax/view/frontend/checkout/tax.phtml index c00c8d788d37e1a9a13b5a1d9d9d603938c213d9..98d93d7416015cd42c30e5ff655e3394715dd22c 100644 --- a/app/code/Magento/Tax/view/frontend/checkout/tax.phtml +++ b/app/code/Magento/Tax/view/frontend/checkout/tax.phtml @@ -19,7 +19,6 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design - * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ @@ -43,8 +42,8 @@ <?php $isFirst = 1; ?> <?php foreach ($rates as $rate): ?> - <tr class="summary-details-<?php echo $taxIter; ?> summary-details<?php if ($isTop): echo ' summary-details-first'; endif; ?>" style="display:none;"> - <td class="a-right" style="<?php echo $_style ?>" colspan="<?php echo $this->getColspan(); ?>"> + <tr class="totals tax details details-<?php echo $taxIter; ?>"> + <td class="mark" style="<?php echo $_style ?>" colspan="<?php echo $this->getColspan(); ?>"> <?php echo $this->escapeHtml($rate['title']); ?> <?php if (!is_null($rate['percent'])): ?> (<?php echo (float)$rate['percent']; ?>%) @@ -52,7 +51,7 @@ <br /> </td> <?php if ($isFirst): ?> - <td style="<?php echo $_style ?>" class="a-right" rowspan="<?php echo count($rates); ?>"> + <td style="<?php echo $_style ?>" class="amount" rowspan="<?php echo count($rates); ?>"> <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($amount); ?> </td> <?php endif; ?> @@ -62,13 +61,20 @@ <?php endforeach; ?> <?php endforeach; ?> <?php endif;?> -<tr <?php if ($this->helper('Magento\Tax\Helper\Data')->displayFullSummary() && $_value!=0): ?> class="summary-total" onclick="expandDetails(this, '.summary-details-<?php echo $taxIter;?>')"<?php endif; ?>> - <td style="<?php echo $_style ?>" class="a-right" colspan="<?php echo $this->getColspan(); ?>"> +<?php + $attributes = 'class="totals tax"'; + if ($this->helper('Magento\Tax\Helper\Data')->displayFullSummary() && $_value!=0) { + $attributes = 'class="totals tax summary"'; + } +?> + +<tr <?php echo $attributes; ?>> + <td style="<?php echo $_style ?>" class="mark" colspan="<?php echo $this->getColspan(); ?>"> <?php if ($this->helper('Magento\Tax\Helper\Data')->displayFullSummary()): ?> - <div class="summary-collapse"><?php echo $this->getTotal()->getTitle() ?></div> + <div class="detailed"><?php echo $this->getTotal()->getTitle() ?></div> <?php else: ?> <?php echo $this->getTotal()->getTitle() ?> <?php endif;?> </td> - <td style="<?php echo $_style ?>" class="a-right"><?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_value) ?></td> + <td style="<?php echo $_style ?>" class="amount"><?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_value) ?></td> </tr> diff --git a/app/code/Magento/Tax/view/frontend/order/tax.phtml b/app/code/Magento/Tax/view/frontend/order/tax.phtml index e18c5909885c963b1a0939264f8fd928778c4b12..7fd4321c52ad4e3c30a4806b66f67dd399aae1e5 100644 --- a/app/code/Magento/Tax/view/frontend/order/tax.phtml +++ b/app/code/Magento/Tax/view/frontend/order/tax.phtml @@ -30,7 +30,6 @@ $_fullInfo = $_order->getFullTaxInfo(); global $taxIter; $taxIter++; ?> -<?php ?> <?php if ($this->displayFullSummary()): ?> <?php $isTop = 1; ?> @@ -43,8 +42,8 @@ $isFirst = 1; ?> <?php foreach ($rates as $rate): ?> - <tr class="summary-details-<?php echo $taxIter; ?> summary-details<?php if ($isTop): echo ' summary-details-first'; endif; ?>"<?php if (!$this->getIsPlaneMode()):?> style="display:none;"<?php endif;?>> - <td <?php echo $this->getLabelProperties()?>> + <tr class="totals tax details details-<?php echo $taxIter; ?> <?php echo ($this->getIsPlaneMode()) ? ' plane' : '';?>"> + <td class="mark" <?php echo $this->getLabelProperties()?>> <?php echo $this->escapeHtml($rate['title']); ?> <?php if (!is_null($rate['percent'])): ?> (<?php echo (float)$rate['percent']; ?>%) @@ -52,7 +51,7 @@ <br /> </td> <?php if ($isFirst): ?> - <td <?php echo $this->getValueProperties()?> rowspan="<?php echo count($rates); ?>"> + <td class="amount" <?php echo $this->getValueProperties()?> rowspan="<?php echo count($rates); ?>"> <?php echo $_order->formatPrice($amount); ?> </td> <?php endif; ?> @@ -64,18 +63,18 @@ <?php endif;?> <?php if ($this->displayFullSummary() && $_fullInfo && !$this->getIsPlaneMode()): ?> -<tr class="summary-total" onclick="expandDetails(this, '.summary-details-<?php echo $taxIter;?>')"> +<tr class="totals tax summary"> <?php elseif ($this->displayFullSummary() && $_fullInfo && $this->getIsPlaneMode()): ?> -<tr class="show-details"> +<tr class="totals tax summary plane"> <?php else: ?> -<tr> +<tr class="totals tax"> <?php endif; ?> - <td <?php echo $this->getLabelProperties()?>> + <td class="mark" <?php echo $this->getLabelProperties()?>> <?php if ($this->displayFullSummary()): ?> - <div class="summary-collapse"><?php echo __('Tax'); ?></div> + <div class="detailed"><?php echo __('Tax'); ?></div> <?php else: ?> <?php echo __('Tax'); ?> <?php endif;?> </td> - <td <?php echo $this->getValueProperties()?>><?php echo $_order->formatPrice($_source->getTaxAmount()) ?></td> + <td class="amount" <?php echo $this->getValueProperties()?>><?php echo $_order->formatPrice($_source->getTaxAmount()) ?></td> </tr> diff --git a/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit.php b/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit.php index 480af10a823aa53554233fb360b919687d749bd5..6be1972ad428dedc2177c34e8b21eb76ab5b3c10 100644 --- a/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit.php +++ b/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit.php @@ -38,26 +38,26 @@ class Edit extends \Magento\Backend\Block\Widget\Form\Container */ protected $_coreRegistry = null; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** * Prepare layout * - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ protected function _prepareLayout() { diff --git a/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/AbstractTab.php b/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/AbstractTab.php index ab2abbc144056d61a17eac03cebc60238cb48544..01565c5b467b5643212d69a4b0b9d1ca310446ec 100644 --- a/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/AbstractTab.php +++ b/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/AbstractTab.php @@ -48,23 +48,23 @@ abstract class AbstractTab */ protected $_coreRegistry = null; - /** - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\ObjectManager $objectManager - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\ObjectManager $objectManager + * @param array $data */ - public function __construct( - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - \Magento\ObjectManager $objectManager, - array $data = array() - ) { - parent::__construct($registry, $formFactory, $coreData, $context, $data); + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\ObjectManager $objectManager, + array $data = array() + ) { + parent::__construct($context, $coreData, $registry, $formFactory, $data); $this->_objectManager = $objectManager; } diff --git a/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/Tab/Css.php b/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/Tab/Css.php index a05732f064f660f7e6d590da745ce02d208b81bb..0b1ec6e8af5541f600ad6ad4bfd352516199035c 100644 --- a/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/Tab/Css.php +++ b/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/Tab/Css.php @@ -52,25 +52,25 @@ class Css */ protected $_customCssFile; - /** - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\ObjectManager $objectManager - * @param \Magento\Theme\Model\Uploader\Service $uploaderService - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\ObjectManager $objectManager + * @param \Magento\Theme\Model\Uploader\Service $uploaderService + * @param array $data */ - public function __construct( - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - \Magento\ObjectManager $objectManager, - \Magento\Theme\Model\Uploader\Service $uploaderService, - array $data = array() - ) { - parent::__construct($formFactory, $coreData, $context, $registry, $objectManager, $data); + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\ObjectManager $objectManager, + \Magento\Theme\Model\Uploader\Service $uploaderService, + array $data = array() + ) { + parent::__construct($context, $coreData, $registry, $formFactory, $objectManager, $data); $this->_uploaderService = $uploaderService; } diff --git a/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/Tab/General.php b/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/Tab/General.php index e1ce4bb991a05ef22c53cd54de6d8c093ca020f2..793bdd2669311210babc390e3a72a793ed4e6b57 100644 --- a/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/Tab/General.php +++ b/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/Tab/General.php @@ -51,29 +51,29 @@ class General */ protected $_fileSize; - /** - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\ObjectManager $objectManager - * @param \Magento\View\Design\Theme\Image\PathInterface $themeImagePath - * @param \Magento\File\Size $fileSize - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\ObjectManager $objectManager + * @param \Magento\View\Design\Theme\Image\PathInterface $themeImagePath + * @param \Magento\File\Size $fileSize + * @param array $data */ - public function __construct( - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - \Magento\ObjectManager $objectManager, - \Magento\View\Design\Theme\Image\PathInterface $themeImagePath, - \Magento\File\Size $fileSize, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\ObjectManager $objectManager, + \Magento\View\Design\Theme\Image\PathInterface $themeImagePath, + \Magento\File\Size $fileSize, + array $data = array() + ) { $this->_themeImagePath = $themeImagePath; $this->_fileSize = $fileSize; - parent::__construct($formFactory, $coreData, $context, $registry, $objectManager, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $objectManager, $data); } /** diff --git a/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Theme.php b/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Theme.php index 10aeb0df0e3fad48272ab40ae1b7735c537e6a21..6fba27a5ab0f3b728d7194a4ec3769e2b418acc7 100644 --- a/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Theme.php +++ b/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Theme.php @@ -29,7 +29,7 @@ */ namespace Magento\Theme\Controller\Adminhtml\System\Design; -class Theme extends \Magento\Backend\Controller\Adminhtml\Action +class Theme extends \Magento\Backend\App\Action { /** * Core registry @@ -39,14 +39,22 @@ class Theme extends \Magento\Backend\Controller\Adminhtml\Action protected $_coreRegistry = null; /** - * @param \Magento\Backend\Controller\Context $context + * @var \Magento\App\Response\Http\FileFactory + */ + protected $_fileFactory; + + /** + * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Core\Model\Registry $coreRegistry + * @param \Magento\App\Response\Http\FileFactory $fileFactory */ public function __construct( - \Magento\Backend\Controller\Context $context, - \Magento\Core\Model\Registry $coreRegistry + \Magento\Backend\App\Action\Context $context, + \Magento\Core\Model\Registry $coreRegistry, + \Magento\App\Response\Http\FileFactory $fileFactory ) { $this->_coreRegistry = $coreRegistry; + $this->_fileFactory = $fileFactory; parent::__construct($context); } @@ -55,9 +63,9 @@ class Theme extends \Magento\Backend\Controller\Adminhtml\Action */ public function indexAction() { - $this->loadLayout(); + $this->_view->loadLayout(); $this->_setActiveMenu('Magento_Theme::system_design_theme'); - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -65,8 +73,8 @@ class Theme extends \Magento\Backend\Controller\Adminhtml\Action */ public function gridAction() { - $this->loadLayout(false); - $this->renderLayout(); + $this->_view->loadLayout(false); + $this->_view->renderLayout(); } /** @@ -92,9 +100,9 @@ class Theme extends \Magento\Backend\Controller\Adminhtml\Action } $this->_coreRegistry->register('current_theme', $theme); - $this->loadLayout(); + $this->_view->loadLayout(); /** @var $tab \Magento\Theme\Block\Adminhtml\System\Design\Theme\Edit\Tab_Css */ - $tab = $this->getLayout()->getBlock('theme_edit_tabs_tab_css_tab'); + $tab = $this->_view->getLayout()->getBlock('theme_edit_tabs_tab_css_tab'); if ($tab && $tab->canShowTab()) { /** @var $helper \Magento\Core\Helper\Theme */ $helper = $this->_objectManager->get('Magento\Core\Helper\Theme'); @@ -102,7 +110,7 @@ class Theme extends \Magento\Backend\Controller\Adminhtml\Action $tab->setFiles($files); } $this->_setActiveMenu('Magento_Theme::system_design_theme'); - $this->renderLayout(); + $this->_view->renderLayout(); } catch (\Magento\Core\Exception $e) { $this->_getSession()->addError($e->getMessage()); $this->_redirect('adminhtml/*/'); @@ -283,7 +291,7 @@ class Theme extends \Magento\Backend\Controller\Adminhtml\Action /** @var $customCssFile \Magento\View\Design\Theme\FileInterface */ $customCssFile = reset($customCssFiles); if ($customCssFile && $customCssFile->getContent()) { - $this->_prepareDownloadResponse( + $this->_fileFactory->create( $customCssFile->getFileName(), array( 'type' => 'filename', @@ -293,7 +301,7 @@ class Theme extends \Magento\Backend\Controller\Adminhtml\Action } } catch (\Exception $e) { $this->_getSession()->addException($e, __('We cannot find file')); - $this->_redirectUrl($this->_getRefererUrl()); + $this->getResponse()->setRedirect($this->_redirect->getRefererUrl()); $this->_objectManager->get('Magento\Logger')->logException($e); } } @@ -323,13 +331,13 @@ class Theme extends \Magento\Backend\Controller\Adminhtml\Action ); } - $this->_prepareDownloadResponse($fileName, array( + $this->_fileFactory->create($fileName, array( 'type' => 'filename', 'value' => $themeCss[$fileName]['path'] )); } catch (\Exception $e) { $this->_getSession()->addException($e, __('We cannot find file "%1".', $fileName)); - $this->_redirectUrl($this->_getRefererUrl()); + $this->getResponse()->setRedirect($this->_redirect->getRefererUrl()); $this->_objectManager->get('Magento\Logger')->logException($e); } } diff --git a/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Wysiwyg/Files.php b/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Wysiwyg/Files.php index ccff57a2870f577ea4012f683b138dc9eaf38709..9437b24755627403773bf103773f71b01bba2fbb 100644 --- a/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Wysiwyg/Files.php +++ b/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Wysiwyg/Files.php @@ -29,15 +29,32 @@ */ namespace Magento\Theme\Controller\Adminhtml\System\Design\Wysiwyg; -class Files extends \Magento\Backend\Controller\Adminhtml\Action +class Files extends \Magento\Backend\App\Action { + /** + * @var \Magento\App\Response\Http\FileFactory + */ + protected $_fileFactory; + + /** + * @param \Magento\Backend\App\Action\Context $context + * @param \Magento\App\Response\Http\FileFactory $fileFactory + */ + public function __construct( + \Magento\Backend\App\Action\Context $context, + \Magento\App\Response\Http\FileFactory $fileFactory + ) { + $this->_fileFactory = $fileFactory; + parent::__construct($context); + } + /** * Index action */ public function indexAction() { - $this->loadLayout('overlay_popup'); - $this->renderLayout(); + $this->_view->loadLayout('overlay_popup'); + $this->_view->renderLayout(); } /** @@ -47,7 +64,7 @@ class Files extends \Magento\Backend\Controller\Adminhtml\Action { try { $this->getResponse()->setBody( - $this->getLayout()->createBlock('Magento\Theme\Block\Adminhtml\Wysiwyg\Files\Tree') + $this->_view->getLayout()->createBlock('Magento\Theme\Block\Adminhtml\Wysiwyg\Files\Tree') ->getTreeJson($this->_getStorage()->getTreeArray()) ); } catch (\Exception $e) { @@ -94,9 +111,9 @@ class Files extends \Magento\Backend\Controller\Adminhtml\Action public function contentsAction() { try { - $this->loadLayout('empty'); - $this->getLayout()->getBlock('wysiwyg_files.files')->setStorage($this->_getStorage()); - $this->renderLayout(); + $this->_view->loadLayout('empty'); + $this->_view->getLayout()->getBlock('wysiwyg_files.files')->setStorage($this->_getStorage()); + $this->_view->renderLayout(); $this->_getSession()->setStoragePath( $this->_objectManager->get('Magento\Theme\Helper\Storage')->getCurrentPath() @@ -130,7 +147,7 @@ class Files extends \Magento\Backend\Controller\Adminhtml\Action /** @var $helper \Magento\Theme\Helper\Storage */ $helper = $this->_objectManager->get('Magento\Theme\Helper\Storage'); try { - $this->_prepareDownloadResponse($file, array( + $this->_fileFactory->create($file, array( 'type' => 'filename', 'value' => $helper->getThumbnailPath($file) )); diff --git a/app/code/Magento/Theme/Helper/Data.php b/app/code/Magento/Theme/Helper/Data.php index bac42808f2d3d004c189687e9302f2bb08745847..c9d9f4c3a19c646c31cbcf2fbcddf04719c1dd3c 100644 --- a/app/code/Magento/Theme/Helper/Data.php +++ b/app/code/Magento/Theme/Helper/Data.php @@ -29,6 +29,6 @@ */ namespace Magento\Theme\Helper; -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { } diff --git a/app/code/Magento/Theme/Helper/Storage.php b/app/code/Magento/Theme/Helper/Storage.php index 67ec4f52584d0b8e2a0456a84aba2a049d906f3d..ffd0e16b388c90347d15c855582570dd724c01ba 100644 --- a/app/code/Magento/Theme/Helper/Storage.php +++ b/app/code/Magento/Theme/Helper/Storage.php @@ -29,7 +29,7 @@ */ namespace Magento\Theme\Helper; -class Storage extends \Magento\Core\Helper\AbstractHelper +class Storage extends \Magento\App\Helper\AbstractHelper { /** * Parameter name of node @@ -101,13 +101,13 @@ class Storage extends \Magento\Core\Helper\AbstractHelper * @param \Magento\Filesystem $filesystem * @param \Magento\Backend\Model\Session $session * @param \Magento\View\Design\Theme\FlyweightFactory $themeFactory - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context */ public function __construct( \Magento\Filesystem $filesystem, \Magento\Backend\Model\Session $session, \Magento\View\Design\Theme\FlyweightFactory $themeFactory, - \Magento\Core\Helper\Context $context + \Magento\App\Helper\Context $context ) { parent::__construct($context); $this->_filesystem = $filesystem; diff --git a/app/code/Magento/Usa/Block/Adminhtml/Dhl/Unitofmeasure.php b/app/code/Magento/Usa/Block/Adminhtml/Dhl/Unitofmeasure.php index 71676825d0b9254c96f38f01a9eabcec536d8f4c..b4f4d87c19f333af796b022493ffcd556f657ce7 100644 --- a/app/code/Magento/Usa/Block/Adminhtml/Dhl/Unitofmeasure.php +++ b/app/code/Magento/Usa/Block/Adminhtml/Dhl/Unitofmeasure.php @@ -48,25 +48,23 @@ class Unitofmeasure extends \Magento\Backend\Block\System\Config\Form\Field */ protected $_shippingDhl; - /** - * @param \Magento\Usa\Model\Shipping\Carrier\Dhl\International $shippingDhl - * @param \Magento\Usa\Helper\Data $usaData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\App $application - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Usa\Model\Shipping\Carrier\Dhl\International $shippingDhl + * @param \Magento\Usa\Helper\Data $usaData + * @param array $data */ - public function __construct( - \Magento\Usa\Model\Shipping\Carrier\Dhl\International $shippingDhl, - \Magento\Usa\Helper\Data $usaData, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\App $application, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Usa\Model\Shipping\Carrier\Dhl\International $shippingDhl, + \Magento\Usa\Helper\Data $usaData, + array $data = array() + ) { $this->_shippingDhl = $shippingDhl; $this->_usaData = $usaData; - parent::__construct($coreData, $context, $application, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Usa/Helper/Data.php b/app/code/Magento/Usa/Helper/Data.php index be3dfc6aa7ca6f0e884784237b4f9bf2a8ce2ca2..34c9dcfe0e7c434be443ade4ce81f932fb773a85 100644 --- a/app/code/Magento/Usa/Helper/Data.php +++ b/app/code/Magento/Usa/Helper/Data.php @@ -31,7 +31,7 @@ */ namespace Magento\Usa\Helper; -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { /** * @var \Magento\Core\Model\LocaleInterface @@ -40,11 +40,11 @@ class Data extends \Magento\Core\Helper\AbstractHelper /** * @param \Magento\Core\Model\LocaleInterface $locale - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context */ public function __construct( \Magento\Core\Model\LocaleInterface $locale, - \Magento\Core\Helper\Context $context + \Magento\App\Helper\Context $context ) { $this->_locale = $locale; parent::__construct($context); diff --git a/app/code/Magento/Usa/Model/Shipping/Carrier/Dhl/Label/Pdf.php b/app/code/Magento/Usa/Model/Shipping/Carrier/Dhl/Label/Pdf.php index f497ae128f1fc01cbeb2a3487dc78ffaaab8cfb5..e8b32be7a26b8eb7396473f307e3312180ba29a3 100644 --- a/app/code/Magento/Usa/Model/Shipping/Carrier/Dhl/Label/Pdf.php +++ b/app/code/Magento/Usa/Model/Shipping/Carrier/Dhl/Label/Pdf.php @@ -110,7 +110,7 @@ class Pdf (string)$piece->LicensePlate, (string)$piece->LicensePlateBarCode ); - array_push($pdf->pages, $page); + $pdf->pages[] = $page; $i++; } return $pdf->render(); diff --git a/app/code/Magento/Usa/Model/Shipping/Carrier/Ups.php b/app/code/Magento/Usa/Model/Shipping/Carrier/Ups.php index 8e1da4093041a8c6cca4178855c6258332036d65..d9ddc32b262d901e562d93a9e3636dbe95f7e757 100644 --- a/app/code/Magento/Usa/Model/Shipping/Carrier/Ups.php +++ b/app/code/Magento/Usa/Model/Shipping/Carrier/Ups.php @@ -157,7 +157,6 @@ class Ups */ public function __construct( \Magento\Logger $logger, - \Magento\Usa\Model\Simplexml\ElementFactory $simpleXmlElementFactory, \Magento\Core\Model\LocaleInterface $locale, \Magento\Usa\Model\Simplexml\ElementFactory $xmlElFactory, \Magento\Shipping\Model\Rate\ResultFactory $rateFactory, @@ -176,7 +175,6 @@ class Ups ) { $this->_logger = $logger; $this->_locale = $locale; - $this->_simpleXmlElementFactory = $simpleXmlElementFactory; parent::__construct( $xmlElFactory, $rateFactory, $rateMethodFactory, $trackFactory, $trackErrorFactory, $trackStatusFactory, $regionFactory, $countryFactory, $currencyFactory, $directoryData, $coreStoreConfig, $rateErrorFactory, diff --git a/app/code/Magento/User/Block/Buttons.php b/app/code/Magento/User/Block/Buttons.php index d856d67bbb966b67a24e7cfdca7f108266d9e064..623c6903065ae27320307e4b23bdd62c32482b96 100644 --- a/app/code/Magento/User/Block/Buttons.php +++ b/app/code/Magento/User/Block/Buttons.php @@ -36,20 +36,20 @@ class Buttons extends \Magento\Backend\Block\Template */ protected $_coreRegistry = null; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _prepareLayout() diff --git a/app/code/Magento/User/Block/Role/Edit.php b/app/code/Magento/User/Block/Role/Edit.php index e9d696b822f24e19412592721460e67745aa6db9..61b886e60020f8c57ec8784dff6494984008c2eb 100644 --- a/app/code/Magento/User/Block/Role/Edit.php +++ b/app/code/Magento/User/Block/Role/Edit.php @@ -35,22 +35,22 @@ class Edit extends \Magento\Backend\Block\Widget\Tabs */ protected $_coreRegistry = null; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Backend\Model\Auth\Session $authSession - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Backend\Model\Auth\Session $authSession + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Backend\Model\Auth\Session $authSession, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Backend\Model\Auth\Session $authSession, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $authSession, $data); + parent::__construct($context, $coreData, $authSession, $data); } protected function _construct() diff --git a/app/code/Magento/User/Block/Role/Grid/User.php b/app/code/Magento/User/Block/Role/Grid/User.php index 3440fc6f12750d3dfad0c481aeb229e0c6c2986b..fff67ba887e33093d45898adc48a83393f7ea6c6 100644 --- a/app/code/Magento/User/Block/Role/Grid/User.php +++ b/app/code/Magento/User/Block/Role/Grid/User.php @@ -43,27 +43,23 @@ class User extends \Magento\Backend\Block\Widget\Grid\Extended */ protected $_roleFactory; - /** - * Construct - * - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param \Magento\Core\Model\Registry $coreRegistry - * @param \Magento\User\Model\RoleFactory $roleFactory - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Core\Model\Registry $coreRegistry + * @param \Magento\User\Model\RoleFactory $roleFactory + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - \Magento\Core\Model\Registry $coreRegistry, - \Magento\User\Model\RoleFactory $roleFactory, - array $data = array() - ) { - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\Core\Model\Registry $coreRegistry, + \Magento\User\Model\RoleFactory $roleFactory, + array $data = array() + ) { + parent::__construct($context, $coreData, $urlModel, $data); $this->_coreRegistry = $coreRegistry; $this->_roleFactory = $roleFactory; } diff --git a/app/code/Magento/User/Block/Role/Tab/Edit.php b/app/code/Magento/User/Block/Role/Tab/Edit.php index 9a190f8d4523c57474a020f46b8fff98ae5ae733..e4ed31ddd8868e014d5993a8b4f2161a731d54f4 100644 --- a/app/code/Magento/User/Block/Role/Tab/Edit.php +++ b/app/code/Magento/User/Block/Role/Tab/Edit.php @@ -63,31 +63,29 @@ class Edit extends \Magento\Backend\Block\Widget\Form */ protected $_aclResourceProvider; - /** - * Construct - * - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Acl\RootResource $rootResource - * @param \Magento\User\Model\Resource\Rules\CollectionFactory $rulesCollectionFactory - * @param \Magento\Acl\Builder $aclBuilder - * @param \Magento\Acl\Resource\ProviderInterface $aclResourceProvider - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Acl\RootResource $rootResource + * @param \Magento\User\Model\Resource\Rules\CollectionFactory $rulesCollectionFactory + * @param \Magento\Acl\Builder $aclBuilder + * @param \Magento\Acl\Resource\ProviderInterface $aclResourceProvider + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Acl\RootResource $rootResource, - \Magento\User\Model\Resource\Rules\CollectionFactory $rulesCollectionFactory, - \Magento\Acl\Builder $aclBuilder, - \Magento\Acl\Resource\ProviderInterface $aclResourceProvider, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Acl\RootResource $rootResource, + \Magento\User\Model\Resource\Rules\CollectionFactory $rulesCollectionFactory, + \Magento\Acl\Builder $aclBuilder, + \Magento\Acl\Resource\ProviderInterface $aclResourceProvider, + array $data = array() + ) { $this->_aclBuilder = $aclBuilder; $this->_rootResource = $rootResource; $this->_rulesCollectionFactory = $rulesCollectionFactory; $this->_aclResourceProvider = $aclResourceProvider; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** @@ -147,7 +145,7 @@ class Edit extends \Magento\Backend\Block\Widget\Form foreach ($rulesSet->getItems() as $item) { $itemResourceId = $item->getResource_id(); if ($acl->has($itemResourceId) && $item->getPermission() == 'allow') { - array_push($selectedResourceIds, $itemResourceId); + $selectedResourceIds[] = $itemResourceId; } } diff --git a/app/code/Magento/User/Block/Role/Tab/Users.php b/app/code/Magento/User/Block/Role/Tab/Users.php index 5fc4c296b55746bf111c463be898c9b6d09e5a94..0949a65ef70661e2f1e6c2819f923e15a0b9d5eb 100644 --- a/app/code/Magento/User/Block/Role/Tab/Users.php +++ b/app/code/Magento/User/Block/Role/Tab/Users.php @@ -38,25 +38,23 @@ class Users extends \Magento\Backend\Block\Widget\Tabs */ protected $_userCollectionFactory; - /** - * Construct - * - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Backend\Model\Auth\Session $authSession - * @param \Magento\User\Model\Resource\User\CollectionFactory $userCollectionFactory - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Backend\Model\Auth\Session $authSession + * @param \Magento\User\Model\Resource\User\CollectionFactory $userCollectionFactory + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Backend\Model\Auth\Session $authSession, - \Magento\User\Model\Resource\User\CollectionFactory $userCollectionFactory, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Backend\Model\Auth\Session $authSession, + \Magento\User\Model\Resource\User\CollectionFactory $userCollectionFactory, + array $data = array() + ) { // _userCollectionFactory is used in parent::__construct $this->_userCollectionFactory = $userCollectionFactory; - parent::__construct($coreData, $context, $authSession, $data); + parent::__construct($context, $coreData, $authSession, $data); } protected function _construct() diff --git a/app/code/Magento/User/Block/User.php b/app/code/Magento/User/Block/User.php index da64ea7a1a2e6b47d87e4cc51e7b15b4358a9ff1..487dd734bd69a72ab2ac0437e64e4cba84b8530f 100644 --- a/app/code/Magento/User/Block/User.php +++ b/app/code/Magento/User/Block/User.php @@ -40,19 +40,19 @@ class User extends \Magento\Backend\Block\Widget\Grid\Container */ protected $_resourceModel; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\User\Model\Resource\User $resourceModel - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\User\Model\Resource\User $resourceModel + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\User\Model\Resource\User $resourceModel, - array $data = array() - ) { - parent::__construct($coreData, $context, $data); + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\User\Model\Resource\User $resourceModel, + array $data = array() + ) { + parent::__construct($context, $coreData, $data); $this->_resourceModel = $resourceModel; } diff --git a/app/code/Magento/User/Block/User/Edit.php b/app/code/Magento/User/Block/User/Edit.php index c449fc6fbbcf4ee7f0fcf80a6aa4b4fd30c8789e..d86ccca1e51e260e1b3a7f61f8431fe24b5ef128 100644 --- a/app/code/Magento/User/Block/User/Edit.php +++ b/app/code/Magento/User/Block/User/Edit.php @@ -42,20 +42,20 @@ class Edit extends \Magento\Backend\Block\Widget\Form\Container */ protected $_coreRegistry = null; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } protected function _construct() diff --git a/app/code/Magento/User/Block/User/Edit/Tab/Main.php b/app/code/Magento/User/Block/User/Edit/Tab/Main.php index 8d13d2014d9bcd3ff5fc396273649d9666c56015..6d772e05bed43a6c3f02c2af784c8cc285119a1c 100644 --- a/app/code/Magento/User/Block/User/Edit/Tab/Main.php +++ b/app/code/Magento/User/Block/User/Edit/Tab/Main.php @@ -36,36 +36,24 @@ class Main extends \Magento\Backend\Block\Widget\Form\Generic */ protected $_authSession; - /** - * Locale model - * - * @var \Magento\Core\Model\LocaleInterface + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Backend\Model\Auth\Session $authSession + * @param array $data */ - protected $_locale; - - /** - * Construct - * - * @param \Magento\Backend\Model\Auth\Session $authSession - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\LocaleInterface $locale - * @param array $data - */ - public function __construct( - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Backend\Model\Auth\Session $authSession, - \Magento\Core\Model\LocaleInterface $locale, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Backend\Model\Auth\Session $authSession, + array $data = array() + ) { $this->_authSession = $authSession; - $this->_locale = $locale; - parent::__construct($registry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); } /** diff --git a/app/code/Magento/User/Block/User/Edit/Tab/Roles.php b/app/code/Magento/User/Block/User/Edit/Tab/Roles.php index 260ce99727f4e52f567be843cd58662422e954d5..f9c44c6e275d8ae6f149868b3f37a171a303c248 100644 --- a/app/code/Magento/User/Block/User/Edit/Tab/Roles.php +++ b/app/code/Magento/User/Block/User/Edit/Tab/Roles.php @@ -41,27 +41,25 @@ class Roles extends \Magento\Backend\Block\Widget\Grid\Extended */ protected $_userRolesFactory; - /** - * @param \Magento\User\Model\Resource\Role\CollectionFactory $userRolesFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Url $urlModel - * @param \Magento\Core\Model\Registry $coreRegistry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\User\Model\Resource\Role\CollectionFactory $userRolesFactory + * @param \Magento\Core\Model\Registry $coreRegistry + * @param array $data */ - public function __construct( - \Magento\User\Model\Resource\Role\CollectionFactory $userRolesFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Url $urlModel, - \Magento\Core\Model\Registry $coreRegistry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Url $urlModel, + \Magento\User\Model\Resource\Role\CollectionFactory $userRolesFactory, + \Magento\Core\Model\Registry $coreRegistry, + array $data = array() + ) { $this->_userRolesFactory = $userRolesFactory; $this->_coreRegistry = $coreRegistry; - parent::__construct($coreData, $context, $storeManager, $urlModel, $data); + parent::__construct($context, $coreData, $urlModel, $data); } protected function _construct() diff --git a/app/code/Magento/User/Controller/Adminhtml/Auth.php b/app/code/Magento/User/Controller/Adminhtml/Auth.php index 428ac09fa8612fae64ad73b2a4aa6ad4cfecf9f3..ae09cfe0f19ba319c7081d1d11a572631cf6f243 100644 --- a/app/code/Magento/User/Controller/Adminhtml/Auth.php +++ b/app/code/Magento/User/Controller/Adminhtml/Auth.php @@ -27,7 +27,7 @@ */ namespace Magento\User\Controller\Adminhtml; -class Auth extends \Magento\Backend\Controller\AbstractAction +class Auth extends \Magento\Backend\App\AbstractAction { /** * User model factory @@ -39,11 +39,11 @@ class Auth extends \Magento\Backend\Controller\AbstractAction /** * Construct * - * @param \Magento\Backend\Controller\Context $context + * @param \Magento\Backend\App\Action\Context $context * @param \Magento\User\Model\UserFactory $userFactory */ public function __construct( - \Magento\Backend\Controller\Context $context, + \Magento\Backend\App\Action\Context $context, \Magento\User\Model\UserFactory $userFactory ) { parent::__construct($context); @@ -94,8 +94,8 @@ class Auth extends \Magento\Backend\Controller\AbstractAction } elseif (!empty($params)) { $this->_getSession()->addError(__('The email address is empty.')); } - $this->loadLayout(); - $this->renderLayout(); + $this->_view->loadLayout(); + $this->_view->renderLayout(); } /** @@ -110,15 +110,15 @@ class Auth extends \Magento\Backend\Controller\AbstractAction try { $this->_validateResetPasswordLinkToken($userId, $passwordResetToken); - $this->loadLayout(); + $this->_view->loadLayout(); - $content = $this->getLayout()->getBlock('content'); + $content = $this->_view->getLayout()->getBlock('content'); if ($content) { $content->setData('user_id', $userId) ->setData('reset_password_link_token', $passwordResetToken); } - $this->renderLayout(); + $this->_view->renderLayout(); } catch (\Exception $exception) { $this->_getSession()->addError( __('Your password reset link has expired.') diff --git a/app/code/Magento/User/Controller/Adminhtml/User.php b/app/code/Magento/User/Controller/Adminhtml/User.php index 3f115c06bbab6f5ccfddffe25b443657faf0262e..fda0386ed790821c6511d5cb3be60e9a840ce821 100644 --- a/app/code/Magento/User/Controller/Adminhtml/User.php +++ b/app/code/Magento/User/Controller/Adminhtml/User.php @@ -23,7 +23,7 @@ */ namespace Magento\User\Controller\Adminhtml; -class User extends \Magento\Backend\Controller\AbstractAction +class User extends \Magento\Backend\App\AbstractAction { /** * Core registry @@ -40,14 +40,12 @@ class User extends \Magento\Backend\Controller\AbstractAction protected $_userFactory; /** - * Construct - * - * @param \Magento\Backend\Controller\Context $context + * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Core\Model\Registry $coreRegistry * @param \Magento\User\Model\UserFactory $userFactory */ public function __construct( - \Magento\Backend\Controller\Context $context, + \Magento\Backend\App\Action\Context $context, \Magento\Core\Model\Registry $coreRegistry, \Magento\User\Model\UserFactory $userFactory ) { @@ -58,8 +56,8 @@ class User extends \Magento\Backend\Controller\AbstractAction protected function _initAction() { - $this->loadLayout() - ->_setActiveMenu('Magento_User::system_acl_users') + $this->_view->loadLayout(); + $this->_setActiveMenu('Magento_User::system_acl_users') ->_addBreadcrumb(__('System'), __('System')) ->_addBreadcrumb(__('Permissions'), __('Permissions')) ->_addBreadcrumb(__('Users'), __('Users')) @@ -69,9 +67,9 @@ class User extends \Magento\Backend\Controller\AbstractAction public function indexAction() { - $this->_title(__('Users')); + $this->_title->add(__('Users')); $this->_initAction(); - $this->renderLayout(); + $this->_view->renderLayout(); } public function newAction() @@ -81,7 +79,7 @@ class User extends \Magento\Backend\Controller\AbstractAction public function editAction() { - $this->_title(__('Users')); + $this->_title->add(__('Users')); $userId = $this->getRequest()->getParam('user_id'); /** @var \Magento\User\Model\User $model */ @@ -98,7 +96,7 @@ class User extends \Magento\Backend\Controller\AbstractAction $model->setInterfaceLocale(\Magento\Core\Model\LocaleInterface::DEFAULT_LOCALE); } - $this->_title($model->getId() ? $model->getName() : __('New User')); + $this->_title->add($model->getId() ? $model->getName() : __('New User')); // Restore previously entered form data from session $data = $this->_session->getUserData(true); @@ -114,7 +112,7 @@ class User extends \Magento\Backend\Controller\AbstractAction $breadcrumb = __('New User'); } $this->_initAction()->_addBreadcrumb($breadcrumb, $breadcrumb); - $this->renderLayout(); + $this->_view->renderLayout(); } public function saveAction() @@ -216,14 +214,14 @@ class User extends \Magento\Backend\Controller\AbstractAction $model->load($userId); } $this->_coreRegistry->register('permissions_user', $model); - $this->loadLayout(); - $this->renderLayout(); + $this->_view->loadLayout(); + $this->_view->renderLayout(); } public function roleGridAction() { - $this->loadLayout(false); - $this->renderLayout(); + $this->_view->loadLayout(false); + $this->_view->renderLayout(); } protected function _isAllowed() diff --git a/app/code/Magento/User/Controller/Adminhtml/User/Role.php b/app/code/Magento/User/Controller/Adminhtml/User/Role.php index c564ef2868f483c82afa9cb7c2cafbaa587fdbbc..513459cf01c9ade5944017b5c4c97e981315007b 100644 --- a/app/code/Magento/User/Controller/Adminhtml/User/Role.php +++ b/app/code/Magento/User/Controller/Adminhtml/User/Role.php @@ -27,7 +27,7 @@ */ namespace Magento\User\Controller\Adminhtml\User; -class Role extends \Magento\Backend\Controller\AbstractAction +class Role extends \Magento\Backend\App\AbstractAction { /** @@ -66,9 +66,7 @@ class Role extends \Magento\Backend\Controller\AbstractAction protected $_authSession; /** - * Construct - * - * @param \Magento\Backend\Controller\Context $context + * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Core\Model\Registry $coreRegistry * @param \Magento\User\Model\RoleFactory $roleFactory * @param \Magento\User\Model\UserFactory $userFactory @@ -76,7 +74,7 @@ class Role extends \Magento\Backend\Controller\AbstractAction * @param \Magento\Backend\Model\Auth\Session $authSession */ public function __construct( - \Magento\Backend\Controller\Context $context, + \Magento\Backend\App\Action\Context $context, \Magento\Core\Model\Registry $coreRegistry, \Magento\User\Model\RoleFactory $roleFactory, \Magento\User\Model\UserFactory $userFactory, @@ -98,7 +96,7 @@ class Role extends \Magento\Backend\Controller\AbstractAction */ protected function _initAction() { - $this->loadLayout(); + $this->_view->loadLayout(); $this->_setActiveMenu('Magento_User::system_acl_roles'); $this->_addBreadcrumb(__('System'), __('System')); $this->_addBreadcrumb(__('Permissions'), __('Permissions')); @@ -114,7 +112,7 @@ class Role extends \Magento\Backend\Controller\AbstractAction */ protected function _initRole($requestVariable = 'rid') { - $this->_title(__('Roles')); + $this->_title->add(__('Roles')); $role = $this->_roleFactory->create()->load($this->getRequest()->getParam($requestVariable)); // preventing edit of relation role @@ -132,11 +130,11 @@ class Role extends \Magento\Backend\Controller\AbstractAction */ public function indexAction() { - $this->_title(__('Roles')); + $this->_title->add(__('Roles')); $this->_initAction(); - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -145,8 +143,8 @@ class Role extends \Magento\Backend\Controller\AbstractAction */ public function roleGridAction() { - $this->loadLayout(false); - $this->renderLayout(); + $this->_view->loadLayout(false); + $this->_view->renderLayout(); } /** @@ -166,16 +164,16 @@ class Role extends \Magento\Backend\Controller\AbstractAction $breadCrumbTitle = __('Add New Role'); } - $this->_title($role->getId() ? $role->getRoleName() : __('New Role')); + $this->_title->add($role->getId() ? $role->getRoleName() : __('New Role')); $this->_addBreadcrumb($breadCrumb, $breadCrumbTitle); - $this->getLayout()->getBlock('head')->setCanLoadExtJs(true); - $this->getLayout()->getBlock('adminhtml.user.role.buttons') + $this->_view->getLayout()->getBlock('head')->setCanLoadExtJs(true); + $this->_view->getLayout()->getBlock('adminhtml.user.role.buttons') ->setRoleId($role->getId()) ->setRoleInfo($role); - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -283,8 +281,8 @@ class Role extends \Magento\Backend\Controller\AbstractAction */ public function editrolegridAction() { - $this->loadLayout(); - $this->renderLayout(); + $this->_view->loadLayout(); + $this->_view->renderLayout(); } /** diff --git a/app/code/Magento/User/Helper/Data.php b/app/code/Magento/User/Helper/Data.php index b5df4417d5b7bf9fad1a172a7a97d098cbd2c94e..8c8cb7a768f55e8f72ac3336179cc3f921da77bc 100644 --- a/app/code/Magento/User/Helper/Data.php +++ b/app/code/Magento/User/Helper/Data.php @@ -33,7 +33,7 @@ */ namespace Magento\User\Helper; -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { /** * Configuration path to expiration period of reset password link @@ -52,12 +52,12 @@ class Data extends \Magento\Core\Helper\AbstractHelper protected $mathRandom; /** - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\Config $coreConfig * @param \Magento\Math\Random $mathRandom */ public function __construct( - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Core\Model\Config $coreConfig, \Magento\Math\Random $mathRandom ) { diff --git a/app/code/Magento/User/Model/User.php b/app/code/Magento/User/Model/User.php index 67afa0368fc51a8f4b34e97b9697c6ebe1d6280b..74c6062aca71e90e109942f2c37088102a0b3f00 100644 --- a/app/code/Magento/User/Model/User.php +++ b/app/code/Magento/User/Model/User.php @@ -98,11 +98,11 @@ class User /** * Mail handler * - * @var \Magento\Core\Model\Email\Template\Mailer + * @var \Magento\Email\Model\Template\Mailer */ protected $_mailer; - /** @var \Magento\Core\Model\Sender */ + /** @var \Magento\Email\Model\Sender */ protected $_sender; /** @@ -112,13 +112,6 @@ class User */ protected $_userData = null; - /** - * Core event manager proxy - * - * @var \Magento\Event\ManagerInterface - */ - protected $_eventManager = null; - /** * Core store config * @@ -143,7 +136,7 @@ class User /** * Factory for email info model * - * @var \Magento\Core\Model\Email\InfoFactory + * @var \Magento\Email\Model\InfoFactory */ protected $_emailInfoFactory; @@ -160,14 +153,13 @@ class User /** * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Event\ManagerInterface $eventManager * @param \Magento\User\Helper\Data $userData - * @param \Magento\Core\Model\Sender $sender + * @param \Magento\Email\Model\Sender $sender * @param \Magento\Core\Model\Store\Config $coreStoreConfig * @param \Magento\Validator\Composite\VarienObjectFactory $validatorCompositeFactory * @param \Magento\User\Model\RoleFactory $roleFactory - * @param \Magento\Core\Model\Email\InfoFactory $emailInfoFactory - * @param \Magento\Core\Model\Email\Template\MailerFactory $mailerFactory + * @param \Magento\Email\Model\InfoFactory $emailInfoFactory + * @param \Magento\Email\Model\Template\MailerFactory $mailerFactory * @param \Magento\Encryption\EncryptorInterface $encryptor * @param \Magento\Stdlib\DateTime $dateTime * @param \Magento\Core\Model\Resource\AbstractResource $resource @@ -179,14 +171,13 @@ class User public function __construct( \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, - \Magento\Event\ManagerInterface $eventManager, \Magento\User\Helper\Data $userData, - \Magento\Core\Model\Sender $sender, + \Magento\Email\Model\Sender $sender, \Magento\Core\Model\Store\Config $coreStoreConfig, \Magento\Validator\Composite\VarienObjectFactory $validatorCompositeFactory, \Magento\User\Model\RoleFactory $roleFactory, - \Magento\Core\Model\Email\InfoFactory $emailInfoFactory, - \Magento\Core\Model\Email\Template\MailerFactory $mailerFactory, + \Magento\Email\Model\InfoFactory $emailInfoFactory, + \Magento\Email\Model\Template\MailerFactory $mailerFactory, \Magento\Encryption\EncryptorInterface $encryptor, \Magento\Stdlib\DateTime $dateTime, \Magento\Core\Model\Resource\AbstractResource $resource = null, @@ -196,7 +187,6 @@ class User $this->_encryptor = $encryptor; $this->dateTime = $dateTime; parent::__construct($context, $registry, $resource, $resourceCollection, $data); - $this->_eventManager = $eventManager; $this->_userData = $userData; $this->_sender = $sender; $this->_coreStoreConfig = $coreStoreConfig; @@ -235,14 +225,14 @@ class User parent::__wakeup(); $objectManager = \Magento\App\ObjectManager::getInstance(); $this->_eventManager = $objectManager->get('Magento\Event\ManagerInterface'); - $this->_sender = $objectManager->get('Magento\Core\Model\Sender'); + $this->_sender = $objectManager->get('Magento\Email\Model\Sender'); $this->_userData = $objectManager->get('Magento\User\Helper\Data'); $this->_coreStoreConfig = $objectManager->get('Magento\Core\Model\Store\Config'); $this->_coreRegistry = $objectManager->get('Magento\Core\Model\Registry'); $this->_validatorComposite = $objectManager->get('Magento\Validator\Composite\VarienObjectFactory'); $this->_roleFactory = $objectManager->get('Magento\User\Model\RoleFactory'); - $this->_emailInfoFactory = $objectManager->get('Magento\Core\Model\Email\InfoFactory'); - $this->_mailer = $objectManager->get('Magento\Core\Model\Email\Template\MailerFactory'); + $this->_emailInfoFactory = $objectManager->get('Magento\Email\Model\InfoFactory'); + $this->_mailer = $objectManager->get('Magento\Email\Model\Template\MailerFactory'); $this->_encryptor = $objectManager->get('Magento\Encryption\EncryptorInterface'); } @@ -449,10 +439,10 @@ class User /** * Set custom mail handler * - * @param \Magento\Core\Model\Email\Template\Mailer $mailer + * @param \Magento\Email\Model\Template\Mailer $mailer * @return \Magento\User\Model\User */ - public function setMailer(\Magento\Core\Model\Email\Template\Mailer $mailer) + public function setMailer(\Magento\Email\Model\Template\Mailer $mailer) { $this->_mailer = $mailer; return $this; @@ -465,7 +455,7 @@ class User */ public function sendPasswordResetConfirmationEmail() { - /** @var \Magento\Core\Model\Email\Info $emailInfo */ + /** @var \Magento\Email\Model\Info $emailInfo */ $emailInfo = $this->_emailInfoFactory->create(); $emailInfo->addTo($this->getEmail(), $this->getName()); $this->_mailer->addEmailInfo($emailInfo); diff --git a/app/code/Magento/User/data/user_setup/data-upgrade-1.6.1.1-1.6.1.2.php b/app/code/Magento/User/data/user_setup/data-upgrade-1.6.1.1-1.6.1.2.php index f6e979b4f71fe27c6f321fbf2ebb8d7edd597c55..a2defe5263eebc13b7fc75c2cddf332c64dcc4ea 100644 --- a/app/code/Magento/User/data/user_setup/data-upgrade-1.6.1.1-1.6.1.2.php +++ b/app/code/Magento/User/data/user_setup/data-upgrade-1.6.1.1-1.6.1.2.php @@ -53,7 +53,7 @@ $map = array( 'admin/dashboard' => 'Magento_Adminhtml::dashboard', 'admin/system/design' => 'Magento_Adminhtml::design', 'admin/system/config/dev' => 'Magento_Adminhtml::dev', - 'admin/system/email_template' => 'Magento_Adminhtml::email_template', + 'admin/system/email_template' => 'Magento_Email::template', 'admin/system/extensions' => 'Magento_Adminhtml::extensions', 'admin/global_search' => 'Magento_Adminhtml::global_search', 'admin/system/convert/gui' => 'Magento_Adminhtml::gui', diff --git a/app/code/Magento/User/view/adminhtml/admin/forgotpassword.phtml b/app/code/Magento/User/view/adminhtml/admin/forgotpassword.phtml index f934635221cd474fe7ea392a9b5160c5f57d814d..85307bd6f95da23b382c9dc482f466a24b225e83 100644 --- a/app/code/Magento/User/view/adminhtml/admin/forgotpassword.phtml +++ b/app/code/Magento/User/view/adminhtml/admin/forgotpassword.phtml @@ -37,9 +37,8 @@ <link rel="stylesheet" href="<?php echo $this->getViewFileUrl('mui/base.css') ?>" media="all" /> <link rel="stylesheet" href="<?php echo $this->getViewFileUrl('mui/elements.css') ?>" media="all" /> <link rel="stylesheet" href="<?php echo $this->getViewFileUrl('mui/form.css') ?>" media="all" /> - <link rel="stylesheet" href="<?php echo $this->getViewFileUrl('css/admin.css') ?>" media="all" /> + <link rel="stylesheet" href="<?php echo $this->getViewFileUrl('css/styles.css') ?>" media="all" /> <link rel="stylesheet" href="<?php echo $this->getViewFileUrl('mui/utils.css') ?>" media="all" /> - <link rel="stylesheet" href="<?php echo $this->getViewFileUrl('css/debug.css') ?>" media="all" /> <script src="<?php echo $this->getViewFileUrl('jquery/jquery.js') ?>"></script> <script src="<?php echo $this->getViewFileUrl('mage/jquery-no-conflict.js') ?>"></script> diff --git a/app/code/Magento/User/view/adminhtml/admin/resetforgottenpassword.phtml b/app/code/Magento/User/view/adminhtml/admin/resetforgottenpassword.phtml index 2c3e3f0b64f8f77a76fe84a126c135f258bf44ca..ab77e50eb53b45fd828accf971f87298ad3c62d6 100644 --- a/app/code/Magento/User/view/adminhtml/admin/resetforgottenpassword.phtml +++ b/app/code/Magento/User/view/adminhtml/admin/resetforgottenpassword.phtml @@ -36,9 +36,8 @@ <link rel="stylesheet" href="<?php echo $this->getViewFileUrl('mui/base.css') ?>" media="all" /> <link rel="stylesheet" href="<?php echo $this->getViewFileUrl('mui/elements.css') ?>" media="all" /> <link rel="stylesheet" href="<?php echo $this->getViewFileUrl('mui/form.css') ?>" media="all" /> - <link rel="stylesheet" href="<?php echo $this->getViewFileUrl('css/admin.css') ?>" media="all" /> + <link rel="stylesheet" href="<?php echo $this->getViewFileUrl('css/styles.css') ?>" media="all" /> <link rel="stylesheet" href="<?php echo $this->getViewFileUrl('mui/utils.css') ?>" media="all" /> - <link rel="stylesheet" href="<?php echo $this->getViewFileUrl('css/debug.css') ?>" media="all" /> <script src="<?php echo $this->getViewFileUrl('jquery/jquery.js') ?>"></script> <script src="<?php echo $this->getViewFileUrl('mage/jquery-no-conflict.js') ?>"></script> diff --git a/app/code/Magento/Webapi/Block/Adminhtml/Role/Edit/Tab/Resource.php b/app/code/Magento/Webapi/Block/Adminhtml/Role/Edit/Tab/Resource.php index 42355307862ee7aaf6390504a2ba176967518bb6..11018a016d5a34df19bb4b8677794cee76eec3da 100644 --- a/app/code/Magento/Webapi/Block/Adminhtml/Role/Edit/Tab/Resource.php +++ b/app/code/Magento/Webapi/Block/Adminhtml/Role/Edit/Tab/Resource.php @@ -64,23 +64,23 @@ class Resource extends \Magento\Backend\Block\Widget\Form */ protected $_rootResource; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Acl\Resource\ProviderInterface $resourceProvider - * @param \Magento\Webapi\Model\Resource\Acl\Rule $ruleResource - * @param \Magento\Core\Model\Acl\RootResource $rootResource - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Acl\Resource\ProviderInterface $resourceProvider + * @param \Magento\Webapi\Model\Resource\Acl\Rule $ruleResource + * @param \Magento\Core\Model\Acl\RootResource $rootResource + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Acl\Resource\ProviderInterface $resourceProvider, - \Magento\Webapi\Model\Resource\Acl\Rule $ruleResource, - \Magento\Core\Model\Acl\RootResource $rootResource, - array $data = array() - ) { - parent::__construct($coreData, $context, $data); + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Acl\Resource\ProviderInterface $resourceProvider, + \Magento\Webapi\Model\Resource\Acl\Rule $ruleResource, + \Magento\Core\Model\Acl\RootResource $rootResource, + array $data = array() + ) { + parent::__construct($context, $coreData, $data); $this->_resourceProvider = $resourceProvider; $this->_ruleResource = $ruleResource; $this->_rootResource = $rootResource; diff --git a/app/code/Magento/Webapi/Block/Adminhtml/Role/Edit/Tabs.php b/app/code/Magento/Webapi/Block/Adminhtml/Role/Edit/Tabs.php index 02762bd6e62456eebf659ee2b6bb561a369c861e..fef002d182f44981a745827eb358357aa510600f 100644 --- a/app/code/Magento/Webapi/Block/Adminhtml/Role/Edit/Tabs.php +++ b/app/code/Magento/Webapi/Block/Adminhtml/Role/Edit/Tabs.php @@ -45,7 +45,7 @@ class Tabs extends \Magento\Backend\Block\Widget\Tabs /** * Prepare child blocks. * - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ protected function _beforeToHtml() { diff --git a/app/code/Magento/Webapi/Block/Adminhtml/User/Edit/Tabs.php b/app/code/Magento/Webapi/Block/Adminhtml/User/Edit/Tabs.php index 5f8b7128625e727c638e04033261d5db607245de..3a27190242520c614a61cd18256ee3bf803c2295 100644 --- a/app/code/Magento/Webapi/Block/Adminhtml/User/Edit/Tabs.php +++ b/app/code/Magento/Webapi/Block/Adminhtml/User/Edit/Tabs.php @@ -45,7 +45,7 @@ class Tabs extends \Magento\Backend\Block\Widget\Tabs /** * Before to HTML. * - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ protected function _beforeToHtml() { diff --git a/app/code/Magento/Webapi/Controller/Adminhtml/Webapi/Role.php b/app/code/Magento/Webapi/Controller/Adminhtml/Webapi/Role.php index 3069b905741554e16a164ab53947880ddd15ef20..dab630543d10423043c75f12f2888d72126077d3 100644 --- a/app/code/Magento/Webapi/Controller/Adminhtml/Webapi/Role.php +++ b/app/code/Magento/Webapi/Controller/Adminhtml/Webapi/Role.php @@ -25,7 +25,7 @@ */ namespace Magento\Webapi\Controller\Adminhtml\Webapi; -class Role extends \Magento\Backend\Controller\Adminhtml\Action +class Role extends \Magento\Backend\App\Action { /** * @var \Magento\Core\Model\Validator\Factory @@ -33,17 +33,15 @@ class Role extends \Magento\Backend\Controller\Adminhtml\Action protected $_validatorFactory; /** - * Initialize dependencies. - * - * @param \Magento\Backend\Controller\Context $context + * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Core\Model\Validator\Factory $validatorFactory */ public function __construct( - \Magento\Backend\Controller\Context $context, + \Magento\Backend\App\Action\Context $context, \Magento\Core\Model\Validator\Factory $validatorFactory ) { - parent::__construct($context); $this->_validatorFactory = $validatorFactory; + parent::__construct($context); } /** @@ -53,7 +51,7 @@ class Role extends \Magento\Backend\Controller\Adminhtml\Action */ protected function _initAction() { - $this->loadLayout(); + $this->_view->loadLayout(); $this->_setActiveMenu('Magento_Webapi::system_api_webapi_roles'); $this->_addBreadcrumb( __('Web Api'), @@ -71,9 +69,9 @@ class Role extends \Magento\Backend\Controller\Adminhtml\Action */ public function indexAction() { - $this->_title(__('API Roles')); + $this->_title->add(__('API Roles')); $this->_initAction(); - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -81,8 +79,8 @@ class Role extends \Magento\Backend\Controller\Adminhtml\Action */ public function rolegridAction() { - $this->loadLayout(false); - $this->renderLayout(); + $this->_view->loadLayout(false); + $this->_view->renderLayout(); } /** @@ -90,8 +88,8 @@ class Role extends \Magento\Backend\Controller\Adminhtml\Action */ public function usersgridAction() { - $this->loadLayout(false); - $this->renderLayout(); + $this->_view->loadLayout(false); + $this->_view->renderLayout(); } /** @@ -100,7 +98,7 @@ class Role extends \Magento\Backend\Controller\Adminhtml\Action public function editAction() { $this->_initAction(); - $this->_title(__('API Roles')); + $this->_title->add(__('API Roles')); $roleId = $this->getRequest()->getParam('role_id'); @@ -119,13 +117,13 @@ class Role extends \Magento\Backend\Controller\Adminhtml\Action __('Edit API Role'), __('Edit API Role') ); - $this->_title(__('Edit API Role')); + $this->_title->add(__('Edit API Role')); } else { $this->_addBreadcrumb( __('Add New API Role'), __('Add New API Role') ); - $this->_title(__('New API Role')); + $this->_title->add(__('New API Role')); } // Restore previously entered form data from session @@ -135,18 +133,18 @@ class Role extends \Magento\Backend\Controller\Adminhtml\Action } /** @var \Magento\Webapi\Block\Adminhtml\Role\Edit $editBlock */ - $editBlock = $this->getLayout()->getBlock('webapi.role.edit'); + $editBlock = $this->_view->getLayout()->getBlock('webapi.role.edit'); if ($editBlock) { $editBlock->setApiRole($role); } /** @var \Magento\Webapi\Block\Adminhtml\Role\Edit\Tabs $tabsBlock */ - $tabsBlock = $this->getLayout()->getBlock('webapi.role.edit.tabs'); + $tabsBlock = $this->_view->getLayout()->getBlock('webapi.role.edit.tabs'); if ($tabsBlock) { $tabsBlock->setApiRole($role); } - $this->renderLayout(); + $this->_view->renderLayout(); } /** diff --git a/app/code/Magento/Webapi/Controller/Adminhtml/Webapi/User.php b/app/code/Magento/Webapi/Controller/Adminhtml/Webapi/User.php index b492bac3412bffe3eaa19293d29798a969bd1943..73f27d6810073ebcec5913071364c15a73806adf 100644 --- a/app/code/Magento/Webapi/Controller/Adminhtml/Webapi/User.php +++ b/app/code/Magento/Webapi/Controller/Adminhtml/Webapi/User.php @@ -25,7 +25,7 @@ */ namespace Magento\Webapi\Controller\Adminhtml\Webapi; -class User extends \Magento\Backend\Controller\AbstractAction +class User extends \Magento\Backend\App\AbstractAction { /** * @var \Magento\Core\Model\Validator\Factory @@ -33,17 +33,15 @@ class User extends \Magento\Backend\Controller\AbstractAction protected $_validatorFactory; /** - * Initialize dependencies. - * - * @param \Magento\Backend\Controller\Context $context + * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Core\Model\Validator\Factory $validatorFactory */ public function __construct( - \Magento\Backend\Controller\Context $context, + \Magento\Backend\App\Action\Context $context, \Magento\Core\Model\Validator\Factory $validatorFactory ) { - parent::__construct($context); $this->_validatorFactory = $validatorFactory; + parent::__construct($context); } /** @@ -53,8 +51,8 @@ class User extends \Magento\Backend\Controller\AbstractAction */ protected function _initAction() { - $this->loadLayout() - ->_setActiveMenu('Magento_Webapi::system_api_webapi_users') + $this->_view->loadLayout(); + $this->_setActiveMenu('Magento_Webapi::system_api_webapi_users') ->_addBreadcrumb( __('Web Services'), __('Web Services') @@ -73,9 +71,9 @@ class User extends \Magento\Backend\Controller\AbstractAction public function indexAction() { $this->_initAction(); - $this->_title(__('API Users')); + $this->_title->add(__('API Users')); - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -93,7 +91,7 @@ class User extends \Magento\Backend\Controller\AbstractAction public function editAction() { $this->_initAction(); - $this->_title(__('API Users')); + $this->_title->add(__('API Users')); $userId = (int)$this->getRequest()->getParam('user_id'); $user = $this->_loadApiUser($userId); @@ -105,7 +103,7 @@ class User extends \Magento\Backend\Controller\AbstractAction $actionTitle = $user->getId() ? $this->_objectManager->get('Magento\Escaper')->escapeHtml($user->getApiKey()) : __('New API User'); - $this->_title($actionTitle); + $this->_title->add($actionTitle); $this->_addBreadcrumb($actionTitle, $actionTitle); // Restore previously entered form data from session. @@ -115,17 +113,17 @@ class User extends \Magento\Backend\Controller\AbstractAction } /** @var \Magento\Webapi\Block\Adminhtml\User\Edit $editBlock */ - $editBlock = $this->getLayout()->getBlock('webapi.user.edit'); + $editBlock = $this->_view->getLayout()->getBlock('webapi.user.edit'); if ($editBlock) { $editBlock->setApiUser($user); } /** @var \Magento\Webapi\Block\Adminhtml\User\Edit\Tabs $tabsBlock */ - $tabsBlock = $this->getLayout()->getBlock('webapi.user.edit.tabs'); + $tabsBlock = $this->_view->getLayout()->getBlock('webapi.user.edit.tabs'); if ($tabsBlock) { $tabsBlock->setApiUser($user); } - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -208,8 +206,8 @@ class User extends \Magento\Backend\Controller\AbstractAction */ public function gridAction() { - $this->loadLayout(false); - $this->renderLayout(); + $this->_view->loadLayout(false); + $this->_view->renderLayout(); } /** @@ -217,8 +215,8 @@ class User extends \Magento\Backend\Controller\AbstractAction */ public function rolesgridAction() { - $this->loadLayout(false); - $this->renderLayout(); + $this->_view->loadLayout(false); + $this->_view->renderLayout(); } /** diff --git a/app/code/Magento/Webapi/Helper/Data.php b/app/code/Magento/Webapi/Helper/Data.php index 0c587bf37765be11f213e9d73c4880f3f728e651..bfbc2bab766c7ad01267eebae3ec0da285cf4744 100644 --- a/app/code/Magento/Webapi/Helper/Data.php +++ b/app/code/Magento/Webapi/Helper/Data.php @@ -23,7 +23,7 @@ */ namespace Magento\Webapi\Helper; -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { } diff --git a/app/code/Magento/Webapi/view/adminhtml/layout/adminhtml_webapi_role_edit.xml b/app/code/Magento/Webapi/view/adminhtml/layout/adminhtml_webapi_role_edit.xml index 94f4b7bd44a4df53624dbe67919fa7f9628fef41..b19839996537dbf07cf4b2d8585a639c4bf9ceb1 100644 --- a/app/code/Magento/Webapi/view/adminhtml/layout/adminhtml_webapi_role_edit.xml +++ b/app/code/Magento/Webapi/view/adminhtml/layout/adminhtml_webapi_role_edit.xml @@ -41,6 +41,6 @@ </action> </referenceBlock> <referenceContainer name="js"> - <block class="Magento\Core\Block\Template" template="Magento_Webapi::rolesusersgridjs.phtml"/> + <block class="Magento\View\Block\Template" template="Magento_Webapi::rolesusersgridjs.phtml"/> </referenceContainer> </layout> diff --git a/app/code/Magento/Webapi/view/adminhtml/rolesusersgridjs.phtml b/app/code/Magento/Webapi/view/adminhtml/rolesusersgridjs.phtml index 6d0d306e6d8371c320c22ecfb60ebbaaf2c8dff8..8207b80348c071251b29d14b7da89644509b8620 100644 --- a/app/code/Magento/Webapi/view/adminhtml/rolesusersgridjs.phtml +++ b/app/code/Magento/Webapi/view/adminhtml/rolesusersgridjs.phtml @@ -23,7 +23,7 @@ * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * - * @var \Magento\Core\Block\Template $this + * @var \Magento\View\Block\Template $this */ ?> <?php $usersGridBlock = $this->getLayout()->getBlock('webapi.role.edit.tab.users.grid'); ?> diff --git a/app/code/Magento/Webhook/Block/Adminhtml/Registration/Activate.php b/app/code/Magento/Webhook/Block/Adminhtml/Registration/Activate.php index c25e37daab9f2b386235f8c1a906a0bdbc91a936..72580132e8810f1cb8704d8fcb3a607a57fb3e1e 100644 --- a/app/code/Magento/Webhook/Block/Adminhtml/Registration/Activate.php +++ b/app/code/Magento/Webhook/Block/Adminhtml/Registration/Activate.php @@ -40,19 +40,19 @@ class Activate extends \Magento\Backend\Block\Template /** @var array */ protected $_subscriptionData; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { - parent::__construct($coreData, $context, $data); + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { + parent::__construct($context, $coreData, $data); $this->_subscriptionData = $registry->registry(self::REGISTRY_KEY_CURRENT_SUBSCRIPTION); } diff --git a/app/code/Magento/Webhook/Block/Adminhtml/Registration/Create/Form/Container.php b/app/code/Magento/Webhook/Block/Adminhtml/Registration/Create/Form/Container.php index f0689022d3241dea8d91639cd5afaaf9b74b3b63..ebfc1ffb0a2ff6975e3f46dbde3cd2cff2af5044 100644 --- a/app/code/Magento/Webhook/Block/Adminhtml/Registration/Create/Form/Container.php +++ b/app/code/Magento/Webhook/Block/Adminhtml/Registration/Create/Form/Container.php @@ -39,19 +39,19 @@ class Container extends \Magento\Backend\Block\Template /** @var array */ protected $_subscriptionData; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { - parent::__construct($coreData, $context, $data); + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { + parent::__construct($context, $coreData, $data); $this->_subscriptionData = $registry->registry(self::REGISTRY_KEY_CURRENT_SUBSCRIPTION);; } diff --git a/app/code/Magento/Webhook/Block/Adminhtml/Registration/Failed.php b/app/code/Magento/Webhook/Block/Adminhtml/Registration/Failed.php index 9b682a23e426328294b37b92d57dc222997c7d46..7e0bbb610a88c0805d144fb2e8f310654dbffba2 100644 --- a/app/code/Magento/Webhook/Block/Adminhtml/Registration/Failed.php +++ b/app/code/Magento/Webhook/Block/Adminhtml/Registration/Failed.php @@ -29,25 +29,6 @@ namespace Magento\Webhook\Block\Adminhtml\Registration; class Failed extends \Magento\Backend\Block\Template { - /** @var \Magento\Backend\Model\Session */ - protected $_session; - - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Model\Session $session - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data - */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Model\Session $session, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { - parent::__construct($coreData, $context, $data); - $this->_session = $session; - } - /** * Get error message produced on failure * @@ -55,8 +36,7 @@ class Failed extends \Magento\Backend\Block\Template */ public function getSessionError() { - return $this->_session->getMessages(true) - ->getLastAddedMessage() - ->toString(); + $lastAdded = $this->_backendSession->getMessages(true)->getLastAddedMessage(); + return $lastAdded ? $lastAdded->toString() : null; } } diff --git a/app/code/Magento/Webhook/Block/Adminhtml/Subscription/Edit.php b/app/code/Magento/Webhook/Block/Adminhtml/Subscription/Edit.php index 72e597790afa49b999804e2659aa4796a044dcd9..0ace3ac27362d65787ae7f2a5cf1e56904509c96 100644 --- a/app/code/Magento/Webhook/Block/Adminhtml/Subscription/Edit.php +++ b/app/code/Magento/Webhook/Block/Adminhtml/Subscription/Edit.php @@ -38,19 +38,19 @@ class Edit extends \Magento\Backend\Block\Widget\Form\Container /** @var array $_subscriptionData */ protected $_subscriptionData; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { - parent::__construct($coreData, $context, $data); + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { + parent::__construct($context, $coreData, $data); $this->_objectId = 'id'; $this->_blockGroup = 'Magento_Webhook'; diff --git a/app/code/Magento/Webhook/Block/Adminhtml/Subscription/Edit/Form.php b/app/code/Magento/Webhook/Block/Adminhtml/Subscription/Edit/Form.php index e34c6b81fd8c5a2fb5faccca5dc5a004e417c647..19dbf98d2d48d8962abca8dd96b718ff4c7562c1 100644 --- a/app/code/Magento/Webhook/Block/Adminhtml/Subscription/Edit/Form.php +++ b/app/code/Magento/Webhook/Block/Adminhtml/Subscription/Edit/Form.php @@ -49,27 +49,27 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic /** @var \Magento\Webhook\Model\Source\Hook $_hook */ protected $_hook; - /** - * @param \Magento\Webhook\Model\Source\Format $format - * @param \Magento\Webhook\Model\Source\Authentication $authentication - * @param \Magento\Webhook\Model\Source\Hook $hook - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Webhook\Model\Source\Format $format + * @param \Magento\Webhook\Model\Source\Authentication $authentication + * @param \Magento\Webhook\Model\Source\Hook $hook + * @param array $data */ - public function __construct( - \Magento\Webhook\Model\Source\Format $format, - \Magento\Webhook\Model\Source\Authentication $authentication, - \Magento\Webhook\Model\Source\Hook $hook, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { - parent::__construct($registry, $formFactory, $coreData, $context, $data); + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Webhook\Model\Source\Format $format, + \Magento\Webhook\Model\Source\Authentication $authentication, + \Magento\Webhook\Model\Source\Hook $hook, + array $data = array() + ) { + parent::__construct($context, $coreData, $registry, $formFactory, $data); $this->_formFactory = $formFactory; $this->_registry = $registry; $this->_format = $format; diff --git a/app/code/Magento/Webhook/Controller/Adminhtml/Webhook/Registration.php b/app/code/Magento/Webhook/Controller/Adminhtml/Webhook/Registration.php index bf74d87b938606d13aa08966832cf62b4e2756ca..436a8cddb5891191e05e43265cef0142402b31ef 100644 --- a/app/code/Magento/Webhook/Controller/Adminhtml/Webhook/Registration.php +++ b/app/code/Magento/Webhook/Controller/Adminhtml/Webhook/Registration.php @@ -29,7 +29,7 @@ namespace Magento\Webhook\Controller\Adminhtml\Webhook; * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ -class Registration extends \Magento\Backend\Controller\AbstractAction +class Registration extends \Magento\Backend\App\AbstractAction { const DATA_SUBSCRIPTION_ID = 'subscription_id'; const DATA_TOPICS = 'topics'; @@ -54,18 +54,17 @@ class Registration extends \Magento\Backend\Controller\AbstractAction /** @var \Magento\Webhook\Model\Webapi\User\Factory */ private $_userFactory; - /** + * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Webhook\Model\Webapi\User\Factory $userFactory * @param \Magento\Webhook\Service\SubscriptionV1Interface $subscriptionService * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Backend\Controller\Context $context */ public function __construct( + \Magento\Backend\App\Action\Context $context, \Magento\Webhook\Model\Webapi\User\Factory $userFactory, \Magento\Webhook\Service\SubscriptionV1Interface $subscriptionService, - \Magento\Core\Model\Registry $registry, - \Magento\Backend\Controller\Context $context + \Magento\Core\Model\Registry $registry ) { parent::__construct($context); $this->_userFactory = $userFactory; @@ -81,8 +80,8 @@ class Registration extends \Magento\Backend\Controller\AbstractAction { try { $this->_initSubscription(); - $this->loadLayout(); - $this->renderLayout(); + $this->_view->loadLayout(); + $this->_view->renderLayout(); } catch (\Magento\Core\Exception $e) { $this->_redirectFailed($e->getMessage()); } @@ -114,8 +113,8 @@ class Registration extends \Magento\Backend\Controller\AbstractAction { try { $this->_initSubscription(); - $this->loadLayout(); - $this->renderLayout(); + $this->_view->loadLayout(); + $this->_view->renderLayout(); } catch (\Magento\Core\Exception $e) { $this->_redirectFailed($e->getMessage()); } @@ -176,8 +175,8 @@ class Registration extends \Magento\Backend\Controller\AbstractAction public function succeededAction() { try { - $this->loadLayout(); - $this->renderLayout(); + $this->_view->loadLayout(); + $this->_view->renderLayout(); $subscriptionData = $this->_initSubscription(); $this->_getSession()->addSuccess( @@ -194,8 +193,8 @@ class Registration extends \Magento\Backend\Controller\AbstractAction */ public function failedAction() { - $this->loadLayout(); - $this->renderLayout(); + $this->_view->loadLayout(); + $this->_view->renderLayout(); } /** diff --git a/app/code/Magento/Webhook/Controller/Adminhtml/Webhook/Subscription.php b/app/code/Magento/Webhook/Controller/Adminhtml/Webhook/Subscription.php index 8a108ca04352ece796de3e556be02725009fd11a..e3afc24564330731afefb82794a3f888ef71a730 100644 --- a/app/code/Magento/Webhook/Controller/Adminhtml/Webhook/Subscription.php +++ b/app/code/Magento/Webhook/Controller/Adminhtml/Webhook/Subscription.php @@ -28,7 +28,7 @@ namespace Magento\Webhook\Controller\Adminhtml\Webhook; * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ -class Subscription extends \Magento\Backend\Controller\AbstractAction +class Subscription extends \Magento\Backend\App\AbstractAction { /** Param Key for extracting subscription id from Request */ const PARAM_SUBSCRIPTION_ID = 'id'; @@ -54,19 +54,16 @@ class Subscription extends \Magento\Backend\Controller\AbstractAction private $_subscriptionService; /** - * Class constructor - * + * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Core\Model\Registry $registry * @param \Magento\Webhook\Service\SubscriptionV1Interface $subscriptionService - * @param \Magento\Backend\Controller\Context $context */ public function __construct( + \Magento\Backend\App\Action\Context $context, \Magento\Core\Model\Registry $registry, - \Magento\Webhook\Service\SubscriptionV1Interface $subscriptionService, - \Magento\Backend\Controller\Context $context + \Magento\Webhook\Service\SubscriptionV1Interface $subscriptionService ) { parent::__construct($context); - $this->_registry = $registry; $this->_subscriptionService = $subscriptionService; } @@ -76,13 +73,13 @@ class Subscription extends \Magento\Backend\Controller\AbstractAction */ public function indexAction() { - $this->loadLayout() - ->_setActiveMenu('Magento_Webhook::system_api_webapi_webhook') - ->_title(__('System')) - ->_title(__('Web Services')) - ->_title(__('WebHook Subscriptions')); + $this->_view->loadLayout(); + $this->_setActiveMenu('Magento_Webhook::system_api_webapi_webhook'); + $this->_title->add(__('System')); + $this->_title->add(__('Web Services')); + $this->_title->add(__('WebHook Subscriptions')); - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -110,18 +107,18 @@ class Subscription extends \Magento\Backend\Controller\AbstractAction $this->_registry->register(self::REGISTRY_KEY_CURRENT_SUBSCRIPTION, $subscriptionData); } - $this->loadLayout() - ->_setActiveMenu('Magento_Webapi::system_webapi') - ->_title(__('System')) - ->_title(__('Web Services')) - ->_title(__('WebHook Subscriptions')); + $this->_view->loadLayout(); + $this->_setActiveMenu('Magento_Webapi::system_webapi'); + $this->_title->add(__('System')); + $this->_title->add(__('Web Services')); + $this->_title->add(__('WebHook Subscriptions')); if ($this->_registry->registry(self::REGISTRY_KEY_WEBHOOK_ACTION) === self::ACTION_NEW) { - $this->_title(__('Add Subscription')); + $this->_title->add(__('Add Subscription')); } else { - $this->_title(__('Edit Subscription')); + $this->_title->add(__('Edit Subscription')); } - $this->renderLayout(); + $this->_view->renderLayout(); } catch (\Magento\Core\Exception $e) { $this->_getSession()->addError($e->getMessage()); $this->_redirect('adminhtml/*/'); diff --git a/app/code/Magento/Webhook/Helper/Data.php b/app/code/Magento/Webhook/Helper/Data.php index 88b324c830287c3719921e3a45949ff94b2e7d5b..7e4241d29cdf45f70a94a1dfe6b2b5cc50df3b62 100644 --- a/app/code/Magento/Webhook/Helper/Data.php +++ b/app/code/Magento/Webhook/Helper/Data.php @@ -29,6 +29,6 @@ */ namespace Magento\Webhook\Helper; -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { } diff --git a/app/code/Magento/Weee/Block/Renderer/Weee/Tax.php b/app/code/Magento/Weee/Block/Renderer/Weee/Tax.php index 3b523dca538e91ba85c3921e966cfce087cd5c4d..1fbf1565c8b1ad6983a3d781089b8c5d93e57b9a 100644 --- a/app/code/Magento/Weee/Block/Renderer/Weee/Tax.php +++ b/app/code/Magento/Weee/Block/Renderer/Weee/Tax.php @@ -49,11 +49,6 @@ class Tax */ protected $_coreRegistry = null; - /** - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - /** * @var \Magento\Directory\Model\Config\Source\Country */ @@ -65,28 +60,25 @@ class Tax protected $_directoryHelper; /** - * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Directory\Model\Config\Source\Country $sourceCountry * @param \Magento\Directory\Helper\Data $directoryHelper - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context * @param \Magento\Core\Model\Registry $registry * @param array $data */ public function __construct( - \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Directory\Model\Config\Source\Country $sourceCountry, \Magento\Directory\Helper\Data $directoryHelper, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, \Magento\Core\Model\Registry $registry, array $data = array() ) { - $this->_storeManager = $storeManager; $this->_sourceCountry = $sourceCountry; $this->_directoryHelper = $directoryHelper; $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } public function getProduct() diff --git a/app/code/Magento/Weee/Helper/Data.php b/app/code/Magento/Weee/Helper/Data.php index 48861a1013511112fd26b4ea5b3294cbe382e346..910af37a16e3887551ea62a66508defef4bb8a64 100644 --- a/app/code/Magento/Weee/Helper/Data.php +++ b/app/code/Magento/Weee/Helper/Data.php @@ -33,7 +33,7 @@ */ namespace Magento\Weee\Helper; -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { const XML_PATH_FPT_ENABLED = 'tax/weee/enable'; @@ -75,7 +75,7 @@ class Data extends \Magento\Core\Helper\AbstractHelper * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Weee\Model\Tax $weeeTax * @param \Magento\Tax\Helper\Data $taxData - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\Registry $coreRegistry * @param \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig */ @@ -83,7 +83,7 @@ class Data extends \Magento\Core\Helper\AbstractHelper \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Weee\Model\Tax $weeeTax, \Magento\Tax\Helper\Data $taxData, - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Core\Model\Registry $coreRegistry, \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig ) { diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Chooser.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Chooser.php index 0b8e6212d711f6af6d5e024abb2415822047a818..ad6391b69c18a26c030005d69333d333b7e703dc 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Chooser.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Chooser.php @@ -41,20 +41,20 @@ class Chooser extends \Magento\Backend\Block\Template */ protected $_elementFactory; - /** - * @param \Magento\Data\Form\Element\Factory $elementFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Data\Form\Element\Factory $elementFactory + * @param array $data */ - public function __construct( - \Magento\Data\Form\Element\Factory $elementFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Data\Form\Element\Factory $elementFactory, + array $data = array() + ) { $this->_elementFactory = $elementFactory; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Form.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Form.php index 5914d380b1b02a6d6a91582b1052a8de01c2811e..6010890677e5b5a2c4912ea7f000f9c4e8997f05 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Form.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Form.php @@ -41,24 +41,24 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic */ protected $_widgetFactory; - /** - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Widget\Model\WidgetFactory $widgetFactory - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Widget\Model\WidgetFactory $widgetFactory + * @param array $data */ - public function __construct( - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Widget\Model\WidgetFactory $widgetFactory, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Widget\Model\WidgetFactory $widgetFactory, + array $data = array() + ) { $this->_widgetFactory = $widgetFactory; - parent::__construct($registry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); } /** diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit.php index bdf8f176ba4d2ad52ced6080bf895ea4967dc785..9356107cd9b8cc739d77eefb070fb24342202d10 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit.php @@ -42,20 +42,20 @@ class Edit extends \Magento\Adminhtml\Block\Widget\Form\Container */ protected $_coreRegistry = null; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Container.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Container.php index 6e6e1aee7033a04158e2d7279168ae1e6561e660..1af83ccfba3d59b02df042d460dc52f7e72e1a21 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Container.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Container.php @@ -34,7 +34,7 @@ */ namespace Magento\Widget\Block\Adminhtml\Widget\Instance\Edit\Chooser; -class Container extends \Magento\Core\Block\Html\Select +class Container extends \Magento\View\Block\Html\Select { /** * @var \Magento\View\Layout\ProcessorFactory @@ -47,14 +47,14 @@ class Container extends \Magento\Core\Block\Html\Select protected $_themesFactory; /** - * @param \Magento\Core\Block\Context $context + * @param \Magento\View\Block\Context $context * @param \Magento\View\Layout\ProcessorFactory $layoutProcessorFactory * @param \Magento\Core\Model\Resource\Theme\CollectionFactory $themesFactory * @param array $data */ public function __construct( - \Magento\Core\Block\Context $context, + \Magento\View\Block\Context $context, \Magento\View\Layout\ProcessorFactory $layoutProcessorFactory, \Magento\Core\Model\Resource\Theme\CollectionFactory $themesFactory, array $data = array() @@ -78,7 +78,7 @@ class Container extends \Magento\Core\Block\Html\Select /** * Add necessary options * - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ protected function _beforeToHtml() { diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/DesignAbstraction.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/DesignAbstraction.php index b9f93409d72bd44e1769265c0417a408f1f70c1e..bef7ba3202a84105927f9441f1a048808794bcf9 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/DesignAbstraction.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/DesignAbstraction.php @@ -32,7 +32,7 @@ namespace Magento\Widget\Block\Adminhtml\Widget\Instance\Edit\Chooser; * @method getArea() * @method getTheme() */ -class DesignAbstraction extends \Magento\Core\Block\Html\Select +class DesignAbstraction extends \Magento\View\Block\Html\Select { /** * @var \Magento\View\Layout\ProcessorFactory @@ -50,14 +50,14 @@ class DesignAbstraction extends \Magento\Core\Block\Html\Select protected $_appState; /** - * @param \Magento\Core\Block\Context $context + * @param \Magento\View\Block\Context $context * @param \Magento\View\Layout\ProcessorFactory $layoutProcessorFactory * @param \Magento\Core\Model\Resource\Theme\CollectionFactory $themesFactory * @param \Magento\App\State $appState * @param array $data */ public function __construct( - \Magento\Core\Block\Context $context, + \Magento\View\Block\Context $context, \Magento\View\Layout\ProcessorFactory $layoutProcessorFactory, \Magento\Core\Model\Resource\Theme\CollectionFactory $themesFactory, \Magento\App\State $appState, @@ -72,7 +72,7 @@ class DesignAbstraction extends \Magento\Core\Block\Html\Select /** * Add necessary options * - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ protected function _beforeToHtml() { diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Layout.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Layout.php index f8be6127628eec359e603b9009483f1eac255956..93cef5b4c0c18b3555abf497db4d31eb728d6fe4 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Layout.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Layout.php @@ -32,7 +32,7 @@ namespace Magento\Widget\Block\Adminhtml\Widget\Instance\Edit\Chooser; * @method getArea() * @method getTheme() */ -class Layout extends \Magento\Core\Block\Html\Select +class Layout extends \Magento\View\Block\Html\Select { /** * @var \Magento\Core\Model\Layout\PageType\Config @@ -40,12 +40,12 @@ class Layout extends \Magento\Core\Block\Html\Select protected $_config; /** - * @param \Magento\Core\Block\Context $context + * @param \Magento\View\Block\Context $context * @param \Magento\Core\Model\Layout\PageType\Config $config * @param array $data */ public function __construct( - \Magento\Core\Block\Context $context, + \Magento\View\Block\Context $context, \Magento\Core\Model\Layout\PageType\Config $config, array $data = array() ) { @@ -56,7 +56,7 @@ class Layout extends \Magento\Core\Block\Html\Select /** * Add necessary options * - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ protected function _beforeToHtml() { diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Template.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Template.php index adfdc0b12fb090e03a264819166fb559498e5ac1..9c8c9c07be5d2e2e6917ea5ca7451f445880b7a9 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Template.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Template.php @@ -50,7 +50,7 @@ class Template $html = '<input type="hidden" name="template" value="' . $widgetTemplate['value'] . '" />'; $html .= $widgetTemplate['label']; } else { - $html = $this->getLayout()->createBlock('Magento\Core\Block\Html\Select') + $html = $this->getLayout()->createBlock('Magento\View\Block\Html\Select') ->setName('template') ->setClass('select') ->setOptions($this->getWidgetTemplates()) diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main.php index c80a427e4928afbc01cad2920d58d20c6658778e..d3fd95318f60aa2e339f1c256d9ff04ddb52d271 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main.php @@ -37,13 +37,6 @@ class Main extends \Magento\Backend\Block\Widget\Form\Generic implements \Magento\Backend\Block\Widget\Tab\TabInterface { - /** - * Store list manager - * - * @var \Magento\Core\Model\StoreManagerInterface - */ - protected $_storeManager; - /** * @var \Magento\Core\Model\System\Store */ @@ -55,29 +48,26 @@ class Main protected $_themeLabelFactory; /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Core\Model\Registry $registry * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\System\Store $store * @param \Magento\Core\Model\Theme\LabelFactory $themeLabelFactory * @param array $data */ public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Core\Model\Registry $registry, \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\System\Store $store, \Magento\Core\Model\Theme\LabelFactory $themeLabelFactory, array $data = array() ) { - $this->_storeManager = $storeManager; $this->_store = $store; $this->_themeLabelFactory = $themeLabelFactory; - parent::__construct($registry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); } /** diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php index 1a6ffddf0f3be41c10d8f5ca137afee40dcfdadf..3642fc7437625632dbca9f24903282ef2c51829a 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php @@ -46,20 +46,20 @@ class Layout */ protected $_productType; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Catalog\Model\Product\Type $productType - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Catalog\Model\Product\Type $productType + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Catalog\Model\Product\Type $productType, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Catalog\Model\Product\Type $productType, + array $data = array() + ) { $this->_productType = $productType; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** @@ -142,7 +142,7 @@ class Layout */ public function getDisplayOnSelectHtml() { - $selectBlock = $this->getLayout()->createBlock('Magento\Core\Block\Html\Select') + $selectBlock = $this->getLayout()->createBlock('Magento\View\Block\Html\Select') ->setName('widget_instance[{{id}}][page_group]') ->setId('widget_instance[{{id}}][page_group]') ->setClass('required-entry page_group_select select') diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Settings.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Settings.php index 6dca42608e3e9751581946fb3e546818851fe40a..e0e25c717354cd109d71aa5f190c2d1114f77544 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Settings.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Settings.php @@ -49,24 +49,24 @@ class Settings */ protected $_themeLabelFactory; - /** - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Model\Theme\LabelFactory $themeLabelFactory - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Core\Model\Theme\LabelFactory $themeLabelFactory + * @param array $data */ - public function __construct( - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Model\Theme\LabelFactory $themeLabelFactory, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Core\Model\Theme\LabelFactory $themeLabelFactory, + array $data = array() + ) { $this->_themeLabelFactory = $themeLabelFactory; - parent::__construct($registry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); } protected function _construct() diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Options.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Options.php index 1df1752a411495261b58235b8653847716ea2baf..522462d4879edac410f9e139fdfc6f349ce21acd 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Options.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Options.php @@ -53,27 +53,27 @@ class Options extends \Magento\Backend\Block\Widget\Form\Generic */ protected $_sourceModelPool; - /** - * @param \Magento\Core\Model\Option\ArrayPool $sourceModelPool - * @param \Magento\Widget\Model\Widget $widget - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Block\Template\Context $context - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Core\Model\Option\ArrayPool $sourceModelPool + * @param \Magento\Widget\Model\Widget $widget + * @param array $data */ - public function __construct( - \Magento\Core\Model\Option\ArrayPool $sourceModelPool, - \Magento\Widget\Model\Widget $widget, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Block\Template\Context $context, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Core\Model\Option\ArrayPool $sourceModelPool, + \Magento\Widget\Model\Widget $widget, + array $data = array() + ) { $this->_sourceModelPool = $sourceModelPool; $this->_widget = $widget; - parent::__construct($registry, $formFactory, $coreData, $context, $data); + parent::__construct($context, $coreData, $registry, $formFactory, $data); } /** diff --git a/app/code/Magento/Widget/Controller/Adminhtml/Widget.php b/app/code/Magento/Widget/Controller/Adminhtml/Widget.php index 32e4f6d16fde7e8445e59b9a6d22331863e90412..25ee6f5f48e696dcea94d801e576aece1dd1d0f0 100644 --- a/app/code/Magento/Widget/Controller/Adminhtml/Widget.php +++ b/app/code/Magento/Widget/Controller/Adminhtml/Widget.php @@ -33,7 +33,9 @@ */ namespace Magento\Widget\Controller\Adminhtml; -class Widget extends \Magento\Backend\Controller\Adminhtml\Action +use Magento\Backend\App\Action; + +class Widget extends \Magento\Backend\App\Action { /** * Core registry @@ -53,15 +55,15 @@ class Widget extends \Magento\Backend\Controller\Adminhtml\Action protected $_widget; /** + * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Widget\Model\Widget\Config $widgetConfig * @param \Magento\Widget\Model\Widget $widget - * @param \Magento\Backend\Controller\Context $context * @param \Magento\Core\Model\Registry $coreRegistry */ public function __construct( + \Magento\Backend\App\Action\Context $context, \Magento\Widget\Model\Widget\Config $widgetConfig, \Magento\Widget\Model\Widget $widget, - \Magento\Backend\Controller\Context $context, \Magento\Core\Model\Registry $coreRegistry ) { $this->_widgetConfig = $widgetConfig; @@ -81,7 +83,7 @@ class Widget extends \Magento\Backend\Controller\Adminhtml\Action $this->_coreRegistry->register('skip_widgets', $skipped); - $this->loadLayout('empty')->renderLayout(); + $this->_view->loadLayout('empty')->renderLayout(); } /** @@ -90,11 +92,11 @@ class Widget extends \Magento\Backend\Controller\Adminhtml\Action public function loadOptionsAction() { try { - $this->loadLayout('empty'); + $this->_view->loadLayout('empty'); if ($paramsJson = $this->getRequest()->getParam('widget')) { $request = $this->_objectManager->get('Magento\Core\Helper\Data')->jsonDecode($paramsJson); if (is_array($request)) { - $optionsBlock = $this->getLayout()->getBlock('wysiwyg_widget.options'); + $optionsBlock = $this->_view->getLayout()->getBlock('wysiwyg_widget.options'); if (isset($request['widget_type'])) { $optionsBlock->setWidgetType($request['widget_type']); } @@ -102,7 +104,7 @@ class Widget extends \Magento\Backend\Controller\Adminhtml\Action $optionsBlock->setWidgetValues($request['values']); } } - $this->renderLayout(); + $this->_view->renderLayout(); } } catch (\Magento\Core\Exception $e) { $result = array('error' => true, 'message' => $e->getMessage()); diff --git a/app/code/Magento/Widget/Controller/Adminhtml/Widget/Instance.php b/app/code/Magento/Widget/Controller/Adminhtml/Widget/Instance.php index 8eff3d9bbdc173530800aaf22e9b55415152d8bc..428755b839108500b70a301581ec2d403491676a 100644 --- a/app/code/Magento/Widget/Controller/Adminhtml/Widget/Instance.php +++ b/app/code/Magento/Widget/Controller/Adminhtml/Widget/Instance.php @@ -29,7 +29,7 @@ */ namespace Magento\Widget\Controller\Adminhtml\Widget; -class Instance extends \Magento\Backend\Controller\Adminhtml\Action +class Instance extends \Magento\Backend\App\Action { /** * Core registry @@ -54,19 +54,27 @@ class Instance extends \Magento\Backend\Controller\Adminhtml\Action protected $mathRandom; /** - * @param \Magento\Backend\Controller\Context $context + * @var \Magento\Core\Model\Translate + */ + protected $_translator; + + /** + * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Core\Model\Registry $coreRegistry * @param \Magento\Widget\Model\Widget\InstanceFactory $widgetFactory * @param \Magento\Logger $logger * @param \Magento\Math\Random $mathRandom + * @param \Magento\Core\Model\Translate $translator */ public function __construct( - \Magento\Backend\Controller\Context $context, + \Magento\Backend\App\Action\Context $context, \Magento\Core\Model\Registry $coreRegistry, \Magento\Widget\Model\Widget\InstanceFactory $widgetFactory, \Magento\Logger $logger, - \Magento\Math\Random $mathRandom + \Magento\Math\Random $mathRandom, + \Magento\Core\Model\Translate $translator ) { + $this->_translator = $translator; $this->_coreRegistry = $coreRegistry; $this->_widgetFactory = $widgetFactory; $this->_logger = $logger; @@ -81,8 +89,8 @@ class Instance extends \Magento\Backend\Controller\Adminhtml\Action */ protected function _initAction() { - $this->loadLayout() - ->_setActiveMenu('Magento_Widget::cms_widget_instance') + $this->_view->loadLayout(); + $this->_setActiveMenu('Magento_Widget::cms_widget_instance') ->_addBreadcrumb(__('CMS'), __('CMS')) ->_addBreadcrumb(__('Manage Widget Instances'), @@ -97,7 +105,7 @@ class Instance extends \Magento\Backend\Controller\Adminhtml\Action */ protected function _initWidgetInstance() { - $this->_title(__('Frontend Apps')); + $this->_title->add(__('Frontend Apps')); /** @var $widgetInstance \Magento\Widget\Model\Widget\Instance */ $widgetInstance = $this->_widgetFactory->create(); @@ -134,10 +142,10 @@ class Instance extends \Magento\Backend\Controller\Adminhtml\Action */ public function indexAction() { - $this->_title(__('Frontend Apps')); + $this->_title->add(__('Frontend Apps')); - $this->_initAction() - ->renderLayout(); + $this->_initAction(); + $this->_view->renderLayout(); } /** @@ -161,10 +169,10 @@ class Instance extends \Magento\Backend\Controller\Adminhtml\Action return; } - $this->_title($widgetInstance->getId() ? $widgetInstance->getTitle() : __('New Frontend App Instance')); + $this->_title->add($widgetInstance->getId() ? $widgetInstance->getTitle() : __('New Frontend App Instance')); $this->_initAction(); - $this->renderLayout(); + $this->_view->renderLayout(); } /** @@ -192,9 +200,9 @@ class Instance extends \Magento\Backend\Controller\Adminhtml\Action $result = $widgetInstance->validate(); if ($result !== true && is_string($result)) { $this->_getSession()->addError($result); - $this->_initLayoutMessages('Magento\Adminhtml\Model\Session'); + $this->_view->getLayout()->initMessages('Magento\Adminhtml\Model\Session'); $response->setError(true); - $response->setMessage($this->getLayout()->getMessagesBlock()->getGroupedHtml()); + $response->setMessage($this->_view->getLayout()->getMessagesBlock()->getGroupedHtml()); } $this->setBody($response->toJson()); } @@ -267,7 +275,7 @@ class Instance extends \Magento\Backend\Controller\Adminhtml\Action { $selected = $this->getRequest()->getParam('selected', ''); $isAnchorOnly = $this->getRequest()->getParam('is_anchor_only', 0); - $chooser = $this->getLayout() + $chooser = $this->_view->getLayout() ->createBlock('Magento\Catalog\Block\Adminhtml\Category\Widget\Chooser') ->setUseMassaction(true) ->setId($this->mathRandom->getUniqueHash('categories')) @@ -284,14 +292,14 @@ class Instance extends \Magento\Backend\Controller\Adminhtml\Action { $selected = $this->getRequest()->getParam('selected', ''); $productTypeId = $this->getRequest()->getParam('product_type_id', ''); - $chooser = $this->getLayout() + $chooser = $this->_view->getLayout() ->createBlock('Magento\Catalog\Block\Adminhtml\Product\Widget\Chooser') ->setName($this->mathRandom->getUniqueHash('products_grid_')) ->setUseMassaction(true) ->setProductTypeId($productTypeId) ->setSelectedProducts(explode(',', $selected)); /* @var $serializer \Magento\Adminhtml\Block\Widget\Grid\Serializer */ - $serializer = $this->getLayout()->createBlock( + $serializer = $this->_view->getLayout()->createBlock( 'Magento\Adminhtml\Block\Widget\Grid\Serializer', '', array( @@ -325,7 +333,7 @@ class Instance extends \Magento\Backend\Controller\Adminhtml\Action $widgetInstance = $this->_initWidgetInstance(); $layout = $this->getRequest()->getParam('layout'); $selected = $this->getRequest()->getParam('selected', null); - $blocksChooser = $this->getLayout() + $blocksChooser = $this->_view->getLayout() ->createBlock('Magento\Widget\Block\Adminhtml\Widget\Instance\Edit\Chooser\Container') ->setValue($selected) ->setArea($widgetInstance->getArea()) @@ -345,7 +353,7 @@ class Instance extends \Magento\Backend\Controller\Adminhtml\Action $widgetInstance = $this->_initWidgetInstance(); $block = $this->getRequest()->getParam('block'); $selected = $this->getRequest()->getParam('selected', null); - $templateChooser = $this->getLayout() + $templateChooser = $this->_view->getLayout() ->createBlock('Magento\Widget\Block\Adminhtml\Widget\Instance\Edit\Chooser\Template') ->setSelected($selected) ->setWidgetTemplates($widgetInstance->getWidgetSupportedTemplatesByContainer($block)); diff --git a/app/code/Magento/Widget/Helper/Data.php b/app/code/Magento/Widget/Helper/Data.php index 27012d0c79b64039ac1006d71d3852eb18725b51..54d973dfe1fdb40886126744b720ad69ab65bf45 100644 --- a/app/code/Magento/Widget/Helper/Data.php +++ b/app/code/Magento/Widget/Helper/Data.php @@ -33,6 +33,6 @@ */ namespace Magento\Widget\Helper; -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { } diff --git a/app/code/Magento/Widget/Model/Template/Filter.php b/app/code/Magento/Widget/Model/Template/Filter.php index 8db19daa41726f1f828be03cea2f5f6414659d3e..ee5d453d416f1020bff3a2c516bff833e7f8d1e6 100644 --- a/app/code/Magento/Widget/Model/Template/Filter.php +++ b/app/code/Magento/Widget/Model/Template/Filter.php @@ -48,7 +48,7 @@ class Filter extends \Magento\Cms\Model\Template\Filter * @param \Magento\View\Url $viewUrl * @param \Magento\Core\Model\Store\Config $coreStoreConfig * @param \Magento\Core\Model\VariableFactory $coreVariableFactory - * @param \Magento\Core\Model\StoreManager $storeManager + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\View\LayoutInterface $layout * @param \Magento\View\LayoutFactory $layoutFactory * @param \Magento\Widget\Model\Resource\Widget $widgetResource @@ -62,7 +62,7 @@ class Filter extends \Magento\Cms\Model\Template\Filter \Magento\View\Url $viewUrl, \Magento\Core\Model\Store\Config $coreStoreConfig, \Magento\Core\Model\VariableFactory $coreVariableFactory, - \Magento\Core\Model\StoreManager $storeManager, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\View\LayoutInterface $layout, \Magento\View\LayoutFactory $layoutFactory, \Magento\Widget\Model\Resource\Widget $widgetResource, diff --git a/app/code/Magento/Widget/Model/Widget/Instance.php b/app/code/Magento/Widget/Model/Widget/Instance.php index 2d0aa22e2337d4addde374e0145edc857854143e..4ebacd8f1b41fec8bb0dafa36c90590e61ae9b75 100644 --- a/app/code/Magento/Widget/Model/Widget/Instance.php +++ b/app/code/Magento/Widget/Model/Widget/Instance.php @@ -525,7 +525,7 @@ class Instance extends \Magento\Core\Model\AbstractModel $templateFilename = $this->_viewFileSystem->getFilename($templatePath, array( 'area' => $this->getArea(), 'themeId' => $this->getThemeId(), - 'module' => \Magento\Core\Block\AbstractBlock::extractModuleName($this->getType()), + 'module' => \Magento\View\Block\AbstractBlock::extractModuleName($this->getType()), )); if (!$this->getId() && !$this->isCompleteToCreate() || ($templatePath && !is_readable($templateFilename))) { return ''; diff --git a/app/code/Magento/Widget/view/adminhtml/layout/adminhtml_widget_instance_edit.xml b/app/code/Magento/Widget/view/adminhtml/layout/adminhtml_widget_instance_edit.xml index be52e15f80ebcef58d348199c24bf6a0e4e0432d..aef3b7e056b206c98f2b6ed7ed51ade60b1c34b3 100644 --- a/app/code/Magento/Widget/view/adminhtml/layout/adminhtml_widget_instance_edit.xml +++ b/app/code/Magento/Widget/view/adminhtml/layout/adminhtml_widget_instance_edit.xml @@ -48,11 +48,6 @@ <argument name="file" xsi:type="string">Magento_Core::prototype/magento.css</argument> </arguments> </block> - <block class="Magento\Page\Block\Html\Head\Css" name="magento-widget-css-styles-css"> - <arguments> - <argument name="file" xsi:type="string">Magento_Widget::css/styles.css</argument> - </arguments> - </block> </referenceBlock> <referenceContainer name="content"> <block class="Magento\Widget\Block\Adminhtml\Widget\Instance\Edit" name="widget_instance_edit"/> diff --git a/app/code/Magento/Wishlist/Block/AbstractBlock.php b/app/code/Magento/Wishlist/Block/AbstractBlock.php index 0a51ab94b1e4faf52c48c5bd580a714cee26adf6..579097edb9427be14946c4489b5ab9e750d4dd4f 100644 --- a/app/code/Magento/Wishlist/Block/AbstractBlock.php +++ b/app/code/Magento/Wishlist/Block/AbstractBlock.php @@ -82,29 +82,25 @@ abstract class AbstractBlock extends \Magento\Catalog\Block\Product\AbstractProd protected $_productFactory; /** - * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\View\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Catalog\Model\Config $catalogConfig - * @param \Magento\Core\Model\Registry $coreRegistry + * @param \Magento\Core\Model\Registry $registry * @param \Magento\Tax\Helper\Data $taxData * @param \Magento\Catalog\Helper\Data $catalogData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Math\Random $mathRandom * @param \Magento\Wishlist\Helper\Data $wishlistData * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Catalog\Model\ProductFactory $productFactory * @param array $data - * - * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( - \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\View\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Catalog\Model\Config $catalogConfig, - \Magento\Core\Model\Registry $coreRegistry, + \Magento\Core\Model\Registry $registry, \Magento\Tax\Helper\Data $taxData, \Magento\Catalog\Helper\Data $catalogData, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Math\Random $mathRandom, \Magento\Wishlist\Helper\Data $wishlistData, \Magento\Customer\Model\Session $customerSession, @@ -114,17 +110,7 @@ abstract class AbstractBlock extends \Magento\Catalog\Block\Product\AbstractProd $this->_wishlistData = $wishlistData; $this->_customerSession = $customerSession; $this->_productFactory = $productFactory; - parent::__construct( - $storeManager, - $catalogConfig, - $coreRegistry, - $taxData, - $catalogData, - $coreData, - $context, - $mathRandom, - $data - ); + parent::__construct($context, $coreData, $catalogConfig, $registry, $taxData, $catalogData, $mathRandom, $data); } /** @@ -390,7 +376,7 @@ abstract class AbstractBlock extends \Magento\Catalog\Block\Product\AbstractProd * Returns block to render item with some product type * * @param string $productType - * @return \Magento\Core\Block\Template + * @return \Magento\View\Block\Template */ protected function _getItemPriceBlock($productType) { diff --git a/app/code/Magento/Wishlist/Block/Customer/Sharing.php b/app/code/Magento/Wishlist/Block/Customer/Sharing.php index de022695db3a3338a07271fed21383fbcfe6834a..e32f00a8035dc9bc381d716cbb55d57a0b54dd7b 100644 --- a/app/code/Magento/Wishlist/Block/Customer/Sharing.php +++ b/app/code/Magento/Wishlist/Block/Customer/Sharing.php @@ -34,7 +34,7 @@ */ namespace Magento\Wishlist\Block\Customer; -class Sharing extends \Magento\Core\Block\Template +class Sharing extends \Magento\View\Block\Template { /** * Entered Data cache @@ -56,22 +56,22 @@ class Sharing extends \Magento\Core\Block\Template protected $_wishlistSession; /** + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Wishlist\Model\Config $wishlistConfig - * @param \Magento\Core\Model\Session\Generic $wishlistlSession + * @param \Magento\Core\Model\Session\Generic $wishlistSession * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Wishlist\Model\Config $wishlistConfig, - \Magento\Core\Model\Session\Generic $wishlistlSession, + \Magento\Core\Model\Session\Generic $wishlistSession, array $data = array() ) { $this->_wishlistConfig = $wishlistConfig; - $this->_wishlistSession = $wishlistlSession; - parent::__construct($coreData, $context, $data); + $this->_wishlistSession = $wishlistSession; + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Wishlist/Block/Customer/Wishlist.php b/app/code/Magento/Wishlist/Block/Customer/Wishlist.php index 0ffbbd94aec03d39b9ab9725e1f046cfe04489f6..cb1550a9af9dbc66009c72446b81e3cb370f3f9b 100644 --- a/app/code/Magento/Wishlist/Block/Customer/Wishlist.php +++ b/app/code/Magento/Wishlist/Block/Customer/Wishlist.php @@ -42,30 +42,26 @@ class Wishlist extends \Magento\Wishlist\Block\AbstractBlock protected $_helperPool; /** - * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\View\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Catalog\Model\Config $catalogConfig - * @param \Magento\Core\Model\Registry $coreRegistry + * @param \Magento\Core\Model\Registry $registry * @param \Magento\Tax\Helper\Data $taxData * @param \Magento\Catalog\Helper\Data $catalogData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Math\Random $mathRandom * @param \Magento\Wishlist\Helper\Data $wishlistData * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Catalog\Model\ProductFactory $productFactory * @param \Magento\Catalog\Helper\Product\ConfigurationPool $helperPool * @param array $data - * - * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( - \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\View\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Catalog\Model\Config $catalogConfig, - \Magento\Core\Model\Registry $coreRegistry, + \Magento\Core\Model\Registry $registry, \Magento\Tax\Helper\Data $taxData, \Magento\Catalog\Helper\Data $catalogData, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Math\Random $mathRandom, \Magento\Wishlist\Helper\Data $wishlistData, \Magento\Customer\Model\Session $customerSession, @@ -75,13 +71,12 @@ class Wishlist extends \Magento\Wishlist\Block\AbstractBlock ) { $this->_helperPool = $helperPool; parent::__construct( - $storeManager, + $context, + $coreData, $catalogConfig, - $coreRegistry, + $registry, $taxData, $catalogData, - $coreData, - $context, $mathRandom, $wishlistData, $customerSession, diff --git a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Button.php b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Button.php index a3bc3f370c9af3cada1f4ef73841b703ee68c625..302551bf31894e707b9c5e5d339deee04d5fe4e7 100644 --- a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Button.php +++ b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Button.php @@ -33,7 +33,7 @@ */ namespace Magento\Wishlist\Block\Customer\Wishlist; -class Button extends \Magento\Core\Block\Template +class Button extends \Magento\View\Block\Template { /** * Wishlist config @@ -50,22 +50,22 @@ class Button extends \Magento\Core\Block\Template protected $_wishlistData = null; /** - * @param \Magento\Wishlist\Helper\Data $wishlistData + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context + * @param \Magento\Wishlist\Helper\Data $wishlistData * @param \Magento\Wishlist\Model\Config $wishlistConfig * @param array $data */ public function __construct( - \Magento\Wishlist\Helper\Data $wishlistData, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, + \Magento\Wishlist\Helper\Data $wishlistData, \Magento\Wishlist\Model\Config $wishlistConfig, array $data = array() ) { $this->_wishlistData = $wishlistData; $this->_wishlistConfig = $wishlistConfig; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Options.php b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Options.php index 514bc462ac886318540f5f62f75961ce55805a48..4f930c5d455d69d12c091eefc390f9c1e893ea89 100644 --- a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Options.php +++ b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Options.php @@ -41,13 +41,12 @@ class Options extends \Magento\Wishlist\Block\AbstractBlock protected $_helperPool; /** - * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\View\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Catalog\Model\Config $catalogConfig - * @param \Magento\Core\Model\Registry $coreRegistry + * @param \Magento\Core\Model\Registry $registry * @param \Magento\Tax\Helper\Data $taxData * @param \Magento\Catalog\Helper\Data $catalogData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Math\Random $mathRandom * @param \Magento\Wishlist\Helper\Data $wishlistData * @param \Magento\Customer\Model\Session $customerSession @@ -56,13 +55,12 @@ class Options extends \Magento\Wishlist\Block\AbstractBlock * @param array $data */ public function __construct( - \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\View\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Catalog\Model\Config $catalogConfig, - \Magento\Core\Model\Registry $coreRegistry, + \Magento\Core\Model\Registry $registry, \Magento\Tax\Helper\Data $taxData, \Magento\Catalog\Helper\Data $catalogData, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Math\Random $mathRandom, \Magento\Wishlist\Helper\Data $wishlistData, \Magento\Customer\Model\Session $customerSession, @@ -72,13 +70,12 @@ class Options extends \Magento\Wishlist\Block\AbstractBlock ) { $this->_helperPool = $helperPool; parent::__construct( - $storeManager, + $context, + $coreData, $catalogConfig, - $coreRegistry, + $registry, $taxData, $catalogData, - $coreData, - $context, $mathRandom, $wishlistData, $customerSession, diff --git a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Items.php b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Items.php index 6293d48a4342c0bfb3cbe1a2eb66156da10a3dda..a7eedbbe2a6751dc91a776e55effd40ef83c0581 100644 --- a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Items.php +++ b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Items.php @@ -33,7 +33,7 @@ */ namespace Magento\Wishlist\Block\Customer\Wishlist; -class Items extends \Magento\Core\Block\Template +class Items extends \Magento\View\Block\Template { /** * Retreive table column object list diff --git a/app/code/Magento/Wishlist/Block/Item/Configure.php b/app/code/Magento/Wishlist/Block/Item/Configure.php index 36a0bf8b0088653e7c357764c163e9ebaa3947a2..3562deab31b55d8dd2552b03ca34dbd9faf3d14d 100644 --- a/app/code/Magento/Wishlist/Block/Item/Configure.php +++ b/app/code/Magento/Wishlist/Block/Item/Configure.php @@ -34,7 +34,7 @@ */ namespace Magento\Wishlist\Block\Item; -class Configure extends \Magento\Core\Block\Template +class Configure extends \Magento\View\Block\Template { /** * Wishlist data @@ -51,22 +51,22 @@ class Configure extends \Magento\Core\Block\Template protected $_coreRegistry = null; /** - * @param \Magento\Wishlist\Helper\Data $wishlistData + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context + * @param \Magento\Wishlist\Helper\Data $wishlistData * @param \Magento\Core\Model\Registry $registry * @param array $data */ public function __construct( - \Magento\Wishlist\Helper\Data $wishlistData, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, + \Magento\Wishlist\Helper\Data $wishlistData, \Magento\Core\Model\Registry $registry, array $data = array() ) { $this->_wishlistData = $wishlistData; $this->_coreRegistry = $registry; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } /** diff --git a/app/code/Magento/Wishlist/Block/Render/Item/Price.php b/app/code/Magento/Wishlist/Block/Render/Item/Price.php index 6fefadcb0089e83e959919bb010a85602ca2469c..511814fb9c9d818385e0d26bbab7d67a19da0da4 100644 --- a/app/code/Magento/Wishlist/Block/Render/Item/Price.php +++ b/app/code/Magento/Wishlist/Block/Render/Item/Price.php @@ -33,7 +33,7 @@ */ namespace Magento\Wishlist\Block\Render\Item; -class Price extends \Magento\Core\Block\Template +class Price extends \Magento\View\Block\Template { /** * Returns html for rendering non-configured product diff --git a/app/code/Magento/Wishlist/Block/Share/Email/Rss.php b/app/code/Magento/Wishlist/Block/Share/Email/Rss.php index f5c55cf78b47e04db3da509721420545ccbc30be..a27d74e79feb56e0924f927d92a431a111e3a268 100644 --- a/app/code/Magento/Wishlist/Block/Share/Email/Rss.php +++ b/app/code/Magento/Wishlist/Block/Share/Email/Rss.php @@ -34,7 +34,7 @@ */ namespace Magento\Wishlist\Block\Share\Email; -class Rss extends \Magento\Core\Block\Template +class Rss extends \Magento\View\Block\Template { protected $_template = 'email/rss.phtml'; diff --git a/app/code/Magento/Wishlist/Block/Share/Wishlist.php b/app/code/Magento/Wishlist/Block/Share/Wishlist.php index f692b972451526c5eff553384558d95629b8b9e3..8675bd1f62fcee20e3596a780789d2fd88cd8046 100644 --- a/app/code/Magento/Wishlist/Block/Share/Wishlist.php +++ b/app/code/Magento/Wishlist/Block/Share/Wishlist.php @@ -49,13 +49,12 @@ class Wishlist extends \Magento\Wishlist\Block\AbstractBlock protected $_customerFactory; /** - * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\View\Block\Template\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Catalog\Model\Config $catalogConfig - * @param \Magento\Core\Model\Registry $coreRegistry + * @param \Magento\Core\Model\Registry $registry * @param \Magento\Tax\Helper\Data $taxData * @param \Magento\Catalog\Helper\Data $catalogData - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param \Magento\Math\Random $mathRandom * @param \Magento\Wishlist\Helper\Data $wishlistData * @param \Magento\Customer\Model\Session $customerSession @@ -64,13 +63,12 @@ class Wishlist extends \Magento\Wishlist\Block\AbstractBlock * @param array $data */ public function __construct( - \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\View\Block\Template\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Catalog\Model\Config $catalogConfig, - \Magento\Core\Model\Registry $coreRegistry, + \Magento\Core\Model\Registry $registry, \Magento\Tax\Helper\Data $taxData, \Magento\Catalog\Helper\Data $catalogData, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, \Magento\Math\Random $mathRandom, \Magento\Wishlist\Helper\Data $wishlistData, \Magento\Customer\Model\Session $customerSession, @@ -80,13 +78,12 @@ class Wishlist extends \Magento\Wishlist\Block\AbstractBlock ) { $this->_customerFactory = $customerFactory; parent::__construct( - $storeManager, + $context, + $coreData, $catalogConfig, - $coreRegistry, + $registry, $taxData, $catalogData, - $coreData, - $context, $mathRandom, $wishlistData, $customerSession, diff --git a/app/code/Magento/Wishlist/Controller/AbstractController.php b/app/code/Magento/Wishlist/Controller/AbstractController.php index d1bcd71eea91c34f8804757535ce4d38d7205435..e75b74065ca7e8f7cf050ff8cecd9964f90870c5 100644 --- a/app/code/Magento/Wishlist/Controller/AbstractController.php +++ b/app/code/Magento/Wishlist/Controller/AbstractController.php @@ -34,7 +34,7 @@ */ namespace Magento\Wishlist\Controller; -abstract class AbstractController extends \Magento\Core\Controller\Front\Action +abstract class AbstractController extends \Magento\App\Action\Action { /** * Filter to convert localized values to internal ones @@ -77,7 +77,7 @@ abstract class AbstractController extends \Magento\Core\Controller\Front\Action { $wishlist = $this->_getWishlist(); if (!$wishlist) { - $this->_forward('noRoute'); + $this->_forward('noroute'); return ; } $isOwner = $wishlist->isOwner($this->_objectManager->get('Magento\Customer\Model\Session')->getCustomerId()); @@ -133,8 +133,8 @@ abstract class AbstractController extends \Magento\Core\Controller\Front\Action } if ($this->_objectManager->get('Magento\Checkout\Helper\Cart')->getShouldRedirectToCart()) { $redirectUrl = $this->_objectManager->get('Magento\Checkout\Helper\Cart')->getCartUrl(); - } else if ($this->_getRefererUrl()) { - $redirectUrl = $this->_getRefererUrl(); + } else if ($this->_redirect->getRefererUrl()) { + $redirectUrl = $this->_redirect->getRefererUrl(); } else { $redirectUrl = $indexUrl; } @@ -197,6 +197,6 @@ abstract class AbstractController extends \Magento\Core\Controller\Front\Action $this->_objectManager->get('Magento\Wishlist\Helper\Data')->calculate(); - $this->_redirectUrl($redirectUrl); + $this->getResponse()->setRedirect($redirectUrl); } } diff --git a/app/code/Magento/Wishlist/Controller/Index.php b/app/code/Magento/Wishlist/Controller/Index.php index 172143ebe20f9984f825ca6dc751cf4557598585..55d8ad606030248eda81b4ecf041721b3713e4ff 100644 --- a/app/code/Magento/Wishlist/Controller/Index.php +++ b/app/code/Magento/Wishlist/Controller/Index.php @@ -34,21 +34,22 @@ */ namespace Magento\Wishlist\Controller; +use Magento\App\Action\NotFoundException; +use Magento\App\RequestInterface; + class Index extends \Magento\Wishlist\Controller\AbstractController implements \Magento\Catalog\Controller\Product\View\ViewInterface { /** - * @var \Magento\Wishlist\Model\Config + * @var \Magento\App\Response\Http\FileFactory */ - protected $_wishlistConfig; + protected $_fileResponseFactory; /** - * Action list where need check enabled cookie - * - * @var array + * @var \Magento\Wishlist\Model\Config */ - protected $_cookieCheckActions = array('add'); + protected $_wishlistConfig; /** * If true, authentication in this controller (wishlist) could be skipped @@ -65,46 +66,54 @@ class Index protected $_coreRegistry; /** - * @var \Magento\Core\Model\Url + * @var \Magento\Core\App\Action\FormKeyValidator */ - protected $_url; + protected $_formKeyValidator; /** - * @param \Magento\Core\Controller\Varien\Action\Context $context + * @param \Magento\App\Action\Context $context * @param \Magento\Core\Model\Registry $coreRegistry * @param \Magento\Wishlist\Model\Config $wishlistConfig - * @param \Magento\Core\Model\Url $url + * @param \Magento\App\Response\Http\FileFactory $fileResponseFactory + * @param \Magento\Core\App\Action\FormKeyValidator $formKeyValidator */ public function __construct( - \Magento\Core\Controller\Varien\Action\Context $context, + \Magento\App\Action\Context $context, \Magento\Core\Model\Registry $coreRegistry, \Magento\Wishlist\Model\Config $wishlistConfig, - \Magento\Core\Model\Url $url + \Magento\App\Response\Http\FileFactory $fileResponseFactory, + \Magento\Core\App\Action\FormKeyValidator $formKeyValidator ) { $this->_coreRegistry = $coreRegistry; $this->_wishlistConfig = $wishlistConfig; - $this->_url = $url; + $this->_fileResponseFactory = $fileResponseFactory; + $this->_formKeyValidator = $formKeyValidator; parent::__construct($context); } - public function preDispatch() + /** + * Dispatch request + * + * @param RequestInterface $request + * @return mixed + * @throws \Magento\App\Action\NotFoundException + */ + public function dispatch(RequestInterface $request) { - parent::preDispatch(); - if (!$this->_skipAuthentication && !$this->_objectManager->get('Magento\Customer\Model\Session')->authenticate($this) ) { - $this->setFlag('', 'no-dispatch', true); + $this->_actionFlag->set('', 'no-dispatch', true); $customerSession = $this->_objectManager->get('Magento\Customer\Model\Session'); if (!$customerSession->getBeforeWishlistUrl()) { - $customerSession->setBeforeWishlistUrl($this->_getRefererUrl()); + $customerSession->setBeforeWishlistUrl($this->_redirect->getRefererUrl()); } - $customerSession->setBeforeWishlistRequest($this->getRequest()->getParams()); + $customerSession->setBeforeWishlistRequest($request->getParams()); } if (!$this->_objectManager->get('Magento\Core\Model\Store\Config')->getConfigFlag('wishlist/general/active')) { - $this->norouteAction(); - return; + throw new NotFoundException(); } + return parent::dispatch($request); } /** @@ -166,40 +175,47 @@ class Index /** * Display customer wishlist + * + * @throws NotFoundException */ public function indexAction() { if (!$this->_getWishlist()) { - return $this->norouteAction(); + throw new NotFoundException(); } - $this->loadLayout(); + $this->_view->loadLayout(); $session = $this->_objectManager->get('Magento\Customer\Model\Session'); - $block = $this->getLayout()->getBlock('customer.wishlist'); + $block = $this->_view->getLayout()->getBlock('customer.wishlist'); $referer = $session->getAddActionReferer(true); if ($block) { - $block->setRefererUrl($this->_getRefererUrl()); + $block->setRefererUrl($this->_redirect->getRefererUrl()); if ($referer) { $block->setRefererUrl($referer); } } - $this->_initLayoutMessages('Magento\Customer\Model\Session'); - $this->_initLayoutMessages('Magento\Checkout\Model\Session'); - $this->_initLayoutMessages('Magento\Catalog\Model\Session'); - $this->_initLayoutMessages('Magento\Wishlist\Model\Session'); + $messageStores = array( + 'Magento\Customer\Model\Session', + 'Magento\Checkout\Model\Session', + 'Magento\Catalog\Model\Session', + 'Magento\Wishlist\Model\Session' + ); + $this->_view->getLayout()->initMessages($messageStores); - $this->renderLayout(); + $this->_view->renderLayout(); } /** * Adding new item + * + * @throws NotFoundException */ public function addAction() { $wishlist = $this->_getWishlist(); if (!$wishlist) { - return $this->norouteAction(); + throw new NotFoundException(); } $session = $this->_objectManager->get('Magento\Customer\Model\Session'); @@ -244,7 +260,7 @@ class Index if ($referer) { $session->setBeforeWishlistUrl(null); } else { - $referer = $this->_getRefererUrl(); + $referer = $this->_redirect->getRefererUrl(); } /** @@ -270,6 +286,8 @@ class Index /** * Action to reconfigure wishlist item + * + * @throws NotFoundException */ public function configureAction() { @@ -283,7 +301,7 @@ class Index } $wishlist = $this->_getWishlist($item->getWishlistId()); if (!$wishlist) { - return $this->norouteAction(); + throw new NotFoundException(); } $this->_coreRegistry->register('wishlist_item', $item); @@ -370,15 +388,17 @@ class Index /** * Update wishlist item comments + * + * @throws NotFoundException */ public function updateAction() { - if (!$this->_validateFormKey()) { + if (!$this->_formKeyValidator->validate($this->getRequest())) { return $this->_redirect('*/*/'); } $wishlist = $this->_getWishlist(); if (!$wishlist) { - return $this->norouteAction(); + throw new NotFoundException(); } $post = $this->getRequest()->getPost(); @@ -457,17 +477,19 @@ class Index /** * Remove item + * + * @throws NotFoundException */ public function removeAction() { $id = (int) $this->getRequest()->getParam('item'); $item = $this->_objectManager->create('Magento\Wishlist\Model\Item')->load($id); if (!$item->getId()) { - return $this->norouteAction(); + throw new NotFoundException(); } $wishlist = $this->_getWishlist($item->getWishlistId()); if (!$wishlist) { - return $this->norouteAction(); + throw new NotFoundException(); } try { $item->delete(); @@ -484,7 +506,8 @@ class Index $this->_objectManager->get('Magento\Wishlist\Helper\Data')->calculate(); - $this->_redirectReferer($this->_url->getUrl('*/*')); + $url = $this->_redirect->getRedirectUrl($this->_url->getUrl('*/*')); + $this->getResponse()->setRedirect($url); } /** @@ -546,8 +569,8 @@ class Index if ($this->_objectManager->get('Magento\Checkout\Helper\Cart')->getShouldRedirectToCart()) { $redirectUrl = $this->_objectManager->get('Magento\Checkout\Helper\Cart')->getCartUrl(); - } else if ($this->_getRefererUrl()) { - $redirectUrl = $this->_getRefererUrl(); + } else if ($this->_redirect->getRefererUrl()) { + $redirectUrl = $this->_redirect->getRefererUrl(); } $this->_objectManager->get('Magento\Wishlist\Helper\Data')->calculate(); } catch (\Magento\Core\Exception $e) { @@ -566,17 +589,19 @@ class Index $this->_objectManager->get('Magento\Wishlist\Helper\Data')->calculate(); - return $this->_redirectUrl($redirectUrl); + return $this->getResponse()->setRedirect($redirectUrl); } /** * Add cart item to wishlist and remove from cart + * + * @throws NotFoundException */ public function fromcartAction() { $wishlist = $this->_getWishlist(); if (!$wishlist) { - return $this->norouteAction(); + throw new NotFoundException(); } $itemId = (int) $this->getRequest()->getParam('item'); @@ -613,7 +638,7 @@ class Index $session->addException($e, __('We can\'t move the item to the wish list.')); } - return $this->_redirectUrl($this->_objectManager->get('Magento\Checkout\Helper\Cart')->getCartUrl()); + return $this->getResponse()->setRedirect($this->_objectManager->get('Magento\Checkout\Helper\Cart')->getCartUrl()); } /** @@ -622,26 +647,26 @@ class Index public function shareAction() { $this->_getWishlist(); - $this->loadLayout(); - $this->_initLayoutMessages('Magento\Customer\Model\Session'); - $this->_initLayoutMessages('Magento\Wishlist\Model\Session'); - $this->renderLayout(); + $this->_view->loadLayout(); + $this->_view->getLayout()->initMessages(array('Magento\Customer\Model\Session', 'Magento\Wishlist\Model\Session')); + $this->_view->renderLayout(); } /** * Share wishlist * - * @return \Magento\Core\Controller\Varien\Action|void + * @return \Magento\App\Action\Action|void + * @throws NotFoundException */ public function sendAction() { - if (!$this->_validateFormKey()) { + if (!$this->_formKeyValidator->validate($this->getRequest())) { return $this->_redirect('*/*/'); } $wishlist = $this->_getWishlist(); if (!$wishlist) { - return $this->norouteAction(); + throw new NotFoundException(); } $sharingLimit = $this->_wishlistConfig->getSharingEmailLimit(); @@ -688,17 +713,17 @@ class Index /*if share rss added rss feed to email template*/ if ($this->getRequest()->getParam('rss_url')) { - $rss_url = $this->getLayout() + $rss_url = $this->_view->getLayout() ->createBlock('Magento\Wishlist\Block\Share\Email\Rss') ->setWishlistId($wishlist->getId()) ->toHtml(); $message .= $rss_url; } - $wishlistBlock = $this->getLayout()->createBlock('Magento\Wishlist\Block\Share\Email\Items')->toHtml(); + $wishlistBlock = $this->_view->getLayout()->createBlock('Magento\Wishlist\Block\Share\Email\Items')->toHtml(); $emails = array_unique($emails); - /* @var $emailModel \Magento\Core\Model\Email\Template */ - $emailModel = $this->_objectManager->create('Magento\Core\Model\Email\Template'); + /* @var $emailModel \Magento\Email\Model\Template */ + $emailModel = $this->_objectManager->create('Magento\Email\Model\Template'); $sharingCode = $wishlist->getSharingCode(); @@ -754,14 +779,14 @@ class Index ->load($this->getRequest()->getParam('id')); if (!$option->getId()) { - return $this->_forward('noRoute'); + return $this->_forward('noroute'); } $optionId = null; if (strpos($option->getCode(), \Magento\Catalog\Model\Product\Type\AbstractType::OPTION_PREFIX) === 0) { $optionId = str_replace(\Magento\Catalog\Model\Product\Type\AbstractType::OPTION_PREFIX, '', $option->getCode()); if ((int)$optionId != $optionId) { - return $this->_forward('noRoute'); + return $this->_forward('noroute'); } } $productOption = $this->_objectManager->create('Magento\Catalog\Model\Product\Option')->load($optionId); @@ -771,7 +796,7 @@ class Index || $productOption->getProductId() != $option->getProductId() || $productOption->getType() != 'file' ) { - return $this->_forward('noRoute'); + return $this->_forward('noroute'); } try { @@ -780,14 +805,14 @@ class Index $secretKey = $this->getRequest()->getParam('key'); if ($secretKey == $info['secret_key']) { - $this->_prepareDownloadResponse($info['title'], array( + $this->_fileResponseFactory->create($info['title'], array( 'value' => $filePath, 'type' => 'filename' )); } } catch(\Exception $e) { - $this->_forward('noRoute'); + $this->_forward('noroute'); } exit(0); } diff --git a/app/code/Magento/Wishlist/Controller/Shared.php b/app/code/Magento/Wishlist/Controller/Shared.php index 3b50e04d8940144677ebd329ccf49a71a144c889..67e3775fe1ef13ca76653b95f985c121473c4edb 100644 --- a/app/code/Magento/Wishlist/Controller/Shared.php +++ b/app/code/Magento/Wishlist/Controller/Shared.php @@ -44,11 +44,11 @@ class Shared extends \Magento\Wishlist\Controller\AbstractController protected $_coreRegistry = null; /** - * @param \Magento\Core\Controller\Varien\Action\Context $context + * @param \Magento\App\Action\Context $context * @param \Magento\Core\Model\Registry $coreRegistry */ public function __construct( - \Magento\Core\Controller\Varien\Action\Context $context, + \Magento\App\Action\Context $context, \Magento\Core\Model\Registry $coreRegistry ) { $this->_coreRegistry = $coreRegistry; @@ -87,16 +87,17 @@ class Shared extends \Magento\Wishlist\Controller\AbstractController $customerId = $this->_objectManager->get('Magento\Customer\Model\Session')->getCustomerId(); if ($wishlist && $wishlist->getCustomerId() && $wishlist->getCustomerId() == $customerId) { - $this->_redirectUrl($this->_objectManager->get('Magento\Wishlist\Helper\Data')->getListUrl($wishlist->getId())); + $this->getResponse()->setRedirect( + $this->_objectManager->get('Magento\Wishlist\Helper\Data')->getListUrl($wishlist->getId()) + ); return; } $this->_coreRegistry->register('shared_wishlist', $wishlist); - $this->loadLayout(); - $this->_initLayoutMessages('Magento\Checkout\Model\Session'); - $this->_initLayoutMessages('Magento\Wishlist\Model\Session'); - $this->renderLayout(); + $this->_view->loadLayout(); + $this->_view->getLayout()->initMessages(array('Magento\Checkout\Model\Session', 'Magento\Wishlist\Model\Session')); + $this->_view->renderLayout(); } /** @@ -118,7 +119,7 @@ class Shared extends \Magento\Wishlist\Controller\AbstractController $session = $this->_objectManager->get('Magento\Wishlist\Model\Session'); $cart = $this->_objectManager->get('Magento\Checkout\Model\Cart'); - $redirectUrl = $this->_getRefererUrl(); + $redirectUrl = $this->_redirect->getRefererUrl(); try { $options = $this->_objectManager->create('Magento\Wishlist\Model\Item\Option')->getCollection() @@ -142,6 +143,6 @@ class Shared extends \Magento\Wishlist\Controller\AbstractController $session->addException($e, __('Cannot add item to shopping cart')); } - return $this->_redirectUrl($redirectUrl); + return $this->getResponse()->setRedirect($redirectUrl); } } diff --git a/app/code/Magento/Wishlist/Helper/Data.php b/app/code/Magento/Wishlist/Helper/Data.php index 176d3dc17d9ac1ff92a023d25a37f7914408605e..e31029d64759f12d3b5d3edf8f122a87a432a15b 100644 --- a/app/code/Magento/Wishlist/Helper/Data.php +++ b/app/code/Magento/Wishlist/Helper/Data.php @@ -34,7 +34,7 @@ */ namespace Magento\Wishlist\Helper; -class Data extends \Magento\Core\Helper\AbstractHelper +class Data extends \Magento\App\Helper\AbstractHelper { /** * Config key 'Display Wishlist Summary' @@ -81,13 +81,6 @@ class Data extends \Magento\Core\Helper\AbstractHelper */ protected $_coreData; - /** - * Core event manager proxy - * - * @var \Magento\Event\ManagerInterface - */ - protected $_eventManager; - /** * Core registry * @@ -118,9 +111,8 @@ class Data extends \Magento\Core\Helper\AbstractHelper protected $_storeManager; /** - * @param \Magento\Event\ManagerInterface $eventManager * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\Registry $coreRegistry * @param \Magento\Core\Model\Store\Config $coreStoreConfig * @param \Magento\Customer\Model\Session $customerSession @@ -128,9 +120,8 @@ class Data extends \Magento\Core\Helper\AbstractHelper * @param \Magento\Core\Model\StoreManagerInterface $storeManager */ public function __construct( - \Magento\Event\ManagerInterface $eventManager, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Helper\Context $context, + \Magento\App\Helper\Context $context, \Magento\Core\Model\Registry $coreRegistry, \Magento\Core\Model\Store\Config $coreStoreConfig, \Magento\Customer\Model\Session $customerSession, @@ -138,7 +129,6 @@ class Data extends \Magento\Core\Helper\AbstractHelper \Magento\Core\Model\StoreManagerInterface $storeManager ) { $this->_coreRegistry = $coreRegistry; - $this->_eventManager = $eventManager; $this->_coreData = $coreData; $this->_coreStoreConfig = $coreStoreConfig; $this->_customerSession = $customerSession; @@ -399,7 +389,7 @@ class Data extends \Magento\Core\Helper\AbstractHelper )) ); - $urlParamName = \Magento\Core\Controller\Front\Action::PARAM_NAME_URL_ENCODED; + $urlParamName = \Magento\App\Action\Action::PARAM_NAME_URL_ENCODED; $params = array( 'item' => is_string($item) ? $item : $item->getWishlistItemId(), $urlParamName => $continueUrl @@ -421,7 +411,7 @@ class Data extends \Magento\Core\Helper\AbstractHelper '_store_to_url' => true, ))); - $urlParamName = \Magento\Core\Controller\Front\Action::PARAM_NAME_URL_ENCODED; + $urlParamName = \Magento\App\Action\Action::PARAM_NAME_URL_ENCODED; $params = array( 'item' => is_string($item) ? $item : $item->getWishlistItemId(), $urlParamName => $continueUrl diff --git a/app/code/Magento/Wishlist/Model/Wishlist.php b/app/code/Magento/Wishlist/Model/Wishlist.php index a9d13a45cd10ec4bf20846f010d5b9f13ff57340..25643cbc47936b478037d5d4f176817bf35955be 100644 --- a/app/code/Magento/Wishlist/Model/Wishlist.php +++ b/app/code/Magento/Wishlist/Model/Wishlist.php @@ -81,13 +81,6 @@ class Wishlist extends \Magento\Core\Model\AbstractModel */ protected $_catalogProduct; - /** - * Core event manager proxy - * - * @var \Magento\Event\ManagerInterface - */ - protected $_eventManager; - /** * @var \Magento\Core\Model\StoreManagerInterface */ @@ -124,7 +117,6 @@ class Wishlist extends \Magento\Core\Model\AbstractModel protected $dateTime; /** - * @param \Magento\Event\ManagerInterface $eventManager * @param \Magento\Catalog\Helper\Product $catalogProduct * @param \Magento\Wishlist\Helper\Data $wishlistData * @param \Magento\Core\Model\Context $context @@ -141,7 +133,6 @@ class Wishlist extends \Magento\Core\Model\AbstractModel * @param array $data */ public function __construct( - \Magento\Event\ManagerInterface $eventManager, \Magento\Catalog\Helper\Product $catalogProduct, \Magento\Wishlist\Helper\Data $wishlistData, \Magento\Core\Model\Context $context, @@ -157,7 +148,6 @@ class Wishlist extends \Magento\Core\Model\AbstractModel \Magento\Stdlib\DateTime $dateTime, array $data = array() ) { - $this->_eventManager = $eventManager; $this->_catalogProduct = $catalogProduct; $this->_wishlistData = $wishlistData; $this->_storeManager = $storeManager; diff --git a/app/code/Magento/Wishlist/etc/frontend/di.xml b/app/code/Magento/Wishlist/etc/frontend/di.xml index 031fab57d3e4f3c9f77847850f5084460f9537fd..cbac21f627b473152aee9440565db126fe8fe729 100644 --- a/app/code/Magento/Wishlist/etc/frontend/di.xml +++ b/app/code/Magento/Wishlist/etc/frontend/di.xml @@ -47,4 +47,14 @@ </value> </param> </type> + <virtualType name="wishlistInitSession" type="Magento\Core\App\Action\Plugin\Session"> + <param name="cookieCheckActions"> + <value> + <wishlistAdd>add</wishlistAdd> + </value> + </param> + </virtualType> + <type name="Magento\Wishlist\Controller\Index"> + <plugin name="sessionInitializer" type="wishlistInitSession" /> + </type> </config> diff --git a/app/code/Magento/Wishlist/view/adminhtml/customer/edit/tab/wishlist.phtml b/app/code/Magento/Wishlist/view/adminhtml/customer/edit/tab/wishlist.phtml index 878377174105363efd49ded9375d76f95f01f4cb..d09393e45db015bf6575e01c69acb657a607094c 100644 --- a/app/code/Magento/Wishlist/view/adminhtml/customer/edit/tab/wishlist.phtml +++ b/app/code/Magento/Wishlist/view/adminhtml/customer/edit/tab/wishlist.phtml @@ -25,7 +25,7 @@ */ /** - * @var $this \Magento\Core\Block\Template + * @var $this \Magento\View\Block\Template */ ?> <script type="text/javascript"> diff --git a/app/code/Magento/Wishlist/view/adminhtml/layout/customer_index_wishlist.xml b/app/code/Magento/Wishlist/view/adminhtml/layout/customer_index_wishlist.xml index 6b0ad6db1472bbb561557c31406a1cff29691f01..ee4f5b8caee0486533bfb5cf4d394ddcf1ead158 100644 --- a/app/code/Magento/Wishlist/view/adminhtml/layout/customer_index_wishlist.xml +++ b/app/code/Magento/Wishlist/view/adminhtml/layout/customer_index_wishlist.xml @@ -120,7 +120,7 @@ </arguments> </block> </block> - <block class="Magento\Core\Block\Template" as="grid.js"> + <block class="Magento\View\Block\Template" as="grid.js"> <arguments> <argument name="js_object_name" xsi:type="string">wishlistGridJsObject</argument> <argument name="template" xsi:type="string">Magento_Wishlist::customer/edit/tab/wishlist.phtml</argument> diff --git a/app/design/adminhtml/magento_backend/Magento_Adminhtml/layout/default.xml b/app/design/adminhtml/magento_backend/Magento_Adminhtml/layout/default.xml index 510af413bcb904743b98e379fdc20fa15f0d0f20..51f6344bc3e2daeebcc37923b9a31a8d56f65fab 100644 --- a/app/design/adminhtml/magento_backend/Magento_Adminhtml/layout/default.xml +++ b/app/design/adminhtml/magento_backend/Magento_Adminhtml/layout/default.xml @@ -50,9 +50,9 @@ <argument name="file" xsi:type="string">mui/components.css</argument> </arguments> </block> - <block class="Magento\Page\Block\Html\Head\Css" name="css-admin-css"> + <block class="Magento\Page\Block\Html\Head\Css" name="css-styles-css"> <arguments> - <argument name="file" xsi:type="string">css/admin.css</argument> + <argument name="file" xsi:type="string">css/styles.css</argument> </arguments> </block> <block class="Magento\Page\Block\Html\Head\Css" name="jquery-farbtastic-css-farbtastic-css"> @@ -60,16 +60,6 @@ <argument name="file" xsi:type="string">jquery/farbtastic/css/farbtastic.css</argument> </arguments> </block> - <block class="Magento\Page\Block\Html\Head\Css" name="css-header-css"> - <arguments> - <argument name="file" xsi:type="string">css/header.css</argument> - </arguments> - </block> - <block class="Magento\Page\Block\Html\Head\Css" name="css-pages-css"> - <arguments> - <argument name="file" xsi:type="string">css/pages.css</argument> - </arguments> - </block> <block class="Magento\Page\Block\Html\Head\Css" name="mui-utils-css"> <arguments> <argument name="file" xsi:type="string">mui/utils.css</argument> @@ -80,11 +70,6 @@ <argument name="file" xsi:type="string">Magento_Core::prototype/magento.css</argument> </arguments> </block> - <block class="Magento\Page\Block\Html\Head\Css" name="css-debug-css"> - <arguments> - <argument name="file" xsi:type="string">css/debug.css</argument> - </arguments> - </block> <!-- temporary to debug --> <block class="Magento\Page\Block\Html\Head\Css" name="mui-print-css"> <arguments> diff --git a/app/design/adminhtml/magento_backend/css/antiscroll.css b/app/design/adminhtml/magento_backend/css/antiscroll.css deleted file mode 100644 index 18fa63878f74411e6a3497e7f19fd9454bc18dc4..0000000000000000000000000000000000000000 --- a/app/design/adminhtml/magento_backend/css/antiscroll.css +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ - -.antiscroll-wrap { - position: relative; - overflow: hidden; -} - -.antiscroll-scrollbar { - background: gray; - background: rgba(0, 0, 0, 0.5); - -webkit-border-radius: 7px; - -moz-border-radius: 7px; - border-radius: 7px; - -webkit-box-shadow: 0 0 1px #fff; - -moz-box-shadow: 0 0 1px #fff; - box-shadow: 0 0 1px #fff; - position: absolute; - opacity: 0; - filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0); - -webkit-transition: linear 300ms opacity; - -moz-transition: linear 300ms opacity; - -o-transition: linear 300ms opacity; -} - -.antiscroll-scrollbar-shown { - opacity: 1; - filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100); -} - -.antiscroll-scrollbar-horizontal { - height: 7px; - margin-left: 2px; - bottom: 2px; - left: 0; -} - -.antiscroll-scrollbar-vertical { - width: 7px; - margin-top: 2px; - right: 2px; - top: 0; -} - -.antiscroll-inner { - position: relative; - left: 20px; - height: 100%; - max-height: 100%; - width: 100%; - max-width: 100%; - overflow-y: scroll; -} - -.antiscroll-inner::-webkit-scrollbar, .antiscroll-inner::scrollbar { - width: 0; - height: 0; -} diff --git a/app/design/adminhtml/magento_backend/css/debug.css b/app/design/adminhtml/magento_backend/css/debug.css deleted file mode 100644 index 9879625b94e33be573b1dce2e45cd2708d815352..0000000000000000000000000000000000000000 --- a/app/design/adminhtml/magento_backend/css/debug.css +++ /dev/null @@ -1,1731 +0,0 @@ -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ - -/* - This file was created to debug old classes in order to indicate where we must replase it with new ones - The types of messages are generated in file: \app\code\core\Mage\Core\Block\Messages.php like $html .= '<' . $this->_messagesSecondLevelTagName . ' class="' . $type . '-msg">'; --------------------------------------- */ - -/* - All messages to identify and refactor: - -label.mage-error, -.notice, -.messages ul, -.messages li, -.messages ul li, -.error-msg, -.success-msg, -.notice-msg, -.warning-msg - -Done: -.notification-global -.notification-global-notice --------------------------------------- */ -.debug { - border: 1px solid red !important; -} - -.messages ul, -ul.messages { - list-style: none; - margin: 0; - padding: 0; -} - -ul.messages > li { - margin: 20px 0; - -} - -ul.messages li li { - padding: 10px 26px 10px 35px; - border-radius: 5px; - color: #676056; - text-shadow: none; - position: relative; - background: #fffbf0; - border: 1px solid #d87e34; - margin-top: -1px; -} - -ul.messages li li:first-child { - margin-top: 0; -} - -ul.messages li li:before { - position: absolute; - left: 11px; - top: 50%; - margin-top: -11px; - background: none; - text-shadow: none; - width: auto; - height: auto; - border: 0; - font-family: 'MUI-Icons'; - font-style: normal; - speak: none; - font-weight: normal; - -webkit-font-smoothing: antialiased; - font-size: 16px; - content: '\e046'; /* icon-info */ - color: #d87e34; -} - -ul.messages li.error-msg li { - color: #963535; - border-color: #963535; - background: #f3dcd8; -} - -ul.messages li.error-msg li:before { - content: '\e069'; - color: #963535; -} - -ul.messages li.success-msg li { - border-color: #ceceb6; - background: #e4eecb; - color: #185b00; -} - -ul.messages li.success-msg li:before { - content: '\e067'; - color: #185b00; -} - -/* - Accordion -------------------------*/ -.accordion { - margin: 0 0 8px; - padding: 0; -} - -.accordion > dt, -.accordion > dd.open, -.accordion .collapseable, -.section-config.active > .collapseable + input + fieldset, -.accordion .collapseable.open + input + fieldset { - background: #fff; - border: 1px solid #eae6e0; - border-radius: 5px; - margin: 0 0 8px; - padding: 5px 18px 2px; - position: relative; -} - -.accordion > dt + dd { - display: none; -} - -.accordion > dt.open, -.section-config.active > .collapseable, -.accordion .collapseable.open { - margin: 0; - border-bottom: 0; - border-radius: 5px 5px 0 0; -} -.section-config.active > .collapseable + input + fieldset, -.accordion > dt + dd.open, -.accordion .collapseable.open + input + fieldset { - padding: 25px 18px 18px; - display: block; - border-top: 0; - border-radius: 0 0 5px 5px; -} - -.section-config > .collapseable > a, -.accordion > dt a, -.accordion .collapseable > a { - color: #666; - display: block; - padding: 7px 0 10px 22px; - font-family: 'CallunaSans', Arial, sans-serif; - font-size: 18px; - text-decoration: none; - position: relative; - cursor: pointer; -} - -.section-config.active > .collapseable > a, -.accordion .collapseable.open a, -.accordion dt.open a { - border-bottom: 1px solid #ededed; -} -.section-config > .collapseable > a:before, -.accordion > dt a:before, -.accordion .collapseable > a:before { - position: absolute; - left: 0; - top: 7px; - font-family: 'MUI-Icons'; - font-style: normal; - speak: none; - font-weight: normal; - -webkit-font-smoothing: antialiased; - content: '\e02a'; /* arrow right icon */ - color: #b2b0ad; -} - - -.section-config.active > .collapseable > a:before, -.accordion > dt.open a:before, -.accordion .collapseable.open a:before { - content: '\e02c'; /* arrow down icon */ -} -.section-config > .collapseable > a:hover:before, -.accordion > dt a:hover:before, -.accordion .collapseable > a:hover:before { - color: #7e7e7e; -} - -/* PayPal connected */ - -.section-config.complex .section-config.with-button { - padding:20px 15px; - margin:0 -30px 0 -15px; - border-bottom:1px solid #eae6e0; -} - -.section-config.complex tr:last-child .section-config.with-button { - border-bottom:0; -} - -.section-config.complex .section-config.with-button > .entry-edit-head { - padding:0; - padding-left:25px; - border:0; -} - -.section-config.complex .section-config.with-button.enabled > .entry-edit-head:before { - content: "\e01e"; - color:#fff; - background: #65940a; - font-family: "MUI-Icons"; - font-weight: normal; - padding:3px; - font-size: 10px; - width:10px; - height:10px; - line-height: 10px; - overflow: hidden; - border-radius: 8px; - display: block; - float:left; - margin-left:-25px; - margin-top:0; -} - -.section-config.complex .section-config.with-button > .config { - margin:10px -10px; - border:1px solid #d1d0ce; - border-radius: 5px; - padding:5px 0; -} -.section-config.complex .section-config.with-button > .config > table > tbody > tr > td { - padding:0; -} - -.section-config.complex .section-config.with-button > .config > table > tbody > tr > td > .section-config > .entry-edit-head { - border:0; - border-radius: 0; - margin-bottom:0; - padding:5px 10px 2px; - border-bottom:1px solid #d1d0ce; - background: transparent; -} -.section-config.complex .section-config.with-button > .config > table > tbody > tr:last-child > td > .section-config > .entry-edit-head { - border:0; -} -.section-config.complex .section-config.with-button > .config > table > tbody > tr > td > .section-config > .entry-edit-head a { - border-bottom:0; -} - -.section-config.complex .section-config.with-button > .config > table > tbody > tr > td > .section-config > .config { - border:0; - border-bottom:1px solid #d1d0ce; - border-radius: 0; - margin:0; - padding-bottom:50px; -} -.section-config.complex .section-config.with-button > .config > table > tbody > tr:last-child > td > .section-config > .config { - border-bottom:0; -} - -.section-config .config h4 { - padding-left:25%; - font-size: 18px; -} - -.section-config .config td.label label.enabled:before { -} -.section-config .config td.label label.enabled:before { - content: "\e01e"; - color:#fff; - background: #65940a; - font-family: "MUI-Icons"; - font-weight: normal; - padding:3px; - font-size: 10px; - width:10px; - height:10px; - line-height: 10px; - overflow: hidden; - border-radius: 8px; - display: block; - float:left; - margin-right:5px; -} - -.section-config.complex .section-config.with-button > .config:before { - content:''; - height: 9px; - width: 20px; - overflow: hidden; - display: block; - position: absolute; - bottom: 100%; - left: 50%; - zoom: 1; - z-index: 2; - margin-left: -10px; - background: url(../images/subconfig-bg.png) no-repeat 0 0; -} - -.section-config.config-advanced { - padding:30px 0 0; -} -.section-config.config-advanced > .entry-edit-head { - border:0; - padding:0; - padding-left:25%; -} -.section-config.config-advanced > .entry-edit-head a { - border:0 !important; -} -.section-config.config-advanced > .config { - padding-left:0!important; - padding-right:0!important; - border:0!important; - border-radius: 0!important; -} - -.section-config.config-advanced > .entry-edit-head a { - margin-left:-22px; -} - - -.section-config.with-button .config-heading strong { - display: block; - font-size: 14px; - margin-bottom:5px; -} - -.section-config.with-button .config-heading .button-container { - margin:15px 0 0; -} -.section-config.with-button .button-container { - line-height: 28px; -} -.section-config.with-button .button-container a { - margin-left:20px; -} - -.section-config.with-button .action-configure span { - display: block; - position: relative; - text-align: center; -} -.section-config.with-button .action-configure .state-opened { - visibility: hidden; - height:0; - overflow: hidden; -} -.section-config.with-button .action-configure.open .state-opened { - visibility: visible; - height:auto; - overflow: auto; -} -.section-config.with-button .action-configure.open .state-closed { - visibility: hidden; - height:0; - overflow: hidden; -} - -.accordion > dt + dd { - display: none; -} - -.accordion > dt + .open:empty { - background: #fff url(../mui/images/ajax-loader-big.gif) no-repeat center; - height: 100px; -} - -/* TODO: arrange configuration tables */ -.accordion .collapseable.disabled { - background: #f1f1f1; -} - -.accordion .collapseable.disabled > a { - cursor: not-allowed; -} - -.accordion .collapseable.disabled > a:before { - content: ''; -} - -.accordion .config { - border: 0; -} - -.accordion .config legend { - display: none; -} - -.eq-ie8 .accordion .config legend { - position: absolute; - left: -999em; - display: block; - width: 0; - height: 0; - padding: 0; - margin: 0; - overflow: hidden; -} - -.accordion .config table { - width: 100%; -} - -.accordion .config .label { - float: none; - width: 25%; - text-align: right; -} - -.accordion .config .value .label { - padding: 6px 5px 0 15px; - vertical-align: top; - width: auto; -} - -.accordion .config .value .label:first-child { - padding-left: 0; -} - -.accordion .config .label label { - padding-top: 6px; -} - -.accordion .config td { - background: none; - border: 0; - padding: 8px 15px 0 0; - vertical-align: top; -} - -.accordion .paypal-selection-simplified { - padding-left: 30px; -} - -.accordion .paypal-selection input[type="checkbox"] { - margin: -4px 7px 0 0; -} - -.accordion .config input[type="text"], -.accordion .config input[type="password"], -.accordion .config select, -.accordion .config textarea { - width: 100%; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -} - -.accordion .config input.input-file { - margin-top: 4px; -} - -.accordion .config select.select-date { - width: 20%; -} - -.accordion .config .value { - width: 50%; - padding-right:40px; -} - -.accordion .config .value.with-tooltip { - padding-top:5px; -} -.accordion .config .value.with-tooltip .tooltip { - position: relative; - top:0; - left:0; - right:0; - bottom:0; - margin:0; - float:right; - margin-right:-20px; - margin-top:6px; -} -.accordion .config .value.with-tooltip .tooltip-content { - padding:15px; - right:0; - margin-left:0; - margin-right:-19px; - margin-bottom:10px; - left:auto; - top:auto; - bottom:100%; - width: 400px; - max-width: 400px; - line-height: 1.333; -} -.accordion .config .value.with-tooltip .tooltip-content:before { - content: ''; - position: absolute; - width: 0; - height: 0; - top: auto; - bottom:-5px; - left:auto; - right: 20px; - border-left: 5px solid transparent; - border-right: 5px solid transparent; - border-top: 5px solid #000; - border-bottom:0; - opacity: .8; -} - -.accordion .config .value.with-tooltip .help { - position: relative; - width:auto; - margin:0; -} - -.accordion .config .scope-label { - color: #999; - font-size: 12px; - letter-spacing: 0.05em; - padding: 15px 15px 0 0; -} - -.accordion .config .note { - font-size: 11px; - padding-left: 15px; - margin: 5px 0; - color: #666; -} - -.accordion .config .note:before { - position: absolute; - margin: 4px 0 0 -14px; - content: ''; - display: inline-block; - vertical-align: top; - font-size: 0; - line-height: 0; - width: 0; - border-bottom: 5px solid #666; - border-left: 5px solid transparent; - border-right: 5px solid transparent; -} - -.accordion .config .system-tooltip-box { - position: absolute; -} - -.accordion .paypal-selection { - margin: 10px; - width: 98%; -} - -.accordion .paypal-selection th { - padding: 6px 10px 7px; -} - -.accordion .paypal-selection { - border-bottom: 2px solid #c0bbaf; -} - -.accordion .paypal-payment-notice { - margin: 10px; -} - -.accordion .custom-options { - border: 1px solid #999; - padding: 0 10px; - margin: 0 0 20px; -} - -/* TODO: arrange range inputs width in tables */ -.grid td input.input-text-range { - width: 35%; -} - -.grid td input.input-text-range-date { - width: 31%; -} - -/* TODO: styles for required TH fields */ -th.required:after { - color: red; - content: "*"; - margin-left: 5px; -} - -/* TODO: set color for messages in Cache Storage Management */ -.grid-severity-critical, -.grid-severity-major, -.grid-severity-notice, -.grid-severity-minor { - display: block; - border: 1px solid #c76f35; - background: #fffbf0; - text-align: center; -} - -.grid-severity-critical { - border-color: #6e1313; - background: #f7bfbf; - color: #6e1313; -} - -.grid-severity-major { - border-color: #963535; - background: #f3dcd8; - color: #963535; -} - -.grid-severity-notice { - border-color: #185b00; - background: #e6ecc0; - color: #185b00; -} - -/* - Sales --------------------------------------- */ - -.order-items .entry-edit-head .form-buttons { - float: right; -} - -.order-items .entry-edit-head .icon-head { - display: inline; -} - -.order-items .entry-edit-head { - margin-bottom: 20px; -} - -.order-items .entry-edit-head:before, -.order-items .entry-edit-head:after { - content: ""; - display: table; -} - -.order-items .entry-edit-head:after { - clear: both; -} - -/* - Import-export tax rates --------------------------------------- */ -.import-export-tax-rates input[type=file] { - margin-right: 10px; -} - -.import-tax-rates, -.export-tax-rates { - float: left; - width: 48.9362%; -} - -.export-tax-rates { - margin-left: 2.12766%; -} - -.import-export-tax-rates:before, -.import-export-tax-rates:after { - content: ""; - display: table; -} - -.import-export-tax-rates:after { - clear: both; -} - -/* - 1 column grid pages with actions --------------------------------------- */ -/* slaes */ -.sales-order-index .col-1-layout, -.sales-shipment-index .col-1-layout, -.adminhtml-rma-index .col-1-layout, -.sales-invoice-index .col-1-layout, -.adminhtml-rma-item-attribute-index .col-1-layout, -.sales-transactions-index .col-1-layout, -.sales-creditmemo-index .col-1-layout, -.sales-recurring-profile-index .col-1-layout, -.adminhtml-giftwrapping-index .col-1-layout, -.sales-billing-agreement-index .col-1-layout, -.checkout-agreement-index .col-1-layout, -/* catalog */ -.catalog-product-index .col-1-layout, -.adminhtml-catalog-event-index .col-1-layout, -.adminhtml-googleshopping-items-index .col-1-layout, -.catalog-product-attribute-index .col-1-layout, -.catalog-product-set-index .col-1-layout, -.adminhtml-urlrewrite-index .col-1-layout, -.adminhtml-targetrule-index .col-1-layout, -.catalog-search-index .col-1-layout, -.catalog-product-review-pending .col-1-layout, -.catalog-product-review-index .col-1-layout, -.rating-index-index .col-1-layout, -.adminhtml-tag-index .col-1-layout, -.adminhtml-tag-pending .col-1-layout, -.adminhtml-googleshopping-types-index .col-1-layout, -.adminhtml-sitemap-index .col-1-layout, -/* customers */ -.customer-online-index .col-1-layout, -.customer-index-index .col-1-layout, -.adminhtml-customer-attribute-index .col-1-layout, -.adminhtml-customer-address-attribute-index .col-1-layout, -.customer-group-index .col-1-layout, -.adminhtml-customersegment-index .col-1-layout, -.adminhtml-reward-rate-index .col-1-layout, -.adminhtml-giftcardaccount-index .col-1-layout, -.adminhtml-giftregistry-index .col-1-layout, -.adminhtml-invitation-index .col-1-layout, -/* promotions */ -.catalog-rule-promo-catalog-index .col-1-layout, -.sales-rule-promo-quote-index .col-1-layout, -.adminhtml-reminder-index .col-1-layout, -/* newsletter */ -.adminhtml-newsletter-template-index .col-1-layout, -.adminhtml-newsletter-queue-index .col-1-layout, -.adminhtml-newsletter-subscriber-index .col-1-layout, -.adminhtml-newsletter-problem-index .col-1-layout, -/* cms */ -.adminhtml-cms-page-index .col-1-layout, -.cms-page-index .col-1-layout, -.cms-block-index .col-1-layout, -.adminhtml-widget-instance-index .col-1-layout, -.adminhtml-banner-index .col-1-layout, -/* reports */ -.adminhtml-paypal-reports-index .col-1-layout, -.adminhtml-report-shopcart-product .col-1-layout, -.adminhtml-report-shopcart-abandoned .col-1-layout, -.adminhtml-report-invitation-index .col-1-layout, -.adminhtml-report-invitation-customer .col-1-layout, -.adminhtml-report-invitation-order .col-1-layout, -.adminhtml-report-product-downloads .col-1-layout, -.adminhtml-report-product-sold .col-1-layout, -.adminhtml-report-product-lowstock .col-1-layout, -.adminhtml-report-customer-accounts .col-1-layout, -.adminhtml-report-customer-totals .col-1-layout, -.adminhtml-report-customer-orders .col-1-layout, -.adminhtml-report-customer-customersegment-segment .col-1-layout, -.adminhtml-report-customer-wishlist-wishlist .col-1-layout, -.adminhtml-report-tag-customer .col-1-layout, -.adminhtml-report-tag-product .col-1-layout, -.adminhtml-report-tag-popular .col-1-layout, -.adminhtml-report-review-customer .col-1-layout, -.adminhtml-report-review-product .col-1-layout, -.adminhtml-report-search .col-1-layout, -.adminhtml-report-statistics-index .col-1-layout, -/* system */ -.adminhtml-notification-index .col-1-layout, -.adminhtml-system-backup-index .col-1-layout, -.adminhtml-webapi-user-index .col-1-layout, -.adminhtml-webapi-role-index .col-1-layout, -.adminhtml-system-design-index .col-1-layout, -.adminhtml-scheduled-operation-index .col-1-layout, -.adminhtml-system-currencysymbol-index .col-1-layout, -.adminhtml-system-email-template-index .col-1-layout, -.adminhtml-locks-index .col-1-layout, -.adminhtml-logging-index .col-1-layout, -.adminhtml-logging-archive .col-1-layout, -.adminhtml-process-list .col-1-layout, -.adminhtml-system-store-index .col-1-layout, -.adminhtml-system-variable-index .col-1-layout, -.adminhtml-user-index .col-1-layout, -.adminhtml-user-role-index .col-1-layout, -.tax-rule-index .col-1-layout, -.tax-rate-index .col-1-layout, -.adminhtml-system-currency-index .col-1-layout, -.adminhtml-cache-index .col-1-layout, -.sales-order-status-index .col-1-layout, -.adminhtml-integration-index .col-1-layout { - padding: 0; - background: transparent; - border: 0; - border-radius: 0; - max-width: 1300px; - min-width: 960px; -} - -/* - Round "+" button for grid tables --------------------------------------- */ -.sales-order-index .page-actions, -.adminhtml-rma-index .page-actions, -.adminhtml-giftwrapping-index .page-actions, -.adminhtml-rma-item-attribute-index .page-actions, -.checkout-agreement-index .page-actions, -/* catalog */ -.catalog-product-index .page-actions, -.adminhtml-catalog-event-index .page-actions, -.catalog-product-attribute-index .page-actions, -.catalog-product-set-index .page-actions, -.adminhtml-urlrewrite-index .page-actions, -.adminhtml-targetrule-index .page-actions, -.catalog-search-index .page-actions, -.catalog-product-review-index .page-actions, -.rating-index-index .page-actions, -.adminhtml-tag-index .page-actions, -.adminhtml-googleshopping-types-index .page-actions, -.adminhtml-sitemap-index .page-actions, -/* customers */ -.customer-index-index .page-actions, -.adminhtml-customer-attribute-index .page-actions, -.adminhtml-customer-address-attribute-index .page-actions, -.customer-group-index .page-actions, -.adminhtml-customersegment-index .page-actions, -.adminhtml-reward-rate-index .page-actions, -.adminhtml-giftcardaccount-index .page-actions, -.adminhtml-giftregistry-index .page-actions, -.adminhtml-invitation-index .page-actions, -/* promotions */ -.catalog-rule-promo-catalog-index .page-actions, -.sales-rule-promo-quote-index .page-actions, -.adminhtml-reminder-index .page-actions, -/* newsletter */ -.adminhtml-newsletter-template-index .page-actions, -/* cms */ -.adminhtml-cms-page-index .page-actions, -.cms-page-index .page-actions, -.cms-block-index .page-actions, -.adminhtml-widget-instance-index .page-actions, -.adminhtml-banner-index .page-actions, -/* reports */ -.adminhtml-paypal-reports-index .page-actions, -/* system */ -.adminhtml-webapi-user-index .page-actions, -.adminhtml-webapi-role-index .page-actions, -.adminhtml-system-design-index .page-actions, -.adminhtml-system-email-template-index .page-actions, -.adminhtml-system-variable-index .page-actions, -.adminhtml-user-index .page-actions, -.adminhtml-user-role-index .page-actions, -.tax-rule-index .page-actions, -.tax-rate-index .page-actions, -.adminhtml-integration-index .page-actions { - position: absolute; - z-index: 2; - margin-top: 8px; - margin-left: 15px; - padding: 0; -} - -.sales-order-index .page-actions.fixed, -.adminhtml-rma-index .page-actions.fixed, -.adminhtml-giftwrapping-index .page-actions.fixed, -.adminhtml-rma-item-attribute-index .page-actions.fixed, -.checkout-agreement-index .page-actions.fixed, -/* catalog */ -.catalog-product-index .page-actions.fixed, -.adminhtml-catalog-event-index .page-actions.fixed, -.catalog-product-attribute-index .page-actions.fixed, -.catalog-product-set-index .page-actions.fixed, -.adminhtml-urlrewrite-index .page-actions.fixed, -.adminhtml-targetrule-index .page-actions.fixed, -.catalog-search-index .page-actions.fixed, -.catalog-product-review-index .page-actions.fixed, -.rating-index-index .page-actions.fixed, -.adminhtml-tag-index .page-actions.fixed, -.adminhtml-googleshopping-types-index .page-actions.fixed, -.adminhtml-sitemap-index .page-actions.fixed, -/* customers */ -.customer-index-index .page-actions.fixed, -.adminhtml-customer-attribute-index .page-actions.fixed, -.adminhtml-customer-address-attribute-index .page-actions.fixed, -.customer-group-index .page-actions.fixed, -.adminhtml-customersegment-index .page-actions.fixed, -.adminhtml-reward-rate-index .page-actions.fixed, -.adminhtml-giftcardaccount-index .page-actions.fixed, -.adminhtml-giftregistry-index .page-actions.fixed, -.adminhtml-invitation-index .page-actions.fixed, -/* promotions */ -.catalog-rule-promo-catalog-index .page-actions.fixed, -.sales-rule-promo-quote-index .page-actions.fixed, -.adminhtml-reminder-index .page-actions.fixed, -/* newsletter */ -.adminhtml-newsletter-template-index .page-actions.fixed, -/* cms */ -.adminhtml-cms-page-index .page-actions.fixed, -.cms-page-index .page-actions.fixed, -.cms-block-index .page-actions.fixed, -.adminhtml-widget-instance-index .page-actions.fixed, -.adminhtml-banner-index .page-actions.fixed, -/* reports */ -.adminhtml-paypal-reports-index .page-actions.fixed, -/* system */ -.adminhtml-webapi-user-index .page-actions.fixed, -.adminhtml-webapi-role-index .page-actions.fixed, -.adminhtml-system-design-index .page-actions.fixed, -.adminhtml-system-email-template-index .page-actions.fixed, -.adminhtml-system-variable-index .page-actions.fixed, -.adminhtml-user-index .page-actions.fixed, -.adminhtml-user-role-index .page-actions.fixed, -.tax-rule-index .page-actions.fixed, -.tax-rate-index .page-actions.fixed, -.adminhtml-integration-index .page-actions.fixed { - left: 0; - margin: 0; - padding: 0 21px; - position: fixed; -} - -.sales-order-index .page-actions .add, -.adminhtml-rma-index .page-actions .add, -.adminhtml-giftwrapping-index .page-actions .add, -.adminhtml-rma-item-attribute-index .page-actions .add, -.checkout-agreement-index .page-actions .add, -/* catalog */ -.catalog-product-index .page-actions .btn-round > .action-default, -.adminhtml-catalog-event-index .page-actions .add, -.catalog-product-attribute-index .page-actions .add, -.catalog-product-set-index .page-actions .add, -.adminhtml-urlrewrite-index .page-actions .add, -.adminhtml-targetrule-index .page-actions .add, -.catalog-search-index .page-actions .add, -.catalog-product-review-index .page-actions .add, -.rating-index-index .page-actions .add, -.adminhtml-tag-index .page-actions .add, -.adminhtml-googleshopping-types-index .page-actions .add, -.adminhtml-sitemap-index .page-actions .add, -/* customers */ -.customer-index-index .page-actions .add, -.adminhtml-customer-attribute-index .page-actions .add, -.adminhtml-customer-address-attribute-index .page-actions .add, -.customer-group-index .page-actions .add, -.adminhtml-customersegment-index .page-actions .add, -.adminhtml-reward-rate-index .page-actions .add, -.adminhtml-giftcardaccount-index .page-actions .add, -.adminhtml-giftregistry-index .page-actions .add, -.adminhtml-invitation-index .page-actions .add, -/* promotions */ -.catalog-rule-promo-catalog-index .page-actions .add, -.sales-rule-promo-quote-index .page-actions .add, -.adminhtml-reminder-index .page-actions .add, -/* newsletter */ -.adminhtml-newsletter-template-index .page-actions .add, -/* cms */ -.adminhtml-cms-page-index .page-actions .add, -.cms-page-index .page-actions .add, -.cms-block-index .page-actions .add, -.adminhtml-widget-instance-index .page-actions .add, -.adminhtml-banner-index .page-actions .add, -/* reports */ -.adminhtml-paypal-reports-index .page-actions .task, -/* system */ -.adminhtml-webapi-user-index .page-actions .add, -.adminhtml-webapi-role-index .page-actions .add, -.adminhtml-system-design-index .page-actions .add, -.adminhtml-system-email-template-index .page-actions .add, -.adminhtml-system-variable-index .page-actions .add, -.adminhtml-user-index .page-actions .add, -.adminhtml-user-role-index .page-actions .add, -.tax-rule-index .page-actions .add, -.tax-rate-index .page-actions .add, -.adminhtml-integration-index .page-actions .add { - width: 32px; - height: 32px; - overflow: hidden; - position: relative; - z-index: 1; - padding: 0; - text-align: center; - border-radius: 18px; - border: 1px solid #e4731c; - background: #f58228; - background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2Y1ODIyOCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNmMzczMWMiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); - background: -moz-linear-gradient(top, #f58228 0%, #f3731c 100%); - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f58228), color-stop(100%,#f3731c)); - background: -webkit-linear-gradient(top, #f58228 0%,#f3731c 100%); - background: -o-linear-gradient(top, #f58228 0%,#f3731c 100%); - background: -ms-linear-gradient(top, #f58228 0%,#f3731c 100%); - background: linear-gradient(to bottom, #f58228 0%,#f3731c 100%); -} - -.eq-ie8 .sales-order-index .page-actions .add, -.eq-ie8 .adminhtml-rma-index .page-actions .add, -.eq-ie8 .adminhtml-giftwrapping-index .page-actions .add, -.eq-ie8 .adminhtml-rma-item-attribute-index .page-actions .add, -.eq-ie8 .checkout-agreement-index .page-actions .add, -/* catalog */ -.eq-ie8 .catalog-product-index .page-actions .btn-round > .action-default, -.eq-ie8 .adminhtml-catalog-event-index .page-actions .add, -.eq-ie8 .catalog-product-attribute-index .page-actions .add, -.eq-ie8 .catalog-product-set-index .page-actions .add, -.eq-ie8 .adminhtml-urlrewrite-index .page-actions .add, -.eq-ie8 .adminhtml-targetrule-index .page-actions .add, -.eq-ie8 .catalog-search-index .page-actions .add, -.eq-ie8 .catalog-product-review-index .page-actions .add, -.eq-ie8 .rating-index-index .page-actions .add, -.eq-ie8 .adminhtml-tag-index .page-actions .add, -.eq-ie8 .adminhtml-googleshopping-types-index .page-actions .add, -.eq-ie8 .adminhtml-sitemap-index .page-actions .add, -/* customers */ -.eq-ie8 .customer-index-index .page-actions .add, -.eq-ie8 .adminhtml-customer-attribute-index .page-actions .add, -.eq-ie8 .adminhtml-customer-address-attribute-index .page-actions .add, -.eq-ie8 .customer-group-index .page-actions .add, -.eq-ie8 .adminhtml-customersegment-index .page-actions .add, -.eq-ie8 .adminhtml-reward-rate-index .page-actions .add, -.eq-ie8 .adminhtml-giftcardaccount-index .page-actions .add, -.eq-ie8 .adminhtml-giftregistry-index .page-actions .add, -.eq-ie8 .adminhtml-invitation-index .page-actions .add, -/* promotions */ -.eq-ie8 .catalog-rule-promo-catalog-index .page-actions .add, -.eq-ie8 .sales-rule-promo-quote-index .page-actions .add, -.eq-ie8 .adminhtml-reminder-index .page-actions .add, -/* newsletter */ -.eq-ie8 .adminhtml-newsletter-template-index .page-actions .add, -/* cms */ -.eq-ie8 .adminhtml-cms-page-index .page-actions .add, -.eq-ie8 .cms-page-index .page-actions .add, -.eq-ie8 .cms-block-index .page-actions .add, -.eq-ie8 .adminhtml-widget-instance-index .page-actions .add, -.eq-ie8 .adminhtml-banner-index .page-actions .add, -/* reports */ -.eq-ie8 .adminhtml-paypal-reports-index .page-actions .task, -/* system */ -.eq-ie8 .adminhtml-webapi-user-index .page-actions .add, -.eq-ie8 .adminhtml-webapi-role-index .page-actions .add, -.eq-ie8 .adminhtml-system-design-index .page-actions .add, -.eq-ie8 .adminhtml-system-email-template-index .page-actions .add, -.eq-ie8 .adminhtml-system-variable-index .page-actions .add, -.eq-ie8 .adminhtml-user-index .page-actions .add, -.eq-ie8 .adminhtml-user-role-index .page-actions .add, -.eq-ie8 .tax-rule-index .page-actions .add, -.eq-ie8 .tax-rate-index .page-actions .add, -.eq-ie8 .adminhtml-integration-index .page-actions .add { - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f58228', endColorstr='#f3731c',GradientType=0 ); -} - -.sales-order-index .page-actions .add:hover, -.adminhtml-rma-index .page-actions .add:hover, -.adminhtml-giftwrapping-index .page-actions .add:hover, -.adminhtml-rma-item-attribute-index .page-actions .add:hover, -.checkout-agreement-index .page-actions .add:hover, -/* catalog */ -.catalog-product-index .page-actions .btn-round > .action-default:hover, -.adminhtml-catalog-event-index .page-actions .add:hover, -.catalog-product-attribute-index .page-actions .add:hover, -.catalog-product-set-index .page-actions .add:hover, -.adminhtml-urlrewrite-index .page-actions .add:hover, -.adminhtml-targetrule-index .page-actions .add:hover, -.catalog-search-index .page-actions .add:hover, -.catalog-product-review-index .page-actions .add:hover, -.rating-index-index .page-actions .add:hover, -.adminhtml-tag-index .page-actions .add:hover, -.adminhtml-googleshopping-types-index .page-actions .add:hover, -.adminhtml-sitemap-index .page-actions .add:hover, -/* customers */ -.customer-index-index .page-actions .add:hover, -.adminhtml-customer-attribute-index .page-actions .add:hover, -.adminhtml-customer-address-attribute-index .page-actions .add:hover, -.customer-group-index .page-actions .add:hover, -.adminhtml-customersegment-index .page-actions .add:hover, -.adminhtml-reward-rate-index .page-actions .add:hover, -.adminhtml-giftcardaccount-index .page-actions .add:hover, -.adminhtml-giftregistry-index .page-actions .add:hover, -.adminhtml-invitation-index .page-actions .add:hover, -/* promotions */ -.catalog-rule-promo-catalog-index .page-actions .add:hover, -.sales-rule-promo-quote-index .page-actions .add:hover, -.adminhtml-reminder-index .page-actions .add:hover, -/* newsletter */ -.adminhtml-newsletter-template-index .page-actions .add:hover, -/* cms */ -.adminhtml-cms-page-index .page-actions .add:hover, -.cms-page-index .page-actions .add:hover, -.cms-block-index .page-actions .add:hover, -.adminhtml-widget-instance-index .page-actions .add:hover, -.adminhtml-banner-index .page-actions .add:hover, -/* reports */ -.adminhtml-paypal-reports-index .page-actions .task:hover, -/* system */ -.adminhtml-webapi-user-index .page-actions .add:hover, -.adminhtml-webapi-role-index .page-actions .add:hover, -.adminhtml-system-design-index .page-actions .add:hover, -.adminhtml-system-email-template-index .page-actions .add:hover, -.adminhtml-system-variable-index .page-actions .add:hover, -.adminhtml-user-index .page-actions .add:hover, -.adminhtml-user-role-index .page-actions .add:hover, -.tax-rule-index .page-actions .add:hover, -.tax-rate-index .page-actions .add:hover, -.adminhtml-integration-index .page-actions .add:hover { - border: 1px solid #e4731c; - background: #e47821; - background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2U0NzgyMSIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNkZjY4MTciIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); - background: -moz-linear-gradient(top, #e47821 0%, #df6817 100%); - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#e47821), color-stop(100%,#df6817)); - background: -webkit-linear-gradient(top, #e47821 0%,#df6817 100%); - background: -o-linear-gradient(top, #e47821 0%,#df6817 100%); - background: -ms-linear-gradient(top, #e47821 0%,#df6817 100%); - background: linear-gradient(to bottom, #e47821 0%,#df6817 100%); -} - -.eq-ie8 .sales-order-index .page-actions .add:hover, -.eq-ie8 .adminhtml-rma-index .page-actions .add:hover, -.eq-ie8 .adminhtml-giftwrapping-index .page-actions .add:hover, -.eq-ie8 .adminhtml-rma-item-attribute-index .page-actions .add:hover, -.eq-ie8 .checkout-agreement-index .page-actions .add:hover, -/* catalog */ -.eq-ie8 .catalog-product-index .page-actions .btn-round > .action-default:hover, -.eq-ie8 .adminhtml-catalog-event-index .page-actions .add:hover, -.eq-ie8 .catalog-product-attribute-index .page-actions .add:hover, -.eq-ie8 .catalog-product-set-index .page-actions .add:hover, -.eq-ie8 .adminhtml-urlrewrite-index .page-actions .add:hover, -.eq-ie8 .adminhtml-targetrule-index .page-actions .add:hover, -.eq-ie8 .catalog-search-index .page-actions .add:hover, -.eq-ie8 .catalog-product-review-index .page-actions .add:hover, -.eq-ie8 .rating-index-index .page-actions .add:hover, -.eq-ie8 .adminhtml-tag-index .page-actions .add:hover, -.eq-ie8 .adminhtml-googleshopping-types-index .page-actions .add:hover, -.eq-ie8 .adminhtml-sitemap-index .page-actions .add:hover, -/* customers */ -.eq-ie8 .customer-index-index .page-actions .add:hover, -.eq-ie8 .adminhtml-customer-attribute-index .page-actions .add:hover, -.eq-ie8 .adminhtml-customer-address-attribute-index .page-actions .add:hover, -.eq-ie8 .customer-group-index .page-actions .add:hover, -.eq-ie8 .adminhtml-customersegment-index .page-actions .add:hover, -.eq-ie8 .adminhtml-reward-rate-index .page-actions .add:hover, -.eq-ie8 .adminhtml-giftcardaccount-index .page-actions .add:hover, -.eq-ie8 .adminhtml-giftregistry-index .page-actions .add:hover, -.eq-ie8 .adminhtml-invitation-index .page-actions .add:hover, -/* promotions */ -.eq-ie8 .catalog-rule-promo-catalog-index .page-actions .add:hover, -.eq-ie8 .sales-rule-promo-quote-index .page-actions .add:hover, -.eq-ie8 .adminhtml-reminder-index .page-actions .add:hover, -/* newsletter */ -.eq-ie8 .adminhtml-newsletter-template-index .page-actions .add:hover, -/* cms */ -.eq-ie8 .cms-page-index .page-actions .add:hover, -.eq-ie8 .cms-block-index .page-actions .add:hover, -.eq-ie8 .adminhtml-widget-instance-index .page-actions .add:hover, -.eq-ie8 .adminhtml-banner-index .page-actions .add:hover, -/* reports */ -.eq-ie8 .adminhtml-paypal-reports-index .page-actions .task:hover, -/* system */ -.eq-ie8 .adminhtml-webapi-user-index .page-actions .add:hover, -.eq-ie8 .adminhtml-webapi-role-index .page-actions .add:hover, -.eq-ie8 .adminhtml-system-design-index .page-actions .add:hover, -.eq-ie8 .adminhtml-system-email-template-index .page-actions .add:hover, -.eq-ie8 .adminhtml-system-variable-index .page-actions .add:hover, -.eq-ie8 .adminhtml-user-index .page-actions .add:hover, -.eq-ie8 .adminhtml-user-role-index .page-actions .add:hover, -.eq-ie8 .tax-rule-index .page-actions .add:hover, -.eq-ie8 .tax-rate-index .page-actions .add:hover, -.eq-ie8 .adminhtml-integration-index .page-actions .add:hover { - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e47821', endColorstr='#df6817',GradientType=0 ); -} - -.sales-order-index .page-actions .add:active, -.adminhtml-rma-index .page-actions .add:active, -.adminhtml-giftwrapping-index .page-actions .add:active, -.adminhtml-rma-item-attribute-index .page-actions .add:active, -.checkout-agreement-index .page-actions .add:active, -/* catalog */ -.catalog-product-index .page-actions .btn-round > .action-default:active, -.adminhtml-catalog-event-index .page-actions .add:active, -.catalog-product-attribute-index .page-actions .add:active, -.catalog-product-set-index .page-actions .add:active, -.adminhtml-urlrewrite-index .page-actions .add:active, -.adminhtml-targetrule-index .page-actions .add:active, -.catalog-search-index .page-actions .add:active, -.catalog-product-review-index .page-actions .add:active, -.rating-index-index .page-actions .add:active, -.adminhtml-tag-index .page-actions .add:active, -.adminhtml-googleshopping-types-index .page-actions .add:active, -.adminhtml-sitemap-index .page-actions .add:active, -/* customers */ -.customer-index-index .page-actions .add:active, -.adminhtml-customer-attribute-index .page-actions .add:active, -.adminhtml-customer-address-attribute-index .page-actions .add:active, -.customer-group-index .page-actions .add:active, -.adminhtml-customersegment-index .page-actions .add:active, -.adminhtml-reward-rate-index .page-actions .add:active, -.adminhtml-giftcardaccount-index .page-actions .add:active, -.adminhtml-giftregistry-index .page-actions .add:active, -.adminhtml-invitation-index .page-actions .add:active, -/* promotions */ -.catalog-rule-promo-catalog-index .page-actions .add:active, -.sales-rule-promo-quote-index .page-actions .add:active, -.adminhtml-reminder-index .page-actions .add:active, -/* newsletter */ -.adminhtml-newsletter-template-index .page-actions .add:active, -/* cms */ -.adminhtml-cms-page-index .page-actions .add:active, -.cms-page-index .page-actions .add:active, -.cms-block-index .page-actions .add:active, -.adminhtml-widget-instance-index .page-actions .add:active, -.adminhtml-banner-index .page-actions .add:active, -/* reports */ -.adminhtml-paypal-reports-index .page-actions .task:active, -/* system */ -.adminhtml-webapi-user-index .page-actions .add:active, -.adminhtml-webapi-role-index .page-actions .add:active, -.adminhtml-system-design-index .page-actions .add:active, -.adminhtml-system-email-template-index .page-actions .add:active, -.adminhtml-system-variable-index .page-actions .add:active, -.adminhtml-user-index .page-actions .add:active, -.adminhtml-user-role-index .page-actions .add:active, -.tax-rule-index .page-actions .add:active, -.tax-rate-index .page-actions .add:active, -.adminhtml-integration-index .page-actions .add:active { - background: #e2701av; - -webkit-box-shadow: inset 0px 1px 1px 1px rgba(185, 90, 19, 1); - box-shadow: inset 0px 1px 1px 1px rgba(185, 90, 19, 1); - text-shadow: 0 -1px 0 #d06516; - filter: none; -} - -.sales-order-index .page-actions .add > span, -.adminhtml-rma-index .page-actions .add > span, -.adminhtml-rma-item-attribute-index .page-actions .add > span, -.adminhtml-giftwrapping-index .page-actions .add > span, -.checkout-agreement-index .page-actions .add > span, -/* catalog */ -.catalog-product-index .page-actions .btn-round > .action-default > span, -.adminhtml-catalog-event-index .page-actions .add > span, -.catalog-product-attribute-index .page-actions .add > span, -.catalog-product-set-index .page-actions .add > span, -.adminhtml-urlrewrite-index .page-actions .add > span, -.adminhtml-targetrule-index .page-actions .add > span, -.catalog-search-index .page-actions .add > span, -.catalog-product-review-index .page-actions .add > span, -.rating-index-index .page-actions .add > span, -.adminhtml-tag-index .page-actions .add > span, -.adminhtml-googleshopping-types-index .page-actions .add > span, -.adminhtml-sitemap-index .page-actions .add > span, -/* customers */ -.customer-index-index .page-actions .add > span, -.adminhtml-customer-attribute-index .page-actions .add > span, -.adminhtml-customer-address-attribute-index .page-actions .add > span, -.customer-group-index .page-actions .add > span, -.adminhtml-customersegment-index .page-actions .add > span, -.adminhtml-reward-rate-index .page-actions .add > span, -.adminhtml-giftcardaccount-index .page-actions .add > span, -.adminhtml-giftregistry-index .page-actions .add > span, -.adminhtml-invitation-index .page-actions .add > span, -/* promotions */ -.catalog-rule-promo-catalog-index .page-actions .add > span, -.sales-rule-promo-quote-index .page-actions .add > span, -.adminhtml-reminder-index .page-actions .add > span, -/* newsletter */ -.adminhtml-newsletter-template-index .page-actions .add > span, -/* cms */ -.adminhtml-cms-page-index .page-actions .add > span, -.cms-page-index .page-actions .add > span, -.cms-block-index .page-actions .add > span, -.adminhtml-widget-instance-index .page-actions .add > span, -.adminhtml-banner-index .page-actions .add > span, -/* reports */ -.adminhtml-paypal-reports-index .page-actions .task > span, -/* system */ -.adminhtml-webapi-user-index .page-actions .add > span, -.adminhtml-webapi-role-index .page-actions .add > span, -.adminhtml-system-design-index .page-actions .add > span, -.adminhtml-system-email-template-index .page-actions .add > span, -.adminhtml-system-variable-index .page-actions .add > span, -.adminhtml-user-index .page-actions .add > span, -.adminhtml-user-role-index .page-actions .add > span, -.tax-rule-index .page-actions .add > span, -.tax-rate-index .page-actions .add > span, -.adminhtml-integration-index .page-actions .add > span { - text-indent: -999em; - display: block; - width: 32px; - height: 32px; -} - -.sales-order-index .page-actions .add > span:before, -.adminhtml-rma-index .page-actions .add > span:before, -.adminhtml-giftwrapping-index .page-actions .add > span:before, -.adminhtml-rma-item-attribute-index .page-actions .add > span:before, -.checkout-agreement-index .page-actions .add > span:before, -/* catalog */ -.catalog-product-index .page-actions .btn-round > .action-default > span:before, -.adminhtml-catalog-event-index .page-actions .add > span:before, -.catalog-product-attribute-index .page-actions .add > span:before, -.catalog-product-set-index .page-actions .add > span:before, -.adminhtml-urlrewrite-index .page-actions .add > span:before, -.adminhtml-targetrule-index .page-actions .add > span:before, -.catalog-search-index .page-actions .add > span:before, -.catalog-product-review-index .page-actions .add > span:before, -.rating-index-index .page-actions .add > span:before, -.adminhtml-tag-index .page-actions .add > span:before, -.adminhtml-googleshopping-types-index .page-actions .add > span:before, -.adminhtml-sitemap-index .page-actions .add > span:before, -/* customers */ -.customer-index-index .page-actions .add > span:before, -.adminhtml-customer-attribute-index .page-actions .add > span:before, -.adminhtml-customer-address-attribute-index .page-actions .add > span:before, -.customer-group-index .page-actions .add > span:before, -.adminhtml-customersegment-index .page-actions .add > span:before, -.adminhtml-reward-rate-index .page-actions .add > span:before, -.adminhtml-giftcardaccount-index .page-actions .add > span:before, -.adminhtml-giftregistry-index .page-actions .add > span:before, -.adminhtml-invitation-index .page-actions .add > span:before, -/* promotions */ -.catalog-rule-promo-catalog-index .page-actions .add > span:before, -.sales-rule-promo-quote-index .page-actions .add > span:before, -.adminhtml-reminder-index .page-actions .add > span:before, -/* newsletter */ -.adminhtml-newsletter-template-index .page-actions .add > span:before, -/* cms */ -.adminhtml-cms-page-index .page-actions .add > span:before, -.cms-page-index .page-actions .add > span:before, -.cms-block-index .page-actions .add > span:before, -.adminhtml-widget-instance-index .page-actions .add > span:before, -.adminhtml-banner-index .page-actions .add > span:before, -/* reports */ -.adminhtml-paypal-reports-index .page-actions .task > span:before, -/* system */ -.adminhtml-webapi-user-index .page-actions .add > span:before, -.adminhtml-webapi-role-index .page-actions .add > span:before, -.adminhtml-system-design-index .page-actions .add > span:before, -.adminhtml-system-email-template-index .page-actions .add > span:before, -.adminhtml-system-variable-index .page-actions .add > span:before, -.adminhtml-user-index .page-actions .add > span:before, -.adminhtml-user-role-index .page-actions .add > span:before, -.tax-rule-index .page-actions .add > span:before, -.tax-rate-index .page-actions .add > span:before, -.adminhtml-integration-index .page-actions .add > span:before { - text-indent: 0; - font-family: 'MUI-Icons'; - font-weight: normal; - font-size: 24px; - content: '\e02d'; - color: #fff; - position: absolute; - line-height: 30px; - height: 30px; - width: 30px; - text-align: center; - vertical-align: middle; - top: 0; - left: 0; - overflow: hidden; -} - -.catalog-product-index .btn-round > .action-toggle, -.catalog-product-index .btn-round > .action-toggle:focus { - border: 1px solid #c5c0b9; - border-radius: 0 20px 20px 0; - box-shadow: 0 1px 0 0 #f3f2f1, inset 0 1px 0 0 #f4f1ec; - color: #55504a; - background: transparent; - margin: 6px 0 0 -6px; - padding: 1px 5px 1px 10px; - text-shadow: none; - background: #f1eee7; - background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2YxZWVlNyIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNlYmU3ZGMiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); - background: -moz-linear-gradient(top, #f1eee7 0%, #ebe7dc 100%); - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f1eee7), color-stop(100%,#ebe7dc)); - background: -webkit-linear-gradient(top, #f1eee7 0%,#ebe7dc 100%); - background: -o-linear-gradient(top, #f1eee7 0%,#ebe7dc 100%); - background: -ms-linear-gradient(top, #f1eee7 0%,#ebe7dc 100%); - background: linear-gradient(to bottom, #f1eee7 0%,#ebe7dc 100%); -} - -.eq-ie8 .catalog-product-index .btn-round > .action-toggle, -.eq-ie8 .catalog-product-index .btn-round > .action-toggle:focus { - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f1eee7', endColorstr='#ebe7dc',GradientType=0 ); -} - -.catalog-product-index .btn-round > .action-toggle:hover { - margin-left: -6px; - text-shadow: none; - background: #dfdbd4; - background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2RmZGJkNCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNkM2NkYzMiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); - background: -moz-linear-gradient(top, #dfdbd4 0%, #d3cdc3 100%); - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#dfdbd4), color-stop(100%,#d3cdc3)); - background: -webkit-linear-gradient(top, #dfdbd4 0%,#d3cdc3 100%); - background: -o-linear-gradient(top, #dfdbd4 0%,#d3cdc3 100%); - background: -ms-linear-gradient(top, #dfdbd4 0%,#d3cdc3 100%); - background: linear-gradient(to bottom, #dfdbd4 0%,#d3cdc3 100%); -} - -.eq-ie8 .catalog-product-index .btn-round > .action-toggle:hover { - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#dfdbd4', endColorstr='#d3cdc3',GradientType=0 ); -} - -.catalog-product-index .btn-round.active { - background: #fff; - padding: 5px 4px 6px 7px; - margin: -6px -4px -6px -8px; - border: solid #bab4ab; - border-width: 1px 1px 0; - border-radius: 5px 5px 0 0; - box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); - filter: none -} - -.catalog-product-index .btn-round.active > .action-toggle, -.catalog-product-index .btn-round.active > .action-toggle:hover { - background: transparent; - border: 0; - border-radius: 0; - box-shadow: none; - text-shadow: none; - padding: 1px 5px 1px 11px; -} - -.eq-ie8 .catalog-product-index .btn-round.active > .action-toggle, -.eq-ie8 .catalog-product-index .btn-round.active > .action-toggle:hover { - filter: none; -} - -.catalog-product-index .btn-round.active:before { - position: absolute; - display: block; - bottom: -2px; - left: 0; - right: 0; - height: 6px; - background: #fff; - content: ''; - z-index: 5; -} - -.catalog-product-index .btn-round .dropdown-menu { - margin-top: -4px; - left: -1px; - right: auto; - border-radius: 5px; - padding-top: 3px; - padding-bottom: 3px; - z-index: 1; -} - -.catalog-product-index .dropdown-menu { - box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); -} - -.catalog-product-index .btn-round.active .dropdown-menu > li > .item { - padding: 9px 10px 10px; -} - -.sales-order-index .grid-actions, -.adminhtml-rma-index .grid-actions, -.adminhtml-giftwrapping-index .grid-actions, -.adminhtml-rma-item-attribute-index .grid-actions, -.checkout-agreement-index .grid-actions, -/* catalog */ -.catalog-product-index .grid-actions, -.adminhtml-catalog-event-index .grid-actions, -.catalog-product-attribute-index .grid-actions, -.catalog-product-set-index .grid-actions, -.adminhtml-urlrewrite-index .grid-actions, -.adminhtml-targetrule-index .grid-actions, -.catalog-search-index .grid-actions, -.catalog-product-review-index .grid-actions, -.rating-index-index .grid-actions, -.adminhtml-tag-index .grid-actions, -.adminhtml-googleshopping-types-index .grid-actions, -.adminhtml-sitemap-index .grid-actions, -/* customers */ -.customer-index-index .grid-actions, -.adminhtml-customer-attribute-index .grid-actions, -.adminhtml-customer-address-attribute-index .grid-actions, -.customer-group-index .grid-actions, -.adminhtml-customersegment-index .grid-actions, -.adminhtml-reward-rate-index .grid-actions, -.adminhtml-giftcardaccount-index .grid-actions, -.adminhtml-giftregistry-index .grid-actions, -.adminhtml-invitation-index .grid-actions, -/* promotions */ -.catalog-rule-promo-catalog-index .grid-actions, -.sales-rule-promo-quote-index .grid-actions, -.adminhtml-reminder-index .grid-actions, -/* newsletter */ -.adminhtml-newsletter-template-index .grid-actions, -/* cms */ -.adminhtml-cms-page-index .grid-actions, -.cms-page-index .grid-actions, -.cms-block-index .grid-actions, -.adminhtml-widget-instance-index .grid-actions, -.adminhtml-banner-index .grid-actions, -/* reports */ -.adminhtml-paypal-reports-index .grid-actions, -/* system */ -.adminhtml-webapi-user-index .grid-actions, -.adminhtml-webapi-role-index .grid-actions, -.adminhtml-system-design-index .grid-actions, -.adminhtml-system-email-template-index .grid-actions, -.adminhtml-system-variable-index .grid-actions, -.adminhtml-user-index .grid-actions, -.adminhtml-user-role-index .grid-actions, -.tax-rule-index .grid-actions, -.tax-rate-index .grid-actions, -.adminhtml-integration-index .grid-actions { - border-radius: 5px 5px 0 0; - margin-top: 20px; - padding-left: 100px; - padding: 10px 16px 10px 65px; -} - -.adminhtml-googleshopping-items-index .grid-title, -.adminhtml-system-backup-index .page-actions, -.adminhtml-scheduled-operation-index .page-actions, -.adminhtml-system-currency-index .page-actions, -.adminhtml-system-currencysymbol-index .page-actions, -.adminhtml-cache-index .page-actions, -.adminhtml-system-store-index .page-actions, -.sales-order-status-index .page-actions { - border: 1px solid #c0bbaf; - border-bottom: 0; - background: rgb(246, 243, 236); - background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2Y2ZjNlYyIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNlZGVhZTEiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); - background: -moz-linear-gradient(top, rgba(246, 243, 236, 1) 0%, rgba(237, 234, 225, 1) 100%); - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgba(246, 243, 236, 1)), color-stop(100%, rgba(237, 234, 225, 1))); - background: -webkit-linear-gradient(top, rgba(246, 243, 236, 1) 0%, rgba(237, 234, 225, 1) 100%); - background: -o-linear-gradient(top, rgba(246, 243, 236, 1) 0%, rgba(237, 234, 225, 1) 100%); - background: -ms-linear-gradient(top, rgba(246, 243, 236, 1) 0%, rgba(237, 234, 225, 1) 100%); - background: linear-gradient(to bottom, rgba(246, 243, 236, 1) 0%, rgba(237, 234, 225, 1) 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#f6f3ec', endColorstr = '#edeae1', GradientType = 0); - padding: 7px 8px 8px; - position: relative; - float: none; -} - -.adminhtml-googleshopping-items-index .grid { - padding-bottom: 25px; -} - -.adminhtml-googleshopping-items-index .grid-title .title { - font-family: 'CallunaSans', Arial, sans-serif; - font-size: 18px; -} - -.adminhtml-googleshopping-items-index .page-actions { - float: right; -} - -.adminhtml-system-backup-index .page-actions.fixed, -.adminhtml-scheduled-operation-index .page-actions.fixed, -.adminhtml-system-currency-index .page-actions.fixed, -.adminhtml-system-currencysymbol-index .page-actions.fixed, -.adminhtml-cache-index .page-actions.fixed, -.adminhtml-system-store-index .page-actions.fixed, -.sales-order-status-index .page-actions.fixed { - background-image: none; - padding: 0 21px; - position: fixed; -} - -.catalog-product-index .grid-actions { - padding-left: 80px; -} - -.catalog-rule-promo-catalog-index .grid-actions { - padding-left: 210px; -} - -.catalog-rule-promo-catalog-index .page-actions .apply { - float: right; - margin: 3px 0 0 10px; -} - -.catalog-product-index .field-store-switcher { - padding: 0; -} - -.sidebar-actions { - padding: 14px 0; -} - -.sidebar-actions button { - margin: 0 0 5px; -} - -.sales-order-create-index .grid table .action-configure { - float: right; -} - -.adminhtml-system-currency-index .import-service { - float: left; -} - -.adminhtml-system-currency-index .page-actions.fixed .import-service { - display: inline-block; - float: none; -} - -/* - Product --------------------------------------- */ -.tier { - margin: 20px 0 0; -} - -/* - Edit attribute set --------------------------------------- */ -.attribute-set-col { - display: block; - float: left; - width: 100%; - margin-left: 2.127659574%; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - -ms-box-sizing: border-box; - box-sizing: border-box; - width: 31.9149%; -} - -.attribute-set-col:first-child { - margin-left: 0; -} - -.attribute-set-tree { - margin-top: 5px; - overflow: auto; - height: 400px; - width: 100%; -} - -.attribute-set:before, -.attribute-set:after { - content: ""; - display: table; -} -.attribute-set:after { - clear: both; -} - -/* - Manage Categories --------------------------------------- */ -.catalog-category-edit .category-edit-title { - float: left; -} - -/* - Catalog Price Rule --------------------------------------- */ -.rule-tree-wrapper { - line-height: 28px; -} - -.rule-tree ul { - list-style: none; - padding-left: 16px; - border-left: dotted 1px #888; -} - -.rule-tree li { - margin: 0 0 10px; -} - -.rule-tree .x-tree ul { - padding-left: 0 !important; - border-left: none !important; -} - -.rule-param .label { - color: #000; - float: none; - text-align: left; - padding: 0; - vertical-align: baseline; - width: auto; -} - -.rule-param .label-disabled { - color: #eee; - cursor: default; - text-decoration: none; -} - -.rule-chooser, -.rule-param .element, -.rule-param-edit .label { - display: none; -} - -.rule-param input, -.rule-param select { - width: auto !important; - margin: 0; - min-width: 170px; -} - -.rule-param-edit .element { - display: inline; -} - -.rule-param-edit .element .addafter { - padding-left: 5px; -} - -[class^="rule-param-"] img, -.rule-chooser-trigger img { - vertical-align: middle; -} - -.rule-chooser { - border: solid 1px #CCC; - margin: 20px; - padding: 15px 10px 5px; -} - -.rule-param-wait { - background: url(../mui/images/ajax-loader-small.gif) no-repeat left center; - padding-left: 20px; -} - -/* - - URL Rewrite --------------------------------------- */ -.field-url-rewrite-option-select { - padding-top: 13px; -} - - -/* jstree */ -.jstree-default .disabled > a { - color: #a29c94; -} -/* File brouser */ diff --git a/app/design/adminhtml/magento_backend/css/styles.css b/app/design/adminhtml/magento_backend/css/styles.css new file mode 100644 index 0000000000000000000000000000000000000000..74aebf26d94b17dce2716f43056a437add0bd7eb --- /dev/null +++ b/app/design/adminhtml/magento_backend/css/styles.css @@ -0,0 +1,10622 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +.style2 { + color: #676056; + font-size: 13px; + font-weight: 600; +} +@font-face { + font-family: 'admin-icons'; + src: url('../fonts/icons/admin-icons.eot'); + src: url('../fonts/icons/admin-icons.eot?#iefix') format('embedded-opentype'), url('../fonts/icons/admin-icons.svg#admin-icons') format('svg'), url('../fonts/icons/admin-icons.woff') format('woff'), url('../fonts/icons/admin-icons.ttf') format('truetype'); + font-weight: normal; + font-style: normal; +} +@font-face { + font-family: 'MUI-Icons'; + src: url('../mui/fonts/MUI-Icons.eot'); + src: url('../mui/fonts/MUI-Icons.eot?#iefix') format('embedded-opentype'), url('../mui/fonts/MUI-Icons.svg#MUI-Icons') format('svg'), url('../mui/fonts/MUI-Icons.woff') format('woff'), url('../mui/fonts/MUI-Icons.ttf') format('truetype'); + font-weight: normal; + font-style: normal; +} +/* @import url(http://fonts.googleapis.com/css?family=Open+Sans:400italic,400,600,700 <http://fonts.googleapis.com/css?family=Open+Sans:400italic%2c400%2c600%2c700>); */ +@font-face { + font-family: 'Open Sans'; + font-style: normal; + font-weight: 400; + src: local('Open Sans'), local('OpenSans'), url(//themes.googleusercontent.com/static/fonts/opensans/v6/cJZKeOuBrn4kERxqtaUH3T8E0i7KZn-EPnyo3HZu7kw.woff) format('woff'); +} +@font-face { + font-family: 'Open Sans'; + font-style: normal; + font-weight: 600; + src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(//themes.googleusercontent.com/static/fonts/opensans/v6/MTP_ySUJH_bn48VBG8sNSnhCUOGz7vYGh680lGh-uXM.woff) format('woff'); +} +@font-face { + font-family: 'Open Sans'; + font-style: normal; + font-weight: 700; + src: local('Open Sans Bold'), local('OpenSans-Bold'), url(//themes.googleusercontent.com/static/fonts/opensans/v6/k3k702ZOKiLJc3WVjuplzHhCUOGz7vYGh680lGh-uXM.woff) format('woff'); +} +@font-face { + font-family: 'Open Sans'; + font-style: italic; + font-weight: 400; + src: local('Open Sans Italic'), local('OpenSans-Italic'), url(//themes.googleusercontent.com/static/fonts/opensans/v6/xjAJXh38I15wypJXxuGMBobN6UDyHWBl620a-IRfuBk.woff) format('woff'); +} +body, +html { + min-height: 100%; + height: 100%; +} +body { + color: #676056; + font: 400 14px/1.33 'Open Sans', sans-serif; + background: #f2ebde; + position: relative; + height: auto; +} +h1 { + color: #676056; + font: 400 28px/1.2 'Open Sans', sans-serif; +} +h2 { + color: #676056; + font: 400 20px/1.2 'Open Sans', sans-serif; +} +h3 { + color: #676056; + font: 600 16px/1.2 'Open Sans', sans-serif; +} +h4 { + color: #676056; + font: 600 14px/1.2 'Open Sans', sans-serif; +} +h5 { + color: #676056; + font: 600 13px/1.2 'Open Sans', sans-serif; +} +h6 { + color: #676056; + font: 600 12px/1.2 'Open Sans', sans-serif; +} +a { + display: inline; + color: #026294; + text-decoration: none; +} +a:visited, +a:active { + color: #026294; +} +a:focus, +a:hover { + color: #026294; + text-decoration: underline; +} +.DefaultButton, +.PrimaryButton, +input[type=button], +input[type=submit], +input[type=reset], +button, +[class^="action-"], +.popup-window .add-widget, +.PrimaryAddButton, +.PrimarySplitButton > .action-toggle.primary, +input[type=button].primary, +input[type=submit].primary, +input[type=reset].primary, +button.primary, +[class^="action-"].primary, +.popup-window .add-widget.primary, +.PrimarySplitButton.btn-round .action-default.primary, +.sales-order-index .page-actions .add, +.adminhtml-rma-index .page-actions .add, +.adminhtml-catalog-event-index .page-actions .add, +.adminhtml-urlrewrite-index .page-actions .add, +.catalog-search-index .page-actions .add, +.catalog-product-review-index .page-actions .add, +.catalog-rule-promo-catalog-index .page-actions .add, +.sales-rule-promo-quote-index .page-actions .add, +.adminhtml-reminder-index .page-actions .add, +.adminhtml-newsletter-template-index .page-actions .add, +.adminhtml-system-email-template-index .page-actions .add, +.adminhtml-sitemap-index .page-actions .add, +.adminhtml-googleshopping-types-index .page-actions .add, +.customer-index-index .page-actions .add, +.adminhtml-cms-page-index .page-actions .add, +.cms-block-index .page-actions .add, +.adminhtml-banner-index .page-actions .add, +.adminhtml-widget-instance-index .page-actions .add, +.cms-page-index .page-actions .add, +.adminhtml-webapi-user-index .page-actions .add, +.adminhtml-webapi-role-index .page-actions .add, +.adminhtml-system-variable-index .page-actions .add, +.adminhtml-user-index .page-actions .add, +.adminhtml-user-role-index .page-actions .add, +.adminhtml-webhook-subscription-index .page-actions .add, +.adminhtml-integration-index .page-actions .add, +.adminhtml-system-design-theme-index .page-actions .add, +.adminhtml-system-design-index .page-actions .add, +.adminhtml-customer-attribute-index .page-actions .add, +.adminhtml-customer-address-attribute-index .page-actions .add, +.rating-index-index .page-actions .add, +.tax-rule-index .page-actions .add, +.tax-rate-index .page-actions .add, +.adminhtml-rma-item-attribute-index .page-actions .add, +.adminhtml-reward-rate-index .page-actions .add, +.customer-group-index .page-actions .add, +.checkout-agreement-index .page-actions .add, +.catalog-product-attribute-index .page-actions .add, +.catalog-product-set-index .page-actions .add, +.catalog-product-new .actions-split > .action-toggle.primary, +.catalog-product-edit .actions-split > .action-toggle.primary, +.catalog-product-index .actions-split > .action-toggle.primary, +.catalog-product-new .actions-split.btn-round .action-default.primary, +.catalog-product-edit .actions-split.btn-round .action-default.primary, +.catalog-product-index .actions-split.btn-round .action-default.primary { + font: 14px/19px 'Open Sans', sans-serif; + font-weight: 500; + background: #f2ebde; + border: 1px solid #ada89e; + color: #676056; + display: inline-block; + padding: 5px 14px; + text-align: center; + text-decoration: none; + vertical-align: top; + cursor: pointer; + border-radius: 2px; + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +.DefaultButton:hover, +.DefaultButton:focus, +.DefaultButton:active, +.PrimaryButton:hover, +.PrimaryButton:focus, +.PrimaryButton:active, +input[type=button]:hover, +input[type=button]:focus, +input[type=button]:active, +input[type=submit]:hover, +input[type=submit]:focus, +input[type=submit]:active, +input[type=reset]:hover, +input[type=reset]:focus, +input[type=reset]:active, +button:hover, +button:focus, +button:active, +[class^="action-"]:hover, +[class^="action-"]:focus, +[class^="action-"]:active, +.popup-window .add-widget:hover, +.popup-window .add-widget:focus, +.popup-window .add-widget:active, +.PrimaryAddButton:hover, +.PrimaryAddButton:focus, +.PrimaryAddButton:active, +.PrimarySplitButton > .action-toggle.primary:hover, +.PrimarySplitButton > .action-toggle.primary:focus, +.PrimarySplitButton > .action-toggle.primary:active, +input[type=button].primary:hover, +input[type=button].primary:focus, +input[type=button].primary:active, +input[type=submit].primary:hover, +input[type=submit].primary:focus, +input[type=submit].primary:active, +input[type=reset].primary:hover, +input[type=reset].primary:focus, +input[type=reset].primary:active, +button.primary:hover, +button.primary:focus, +button.primary:active, +[class^="action-"].primary:hover, +[class^="action-"].primary:focus, +[class^="action-"].primary:active, +.popup-window .add-widget.primary:hover, +.popup-window .add-widget.primary:focus, +.popup-window .add-widget.primary:active, +.PrimarySplitButton.btn-round .action-default.primary:hover, +.PrimarySplitButton.btn-round .action-default.primary:focus, +.PrimarySplitButton.btn-round .action-default.primary:active, +.sales-order-index .page-actions .add:hover, +.sales-order-index .page-actions .add:focus, +.sales-order-index .page-actions .add:active, +.adminhtml-rma-index .page-actions .add:hover, +.adminhtml-rma-index .page-actions .add:focus, +.adminhtml-rma-index .page-actions .add:active, +.adminhtml-catalog-event-index .page-actions .add:hover, +.adminhtml-catalog-event-index .page-actions .add:focus, +.adminhtml-catalog-event-index .page-actions .add:active, +.adminhtml-urlrewrite-index .page-actions .add:hover, +.adminhtml-urlrewrite-index .page-actions .add:focus, +.adminhtml-urlrewrite-index .page-actions .add:active, +.catalog-search-index .page-actions .add:hover, +.catalog-search-index .page-actions .add:focus, +.catalog-search-index .page-actions .add:active, +.catalog-product-review-index .page-actions .add:hover, +.catalog-product-review-index .page-actions .add:focus, +.catalog-product-review-index .page-actions .add:active, +.catalog-rule-promo-catalog-index .page-actions .add:hover, +.catalog-rule-promo-catalog-index .page-actions .add:focus, +.catalog-rule-promo-catalog-index .page-actions .add:active, +.sales-rule-promo-quote-index .page-actions .add:hover, +.sales-rule-promo-quote-index .page-actions .add:focus, +.sales-rule-promo-quote-index .page-actions .add:active, +.adminhtml-reminder-index .page-actions .add:hover, +.adminhtml-reminder-index .page-actions .add:focus, +.adminhtml-reminder-index .page-actions .add:active, +.adminhtml-newsletter-template-index .page-actions .add:hover, +.adminhtml-newsletter-template-index .page-actions .add:focus, +.adminhtml-newsletter-template-index .page-actions .add:active, +.adminhtml-system-email-template-index .page-actions .add:hover, +.adminhtml-system-email-template-index .page-actions .add:focus, +.adminhtml-system-email-template-index .page-actions .add:active, +.adminhtml-sitemap-index .page-actions .add:hover, +.adminhtml-sitemap-index .page-actions .add:focus, +.adminhtml-sitemap-index .page-actions .add:active, +.adminhtml-googleshopping-types-index .page-actions .add:hover, +.adminhtml-googleshopping-types-index .page-actions .add:focus, +.adminhtml-googleshopping-types-index .page-actions .add:active, +.customer-index-index .page-actions .add:hover, +.customer-index-index .page-actions .add:focus, +.customer-index-index .page-actions .add:active, +.adminhtml-cms-page-index .page-actions .add:hover, +.adminhtml-cms-page-index .page-actions .add:focus, +.adminhtml-cms-page-index .page-actions .add:active, +.cms-block-index .page-actions .add:hover, +.cms-block-index .page-actions .add:focus, +.cms-block-index .page-actions .add:active, +.adminhtml-banner-index .page-actions .add:hover, +.adminhtml-banner-index .page-actions .add:focus, +.adminhtml-banner-index .page-actions .add:active, +.adminhtml-widget-instance-index .page-actions .add:hover, +.adminhtml-widget-instance-index .page-actions .add:focus, +.adminhtml-widget-instance-index .page-actions .add:active, +.cms-page-index .page-actions .add:hover, +.cms-page-index .page-actions .add:focus, +.cms-page-index .page-actions .add:active, +.adminhtml-webapi-user-index .page-actions .add:hover, +.adminhtml-webapi-user-index .page-actions .add:focus, +.adminhtml-webapi-user-index .page-actions .add:active, +.adminhtml-webapi-role-index .page-actions .add:hover, +.adminhtml-webapi-role-index .page-actions .add:focus, +.adminhtml-webapi-role-index .page-actions .add:active, +.adminhtml-system-variable-index .page-actions .add:hover, +.adminhtml-system-variable-index .page-actions .add:focus, +.adminhtml-system-variable-index .page-actions .add:active, +.adminhtml-user-index .page-actions .add:hover, +.adminhtml-user-index .page-actions .add:focus, +.adminhtml-user-index .page-actions .add:active, +.adminhtml-user-role-index .page-actions .add:hover, +.adminhtml-user-role-index .page-actions .add:focus, +.adminhtml-user-role-index .page-actions .add:active, +.adminhtml-webhook-subscription-index .page-actions .add:hover, +.adminhtml-webhook-subscription-index .page-actions .add:focus, +.adminhtml-webhook-subscription-index .page-actions .add:active, +.adminhtml-integration-index .page-actions .add:hover, +.adminhtml-integration-index .page-actions .add:focus, +.adminhtml-integration-index .page-actions .add:active, +.adminhtml-system-design-theme-index .page-actions .add:hover, +.adminhtml-system-design-theme-index .page-actions .add:focus, +.adminhtml-system-design-theme-index .page-actions .add:active, +.adminhtml-system-design-index .page-actions .add:hover, +.adminhtml-system-design-index .page-actions .add:focus, +.adminhtml-system-design-index .page-actions .add:active, +.adminhtml-customer-attribute-index .page-actions .add:hover, +.adminhtml-customer-attribute-index .page-actions .add:focus, +.adminhtml-customer-attribute-index .page-actions .add:active, +.adminhtml-customer-address-attribute-index .page-actions .add:hover, +.adminhtml-customer-address-attribute-index .page-actions .add:focus, +.adminhtml-customer-address-attribute-index .page-actions .add:active, +.rating-index-index .page-actions .add:hover, +.rating-index-index .page-actions .add:focus, +.rating-index-index .page-actions .add:active, +.tax-rule-index .page-actions .add:hover, +.tax-rule-index .page-actions .add:focus, +.tax-rule-index .page-actions .add:active, +.tax-rate-index .page-actions .add:hover, +.tax-rate-index .page-actions .add:focus, +.tax-rate-index .page-actions .add:active, +.adminhtml-rma-item-attribute-index .page-actions .add:hover, +.adminhtml-rma-item-attribute-index .page-actions .add:focus, +.adminhtml-rma-item-attribute-index .page-actions .add:active, +.adminhtml-reward-rate-index .page-actions .add:hover, +.adminhtml-reward-rate-index .page-actions .add:focus, +.adminhtml-reward-rate-index .page-actions .add:active, +.customer-group-index .page-actions .add:hover, +.customer-group-index .page-actions .add:focus, +.customer-group-index .page-actions .add:active, +.checkout-agreement-index .page-actions .add:hover, +.checkout-agreement-index .page-actions .add:focus, +.checkout-agreement-index .page-actions .add:active, +.catalog-product-attribute-index .page-actions .add:hover, +.catalog-product-attribute-index .page-actions .add:focus, +.catalog-product-attribute-index .page-actions .add:active, +.catalog-product-set-index .page-actions .add:hover, +.catalog-product-set-index .page-actions .add:focus, +.catalog-product-set-index .page-actions .add:active, +.catalog-product-new .actions-split > .action-toggle.primary:hover, +.catalog-product-new .actions-split > .action-toggle.primary:focus, +.catalog-product-new .actions-split > .action-toggle.primary:active, +.catalog-product-edit .actions-split > .action-toggle.primary:hover, +.catalog-product-edit .actions-split > .action-toggle.primary:focus, +.catalog-product-edit .actions-split > .action-toggle.primary:active, +.catalog-product-index .actions-split > .action-toggle.primary:hover, +.catalog-product-index .actions-split > .action-toggle.primary:focus, +.catalog-product-index .actions-split > .action-toggle.primary:active, +.catalog-product-new .actions-split.btn-round .action-default.primary:hover, +.catalog-product-new .actions-split.btn-round .action-default.primary:focus, +.catalog-product-new .actions-split.btn-round .action-default.primary:active, +.catalog-product-edit .actions-split.btn-round .action-default.primary:hover, +.catalog-product-edit .actions-split.btn-round .action-default.primary:focus, +.catalog-product-edit .actions-split.btn-round .action-default.primary:active, +.catalog-product-index .actions-split.btn-round .action-default.primary:hover, +.catalog-product-index .actions-split.btn-round .action-default.primary:focus, +.catalog-product-index .actions-split.btn-round .action-default.primary:active { + background: #cac3b4; + color: #676056; +} +.DefaultButton:active, +.PrimaryButton:active, +input[type=button]:active, +input[type=submit]:active, +input[type=reset]:active, +button:active, +[class^="action-"]:active, +.popup-window .add-widget:active, +.PrimaryAddButton:active, +.PrimarySplitButton > .action-toggle.primary:active, +input[type=button].primary:active, +input[type=submit].primary:active, +input[type=reset].primary:active, +button.primary:active, +[class^="action-"].primary:active, +.popup-window .add-widget.primary:active, +.PrimarySplitButton.btn-round .action-default.primary:active, +.sales-order-index .page-actions .add:active, +.adminhtml-rma-index .page-actions .add:active, +.adminhtml-catalog-event-index .page-actions .add:active, +.adminhtml-urlrewrite-index .page-actions .add:active, +.catalog-search-index .page-actions .add:active, +.catalog-product-review-index .page-actions .add:active, +.catalog-rule-promo-catalog-index .page-actions .add:active, +.sales-rule-promo-quote-index .page-actions .add:active, +.adminhtml-reminder-index .page-actions .add:active, +.adminhtml-newsletter-template-index .page-actions .add:active, +.adminhtml-system-email-template-index .page-actions .add:active, +.adminhtml-sitemap-index .page-actions .add:active, +.adminhtml-googleshopping-types-index .page-actions .add:active, +.customer-index-index .page-actions .add:active, +.adminhtml-cms-page-index .page-actions .add:active, +.cms-block-index .page-actions .add:active, +.adminhtml-banner-index .page-actions .add:active, +.adminhtml-widget-instance-index .page-actions .add:active, +.cms-page-index .page-actions .add:active, +.adminhtml-webapi-user-index .page-actions .add:active, +.adminhtml-webapi-role-index .page-actions .add:active, +.adminhtml-system-variable-index .page-actions .add:active, +.adminhtml-user-index .page-actions .add:active, +.adminhtml-user-role-index .page-actions .add:active, +.adminhtml-webhook-subscription-index .page-actions .add:active, +.adminhtml-integration-index .page-actions .add:active, +.adminhtml-system-design-theme-index .page-actions .add:active, +.adminhtml-system-design-index .page-actions .add:active, +.adminhtml-customer-attribute-index .page-actions .add:active, +.adminhtml-customer-address-attribute-index .page-actions .add:active, +.rating-index-index .page-actions .add:active, +.tax-rule-index .page-actions .add:active, +.tax-rate-index .page-actions .add:active, +.adminhtml-rma-item-attribute-index .page-actions .add:active, +.adminhtml-reward-rate-index .page-actions .add:active, +.customer-group-index .page-actions .add:active, +.checkout-agreement-index .page-actions .add:active, +.catalog-product-attribute-index .page-actions .add:active, +.catalog-product-set-index .page-actions .add:active, +.catalog-product-new .actions-split > .action-toggle.primary:active, +.catalog-product-edit .actions-split > .action-toggle.primary:active, +.catalog-product-index .actions-split > .action-toggle.primary:active, +.catalog-product-new .actions-split.btn-round .action-default.primary:active, +.catalog-product-edit .actions-split.btn-round .action-default.primary:active, +.catalog-product-index .actions-split.btn-round .action-default.primary:active { + border: 1px solid #989287; +} +.DefaultButton:visited, +.PrimaryButton:visited, +input[type=button]:visited, +input[type=submit]:visited, +input[type=reset]:visited, +button:visited, +[class^="action-"]:visited, +.popup-window .add-widget:visited, +.PrimaryAddButton:visited, +.PrimarySplitButton > .action-toggle.primary:visited, +input[type=button].primary:visited, +input[type=submit].primary:visited, +input[type=reset].primary:visited, +button.primary:visited, +[class^="action-"].primary:visited, +.popup-window .add-widget.primary:visited, +.PrimarySplitButton.btn-round .action-default.primary:visited, +.sales-order-index .page-actions .add:visited, +.adminhtml-rma-index .page-actions .add:visited, +.adminhtml-catalog-event-index .page-actions .add:visited, +.adminhtml-urlrewrite-index .page-actions .add:visited, +.catalog-search-index .page-actions .add:visited, +.catalog-product-review-index .page-actions .add:visited, +.catalog-rule-promo-catalog-index .page-actions .add:visited, +.sales-rule-promo-quote-index .page-actions .add:visited, +.adminhtml-reminder-index .page-actions .add:visited, +.adminhtml-newsletter-template-index .page-actions .add:visited, +.adminhtml-system-email-template-index .page-actions .add:visited, +.adminhtml-sitemap-index .page-actions .add:visited, +.adminhtml-googleshopping-types-index .page-actions .add:visited, +.customer-index-index .page-actions .add:visited, +.adminhtml-cms-page-index .page-actions .add:visited, +.cms-block-index .page-actions .add:visited, +.adminhtml-banner-index .page-actions .add:visited, +.adminhtml-widget-instance-index .page-actions .add:visited, +.cms-page-index .page-actions .add:visited, +.adminhtml-webapi-user-index .page-actions .add:visited, +.adminhtml-webapi-role-index .page-actions .add:visited, +.adminhtml-system-variable-index .page-actions .add:visited, +.adminhtml-user-index .page-actions .add:visited, +.adminhtml-user-role-index .page-actions .add:visited, +.adminhtml-webhook-subscription-index .page-actions .add:visited, +.adminhtml-integration-index .page-actions .add:visited, +.adminhtml-system-design-theme-index .page-actions .add:visited, +.adminhtml-system-design-index .page-actions .add:visited, +.adminhtml-customer-attribute-index .page-actions .add:visited, +.adminhtml-customer-address-attribute-index .page-actions .add:visited, +.rating-index-index .page-actions .add:visited, +.tax-rule-index .page-actions .add:visited, +.tax-rate-index .page-actions .add:visited, +.adminhtml-rma-item-attribute-index .page-actions .add:visited, +.adminhtml-reward-rate-index .page-actions .add:visited, +.customer-group-index .page-actions .add:visited, +.checkout-agreement-index .page-actions .add:visited, +.catalog-product-attribute-index .page-actions .add:visited, +.catalog-product-set-index .page-actions .add:visited, +.catalog-product-new .actions-split > .action-toggle.primary:visited, +.catalog-product-edit .actions-split > .action-toggle.primary:visited, +.catalog-product-index .actions-split > .action-toggle.primary:visited, +.catalog-product-new .actions-split.btn-round .action-default.primary:visited, +.catalog-product-edit .actions-split.btn-round .action-default.primary:visited, +.catalog-product-index .actions-split.btn-round .action-default.primary:visited { + color: #676056; +} +.DefaultButton[disabled], +.DefaultButton.disabled, +.PrimaryButton[disabled], +.PrimaryButton.disabled, +input[type=button][disabled], +input[type=button].disabled, +input[type=submit][disabled], +input[type=submit].disabled, +input[type=reset][disabled], +input[type=reset].disabled, +button[disabled], +button.disabled, +[class^="action-"][disabled], +[class^="action-"].disabled, +.popup-window .add-widget[disabled], +.popup-window .add-widget.disabled, +.PrimaryAddButton[disabled], +.PrimaryAddButton.disabled, +.PrimarySplitButton > .action-toggle.primary[disabled], +.PrimarySplitButton > .action-toggle.primary.disabled, +input[type=button].primary[disabled], +input[type=button].primary.disabled, +input[type=submit].primary[disabled], +input[type=submit].primary.disabled, +input[type=reset].primary[disabled], +input[type=reset].primary.disabled, +button.primary[disabled], +button.primary.disabled, +[class^="action-"].primary[disabled], +[class^="action-"].primary.disabled, +.popup-window .add-widget.primary[disabled], +.popup-window .add-widget.primary.disabled, +.PrimarySplitButton.btn-round .action-default.primary[disabled], +.PrimarySplitButton.btn-round .action-default.primary.disabled, +.sales-order-index .page-actions .add[disabled], +.sales-order-index .page-actions .add.disabled, +.adminhtml-rma-index .page-actions .add[disabled], +.adminhtml-rma-index .page-actions .add.disabled, +.adminhtml-catalog-event-index .page-actions .add[disabled], +.adminhtml-catalog-event-index .page-actions .add.disabled, +.adminhtml-urlrewrite-index .page-actions .add[disabled], +.adminhtml-urlrewrite-index .page-actions .add.disabled, +.catalog-search-index .page-actions .add[disabled], +.catalog-search-index .page-actions .add.disabled, +.catalog-product-review-index .page-actions .add[disabled], +.catalog-product-review-index .page-actions .add.disabled, +.catalog-rule-promo-catalog-index .page-actions .add[disabled], +.catalog-rule-promo-catalog-index .page-actions .add.disabled, +.sales-rule-promo-quote-index .page-actions .add[disabled], +.sales-rule-promo-quote-index .page-actions .add.disabled, +.adminhtml-reminder-index .page-actions .add[disabled], +.adminhtml-reminder-index .page-actions .add.disabled, +.adminhtml-newsletter-template-index .page-actions .add[disabled], +.adminhtml-newsletter-template-index .page-actions .add.disabled, +.adminhtml-system-email-template-index .page-actions .add[disabled], +.adminhtml-system-email-template-index .page-actions .add.disabled, +.adminhtml-sitemap-index .page-actions .add[disabled], +.adminhtml-sitemap-index .page-actions .add.disabled, +.adminhtml-googleshopping-types-index .page-actions .add[disabled], +.adminhtml-googleshopping-types-index .page-actions .add.disabled, +.customer-index-index .page-actions .add[disabled], +.customer-index-index .page-actions .add.disabled, +.adminhtml-cms-page-index .page-actions .add[disabled], +.adminhtml-cms-page-index .page-actions .add.disabled, +.cms-block-index .page-actions .add[disabled], +.cms-block-index .page-actions .add.disabled, +.adminhtml-banner-index .page-actions .add[disabled], +.adminhtml-banner-index .page-actions .add.disabled, +.adminhtml-widget-instance-index .page-actions .add[disabled], +.adminhtml-widget-instance-index .page-actions .add.disabled, +.cms-page-index .page-actions .add[disabled], +.cms-page-index .page-actions .add.disabled, +.adminhtml-webapi-user-index .page-actions .add[disabled], +.adminhtml-webapi-user-index .page-actions .add.disabled, +.adminhtml-webapi-role-index .page-actions .add[disabled], +.adminhtml-webapi-role-index .page-actions .add.disabled, +.adminhtml-system-variable-index .page-actions .add[disabled], +.adminhtml-system-variable-index .page-actions .add.disabled, +.adminhtml-user-index .page-actions .add[disabled], +.adminhtml-user-index .page-actions .add.disabled, +.adminhtml-user-role-index .page-actions .add[disabled], +.adminhtml-user-role-index .page-actions .add.disabled, +.adminhtml-webhook-subscription-index .page-actions .add[disabled], +.adminhtml-webhook-subscription-index .page-actions .add.disabled, +.adminhtml-integration-index .page-actions .add[disabled], +.adminhtml-integration-index .page-actions .add.disabled, +.adminhtml-system-design-theme-index .page-actions .add[disabled], +.adminhtml-system-design-theme-index .page-actions .add.disabled, +.adminhtml-system-design-index .page-actions .add[disabled], +.adminhtml-system-design-index .page-actions .add.disabled, +.adminhtml-customer-attribute-index .page-actions .add[disabled], +.adminhtml-customer-attribute-index .page-actions .add.disabled, +.adminhtml-customer-address-attribute-index .page-actions .add[disabled], +.adminhtml-customer-address-attribute-index .page-actions .add.disabled, +.rating-index-index .page-actions .add[disabled], +.rating-index-index .page-actions .add.disabled, +.tax-rule-index .page-actions .add[disabled], +.tax-rule-index .page-actions .add.disabled, +.tax-rate-index .page-actions .add[disabled], +.tax-rate-index .page-actions .add.disabled, +.adminhtml-rma-item-attribute-index .page-actions .add[disabled], +.adminhtml-rma-item-attribute-index .page-actions .add.disabled, +.adminhtml-reward-rate-index .page-actions .add[disabled], +.adminhtml-reward-rate-index .page-actions .add.disabled, +.customer-group-index .page-actions .add[disabled], +.customer-group-index .page-actions .add.disabled, +.checkout-agreement-index .page-actions .add[disabled], +.checkout-agreement-index .page-actions .add.disabled, +.catalog-product-attribute-index .page-actions .add[disabled], +.catalog-product-attribute-index .page-actions .add.disabled, +.catalog-product-set-index .page-actions .add[disabled], +.catalog-product-set-index .page-actions .add.disabled, +.catalog-product-new .actions-split > .action-toggle.primary[disabled], +.catalog-product-new .actions-split > .action-toggle.primary.disabled, +.catalog-product-edit .actions-split > .action-toggle.primary[disabled], +.catalog-product-edit .actions-split > .action-toggle.primary.disabled, +.catalog-product-index .actions-split > .action-toggle.primary[disabled], +.catalog-product-index .actions-split > .action-toggle.primary.disabled, +.catalog-product-new .actions-split.btn-round .action-default.primary[disabled], +.catalog-product-new .actions-split.btn-round .action-default.primary.disabled, +.catalog-product-edit .actions-split.btn-round .action-default.primary[disabled], +.catalog-product-edit .actions-split.btn-round .action-default.primary.disabled, +.catalog-product-index .actions-split.btn-round .action-default.primary[disabled], +.catalog-product-index .actions-split.btn-round .action-default.primary.disabled { + cursor: not-allowed; + opacity: 0.5; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=50); +} +.DefaultButton[disabled]:hover, +.DefaultButton.disabled:hover, +.DefaultButton[disabled]:active, +.DefaultButton.disabled:active, +.PrimaryButton[disabled]:hover, +.PrimaryButton.disabled:hover, +.PrimaryButton[disabled]:active, +.PrimaryButton.disabled:active, +input[type=button][disabled]:hover, +input[type=button].disabled:hover, +input[type=button][disabled]:active, +input[type=button].disabled:active, +input[type=submit][disabled]:hover, +input[type=submit].disabled:hover, +input[type=submit][disabled]:active, +input[type=submit].disabled:active, +input[type=reset][disabled]:hover, +input[type=reset].disabled:hover, +input[type=reset][disabled]:active, +input[type=reset].disabled:active, +button[disabled]:hover, +button.disabled:hover, +button[disabled]:active, +button.disabled:active, +[class^="action-"][disabled]:hover, +[class^="action-"].disabled:hover, +[class^="action-"][disabled]:active, +[class^="action-"].disabled:active, +.popup-window .add-widget[disabled]:hover, +.popup-window .add-widget.disabled:hover, +.popup-window .add-widget[disabled]:active, +.popup-window .add-widget.disabled:active, +.PrimaryAddButton[disabled]:hover, +.PrimaryAddButton.disabled:hover, +.PrimaryAddButton[disabled]:active, +.PrimaryAddButton.disabled:active, +.PrimarySplitButton > .action-toggle.primary[disabled]:hover, +.PrimarySplitButton > .action-toggle.primary.disabled:hover, +.PrimarySplitButton > .action-toggle.primary[disabled]:active, +.PrimarySplitButton > .action-toggle.primary.disabled:active, +input[type=button].primary[disabled]:hover, +input[type=button].primary.disabled:hover, +input[type=button].primary[disabled]:active, +input[type=button].primary.disabled:active, +input[type=submit].primary[disabled]:hover, +input[type=submit].primary.disabled:hover, +input[type=submit].primary[disabled]:active, +input[type=submit].primary.disabled:active, +input[type=reset].primary[disabled]:hover, +input[type=reset].primary.disabled:hover, +input[type=reset].primary[disabled]:active, +input[type=reset].primary.disabled:active, +button.primary[disabled]:hover, +button.primary.disabled:hover, +button.primary[disabled]:active, +button.primary.disabled:active, +[class^="action-"].primary[disabled]:hover, +[class^="action-"].primary.disabled:hover, +[class^="action-"].primary[disabled]:active, +[class^="action-"].primary.disabled:active, +.popup-window .add-widget.primary[disabled]:hover, +.popup-window .add-widget.primary.disabled:hover, +.popup-window .add-widget.primary[disabled]:active, +.popup-window .add-widget.primary.disabled:active, +.PrimarySplitButton.btn-round .action-default.primary[disabled]:hover, +.PrimarySplitButton.btn-round .action-default.primary.disabled:hover, +.PrimarySplitButton.btn-round .action-default.primary[disabled]:active, +.PrimarySplitButton.btn-round .action-default.primary.disabled:active, +.sales-order-index .page-actions .add[disabled]:hover, +.sales-order-index .page-actions .add.disabled:hover, +.sales-order-index .page-actions .add[disabled]:active, +.sales-order-index .page-actions .add.disabled:active, +.adminhtml-rma-index .page-actions .add[disabled]:hover, +.adminhtml-rma-index .page-actions .add.disabled:hover, +.adminhtml-rma-index .page-actions .add[disabled]:active, +.adminhtml-rma-index .page-actions .add.disabled:active, +.adminhtml-catalog-event-index .page-actions .add[disabled]:hover, +.adminhtml-catalog-event-index .page-actions .add.disabled:hover, +.adminhtml-catalog-event-index .page-actions .add[disabled]:active, +.adminhtml-catalog-event-index .page-actions .add.disabled:active, +.adminhtml-urlrewrite-index .page-actions .add[disabled]:hover, +.adminhtml-urlrewrite-index .page-actions .add.disabled:hover, +.adminhtml-urlrewrite-index .page-actions .add[disabled]:active, +.adminhtml-urlrewrite-index .page-actions .add.disabled:active, +.catalog-search-index .page-actions .add[disabled]:hover, +.catalog-search-index .page-actions .add.disabled:hover, +.catalog-search-index .page-actions .add[disabled]:active, +.catalog-search-index .page-actions .add.disabled:active, +.catalog-product-review-index .page-actions .add[disabled]:hover, +.catalog-product-review-index .page-actions .add.disabled:hover, +.catalog-product-review-index .page-actions .add[disabled]:active, +.catalog-product-review-index .page-actions .add.disabled:active, +.catalog-rule-promo-catalog-index .page-actions .add[disabled]:hover, +.catalog-rule-promo-catalog-index .page-actions .add.disabled:hover, +.catalog-rule-promo-catalog-index .page-actions .add[disabled]:active, +.catalog-rule-promo-catalog-index .page-actions .add.disabled:active, +.sales-rule-promo-quote-index .page-actions .add[disabled]:hover, +.sales-rule-promo-quote-index .page-actions .add.disabled:hover, +.sales-rule-promo-quote-index .page-actions .add[disabled]:active, +.sales-rule-promo-quote-index .page-actions .add.disabled:active, +.adminhtml-reminder-index .page-actions .add[disabled]:hover, +.adminhtml-reminder-index .page-actions .add.disabled:hover, +.adminhtml-reminder-index .page-actions .add[disabled]:active, +.adminhtml-reminder-index .page-actions .add.disabled:active, +.adminhtml-newsletter-template-index .page-actions .add[disabled]:hover, +.adminhtml-newsletter-template-index .page-actions .add.disabled:hover, +.adminhtml-newsletter-template-index .page-actions .add[disabled]:active, +.adminhtml-newsletter-template-index .page-actions .add.disabled:active, +.adminhtml-system-email-template-index .page-actions .add[disabled]:hover, +.adminhtml-system-email-template-index .page-actions .add.disabled:hover, +.adminhtml-system-email-template-index .page-actions .add[disabled]:active, +.adminhtml-system-email-template-index .page-actions .add.disabled:active, +.adminhtml-sitemap-index .page-actions .add[disabled]:hover, +.adminhtml-sitemap-index .page-actions .add.disabled:hover, +.adminhtml-sitemap-index .page-actions .add[disabled]:active, +.adminhtml-sitemap-index .page-actions .add.disabled:active, +.adminhtml-googleshopping-types-index .page-actions .add[disabled]:hover, +.adminhtml-googleshopping-types-index .page-actions .add.disabled:hover, +.adminhtml-googleshopping-types-index .page-actions .add[disabled]:active, +.adminhtml-googleshopping-types-index .page-actions .add.disabled:active, +.customer-index-index .page-actions .add[disabled]:hover, +.customer-index-index .page-actions .add.disabled:hover, +.customer-index-index .page-actions .add[disabled]:active, +.customer-index-index .page-actions .add.disabled:active, +.adminhtml-cms-page-index .page-actions .add[disabled]:hover, +.adminhtml-cms-page-index .page-actions .add.disabled:hover, +.adminhtml-cms-page-index .page-actions .add[disabled]:active, +.adminhtml-cms-page-index .page-actions .add.disabled:active, +.cms-block-index .page-actions .add[disabled]:hover, +.cms-block-index .page-actions .add.disabled:hover, +.cms-block-index .page-actions .add[disabled]:active, +.cms-block-index .page-actions .add.disabled:active, +.adminhtml-banner-index .page-actions .add[disabled]:hover, +.adminhtml-banner-index .page-actions .add.disabled:hover, +.adminhtml-banner-index .page-actions .add[disabled]:active, +.adminhtml-banner-index .page-actions .add.disabled:active, +.adminhtml-widget-instance-index .page-actions .add[disabled]:hover, +.adminhtml-widget-instance-index .page-actions .add.disabled:hover, +.adminhtml-widget-instance-index .page-actions .add[disabled]:active, +.adminhtml-widget-instance-index .page-actions .add.disabled:active, +.cms-page-index .page-actions .add[disabled]:hover, +.cms-page-index .page-actions .add.disabled:hover, +.cms-page-index .page-actions .add[disabled]:active, +.cms-page-index .page-actions .add.disabled:active, +.adminhtml-webapi-user-index .page-actions .add[disabled]:hover, +.adminhtml-webapi-user-index .page-actions .add.disabled:hover, +.adminhtml-webapi-user-index .page-actions .add[disabled]:active, +.adminhtml-webapi-user-index .page-actions .add.disabled:active, +.adminhtml-webapi-role-index .page-actions .add[disabled]:hover, +.adminhtml-webapi-role-index .page-actions .add.disabled:hover, +.adminhtml-webapi-role-index .page-actions .add[disabled]:active, +.adminhtml-webapi-role-index .page-actions .add.disabled:active, +.adminhtml-system-variable-index .page-actions .add[disabled]:hover, +.adminhtml-system-variable-index .page-actions .add.disabled:hover, +.adminhtml-system-variable-index .page-actions .add[disabled]:active, +.adminhtml-system-variable-index .page-actions .add.disabled:active, +.adminhtml-user-index .page-actions .add[disabled]:hover, +.adminhtml-user-index .page-actions .add.disabled:hover, +.adminhtml-user-index .page-actions .add[disabled]:active, +.adminhtml-user-index .page-actions .add.disabled:active, +.adminhtml-user-role-index .page-actions .add[disabled]:hover, +.adminhtml-user-role-index .page-actions .add.disabled:hover, +.adminhtml-user-role-index .page-actions .add[disabled]:active, +.adminhtml-user-role-index .page-actions .add.disabled:active, +.adminhtml-webhook-subscription-index .page-actions .add[disabled]:hover, +.adminhtml-webhook-subscription-index .page-actions .add.disabled:hover, +.adminhtml-webhook-subscription-index .page-actions .add[disabled]:active, +.adminhtml-webhook-subscription-index .page-actions .add.disabled:active, +.adminhtml-integration-index .page-actions .add[disabled]:hover, +.adminhtml-integration-index .page-actions .add.disabled:hover, +.adminhtml-integration-index .page-actions .add[disabled]:active, +.adminhtml-integration-index .page-actions .add.disabled:active, +.adminhtml-system-design-theme-index .page-actions .add[disabled]:hover, +.adminhtml-system-design-theme-index .page-actions .add.disabled:hover, +.adminhtml-system-design-theme-index .page-actions .add[disabled]:active, +.adminhtml-system-design-theme-index .page-actions .add.disabled:active, +.adminhtml-system-design-index .page-actions .add[disabled]:hover, +.adminhtml-system-design-index .page-actions .add.disabled:hover, +.adminhtml-system-design-index .page-actions .add[disabled]:active, +.adminhtml-system-design-index .page-actions .add.disabled:active, +.adminhtml-customer-attribute-index .page-actions .add[disabled]:hover, +.adminhtml-customer-attribute-index .page-actions .add.disabled:hover, +.adminhtml-customer-attribute-index .page-actions .add[disabled]:active, +.adminhtml-customer-attribute-index .page-actions .add.disabled:active, +.adminhtml-customer-address-attribute-index .page-actions .add[disabled]:hover, +.adminhtml-customer-address-attribute-index .page-actions .add.disabled:hover, +.adminhtml-customer-address-attribute-index .page-actions .add[disabled]:active, +.adminhtml-customer-address-attribute-index .page-actions .add.disabled:active, +.rating-index-index .page-actions .add[disabled]:hover, +.rating-index-index .page-actions .add.disabled:hover, +.rating-index-index .page-actions .add[disabled]:active, +.rating-index-index .page-actions .add.disabled:active, +.tax-rule-index .page-actions .add[disabled]:hover, +.tax-rule-index .page-actions .add.disabled:hover, +.tax-rule-index .page-actions .add[disabled]:active, +.tax-rule-index .page-actions .add.disabled:active, +.tax-rate-index .page-actions .add[disabled]:hover, +.tax-rate-index .page-actions .add.disabled:hover, +.tax-rate-index .page-actions .add[disabled]:active, +.tax-rate-index .page-actions .add.disabled:active, +.adminhtml-rma-item-attribute-index .page-actions .add[disabled]:hover, +.adminhtml-rma-item-attribute-index .page-actions .add.disabled:hover, +.adminhtml-rma-item-attribute-index .page-actions .add[disabled]:active, +.adminhtml-rma-item-attribute-index .page-actions .add.disabled:active, +.adminhtml-reward-rate-index .page-actions .add[disabled]:hover, +.adminhtml-reward-rate-index .page-actions .add.disabled:hover, +.adminhtml-reward-rate-index .page-actions .add[disabled]:active, +.adminhtml-reward-rate-index .page-actions .add.disabled:active, +.customer-group-index .page-actions .add[disabled]:hover, +.customer-group-index .page-actions .add.disabled:hover, +.customer-group-index .page-actions .add[disabled]:active, +.customer-group-index .page-actions .add.disabled:active, +.checkout-agreement-index .page-actions .add[disabled]:hover, +.checkout-agreement-index .page-actions .add.disabled:hover, +.checkout-agreement-index .page-actions .add[disabled]:active, +.checkout-agreement-index .page-actions .add.disabled:active, +.catalog-product-attribute-index .page-actions .add[disabled]:hover, +.catalog-product-attribute-index .page-actions .add.disabled:hover, +.catalog-product-attribute-index .page-actions .add[disabled]:active, +.catalog-product-attribute-index .page-actions .add.disabled:active, +.catalog-product-set-index .page-actions .add[disabled]:hover, +.catalog-product-set-index .page-actions .add.disabled:hover, +.catalog-product-set-index .page-actions .add[disabled]:active, +.catalog-product-set-index .page-actions .add.disabled:active, +.catalog-product-new .actions-split > .action-toggle.primary[disabled]:hover, +.catalog-product-new .actions-split > .action-toggle.primary.disabled:hover, +.catalog-product-new .actions-split > .action-toggle.primary[disabled]:active, +.catalog-product-new .actions-split > .action-toggle.primary.disabled:active, +.catalog-product-edit .actions-split > .action-toggle.primary[disabled]:hover, +.catalog-product-edit .actions-split > .action-toggle.primary.disabled:hover, +.catalog-product-edit .actions-split > .action-toggle.primary[disabled]:active, +.catalog-product-edit .actions-split > .action-toggle.primary.disabled:active, +.catalog-product-index .actions-split > .action-toggle.primary[disabled]:hover, +.catalog-product-index .actions-split > .action-toggle.primary.disabled:hover, +.catalog-product-index .actions-split > .action-toggle.primary[disabled]:active, +.catalog-product-index .actions-split > .action-toggle.primary.disabled:active, +.catalog-product-new .actions-split.btn-round .action-default.primary[disabled]:hover, +.catalog-product-new .actions-split.btn-round .action-default.primary.disabled:hover, +.catalog-product-new .actions-split.btn-round .action-default.primary[disabled]:active, +.catalog-product-new .actions-split.btn-round .action-default.primary.disabled:active, +.catalog-product-edit .actions-split.btn-round .action-default.primary[disabled]:hover, +.catalog-product-edit .actions-split.btn-round .action-default.primary.disabled:hover, +.catalog-product-edit .actions-split.btn-round .action-default.primary[disabled]:active, +.catalog-product-edit .actions-split.btn-round .action-default.primary.disabled:active, +.catalog-product-index .actions-split.btn-round .action-default.primary[disabled]:hover, +.catalog-product-index .actions-split.btn-round .action-default.primary.disabled:hover, +.catalog-product-index .actions-split.btn-round .action-default.primary[disabled]:active, +.catalog-product-index .actions-split.btn-round .action-default.primary.disabled:active { + color: #676056; + background: #f2ebde; + border: 1px solid #ada89e; +} +.PrimaryButton, +.PrimaryAddButton, +.PrimarySplitButton > .action-toggle.primary, +input[type=button].primary, +input[type=submit].primary, +input[type=reset].primary, +button.primary, +[class^="action-"].primary, +.popup-window .add-widget.primary, +.PrimarySplitButton.btn-round .action-default.primary, +.sales-order-index .page-actions .add, +.adminhtml-rma-index .page-actions .add, +.adminhtml-catalog-event-index .page-actions .add, +.adminhtml-urlrewrite-index .page-actions .add, +.catalog-search-index .page-actions .add, +.catalog-product-review-index .page-actions .add, +.catalog-rule-promo-catalog-index .page-actions .add, +.sales-rule-promo-quote-index .page-actions .add, +.adminhtml-reminder-index .page-actions .add, +.adminhtml-newsletter-template-index .page-actions .add, +.adminhtml-system-email-template-index .page-actions .add, +.adminhtml-sitemap-index .page-actions .add, +.adminhtml-googleshopping-types-index .page-actions .add, +.customer-index-index .page-actions .add, +.adminhtml-cms-page-index .page-actions .add, +.cms-block-index .page-actions .add, +.adminhtml-banner-index .page-actions .add, +.adminhtml-widget-instance-index .page-actions .add, +.cms-page-index .page-actions .add, +.adminhtml-webapi-user-index .page-actions .add, +.adminhtml-webapi-role-index .page-actions .add, +.adminhtml-system-variable-index .page-actions .add, +.adminhtml-user-index .page-actions .add, +.adminhtml-user-role-index .page-actions .add, +.adminhtml-webhook-subscription-index .page-actions .add, +.adminhtml-integration-index .page-actions .add, +.adminhtml-system-design-theme-index .page-actions .add, +.adminhtml-system-design-index .page-actions .add, +.adminhtml-customer-attribute-index .page-actions .add, +.adminhtml-customer-address-attribute-index .page-actions .add, +.rating-index-index .page-actions .add, +.tax-rule-index .page-actions .add, +.tax-rate-index .page-actions .add, +.adminhtml-rma-item-attribute-index .page-actions .add, +.adminhtml-reward-rate-index .page-actions .add, +.customer-group-index .page-actions .add, +.checkout-agreement-index .page-actions .add, +.catalog-product-attribute-index .page-actions .add, +.catalog-product-set-index .page-actions .add, +.catalog-product-new .actions-split > .action-toggle.primary, +.catalog-product-edit .actions-split > .action-toggle.primary, +.catalog-product-index .actions-split > .action-toggle.primary, +.catalog-product-new .actions-split.btn-round .action-default.primary, +.catalog-product-edit .actions-split.btn-round .action-default.primary, +.catalog-product-index .actions-split.btn-round .action-default.primary, +.PrimaryAddButton, +.PrimarySplitButton > .action-toggle.primary, +input[type=button].primary, +input[type=submit].primary, +input[type=reset].primary, +button.primary, +[class^="action-"].primary, +.popup-window .add-widget.primary, +.PrimarySplitButton.btn-round .action-default.primary, +.sales-order-index .page-actions .add, +.adminhtml-rma-index .page-actions .add, +.adminhtml-catalog-event-index .page-actions .add, +.adminhtml-urlrewrite-index .page-actions .add, +.catalog-search-index .page-actions .add, +.catalog-product-review-index .page-actions .add, +.catalog-rule-promo-catalog-index .page-actions .add, +.sales-rule-promo-quote-index .page-actions .add, +.adminhtml-reminder-index .page-actions .add, +.adminhtml-newsletter-template-index .page-actions .add, +.adminhtml-system-email-template-index .page-actions .add, +.adminhtml-sitemap-index .page-actions .add, +.adminhtml-googleshopping-types-index .page-actions .add, +.customer-index-index .page-actions .add, +.adminhtml-cms-page-index .page-actions .add, +.cms-block-index .page-actions .add, +.adminhtml-banner-index .page-actions .add, +.adminhtml-widget-instance-index .page-actions .add, +.cms-page-index .page-actions .add, +.adminhtml-webapi-user-index .page-actions .add, +.adminhtml-webapi-role-index .page-actions .add, +.adminhtml-system-variable-index .page-actions .add, +.adminhtml-user-index .page-actions .add, +.adminhtml-user-role-index .page-actions .add, +.adminhtml-webhook-subscription-index .page-actions .add, +.adminhtml-integration-index .page-actions .add, +.adminhtml-system-design-theme-index .page-actions .add, +.adminhtml-system-design-index .page-actions .add, +.adminhtml-customer-attribute-index .page-actions .add, +.adminhtml-customer-address-attribute-index .page-actions .add, +.rating-index-index .page-actions .add, +.tax-rule-index .page-actions .add, +.tax-rate-index .page-actions .add, +.adminhtml-rma-item-attribute-index .page-actions .add, +.adminhtml-reward-rate-index .page-actions .add, +.customer-group-index .page-actions .add, +.checkout-agreement-index .page-actions .add, +.catalog-product-attribute-index .page-actions .add, +.catalog-product-set-index .page-actions .add, +.catalog-product-new .actions-split > .action-toggle.primary, +.catalog-product-edit .actions-split > .action-toggle.primary, +.catalog-product-index .actions-split > .action-toggle.primary, +.catalog-product-new .actions-split.btn-round .action-default.primary, +.catalog-product-edit .actions-split.btn-round .action-default.primary, +.catalog-product-index .actions-split.btn-round .action-default.primary { + color: #fff; + background: #007dbd; + border: 1px solid #0574ad; +} +.PrimaryButton:focus, +.PrimaryButton:hover, +.PrimaryAddButton:focus, +.PrimaryAddButton:hover, +.PrimarySplitButton > .action-toggle.primary:focus, +.PrimarySplitButton > .action-toggle.primary:hover, +input[type=button].primary:focus, +input[type=button].primary:hover, +input[type=submit].primary:focus, +input[type=submit].primary:hover, +input[type=reset].primary:focus, +input[type=reset].primary:hover, +button.primary:focus, +button.primary:hover, +[class^="action-"].primary:focus, +[class^="action-"].primary:hover, +.popup-window .add-widget.primary:focus, +.popup-window .add-widget.primary:hover, +.PrimarySplitButton.btn-round .action-default.primary:focus, +.PrimarySplitButton.btn-round .action-default.primary:hover, +.sales-order-index .page-actions .add:focus, +.sales-order-index .page-actions .add:hover, +.adminhtml-rma-index .page-actions .add:focus, +.adminhtml-rma-index .page-actions .add:hover, +.adminhtml-catalog-event-index .page-actions .add:focus, +.adminhtml-catalog-event-index .page-actions .add:hover, +.adminhtml-urlrewrite-index .page-actions .add:focus, +.adminhtml-urlrewrite-index .page-actions .add:hover, +.catalog-search-index .page-actions .add:focus, +.catalog-search-index .page-actions .add:hover, +.catalog-product-review-index .page-actions .add:focus, +.catalog-product-review-index .page-actions .add:hover, +.catalog-rule-promo-catalog-index .page-actions .add:focus, +.catalog-rule-promo-catalog-index .page-actions .add:hover, +.sales-rule-promo-quote-index .page-actions .add:focus, +.sales-rule-promo-quote-index .page-actions .add:hover, +.adminhtml-reminder-index .page-actions .add:focus, +.adminhtml-reminder-index .page-actions .add:hover, +.adminhtml-newsletter-template-index .page-actions .add:focus, +.adminhtml-newsletter-template-index .page-actions .add:hover, +.adminhtml-system-email-template-index .page-actions .add:focus, +.adminhtml-system-email-template-index .page-actions .add:hover, +.adminhtml-sitemap-index .page-actions .add:focus, +.adminhtml-sitemap-index .page-actions .add:hover, +.adminhtml-googleshopping-types-index .page-actions .add:focus, +.adminhtml-googleshopping-types-index .page-actions .add:hover, +.customer-index-index .page-actions .add:focus, +.customer-index-index .page-actions .add:hover, +.adminhtml-cms-page-index .page-actions .add:focus, +.adminhtml-cms-page-index .page-actions .add:hover, +.cms-block-index .page-actions .add:focus, +.cms-block-index .page-actions .add:hover, +.adminhtml-banner-index .page-actions .add:focus, +.adminhtml-banner-index .page-actions .add:hover, +.adminhtml-widget-instance-index .page-actions .add:focus, +.adminhtml-widget-instance-index .page-actions .add:hover, +.cms-page-index .page-actions .add:focus, +.cms-page-index .page-actions .add:hover, +.adminhtml-webapi-user-index .page-actions .add:focus, +.adminhtml-webapi-user-index .page-actions .add:hover, +.adminhtml-webapi-role-index .page-actions .add:focus, +.adminhtml-webapi-role-index .page-actions .add:hover, +.adminhtml-system-variable-index .page-actions .add:focus, +.adminhtml-system-variable-index .page-actions .add:hover, +.adminhtml-user-index .page-actions .add:focus, +.adminhtml-user-index .page-actions .add:hover, +.adminhtml-user-role-index .page-actions .add:focus, +.adminhtml-user-role-index .page-actions .add:hover, +.adminhtml-webhook-subscription-index .page-actions .add:focus, +.adminhtml-webhook-subscription-index .page-actions .add:hover, +.adminhtml-integration-index .page-actions .add:focus, +.adminhtml-integration-index .page-actions .add:hover, +.adminhtml-system-design-theme-index .page-actions .add:focus, +.adminhtml-system-design-theme-index .page-actions .add:hover, +.adminhtml-system-design-index .page-actions .add:focus, +.adminhtml-system-design-index .page-actions .add:hover, +.adminhtml-customer-attribute-index .page-actions .add:focus, +.adminhtml-customer-attribute-index .page-actions .add:hover, +.adminhtml-customer-address-attribute-index .page-actions .add:focus, +.adminhtml-customer-address-attribute-index .page-actions .add:hover, +.rating-index-index .page-actions .add:focus, +.rating-index-index .page-actions .add:hover, +.tax-rule-index .page-actions .add:focus, +.tax-rule-index .page-actions .add:hover, +.tax-rate-index .page-actions .add:focus, +.tax-rate-index .page-actions .add:hover, +.adminhtml-rma-item-attribute-index .page-actions .add:focus, +.adminhtml-rma-item-attribute-index .page-actions .add:hover, +.adminhtml-reward-rate-index .page-actions .add:focus, +.adminhtml-reward-rate-index .page-actions .add:hover, +.customer-group-index .page-actions .add:focus, +.customer-group-index .page-actions .add:hover, +.checkout-agreement-index .page-actions .add:focus, +.checkout-agreement-index .page-actions .add:hover, +.catalog-product-attribute-index .page-actions .add:focus, +.catalog-product-attribute-index .page-actions .add:hover, +.catalog-product-set-index .page-actions .add:focus, +.catalog-product-set-index .page-actions .add:hover, +.catalog-product-new .actions-split > .action-toggle.primary:focus, +.catalog-product-new .actions-split > .action-toggle.primary:hover, +.catalog-product-edit .actions-split > .action-toggle.primary:focus, +.catalog-product-edit .actions-split > .action-toggle.primary:hover, +.catalog-product-index .actions-split > .action-toggle.primary:focus, +.catalog-product-index .actions-split > .action-toggle.primary:hover, +.catalog-product-new .actions-split.btn-round .action-default.primary:focus, +.catalog-product-new .actions-split.btn-round .action-default.primary:hover, +.catalog-product-edit .actions-split.btn-round .action-default.primary:focus, +.catalog-product-edit .actions-split.btn-round .action-default.primary:hover, +.catalog-product-index .actions-split.btn-round .action-default.primary:focus, +.catalog-product-index .actions-split.btn-round .action-default.primary:hover { + color: #fff; + background: #026294; + border: 1px solid #026294; +} +.PrimaryButton:active, +.PrimaryAddButton:active, +.PrimarySplitButton > .action-toggle.primary:active, +input[type=button].primary:active, +input[type=submit].primary:active, +input[type=reset].primary:active, +button.primary:active, +[class^="action-"].primary:active, +.popup-window .add-widget.primary:active, +.PrimarySplitButton.btn-round .action-default.primary:active, +.sales-order-index .page-actions .add:active, +.adminhtml-rma-index .page-actions .add:active, +.adminhtml-catalog-event-index .page-actions .add:active, +.adminhtml-urlrewrite-index .page-actions .add:active, +.catalog-search-index .page-actions .add:active, +.catalog-product-review-index .page-actions .add:active, +.catalog-rule-promo-catalog-index .page-actions .add:active, +.sales-rule-promo-quote-index .page-actions .add:active, +.adminhtml-reminder-index .page-actions .add:active, +.adminhtml-newsletter-template-index .page-actions .add:active, +.adminhtml-system-email-template-index .page-actions .add:active, +.adminhtml-sitemap-index .page-actions .add:active, +.adminhtml-googleshopping-types-index .page-actions .add:active, +.customer-index-index .page-actions .add:active, +.adminhtml-cms-page-index .page-actions .add:active, +.cms-block-index .page-actions .add:active, +.adminhtml-banner-index .page-actions .add:active, +.adminhtml-widget-instance-index .page-actions .add:active, +.cms-page-index .page-actions .add:active, +.adminhtml-webapi-user-index .page-actions .add:active, +.adminhtml-webapi-role-index .page-actions .add:active, +.adminhtml-system-variable-index .page-actions .add:active, +.adminhtml-user-index .page-actions .add:active, +.adminhtml-user-role-index .page-actions .add:active, +.adminhtml-webhook-subscription-index .page-actions .add:active, +.adminhtml-integration-index .page-actions .add:active, +.adminhtml-system-design-theme-index .page-actions .add:active, +.adminhtml-system-design-index .page-actions .add:active, +.adminhtml-customer-attribute-index .page-actions .add:active, +.adminhtml-customer-address-attribute-index .page-actions .add:active, +.rating-index-index .page-actions .add:active, +.tax-rule-index .page-actions .add:active, +.tax-rate-index .page-actions .add:active, +.adminhtml-rma-item-attribute-index .page-actions .add:active, +.adminhtml-reward-rate-index .page-actions .add:active, +.customer-group-index .page-actions .add:active, +.checkout-agreement-index .page-actions .add:active, +.catalog-product-attribute-index .page-actions .add:active, +.catalog-product-set-index .page-actions .add:active, +.catalog-product-new .actions-split > .action-toggle.primary:active, +.catalog-product-edit .actions-split > .action-toggle.primary:active, +.catalog-product-index .actions-split > .action-toggle.primary:active, +.catalog-product-new .actions-split.btn-round .action-default.primary:active, +.catalog-product-edit .actions-split.btn-round .action-default.primary:active, +.catalog-product-index .actions-split.btn-round .action-default.primary:active { + color: #fff; + background: #026294; + border: 1px solid #004c74; +} +.PrimaryButton:visited, +.PrimaryAddButton:visited, +.PrimarySplitButton > .action-toggle.primary:visited, +input[type=button].primary:visited, +input[type=submit].primary:visited, +input[type=reset].primary:visited, +button.primary:visited, +[class^="action-"].primary:visited, +.popup-window .add-widget.primary:visited, +.PrimarySplitButton.btn-round .action-default.primary:visited, +.sales-order-index .page-actions .add:visited, +.adminhtml-rma-index .page-actions .add:visited, +.adminhtml-catalog-event-index .page-actions .add:visited, +.adminhtml-urlrewrite-index .page-actions .add:visited, +.catalog-search-index .page-actions .add:visited, +.catalog-product-review-index .page-actions .add:visited, +.catalog-rule-promo-catalog-index .page-actions .add:visited, +.sales-rule-promo-quote-index .page-actions .add:visited, +.adminhtml-reminder-index .page-actions .add:visited, +.adminhtml-newsletter-template-index .page-actions .add:visited, +.adminhtml-system-email-template-index .page-actions .add:visited, +.adminhtml-sitemap-index .page-actions .add:visited, +.adminhtml-googleshopping-types-index .page-actions .add:visited, +.customer-index-index .page-actions .add:visited, +.adminhtml-cms-page-index .page-actions .add:visited, +.cms-block-index .page-actions .add:visited, +.adminhtml-banner-index .page-actions .add:visited, +.adminhtml-widget-instance-index .page-actions .add:visited, +.cms-page-index .page-actions .add:visited, +.adminhtml-webapi-user-index .page-actions .add:visited, +.adminhtml-webapi-role-index .page-actions .add:visited, +.adminhtml-system-variable-index .page-actions .add:visited, +.adminhtml-user-index .page-actions .add:visited, +.adminhtml-user-role-index .page-actions .add:visited, +.adminhtml-webhook-subscription-index .page-actions .add:visited, +.adminhtml-integration-index .page-actions .add:visited, +.adminhtml-system-design-theme-index .page-actions .add:visited, +.adminhtml-system-design-index .page-actions .add:visited, +.adminhtml-customer-attribute-index .page-actions .add:visited, +.adminhtml-customer-address-attribute-index .page-actions .add:visited, +.rating-index-index .page-actions .add:visited, +.tax-rule-index .page-actions .add:visited, +.tax-rate-index .page-actions .add:visited, +.adminhtml-rma-item-attribute-index .page-actions .add:visited, +.adminhtml-reward-rate-index .page-actions .add:visited, +.customer-group-index .page-actions .add:visited, +.checkout-agreement-index .page-actions .add:visited, +.catalog-product-attribute-index .page-actions .add:visited, +.catalog-product-set-index .page-actions .add:visited, +.catalog-product-new .actions-split > .action-toggle.primary:visited, +.catalog-product-edit .actions-split > .action-toggle.primary:visited, +.catalog-product-index .actions-split > .action-toggle.primary:visited, +.catalog-product-new .actions-split.btn-round .action-default.primary:visited, +.catalog-product-edit .actions-split.btn-round .action-default.primary:visited, +.catalog-product-index .actions-split.btn-round .action-default.primary:visited { + color: #fff; +} +.PrimaryButton[disabled]:hover, +.PrimaryButton.disabled:hover, +.PrimaryButton[disabled]:active, +.PrimaryButton.disabled:active, +.PrimaryAddButton[disabled]:hover, +.PrimaryAddButton.disabled:hover, +.PrimaryAddButton[disabled]:active, +.PrimaryAddButton.disabled:active, +.PrimarySplitButton > .action-toggle.primary[disabled]:hover, +.PrimarySplitButton > .action-toggle.primary.disabled:hover, +.PrimarySplitButton > .action-toggle.primary[disabled]:active, +.PrimarySplitButton > .action-toggle.primary.disabled:active, +input[type=button].primary[disabled]:hover, +input[type=button].primary.disabled:hover, +input[type=button].primary[disabled]:active, +input[type=button].primary.disabled:active, +input[type=submit].primary[disabled]:hover, +input[type=submit].primary.disabled:hover, +input[type=submit].primary[disabled]:active, +input[type=submit].primary.disabled:active, +input[type=reset].primary[disabled]:hover, +input[type=reset].primary.disabled:hover, +input[type=reset].primary[disabled]:active, +input[type=reset].primary.disabled:active, +button.primary[disabled]:hover, +button.primary.disabled:hover, +button.primary[disabled]:active, +button.primary.disabled:active, +[class^="action-"].primary[disabled]:hover, +[class^="action-"].primary.disabled:hover, +[class^="action-"].primary[disabled]:active, +[class^="action-"].primary.disabled:active, +.popup-window .add-widget.primary[disabled]:hover, +.popup-window .add-widget.primary.disabled:hover, +.popup-window .add-widget.primary[disabled]:active, +.popup-window .add-widget.primary.disabled:active, +.PrimarySplitButton.btn-round .action-default.primary[disabled]:hover, +.PrimarySplitButton.btn-round .action-default.primary.disabled:hover, +.PrimarySplitButton.btn-round .action-default.primary[disabled]:active, +.PrimarySplitButton.btn-round .action-default.primary.disabled:active, +.sales-order-index .page-actions .add[disabled]:hover, +.sales-order-index .page-actions .add.disabled:hover, +.sales-order-index .page-actions .add[disabled]:active, +.sales-order-index .page-actions .add.disabled:active, +.adminhtml-rma-index .page-actions .add[disabled]:hover, +.adminhtml-rma-index .page-actions .add.disabled:hover, +.adminhtml-rma-index .page-actions .add[disabled]:active, +.adminhtml-rma-index .page-actions .add.disabled:active, +.adminhtml-catalog-event-index .page-actions .add[disabled]:hover, +.adminhtml-catalog-event-index .page-actions .add.disabled:hover, +.adminhtml-catalog-event-index .page-actions .add[disabled]:active, +.adminhtml-catalog-event-index .page-actions .add.disabled:active, +.adminhtml-urlrewrite-index .page-actions .add[disabled]:hover, +.adminhtml-urlrewrite-index .page-actions .add.disabled:hover, +.adminhtml-urlrewrite-index .page-actions .add[disabled]:active, +.adminhtml-urlrewrite-index .page-actions .add.disabled:active, +.catalog-search-index .page-actions .add[disabled]:hover, +.catalog-search-index .page-actions .add.disabled:hover, +.catalog-search-index .page-actions .add[disabled]:active, +.catalog-search-index .page-actions .add.disabled:active, +.catalog-product-review-index .page-actions .add[disabled]:hover, +.catalog-product-review-index .page-actions .add.disabled:hover, +.catalog-product-review-index .page-actions .add[disabled]:active, +.catalog-product-review-index .page-actions .add.disabled:active, +.catalog-rule-promo-catalog-index .page-actions .add[disabled]:hover, +.catalog-rule-promo-catalog-index .page-actions .add.disabled:hover, +.catalog-rule-promo-catalog-index .page-actions .add[disabled]:active, +.catalog-rule-promo-catalog-index .page-actions .add.disabled:active, +.sales-rule-promo-quote-index .page-actions .add[disabled]:hover, +.sales-rule-promo-quote-index .page-actions .add.disabled:hover, +.sales-rule-promo-quote-index .page-actions .add[disabled]:active, +.sales-rule-promo-quote-index .page-actions .add.disabled:active, +.adminhtml-reminder-index .page-actions .add[disabled]:hover, +.adminhtml-reminder-index .page-actions .add.disabled:hover, +.adminhtml-reminder-index .page-actions .add[disabled]:active, +.adminhtml-reminder-index .page-actions .add.disabled:active, +.adminhtml-newsletter-template-index .page-actions .add[disabled]:hover, +.adminhtml-newsletter-template-index .page-actions .add.disabled:hover, +.adminhtml-newsletter-template-index .page-actions .add[disabled]:active, +.adminhtml-newsletter-template-index .page-actions .add.disabled:active, +.adminhtml-system-email-template-index .page-actions .add[disabled]:hover, +.adminhtml-system-email-template-index .page-actions .add.disabled:hover, +.adminhtml-system-email-template-index .page-actions .add[disabled]:active, +.adminhtml-system-email-template-index .page-actions .add.disabled:active, +.adminhtml-sitemap-index .page-actions .add[disabled]:hover, +.adminhtml-sitemap-index .page-actions .add.disabled:hover, +.adminhtml-sitemap-index .page-actions .add[disabled]:active, +.adminhtml-sitemap-index .page-actions .add.disabled:active, +.adminhtml-googleshopping-types-index .page-actions .add[disabled]:hover, +.adminhtml-googleshopping-types-index .page-actions .add.disabled:hover, +.adminhtml-googleshopping-types-index .page-actions .add[disabled]:active, +.adminhtml-googleshopping-types-index .page-actions .add.disabled:active, +.customer-index-index .page-actions .add[disabled]:hover, +.customer-index-index .page-actions .add.disabled:hover, +.customer-index-index .page-actions .add[disabled]:active, +.customer-index-index .page-actions .add.disabled:active, +.adminhtml-cms-page-index .page-actions .add[disabled]:hover, +.adminhtml-cms-page-index .page-actions .add.disabled:hover, +.adminhtml-cms-page-index .page-actions .add[disabled]:active, +.adminhtml-cms-page-index .page-actions .add.disabled:active, +.cms-block-index .page-actions .add[disabled]:hover, +.cms-block-index .page-actions .add.disabled:hover, +.cms-block-index .page-actions .add[disabled]:active, +.cms-block-index .page-actions .add.disabled:active, +.adminhtml-banner-index .page-actions .add[disabled]:hover, +.adminhtml-banner-index .page-actions .add.disabled:hover, +.adminhtml-banner-index .page-actions .add[disabled]:active, +.adminhtml-banner-index .page-actions .add.disabled:active, +.adminhtml-widget-instance-index .page-actions .add[disabled]:hover, +.adminhtml-widget-instance-index .page-actions .add.disabled:hover, +.adminhtml-widget-instance-index .page-actions .add[disabled]:active, +.adminhtml-widget-instance-index .page-actions .add.disabled:active, +.cms-page-index .page-actions .add[disabled]:hover, +.cms-page-index .page-actions .add.disabled:hover, +.cms-page-index .page-actions .add[disabled]:active, +.cms-page-index .page-actions .add.disabled:active, +.adminhtml-webapi-user-index .page-actions .add[disabled]:hover, +.adminhtml-webapi-user-index .page-actions .add.disabled:hover, +.adminhtml-webapi-user-index .page-actions .add[disabled]:active, +.adminhtml-webapi-user-index .page-actions .add.disabled:active, +.adminhtml-webapi-role-index .page-actions .add[disabled]:hover, +.adminhtml-webapi-role-index .page-actions .add.disabled:hover, +.adminhtml-webapi-role-index .page-actions .add[disabled]:active, +.adminhtml-webapi-role-index .page-actions .add.disabled:active, +.adminhtml-system-variable-index .page-actions .add[disabled]:hover, +.adminhtml-system-variable-index .page-actions .add.disabled:hover, +.adminhtml-system-variable-index .page-actions .add[disabled]:active, +.adminhtml-system-variable-index .page-actions .add.disabled:active, +.adminhtml-user-index .page-actions .add[disabled]:hover, +.adminhtml-user-index .page-actions .add.disabled:hover, +.adminhtml-user-index .page-actions .add[disabled]:active, +.adminhtml-user-index .page-actions .add.disabled:active, +.adminhtml-user-role-index .page-actions .add[disabled]:hover, +.adminhtml-user-role-index .page-actions .add.disabled:hover, +.adminhtml-user-role-index .page-actions .add[disabled]:active, +.adminhtml-user-role-index .page-actions .add.disabled:active, +.adminhtml-webhook-subscription-index .page-actions .add[disabled]:hover, +.adminhtml-webhook-subscription-index .page-actions .add.disabled:hover, +.adminhtml-webhook-subscription-index .page-actions .add[disabled]:active, +.adminhtml-webhook-subscription-index .page-actions .add.disabled:active, +.adminhtml-integration-index .page-actions .add[disabled]:hover, +.adminhtml-integration-index .page-actions .add.disabled:hover, +.adminhtml-integration-index .page-actions .add[disabled]:active, +.adminhtml-integration-index .page-actions .add.disabled:active, +.adminhtml-system-design-theme-index .page-actions .add[disabled]:hover, +.adminhtml-system-design-theme-index .page-actions .add.disabled:hover, +.adminhtml-system-design-theme-index .page-actions .add[disabled]:active, +.adminhtml-system-design-theme-index .page-actions .add.disabled:active, +.adminhtml-system-design-index .page-actions .add[disabled]:hover, +.adminhtml-system-design-index .page-actions .add.disabled:hover, +.adminhtml-system-design-index .page-actions .add[disabled]:active, +.adminhtml-system-design-index .page-actions .add.disabled:active, +.adminhtml-customer-attribute-index .page-actions .add[disabled]:hover, +.adminhtml-customer-attribute-index .page-actions .add.disabled:hover, +.adminhtml-customer-attribute-index .page-actions .add[disabled]:active, +.adminhtml-customer-attribute-index .page-actions .add.disabled:active, +.adminhtml-customer-address-attribute-index .page-actions .add[disabled]:hover, +.adminhtml-customer-address-attribute-index .page-actions .add.disabled:hover, +.adminhtml-customer-address-attribute-index .page-actions .add[disabled]:active, +.adminhtml-customer-address-attribute-index .page-actions .add.disabled:active, +.rating-index-index .page-actions .add[disabled]:hover, +.rating-index-index .page-actions .add.disabled:hover, +.rating-index-index .page-actions .add[disabled]:active, +.rating-index-index .page-actions .add.disabled:active, +.tax-rule-index .page-actions .add[disabled]:hover, +.tax-rule-index .page-actions .add.disabled:hover, +.tax-rule-index .page-actions .add[disabled]:active, +.tax-rule-index .page-actions .add.disabled:active, +.tax-rate-index .page-actions .add[disabled]:hover, +.tax-rate-index .page-actions .add.disabled:hover, +.tax-rate-index .page-actions .add[disabled]:active, +.tax-rate-index .page-actions .add.disabled:active, +.adminhtml-rma-item-attribute-index .page-actions .add[disabled]:hover, +.adminhtml-rma-item-attribute-index .page-actions .add.disabled:hover, +.adminhtml-rma-item-attribute-index .page-actions .add[disabled]:active, +.adminhtml-rma-item-attribute-index .page-actions .add.disabled:active, +.adminhtml-reward-rate-index .page-actions .add[disabled]:hover, +.adminhtml-reward-rate-index .page-actions .add.disabled:hover, +.adminhtml-reward-rate-index .page-actions .add[disabled]:active, +.adminhtml-reward-rate-index .page-actions .add.disabled:active, +.customer-group-index .page-actions .add[disabled]:hover, +.customer-group-index .page-actions .add.disabled:hover, +.customer-group-index .page-actions .add[disabled]:active, +.customer-group-index .page-actions .add.disabled:active, +.checkout-agreement-index .page-actions .add[disabled]:hover, +.checkout-agreement-index .page-actions .add.disabled:hover, +.checkout-agreement-index .page-actions .add[disabled]:active, +.checkout-agreement-index .page-actions .add.disabled:active, +.catalog-product-attribute-index .page-actions .add[disabled]:hover, +.catalog-product-attribute-index .page-actions .add.disabled:hover, +.catalog-product-attribute-index .page-actions .add[disabled]:active, +.catalog-product-attribute-index .page-actions .add.disabled:active, +.catalog-product-set-index .page-actions .add[disabled]:hover, +.catalog-product-set-index .page-actions .add.disabled:hover, +.catalog-product-set-index .page-actions .add[disabled]:active, +.catalog-product-set-index .page-actions .add.disabled:active, +.catalog-product-new .actions-split > .action-toggle.primary[disabled]:hover, +.catalog-product-new .actions-split > .action-toggle.primary.disabled:hover, +.catalog-product-new .actions-split > .action-toggle.primary[disabled]:active, +.catalog-product-new .actions-split > .action-toggle.primary.disabled:active, +.catalog-product-edit .actions-split > .action-toggle.primary[disabled]:hover, +.catalog-product-edit .actions-split > .action-toggle.primary.disabled:hover, +.catalog-product-edit .actions-split > .action-toggle.primary[disabled]:active, +.catalog-product-edit .actions-split > .action-toggle.primary.disabled:active, +.catalog-product-index .actions-split > .action-toggle.primary[disabled]:hover, +.catalog-product-index .actions-split > .action-toggle.primary.disabled:hover, +.catalog-product-index .actions-split > .action-toggle.primary[disabled]:active, +.catalog-product-index .actions-split > .action-toggle.primary.disabled:active, +.catalog-product-new .actions-split.btn-round .action-default.primary[disabled]:hover, +.catalog-product-new .actions-split.btn-round .action-default.primary.disabled:hover, +.catalog-product-new .actions-split.btn-round .action-default.primary[disabled]:active, +.catalog-product-new .actions-split.btn-round .action-default.primary.disabled:active, +.catalog-product-edit .actions-split.btn-round .action-default.primary[disabled]:hover, +.catalog-product-edit .actions-split.btn-round .action-default.primary.disabled:hover, +.catalog-product-edit .actions-split.btn-round .action-default.primary[disabled]:active, +.catalog-product-edit .actions-split.btn-round .action-default.primary.disabled:active, +.catalog-product-index .actions-split.btn-round .action-default.primary[disabled]:hover, +.catalog-product-index .actions-split.btn-round .action-default.primary.disabled:hover, +.catalog-product-index .actions-split.btn-round .action-default.primary[disabled]:active, +.catalog-product-index .actions-split.btn-round .action-default.primary.disabled:active { + color: #fff; + background: #007dbd; + border: 1px solid #0574ad; +} +.PrimaryAddButton, +.PrimarySplitButton.btn-round .action-default.primary, +.sales-order-index .page-actions .add, +.adminhtml-rma-index .page-actions .add, +.adminhtml-catalog-event-index .page-actions .add, +.adminhtml-urlrewrite-index .page-actions .add, +.catalog-search-index .page-actions .add, +.catalog-product-review-index .page-actions .add, +.catalog-rule-promo-catalog-index .page-actions .add, +.sales-rule-promo-quote-index .page-actions .add, +.adminhtml-reminder-index .page-actions .add, +.adminhtml-newsletter-template-index .page-actions .add, +.adminhtml-system-email-template-index .page-actions .add, +.adminhtml-sitemap-index .page-actions .add, +.adminhtml-googleshopping-types-index .page-actions .add, +.customer-index-index .page-actions .add, +.adminhtml-cms-page-index .page-actions .add, +.cms-block-index .page-actions .add, +.adminhtml-banner-index .page-actions .add, +.adminhtml-widget-instance-index .page-actions .add, +.cms-page-index .page-actions .add, +.adminhtml-webapi-user-index .page-actions .add, +.adminhtml-webapi-role-index .page-actions .add, +.adminhtml-system-variable-index .page-actions .add, +.adminhtml-user-index .page-actions .add, +.adminhtml-user-role-index .page-actions .add, +.adminhtml-webhook-subscription-index .page-actions .add, +.adminhtml-integration-index .page-actions .add, +.adminhtml-system-design-theme-index .page-actions .add, +.adminhtml-system-design-index .page-actions .add, +.adminhtml-customer-attribute-index .page-actions .add, +.adminhtml-customer-address-attribute-index .page-actions .add, +.rating-index-index .page-actions .add, +.tax-rule-index .page-actions .add, +.tax-rate-index .page-actions .add, +.adminhtml-rma-item-attribute-index .page-actions .add, +.adminhtml-reward-rate-index .page-actions .add, +.customer-group-index .page-actions .add, +.checkout-agreement-index .page-actions .add, +.catalog-product-attribute-index .page-actions .add, +.catalog-product-set-index .page-actions .add, +.catalog-product-new .actions-split.btn-round .action-default.primary, +.catalog-product-edit .actions-split.btn-round .action-default.primary, +.catalog-product-index .actions-split.btn-round .action-default.primary, +.PrimarySplitButton.btn-round .action-default.primary, +.sales-order-index .page-actions .add, +.adminhtml-rma-index .page-actions .add, +.adminhtml-catalog-event-index .page-actions .add, +.adminhtml-urlrewrite-index .page-actions .add, +.catalog-search-index .page-actions .add, +.catalog-product-review-index .page-actions .add, +.catalog-rule-promo-catalog-index .page-actions .add, +.sales-rule-promo-quote-index .page-actions .add, +.adminhtml-reminder-index .page-actions .add, +.adminhtml-newsletter-template-index .page-actions .add, +.adminhtml-system-email-template-index .page-actions .add, +.adminhtml-sitemap-index .page-actions .add, +.adminhtml-googleshopping-types-index .page-actions .add, +.customer-index-index .page-actions .add, +.adminhtml-cms-page-index .page-actions .add, +.cms-block-index .page-actions .add, +.adminhtml-banner-index .page-actions .add, +.adminhtml-widget-instance-index .page-actions .add, +.cms-page-index .page-actions .add, +.adminhtml-webapi-user-index .page-actions .add, +.adminhtml-webapi-role-index .page-actions .add, +.adminhtml-system-variable-index .page-actions .add, +.adminhtml-user-index .page-actions .add, +.adminhtml-user-role-index .page-actions .add, +.adminhtml-webhook-subscription-index .page-actions .add, +.adminhtml-integration-index .page-actions .add, +.adminhtml-system-design-theme-index .page-actions .add, +.adminhtml-system-design-index .page-actions .add, +.adminhtml-customer-attribute-index .page-actions .add, +.adminhtml-customer-address-attribute-index .page-actions .add, +.rating-index-index .page-actions .add, +.tax-rule-index .page-actions .add, +.tax-rate-index .page-actions .add, +.adminhtml-rma-item-attribute-index .page-actions .add, +.adminhtml-reward-rate-index .page-actions .add, +.customer-group-index .page-actions .add, +.checkout-agreement-index .page-actions .add, +.catalog-product-attribute-index .page-actions .add, +.catalog-product-set-index .page-actions .add, +.catalog-product-new .actions-split.btn-round .action-default.primary, +.catalog-product-edit .actions-split.btn-round .action-default.primary, +.catalog-product-index .actions-split.btn-round .action-default.primary { + width: 36px; + height: 31px; + overflow: hidden; + position: relative; + z-index: 1; + padding: 0; +} +.PrimaryAddButton:focus, +.PrimarySplitButton.btn-round .action-default.primary:focus, +.sales-order-index .page-actions .add:focus, +.adminhtml-rma-index .page-actions .add:focus, +.adminhtml-catalog-event-index .page-actions .add:focus, +.adminhtml-urlrewrite-index .page-actions .add:focus, +.catalog-search-index .page-actions .add:focus, +.catalog-product-review-index .page-actions .add:focus, +.catalog-rule-promo-catalog-index .page-actions .add:focus, +.sales-rule-promo-quote-index .page-actions .add:focus, +.adminhtml-reminder-index .page-actions .add:focus, +.adminhtml-newsletter-template-index .page-actions .add:focus, +.adminhtml-system-email-template-index .page-actions .add:focus, +.adminhtml-sitemap-index .page-actions .add:focus, +.adminhtml-googleshopping-types-index .page-actions .add:focus, +.customer-index-index .page-actions .add:focus, +.adminhtml-cms-page-index .page-actions .add:focus, +.cms-block-index .page-actions .add:focus, +.adminhtml-banner-index .page-actions .add:focus, +.adminhtml-widget-instance-index .page-actions .add:focus, +.cms-page-index .page-actions .add:focus, +.adminhtml-webapi-user-index .page-actions .add:focus, +.adminhtml-webapi-role-index .page-actions .add:focus, +.adminhtml-system-variable-index .page-actions .add:focus, +.adminhtml-user-index .page-actions .add:focus, +.adminhtml-user-role-index .page-actions .add:focus, +.adminhtml-webhook-subscription-index .page-actions .add:focus, +.adminhtml-integration-index .page-actions .add:focus, +.adminhtml-system-design-theme-index .page-actions .add:focus, +.adminhtml-system-design-index .page-actions .add:focus, +.adminhtml-customer-attribute-index .page-actions .add:focus, +.adminhtml-customer-address-attribute-index .page-actions .add:focus, +.rating-index-index .page-actions .add:focus, +.tax-rule-index .page-actions .add:focus, +.tax-rate-index .page-actions .add:focus, +.adminhtml-rma-item-attribute-index .page-actions .add:focus, +.adminhtml-reward-rate-index .page-actions .add:focus, +.customer-group-index .page-actions .add:focus, +.checkout-agreement-index .page-actions .add:focus, +.catalog-product-attribute-index .page-actions .add:focus, +.catalog-product-set-index .page-actions .add:focus, +.catalog-product-new .actions-split.btn-round .action-default.primary:focus, +.catalog-product-edit .actions-split.btn-round .action-default.primary:focus, +.catalog-product-index .actions-split.btn-round .action-default.primary:focus { + outline: none; +} +.PrimaryAddButton > span, +.PrimarySplitButton.btn-round .action-default.primary > span, +.sales-order-index .page-actions .add > span, +.adminhtml-rma-index .page-actions .add > span, +.adminhtml-catalog-event-index .page-actions .add > span, +.adminhtml-urlrewrite-index .page-actions .add > span, +.catalog-search-index .page-actions .add > span, +.catalog-product-review-index .page-actions .add > span, +.catalog-rule-promo-catalog-index .page-actions .add > span, +.sales-rule-promo-quote-index .page-actions .add > span, +.adminhtml-reminder-index .page-actions .add > span, +.adminhtml-newsletter-template-index .page-actions .add > span, +.adminhtml-system-email-template-index .page-actions .add > span, +.adminhtml-sitemap-index .page-actions .add > span, +.adminhtml-googleshopping-types-index .page-actions .add > span, +.customer-index-index .page-actions .add > span, +.adminhtml-cms-page-index .page-actions .add > span, +.cms-block-index .page-actions .add > span, +.adminhtml-banner-index .page-actions .add > span, +.adminhtml-widget-instance-index .page-actions .add > span, +.cms-page-index .page-actions .add > span, +.adminhtml-webapi-user-index .page-actions .add > span, +.adminhtml-webapi-role-index .page-actions .add > span, +.adminhtml-system-variable-index .page-actions .add > span, +.adminhtml-user-index .page-actions .add > span, +.adminhtml-user-role-index .page-actions .add > span, +.adminhtml-webhook-subscription-index .page-actions .add > span, +.adminhtml-integration-index .page-actions .add > span, +.adminhtml-system-design-theme-index .page-actions .add > span, +.adminhtml-system-design-index .page-actions .add > span, +.adminhtml-customer-attribute-index .page-actions .add > span, +.adminhtml-customer-address-attribute-index .page-actions .add > span, +.rating-index-index .page-actions .add > span, +.tax-rule-index .page-actions .add > span, +.tax-rate-index .page-actions .add > span, +.adminhtml-rma-item-attribute-index .page-actions .add > span, +.adminhtml-reward-rate-index .page-actions .add > span, +.customer-group-index .page-actions .add > span, +.checkout-agreement-index .page-actions .add > span, +.catalog-product-attribute-index .page-actions .add > span, +.catalog-product-set-index .page-actions .add > span, +.catalog-product-new .actions-split.btn-round .action-default.primary > span, +.catalog-product-edit .actions-split.btn-round .action-default.primary > span, +.catalog-product-index .actions-split.btn-round .action-default.primary > span { + text-indent: -999em; + display: block; + width: 34px; + height: 29px; +} +.PrimaryAddButton > span:before, +.PrimarySplitButton.btn-round .action-default.primary > span:before, +.sales-order-index .page-actions .add > span:before, +.adminhtml-rma-index .page-actions .add > span:before, +.adminhtml-catalog-event-index .page-actions .add > span:before, +.adminhtml-urlrewrite-index .page-actions .add > span:before, +.catalog-search-index .page-actions .add > span:before, +.catalog-product-review-index .page-actions .add > span:before, +.catalog-rule-promo-catalog-index .page-actions .add > span:before, +.sales-rule-promo-quote-index .page-actions .add > span:before, +.adminhtml-reminder-index .page-actions .add > span:before, +.adminhtml-newsletter-template-index .page-actions .add > span:before, +.adminhtml-system-email-template-index .page-actions .add > span:before, +.adminhtml-sitemap-index .page-actions .add > span:before, +.adminhtml-googleshopping-types-index .page-actions .add > span:before, +.customer-index-index .page-actions .add > span:before, +.adminhtml-cms-page-index .page-actions .add > span:before, +.cms-block-index .page-actions .add > span:before, +.adminhtml-banner-index .page-actions .add > span:before, +.adminhtml-widget-instance-index .page-actions .add > span:before, +.cms-page-index .page-actions .add > span:before, +.adminhtml-webapi-user-index .page-actions .add > span:before, +.adminhtml-webapi-role-index .page-actions .add > span:before, +.adminhtml-system-variable-index .page-actions .add > span:before, +.adminhtml-user-index .page-actions .add > span:before, +.adminhtml-user-role-index .page-actions .add > span:before, +.adminhtml-webhook-subscription-index .page-actions .add > span:before, +.adminhtml-integration-index .page-actions .add > span:before, +.adminhtml-system-design-theme-index .page-actions .add > span:before, +.adminhtml-system-design-index .page-actions .add > span:before, +.adminhtml-customer-attribute-index .page-actions .add > span:before, +.adminhtml-customer-address-attribute-index .page-actions .add > span:before, +.rating-index-index .page-actions .add > span:before, +.tax-rule-index .page-actions .add > span:before, +.tax-rate-index .page-actions .add > span:before, +.adminhtml-rma-item-attribute-index .page-actions .add > span:before, +.adminhtml-reward-rate-index .page-actions .add > span:before, +.customer-group-index .page-actions .add > span:before, +.checkout-agreement-index .page-actions .add > span:before, +.catalog-product-attribute-index .page-actions .add > span:before, +.catalog-product-set-index .page-actions .add > span:before, +.catalog-product-new .actions-split.btn-round .action-default.primary > span:before, +.catalog-product-edit .actions-split.btn-round .action-default.primary > span:before, +.catalog-product-index .actions-split.btn-round .action-default.primary > span:before { + text-indent: 0; + font-family: 'MUI-Icons'; + font-weight: normal; + font-size: 22px; + content: '\e02d'; + color: #fff; + position: absolute; + width: 34px; + height: 29px; + line-height: 29px; + text-align: center; + vertical-align: middle; + top: 0; + left: 0; + overflow: hidden; +} +.eq-ie9 .PrimaryAddButton > span:before, +.eq-ie9 .PrimarySplitButton.btn-round .action-default.primary > span:before, +.eq-ie9 .sales-order-index .page-actions .add > span:before, +.eq-ie9 .adminhtml-rma-index .page-actions .add > span:before, +.eq-ie9 .adminhtml-catalog-event-index .page-actions .add > span:before, +.eq-ie9 .adminhtml-urlrewrite-index .page-actions .add > span:before, +.eq-ie9 .catalog-search-index .page-actions .add > span:before, +.eq-ie9 .catalog-product-review-index .page-actions .add > span:before, +.eq-ie9 .catalog-rule-promo-catalog-index .page-actions .add > span:before, +.eq-ie9 .sales-rule-promo-quote-index .page-actions .add > span:before, +.eq-ie9 .adminhtml-reminder-index .page-actions .add > span:before, +.eq-ie9 .adminhtml-newsletter-template-index .page-actions .add > span:before, +.eq-ie9 .adminhtml-system-email-template-index .page-actions .add > span:before, +.eq-ie9 .adminhtml-sitemap-index .page-actions .add > span:before, +.eq-ie9 .adminhtml-googleshopping-types-index .page-actions .add > span:before, +.eq-ie9 .customer-index-index .page-actions .add > span:before, +.eq-ie9 .adminhtml-cms-page-index .page-actions .add > span:before, +.eq-ie9 .cms-block-index .page-actions .add > span:before, +.eq-ie9 .adminhtml-banner-index .page-actions .add > span:before, +.eq-ie9 .adminhtml-widget-instance-index .page-actions .add > span:before, +.eq-ie9 .cms-page-index .page-actions .add > span:before, +.eq-ie9 .adminhtml-webapi-user-index .page-actions .add > span:before, +.eq-ie9 .adminhtml-webapi-role-index .page-actions .add > span:before, +.eq-ie9 .adminhtml-system-variable-index .page-actions .add > span:before, +.eq-ie9 .adminhtml-user-index .page-actions .add > span:before, +.eq-ie9 .adminhtml-user-role-index .page-actions .add > span:before, +.eq-ie9 .adminhtml-webhook-subscription-index .page-actions .add > span:before, +.eq-ie9 .adminhtml-integration-index .page-actions .add > span:before, +.eq-ie9 .adminhtml-system-design-theme-index .page-actions .add > span:before, +.eq-ie9 .adminhtml-system-design-index .page-actions .add > span:before, +.eq-ie9 .adminhtml-customer-attribute-index .page-actions .add > span:before, +.eq-ie9 .adminhtml-customer-address-attribute-index .page-actions .add > span:before, +.eq-ie9 .rating-index-index .page-actions .add > span:before, +.eq-ie9 .tax-rule-index .page-actions .add > span:before, +.eq-ie9 .tax-rate-index .page-actions .add > span:before, +.eq-ie9 .adminhtml-rma-item-attribute-index .page-actions .add > span:before, +.eq-ie9 .adminhtml-reward-rate-index .page-actions .add > span:before, +.eq-ie9 .customer-group-index .page-actions .add > span:before, +.eq-ie9 .checkout-agreement-index .page-actions .add > span:before, +.eq-ie9 .catalog-product-attribute-index .page-actions .add > span:before, +.eq-ie9 .catalog-product-set-index .page-actions .add > span:before, +.eq-ie9 .catalog-product-new .actions-split.btn-round .action-default.primary > span:before, +.eq-ie9 .catalog-product-edit .actions-split.btn-round .action-default.primary > span:before, +.eq-ie9 .catalog-product-index .actions-split.btn-round .action-default.primary > span:before { + line-height: 31px; +} +.PrimarySplitButton.btn-round .action-default.primary, +.catalog-product-new .actions-split.btn-round .action-default.primary, +.catalog-product-edit .actions-split.btn-round .action-default.primary, +.catalog-product-index .actions-split.btn-round .action-default.primary, +.catalog-product-new .actions-split.btn-round .action-default.primary, +.catalog-product-edit .actions-split.btn-round .action-default.primary, +.catalog-product-index .actions-split.btn-round .action-default.primary { + border-radius: 2px 0 0 2px; +} +.PrimarySplitButton.btn-round .action-default.primary:focus, +.catalog-product-new .actions-split.btn-round .action-default.primary:focus, +.catalog-product-edit .actions-split.btn-round .action-default.primary:focus, +.catalog-product-index .actions-split.btn-round .action-default.primary:focus { + outline: none; +} +.PrimarySplitButton > .action-default.primary, +.catalog-product-new .actions-split > .action-default.primary, +.catalog-product-edit .actions-split > .action-default.primary, +.catalog-product-index .actions-split > .action-default.primary { + border-radius: 2px 0 0 2px; +} +.PrimarySplitButton > .action-default.primary:focus, +.catalog-product-new .actions-split > .action-default.primary:focus, +.catalog-product-edit .actions-split > .action-default.primary:focus, +.catalog-product-index .actions-split > .action-default.primary:focus { + outline: none; +} +.PrimarySplitButton > .action-toggle.primary, +.catalog-product-new .actions-split > .action-toggle.primary, +.catalog-product-edit .actions-split > .action-toggle.primary, +.catalog-product-index .actions-split > .action-toggle.primary, +.catalog-product-new .actions-split > .action-toggle.primary, +.catalog-product-edit .actions-split > .action-toggle.primary, +.catalog-product-index .actions-split > .action-toggle.primary { + overflow: hidden; + z-index: 1; + padding: 0; + border-radius: 0 2px 2px 0; + font-size: 15px; + width: 30px; + height: 31px; + line-height: 30px; + margin-left: -1px; + position: relative; + z-index: 2; + filter: none; +} +.PrimarySplitButton > .action-toggle.primary:focus, +.catalog-product-new .actions-split > .action-toggle.primary:focus, +.catalog-product-edit .actions-split > .action-toggle.primary:focus, +.catalog-product-index .actions-split > .action-toggle.primary:focus { + outline: none; +} +.PrimarySplitButton > .action-toggle.primary:before, +.catalog-product-new .actions-split > .action-toggle.primary:before, +.catalog-product-edit .actions-split > .action-toggle.primary:before, +.catalog-product-index .actions-split > .action-toggle.primary:before { + text-align: center; +} +.PrimarySplitButton .dropdown-menu, +.catalog-product-new .actions-split .dropdown-menu, +.catalog-product-edit .actions-split .dropdown-menu, +.catalog-product-index .actions-split .dropdown-menu { + left: 0; + right: auto; + z-index: 1; +} +.PrimarySplitButton .dropdown-menu > li > .item, +.catalog-product-new .actions-split .dropdown-menu > li > .item, +.catalog-product-edit .actions-split .dropdown-menu > li > .item, +.catalog-product-index .actions-split .dropdown-menu > li > .item { + padding: 9px 10px 10px; +} +.PrimarySplitButton.active > .action-toggle.primary, +.PrimarySplitButton.active > .action-toggle.primary:hover, +.catalog-product-new .actions-split.active > .action-toggle.primary, +.catalog-product-new .actions-split.active > .action-toggle.primary:hover, +.catalog-product-edit .actions-split.active > .action-toggle.primary, +.catalog-product-edit .actions-split.active > .action-toggle.primary:hover, +.catalog-product-index .actions-split.active > .action-toggle.primary, +.catalog-product-index .actions-split.active > .action-toggle.primary:hover { + background: #026294; + border: 1px solid #004c74; +} +.dont-use-this-class-big-size { + font-size: 18px; + line-height: 24px; + padding: 8px 19px; +} +/* + Reset 'button view' for actions +-------------------------------------- */ +.customer-current-activity .action-refresh, +.pager .action-next, +.pager .action-previous, +.pager .action-next:hover, +.pager .action-previous:hover, +.pager .action-next.disabled:focus, +.pager .action-previous.disabled:focus, +.pager .action-next.disabled:active, +.pager .action-previous.disabled:active, +.data-table .action-.delete, +.data-table .action-.delete:hover, +.data-table .action-.delete:active, +.data-table .action-.delete.active, +.data-table .action-delete, +.data-table .action-delete:hover, +.data-table .action-delete:active, +.data-table .action-delete.active, +.data-table .action-locked, +.data-table .action-locked:hover, +.data-table .action-locked:active, +.data-table .action-locked.active, +.data-table .action-locked[disabled], +#product-variations-matrix .action-choose, +#product-variations-matrix .action-choose:hover, +#product-variations-matrix .action-choose:active, +#product-variations-matrix .action-choose.active, +#product-variations-matrix .action-choose[disabled], +.action-manage-images, +.action-manage-images:hover, +.action-manage-images:active, +.action-manage-images.active, +.action-manage-images[disabled], +.image-panel .action-close, +.image-panel .action-close:hover, +.image-panel .action-close:active, +.image-panel .action-close.active, +.image-panel .action-close[disabled], +.image-panel-controls .action-remove, +.image-panel-controls .action-remove:hover, +.image-panel-controls .action-remove:active, +.image-panel-controls .action-remove.active, +.image-panel-controls .action-remove[disabled], +.vde-image-sizing .action-connect, +.vde-image-sizing .action-connect:hover, +.vde-image-sizing .action-connect:active, +.vde-image-sizing .action-connect.active, +.vde-image-sizing .action-connect[disabled], +.suggest-expandable .action-show-all, +.suggest-expandable .action-show-all:hover, +.suggest-expandable .action-show-all:active, +.suggest-expandable .action-show-all.active, +.suggest-expandable .action-show-all[disabled], +.custom-file > .action-add, +.custom-file > .action-add:hover, +.custom-file > .action-add:active, +.custom-file > .action-add.active, +.custom-file > .action-add[disabled], +.vde-tools-header .action-close, +.vde-tools-header .action-close:hover, +.vde-tools-header .action-close:active, +.vde-tools-header .action-close.active, +.image .action-delete, +.image .action-delete:hover, +.image .action-delete:active, +.image .action-delete.active, +.fieldset-wrapper-title .actions .action-delete, +.fieldset-wrapper-title .actions .action-delete:hover, +.fieldset-wrapper-title .actions .action-delete:active, +.fieldset-wrapper-title .actions .action-delete.active, +.address-list-item-actions .action-delete, +.address-list-item-actions .action-delete:hover, +.address-list-item-actions .action-delete:active, +.address-list-item-actions .action-delete.active, +.notification .action-close, +.notification .action-close:hover, +.notification .action-close:active, +.notification .action-close.active, +.page-login .action-forgotpassword, +.page-login .action-forgotpassword:hover, +.page-login .action-forgotpassword:active, +.page-login .action-forgotpassword.active, +.page-login .action-back, +.page-login .action-back:hover, +.page-login .action-back:active, +.page-login .action-back.active, +.attribute-popup .page-actions #reset, +.attribute-popup .page-actions #reset:hover, +.attribute-popup .page-actions #reset:active, +.attribute-popup .page-actions #reset.active, +.attribute-popup .page-actions #reset[disabled] { + border: none; + border-radius: 0; + background: none; + margin: 0; + padding: 0; + box-shadow: none; + text-shadow: none; + filter: none; +} +.attribute-popup .messages { + margin: 0 15px; +} +.eq-ie8 .customer-current-activity .action-refresh, +.eq-ie8 .pager .action-next, +.eq-ie8 .pager .action-previous, +.eq-ie8 .pager .action-next:hover, +.eq-ie8 .pager .action-previous:hover, +.eq-ie8 .pager .action-next.disabled:focus, +.eq-ie8 .pager .action-previous.disabled:focus, +.eq-ie8 .pager .action-next.disabled:active, +.eq-ie8 .pager .action-previous.disabled:active, +.eq-ie8 .data-table .action-.delete, +.eq-ie8 .data-table .action-.delete:hover, +.eq-ie8 .data-table .action-.delete:active, +.eq-ie8 .data-table .action-.delete.active, +.eq-ie8 .data-table .action-delete, +.eq-ie8 .data-table .action-delete:hover, +.eq-ie8 .data-table .action-delete:active, +.eq-ie8 .data-table .action-delete.active, +.eq-ie8 .data-table .action-locked, +.eq-ie8 .data-table .action-locked:hover, +.eq-ie8 .data-table .action-locked:active, +.eq-ie8 .data-table .action-locked.active, +.eq-ie8 #product-variations-matrix .action-choose, +.eq-ie8 #product-variations-matrix .action-choose:hover, +.eq-ie8 #product-variations-matrix .action-choose:active, +.eq-ie8 #product-variations-matrix .action-choose.active, +.eq-ie8 .image-panel .action-close, +.eq-ie8 .eq-ie8 .image-panel .action-close:hover, +.eq-ie8 .image-panel .action-close:active, +.eq-ie8 .image-panel .action-close.active, +.eq-ie8 .image-panel-controls .action-remove, +.eq-ie8 .image-panel-controls .action-remove:hover, +.eq-ie8 .image-panel-controls .action-remove:active, +.eq-ie8 .image-panel-controls .action-remove.active, +.eq-ie8 .suggest-expandable .action-show-all, +.eq-ie8 .suggest-expandable .action-show-all:hover, +.eq-ie8 .suggest-expandable .action-show-all:active, +.eq-ie8 .suggest-expandable .action-show-all.active, +.eq-ie8 .vde-tools-header .action-close, +.eq-ie8 .vde-tools-header .action-close:hover, +.eq-ie8 .vde-tools-header .action-close:active, +.eq-ie8 .vde-tools-header .action-close.active, +.eq-ie8 .image .action-delete, +.eq-ie8 .image .action-delete:hover, +.eq-ie8 .image .action-delete:active, +.eq-ie8 .image .action-delete.active, +.eq-ie8 .fieldset-wrapper-title .actions .action-delete, +.eq-ie8 .fieldset-wrapper-title .actions .action-delete:hover, +.eq-ie8 .fieldset-wrapper-title .actions .action-delete:active, +.eq-ie8 .fieldset-wrapper-title .actions .action-delete.active, +.eq-ie8 .address-list-item-actions .action-delete, +.eq-ie8 .address-list-item-actions .action-delete:hover, +.eq-ie8 .address-list-item-actions .action-delete:active, +.eq-ie8 .address-list-item-actions .action-delete.active, +.eq-ie8 .notification .action-close, +.eq-ie8 .notification .action-close:hover, +.eq-ie8 .notification .action-close:active, +.eq-ie8 .notification .action-close.active, +.eq-ie8 .page-login .action-forgotpassword, +.eq-ie8 .page-login .action-forgotpassword:hover, +.eq-ie8 .page-login .action-forgotpassword:active, +.eq-ie8 .page-login .action-forgotpassword.active, +.eq-ie8 .page-login .action-back, +.eq-ie8 .page-login .action-back:hover, +.eq-ie8 .page-login .action-back:active, +.eq-ie8 .page-login .action-back.active { + border: none; + border-radius: 0; + background: none; + margin: 0; + padding: 0; + box-shadow: none; + text-shadow: none; + filter: none; +} +.data-table .action-.delete[disabled], +.data-table .action-delete[disabled], +.data-table .action-locked[disabled], +#product-variations-matrix .action-choose[disabled], +.image-panel .action-close[disabled], +.image-panel-controls .action-remove[disabled], +.suggest-expandable .action-show-all[disabled], +#store-view-window [class^='action-close'], +#store-view-window [class^='action-close']:hover, +#store-view-window [class^='action-close']:active, +#store-view-window [class^='action-close'].active, +#store-view-window [class^='action-close'][disabled], +.custom-file > .action-add[disabled], +.image .action-delete, +.image .action-delete:hover, +.image .action-delete:active, +.image .action-delete.active, +.fieldset-wrapper-title .actions .action-delete, +.fieldset-wrapper-title .actions .action-delete:hover, +.fieldset-wrapper-title .actions .action-delete:active, +.fieldset-wrapper-title .actions .action-delete.active, +.address-list-item-actions .action-delete, +.address-list-item-actions .action-delete:hover, +.address-list-item-actions .action-delete:active, +.address-list-item-actions .action-delete.active, +.notification .action-close, +.notification .action-close:hover, +.notification .action-close:active, +.notification .action-close.active { + border: none; + border-radius: 0; + background: none; + margin: 0; + padding: 0; + box-shadow: none; + text-shadow: none; + filter: none; +} +.fade.critical-notification { + display: block; +} +.fade.critical-notification .popup { + top: 200px; +} +.data-table .action-.delete[disabled], +.data-table .action-delete[disabled], +.data-table .action-locked[disabled], +#product-variations-matrix .action-choose[disabled], +.image-panel .action-close[disabled], +.image-panel-controls .action-remove[disabled], +.suggest-expandable .action-show-all[disabled], +#store-view-window [class^='action-close'], +#store-view-window [class^='action-close']:hover, +#store-view-window [class^='action-close']:active, +#store-view-window [class^='action-close'].active, +#store-view-window [class^='action-close'][disabled], +.custom-file > .action-add[disabled], +.vde-tools-header .action-close[disabled], +.vde-image-sizing .action-reset, +.vde-image-sizing .action-reset:hover, +.vde-image-sizing .action-reset:active, +.vde-image-sizing .action-reset.active, +.vde-image-sizing .action-reset[disabled], +.image .action-delete[disabled], +.fieldset-wrapper-title .actions .action-delete[disabled], +.address-list-item-actions .action-delete[disabled], +[class^=" catalog-product-"] .page-actions .action-back, +[class^=" catalog-product-"] .page-actions .action-back:hover, +[class^=" catalog-product-"] .page-actions .action-back:active, +[class^=" catalog-product-"] .page-actions .action-back.active, +[class^=" catalog-product-"] .page-actions .action-back[disabled], +[class^=" adminhtml-newsletter-"] .page-actions .action-back, +[class^=" adminhtml-newsletter-"] .page-actions .action-back:hover, +[class^=" adminhtml-newsletter-"] .page-actions .action-back:active, +[class^=" adminhtml-newsletter-"] .page-actions .action-back.active, +[class^=" adminhtml-newsletter-"] .page-actions .action-back[disabled], +.notifications [class^="action-"], +.notifications [class^="action-"]:hover, +.notifications [class^="action-"]:active, +.notifications [class^="action-"].active, +.notifications [class^="action-"][disabled], +.notification .action-close, +.notification .action-close:hover, +.notification .action-close:active, +.notification .action-close.active, +.notification .action-close[disabled], +.sales-order-create-index .page-actions-inner .cancel, +.sales-order-create-index .page-actions-inner .cancel:hover, +.sales-order-create-index .page-actions-inner .cancel:active, +.sales-order-create-index .page-actions-inner .cancel.active, +.sales-order-create-index .page-actions-inner .cancel[disabled] { + border: 0; + border-radius: 0; + background: none; + margin: 0; + padding: 0; + box-shadow: none; + text-shadow: none; + filter: none; +} +.vde-image-sizing .action-connect, +.vde-image-sizing .action-connect:hover, +.vde-image-sizing .action-connect:active, +.vde-image-sizing .action-connect.active, +.vde-image-sizing .action-connect[disabled], +.vde-tab-data .action-download, +.vde-tab-data .action-download:hover, +.vde-tab-data .action-download:active, +.vde-tab-data .action-download.active, +.vde-tab-data .action-download[disabled], +.vde-tab-data .action-delete, +.vde-tab-data .action-delete:hover, +.vde-tab-data .action-delete:active, +.vde-tab-data .action-delete.active, +.vde-tab-data .action-delete[disabled], +.vde-tab-data .action-edit, +.vde-tab-data .action-edit:hover, +.vde-tab-data .action-edit:active, +.vde-tab-data .action-edit.active, +.vde-tab-data .action-edit[disabled] { + border: none; + border-radius: 0; + background: none; + margin: 0; + padding: 0; + box-shadow: none; + text-shadow: none; +} +/* + Actions as links +-------------------------------------- */ +.notification-entry-dialog .action-cancel, +.attribute-popup .page-actions #reset { + background: none; + border: none; + color: #6d665e; + font-weight: normal; + font-size: 12px; + cursor: pointer; + text-decoration: underline; +} +.notification-entry-dialog .action-cancel:hover, +.attribute-popup .page-actions #reset:hover { + color: #000; + border-bottom-color: #000; + filter: none; +} +/* + Fileupload button +-------------------------------------- */ +.action-upload { + position: relative; +} +.action-upload > input[type="file"] { + position: absolute; + left: 0; + top: 0; + right: 0; + bottom: 0; + opacity: 0; + font-size: 10em; +} +/* + Dropdown menu +-------------------------------------- */ +.dropdown-menu, +.ui-autocomplete { + position: absolute; + display: none; + list-style: none; + min-width: 100px; + margin: 3px 0 0 0; + padding: 0; + right: 0; + top: 100%; + border: 1px solid #cac2b5; + border-radius: 3px; + background: #fff; + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); + z-index: 990; +} +.dropdown-menu > li, +.ui-autocomplete > li { + padding: 5px; + border-bottom: 1px solid #e5e5e5; +} +.dropdown-menu > li.selected, +.ui-autocomplete > li.selected { + background: #eef8fc; +} +.dropdown-menu > li:hover, +.ui-autocomplete > li:hover { + background: #eef8fc; +} +.dropdown-menu > li:last-child, +.ui-autocomplete > li:last-child { + border-bottom: none; +} +.dropdown-menu > li > .item, +.ui-autocomplete > li > .item { + cursor: pointer; +} +.dropdown-menu-top { + margin: 0 0 3px 0; + top: auto; + bottom: 100%; +} +.ui-autocomplete { + right: auto; +} +.ui-autocomplete > li { + padding: 0; +} +.ui-autocomplete > li > a { + display: block; + padding: 5px; +} +.ui-autocomplete > li > a.level-0 { + padding-left: 5px !important; +} +.ui-autocomplete .ui-state-focus { + background: #f5f5f5; +} +/* + Suggest +-------------------------------------- */ +.mage-suggest { + position: relative; + display: inline-block; + vertical-align: top; + width: 100%; + background-color: #fff; + border: 1px solid #ccc; + border-radius: 3px; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} +.mage-suggest:after { + position: absolute; + top: 0; + right: 3px; + bottom: 0; + width: 22px; + text-align: center; + font-family: 'MUI-Icons'; + font-style: normal; + speak: none; + font-weight: normal; + -webkit-font-smoothing: antialiased; + content: '\e01f'; + /* search icon */ + + font-size: 20px; + color: #b2b2b2; +} +.mage-suggest input[type="search"], +.mage-suggest input.search { + width: 100%; + border: none; + background: none; + padding-right: 30px; +} +.mage-suggest-dropdown { + position: absolute; + left: 0; + right: 0; + top: 100%; + margin: 3px -1px 0 -1px; + border: 1px solid #cac2b5; + border-radius: 3px; + background: #fff; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); + z-index: 990; +} +.mage-suggest-dropdown ul { + margin: 0; + padding: 0; + list-style: none; +} +.mage-suggest-dropdown li { + border-bottom: 1px solid #e5e5e5; + padding: 0; +} +.field-category_ids .mage-suggest-dropdown, +.field-new_category_parent .mage-suggest-dropdown { + max-height: 200px; + overflow: auto; +} +.mage-suggest-dropdown li a { + display: block; +} +.mage-suggest-dropdown li a, +.mage-suggest-dropdown .jstree li a:hover, +.mage-suggest-dropdown .jstree .jstree-hovered, +.mage-suggest-dropdown .jstree .jstree-clicked { + padding: 6px 12px 5px; + text-decoration: none; + color: #333; +} +.mage-suggest-dropdown .jstree li a:hover, +.mage-suggest-dropdown .jstree .jstree-hovered, +.mage-suggest-dropdown .jstree .jstree-clicked { + border: none; +} +.mage-suggest-dropdown li a.ui-state-focus { + background: #f5f5f5; +} +.mage-suggest-dropdown .jstree li { + border-bottom: 0; +} +.mage-suggest-dropdown .jstree li a { + display: inline-block; +} +.mage-suggest-dropdown .jstree .mage-suggest-selected > a { + color: #000000; + background: #F1FFEB; +} +.mage-suggest-dropdown .jstree .mage-suggest-selected > a:hover, +.mage-suggest-dropdown .jstree .mage-suggest-selected > .jstree-hovered, +.mage-suggest-dropdown .jstree .mage-suggest-selected > .jstree-clicked, +.mage-suggest-dropdown .jstree .mage-suggest-selected.mage-suggest-not-active > .jstree-hovered, +.mage-suggest-dropdown .jstree .mage-suggest-selected.mage-suggest-not-active > .jstree-clicked { + background: #E5FFD9; +} +.mage-suggest-dropdown .jstree .mage-suggest-not-active > a { + color: #D4D4D4; +} +.mage-suggest-dropdown .jstree .mage-suggest-not-active > a:hover, +.mage-suggest-dropdown .jstree .mage-suggest-not-active > .jstree-hovered, +.mage-suggest-dropdown .jstree .mage-suggest-not-active > .jstree-clicked { + background: #F5F5F5; +} +.mage-suggest-dropdown .category-path { + font-size: 11px; + margin-left: 10px; + color: #9ba8b5; +} +.suggest-expandable .actions-split .action-toggle { + display: inline-block; + max-width: 500px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + background: none; + border: none; + box-shadow: none; + color: #676056; + font-size: 12px; + padding: 5px 4px; + filter: none; +} +.suggest-expandable .actions-split .action-toggle span { + display: inline; +} +.suggest-expandable .actions-split .action-toggle:before { + display: inline-block; + float: right; + margin-left: 4px; + font-size: 13px; + color: #b2b0ad; +} +.suggest-expandable .actions-split .action-toggle:hover:before { + color: #7e7e7e; +} +.suggest-expandable .dropdown-menu { + margin: 1px 0 0; + left: 0; + right: auto; + width: 221px; +} +.suggest-expandable .mage-suggest { + border: none; +} +.suggest-expandable .mage-suggest:after { + top: 6px; + right: 6px; +} +.suggest-expandable .mage-suggest-inner .title { + margin: 0; + padding: 0 10px 4px; + text-transform: uppercase; + color: #a6a098; + font-size: 12px; + border-bottom: 1px solid #e5e5e5; +} +.suggest-expandable .mage-suggest-inner > input[type="search"], +.suggest-expandable .mage-suggest-inner > input.search { + position: relative; + margin: 6px 5px 5px; + padding-right: 20px; + border: 1px solid #ccc; + width: 211px; + z-index: 1; +} +.suggest-expandable .mage-suggest-inner > input.ui-autocomplete-loading, +.suggest-expandable .mage-suggest-inner > input.mage-suggest-state-loading { + background: #ffffff url(../mui/images/ajax-loader-small.gif) no-repeat 190px 50%; +} +.suggest-expandable .mage-suggest { + border-radius: 3px 3px 0 0; +} +.suggest-expandable .mage-suggest-dropdown { + margin-top: 0; + border-top: 0; + border-radius: 0 0 3px 3px; + max-height: 300px; + overflow: auto; + width: 100%; + float: left; +} +.suggest-expandable .mage-suggest-dropdown ul { + margin: 0; + padding: 0; + list-style: none; +} +.suggest-expandable .action-show-all, +.suggest-expandable .action-show-all:hover, +.suggest-expandable .action-show-all:active, +.suggest-expandable .action-show-all:focus, +.suggest-expandable .action-show-all[disabled] { + border-top: 1px solid #e5e5e5; + display: block; + width: 100%; + padding: 8px 10px 10px; + text-align: left; + font: 12px/1.333 Arial, Verdana, sans-serif; + color: #676056; +} +.page-actions .suggest-expandable { + max-width: 500px; + float: left; + margin-top: 1px; +} +.page-actions.fixed #product-template-suggest-container { + display: none; +} +/* + Actions Split +-------------------------------------- */ +.actions-split { + text-align: left; + position: relative; + display: inline-block; +} +.actions-split > [class^='action-'] { + float: left; + border-radius: 0; +} +.actions-split > .action-default { + border-radius: 5px 0 0 5px; +} +.actions-split > .action-toggle { + border-left: 1px solid #c5c0b9; + border-radius: 0 5px 5px 0; + margin-left: -1px; + padding: 4px 7px; +} +.actions-split > .action-toggle > span { + display: none; +} +.actions-split > .action-toggle:before { + display: block; + font-family: 'MUI-Icons'; + font-style: normal; + speak: none; + font-weight: normal; + -webkit-font-smoothing: antialiased; + content: '\e02c'; + /* arrow down */ + + font-size: 11px; +} +.actions-split > .action-toggle.active:before { + content: '\e029'; + /* arrow up */ + +} +.actions-split > .action-toggle.primary { + border-left: 1px solid #e1721d; +} +.actions-split > .action-toggle.primary:hover { + background: #e2701a; + margin-left: -1px; +} +.actions-split.active .dropdown-menu { + display: block; + white-space: nowrap; +} +.actions-split.active .dropdown-menu > li { + padding: 0; +} +.actions-split .dropdown-menu > li > .item { + display: block; + padding: 6px 10px 5px; + color: #333; + text-decoration: none; +} +/* Variations Image Uploader */ +.actions-image-uploader > img { + float: left; + border: solid #b7b2a7; + border-width: 1px 0 1px 1px; + width: 32px; + height: 31px; +} +.eq-ie8 .actions-image-uploader .action-upload { + filter: none; +} +.actions-image-uploader .action-toggle, +.actions-image-uploader .action-toggle:hover, +.actions-image-uploader .action-toggle:active, +.actions-image-uploader .action-toggle:focus, +.actions-image-uploader .action-toggle[disabled] { + position: relative; + height: 33px; + padding-left: 2px; + padding-right: 2px; + background: #fff; + filter: none; + color: #888; +} +.actions-image-uploader.active .action-toggle { + border-radius: 0 5px 0 0; +} +.actions-image-uploader.active .action-toggle:after { + position: absolute; + left: 0; + right: 0; + bottom: -1px; + height: 1px; + background: #fff; + z-index: 991; + content: ''; +} +.actions-image-uploader .dropdown-menu { + margin-top: -1px; + border-radius: 3px 0 3px 3px; +} +/* + Action delete icon +-------------------------------------- */ +/* TODO: replase ".action-.delete" to ".action-delete" after buttons refactoring */ +.data-table .action-.delete span, +.data-table .action-delete span, +.data-table .action-locked span, +.image .action-delete span, +.fieldset-wrapper-title .actions .action-delete span, +.address-list-item-actions .action-delete span { + display: none; +} +.data-table .action-.delete:before, +.data-table .action-delete:before, +.image .action-delete:before, +.fieldset-wrapper-title .actions .action-delete:before, +.address-list-item-actions .action-delete:before { + font-family: 'MUI-Icons'; + font-style: normal; + speak: none; + font-weight: normal; + font-size: 18px; + -webkit-font-smoothing: antialiased; + content: '\e07f'; + /* delete icon */ + + color: #b7b3ad; +} +/* + Locked action icon +-------------------------------------- */ +.data-table .action-locked:before { + font-family: 'MUI-Icons'; + font-style: normal; + speak: none; + font-weight: normal; + font-size: 20px; + -webkit-font-smoothing: antialiased; + content: '\e03e'; + /* lock icon */ + + color: #b7b3ad; +} +.data-table .action-.delete:hover:before, +.data-table .action-delete:hover:before, +.data-table .action-locked:hover:before, +.image .action-delete:hover:before, +.fieldset-wrapper-title .actions .action-delete:hover:before, +.address-list-item-actions .action-delete:hover:before { + color: #7e7e7e; +} +.data-table input.action-.delete[type="button"], +.data-table input.action-.delete[type="submit"], +.data-table input.action-.delete[type="reset"], +.data-table button.action-.delete, +.data-table input.action-.delete[type="button"]:visited, +.data-table input.action-.delete[type="submit"]:visited, +.data-table input.action-.delete[type="reset"]:visited, +.data-table button.action-.delete:visited, +.data-table input.action-.delete[type="button"]:hover, +.data-table input.action-.delete[type="submit"]:hover, +.data-table input.action-.delete[type="reset"]:hover, +.data-table button.action-.delete:hover, +.data-table input.action-.delete[type="button"]:active, +.data-table input.action-.delete[type="submit"]:active, +.data-table input.action-.delete[type="reset"]:active, +.data-table button.action-.delete:active { + background: transparent; + padding: 3px 7px 0; +} +.data-table input.action-.delete[type=button]:hover:before, +.data-table input.action-.delete[type=submit]:hover:before, +.data-table input.action-.delete[type=reset]:hover:before, +.data-table button.action-.delete:hover:before, +.data-table input.action-.delete[type=button]:focus:before, +.data-table input.action-.delete[type=submit]:focus:before, +.data-table input.action-.delete[type=reset]:focus:before, +.data-table button.action-.delete:focus:before { + background: transparent; + color: #a5a29d; +} +/* + Forms +-------------------------------------- */ +fieldset { + border: 1px solid #ccc; + padding: 20px; +} +legend { + padding: 0 10px; + margin: 0 -10px; +} +fieldset legend + br { + display: none; +} +label { + display: inline-block; +} +label > input[type="radio"], +label > input[type="checkbox"] { + margin: -3px 3px 0 0; + vertical-align: middle; +} +input[type=text], +input[type=password], +input[type=datetime], +input[type=datetime-local], +input[type=date], +input[type=month], +input[type=time], +input[type=week], +input[type=number], +input[type=range], +input[type=email], +input[type=url], +input[type=search], +input.search, +input[type=tel], +input[type=color], +textarea, +.input-text { + display: inline-block; + padding: 4px; + margin: 0; + background-color: #fff; + height: 28px; + color: #676056; + font-size: 14px; + font-weight: 400; + border: 1px solid #ccc; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; + border-radius: 4px; + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); +} +textarea, +.input-text { + height: auto; +} +textarea { + resize: vertical; +} +select { + height: 28px; + padding: 4px 4px 5px; + margin: 0 0 8px; + border: 1px solid #ccc; + border-radius: 4px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + -ms-box-sizing: border-box; + box-sizing: border-box; +} +select[multiple], +select[size] { + height: auto; +} +input[type=text]:focus, +input[type=password]:focus, +input[type=datetime]:focus, +input[type=datetime-local]:focus, +input[type=date]:focus, +input[type=month]:focus, +input[type=time]:focus, +input[type=week]:focus, +input[type=number]:focus, +input[type=range]:focus, +input[type=email]:focus, +input[type=url]:focus, +input[type=search]:focus, +input.search:focus, +input[type=tel]:focus, +input[type=color]:focus, +textarea:focus, +select:focus { + outline: 0; + border-color: #75b9f0; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); +} +input[type="radio"], +input[type="checkbox"] { + margin: 3px 0; + line-height: normal; +} +input[disabled], +select[disabled], +textarea[disabled], +input[readonly], +select[readonly], +textarea[readonly] { + cursor: not-allowed; + background-color: #fff; + border-color: #eee; + box-shadow: none; + color: #999; +} +select[disabled].multiselect > option[selected] { + color: #fff; + background: #6d6d6d; +} +.eq-ie8 select[disabled="disabled"][multiple="multiple"] option[selected="selected"] { + background-color: #ddd; +} +textarea:-moz-placeholder, +input:-moz-placeholder { + color: #999 !important; + font-style: italic; +} +option.placeholder { + color: #999 !important; + font-style: italic !important; +} +:-ms-input-placeholder { + color: #999 !important; + font-style: italic; +} +::-webkit-input-placeholder { + color: #999 !important; +} +:-moz-placeholder { + color: #999 !important; +} +.form-inline .control { + width: 100%; +} +.form-inline .label { + width: 20%; + padding-top: 6px; +} +.form-inline .label ~ .control { + width: 60%; +} +.form-inline .no-label .control { + margin-left: 20%; + width: 60%; +} +fieldset.field [class^='fields-group-'] .field .control { + width: auto; + margin: 0 0 0 20px; +} +.form-inline .field-service { + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; + float: left; + width: 20%; + padding: 7px 0 0 15px; + color: #999; + font-size: 12px; + letter-spacing: 0.05em; +} +.form-inline .field-service[value-scope]:before { + content: attr(value-scope) !important; + white-space: nowrap; + display: block; + margin-bottom: 5px; +} +.form-inline .field-service .checkbox { + margin: 0; + vertical-align: middle; +} +.control > input { + width: 100%; +} +.control > input[type="button"] { + width: auto; +} +.control > input.hasDatepicker { + width: 130px; +} +.control > input[type="radio"], +.control > input[type="checkbox"], +.control > input[type="file"] { + width: auto; +} +.control > table { + width: 100%; +} +.multi-input { + margin: 0 0 20px; +} +.multi-input > input { + width: 100%; +} +.control .input-file { + margin-top: 4px; +} +/* TODO: remove styles for images when images will be replaced by font icons */ +.control .hasDatepicker + img { + margin: -3px 0 0 5px; + vertical-align: middle; +} +.nobr { + white-space: nowrap; +} +/* + Form Validation +-------------------------------------- */ +label.mage-error { + display: block; + color: red; + text-align: left; + clear: both; + margin: 3px 0 0 0; +} +textarea.mage-error, +select.mage-error, +input.mage-error { + border-color: #fa7973 !important; + box-shadow: 0 0 8px rgba(250, 121, 115, 0.6) !important; +} +input.mage-error ~ .addafter { + border-color: #fa7973 !important; + box-shadow: 0 0 8px rgba(250, 121, 115, 0.6) !important; +} +/* + Forms for Store Scope +-------------------------------------- */ +.form-inline .field-store_id .label + .control, +.form-inline .field-store_ids .label + .control, +.form-inline .field-website_ids .label + .control, +.form-inline .field-website_id .label + .control, +.form-inline .field-select_stores .label + .control, +.form-inline .field-stores .label + .control { + width: auto; +} +/* + Forms styles +-------------------------------------- */ +.page-content-inner { + position: relative; + background: #f5f2ed; + border: 1px solid #b7b2a6; + border-radius: 5px; + padding: 20px; +} +.fieldset-wrapper, +.fieldset { + background: #fff; + border: 1px solid #eae6e0; + border-radius: 5px; + margin: 0 0 8px; + padding: 5px 18px 18px; + position: relative; +} +.eq-ie8 .fieldset { + border-width: 0 0 1px; +} +.fieldset-wrapper > .fieldset-wrapper-title, +.fieldset > .legend { + position: static; + float: left; + width: 100%; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; + padding: 0; + border-bottom: 1px solid #ededed; + margin: 0 0 18px; +} +.fieldset-wrapper > .fieldset-wrapper-title { + float: none; +} +.fieldset-wrapper > .fieldset-wrapper-title .title, +.fieldset > .legend span { + color: #676056; + font-size: 20px; + font-weight: 400; + padding: 7px 0 10px; + display: inline-block; +} +/* Collapsable fieldset-wrapper */ +.collapsable-wrapper { + padding-bottom: 2px; +} +.collapsable-wrapper.opened { + padding-bottom: 18px; +} +.collapsable-wrapper > .fieldset-wrapper-title { + border-bottom: none; + margin-bottom: 0; +} +.collapsable-wrapper.opened > .fieldset-wrapper-title { + border-bottom: 1px solid #ededed; + margin-bottom: 18px; +} +.collapsable-wrapper .fieldset-wrapper-title > .title { + position: relative; + padding-left: 22px; + cursor: pointer; + float: left; +} +.collapsable-wrapper .fieldset-wrapper-title > .title:before { + position: absolute; + left: 0; + top: 7px; + font-family: 'MUI-Icons'; + font-style: normal; + speak: none; + font-weight: normal; + -webkit-font-smoothing: antialiased; + content: '\e02a'; + /* arrow right icon */ + + color: #b2b0ad; +} +.collapsable-wrapper.opened > .fieldset-wrapper-title > .title:before { + content: '\e02c'; + /* arrow down icon */ + +} +.collapsable-wrapper .fieldset-wrapper-title > .title:hover:before { + color: #7e7e7e; +} +/* Fieldset styles in another fieldset */ +.fieldset .fieldset-wrapper, +.fieldset-wrapper .fieldset-wrapper { + border-color: #cccbca; + padding: 0; +} +.fieldset .fieldset-wrapper .fieldset-wrapper-title, +.fieldset-wrapper .fieldset-wrapper .fieldset-wrapper-title { + background: #f4f2ef; + background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2Y0ZjJlZiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNlZWViZTYiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); + background: -moz-linear-gradient(top, #f4f2ef 0%, #eeebe6 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #f4f2ef), color-stop(100%, #eeebe6)); + background: -webkit-linear-gradient(top, #f4f2ef 0%, #eeebe6 100%); + background: -o-linear-gradient(top, #f4f2ef 0%, #eeebe6 100%); + background: -ms-linear-gradient(top, #f4f2ef 0%, #eeebe6 100%); + background: linear-gradient(to bottom, #f4f2ef 0%, #eeebe6 100%); + padding: 0 18px; + border-radius: 5px; +} +.eq-ie8 .fieldset .fieldset-wrapper .fieldset-wrapper-title, +.eq-ie8 .fieldset-wrapper .fieldset-wrapper .fieldset-wrapper-title { + background: #f4f2ef; +} +.fieldset .fieldset-wrapper.opened .fieldset-wrapper-title, +.fieldset-wrapper .fieldset-wrapper.opened .fieldset-wrapper-title { + border-radius: 5px 5px 0 0; + border-bottom: 1px solid #cccbca; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + min-height: 39px; +} +.fieldset .fieldset-wrapper .fieldset-wrapper-title .actions, +.fieldset-wrapper .fieldset-wrapper .fieldset-wrapper-title .actions { + padding: 10px 2px 0 0; +} +.fieldset .fieldset-wrapper .fieldset-wrapper-title .title, +.fieldset-wrapper .fieldset-wrapper .fieldset-wrapper-title .title { + padding-top: 9px; + padding-bottom: 8px; + color: #555; + font: normal 16px/1.333 Arial, Verdana, sans-serif; +} +.fieldset .fieldset-wrapper .fieldset-wrapper-title .title:before, +.fieldset-wrapper .fieldset-wrapper .fieldset-wrapper-title .title:before { + top: 9px; +} +.fieldset-wrapper-content .fieldset > .title { + margin-top: 0; + padding-left: 22px; +} +.fieldset-wrapper .draggable-handle, +.fieldset .draggable-handle { + width: 8px; + height: 14px; + line-height: 14px; + background: url(Magento_Backend::images/draggable-handle-vertical.gif) no-repeat 0 0; + cursor: ns-resize; + color: #b2b0ad; +} +.fieldset-wrapper-title > .draggable-handle { + position: absolute; + left: 10px; + top: 12px; +} +.fieldset .fieldset-wrapper .fieldset-wrapper-content, +.fieldset-wrapper .fieldset-wrapper .fieldset-wrapper-content { + padding: 0 10px; +} +/* Sortable fieldsets */ +.ui-sortable .entry-edit .fieldset-wrapper-title, +#product_options_container_top .fieldset-wrapper-title { + padding-left: 30px; +} +.fieldset-wrapper-title > .actions, +.fieldset .legend > .actions { + float: right; + padding-top: 8px; +} +.fieldset > .legend + br { + display: block; + height: 0; + overflow: hidden; + clear: left; +} +.fieldset-wrapper .fieldset, +.fieldset .fieldset { + background: transparent; + padding: 9px 0; + border: none; + border-radius: 0; + margin: 0 0 29px; +} +.eq-ie8 .fieldset-alt, +.eq-ie8 .fieldset-alt > .fieldset { + display: block; + width: 100%; +} +.eq-ie8 .fieldset-alt > .field { + display: inline-block; +} +.fieldset .comment { + margin: 0 0 29px 10px; +} +.fieldset .field { + margin: 0 0 29px; +} +.with-note .note, +.field .note { + color: #676056; + font-size: 12px; + font-weight: 400; +} +.fieldset .field .options-list { + list-style: none; + margin: 0; + padding: 0; +} +.fieldset .field .options-list input[type="checkbox"], +.fieldset .field .options-list input[type="radio"] { + margin-right: 5px; +} +[class^="fields-group-"] .field { + margin-bottom: 0; +} +.fieldset-wrapper .fieldset:last-child, +.fieldset .fieldset:last-child, +.fieldset .field:last-child { + margin-bottom: 0; +} +.fieldset .label { + color: #676056; + font-size: 13px; + font-weight: 600; +} +.fieldset .control .label { + color: #676056; + font-size: 14px; + font-weight: 400; +} +.field.required > .label:after { + color: #e22626; + font-size: 13px; + font-weight: 400; +} +.with-addon .textarea { + margin: 0 0 6px; +} +.fieldset .control .textarea, +.fieldset .control .addon .textarea { + border-radius: 4px; + width: 100%; +} +.fieldset > .field > input[type="checkbox"] { + margin-top: 12px; +} +.fieldset-alt { + position: relative; + display: table-row; + border: 0; + padding: 0; + margin-bottom: 20px; + width: 100%; +} +.fieldset-alt > .field { + display: table-cell; + vertical-align: top; + padding-right: 4%; +} +.fieldset-alt > .field.no-display { + display: none; +} +.fieldset-alt .field > .label { + display: block; + width: 100%; + clear: both; + text-align: left; + margin: 0 0 10px; +} +.fieldset-alt .label + .control { + width: 100%; +} +.fieldset-alt .field-option-title { + width: 50%; +} +.fieldset .tooltip .help { + margin: 7px 0 0 15px; +} +.fieldset-alt .field-option-store-view { + width: 20%; +} +.fieldset-alt .field-option-input-type { + width: 20%; +} +.fieldset-alt .field-option-input-type select { + width: 100%; +} +.fieldset-alt .field-option-req { + width: 105px; + white-space: nowrap; +} +.fieldset-alt .field-option-req .control { + position: relative; + top: 32px; +} +.fieldset-alt .field-option-position, +.fieldset-alt .field-option-position .control { + width: 60px; +} +/* "Use default" checkbox */ +.use-default-control { + display: none; +} +.use-default-label { + cursor: pointer; + text-decoration: underline; + font-size: 11px; + color: #a29c94; +} +.use-default-label:hover { + color: #7e7e7e; +} +/* + Custom Multiselect +-------------------------------------- */ +.multiselect-alt { + margin: 0; + padding: 0; + list-style: none; + border: 1px solid #ccc; + border-radius: 5px; + color: #333; +} +.multiselect-alt .item { + position: relative; + border-top: 1px solid #fff; + cursor: pointer; +} +.multiselect-alt .item:first-child { + border-top: 0; +} +.multiselect-alt .item.selected { + background: #d7ebf5; +} +.multiselect-alt .item.selected:hover { + background: #afdef2; +} +.multiselect-alt label { + display: block; + cursor: pointer; + padding: 6px 25px 5px; +} +.multiselect-alt .item.selected label:before { + position: absolute; + left: 8px; + top: 1px; + bottom: 0; + width: 10px; + line-height: 28px; + font-family: 'MUI-Icons'; + font-style: normal; + speak: none; + font-weight: normal; + -webkit-font-smoothing: antialiased; + content: '\e01e'; + /* checked icon */ + + text-align: center; + color: #7ba4b1; + font-size: 9px; + text-shadow: 0 -1px 1px #60727b; +} +.multiselect-alt input[type="checkbox"] { + width: 0; + height: 0; + opacity: 0; + margin: 0; + padding: 0; +} +/* + Form item with table +-------------------------------------- */ +.with-table .label { + float: none; + text-align: left; + width: 100%; +} +.with-table .control { + clear: left; + float: none; + width: 100%; +} +/* + Form currency label +-------------------------------------- */ +.addon input { + border-width: 1px 0 1px 1px; +} +.addon input:focus ~ .addafter { + border-color: #75b9f0; + box-shadow: 0 0 8px rgba(82, 168, 236, 0.6); +} +.addon input ~ .addafter strong { + background: #fff; + display: block; + line-height: 24px; + margin: 0 3px 0 -2px; + padding-left: 4px; + padding-right: 4px; + position: relative; + font-size: 12px; + top: 0; +} +.addon input:focus ~ .addafter strong { + margin-top: 0; +} +.addon .addafter { + background: none; + color: #a6a6a6; + border-width: 1px 1px 1px 0; + border-radius: 4px 4px 0 0; + padding: 0; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.075) inset; +} +.field .control input[type='text'][disabled], +.field .control input[type='text'][disabled] ~ .addafter, +.field .control select[disabled], +.field .control select[disabled] ~ .addafter { + background-color: #fff; + border-color: #eee; + box-shadow: none; + color: #999; +} +.field .control input[type='text'][disabled] ~ .addafter strong, +.field .control select[disabled] ~ .addafter strong { + background-color: #fff; +} +.field.type-price .addon, +.field-price .addon, +.field-special_price .addon, +.field-msrp .addon { + direction: rtl; +} +.field.type-price .addon > *, +.field-price .addon > *, +.field-special_price .addon > *, +.field-msrp .addon > * { + direction: ltr; +} +.field.type-price .addon .addafter, +.field-price .addon .addafter, +.field-special_price .addon .addafter, +.field-msrp .addon .addafter { + border-width: 1px 0 1px 1px; + border-radius: 4px 0 0 4px; +} +.field.type-price .addon input:first-child, +.field-price .addon input:first-child, +.field-special_price .addon input:first-child, +.field-msrp .addon input:first-child { + border-radius: 0 4px 4px 0; +} +.eq-ie8 .field.type-price .addon .addafter, +.eq-ie8 .field-price .addon .addafter, +.eq-ie8 .field-special_price .addon .addafter, +.eq-ie8 .field-msrp .addon .addafter { + border-width: 1px 1px 1px 0; +} +.field.type-price input, +.field-price input, +.field-special_price input, +.field-msrp input { + border-width: 1px 1px 1px 0; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.075) inset; +} +.field.type-price input:focus, +.field-price input:focus, +.field-special_price input:focus, +.field-msrp input:focus { + box-shadow: 0 0 8px rgba(82, 168, 236, 0.6); +} +.field.type-price input:focus ~ label.addafter, +.field-price input:focus ~ label.addafter, +.field-special_price input:focus ~ label.addafter, +.field-msrp input:focus ~ label.addafter { + box-shadow: 0 0 8px rgba(82, 168, 236, 0.6); +} +.field.type-price input ~ label.addafter strong, +.field-price input ~ label.addafter strong, +.field-special_price input ~ label.addafter strong, +.field-msrp input ~ label.addafter strong { + margin-left: 2px; + margin-right: -2px; +} +.eq-ie8 .field-apply_to .multiselect { + height: 120px; +} +/* + Calendar +-------------------------------------- */ +.ui-datepicker { + z-index: 998 !important; +} +.ui-datepicker .ui-datepicker-calendar td { + padding: 0; +} +.ui-datepicker .ui-datepicker-calendar th { + background: #efefef; + border: 1px solid #cfcfcf; + padding: 4px; + color: #676056; + font-weight: bold; +} +.ui-datepicker-calendar tbody tr td, +.ui-datepicker-calendar tbody tr:nth-child(2n+1) td { + background: #fff; +} +.ui-datepicker .ui-datepicker-prev span, +.ui-datepicker .ui-datepicker-next span { + margin-top: -1px; +} +/* + Details element +-------------------------------------- */ +summary { + cursor: pointer; + display: inline-block; +} +.no-details details > * { + display: none; +} +.no-details details > summary:before { + float: left; + width: 20px; + content: 'â–º '; +} +.no-details details.open > summary:before { + content: 'â–¼ '; +} +.no-details details summary { + display: block; +} +/* + Blockquotes +-------------------------------------- */ +blockquote { + border-left: 2px solid #ccc; + padding-left: 5px; +} +blockquote small:before { + content: '\2014 \00A0'; +} +/* + Addresses +-------------------------------------- */ +address { + font-style: normal; +} +/* + Tables +-------------------------------------- */ +table > caption { + margin-bottom: 5px; +} +table tfoot, +table th { + background: #e6e6e6; +} +table tfoot, +table thead { + background: #666158; + color: #cac3b4; +} +table thead.active { + /*background:#F37B21;*/ + +} +table th { + text-align: left; + background: transparent; + font-weight: normal; +} +table th, +table td { + border: 1px solid #C0BBAF; + padding: 6px 10px 7px; +} +table tbody tr td { + background: #F5F2ED; + color: #676056; + padding-top: 12px; +} +table tbody tr:not(:last-child) td { + border-top: 1px solid transparent; + border-bottom: 1px solid transparent; +} +table .dropdown-menu li { + padding: 7px 15px; + line-height: 14px; + cursor: pointer; +} +table tbody tr td:first-child input[type="checkbox"] { + margin: 0; +} +table tbody tr:nth-child(odd) td, +table tbody tr:nth-child(odd) th { + background-color: #E6E3DE; +} +table tbody tr.selected td, +table tbody tr.selected th { + border: 1px solid #C0BBAF; +} +table tbody tr.selected td, +table tbody tr.selected th, +table tbody tr:hover td, +table tbody tr:hover th, +table tbody tr:nth-child(odd):hover td, +table tbody tr:nth-child(odd):hover th { + background-color: #fff; +} +/* + X-tree styles +-------------------------------------- */ +.x-tree-node .leaf .x-tree-node-icon { + background-image: url(../images/fam_leaf.png); +} +.x-tree-node .system-leaf .x-tree-node-icon { + background-image: url(../images/fam_application_form_delete.png); +} +.x-tree-node-ct { + overflow: hidden; +} +/* + Styles for "js" tooltip with positionings +-------------------------------------- */ +.tipsy { + padding: 11px; +} +.tipsy-inner { + padding: 12px 15px; + max-width: 185px; + background: #faf8f6; + border: 1px solid #dcd8ce; + box-shadow: 0 2px 5px rgba(49, 48, 43, 0.4); +} +.tipsy-inner .error { + width: 158px; +} +.tipsy-inner .error h5 { + color: #be0a0a; + font-size: 16px; + font-weight: 500; + margin: 0 0 6px 0; +} +.tipsy-inner .error p { + color: #676056; + line-height: 1.5; + margin: 0; +} +.tipsy-e .tipsy-arrow { + top: 50%; + left: 1px; + margin-top: -10px; + border-top: 10px solid transparent; + border-right: 10px solid #dcd8ce; + border-bottom: 10px solid transparent; + border-left: none; +} +.tipsy-w .tipsy-arrow { + top: 50%; + right: 0; + margin-top: -10px; + border-top: 10px solid transparent; + border-right: none; + border-bottom: 10px solid transparent; + border-left: 10px solid #dcd8ce; +} +.tipsy-n .tipsy-arrow, +.tipsy-ne .tipsy-arrow, +.tipsy-nw .tipsy-arrow { + bottom: 1px; + border-top: 10px solid #dcd8ce; + border-right: 10px solid transparent; + border-bottom: none; + border-left: 10px solid transparent; +} +.tipsy-ne .tipsy-arrow { + left: 16px; +} +.tipsy-nw .tipsy-arrow { + right: 16px; +} +.tipsy-s .tipsy-arrow, +.tipsy-se .tipsy-arrow, +.tipsy-sw .tipsy-arrow { + top: 1px; + border-left: 10px solid transparent; + border-right: 10px solid transparent; + border-bottom: 10px solid #dcd8ce; + border-top: none; +} +.tipsy-se .tipsy-arrow { + left: 16px; +} +.tipsy-sw .tipsy-arrow { + right: 16px; +} +.tipsy-arrow:after, +.tipsy-arrow:before { + position: absolute; + width: 0; + height: 0; + content: ''; +} +.tipsy-e .tipsy-arrow:after { + top: -5px; + left: 2px; + margin-top: -4px; + border-top: 9px solid transparent; + border-right: 9px solid #faf8f6; + border-bottom: 9px solid transparent; +} +.tipsy-e .tipsy-arrow:before { + top: -8px; + margin-top: 0; + border-top: 10px solid transparent; + border-right: 10px solid rgba(49, 48, 43, 0.1); + border-bottom: 10px solid transparent; +} +.tipsy-w .tipsy-arrow:after { + top: -5px; + left: -12px; + margin-top: -4px; + border-top: 9px solid transparent; + border-right: none; + border-bottom: 9px solid transparent; + border-left: 9px solid #faf8f6; +} +.tipsy-w .tipsy-arrow:before { + top: -8px; + left: -10px; + margin-top: 0; + border-top: 10px solid transparent; + border-right: none; + border-bottom: 10px solid transparent; + border-left: 10px solid rgba(49, 48, 43, 0.1); +} +.tipsy-n .tipsy-arrow:after, +.tipsy-ne .tipsy-arrow:after, +.tipsy-nw .tipsy-arrow:after { + margin-top: -4px; + left: -9px; + top: -7px; + border-top: 9px solid #faf8f6; + border-right: 9px solid transparent; + border-left: 9px solid transparent; +} +.tipsy-n .tipsy-arrow:before, +.tipsy-ne .tipsy-arrow:before, +.tipsy-nw .tipsy-arrow:before { + left: -10px; + top: -8px; + margin-top: 0; + border-top: 10px solid rgba(49, 48, 43, 0.1); + border-right: 10px solid transparent; + border-left: 10px solid transparent; +} +.tipsy-s .tipsy-arrow:after, +.tipsy-sw .tipsy-arrow:after, +.tipsy-se .tipsy-arrow:after { + left: -9px; + top: 6px; + margin-top: -4px; + border-top: none; + border-right: 9px solid transparent; + border-bottom: 9px solid #faf8f6; + border-left: 9px solid transparent; +} +.tipsy-inner dl { + margin: 0; +} +.tipsy-inner dt { + margin: 0 0 4px; + font-size: 16px; + font-weight: 400; + color: #f47b20; +} +.tipsy-inner dd { + margin: 0; + color: #676056; + font-size: 12px; + line-height: 18px; + font-family: Arial, Helvetica, sans-serif; +} +/* + Popups +-------------------------------------- */ +.fade .popup { + padding: 0; + border: 5px solid #969288; + border-radius: 8px; +} +.wrapper-popup { + padding: 0 10px; +} +.fade .popup .popup-inner { + padding: 20px; + border-radius: 3px; +} +.fade .popup .popup-title { + margin: 0 0 10px; +} +.popup-loading { + position: fixed; + z-index: 1003; + width: 200px; + background: rgba(255, 255, 255, 0.8); + left: 50%; + top: 40%; + margin-left: -100px; + color: #d85909; + border-color: #d85909; + font-size: 14px; + font-weight: bold; + text-align: center; + padding: 100px 0 10px; +} +.popup-loading:after { + position: absolute; + left: 50%; + top: 40%; + background-image: url(../mui/images/ajax-loader-big.gif); + width: 64px; + height: 64px; + margin: -32px 0 0 -32px; + content: ''; + z-index: 2; +} +.eq-ie8 .popup-loading { + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)"; +} +/* Loading mask */ +.loading-old, +.loading-mask { + background: rgba(255, 255, 255, 0.4); + z-index: 999; +} +.loading-old, +.loading-mask { + position: fixed; + left: 0; + top: 0; + right: 0; + bottom: 0; +} +.loading-old .loader, +.loading-mask .loader { + position: absolute; + margin: auto; + left: 0; + top: 0; + right: 0; + bottom: 0; + width: 160px; + height: 160px; + color: #5e5b56; + font-size: 14px; + font-weight: bold; + text-align: center; + background: #e5e2dd url(../mui/images/ajax-loader-big.gif) no-repeat 50% 30%; + border-radius: 5px; + opacity: .95; +} +.loading-mask img { + display: none; +} +.loading-old p, +.loading-mask p { + margin-top: 118px; +} +.eq-ie8 .loading-old, +.eq-ie8 .loading-mask { + background: #fff; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)"; +} +/* Backup popup */ +/* TODO: remove after backups page js refactoring */ +.backup-dialog { + margin-top: inherit !important; +} +/* Backup popup */ +/* TODO: remove after backups page js refactoring */ +.backup-dialog { + margin-top: inherit !important; +} +/* + Global Navigation +-------------------------------------- */ +.navigation { + position: relative; + border-bottom: 1px solid #aaa69c; + background: #726c62; + background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzcyNmM2MiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiM2NTYwNTciIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); + background: -moz-linear-gradient(top, #726c62 0%, #656057 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #726c62), color-stop(100%, #656057)); + background: -webkit-linear-gradient(top, #726c62 0%, #656057 100%); + background: -o-linear-gradient(top, #726c62 0%, #656057 100%); + background: -ms-linear-gradient(top, #726c62 0%, #656057 100%); + background: linear-gradient(to bottom, #726c62 0%, #656057 100%); + padding: 0 20px; +} +.navigation:hover .level-0 > a { + /*background: red !important;*/ + +} +.eq-ie8 .navigation { + background: #726c62; +} +.navigation:before { + position: absolute; + left: 0; + top: 0; + right: 0; + height: 5px; + box-shadow: 0 2px 4px #46433d inset; + content: ''; + z-index: 991; +} +.eq-ie8 .navigation:before { + border-top: 1px solid #46433d; +} +.navigation:after { + position: absolute; + left: 0; + bottom: 0; + right: 0; + height: 1px; + background: #4e483f; + content: ''; + z-index: 1; +} +.navigation .level-0.reverse > .submenu { + right: 1px; +} +.navigation > ul { + position: relative; + min-width: 960px; + max-width: 1300px; + margin: 0 auto; + text-align: right; + z-index: 900; +} +.navigation .level-0 > .submenu { + display: none; + position: absolute; + top: 100%; + padding: 19px 10px; +} +.navigation .level-0 > .submenu a { + display: block; + color: #007dbd; + font-size: 13px; + font-weight: 400; + line-height: 1.385; + padding: 5px 20px 4px; + text-decoration: none; + -webkit-transition: color 0.15s ease-out; + -moz-transition: color 0.15s ease-out; +} +.navigation .level-0 > .submenu a:focus, +.navigation .level-0 > .submenu a:hover { + text-decoration: underline; +} +.navigation .level-0 > .submenu li { + margin-bottom: 1px; +} +.navigation .level-0 > .submenu a[href="#"] { + cursor: default; + display: block; + color: #676056; + font-size: 14px; + font-weight: 600; + line-height: 1; + margin: 7px 0 6px; + padding: 0 20px; +} +.navigation .level-0 > .submenu a[href="#"]:focus, +.navigation .level-0 > .submenu a[href="#"]:hover { + text-decoration: none; +} +.navigation .level-0 { + display: inline-block; + float: left; + text-align: left; + -webkit-transition: display 0.15s ease-out; + -moz-transition: display 0.15s ease-out; +} +.navigation .level-0 > a { + background: none; + position: relative; + display: inline-block; + padding: 37px 21px 11px; + color: #f2ebde; + font-size: 13px; + font-weight: 400; + text-shadow: 0 1px 3px #222; + text-transform: uppercase; + text-decoration: none; + -webkit-transition: background 0.15s ease-out; + -moz-transition: background 0.15s ease-out; +} +.navigation .level-0.active > a { + background: #625d54; + background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIxJSIgc3RvcC1jb2xvcj0iIzYyNWQ1NCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiM1NjUyNDkiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); + background: -moz-linear-gradient(top, #625d54 1%, #565249 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(1%, #625d54), color-stop(100%, #565249)); + background: -webkit-linear-gradient(top, #625d54 1%, #565249 100%); + background: -o-linear-gradient(top, #625d54 1%, #565249 100%); + background: -ms-linear-gradient(top, #625d54 1%, #565249 100%); + background: linear-gradient(to bottom, #625d54 1%, #565249 100%); +} +.eq-ie8 .navigation .level-0.active > a { + background: #625d54; +} +/*.navigation .level-0:hover > a, +.eq-ie8 .navigation .level-0:hover > a,*/ +.navigation .level-0.hover.recent > a { + background: #fff; + color: #676056; + font-size: 13px; + font-weight: 400; + text-shadow: 0 1px 3px #c1bfbb; +} +.navigation .level-0 > a:focus { + outline: none; +} +.navigation .level-0 > .submenu { + opacity: 0; + visibility: hidden; +} +.navigation .level-0.recent.hover > .submenu { + opacity: 1; + visibility: visible; +} +.no-js .navigation .level-0:hover > .submenu, +.no-js .navigation .level-0.hover > .submenu, +.no-js .navigation .level-0 > a:focus + .submenu { + display: block; +} +.eq-ie8 .navigation .level-0.active > a, +.eq-ie8 .navigation .level-0:hover > a, +.eq-ie8 .navigation .level-0.hover > a { + border-top: 1px solid #46433d; + padding-top: 36px; +} +.navigation .level-0 > a:before { + position: absolute; + left: 0; + right: 0; + top: 12px; + text-align: center; + height: 20px; + content: ''; + font-family: 'admin-icons'; + font-size: 18px; + speak: none; + font-weight: normal; + line-height: 1; + -webkit-font-smoothing: antialiased; + text-shadow: none; +} +.navigation .level-0.item-dashboard > a:before, +.navigation .level-0.item-hub > a:before { + content: '\e007'; + font-size: 17px; +} +.navigation .level-0.item-sales > a:before, +.navigation .level-0.item-sales-and-orders > a:before { + content: '\e008'; +} +.navigation .level-0.item-catalog > a:before { + content: '\e00b'; +} +.navigation .level-0.item-customer > a:before, +.navigation .level-0.item-customers > a:before { + content: '\e009'; + font-size: 24px; + top: 10px; +} +.navigation .level-0.item-promo > a:before, +.navigation .level-0.item-marketing > a:before { + content: '\e00a'; + font-size: 17px; + top: 13px; +} +.navigation .level-0.item-cms > a:before, +.navigation .level-0.item-content > a:before { + content: '\e006'; + font-size: 16px; +} +.navigation .level-0.item-report > a:before, +.navigation .level-0.item-reports > a:before { + content: '\e00c'; + font-size: 16px; + top: 13px; +} +.navigation .level-0.item-newsletter > a:before { + font-family: 'MUI-Icons'; + content: '\e03c'; + font-size: 22px; + top: 9px; +} +.navigation .level-0 > .submenu { + background: #fff; + box-shadow: 0 3px 3px rgba(49, 48, 43, 0.5); + border-radius: 0 0 5px 5px; +} +.no-boxshadow .navigation .level-0 > .submenu { + border: 1px solid #cbc1b4; + border-width: 0 1px 1px; + margin-left: -1px; +} +.navigation .level-0 > .submenu li { + max-width: 200px; +} +.navigation .level-0 > .submenu > ul { + white-space: nowrap; +} +.navigation .level-0 > .submenu .column { + display: inline-block; + vertical-align: top; +} +.eq-ie8 .navigation .level-0 > .submenu .column { + float: left; +} +.navigation .level-0 .submenu .level-1 { + white-space: normal; +} +.navigation .level-0.parent .submenu .level-1.parent { + margin: 17px 0; +} +.navigation .level-0.parent .level-1.parent:first-child { + margin-top: 0; +} +.navigation .level-2 .submenu { + margin-left: 7px; +} +.navigation .level-0 > .submenu .level-2 > a[href="#"] { + font-size: 13px; + margin-top: 10px; + margin-left: 7px; +} +.navigation .level-2 > .submenu a { + font-size: 12px; + line-height: 1.231; +} +.navigation .level-0 > .submenu .level-3 > a[href="#"], +.navigation .level-3 .submenu { + margin-left: 15px; +} +/* + Admin and Store Settings +-------------------------------------- */ +.navigation .level-0.item-system, +.navigation .level-0.item-stores { + float: none; + margin: 21px 0 0; +} +.navigation .level-0.item-system > .submenu, +.navigation .level-0.item-stores > .submenu { + left: auto; + right: 1px; +} +.navigation .level-0.item-system.hover:after, +.navigation .level-0.item-stores.hover:after { + color: #c2b59c; +} +.navigation .level-0.item-system > a, +.navigation .level-0.item-stores > a { + position: relative; + padding: 0; +} +.eq-ie8 .navigation .level-0.item-system > a, +.eq-ie8 .navigation .level-0.item-system:hover > a, +.eq-ie8 .navigation .level-0.item-system.hover > a, +.eq-ie8 .navigation .level-0.item-stores > a, +.eq-ie8 .navigation .level-0.item-stores:hover > a, +.eq-ie8 .navigation .level-0.item-stores.hover > a { + border-top: 0; + padding-top: 0; +} +.navigation .level-0.item-system:hover > a, +.navigation .level-0.item-system.hover > a, +.navigation .level-0.item-stores:hover > a, +.navigation .level-0.item-stores.hover > a { + background: transparent; +} +.no-js .navigation .level-0.item-system:hover > a:before, +.navigation .level-0.item-system:hover > a:before, +.navigation .level-0.item-system.hover > a:before, +.no-js .navigation .level-0.item-stores:hover > a:before, +.navigation .level-0.item-stores:hover > a:before, +.navigation .level-0.item-stores.hover > a:before { + display: none; + position: absolute; + top: 1.4em; + left: auto; + right: -19px; + height: 20px; + width: 20px; + content: ''; + border: 10px solid #fff; + border-width: 0 0 10px 10px; + border-radius: 0 0 0 20px; + z-index: 2; +} +.navigation .level-0.item-system > a:after, +.navigation .level-0.item-stores > a:after { + display: none; + position: absolute; + top: 2em; + left: -20px; + margin-top: -1px; + width: 20px; + height: 20px; + content: ''; + border: 10px solid #fff; + border-width: 0 10px 10px 0; + border-radius: 0 0 20px; + z-index: 1; +} +.no-js .navigation .level-0.item-system:hover > a:after, +.navigation .level-0.item-system.hover > a:after, +.no-js .navigation .level-0.item-system:hover > a:before, +.navigation .level-0.item-system.hover > a:before, +.no-js .navigation .level-0.item-stores:hover > a:after, +.navigation .level-0.item-stores.hover > a:after, +.no-js .navigation .level-0.item-stores:hover > a:before, +.navigation .level-0.item-stores.hover > a:before { + display: block; +} +.no-js .navigation .level-0.last:hover > a:before, +.navigation .level-0.last.hover > a:before, +.eq-ie8 .navigation .level-0.item-system > a:before, +.eq-ie8 .navigation .level-0.item-system > a:after, +.eq-ie8 .navigation .level-0.item-stores > a:before, +.eq-ie8 .navigation .level-0.item-stores > a:after { + display: none; +} +.navigation .level-0.item-system > a span, +.navigation .level-0.item-stores > a span { + display: block; + position: relative; + padding: 4px 20px 5px 10px; + border: 1px solid #4c483f; + border-left: 0; + font: 12px/1.333 "Helvetica", Arial, serif; + text-transform: none; + text-shadow: none; + background: #58534a; + color: #f2ebde; + height: 1.333em; +} +.navigation .level-0.item-system:hover > a span, +.navigation .level-0.item-stores:hover > a span { + background: #31302B; +} +.navigation .level-0.item-system:hover > a span:after, +.navigation .level-0.item-stores:hover > a span:after { + color: #58534a; +} +.no-js .navigation .level-0.item-system:hover > a span, +.navigation .level-0.item-system.hover > a span, +.no-js .navigation .level-0.item-stores:hover > a span, +.navigation .level-0.item-stores.hover > a span { + background: #fff; + color: #676056; + text-shadow: none; + border-bottom: 0; + border-right: 0; + padding-right: 21px; + padding-bottom: 2em; + margin-bottom: -2em; +} +.no-js .navigation .level-0.last:hover > a span, +.navigation .level-0.last.hover > a span { + background: #fff; + color: #676056; + text-shadow: none; + border-bottom: 0; + border-right: 0; + padding-right: 21px; + padding-bottom: 2em; + margin-bottom: -2em; +} +.no-js .navigation .level-0.last:hover > a span, +.navigation .level-0.last.hover > a span { + border-right: 1px solid; + padding-right: 20px; +} +.navigation .level-0.item-system > a span:after, +.navigation .level-0.item-stores > a span:after { + position: absolute; + top: 7px; + right: 7px; + width: 10px; + height: 10px; + font-family: 'MUI-Icons'; + font-style: normal; + speak: none; + font-weight: normal; + -webkit-font-smoothing: antialiased; + content: "\e02c"; + font-size: 8px; + text-align: center; + color: #31302b; + z-index: 2; +} +.navigation .level-0.item-stores > a span:before { + position: absolute; + left: -22px; + top: -1px; + bottom: -1px; + height: 1.333em; + padding: 0 0 9px; + width: 21px; + border: 1px solid #4c483f; + border-right: 0; + border-radius: 5px 0 0 5px; + font-family: 'MUI-Icons'; + font-style: normal; + font-size: 12px; + line-height: 2; + speak: none; + font-weight: normal; + -webkit-font-smoothing: antialiased; + content: '\e07e'; + text-align: center; + color: #31302b; +} +.navigation .level-0.last > a, +.navigation .level-0.last > a span { + border-radius: 0 5px 5px 0; +} +.no-js .navigation .level-0.last:hover > a span, +.navigation .level-0.last.hover > a span, +.navigation .level-0.last > a:focus span { + border-radius: 0; +} +/* + Login page +-------------------------------------- */ +.page-login { + height: 100%; +} +.page-login .wrapper { + min-height: 100%; + padding: 0; +} +.page-login .wrapper-inner { + overflow: auto; + padding-bottom: 140px; +} +.page-login .footer { + clear: both; + height: 140px; + margin-top: -140px; + position: relative; +} +.page-login .footer-content { + max-width: none; + min-width: 0; +} +.page-login .footer-copyright { + text-align: right; +} +.page-login .form-login { + width: 280px; + margin: 160px auto 60px; + padding: 30px 25px; + border: 1px solid #e3ded5; + border-radius: 5px; + background: #f7f2ec; +} +.page-login .fieldset { + background: transparent; + border: 0; + border-radius: 0; + margin: 0; + padding: 0; +} +.page-login .fieldset > .legend { + border-bottom: 0; + margin-bottom: 15px; +} +.page-login .fieldset > .legend span { + font-size: 32px; + line-height: 32px; + padding: 0; + color: #8a847c; + display: inline; +} +.page-login .fieldset .field { + margin: 0 0 13px; +} +.page-login .form-inline .label { + width: auto; + padding: 0; + margin-bottom: 13px; +} +.page-login .field-username label, +.page-login .field-password label, +.page-login .field-confirmation label { + display: none; +} +.eq-ie8 .page-login .field-username label, +.eq-ie8 .page-login .field-password label, +.eq-ie8 .page-login .field-confirmation label { + display: block; +} +.page-login .form-inline .label + .control { + width: auto; + float: none; +} +.page-login .header { + margin-bottom: 30px; + background: transparent; + padding: 0; + z-index: auto; + position: static; +} +.page-login .header .logo { + display: block; + width: 262px; + height: 64px; + text-indent: -999em; + background: url(Magento_Backend::images/logo-magento.png) no-repeat; +} +/* +.page-login .logo { + display: block; + width: 100px; + height: 65px; + margin: 0; + text-indent: -999em; + position: relative; + z-index: 1; +} + +.page-login .logo:before, +.page-login .logo:after { + font-family: 'admin-icons'; + font-size: 65px; + content: '\e00d'; + position: absolute; + bottom: 0; + left: 0; + text-indent: 0; + line-height: 1; + font-weight: normal; +} + +.page-login .logo:before { + content: '\e00d'; + color: #f37b20; +} + +.page-login .logo:after { + content: '\e00e'; + color: #fab57f; +} + +.page-login .logo span:before { + font-family: 'admin-icons'; + content: '\e00f'; + display: block; + position: absolute; + top: 0; + bottom: 0; + left: 70px; + font-size: 154px; + margin-top: -42px; + text-indent: 0; + line-height: 1; + font-weight: normal; + color: #000; +}*/ +.page-login .form-actions { + padding: 0; + margin: 0; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; +} +.page-login .actions, +.page-login .links { + display: inline-block; + vertical-align: middle; +} +.page-login input[type=text], +.page-login input[type=password] { + border-color: #cac3b4; + font-size: 18px; + padding: 12px 12px 14px; + height: auto; +} +.page-login :-ms-input-placeholder { + color: #bebab1 !important; +} +.page-login ::-webkit-input-placeholder { + color: #bebab1 !important; +} +.page-login :-moz-placeholder { + color: #bebab1 !important; +} +.page-login .action-login, +.page-login .action-retrieve { + font-size: 22px; + padding: 14px 22px 16px; +} +.page-login .action-retrieve, +.page-login .action-reset { + font-size: 18px; + padding: 10px 17px 10px; +} +.page-login .action-forgotpassword, +.page-login .action-back { + font-size: 12px; + color: #1c8bb8; + text-decoration: underline; + position: absolute; + left: 0; + bottom: -70px; +} +.page-login .action-forgotpassword:hover, +.page-login .action-back:hover { + text-decoration: none; +} +/* + Page title +-------------------------------------- */ +.page-title { + position: relative; + margin: 20px 0; +} +.page-content > .page-title { + max-width: 1300px; + min-width: 960px; + margin-left: auto; + margin-right: auto; +} +.page-title-inner > .title { + color: #676056; + font-size: 28px; + font-weight: 400; + display: inline-block; + margin: 0; + width: 100%; + word-wrap: break-word; +} +.page-title-inner .title > h3 { + margin: 0; +} +.page-title-inner .actions { + float: right; +} +.page-title-inner .actions form { + display: inline-block; +} +/* + Messages (Global) +-------------------------------------- */ +.message { + margin: 0; + padding: 10px 26px 10px 32px; + background: #f9f5ec; + border: 0; + -moz-border-radius: 0; + -webkit-border-radius: 0; + border-radius: 0; + color: #676056; + text-shadow: none; + border-bottom: 1px solid #c7c2b6; +} +.wrapper > .message { + padding: 0 20px; +} +.page-content > #messages { + max-width: 1300px; + min-width: 960px; + margin: 0 auto; +} +.message:before, +.message-system .message-inner:before { + position: absolute; + left: 8px; + top: 50%; + margin-top: -8px; + background: none; + text-shadow: none; + width: auto; + height: auto; + border: 0; + font-family: 'MUI-Icons'; + font-style: normal; + speak: none; + font-weight: normal; + -webkit-font-smoothing: antialiased; + font-size: 16px; + content: '\e006'; + /* notification icon */ + + color: #6e685e; +} +.messages-inbox { + float: right; +} +.messages-inbox .critical { + color: red; +} +/* System Messages */ +.message-system { + padding: 0; +} +.message-system:before { + display: none; +} +.message-system .message-inner { + position: relative; + min-width: 960px; + max-width: 1300px; + margin: 0 auto; +} +.message-system .message-inner:before { + margin-top: -10px; +} +.message-system .message-content { + padding: 10px 26px 10px 32px; +} +/* + No-javaScript-Enabled message +-------------------------------------- */ +.message-noscript { + background: #ff9; + padding: 0; + border: 0; + box-shadow: 0 1px 2px #46433d; + z-index: 994; +} +.eq-ie8 .message-noscript { + border-bottom: 1px solid #46433d; +} +.message-noscript .message-content { + margin: 0 auto; + max-width: 1300px; + min-width: 960px; + padding: 3px 0; + position: relative; + text-align: center; +} +.message-noscript:before { + content: ''; +} +.message-noscript .message-content:before { + position: relative; + background: none; + text-shadow: none; + width: auto; + height: auto; + vertical-align: middle; + border: 0; + font-family: 'MUI-Icons'; + font-style: normal; + speak: none; + font-weight: normal; + -webkit-font-smoothing: antialiased; + font-size: 32px; + content: '\e006'; + /* notification icon */ + + color: #6e685e; +} +.message-demo-mode { + background: #d75f07; + border: 0; + color: #fff; + text-align: center; + padding: 5px 0; + box-shadow: 0 1px 2px #46433d; + z-index: 993; +} +.eq-ie8 .message-demo-mode { + border-bottom: 1px solid #46433d; +} +.message-demo-mode:before { + content: ''; +} +.message-demo-mode .message-content { + margin: 0 auto; + max-width: 1300px; + min-width: 960px; + position: relative; + text-align: center; +} +.message-demo-mode .message-content:before { + position: relative; + background: none; + text-shadow: none; + width: auto; + height: auto; + vertical-align: middle; + border: 0; + font-family: 'MUI-Icons'; + font-style: normal; + speak: none; + font-weight: normal; + -webkit-font-smoothing: antialiased; + font-size: 16px; + content: '\e006'; + /* notification icon */ + +} +/* + Information message +-------------------------------------- */ +.message-info { + background: #fffbf0; + border: 1px solid #d87e34; + margin-bottom: 20px; +} +.message-info:before { + font-family: 'MUI-Icons'; + font-style: normal; + speak: none; + font-weight: normal; + -webkit-font-smoothing: antialiased; + content: '\e046'; + /* icon-info */ + + color: #d87e34; +} +/* + Error message +-------------------------------------- */ +.message-error { + color: #963535; + background: #f3dcd8; + border: 1px solid #963535; + margin-bottom: 20px; +} +.message-error:before { + content: '\e069'; + color: #963535; +} +/* + Store Switcher +-------------------------------------- */ +.store-switcher-alt { + position: relative; + display: inline-block; +} +.store-switcher-alt .dropdown-menu { + white-space: nowrap; + margin-top: 2px; +} +.store-switcher-alt.active .dropdown-menu { + display: block; +} +.store-switcher-alt .dropdown-menu ul { + margin: 0; + padding: 0; + list-style: none; +} +.store-switcher-alt strong { + display: block; + font-size: 14px; + font-weight: 500; + line-height: 1.333; + color: #a6a098; + padding: 5px 10px; +} +.store-switcher-alt .store-selected { + font-size: 12px; + font-weight: 400; + line-height: 1.333; + color: #676056; + cursor: pointer; +} +.store-switcher-alt .store-selected:after { + font-family: 'MUI-Icons'; + font-style: normal; + speak: none; + font-weight: normal; + -webkit-font-smoothing: antialiased; + content: '\e02c'; + /* arrow down icon */ + + color: #b3b0ad; + margin: 0 0 0 3px; + vertical-align: text-top; +} +.eq-ie8 .store-switcher-alt .store-selected:after { + vertical-align: middle; +} +.store-switcher-alt .store-switcher-website, +.store-switcher-alt .store-switcher-store { + padding: 0; +} +.store-switcher-alt .store-switcher-website:hover, +.store-switcher-alt .store-switcher-store:hover { + background: none; +} +.store-switcher-website { + margin: 5px 0 0; +} +.store-switcher-website > strong { + padding-left: 13px; +} +.store-switcher-store { + margin: 1px 0 0; +} +.store-switcher-store > strong { + padding-left: 20px; +} +.store-switcher-alt .store-switcher-store > ul { + margin-top: 1px; +} +.store-switcher-alt .store-switcher-store-view { + padding: 0; +} +.store-switcher-store-view:first-child { + border-top: 1px solid #e5e5e5; +} +.eq-ie8 .store-switcher-website { + border-bottom: 0; +} +.eq-ie8 .store-switcher-store-view { + border-bottom: 0; + border-top: 1px solid #e5e5e5; +} +.store-switcher-store-view > a { + display: block; + padding: 5px 15px 5px 24px; + color: #333; + font-size: 13px; + text-decoration: none; +} +.store-switcher-alt .store-switcher-all, +.store-switcher-alt .manage-stores { + padding: 0; +} +.store-switcher-alt .store-switcher-all > a, +.store-switcher-alt .manage-stores > a { + display: block; + padding: 8px 15px; + color: #676056; + text-decoration: none; + font-size: 12px; +} +/* + Page Structure +-------------------------------------- */ +.wrapper { + padding: 0 0 60px; + min-width: 1000px; +} +.page-content { + margin: 0 auto; + padding: 0 20px; +} +.page-title.complex .title { + float: left; + width: 70%; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.page-title.complex .store-switcher-alt { + float: right; + margin: 12px 0 0; +} +.side-col { + position: relative; + width: 20%; +} +.main-col { + position: relative; + width: 80%; + padding: 0 20px 20px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + -ms-box-sizing: border-box; + box-sizing: border-box; +} +.col-left { + float: left; +} +.col-right { + float: right; +} +.col-1-layout .main-col { + width: auto; +} +.col-2-left-layout .main-col, +.col-2-right-layout .side-col { + float: right; +} +.col-2-right-layout .main-col, +.col-2-left-layout .side-col { + float: left; +} +.col-2-left-layout, +.col-1-layout { + position: relative; + background: #f5f2ed; + border: 1px solid #d5d0ca; + border-radius: 5px; + min-width: 960px; + max-width: 1300px; + margin: 0 auto; +} +.col-1-layout { + padding: 20px; + min-width: 920px; + max-width: 1260px; +} +.col-2-left-layout:before { + position: absolute; + display: block; + left: 20%; + top: 0; + bottom: 0; + width: 6px; + margin-left: -7px; + content: ''; + background: -moz-linear-gradient(left, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.06) 100%); + /* FF3.6+ */ + + background: -webkit-gradient(linear, left top, right top, color-stop(0%, rgba(0, 0, 0, 0)), color-stop(100%, rgba(0, 0, 0, 0.06))); + /* Chrome,Safari4+ */ + + background: -webkit-linear-gradient(left, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.06) 100%); + /* Chrome10+,Safari5.1+ */ + + background: -o-linear-gradient(left, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.06) 100%); + /* Opera 11.10+ */ + + background: -ms-linear-gradient(left, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.06) 100%); + /* IE10+ */ + + background: linear-gradient(to right, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.06) 100%); + /* W3C */ + + z-index: 2; +} +/* Sidebar and main column vertical separator */ +.main-col:after, +.side-col:after { + position: absolute; + top: 0; + bottom: 0; + width: 1px; + background: #ded9d3; + content: ''; +} +.col-2-left-layout .side-col:after { + right: 0; +} +.col-2-right-layout .side-col:after { + left: 0; +} +.col-2-right-layout .main-col:after { + right: -1px; +} +.col-2-left-layout .main-col:after { + left: -1px; +} +.col-2-left-layout .main-col, +.col-2-right-layout .main-col { + min-width: 730px; +} +/* Sidebar title and store view switcher*/ +/* TODO: temporary styles */ +.side-col h3 { + padding: 0 17px; + margin-top: 16px; +} +.field-store-switcher { + padding: 0 0 20px; + margin: 0; +} +.side-col .ui-tabs h3 { + margin-bottom: 5px; + color: #524c44; + text-shadow: 0 1px 0 #fff; +} +.side-col > .store-switcher { + padding-top: 6px; +} +.field-store-switcher, +.field-store-switcher > .label + .control { + display: inline-block; +} +.field-store-switcher > .tooltip + div > a { + color: #007dbd; + font-size: 12px; + font-weight: 400; +} +.field-store-switcher > .tooltip + div > a:focus, +.field-store-switcher > .tooltip + div > a:hover { + text-decoration: underline; +} +.field-store-switcher > .label { + margin: 0; +} +.side-col > .field-store-switcher { + padding: 19px 18px 0; +} +.side-col > .field-store-switcher > .label { + margin: 0 0 6px; + display: block; +} +.dashboard-container .field-store-switcher { + padding: 20px 0; +} +.toolbar .field-store-switcher { + padding: 0; + margin-right: 20px; +} +/* + Universal Sidebar Tabs +-------------------------------------- */ +/* TODO: for "Product" page only while refactoring */ +.side-col .ui-tabs .ui-accordion-header { + position: relative; + margin: 10px 0 0; + padding: 5px 20px; + cursor: pointer; + color: #524c44; + text-shadow: 0 1px 0 #fff; +} +.side-col .ui-tabs .ui-accordion-header:focus { + outline: none; +} +.side-col .ui-accordion-header:before { + position: absolute; + left: 4px; + top: 7px; + font-family: 'MUI-Icons'; + font-style: normal; + speak: none; + font-weight: normal; + -webkit-font-smoothing: antialiased; + content: '\e02a'; + /* arrow right icon */ + + font-size: 14px; + color: #ada79e; +} +.side-col .ui-accordion-header:hover:before { + color: #777; +} +.side-col .ui-accordion-header-active:before { + content: '\e02c'; + /* arrow down icon */ + +} +.side-col .tabs { + margin: 0 0 30px; + padding: 0; + list-style: none; + font-weight: 500; +} +.side-col > .ui-tabs > .tabs:first-child > li:first-child > a { + border-top-left-radius: 5px; +} +.side-col .tabs > li { + border-bottom: 1px solid #e5e1db; +} +.side-col .tabs > li:first-child { + border-top: 1px solid #e5e1db; +} +.side-col .tabs > li a { + position: relative; + display: block; + padding: 8px 18px; + text-decoration: none; + color: #676056; + -webkit-transition: background 0.3s ease-in-out; + -moz-transition: background 0.3s ease-in-out; + transition: background 0.3s ease-in-out; +} +.side-col .tabs > li a:active, +.side-col .tabs > li a:focus { + outline: none; +} +.side-col .tabs > li a:hover { + background: #fff; +} +.side-col .tabs > .ui-state-active a { + border-left: 3px solid #d87e34; + padding-left: 15px; + background: #dedcd8; + box-shadow: 0 1px 2px #ccc inset; +} +.side-col .tabs > .ui-state-active a:after, +.side-col .tabs > .ui-state-active a:before { + position: absolute; + top: 50%; + right: 0; + width: 14px; + margin-top: -14px; + font-family: 'MUI-Icons'; + font-style: normal; + speak: none; + font-weight: normal; + -webkit-font-smoothing: antialiased; + content: '\e02b'; + /* left turned triangle icon */ + + font-size: 22px; + color: #f5f2ed; + overflow: hidden; + z-index: 4; +} +.side-col .tabs > .ui-state-active a:before { + color: #bdbbb7; + margin-top: -13px; + z-index: 3; +} +.side-col .tabs span.error, +.side-col .tabs span.loader { + display: none; + position: absolute; + right: 12px; + top: 7px; + width: 16px; + height: 16px; + font-size: 16px; +} +.side-col .tab-item-link.changed { + font-style: italic; +} +.side-col .tab-item-link.error span.error, +.side-col .ui-tabs-loading span.loader { + display: block; +} +.side-col .tab-item-link.error span.error:after { + font-family: 'MUI-Icons'; + font-style: normal; + speak: none; + font-weight: normal; + -webkit-font-smoothing: antialiased; + content: '\e006'; + /* warning icon */ + + color: #d87e34; +} +.side-col .ui-tabs-loading span.loader:after { + background: url(../mui/images/ajax-loader-small.gif) no-repeat 50% 50%; + display: block; + content: ''; + width: 16px; + height: 16px; +} +/* TODO: styles for navigation on System > Configuration page */ +/* + Horizontal Tabs +-------------------------------------- */ +.tabs-horiz { + list-style: none; + margin: 0; + padding: 3px 0 0; +} +.tabs-horiz > li { + float: left; + border: 1px solid #e9e4db; + border-bottom-width: 0; + margin: 0 -1px 0 0; +} +.tabs-horiz > li a { + position: relative; + display: block; + padding: 7px 18px 9px; + text-decoration: none; + font-size: 12px; + line-height: 1.666; + color: #676056; +} +.tabs-horiz > .ui-state-active a { + background: #fff; + border-top: 3px solid #f3771e; + margin-top: -3px; + box-shadow: 1px 0 3px #e9e4db; +} +/* + System -> Configuration page navigation in sidebar +-------------------------------------- */ +.config-nav, +.config-nav .items { + margin: 0; + padding: 0; + list-style: none; +} +.config-nav-block:last-child { + margin-bottom: 30px; +} +.config-nav .item { + border-top: 1px solid #E5E1DB; +} +.config-nav .item:first-child { + border-top: 0; +} +.config-nav .title { + margin-bottom: 0; + text-transform: uppercase; + color: #444; + border: solid #CCC; + border-width: 1px 0; + opacity: .8; + padding: 7px 17px; + background: #E6E3DE; +} +.config-nav .item-nav { + display: block; + padding: 8px 18px; + text-decoration: none; + color: #676056; + -webkit-transition: background 0.3s ease-in-out; + -moz-transition: background 0.3s ease-in-out; + transition: background 0.3s ease-in-out; +} +.config-nav .item-nav:hover { + background: #fff; +} +.config-nav .item-nav.active { + position: relative; + border-left: 3px solid #d87e34; + padding-left: 15px; + background: #dedcd8; + box-shadow: 0 1px 2px #ccc inset; +} +.config-nav .item-nav.active:after { + position: absolute; + top: 50%; + right: 0; + width: 14px; + margin-top: -14px; + font-family: 'MUI-Icons'; + font-style: normal; + speak: none; + font-weight: normal; + -webkit-font-smoothing: antialiased; + content: '\e02b'; + /* left turned triangle icon */ + + font-size: 22px; + text-shadow: -1px 1px 0 #bdbbb7; + color: #f5f2ed; + overflow: hidden; + z-index: 3; +} +/* + Footer +-------------------------------------- */ +.footer { + position: absolute; + left: 0; + right: 0; + bottom: 0; + color: #989288; + font-size: 11px; +} +.footer-content { + margin: 0 auto; + max-width: 1300px; + min-width: 960px; + padding: 20px; +} +/* + Switcher +-------------------------------------- */ +.switcher { + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + cursor: pointer; + display: inline-block; + overflow: hidden; +} +.switcher input[type="checkbox"] { + position: absolute; + left: -999em; +} +.switcher-label { + color: #676056; + font-size: 13px; + font-weight: 600; + text-transform: uppercase; +} +.switcher-label:before { + content: attr(data-text-off); +} +.switcher-label:after { + display: inline-block; + margin-left: 10px; + vertical-align: bottom; + width: 34px; + height: 17px; + background: url(../images/switcher.png) no-repeat; + content: ''; +} +.switcher input[type="checkbox"]:focus + .switcher-label:after { + border-color: #75b9f0; +} +.switcher input[type="checkbox"]:checked + .switcher-label:after { + background-position: -34px 0; +} +.switcher input[type="checkbox"]:checked + .switcher-label:before { + content: attr(data-text-on); +} +.eq-ie8 .switcher-label:after { + content: 'off'; + overflow: hidden; + white-space: nowrap; + text-indent: 100%; +} +.eq-ie8 .switcher.checked .switcher-label:after { + background-position: -34px 0; + content: 'on'; +} +.eq-ie8 .switcher.checked .switcher-label:before { + content: attr(data-text-on); +} +/* + Content actions panel (with buttons, switchers...) +-------------------------------------- */ +.page-actions { + padding: 0 0 20px; + text-align: right; +} +.page-actions .buttons-group { + vertical-align: top; + text-align: left; +} +.page-actions > .switcher { + display: inline-block; + vertical-align: top; + margin: 6px 10px 0 0; +} +.main-col .page-actions { + padding: 20px 0; +} +.page-actions .store-switcher { + float: left; +} +.catalog-product-index .page-actions { + padding-top: 0; +} +/* TODO: refactor trees */ +.x-tree ul { + margin: 0; + padding: 0; +} +.page-actions.fixed { + padding: 0 21px; + position: fixed; + top: 0; + left: 0; + right: 0; + z-index: 998; +} +.page-actions.fixed .page-actions-inner { + background: -moz-linear-gradient(top, #f5f2ed 0%, #f5f2ed 56%, rgba(245, 242, 237, 0) 100%); + /* FF3.6+ */ + + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #f5f2ed), color-stop(56%, #f5f2ed), color-stop(100%, rgba(245, 242, 237, 0))); + /* Chrome,Safari4+ */ + + background: -webkit-linear-gradient(top, #f5f2ed 0%, #f5f2ed 56%, rgba(245, 242, 237, 0) 100%); + /* Chrome10+,Safari5.1+ */ + + background: -o-linear-gradient(top, #f5f2ed 0%, #f5f2ed 56%, rgba(245, 242, 237, 0) 100%); + /* Opera 11.10+ */ + + background: -ms-linear-gradient(top, #f5f2ed 0%, #f5f2ed 56%, rgba(245, 242, 237, 0) 100%); + /* IE10+ */ + + background: linear-gradient(to bottom, #f5f2ed 0%, #f5f2ed 56%, rgba(245, 242, 237, 0) 100%); + /* W3C */ + + padding: 11px 20px 11px; + min-height: 36px; + margin: 0 auto; + min-width: 916px; + max-width: 1259px; +} +.lt-ie10 .page-actions.fixed .page-actions-inner { + background: #f5f2ed; +} +.page-actions.fixed .page-actions-inner:before { + content: attr(data-title); + float: left; + font-size: 20px; + max-width: 50%; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +/* + Table Grid +-------------------------------------- */ +/* Grid - General */ +.grid-container { + margin-bottom: 10px; +} +.grid { + border-bottom: 0; + color: #676056; + font-size: 13px; + font-weight: 400; + padding-bottom: .5em; +} +.grid table { + border-collapse: collapse; + border: none; + width: 100%; +} +.grid table.border { + border: 1px solid #c0bbaf; +} +.grid tbody { + background: #e6e3de; +} +.grid tr.even, +.grid tr.even tr { + background: #f5f2ed; +} +.grid tr.on-mouse { + cursor: pointer; +} +.grid tr.on-mouse td, +.grid table tbody tr.on-mouse:hover td, +.grid table tbody tr.on-mouse:hover th, +.grid table tbody tr.on-mouse:nth-child(odd):hover td, +.grid table tbody tr.on-mouse:nth-child(odd):hover th { + background-color: #fff; +} +/* Rows mouse-over */ +.grid tr.invalid { + background-color: #f5d6c7; +} +.grid th, +.grid td { + padding: 2px 4px 2px 4px; + vertical-align: top; +} +.grid th { + border: none; +} +.grid td.editable input.input-text { + width: 50px; + margin-left: 4px; +} +.grid td input.input-text { + width: 86%; +} +.grid td input.input-inactive { + background: #eee; +} +.grid table td { + border: solid #c0bbaf; + border-width: 0 1px 1px; + padding: 5px; +} +.grid table.border td { + background: #fff; +} +.grid table td.product { + text-align: right; +} +.grid table td.empty-text { + border: solid #c0bbaf; + border-width: 0 1px; + color: #676056; + font-size: 16px; + font-weight: 400; + text-align: center; + padding: 15px; +} +.eq-ie8 .grid table td.empty-text { + border-width: 0 1px 1px; +} +.grid table tr:last-child td.empty-text { + border-width: 0 1px 1px; +} +.eq-ie8 .grid table tr td.empty-text { + border-width: 0 1px 1px; +} +.grid table td.empty-text:hover { + background: #e6e3de; +} +.grid table td .action-select { + width: 100%; +} +.grid tbody.odd tr { + background: #fff; +} +.grid tbody.even tr { + background: #f6f6f6; +} +.grid tbody.odd tr td, +.grid tbody.even tr td { + border-bottom: 0; +} +.grid tbody.odd tr.border td, +.grid tbody.even tr.border td { + border-bottom: 1px solid #dadfe0; +} +/* + Grid - Pager and Buttons row +-------------------------------------- */ +.grid-actions { + border: 1px solid #c0bbaf; + border-bottom: 0; + background: #f6f3ec; + background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2Y2ZjNlYyIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNlZGVhZTEiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); + background: -moz-linear-gradient(top, #f6f3ec 0%, #edeae1 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #f6f3ec), color-stop(100%, #edeae1)); + background: -webkit-linear-gradient(top, #f6f3ec 0%, #edeae1 100%); + background: -o-linear-gradient(top, #f6f3ec 0%, #edeae1 100%); + background: -ms-linear-gradient(top, #f6f3ec 0%, #edeae1 100%); + background: linear-gradient(to bottom, #f6f3ec 0%, #edeae1 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f6f3ec', endColorstr='#edeae1', GradientType=0); + padding: 7px 8px 8px; + position: relative; +} +[id$='Grid'] .separator { + padding: 0 4px; + color: #b9b9b9; +} +.grid-actions select { + margin: 0 5px; +} +.grid-actions .export, +.grid-actions .filter-actions { + float: right; + margin-left: 30px; +} +.grid-actions .filter-actions button { + float: left; + margin-left: 4px; +} +.grid-actions .pager { + color: #676056; + font-size: 13px; + font-weight: 400; +} +.grid-actions .pager select { + width: 5em; + margin: 0 4px; +} +.grid-actions .pager input.page { + width: 2em; +} +.pager .action-next, +.pager .action-previous { + display: inline-block; + position: relative; + text-indent: 100%; + overflow: hidden; + height: 16px; + width: 16px; + vertical-align: middle; + text-decoration: none; +} +.pager .action-next:after, +.pager .action-previous:after { + font-family: 'MUI-Icons'; + content: "\e02a"; + font-size: 16px; + color: #333; + position: absolute; + top: 0; + left: 0; + line-height: 1; + text-indent: 0; +} +.pager .action-previous:after { + content: "\e02b"; +} +.pager span.action-next:after, +.pager span.action-previous:after { + color: #7f7f7f; +} +.grid-actions .date { + float: left; + margin: 0 15px 0 0; + position: relative; +} +.grid-actions .date input { + margin: 0 5px; + width: 80px; +} +.grid-actions .required:after { + content: '*'; + color: red; +} +/* TODO: remove styles for images when images will be replaced by font icons */ +.grid-actions img { + vertical-align: middle; + height: 22px; + width: 22px; +} +.grid-actions .pager img { + width: auto; + height: auto; +} +/* TODO: refactor validation fields styles after approved design comes */ +.grid-actions .validation-advice { + background: #f3dcd8; + border: 1px solid #963535; + border-radius: 3px; + color: #963535; + margin: 5px 0 0; + padding: 3px 7px; + position: absolute; + white-space: nowrap; + z-index: 5; +} +.grid-actions .validation-advice:before { + font-family: 'MUI-Icons'; + font-style: normal; + speak: none; + font-weight: normal; + -webkit-font-smoothing: antialiased; + content: '\e029'; + /* user icon */ + + position: absolute; + top: -12px; + left: 50%; + margin-left: -3px; +} +.grid-actions .link-feed { + white-space: nowrap; +} +/* + Grid - Headings +-------------------------------------- */ +.grid tr.headings th { + color: #ffffff; + font-size: 13px; + font-weight: 700; + border-right: 1px solid #837f79; + padding: 0; + vertical-align: bottom; +} +.grid tr th:first-child { + border-left: 1px solid #837f79; +} +.grid tr.headings th > span { + display: block; + border-bottom: 2px solid transparent; + padding: 5px 5px 2px; + white-space: nowrap; +} +.grid tr.headings th:hover > span { + border-color: #504841; +} +.grid tr.headings th.no-link:hover > span, +.grid tr.headings th.col-select:hover > span { + border-color: transparent; +} +.grid tr.headings th a label { + display: block; + padding-right: 20px; +} +.grid tr.headings th a { + display: block; + color: #ffffff; + font-size: 13px; + font-weight: 700; + position: relative; + text-decoration: none; +} +.grid tr.headings th a:after { + display: none; + height: 8px; + width: 15px; + position: absolute; + bottom: 4px; + right: 0; + font-family: 'MUI-Icons'; + font-style: normal; + speak: none; + font-weight: normal; + font-size: 20px; + line-height: 8px; + -webkit-font-smoothing: antialiased; + content: '\e038'; + /* arrow down icon */ + + color: #8c8172; +} +.grid tr.headings th a:hover:after { + display: block; +} +.grid tr.headings th a.sort-arrow-desc:after { + color: #c7b299; + display: block; +} +.grid tr.headings th a.sort-arrow-asc:after { + color: #c7b299; + content: '\e035'; + /* arrow up icon */ + + display: block; +} +.grid tr.headings th a.sort-arrow-desc:hover:after, +.grid tr.headings th a.sort-arrow-asc:hover:after { + color: #fff; +} +/* Grid - Filter */ +.grid .filter { + cursor: default; +} +.grid .filter th { + padding: 5px; + border-right: 1px solid #837F79; + vertical-align: top; + white-space: normal; +} +.grid .filter input.input-text { + background: #5e5a52; + border-radius: 2px; + border: none; + color: #bcb795; + padding: 0 5px; + height: 20px; + width: 99%; +} +.grid .filter input.input-text::-webkit-input-placeholder { + color: #858376 !important; + text-transform: lowercase; +} +.grid .filter input.input-text:-moz-placeholder { + color: #858376 !important; + text-transform: lowercase; +} +.grid .filter input.input-text::-moz-placeholder { + color: #858376 !important; + text-transform: lowercase; +} +:-ms-input-placeholder { + color: #858376 !important; + text-transform: lowercase; +} +.grid .filter select { + background: #5e5a52; + border-radius: 2px; + border: none; + color: #bcb795; + margin: 0; + padding: 0; + height: 20px; + width: 99%; +} +.grid td select { + font-family: Arial, Helvetica, sans-serif; + font-size: 13px; + padding: 4px 4px 5px; + text-align: left; +} +.grid .action-select { + background: #fff; + border: 1px solid #ccc; + margin: 0; +} +.grid .filter .range .range-line { + margin-bottom: 3px; +} +.grid .filter .range div.date { + min-width: 121px; +} +.grid .filter .range .date input { + margin-top: 0; + vertical-align: middle; + width: 80%; +} +.grid .filter .range select { + margin: 0; + color: #676056; + font-size: 11px; + font-weight: 400; + color: #bcb795; +} +.grid .filter .date { + position: relative; +} +.grid .filter .date img { + width: 15px; + height: 15px; + cursor: pointer; + vertical-align: middle; + margin-left: 5px; + position: relative; + z-index: 2; + opacity: 0; +} +.eq-ie8 .grid .filter .date img { + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0); +} +.grid .filter .date:before { + position: absolute; + left: 80%; + top: 1px; + margin-left: 5px; + text-shadow: none; + width: 16px; + height: 16px; + line-height: 16px; + font-family: 'MUI-Icons'; + font-style: normal; + speak: none; + font-weight: normal; + -webkit-font-smoothing: antialiased; + font-size: 16px; + content: '\e06a'; + /* icon calendar */ + + color: #cac3b4; + z-index: 1; +} +.grid .head-massaction select { + width: 50px; +} +/* Grid - Mass Action */ +.massaction { + color: #cac3b4; + padding: 7px 8px; + background: #666158; + box-shadow: 0 1px 2px 0 #504d46 inset, 0 -1px 2px 0 #504d46 inset; + overflow: hidden; +} +.eq-ie8 .massaction { + border-bottom: 2px solid #504d46; +} +.massaction ul { + list-style: none; + margin: 0; + padding: 6px 0 0; +} +.massaction li { + display: inline-block; +} +.massaction li:before { + color: #837F79; + content: '|'; + display: inline-block; + margin: 0 5px; +} +.massaction li:first-child:before { + display: none; +} +.massaction .entry-edit { + float: right; + display: inline-block; +} +.massaction .entry-edit fieldset { + margin: 0; + padding: 0; + background: none; + border: none; +} +.massaction .entry-edit fieldset select { + border-radius: 2px; + margin: 0; +} +.massaction .entry-edit fieldset select.validation-failed { + border: 1px dashed #eb340a; + background: #faebe7; +} +.massaction .entry-edit .field-row { + display: inline-block; + vertical-align: middle; +} +.eq-ie8 .massaction .entry-edit .field-row:first-child { + margin-right: 1px; +} +.eq-ie8 .massaction .entry-edit .field-row { + display: inline; +} +.massaction .entry-edit .outer-span .entry-edit { + float: none; +} +.massaction .entry-edit .field-row label { + color: #cac3b4; + line-height: 26px; + margin: 0 5px 0 20px; + padding: 0; + vertical-align: middle; + width: auto; + float: none; +} +.massaction .entry-edit .validation-advice { + display: none !important; +} +.massaction a { + color: #e7e2d7; + text-decoration: none; +} +.massaction a:hover { + color: #fff; +} +/* Grid Footer */ +.grid table tfoot tr { + background: #656156; +} +.grid table tfoot tr th, +.grid table tfoot tr td { + border-right: 1px solid #837f79; + line-height: 1.7em; + padding: 3px 10px; +} +.grid table tfoot tr th:first-child, +.grid table tfoot tr td:first-child { + border-left: 1px solid #837f79; +} +.grid table.border tfoot tr td { + background: #656156; +} +.grid .col-price, +.grid .col-number { + text-align: right; +} +/* Dynamic Grid */ +/* Used in pages like Catalog -> Attributes */ +.dynamic-grid th { + padding: 2px; + width: 100px; +} +.dynamic-grid td { + padding: 2px; +} +.dynamic-grid td input { + width: 94px; +} +tr.dynamic-grid td, +tr.dynamic-grid th { + padding: 2px 10px 2px 0; + width: auto; +} +tr.dynamic-grid input.input-text { + width: 154px; +} +.available { + color: #080; + font-weight: bold; +} +.not-available { + color: #800; +} +.categories-side-col { + padding: 0 3%; +} +/* + TODO: change ids to 'table.data' after refactoring of all templates for grids + Manage Products Grid +-------------------------------------- */ +#cross_sell_product_grid table.data, +#up_sell_product_grid table.data, +#related_product_grid table.data, +#productGrid_table, +#setGrid_table, +#attributeGrid_table, +.custom-options .data-table, +.ui-dialog .data { + word-wrap: break-word; + table-layout: fixed; +} +#cross_sell_product_grid table.data th, +#up_sell_product_grid table.data th, +#related_product_grid table.data th, +#productGrid_table th, +#setGrid_table th, +#attributeGrid_table th, +.custom-options .data-table th, +.ui-dialog .data th { + word-wrap: normal; + overflow: hidden; + vertical-align: top; +} +#cross_sell_product_grid table.data th > span, +#up_sell_product_grid table.data th > span, +#related_product_grid table.data th > span, +#productGrid_table th > span, +#setGrid_table th > span, +#attributeGrid_table th > span, +.custom-options .data-table th > span, +.ui-dialog .data th > span { + white-space: normal; +} +/* will be deleted after checking entire back-end +table .col-draggable { + width: 1%; +} + +table .col-default, +table .col-select, +table .col-qty, +table .col-actions, +table .col-action, +table .col-id, +table .col-uqty.qty-box { + width: 5%; +} + +table .col-visibility, +table .col-status, +table .col-websites, +table .col-position { + width: 7%; +} + +table .col-type, +table .col-price, +table .col-attr-name { + width: 8%; +} + +table .col-name, +table .col-sku { + width: 15%; +} + +table .col-attribute_code, +table .col-frontend_label { + width: 25%; +} + +.ui-dialog .selection-search table .col-select { + width: 25%; +} +*/ +table .col-draggable .draggable-handle { + position: relative; + top: 0; + float: left; +} +.grid table .col-id { + text-align: left; +} +/* + Data table +-------------------------------------- */ +.data-table { + border-collapse: separate; + /* do not remove this! without this rule in FF when table has only 1 row bottom and side borders disappear*/ + + width: 100%; +} +.data-table thead, +.data-table tfoot, +.data-table th, +.accordion .config .data-table thead th, +.accordion .config .data-table tfoot td { + background: #fff; + color: #676056; + font-size: 13px; + font-weight: 600; +} +.data-table th { + border-color: #c9c2b8; + border-width: 0 0 1px; + padding: 7px; +} +.data-table td, +.data-table tbody tr td, +.accordion .config .data-table td { + background: #fff; + padding: 5px 7px; + color: #676056; + font-size: 14px; + font-weight: 400; + vertical-align: middle; + border: solid #eae8e4; + border-width: 0 0 1px; +} +.eq-ie8 .data-table td, +.eq-ie8 .data-table tbody tr td { + border-width: 0 0 1px; +} +.eq-ie8 .data-table td > .field { + margin-bottom: 0; +} +.data-table tbody tr.selected td, +.data-table tbody tr.selected th, +.data-table tbody tr:hover td, +.data-table tbody tr:hover th { + background: #fff; +} +.data-table tbody tr:nth-child(odd) td, +.data-table tbody tr:nth-child(odd):hover td, +.accordion .config .data-table tbody tr:nth-child(odd) td { + background: #fbfaf6; +} +.data-table tbody tr.odd td { + background: #fbfaf6; +} +.data-table tfoot tr:last-child td, +.data-table tfoot tr:last-child th, +.accordion .config .data-table tfoot tr:last-child td { + border: 0; +} +.eq-ie8 .data-table tfoot tr td { + border: none; +} +.data-table input[type="text"] { + width: 98%; + padding-left: 1%; + padding-right: 1%; +} +.data-table select { + margin: 0; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; + border-radius: 4px; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} +.data-table th.required-entry:after, +.data-table td.required-entry:after { + content: '*'; + color: red; +} +.data-table .col-actions .actions-split { + margin-top: 4px; +} +.data-table .col-actions .actions-split [class^='action-'] { + background: none; + border: 1px solid #c8c3b5; + padding: 3px 5px; + color: #bbb3a6; + font-size: 12px; +} +.data-table .col-actions .actions-split [class^='action-']:first-child { + border-right: 0; +} +.data-table .col-actions .actions-split .dropdown-menu { + margin-top: -1px; +} +.data-table .col-actions .actions-split .dropdown-menu a { + display: block; + color: #333; + text-decoration: none; +} +.data-table .col-actions .actions-split.active .action-toggle { + position: relative; + border-bottom-right-radius: 0; + box-shadow: none; + background: #fff; +} +.data-table .col-actions .actions-split.active .action-toggle:after { + position: absolute; + top: 100%; + left: 0; + right: 0; + height: 2px; + margin-top: -1px; + background: #fff; + content: ''; + z-index: 2; +} +.data-table .col-actions .actions-split.active .dropdown-menu { + border-top-right-radius: 0; +} +/* + Data table - alternative view +-------------------------------------- */ +.customer-information .data-table, +.order-information .data-table, +.order-account-information .data-table, +.adminhtml-rma-new .data-table { + width: 100%; +} +.customer-information .data-table tbody tr th, +.order-information .data-table tbody tr th, +.order-account-information .data-table tbody tr th, +.adminhtml-rma-new .data-table tbody tr th, +[class^=" sales-transactions-"] .data-table tbody tr th, +[class^=" sales-"] .order-payment-method .data-table tbody tr th, +[class^=" sales-billing-agreement-"] .log-details .data-table tbody tr th { + font-weight: bold; +} +.customer-information .data-table tbody tr td, +.customer-information .data-table tbody tr th, +.order-information .data-table tbody tr td, +.order-information .data-table tbody tr th, +.order-account-information .data-table tbody tr td, +.order-account-information .data-table tbody tr th, +[class^=" adminhtml-rma-"] .data-table tbody tr td, +[class^=" adminhtml-rma-"] .data-table tbody tr th, +[class^=" sales-transactions-"] .data-table tbody tr th, +[class^=" sales-transactions-"] .data-table tbody tr td, +[class^=" sales-"] .order-payment-method .data-table tbody tr th, +[class^=" sales-"] .order-payment-method .data-table tbody tr td, +[class^=" sales-billing-agreement-"] .log-details .data-table tbody tr th, +[class^=" sales-billing-agreement-"] .log-details .data-table tbody tr td { + background-color: #fff; + border: 0; + padding: 9px 10px 10px; + color: #666; + vertical-align: top; +} +.customer-information .data-table tbody tr:nth-child(2n+1) td, +.customer-information .data-table tbody tr:nth-child(2n+1) th, +.order-information .data-table tbody tr:nth-child(2n+1) td, +.order-information .data-table tbody tr:nth-child(2n+1) th, +.order-account-information .data-table tbody tr:nth-child(2n+1) td, +.order-account-information .data-table tbody tr:nth-child(2n+1) th, +[class^=" adminhtml-rma-"] .data-table tbody tr:nth-child(2n+1) td, +[class^=" adminhtml-rma-"] .data-table tbody tr:nth-child(2n+1) th, +[class^=" sales-transactions-"] .data-table tbody tr:nth-child(2n+1) th, +[class^=" sales-transactions-"] .data-table tbody tr:nth-child(2n+1) td, +[class^=" sales-"] .order-payment-method .data-table tbody tr:nth-child(2n+1) th, +[class^=" sales-"] .order-payment-method .data-table tbody tr:nth-child(2n+1) td, +[class^=" sales-billing-agreement-"] .log-details .data-table tbody tr:nth-child(2n+1) th, +[class^=" sales-billing-agreement-"] .log-details .data-table tbody tr:nth-child(2n+1) td { + background-color: #fbfaf6; +} +.eq-ie8 .customer-information .data-table tbody tr td, +.eq-ie8 .customer-information .data-table tbody tr th, +.eq-ie8 .order-information .data-table tbody tr td, +.eq-ie8 .order-information .data-table tbody tr th, +.eq-ie8 .order-account-information .data-table tbody tr td, +.eq-ie8 .order-account-information .data-table tbody tr th, +.eq-ie8 [class^=" adminhtml-rma-"] .data-table tbody tr td, +.eq-ie8 [class^=" adminhtml-rma-"] .data-table tbody tr th, +.eq-ie8 [class^=" sales-transactions-"] .data-table tbody tr th, +.eq-ie8 [class^=" sales-transactions-"] .data-table tbody tr td, +.eq-ie8 [class^=" sales-"] .order-payment-method .data-table tbody tr th, +.eq-ie8 [class^=" sales-"] .order-payment-method .data-table tbody tr td, +.eq-ie8 [class^=" sales-billing-agreement-"] .log-details .data-table tbody tr th, +.eq-ie8 [class^=" sales-billing-agreement-"] .log-details .data-table tbody tr td { + border-bottom: 1px solid #ededed; +} +/* + Content alignments in tables +-------------------------------------- */ +/* left */ +.col-website, +.col-name, +.col-sku, +.col-color, +.col-size, +.col-product, +.col-comment, +.col-actions, +.col-status { + text-align: left; +} +/* center */ +.col-include, +.col-display, +.col-image, +.col-no-records, +.col-select, +.col-default, +.col-uqty { + text-align: center; +} +/* right */ +.col-qty, +.col-weight, +.col-price, +.col-price > input, +.col-id, +.col-total, +.col-average { + text-align: right; +} +/* + Attribute Information +-------------------------------------- */ +.data-table .col-default { + white-space: nowrap; + text-align: center; + vertical-align: middle; +} +.data-table .col-delete { + text-align: center; + width: 32px; +} +.data-table .col-file { + white-space: nowrap; +} +.data-table .col-file input { + margin: 0 5px; + width: 40%; +} +.data-table .col-file input:first-child { + margin-left: 0; +} +/* + Website store views tree +-------------------------------------- */ +.store-tree .website-name { + font-size: 14px; + font-weight: bold; +} +.store-tree .webiste-groups { + margin: 5px 0 20px 18px; +} +.store-tree .webiste-groups dt { + font-weight: bold; +} +.store-tree .webiste-groups dd { + margin: 5px 0 15px 15px; +} +.store-tree .webiste-groups dd > ul { + list-style: none; + margin: 0; + padding: 0; +} +.store-tree .webiste-groups dd > ul > li { + margin: 0 0 5px; +} +/* + Customer Reviews +-------------------------------------- */ +.field-detailed_rating .control-value { + padding: 0; +} +.field-detailed_rating .nested { + padding: 0; +} +.field-detailed_rating .field-rating { + margin: 15px 0 0 0; +} +.field-detailed_rating .field-rating:first-child { + margin-top: 0; +} +.field-detailed_rating .field-rating .label { + width: 75px; +} +.field-detailed_rating .field-rating .control { + unicode-bidi: bidi-override; + direction: rtl; + width: 125px; +} +.field-detailed_rating input[type="radio"] { + display: none; +} +.field-detailed_rating .field-rating .control label { + color: #ccc; + cursor: pointer; + font-size: 18px; + float: right; + overflow: hidden; + white-space: nowrap; + width: 18px; + -webkit-transition: color 150ms linear; + -moz-transition: color 150ms linear; + -o-transition: color 150ms linear; + -ms-transition: color 150ms linear; + transition: color 150ms linear; +} +/* + Tree Store Scope +-------------------------------------- */ +.tree-store-scope .buttons-set { + margin-bottom: 9px; +} +.tree-store-scope .buttons-set button { + margin-right: 4px; +} +.tree-store-scope .field { + margin: 0 0 5px; +} +.tree-store-scope [class^="field field-website_"] .label, +.tree-store-scope [class^="field field-group_"] .label, +.tree-store-scope [class^="field field-w_"] .label, +.tree-store-scope [class^="field field-sg_"] .label { + text-align: left; + font-size: 18px; + padding-right: 0; + width: auto; +} +.tree-store-scope [class^="field field-group_"] .label, +.tree-store-scope [class^="field field-sg_"] .label { + padding-left: 20px; +} +.tree-store-scope .field input[type="checkbox"] { + margin-right: 3px; + position: relative; + top: 2px; +} +.tree-store-scope .field .addafter { + display: inline-block; + padding-top: 6px; +} +.tree-store-scope .tooltip .help { + margin-top: 11px; +} +/* + Product Massaction page + TODO: css code below should be removed after element.html refactoring +-------------------------------------- */ +.attributes-edit-form .attribute-change-checkbox { + white-space: nowrap; + display: block; +} +.attributes-edit-form .attribute-change-checkbox > label > input { + width: auto; +} +.attributes-edit-form .field:last-child, +.attributes-edit-form .field-name, +.attributes-edit-form .field.type-price, +.attributes-edit-form .field-price, +.attributes-edit-form .field-special_price, +.attributes-edit-form .field-meta_title, +.attributes-edit-form .field-visibility, +.attributes-edit-form .field-custom_design, +.attributes-edit-form .field-page_layout, +.attributes-edit-form .field-options_container, +.attributes-edit-form .field-country_of_manufacture, +.attributes-edit-form .field-msrp_display_actual_price_type, +.attributes-edit-form .field-tax_class_id, +.attributes-edit-form .field-is_returnable, +.attributes-edit-form .field-msrp, +.attributes-edit-form .field-gift_wrapping_price { + margin-bottom: 50px; +} +.attributes-edit-form .field .control { + position: relative; +} +.attributes-edit-form .field-name .attribute-change-checkbox, +.attributes-edit-form .field-meta_title .attribute-change-checkbox, +.attributes-edit-form .field-gift_wrapping_price .attribute-change-checkbox, +.attributes-edit-form .field .control select + .addafter { + position: absolute; + left: 0; + top: 35px; +} +.attributes-edit-form .field.type-price .attribute-change-checkbox, +.attributes-edit-form .field-price .attribute-change-checkbox, +.attributes-edit-form .field-special_price .attribute-change-checkbox, +.attributes-edit-form .field-msrp .attribute-change-checkbox { + position: absolute; + top: 35px; +} +.attributes-edit-form .field-special_from_date > .control .input-text, +.attributes-edit-form .field-special_to_date > .control .input-text, +.attributes-edit-form .field-news_from_date > .control .input-text, +.attributes-edit-form .field-news_to_date > .control .input-text, +.attributes-edit-form .field-custom_design_from > .control .input-text, +.attributes-edit-form .field-custom_design_to > .control .input-text { + border-width: 1px; + border-radius: 4px; + width: 130px; +} +.attributes-edit-form .field-special_from_date .attribute-change-checkbox, +.attributes-edit-form .field-special_to_date .attribute-change-checkbox, +.attributes-edit-form .field-news_from_date .attribute-change-checkbox, +.attributes-edit-form .field-news_to_date .attribute-change-checkbox, +.attributes-edit-form .field-custom_design_from .attribute-change-checkbox, +.attributes-edit-form .field-custom_design_to .attribute-change-checkbox { + margin-top: 5px; +} +.attributes-edit-form .field-weight .fields-group-2 .control { + width: 160px; +} +.attributes-edit-form .field-weight .fields-group-2 .control > input { + width: 130px; + float: left; +} +.attributes-edit-form .field-weight .fields-group-2 .control > input + .addafter { + position: absolute; + top: 35px; +} +.attributes-edit-form .field-weight .fields-group-2 .control .addafter strong { + line-height: 26px; +} +.attributes-edit-form .field .control select { + border-radius: 4px; +} +.attributes-edit-form .field-gift_message_available .addon > .select, +.attributes-edit-form .field-gift_wrapping_available .addon > .select { + margin-bottom: 25px; +} +.attributes-edit-form .field-gift_message_available .addon > input[type="checkbox"], +.attributes-edit-form .field-gift_wrapping_available .addon > input[type="checkbox"] { + width: auto; + margin-right: 5px; +} +/* + Widgets +-------------------------------------- */ +.widget-layout-updates .fieldset-wrapper, +.widget-layout-updates .data-table { + margin: 0 0 18px; +} +.widget-layout-updates .fieldset-wrapper-title label { + padding: 10px 0 0; +} +.widget-layout-updates .fieldset-wrapper-title select { + margin: 3px 10px 5px; +} +.widget-layout-updates .fieldset-wrapper-title span, +.widget-layout-updates .fieldset-wrapper-title select { + vertical-align: middle; +} +.widget-layout-updates .data-table { + table-layout: fixed; +} +.eq-ie8 .widget-layout-updates .data-table { + table-layout: auto; +} +.widget-layout-updates .data-table, +.widget-layout-updates .data-table tr:nth-child(odd) td, +.widget-layout-updates .data-table tr:nth-child(odd):hover td { + background: none; + border: none; +} +.widget-layout-updates .data-table th, +.widget-layout-updates .data-table tbody td { + border: none; + padding: 5px 10px; + vertical-align: top; +} +.widget-layout-updates .data-table select { + margin: 0; + max-width: 99%; + overflow: hidden; +} +.widget-layout-updates .chooser_container { + padding: 0 10px; + margin-bottom: 18px; +} +.widget-layout-updates .chooser_container p { + margin: 0 0 18px; +} +.widget-layout-updates .chooser_container p img, +.widget-layout-updates .chooser_container p input { + vertical-align: middle; +} +/* + Preview window +-------------------------------------- */ +.preview-window { + background: #fff; +} +.preview-window .toolbar { + background: #f5f2ed; + padding: 20px; +} +.preview-window .toolbar .switcher { + margin: 0; +} +.preview-window .toolbar .switcher span { + background: none; + width: auto; +} +/* + Global 'No Products found' block +-------------------------------------- */ +.no-products-message { + background: #fbfaf6; + padding: 12px; + text-align: center; + font-size: 12px; + color: #666; + margin-bottom: 13px; +} +/* + WYSIWYG +-------------------------------------- */ +.action-wysiwyg { + margin: 10px 0; +} +#catalog-wysiwyg-editor .buttons-set { + margin-bottom: 9px; +} +#catalog-wysiwyg-editor .buttons-set button { + margin-right: 4px; +} +/* + System Messages +-------------------------------------- */ +.message-system { + min-width: 960px; + max-width: 1300px; + margin: 0 auto; + overflow: hidden; +} +.message-system-inner { + background: #f7f3eb; + border: 1px solid #c0bbaf; + border-top: 0; + border-radius: 0 0 5px 5px; + float: right; + overflow: hidden; +} +.message-system-unread .message-system-inner { + float: none; +} +.message-system-list { + margin: 0; + padding: 0; + list-style: none; + float: left; +} +.message-system .message-system-list { + width: 75%; +} +.message-system-list li { + padding: 5px 13px 7px 36px; + position: relative; +} +.message-system-short { + padding: 5px 13px 7px; + float: right; +} +.message-system-short span { + display: inline-block; + margin-left: 7px; + border-left: 1px #d1ccc3 solid; +} +.message-system-short span:first-child { + border: 0; + margin-left: 0; +} +.message-system-short a { + padding-left: 27px; + position: relative; + height: 16px; +} +.message-system .message-system-short a:before, +.message-system-list li:before { + font-family: 'MUI-Icons'; + font-style: normal; + speak: none; + font-weight: normal; + -webkit-font-smoothing: antialiased; + height: 16px; + width: 16px; + font-size: 16px; + line-height: 16px; + text-align: center; + position: absolute; + left: 7px; + top: 2px; +} +.message-system-list li:before { + top: 5px; + left: 13px; +} +.message-system .message-system-short .warning a:before, +.message-system-list li.warning:before { + content: "\e006"; + color: #f2a825; +} +.message-system .message-system-short .error a:before, +.message-system-list li.error:before { + content: "\e086"; + font-family: 'MUI-Icons'; + color: #c00815; +} +.ui-dialog .message-system-list { + margin-bottom: 25px; +} +/* + Add Attribute Popup +-------------------------------------- */ +#create_new_attribute { + overflow: hidden; +} +#create_new_attribute > .loading-mask { + left: -25px; + top: -50px; +} +.attribute-popup { + background: none; +} +.attribute-popup #edit_form > .fieldset > .legend { + display: none; +} +.attribute-popup .wrapper-popup { + padding: 0; + height: 511px; + overflow-x: hidden; + overflow-y: auto; +} +.attribute-popup .fieldset, +.attribute-popup .fieldset-wrapper { + border: none; + border-radius: 0; + padding: 4px 0 20px; + margin: 0 23px 20px; +} +.attribute-popup .fieldset-wrapper { + border-top: none; +} +.attribute-popup .fieldset-wrapper .fieldset-wrapper-title { + border-bottom: none; +} +.attribute-popup .fieldset-wrapper .fieldset-wrapper-content > .fieldset { + margin-left: 0; + margin-right: 0; +} +.attribute-popup .fieldset > .field > input[type="checkbox"] { + margin-top: 7px; +} +.attribute-popup .fieldset .label { + width: 35%; +} +.attribute-popup .collapsable-wrapper, +#manage-titles-wrapper .fieldset-wrapper-title { + margin-bottom: 0; + padding-bottom: 0; +} +.attribute-popup .collapsable-wrapper .fieldset-wrapper-title > .title:before { + color: #797269; + font-size: 14px; + top: 9px; +} +.attribute-popup form .entry-edit:first-child .fieldset { + border-bottom: 1px solid #dfdcd7; +} +.attribute-popup .fieldset .legend { + border: none; +} +.attribute-popup .page-actions { + position: fixed; + top: auto !important; + left: 0; + right: 0; + bottom: 0; + background: #fff; + padding: 27px 50px 25px 23px; + border-top: 1px solid #dfdcd7; +} +.attribute-popup .page-actions [class^='action-'] { + margin-left: 18px; +} +.attribute-popup #base_fieldset { + padding-top: 20px; +} +.attribute-popup #base_fieldset > .legend { + display: none; +} +.attribute-popup .page-actions #reset, +.attribute-popup .page-actions #reset:hover, +.attribute-popup .page-actions #reset:active, +.attribute-popup .page-actions #reset:focus { + float: right; + vertical-align: middle; + margin: 5px 0 0 18px; +} +.attribute-popup .page-actions-placeholder { + display: none; +} +.attribute-popup .page-actions.fixed .page-actions-inner { + background: #fff; + padding: 0; + min-width: 100%; + max-width: 100%; + min-height: 100%; + margin: 0; +} +.attribute-popup .footer { + display: none; +} +#manage-options-panel > .data-table { + clear: both; +} +.CustomGridView .col-1-layout, +.sales-order-index .col-1-layout, +.adminhtml-rma-index .col-1-layout, +.adminhtml-catalog-event-index .col-1-layout, +.adminhtml-urlrewrite-index .col-1-layout, +.catalog-search-index .col-1-layout, +.catalog-product-review-index .col-1-layout, +.catalog-rule-promo-catalog-index .col-1-layout, +.sales-rule-promo-quote-index .col-1-layout, +.adminhtml-reminder-index .col-1-layout, +.adminhtml-newsletter-template-index .col-1-layout, +.adminhtml-system-email-template-index .col-1-layout, +.adminhtml-sitemap-index .col-1-layout, +.adminhtml-googleshopping-types-index .col-1-layout, +.customer-index-index .col-1-layout, +.adminhtml-cms-page-index .col-1-layout, +.cms-block-index .col-1-layout, +.adminhtml-banner-index .col-1-layout, +.adminhtml-widget-instance-index .col-1-layout, +.cms-page-index .col-1-layout, +.adminhtml-webapi-user-index .col-1-layout, +.adminhtml-webapi-role-index .col-1-layout, +.adminhtml-system-variable-index .col-1-layout, +.adminhtml-user-index .col-1-layout, +.adminhtml-user-role-index .col-1-layout, +.adminhtml-webhook-subscription-index .col-1-layout, +.adminhtml-integration-index .col-1-layout, +.adminhtml-system-design-theme-index .col-1-layout, +.adminhtml-system-design-index .col-1-layout, +.adminhtml-customer-attribute-index .col-1-layout, +.adminhtml-customer-address-attribute-index .col-1-layout, +.rating-index-index .col-1-layout, +.tax-rule-index .col-1-layout, +.tax-rate-index .col-1-layout, +.adminhtml-rma-item-attribute-index .col-1-layout, +.adminhtml-reward-rate-index .col-1-layout, +.customer-group-index .col-1-layout, +.checkout-agreement-index .col-1-layout, +.catalog-product-attribute-index .col-1-layout, +.catalog-product-set-index .col-1-layout, +.catalog-product-index .col-1-layout, +.sales-invoice-index .col-1-layout, +.sales-shipment-index .col-1-layout, +.sales-creditmemo-index .col-1-layout, +.sales-billing-agreement-index .col-1-layout, +.sales-transactions-index .col-1-layout, +.sales-recurring-profile-index .col-1-layout, +.adminhtml-googleshopping-items-index .col-1-layout, +.customer-online-index .col-1-layout, +.adminhtml-newsletter-queue-index .col-1-layout, +.adminhtml-newsletter-subscriber-index .col-1-layout, +.adminhtml-report-shopcart-product .col-1-layout, +.adminhtml-report-shopcart-abandoned .adminhtml-report-product-downloads .col-1-layout, +.adminhtml-report-product-sold .col-1-layout, +.adminhtml-report-product-lowstock .col-1-layout, +.adminhtml-report-customer-accounts .col-1-layout, +.adminhtml-report-customer-totals .col-1-layout, +.adminhtml-report-customer-orders .col-1-layout, +.adminhtml-report-customer-wishlist-wishlist .col-1-layout, +.adminhtml-report-review-customer .col-1-layout, +.adminhtml-report-review-product .col-1-layout, +.adminhtml-report-search .col-1-layout, +.adminhtml-report-statistics-index .col-1-layout, +.adminhtml-newsletter-problem-index .col-1-layout, +.adminhtml-system-store-index .col-1-layout, +.sales-order-status-index .col-1-layout, +.adminhtml-system-currency-index .col-1-layout, +.adminhtml-system-currencysymbol-index .col-1-layout, +.adminhtml-scheduled-operation-index .col-1-layout, +.adminhtml-cache-index .col-1-layout, +.adminhtml-system-backup-index .col-1-layout, +.adminhtml-locks-index .col-1-layout, +.adminhtml-notification-index .col-1-layout, +.adminhtml-logging-archive .col-1-layout, +.adminhtml-logging-index .col-1-layout, +.adminhtml-process-list .col-1-layout, +.catalog-product-index .col-1-layout { + padding: 0; + background: transparent; + border: 0; + border-radius: 0; + max-width: 1300px; + min-width: 960px; +} +.CustomGridAction .grid-actions, +.sales-order-index .grid-actions, +.adminhtml-rma-index .grid-actions, +.adminhtml-catalog-event-index .grid-actions, +.adminhtml-urlrewrite-index .grid-actions, +.catalog-search-index .grid-actions, +.catalog-product-review-index .grid-actions, +.catalog-rule-promo-catalog-index .grid-actions, +.sales-rule-promo-quote-index .grid-actions, +.adminhtml-reminder-index .grid-actions, +.adminhtml-newsletter-template-index .grid-actions, +.adminhtml-system-email-template-index .grid-actions, +.adminhtml-sitemap-index .grid-actions, +.adminhtml-googleshopping-types-index .grid-actions, +.customer-index-index .grid-actions, +.adminhtml-cms-page-index .grid-actions, +.cms-block-index .grid-actions, +.adminhtml-banner-index .grid-actions, +.adminhtml-widget-instance-index .grid-actions, +.cms-page-index .grid-actions, +.adminhtml-webapi-user-index .grid-actions, +.adminhtml-webapi-role-index .grid-actions, +.adminhtml-system-variable-index .grid-actions, +.adminhtml-user-index .grid-actions, +.adminhtml-user-role-index .grid-actions, +.adminhtml-webhook-subscription-index .grid-actions, +.adminhtml-integration-index .grid-actions, +.adminhtml-system-design-theme-index .grid-actions, +.adminhtml-system-design-index .grid-actions, +.adminhtml-customer-attribute-index .grid-actions, +.adminhtml-customer-address-attribute-index .grid-actions, +.rating-index-index .grid-actions, +.tax-rule-index .grid-actions, +.tax-rate-index .grid-actions, +.adminhtml-rma-item-attribute-index .grid-actions, +.adminhtml-reward-rate-index .grid-actions, +.customer-group-index .grid-actions, +.checkout-agreement-index .grid-actions, +.catalog-product-attribute-index .grid-actions, +.catalog-product-set-index .grid-actions, +.catalog-product-index .grid-actions { + border-radius: 5px 5px 0 0; + margin-top: 20px; + padding: 9px 16px 9px 65px; +} +.CustomGridAction .page-actions.fixed, +.sales-order-index .page-actions.fixed, +.adminhtml-rma-index .page-actions.fixed, +.adminhtml-catalog-event-index .page-actions.fixed, +.adminhtml-urlrewrite-index .page-actions.fixed, +.catalog-search-index .page-actions.fixed, +.catalog-product-review-index .page-actions.fixed, +.catalog-rule-promo-catalog-index .page-actions.fixed, +.sales-rule-promo-quote-index .page-actions.fixed, +.adminhtml-reminder-index .page-actions.fixed, +.adminhtml-newsletter-template-index .page-actions.fixed, +.adminhtml-system-email-template-index .page-actions.fixed, +.adminhtml-sitemap-index .page-actions.fixed, +.adminhtml-googleshopping-types-index .page-actions.fixed, +.customer-index-index .page-actions.fixed, +.adminhtml-cms-page-index .page-actions.fixed, +.cms-block-index .page-actions.fixed, +.adminhtml-banner-index .page-actions.fixed, +.adminhtml-widget-instance-index .page-actions.fixed, +.cms-page-index .page-actions.fixed, +.adminhtml-webapi-user-index .page-actions.fixed, +.adminhtml-webapi-role-index .page-actions.fixed, +.adminhtml-system-variable-index .page-actions.fixed, +.adminhtml-user-index .page-actions.fixed, +.adminhtml-user-role-index .page-actions.fixed, +.adminhtml-webhook-subscription-index .page-actions.fixed, +.adminhtml-integration-index .page-actions.fixed, +.adminhtml-system-design-theme-index .page-actions.fixed, +.adminhtml-system-design-index .page-actions.fixed, +.adminhtml-customer-attribute-index .page-actions.fixed, +.adminhtml-customer-address-attribute-index .page-actions.fixed, +.rating-index-index .page-actions.fixed, +.tax-rule-index .page-actions.fixed, +.tax-rate-index .page-actions.fixed, +.adminhtml-rma-item-attribute-index .page-actions.fixed, +.adminhtml-reward-rate-index .page-actions.fixed, +.customer-group-index .page-actions.fixed, +.checkout-agreement-index .page-actions.fixed, +.catalog-product-attribute-index .page-actions.fixed, +.catalog-product-set-index .page-actions.fixed, +.catalog-product-index .page-actions.fixed { + left: 0; + margin: 0; + padding: 0 21px; + position: fixed; +} +.CustomGridAction .page-actions, +.sales-order-index .page-actions, +.adminhtml-rma-index .page-actions, +.adminhtml-catalog-event-index .page-actions, +.adminhtml-urlrewrite-index .page-actions, +.catalog-search-index .page-actions, +.catalog-product-review-index .page-actions, +.catalog-rule-promo-catalog-index .page-actions, +.sales-rule-promo-quote-index .page-actions, +.adminhtml-reminder-index .page-actions, +.adminhtml-newsletter-template-index .page-actions, +.adminhtml-system-email-template-index .page-actions, +.adminhtml-sitemap-index .page-actions, +.adminhtml-googleshopping-types-index .page-actions, +.customer-index-index .page-actions, +.adminhtml-cms-page-index .page-actions, +.cms-block-index .page-actions, +.adminhtml-banner-index .page-actions, +.adminhtml-widget-instance-index .page-actions, +.cms-page-index .page-actions, +.adminhtml-webapi-user-index .page-actions, +.adminhtml-webapi-role-index .page-actions, +.adminhtml-system-variable-index .page-actions, +.adminhtml-user-index .page-actions, +.adminhtml-user-role-index .page-actions, +.adminhtml-webhook-subscription-index .page-actions, +.adminhtml-integration-index .page-actions, +.adminhtml-system-design-theme-index .page-actions, +.adminhtml-system-design-index .page-actions, +.adminhtml-customer-attribute-index .page-actions, +.adminhtml-customer-address-attribute-index .page-actions, +.rating-index-index .page-actions, +.tax-rule-index .page-actions, +.tax-rate-index .page-actions, +.adminhtml-rma-item-attribute-index .page-actions, +.adminhtml-reward-rate-index .page-actions, +.customer-group-index .page-actions, +.checkout-agreement-index .page-actions, +.catalog-product-attribute-index .page-actions, +.catalog-product-set-index .page-actions, +.catalog-product-index .page-actions { + position: absolute; + z-index: 2; + margin-top: 10px; + margin-left: 15px; + padding: 0; +} +.adminhtml-googleshopping-items-index .grid-title, +.adminhtml-system-backup-index .page-actions, +.adminhtml-scheduled-operation-index .page-actions, +.adminhtml-system-currency-index .page-actions, +.adminhtml-system-currencysymbol-index .page-actions, +.adminhtml-cache-index .page-actions, +.adminhtml-system-store-index .page-actions, +.sales-order-status-index .page-actions { + border: 1px solid #c0bbaf; + border-bottom: 0; + background: #f6f3ec; + background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2Y2ZjNlYyIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNlZGVhZTEiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); + background: -moz-linear-gradient(top, #f6f3ec 0%, #edeae1 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #f6f3ec), color-stop(100%, #edeae1)); + background: -webkit-linear-gradient(top, #f6f3ec 0%, #edeae1 100%); + background: -o-linear-gradient(top, #f6f3ec 0%, #edeae1 100%); + background: -ms-linear-gradient(top, #f6f3ec 0%, #edeae1 100%); + background: linear-gradient(to bottom, #f6f3ec 0%, #edeae1 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f6f3ec', endColorstr='#edeae1', GradientType=0); + padding: 7px 8px 8px; + position: relative; + float: none; +} +.adminhtml-googleshopping-items-index .grid { + padding-bottom: 25px; +} +.adminhtml-googleshopping-items-index .grid-title .title { + font-size: 18px; +} +.adminhtml-googleshopping-items-index .page-actions { + float: right; +} +.adminhtml-system-backup-index .page-actions.fixed, +.adminhtml-scheduled-operation-index .page-actions.fixed, +.adminhtml-system-currency-index .page-actions.fixed, +.adminhtml-system-currencysymbol-index .page-actions.fixed, +.adminhtml-cache-index .page-actions.fixed, +.adminhtml-system-store-index .page-actions.fixed, +.sales-order-status-index .page-actions.fixed { + background-image: none; + padding: 0 21px; + position: fixed; +} +.catalog-product-index .grid-actions { + padding-left: 90px; +} +.catalog-rule-promo-catalog-index .grid-actions { + padding-left: 210px; +} +.catalog-rule-promo-catalog-index .page-actions .apply { + float: right; + margin: 0 0 0 10px; +} +.catalog-product-index .field-store-switcher { + padding: 0; +} +.sidebar-actions { + padding: 14px 0; +} +.sidebar-actions button { + margin: 0 0 5px; +} +.sales-order-create-index .grid table .action-configure { + float: right; +} +.adminhtml-system-currency-index .import-service { + float: left; +} +.adminhtml-system-currency-index .page-actions.fixed .import-service { + display: inline-block; + float: none; +} +.clearfix:before, +.clearfix:after, +[class$="-layout"]:after, +.footer-content:before, +.footer-content:after, +.page-title-inner:before, +.page-title-inner:after, +.tabs-horiz:before, +.tabs-horiz:after, +.navigation > ul:before, +.navigation > ul:after, +.actions-split:before, +.actions-split:after, +.page-create-order:before, +.page-create-order:after, +.order-addresses:before, +.order-addresses:after, +.order-methods:before, +.order-methods:after, +.order-summary:before, +.order-summary:after, +.order-methods:before, +.order-methods:after, +.grid-actions:before, +.grid-actions:after, +.fieldset-wrapper-title:before, +.fieldset-wrapper-title:after { + content: ""; + display: table; +} +.clearfix:after, +[class$="-layout"]:after, +.footer-content:after, +.page-title-inner:after, +.tabs-horiz:after, +.navigation > ul:after, +.actions-split:after, +.page-create-order:after, +.order-addresses:after, +.order-methods:after, +.order-summary:after, +.order-methods:after, +.grid-actions:after, +.fieldset-wrapper-title:after { + clear: both; +} +/* + Header +-------------------------------------- */ +.header { + position: relative; + background: #f5f2ea; + background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2Y1ZjJlYSIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNmMWVkZTMiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); + background: -moz-linear-gradient(top, #f5f2ea 0%, #f1ede3 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #f5f2ea), color-stop(100%, #f1ede3)); + background: -webkit-linear-gradient(top, #f5f2ea 0%, #f1ede3 100%); + background: -o-linear-gradient(top, #f5f2ea 0%, #f1ede3 100%); + background: -ms-linear-gradient(top, #f5f2ea 0%, #f1ede3 100%); + background: linear-gradient(to bottom, #f5f2ea 0%, #f1ede3 100%); + z-index: 992; + padding: 0 20px; +} +.eq-ie8 .header { + background: #f5f2ea; +} +.header-inner { + min-width: 960px; + max-width: 1300px; + margin: 0 auto; + padding: 7px 0; +} +.header .logo { + display: block; + width: 109px; + height: 27px; + text-indent: -999em; + background: url(Magento_Backend::images/logo-magento-small.png) no-repeat; + margin: 0; +} +/* +.header .logo { + display: inline-block; + width: 100px; + height: 27px; + margin: 0; + text-indent: -999em; + position: relative; + z-index: 1; +} + +.header .logo:before, +.header .logo:after { + font-family: 'admin-icons'; + font-size: 26px; + content: '\e00d'; + position: absolute; + bottom: 0; + left: 0; + text-indent: 0; + line-height: 1; + font-weight: normal; +} + +.header .logo:before { + content: '\e00d'; + color: #f37b20; +} + +.header .logo:after { + content: '\e00e'; + color: #fab57f; +} + +.header .logo span:before { + font-family: 'admin-icons'; + content: '\e00f'; + display: block; + position: absolute; + top: 0; + bottom: 0; + left: 28px; + font-size: 65px; + margin-top: -17px; + text-indent: 0; + line-height: 1; + font-weight: normal; + color: #000; +}*/ +.header-panel { + float: right; + font-size: 12px; +} +/* + Header Dropdown +-------------------------------------- */ +.header-panel .dropdown-menu { + display: none; + width: 195px; + margin: 8px -87px 0 0; + border: 0; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + border-radius: 5px; + -moz-box-shadow: 0 2px 7px 2px rgba(0, 0, 0, 0.2); + -webkit-box-shadow: 0 2px 7px 2px rgba(0, 0, 0, 0.2); + box-shadow: 0 2px 7px 2px rgba(0, 0, 0, 0.2); +} +.eq-ie8 .header-panel .dropdown-menu { + border: 1px solid #c3bcaf; +} +.header-panel .dropdown-menu > li { + position: relative; + padding: 20px 30px 13px 18px; + background: #f7f3eb; + border-bottom: 1px solid #f7e4d0; + white-space: normal; +} +.header-panel .dropdown-menu > li:hover { + background: #fff; +} +.header-panel .dropdown-menu > li:first-child:hover:before, +.header-panel .dropdown-menu > li.first:hover:before { + color: #fff; +} +.header-panel .dropdown-menu > li a { + display: block; + text-decoration: none; + color: #8c867e; + margin: 0 0 10px; +} +.header-panel .dropdown-menu > li a:hover { + text-decoration: underline; +} +.header-panel .dropdown-menu > li:first-child, +.header-panel .dropdown-menu > li.first { + -moz-border-radius: 5px 5px 0 0; + -webkit-border-radius: 5px 5px 0 0; + border-radius: 5px 5px 0 0; +} +.header-panel .dropdown-menu > li:last-child, +.header-panel .dropdown-menu > li.last { + border-bottom: 0; + -moz-border-radius: 0 0 5px 5px; + -webkit-border-radius: 0 0 5px 5px; + border-radius: 0 0 5px 5px; +} +/* + Account +-------------------------------------- */ +.header-panel .account { + position: relative; + float: left; + margin: 0 0 0 30px; + padding: 6px 0 0; +} +.header-panel .account > a { + color: #656057; + position: relative; + display: inline-block; + min-width: 20px; + text-decoration: none; + padding: 0 10px 0 0; +} +.header-panel .account > a:before { + position: absolute; + top: 2px; + right: 0; + bottom: 0; + font-family: 'MUI-Icons'; + font-style: normal; + speak: none; + font-weight: normal; + font-size: 9px; + -webkit-font-smoothing: antialiased; + content: '\e02c'; + /* icon point down */ + +} +.header-panel .account img { + position: relative; + border-radius: 3px; + z-index: 1; +} +.no-js .header-panel .account:hover > a { + padding-bottom: 5px; + margin-bottom: -5px; +} +.header-panel .account.active .dropdown-menu, +.no-js .header-panel .account:hover .dropdown-menu, +.no-js .header-panel .account > a:focus + .dropdown-menu { + display: block; +} +/* + Link to store front +-------------------------------------- */ +.header-panel .store-front { + color: #676056; + text-decoration: none; + position: relative; + padding: 6px 0 0 20px; + float: left; + margin: 0 0 0 30px; +} +.header-panel .store-front:before { + font-family: 'admin-icons'; + font-style: normal; + speak: none; + font-weight: normal; + -webkit-font-smoothing: antialiased; + content: '\e005'; + /* icon store info */ + + font-size: 17px; + position: absolute; + left: 0; + top: 4px; +} +/* + Messages +-------------------------------------- */ +.header-panel .notifications { + position: relative; + float: left; + margin: 0 6px 0 21px; + padding: 9px 0 0; +} +.header-panel .notifications-icon { + position: relative; + display: inline-block; + height: 12px; + width: 17px; + text-decoration: none; + text-align: center; + background: #cac2b5; + box-shadow: 0 1px 0 #fff; + border-radius: 2px; +} +.header-panel .notifications-icon:hover, +.header-panel .notifications-icon:active { + background: #b0a798; +} +.header-panel .notifications-icon:before { + position: absolute; + left: 0; + right: 0; + bottom: -7px; + margin-top: -5px; + font-family: 'MUI-Icons'; + font-style: normal; + speak: none; + font-weight: normal; + -webkit-font-smoothing: antialiased; + content: '\e02c'; + /* user icon */ + + font-size: 8px; + color: #cac2b5; + text-shadow: 0 1px 0 #fff; +} +.header-panel .notifications-icon:hover:before, +.header-panel .notifications-icon:active:before { + color: #b0a798; +} +.eq-ie8 .header-panel .notifications-icon:before { + bottom: -6px; +} +.header-panel .notifications .value { + color: #ffffff; + font-size: 12px; + font-weight: 600; + line-height: 11px; + padding: 1px 3px; + min-width: 10px; + background: #f58220; + border: 1px solid #bd5100; + border-radius: 4px; + box-shadow: 0 1px 0 #31302b; + left: 6px; + top: -5px; + position: absolute; +} +.header-panel .notifications.active .dropdown-menu { + display: block; + margin-top: 12px; + border: 2px solid #676056; + width: 288px; + margin: 8px -52px 0 0; +} +.header-panel .dropdown-menu > li { + background: #fff; + border-bottom: 0; + position: relative; + padding: 13px 26px 14px 16px; + white-space: normal; +} +.header-panel .dropdown-menu > li:after { + border-bottom: 1px solid #f7e4d0; + display: block; + position: absolute; + bottom: 0; + left: 2px; + content: ''; + width: 284px; +} +.header-panel .dropdown-menu > li:last-child:after, +.header-panel .dropdown-menu > li.last:after { + display: none; +} +.header-panel .notifications > .dropdown-menu .notification-description { + max-height: 43px; + overflow: hidden; + display: block; + color: #676056; + font-size: 11px; + font-weight: 400; +} +.header-panel .notifications > .dropdown-menu .notification-entry { + display: none; +} +.header-panel .notifications .dropdown-menu:before, +.header-panel .notifications .dropdown-menu:after { + position: absolute; + width: 10px; + height: 10px; + right: 55px; + top: -10px; + font-family: 'MUI-Icons'; + font-style: normal; + font-weight: normal; + font-size: 13px; + speak: none; + -webkit-font-smoothing: antialiased; + content: '\e029'; + /* user icon */ + + color: #fff; + z-index: 2; +} +.header-panel .notifications .dropdown-menu:after { + color: #676056; + font-size: 17px; + height: 12px; + right: 57px; + top: -14px; + z-index: 1; +} +.header-panel .notifications > .dropdown-menu .notification-entry:first-child { + display: block; +} +.header-panel .notifications > .dropdown-menu .notification-entry:first-child + .notification-entry { + display: block; +} +.header-panel .notifications > .dropdown-menu .notification-entry:first-child + .notification-entry + .notification-entry { + display: block; +} +.header-panel .notifications > .dropdown-menu .notification-entry:first-child + .notification-entry + .notification-entry + .notification-entry { + display: block; +} +.header-panel .notifications > .dropdown-menu .notification-entry:first-child + .notification-entry + .notification-entry + .notification-entry + .notification-entry { + display: block; +} +.header-panel .notifications > .dropdown-menu .notification-entry:nth-child(-n+5) { + display: block; +} +.header-panel .notifications > .dropdown-menu .notification-entry .notification-dialog-content { + display: none; +} +/* + Notification entry dialog +-------------------------------------- */ +.notification-entry-dialog .notification-dialog-content, +.notification-entry-dialog .ui-dialog-buttonpane { + background: #fefaf6; +} +.notification-entry-dialog .ui-dialog-titlebar { + background: #f9f1e8; +} +.notification-entry-dialog .ui-dialog-title { + font-size: 22px; + padding-left: 24px; +} +.notification-entry-dialog-critical .ui-dialog-titlebar { + background: #fee4d0; +} +.notification-entry-dialog-critical .ui-dialog-title { + padding-left: 54px; +} +.notification-entry-dialog-critical .ui-dialog-title:before { + content: "\e086"; + font-family: 'MUI-Icons'; + color: #c00815; + font-style: normal; + font-weight: normal; + font-size: 26px; + speak: none; + -webkit-font-smoothing: antialiased; + left: 21px; + position: absolute; + top: 16px; +} +.notification-entry-dialog .ui-dialog-titlebar-close:before { + font-size: 15px; +} +.notification-entry-dialog .notification-dialog-content { + padding-top: 19px; + padding-bottom: 16px; +} +.notification-entry-dialog .notification-dialog-content strong { + display: block; + color: #f58220; + font-size: 18px; + font-weight: 500; +} +.notification-entry-dialog .notification-dialog-content .notification-description { + display: block; + font-family: Helvetica, Arial, sans-serif; + font-size: 14px; + line-height: 1.42; + padding: 3px 0 7px; +} +.notification-entry-dialog .notification-dialog-content time { + color: #8c867e; + font-size: 13px; + font-family: Helvetica, Arial, sans-serif; + position: absolute; + right: 17px; + bottom: 27px; + text-align: right; +} +.notification-entry-dialog .notification-dialog-content .actions { + margin-bottom: 22px; +} +.notification-entry-dialog .notification-dialog-content .actions a { + color: #676056; + position: relative; + margin-right: 20px; +} +.notification-entry-dialog .notification-dialog-content .actions a:after { + content: "\e084"; + font-family: 'MUI-Icons'; + color: #6a5f54; + font-size: 12px; + speak: none; + -webkit-font-smoothing: antialiased; + position: absolute; + right: -17px; + top: -2px; +} +.notification-entry-dialog .ui-dialog-buttonset { + text-align: left; +} +.notification-entry-dialog .ui-dialog-buttonpane { + margin: 0; + padding: 0 24px 22px; +} +.notification-entry-dialog .ui-dialog-buttonset button[class^="action-"] { + background-image: none; + margin: 0 16px 0 0; + vertical-align: middle; + text-shadow: none; + box-shadow: none; + border: 0; +} +.notification-entry-dialog .ui-dialog-buttonset .action-acknowledge { + background-color: #f47b20; + border: 0; + padding: 5px 15px; +} +.notification-entry-dialog .ui-dialog-buttonset .action-acknowledge:hover { + background-color: #e47821; +} +.notification-entry-dialog .ui-dialog-buttonset .action-cancel { + background-color: #dbd6ce; + border: 0; + padding: 5px 15px; +} +.notification-entry-dialog .ui-dialog-buttonset .action-cancel:hover { + background-color: #d3cdc4; +} +.header-panel .account > .dropdown-menu a, +.header-panel .search .autocomplete-results .title { + display: block; + color: #f58220; + font-size: 14px; + font-weight: 500; + margin-bottom: 5px; +} +.header-panel .notifications > .dropdown-menu li > strong { + display: block; + color: #026294; + font-size: 12px; + font-weight: 600; + max-height: 32px; + overflow: hidden; + line-height: 1.4; + margin-bottom: 4px; +} +.header-panel .notifications > .dropdown-menu li > strong:focus, +.header-panel .notifications > .dropdown-menu li > strong:hover { + text-decoration: underline; +} +.header-panel .notifications > .dropdown-menu li.notification-critical strong { + padding-left: 30px; + position: relative; +} +.header-panel .notifications > .dropdown-menu li.notification-critical > strong:before { + display: block; + content: "\e086"; + font-family: 'MUI-Icons'; + color: #c00815; + font-size: 19px; + speak: none; + -webkit-font-smoothing: antialiased; + position: absolute; + left: 0; + top: 5px; +} +.header-panel .notifications > .dropdown-menu > li:hover { + background: #f7f3eb; + cursor: pointer; + margin-top: -1px; + padding-top: 14px; + z-index: 2; +} +.eq-ie8 .header-panel .notifications > .dropdown-menu > li:hover, +.header-panel .notifications > .dropdown-menu > li:first-child:hover, +.header-panel .notifications > .dropdown-menu > li.first:hover, +.header-panel .notifications > .dropdown-menu > li:last-child:hover, +.header-panel .notifications > .dropdown-menu > li.last:hover { + margin-top: 0; + padding-top: 13px; +} +.header-panel .dropdown-menu > li:hover:after { + display: none; +} +.eq-ie8 .header-panel .dropdown-menu > li:hover:after { + display: block; +} +.header-panel .notifications > .dropdown-menu > li:hover .action-close { + display: block; +} +.header-panel .notifications > .dropdown-menu > .new, +.header-panel .notifications > .dropdown-menu > .new:hover { + background: #f47b20; + color: #fff; +} +.header-panel .notifications > .dropdown-menu > li.new:first-child:before, +.header-panel .notifications > .dropdown-menu > li.new.first:before, +.header-panel .notifications > .dropdown-menu > li.new:first-child:hover:before, +.header-panel .notifications > .dropdown-menu > li.new.first:hover:before { + color: #f47b20; +} +.header-panel .notifications > .dropdown-menu > .new strong, +.header-panel .notifications > .dropdown-menu > .new div, +.header-panel .notifications > .dropdown-menu > .new a, +.header-panel .notifications > .dropdown-menu > .new time, +.header-panel .notifications > .dropdown-menu .new .action-close:hover, +.header-panel .notifications > .dropdown-menu .new .action-close:focus { + color: #fff; +} +.header-panel .notifications > .dropdown-menu time { + color: #676056; + font-size: 11px; + font-weight: 400; + display: block; + margin-top: 7px; +} +.header-panel .notifications > .dropdown-menu a:focus ~ .action-close, +.header-panel .notifications > .dropdown-menu .action-close:focus { + display: block; +} +.header-panel .notifications > .dropdown-menu .action-close { + position: absolute; + display: none; + top: 8px; + right: 4px; + width: 20px; + height: 20px; + text-indent: -999em; + overflow: hidden; + color: #cac2b5; +} +.header-panel .notifications > .dropdown-menu .action-close:hover { + color: #b0a789; +} +.header-panel .notifications > .dropdown-menu .action-close:before { + display: block; + font-family: 'MUI-Icons'; + font-style: normal; + font-weight: normal; + font-size: 19px; + speak: none; + -webkit-font-smoothing: antialiased; + content: '\e07f'; + /* trashbin icon */ + + text-indent: 0; +} +.eq-ie8 .header-panel .notifications > .dropdown-menu .action-close { + filter: none; +} +.header .header-panel .notifications .dropdown-menu > li.last { + padding: 0; +} +.header .header-panel .notifications .action-more { + display: block; + background: #676056; + border: 0; + color: #f7f3eb; + font-size: 13px; + font-weight: bold; + height: 23px; + width: 100%; + line-height: 23px; + text-shadow: none; + text-align: center; + margin: 0; +} +.eq-ie8 .header .header-panel .notifications .action-more { + filter: none; +} +.header .header-panel .notifications .action-more:hover { + text-decoration: none; +} +.eq-ie8 .header .header-panel .notifications .action-more { + margin-bottom: -1px; +} +/* + Help +-------------------------------------- */ +.header-panel .help { + float: left; + margin: 0 0 0 30px; + padding: 6px 0 0; +} +/* + Search +-------------------------------------- */ +.search { + position: relative; + float: left; + margin: -4px 0 -5px 50px; +} +.search form { + position: relative; +} +.search input { + position: relative; + display: none; + width: 50px; + height: 36px; + line-height: 2; + margin: 0; + padding: 4px 25px 4px 4px; + background: #fff; +} +.header .search .ajax-loading:before { + display: block; + content: ''; + position: absolute; + top: 10px; + left: -20px; + margin: 0; + width: 16px; + height: 16px; + line-height: 16px; + background-image: url(../mui/images/ajax-loader-small.gif); +} +.header .search .mage-suggest { + border: none; +} +.header .search .mage-suggest::after { + content: ''; +} +.search .dropdown-menu { + display: block; + right: auto; + margin-right: 0; + width: 100%; +} +.autocomplete-results { + left: 0 !important; + /* TODO: Because of script bug in IE9 */ + + right: 0; +} +.eq-ie8 .autocomplete-results { + margin-top: -10px; +} +.autocomplete-results .title { + display: block; +} +.autocomplete-results .type { + margin: 0 0 10px; +} +.header.active .search { + margin-left: 30px; +} +.header.active .search input { + display: inline-block; +} +.no-js .search input { + display: inline-block; + width: 350px; +} +.search button[type="submit"], +.search button[type="submit"]:hover, +.search button[type="submit"]:active, +.search button[type="submit"]:focus { + position: absolute; + top: 2px; + right: 0; + width: 32px; + height: 32px; + background: none; + border: none; + overflow: hidden; + text-indent: -999em; + color: #676056; + text-shadow: 0 1px 0 #fff; + box-shadow: none; + filter: none; +} +.search button[type="submit"]:hover, +.header.active .search button[type="submit"], +.header.active .search button[type="submit"]:hover, +.header.active .search button[type="submit"]:active, +.header.active .search button[type="submit"]:focus { + color: #201f1c; +} +.eq-ie9 .search button[type="submit"] { + top: 4px; +} +.search button[type="submit"]:before { + position: absolute; + display: block; + top: 0; + right: 0; + bottom: 0; + left: 0; + font-family: 'MUI-Icons'; + font-style: normal; + speak: none; + font-weight: normal; + -webkit-font-smoothing: antialiased; + content: '\e01f'; + /* user icon */ + + text-indent: 0; + font-size: 18px; + line-height: 1.7; + text-align: center; +} +.eq-ie8 .search button[type="submit"]:before { + line-height: 1.3; +} +/* + Clearfix +-------------------------------------- */ +.header-panel:before, +.header-panel:after, +.header-inner:before, +.header-inner:after, +.clearfix:before, +.clearfix:after { + content: ""; + display: table; +} +.header-panel:after, +.header-inner:after, +.clearfix:after { + clear: both; +} +/* + Product Creation +-------------------------------------- */ +/* Action "Back" as cross */ +[class^=" catalog-product-"] .page-actions .action-back, +[class^=" catalog-product-"] .page-actions .action-back:hover, +[class^=" catalog-product-"] .page-actions .action-back:active, +[class^=" adminhtml-newsletter-"] .page-actions .action-back, +[class^=" adminhtml-newsletter-"] .page-actions .action-back:hover, +[class^=" adminhtml-newsletter-"] .page-actions .action-back:active { + overflow: hidden; + padding: 5px 6px 3px; + margin-left: 12px; + color: #7a7976; +} +.eq-ie8 [class^=" catalog-product-"] .page-actions .action-back, +.eq-ie8 [class^=" catalog-product-"] .page-actions .action-back:hover, +.eq-ie8 [class^=" catalog-product-"] .page-actions .action-back:active, +.eq-ie8 [class^=" adminhtml-newsletter-"] .page-actions .action-back, +.eq-ie8 [class^=" adminhtml-newsletter-"] .page-actions .action-back:hover, +.eq-ie8 [class^=" adminhtml-newsletter-"] .page-actions .action-back:active, +.sales-order-create-index .page-actions-inner .cancel, +.sales-order-create-index .page-actions-inner .cancel:hover, +.sales-order-create-index .page-actions-inner .cancel:active { + filter: none; + border: 0; +} +[class^=" catalog-product-"] .page-actions .action-back:hover, +[class^=" adminhtml-newsletter-"] .page-actions .action-back:hover, +.sales-order-create-index .page-actions-inner .cancel:hover { + color: #000; +} +[class^=" catalog-product-"] .page-actions .action-back.mage-error, +[class^=" adminhtml-newsletter-"] .page-actions .action-back.mage-error { + color: #b57c72; +} +[class^=" catalog-product-"] .page-actions .action-back:before, +[class^=" adminhtml-newsletter-"] .page-actions .action-back:before, +.sales-order-create-index .page-actions-inner .cancel:before { + display: inline-block; + font-family: 'MUI-Icons'; + font-style: normal; + speak: none; + font-weight: normal; + -webkit-font-smoothing: antialiased; + content: '\e07d'; + /* close icon */ + + font-size: 16px; +} +[class^=" catalog-product-"] .page-actions .action-back span, +[class^=" adminhtml-newsletter-"] .page-actions .action-back span, +.sales-order-create-index .page-actions-inner .cancel span { + display: inline-block; + overflow: hidden; + text-indent: -999em; +} +.page-actions .switcher { + display: inline-block; + vertical-align: top; + margin: 6px 17px 6px 6px; +} +.field-weight .control .field:first-child { + width: 36%; + margin-right: 15px; +} +#allow_open_amount { + margin-top: 8px; +} +/* + Customer +---------------------------------------*/ +#customer_info_tabs_account_content #_accountsendemail { + margin-top: 8px; +} +.customer-information:before, +.customer-information:after { + content: ""; + display: table; +} +.customer-information:after { + clear: both; +} +.customer-information .data-table, +.customer-information address { + width: 48.5%; +} +.customer-information .data-table { + float: left; + width: 48.5%; +} +.customer-information address { + padding-top: 4px; + line-height: 2.2; + float: right; +} +.address-list { + list-style: none; + width: 278px; + margin: 0 0 10px; + padding: 0; + float: left; +} +.address-list li { + border: 1px solid #d9d2ca; + background: #f7f2ec; + padding: 10px 10px 15px; + cursor: pointer; + margin-bottom: -1px; +} +.address-list li.ui-state-active { + background: #fff; + position: relative; + box-shadow: 0 1px 1px 0 #d9d2ca; + margin-left: -2px; + padding-left: 12px; +} +.address-list li.ui-state-active:before, +.address-list li.ui-state-active:after { + position: absolute; + font-family: 'MUI-Icons'; + font-style: normal; + font-weight: normal; + font-size: 18px; + color: #fff; + content: "\e02a"; + speak: none; + line-height: 11px; + width: 10px; + right: -9px; + text-indent: -6px; + top: 50%; + margin-top: -5px; + z-index: 2; +} +.address-list li.ui-state-active:before { + color: #d9d2ca; + right: -11px; + z-index: 1; +} +.address-list li.address-list-actions:before, +.address-list li.address-list-actions:after { + display: none; +} +.address-list li.address-list-actions { + padding: 20px 0 0 0; + border: 0; + background: none; + box-shadow: none; + cursor: default; +} +.address-list li.address-list-actions:first-child { + padding: 0; +} +.address-list .label { + float: none; + width: auto; + padding: 0 0 0 10px; +} +.address-list input[type="checkbox"] { + float: left; +} +.address-list address:first-line { + /* its not work if First Name and Last Name in two lines */ + + font-weight: bold; +} +.address-list address { + margin: 0 20px 15px 0; + line-height: 1.5; +} +.address-list-item-actions { + float: right; +} +.address-list .action-edit { + display: none; +} +.address-list .field { + margin-bottom: 15px; +} +.ui-tabs-nav .address-list-item a { + text-decoration: none; + color: #676056; +} +.address-item-edit { + margin-left: 277px; +} +.address-item-edit-content { + border: 1px solid #dad1c8; + background: #fff; + box-shadow: 0 2px 1px 0 rgba(217, 210, 202, 0.5); + padding-left: 10px; +} +.address-item-edit-content .fieldset:last-child { + margin-bottom: 29px; +} +.address-item-edit .legend { + border-bottom: 0; + margin: 0 0 18px; + padding-left: 20%; +} +.address-item-edit .legend span { + padding-left: 0; +} +.address-item-edit-actions { + padding: 0 0 18px 20%; +} +/* + Configuration -> Design +-------------------------------------- */ +#row_design_theme_ua_regexp .design_theme_ua_regexp { + float: left; + width: 100%; +} +#row_design_theme_ua_regexp .tooltip { + margin-top: 8px; +} +#row_design_theme_ua_regexp .note { + clear: both; +} +/* + Configuration -> Payment Methods +-------------------------------------- */ +.adminhtml-system-config-edit .payflow-settings-notice .important-label { + color: #e22626; + font-size: 14px; + font-weight: 700; +} +.adminhtml-system-config-edit .payflow-settings-notice ul.options-list strong { + color: #676056; + font-size: 14px; + font-weight: 700; +} +/* + CMS -> Banners +-------------------------------------- */ +/* Banner Properties */ +#banner_properties_customer_segment_ids { + min-width: 20%; +} +/* Content */ +.field-store_default_content .buttons-set { + margin-bottom: 9px; +} +.field-store_default_content .buttons-set button { + margin-right: 4px; +} +.field-store_0_content_use input[type="checkbox"] { + margin-right: 3px; + position: relative; + top: 2px; +} +/* + CMS -> Manage Hierarchy +-------------------------------------- */ +.cms-hierarchy .cms-scope { + float: right; + margin-right: 25px; + position: relative; + top: 2px; +} +.cms-hierarchy #tree-container { + margin-top: 25px; + overflow: auto; + padding-bottom: 10px; +} +.cms-hierarchy .buttons-set { + margin-bottom: 10px; +} +.cms-hierarchy .cms-hierarchy-tree { + width: 48.93617020799999%; + float: left; + margin: 10px 0 8px 0; +} +.cms-hierarchy .cms-hierarchy-node { + width: 48.93617020799999%; + float: left; + margin: 10px 0 8px 2.127659574%; +} +.cms-hierarchy #cms_page_grid_container { + clear: both; +} +.cms-hierarchy .store-switcher { + position: relative; + top: 10px; +} +.cms-hierarchy .store-switcher label { + margin-right: 8px; +} +.cms-hierarchy-node #node_properties_fieldset #node_preview { + position: relative; + top: 6px; +} +.cms-hierarchy-node .form-inline .label { + width: 30%; +} +/* + CMS -> Widgets +-------------------------------------- */ +#widget_instace_tabs_properties_section_content .widget-option-label { + margin-top: 6px; +} +/* + CMS -> Static Blocks +-------------------------------------- */ +#buttonsblock_content.buttons-set { + margin-bottom: 9px; +} +#buttonsblock_content.buttons-set button { + margin-right: 4px; +} +/* + CMS -> Manage Content +-------------------------------------- */ +/* Content */ +.cms-manage-content-actions .buttons-set { + margin-bottom: 9px; +} +.cms-manage-content-actions .buttons-set button { + margin-right: 4px; +} +.cms-manage-content-actions textarea { + width: 100%; +} +/* + System -> Export +-------------------------------------- */ +#export_filter_grid .grid td .input-text-range-date { + vertical-align: middle; +} +#export_filter_grid .grid td .ui-datepicker-trigger { + vertical-align: middle; + margin-left: 5px; +} +#export_filter_grid .grid select { + margin-bottom: 0; +} +#export_filter_grid .grid table td:first-child, +#export_filter_grid .grid tr th:first-child { + border-left: 0; +} +#export_filter_grid .data thead { + border-left: 1px solid #837F79; +} +#export_filter_grid .data tbody { + border-left: 1px solid #c0bbaf; +} +/* + System -> Roles +-------------------------------------- */ +#gws_container ul { + padding: 0; + margin: 0; + list-style: none; +} +#gws_container ul ul { + margin: .8em 0 .8em 1.4em; +} +#gws_container input[type="checkbox"] { + margin-right: 3px; + position: relative; + top: -1px; +} +/* + Reports +-------------------------------------- */ +.reports-title .page-actions { + float: right; +} +.reports-title .store-switcher { + padding: 14px 0 18px; +} +.reports-content select { + width: 160px; +} +.reports-content input.hasDatepicker { + width: 133px; +} +/* TODO: refactor when validation design is ready */ +.reports-content .required .control { + position: relative; +} +.reports-content input.hasDatepicker + label.mage-error { + left: 0; + position: absolute; + top: 30px; +} +.reports-title:before, +.reports-title:after { + content: ""; + display: table; +} +.reports-title:after { + clear: both; +} +/* + Reports - Customer Reviews +-------------------------------------- */ +.adminhtml-report-review-customer .col-qty, +.adminhtml-report-review-customer .col-actions { + width: 85px; +} +/* + Reports - Product Reviews +-------------------------------------- */ +.adminhtml-report-review-product .col-id { + width: 35px; +} +.adminhtml-report-review-product .col-qty, +.adminhtml-report-review-product .col-rating, +.adminhtml-report-review-product .col-avg-rating, +.adminhtml-report-review-product .col-actions { + text-align: right; + width: 85px; +} +.adminhtml-report-review-product .col-date { + width: 140px; +} +.adminhtml-report-review-product .col-rating { + width: 104px; +} +/* + Reports - New Accounts +-------------------------------------- */ +.adminhtml-report-customer-accounts .col-period { + white-space: nowrap; + width: 70px; +} +/* + Reports - Refresh Statistics +-------------------------------------- */ +.adminhtml-report-statistics-index .col-period { + white-space: nowrap; + width: 140px; +} +.adminhtml-report-statistics-index .col-select { + width: 25px; +} +/* + Reports - Products Ordered +-------------------------------------- */ +.adminhtml-report-product-sold .col-period { + white-space: nowrap; + width: 70px; +} +.adminhtml-report-product-sold .col-qty { + width: 110px; +} +/* + Reports - Customers by Orders Total +-------------------------------------- */ +.adminhtml-report-customer-totals .col-period { + white-space: nowrap; + width: 70px; +} +.adminhtml-report-customer-totals .col-qty { + width: 65px; +} +.adminhtml-report-customer-totals .col-rating { + width: 100px; +} +/* + Reports - Tag by popular +-------------------------------------- */ +.adminhtml-report-tag-popular .col-qty, +.adminhtml-report-tag-popular .col-actions { + width: 80px; +} +/* + Reports - Tag by customer +-------------------------------------- */ +.adminhtml-report-tag-customer .col-id { + width: 35px; +} +.adminhtml-report-tag-customer .col-qty, +.adminhtml-report-tag-customer .col-actions { + width: 80px; +} +/* + Reports - Tag by product +-------------------------------------- */ +.adminhtml-report-tag-product .col-id { + width: 35px; +} +.adminhtml-report-tag-product .col-actions { + width: 70px; +} +.adminhtml-report-tag-product .col-unique-numbers, +.adminhtml-report-tag-product .col-total-numbers { + text-align: right; + width: 95px; +} +/* + Reports - Customers by Number of Orders +-------------------------------------- */ +.adminhtml-report-customer-orders .col-period { + white-space: nowrap; + width: 70px; +} +.adminhtml-report-customer-orders .col-qty, +.adminhtml-report-customer-orders .col-average, +.adminhtml-report-customer-orders .col-total { + width: 105px; +} +/* + Reports - Customers by Orders Total +-------------------------------------- */ +.adminhtml-report-customer-totals .col-period { + white-space: nowrap; + width: 70px; +} +.adminhtml-report-customer-totals .col-qty, +.adminhtml-report-customer-totals .col-average, +.adminhtml-report-customer-totals .col-total { + width: 105px; +} +/* + Reports - Customer's wishlists +-------------------------------------- */ +.adminhtml-report-customer-wishlist-wishlist .col-period { + width: 70px; +} +.adminhtml-report-customer-wishlist-wishlist .col-whishlist-qty, +.adminhtml-report-customer-wishlist-wishlist .col-available-qty, +.adminhtml-report-customer-wishlist-wishlist .col-qty-diff { + text-align: right; + width: 100px; +} +.adminhtml-report-customer-wishlist-wishlist .grid .range { + text-align: left; +} +/* + Reports - Most Viewed +-------------------------------------- */ +.adminhtml-report-product-viewed .col-period { + white-space: nowrap; + width: 70px; +} +.adminhtml-report-product-viewed .col-qty, +.adminhtml-report-product-viewed .col-price { + white-space: nowrap; + width: 80px; +} +/* + Reports - Search Terms +-------------------------------------- */ +.adminhtml-report-search .col-id { + width: 35px; +} +.adminhtml-report-search th.col-results, +.adminhtml-report-search th.col-hits { + text-align: left; + width: 117px; +} +.adminhtml-report-search td.col-results, +.adminhtml-report-search td.col-hits { + text-align: right; + width: 117px; +} +.adminhtml-report-search .col-results .range-line:first-child, +.adminhtml-report-search .col-hits .range-line:first-child { + float: left; + margin-right: 3px; +} +/* + Reports - Bestsellers +-------------------------------------- */ +.adminhtml-report-sales-bestsellers .col-period { + white-space: nowrap; + width: 70px; +} +.adminhtml-report-sales-bestsellers .col-qty, +.adminhtml-report-sales-bestsellers .col-price { + width: 80px; +} +/* + Reports - Downloads +-------------------------------------- */ +.adminhtml-report-product-downloads .col-qty, +.adminhtml-report-product-downloads .col-price { + width: 80px; +} +/* + Reports - Abandoned Carts +-------------------------------------- */ +.adminhtml-report-shopcart-abandoned .col-ip, +.adminhtml-report-shopcart-abandoned .col-subtotal, +.adminhtml-report-shopcart-abandoned .col-number, +.adminhtml-report-shopcart-abandoned .col-coupon { + text-align: right; +} +.adminhtml-report-shopcart-abandoned .col-ip { + width: 105px; +} +.adminhtml-report-shopcart-abandoned .col-subtotal { + width: 65px; +} +/* + Reports - Products in Carts +-------------------------------------- */ +.adminhtml-report-shopcart-product .col-id { + width: 35px; +} +.adminhtml-report-shopcart-product .col-carts, +.adminhtml-report-shopcart-product .col-qty, +.adminhtml-report-shopcart-product .col-price { + text-align: right; + width: 80px; +} +/* + Reports - Refunds +-------------------------------------- */ +.adminhtml-report-sales-refunded .col-period { + white-space: nowrap; + width: 70px; +} +.adminhtml-report-sales-refunded .col-ref-total, +.adminhtml-report-sales-refunded .col-ref-online, +.adminhtml-report-sales-refunded .col-ref-offline { + text-align: right; + width: 23%; +} +/* + Reports - Shipping +-------------------------------------- */ +.adminhtml-report-sales-shipping .col-period { + white-space: nowrap; + width: 70px; +} +.adminhtml-report-sales-shipping .col-qty, +.adminhtml-report-sales-shipping .col-total-sales-shipping, +.adminhtml-report-sales-shipping .col-total-shipping { + text-align: right; + width: 115px; +} +/* + Reports - Invoiced +-------------------------------------- */ +.adminhtml-report-sales-invoiced .col-period { + white-space: nowrap; + width: 70px; +} +.adminhtml-report-sales-invoiced .col-qty, +.adminhtml-report-sales-invoiced .col-invoiced, +.adminhtml-report-sales-invoiced .col-total-invoiced, +.adminhtml-report-sales-invoiced .col-total-invoiced-paid, +.adminhtml-report-sales-invoiced .col-total-invoiced-not-paid { + text-align: right; + width: 19%; +} +/* + Reports - Tax +-------------------------------------- */ +.adminhtml-report-sales-tax .col-period { + white-space: nowrap; + width: 70px; +} +.adminhtml-report-sales-tax .col-rate, +.adminhtml-report-sales-tax .col-qty, +.adminhtml-report-sales-tax .col-tax-amount { + text-align: right; + width: 105px; +} +/* + Reports - Orders +-------------------------------------- */ +.adminhtml-report-sales-sales .col-period { + white-space: nowrap; + width: 70px; +} +.adminhtml-report-sales-sales .col-orders, +.adminhtml-report-sales-sales .col-sales-items, +.adminhtml-report-sales-sales .col-sales-total, +.adminhtml-report-sales-sales .col-invoiced, +.adminhtml-report-sales-sales .col-refunded, +.adminhtml-report-sales-sales .col-sales-tax, +.adminhtml-report-sales-sales .col-sales-shipping, +.adminhtml-report-sales-sales .col-sales-discount, +.adminhtml-report-sales-sales .col-canceled { + text-align: right; + width: 10.5%; +} +/* + Reports - Coupons +-------------------------------------- */ +/* TODO: re-check styles for coupons table after coupons functionality will have been repaired */ +.adminhtml-report-sales-coupons .col-period { + white-space: nowrap; + width: 70px; +} +.adminhtml-report-sales-coupons .col-sales, +.adminhtml-report-sales-coupons .col-users, +.adminhtml-report-sales-coupons .col-sales-discount, +.adminhtml-report-sales-coupons .col-total-amount, +.adminhtml-report-sales-coupons .col-subtotal, +.adminhtml-report-sales-coupons .col-discount, +.adminhtml-report-sales-coupons .col-total { + text-align: right; +} +/* + Reports - Low Stock +-------------------------------------- */ +.adminhtml-report-product-lowstock .col-qty { + width: 10%; +} +.adminhtml-report-product-lowstock .range-line { + display: inline-block; +} +.adminhtml-report-product-lowstock .col-product { + width: 65%; +} +.adminhtml-report-product-lowstock .col-sku { + width: 25%; +} +/* + Reports - PayPal Settlement Reports +-------------------------------------- */ +.adminhtml-paypal-reports-index .grid tr.headings th > span { + white-space: normal; +} +.adminhtml-paypal-reports-index .col-transaction_event_code { + max-width: 150px; +} +.adminhtml-paypal-reports-index .col-amount, +.adminhtml-paypal-reports-index .col-fee-amount { + text-align: right; +} +/* + Newsletter +-------------------------------------- */ +[class^=" adminhtml-newsletter-"] .page-actions .action-back { + float: right; +} +/* + Newsletter Templates +-------------------------------------- */ +.adminhtml-newsletter-template-index .col-id { + width: 35px; +} +.adminhtml-newsletter-template-index .col-actions { + width: 80px; +} +.adminhtml-newsletter-template-index .col-type { + width: 100px; +} +.adminhtml-newsletter-template-index .col-added, +.adminhtml-newsletter-template-index .col-updated { + width: 140px; +} +[class^=' adminhtml-newsletter-'] .buttons-set { + margin: 0 0 15px; +} +[class^=" adminhtml-newsletter-"] .buttons-set button { + margin-right: 4px; +} +/* + Newsletter - Queue +-------------------------------------- */ +.adminhtml-newsletter-queue-index .col-id { + width: 35px; +} +.adminhtml-newsletter-queue-index .col-finish, +.adminhtml-newsletter-queue-index .col-start { + width: 130px; +} +.adminhtml-newsletter-queue-index .col-status, +.adminhtml-newsletter-queue-index .col-processed, +.adminhtml-newsletter-queue-index .col-recipients { + white-space: nowrap; + width: 85px; +} +.adminhtml-newsletter-queue-index td.col-processed, +.adminhtml-newsletter-queue-index td.col-recipients { + text-align: right; +} +.adminhtml-newsletter-queue-index .col-actions { + width: 80px; +} +/* + Newsletter - Subscribers +-------------------------------------- */ +.adminhtml-newsletter-subscriber-index .col-id { + width: 35px; +} +.adminhtml-newsletter-subscriber-index .col-type { + width: 75px; +} +.adminhtml-newsletter-subscriber-index .col-status { + white-space: nowrap; + width: 85px; +} +/* + Newsletter - Problems +-------------------------------------- */ +.adminhtml-newsletter-problem-index .col-select { + width: 25px; +} +.adminhtml-newsletter-problem-index .col-id { + width: 35px; +} +.adminhtml-newsletter-problem-index .col-start { + width: 130px; +} +.adminhtml-newsletter-problem-index .col-error-code { + width: 150px; +} +.table-fieldset-alt, +.type-options { + margin-bottom: 20px; +} +.table-fieldset-alt thead th, +.table-fieldset-alt tbody tr td { + border-width: 0; +} +.table-fieldset-alt tbody tr:nth-child(odd) td, +.table-fieldset-alt tbody tr:nth-child(odd):hover td { + background: #fff; +} +/* + System - Tax +--------------------------------------*/ +.tax-rate-popup .ui-dialog-content.ui-widget-content { + padding: 10px 10px 0; +} +.tax-rate-popup .fieldset { + margin: 0; +} +.tax-rate-popup .field { + margin-bottom: 20px; +} +.tax-rate-popup .field .label { + margin: 5px 0 0 0; + width: 26%; + padding: 0 20px 0 0; + float: left; + text-align: right; + box-sizing: content-box; + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + -ms-box-sizing: content-box; +} +.tax-rate-popup .field .control { + width: 58%; + margin: 0; + float: left; +} +.tax-rate-popup .field .control select, +.tax-rate-popup .field .control .input-text { + width: 100%; +} +.tax-rate-popup .field-rate .control .input-text { + width: 50%; +} +.tax-rate-popup .field-rate label.mage-error { + display: block; +} +.tax-rate-popup .tax-rate-titles-note-td { + margin-left: 26%; + padding-left: 20px; +} +.field-tax_rate, +.field-tax_customer_class, +.field-tax_product_class { + position: relative; +} +.mselect-hidden + .mage-error { + position: absolute; + top: 100%; +} +/* + Tags +-------------------------------------- */ +.tag-title { + overflow: hidden; +} +.tag-title .page-actions { + float: right; +} +/* + Attribute Mapping +-------------------------------------- */ +.field-attributes_box .control-value { + width: 100%; +} +.adminhtml-googleshopping-types-new #attribute_set { + padding: 0; +} +.adminhtml-googleshopping-types-new #gcontent_attributes_container { + margin-top: -6px; +} +/* + Dashboard +-------------------------------------- */ +.dashboard-inner { + border: 1px solid #ccc; +} +.adminhtml-dashboard-index .col-2-left-layout, +.adminhtml-dashboard-index .col-1-layout { + min-width: 0; +} +.adminhtml-dashboard-index .side-col { + width: 38%; + padding: 1%; +} +.adminhtml-dashboard-index .col-2-left-layout .main-col { + min-width: 0; + width: 60%; +} +.dashboard-container { + border-radius: 0; +} +.dashboard-container.col-2-left-layout:before { + left: 40%; +} +.dashboard-container .dashboard-inner { + padding: 20px; +} +.dashboard-inner .tabs-horiz > li a { + padding-left: 14px; + padding-right: 14px; +} +.dashboard-container #diagram_tab_content { + background: #fff; + border: 1px solid #eae6e0; + border-radius: 5px; + border-top-left-radius: 0; + margin: 0 0 20px; + padding: 18px; + position: relative; +} +.dashboard-container .dashboard-diagram .store-switcher + div { + /* loader under a diagram */ + + background: url(../mui/images/ajax-loader-small.gif) no-repeat 50% 50%; + min-height: 75px; + text-align: center; +} +.dashboard-container .dashboard-diagram .store-switcher + div img { + max-width: 100%; +} +.dashboard-container .dashboard-diagram .store-switcher + div.dashboard-diagram-nodata { + /* when there is no data to display the diagram */ + + background-image: none; + min-height: 15px; +} +.dashboard-container #grid_tab_content { + background: #ffffff url(../mui/images/ajax-loader-small.gif) no-repeat 50% 50%; + border: 1px solid #eae6e0; + border-radius: 5px; + border-top-left-radius: 0; + min-height: 50px; +} +.dashboard-container #grid_tab_content .grid { + padding: 0; +} +.dashboard-container .store-switcher { + margin: 20px 0 10px; +} +.dashboard-container .dashboard-diagram .store-switcher { + margin-top: 0; +} +.dashboard-diagram-nodata { + border: 1px solid #ccc; + padding: 20px 0; + text-align: center; +} +.action-switch-to-analytics:link, +.action-switch-to-analytics:visited, +.action-switch-to-hub:link, +.action-switch-to-hub:visited { + font-weight: 400; + font-size: 16px; + color: #19a3d1; + position: relative; + padding: 0 0 0 20px; + margin: 11px 0 0 20px; + background: none; + box-shadow: none; +} +.action-switch-to-hub:before, +.action-switch-to-analytics:before { + position: absolute; + width: 17px; + height: 12px; + background: url(../images/icons-dashboard-switcher.png) 0 0 no-repeat; + left: 0; + top: 4px; + content: ''; +} +.action-switch-to-hub:before { + top: 2px; +} +.action-switch-to-analytics:before { + background-position: 0 -13px; +} +/* + Sales +-------------------------------------- */ +#order-totals strong { + color: #676056; + font-size: 14px; + font-weight: 700; +} +#order-shipping-method-summary a { + color: #007dbd; + font-size: 14px; + font-weight: 400; +} +#order-shipping-method-summary a:focus, +#order-shipping-method-summary a:hover { + text-decoration: underline; +} +.customer-current-activity { + float: left; + width: 22%; +} +.customer-current-activity-inner { + background: #fff; + border: 1px solid #eae6e0; + padding: 18px; + border-radius: 5px; +} +.order-details-existing-customer { + padding-left: 1%; + position: relative; + width: 77%; + float: right; +} +.order-billing-address, +.order-billing-method, +[class^=" sales-order-"] .order-history, +[class^=" sales-order-"] .order-comments-history, +[class^=" sales-order-"] .order-information, +[class^=" sales-order-"] .order-billing-address, +[class^=" sales-order-"] .order-payment-method, +[class^=" adminhtml-rma-"] .order-comments-history, +[class^=" adminhtml-rma-"] .order-shipping-address, +[class^=" adminhtml-rma-"] .rma-request-details { + float: left; + width: 49.5%; +} +.order-shipping-address, +.order-shipping-method, +[class^=" sales-order-"] .order-totals, +[class^=" sales-order-"] .order-account-information, +[class^=" sales-order-"] .order-shipping-address, +[class^=" sales-order-"] .order-payment-method-virtual, +[class^=" sales-order-"] .order-shipping-method, +[class^=" adminhtml-rma-"] .rma-confirmation, +[class^=" adminhtml-rma-"] .order-shipping-method, +[class^=" adminhtml-rma-"] .order-return-address { + float: right; + width: 49%; +} +#order-data .order-account-information { + float: none; + width: auto; +} +[class^=" sales-"] .order-information .fieldset-wrapper > .fieldset-wrapper-title .title { + width: 100%; +} +#order-data .actions .action-add, +#order-data .actions .action-delete, +#order-customer-selector .actions .action-add { + margin: 0 0 0 20px; +} +#order-data .order-methods ul { + list-style: none; + margin: 0; + padding: 0; +} +#order-data .order-methods dl, +#order-data .order-methods dt, +#order-data .order-methods dd, +#order-data .payment-methods dl, +#order-data .payment-methods dt, +#order-data .payment-methods dd { + margin: 0; + padding: 0; +} +#order-data .order-methods dd + dt, +#order-data .payment-methods dd + dt { + margin-top: 17px; +} +#order-data .order-methods dt, +#order-data .payment-methods dt { + margin: 0 0 8px; +} +.order-coupons .box-left, +.order-gift-options .box-left { + float: left; + width: 49%; +} +.order-coupons .box-right, +.order-gift-options .box-right { + float: right; + width: 49%; +} +.ui-dialog.gift-options-popup .ui-dialog-content { + padding: 25px; +} +.ui-dialog.gift-options-popup .ui-dialog-content h4 { + margin: 0 0 17px; +} +.gift-options-tooltip { + background: #fff; + border-radius: 5px; + padding: 10px; + box-shadow: 0 0 3px rgba(0, 0, 0, 0.3); +} +#order-data .box-left fieldset, +#order-data .box-right fieldset { + border-radius: 5px; +} +#order-data .order-items td[colspan="8"] { + border: 1px solid #c0bbaf; +} +.order-search-items thead th:nth-child(1) { + width: 60px; +} +.order-search-items thead th:nth-child(3) { + width: 80px; +} +.order-search-items thead th:nth-child(4) { + width: 100px; +} +.order-search-items thead th:nth-child(5) { + width: 55px; +} +.order-search-items thead th:nth-child(6) { + width: 1px; +} +.adminhtml-rma-new .order-totals, +.order-comments-history .order-comments-history, +[class^=" adminhtml-rma-"] .rma-comments-history { + float: none; + width: 100%; +} +[class^=" sales-order-"] .order-billing-address .actions, +[class^=" sales-order-"] .order-shipping-address .actions { + margin: 17px 0; +} +[class^=" sales-order-"] .order-billing-address .control + label, +[class^=" sales-order-"] .order-shipping-address .control + label { + margin: 17px 0 0; +} +.sales-order-create-index .page-actions-inner .cancel, +.sales-order-create-index .page-actions-inner .cancel:hover, +.sales-order-create-index .page-actions-inner .cancel:active { + float: right; + margin: 0 0 0 12px; + padding: 3px 0 3px 6px; +} +.sales-order-create-index #order-message ul.messages > li, +.sales-order-edit-index #order-message ul.messages > li { + margin: 0 0 60px; +} +.sales-order-create-index thead .col-entity_id, +.sales-order-create-index .col-entity_id, +.sales-order-create-index .col-qty { + width: 50px; +} +.sales-order-create-index .col-in_products { + text-align: center; +} +.sales-order-create-index .col-sku, +.sales-order-create-index .col-remove { + width: 120px; +} +.sales-order-create-index .col-price { + width: 70px; +} +.sales-order-create-index .order-search-items .col-name { + width: 50%; +} +.sales-order-create-index .order-items.fieldset-wrapper .fieldset-wrapper-title, +.sales-order-create-index .order-search-items.fieldset-wrapper .fieldset-wrapper-title, +.sales-order-create-index .order-additional-area.fieldset-wrapper .fieldset-wrapper-title, +.sales-order-create-index .order-errors .fieldset-wrapper-title { + border-bottom: 0; + margin: 0; +} +.sales-order-create-index #order-data .fieldset-wrapper-title .actions .action-add { + margin-left: 0; + margin-right: 20px; +} +.sales-order-create-index .order-items.fieldset-wrapper .title, +.sales-order-create-index .order-additional-area.fieldset-wrapper .title, +.sales-order-create-index .order-search-items.fieldset-wrapper .title, +.sales-order-create-index .order-errors .title { + border-bottom: 1px solid #ededed; + float: none; + margin: 0 0 18px; + width: 100%; +} +.sales-order-create-index .order-items.fieldset-wrapper .actions, +.sales-order-create-index .order-search-items.fieldset-wrapper .actions, +.sales-order-create-index #order-errors .actions { + float: none; + border: 1px solid #c0bbaf; + border-bottom: 0; + background: #f6f3ec; + background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2Y2ZjNlYyIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNlZGVhZTEiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); + background: -moz-linear-gradient(top, #f6f3ec 0%, #edeae1 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #f6f3ec), color-stop(100%, #edeae1)); + background: -webkit-linear-gradient(top, #f6f3ec 0%, #edeae1 100%); + background: -o-linear-gradient(top, #f6f3ec 0%, #edeae1 100%); + background: -ms-linear-gradient(top, #f6f3ec 0%, #edeae1 100%); + background: linear-gradient(to bottom, #f6f3ec 0%, #edeae1 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f6f3ec', endColorstr='#edeae1', GradientType=0); + margin: 0; + padding: 0 8px; + position: relative; +} +.sales-order-create-index #order-data .fieldset-wrapper .actions .action-add { + margin: 7px 8px 8px 0; +} +.sales-order-create-index .order-additional-area.fieldset-wrapper .actions { + float: none; + margin: 0 0 8px; + padding: 0; +} +.sales-order-create-index #order-data .fieldset-wrapper .actions .action-delete { + margin: 11px 0 0; +} +/* ----------------------------------- */ +#order-data .page-actions { + padding-top: 0; +} +#order-data .store-switcher { + margin: -46px 0 0; + position: relative; + width: 50%; +} +.create-order-sidebar-container > div + div { + border-top: 1px solid #ededed; + margin-top: 35px; +} +.create-order-sidebar-container > div .head h5 { + color: #676056; + font-size: 14px; + font-weight: 400; + margin: 17px 0 7px; +} +.customer-current-activity-inner > h4 { + color: #676056; + font-size: 20px; + font-weight: 400; + border-bottom: 1px solid #ededed; + margin-top: 0; + padding: 0 0 16px; +} +.customer-current-activity-inner .data-table th { + color: #676056; + font-size: 13px; + font-weight: 400; +} +.customer-current-activity-inner .data-table td { + color: #676056; + font-size: 12px; + font-weight: 400; +} +.customer-current-activity .action-refresh { + float: right; +} +.customer-current-activity .action-refresh, +.customer-current-activity .data-table .icon { + display: inline-block; + text-indent: 100%; + overflow: hidden; + height: 16px; + width: 16px; + white-space: nowrap; +} +.customer-current-activity .action-refresh:before, +.customer-current-activity .data-table .icon:before { + content: "\e010"; + color: #c3c2be; + display: block; + text-indent: 0; + font-size: 16px; + font-family: 'MUI-Icons'; + font-style: normal; + font-weight: normal; + speak: none; + -webkit-font-smoothing: antialiased; +} +.customer-current-activity .data-table .icon-remove:before { + content: "\e07f"; +} +.customer-current-activity .data-table .icon-add:before { + content: "\e071"; +} +.customer-current-activity .auto-scroll { + color: #676056; + font-size: 13px; + font-weight: 400; + overflow: auto; + max-height: 150px; +} +.customer-current-activity .auto-scroll + button { + margin: 22px 0 0; +} +.customer-current-activity .actions { + border-top: none; + margin: 20px 0 0; + padding: 0; +} +.overlay { + background: rgba(0, 0, 0, 0.3); + border-radius: 5px; + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; +} +.overlay span { + color: #111; + font-weight: bold; + position: absolute; + top: 50%; + left: 50%; + margin: -25px 0 0 -100px; + width: 200px; +} +/* + Order view +-------------------------------------- */ +[class^=" sales-order-"] .fieldset-wrapper-title .actions { + float: right; + font-size: 12px; + margin: 8px 20px 0 0; +} +[class^=" sales-order-"] .fieldset-wrapper-title .actions a:link, +[class^=" sales-order-"] .fieldset-wrapper-title .actions a:visited, +[class^=" sales-order-"] .fieldset-wrapper-title .actions a:hover, +[class^=" sales-order-"] .fieldset-wrapper-title .actions a:active { + color: #a29c94; +} +.order-comments-history fieldset { + border: 0; + margin: 0; + padding: 0; +} +.order-comments-history textarea, +.rma-history-form textarea { + height: 6em; + margin: 5px 0 10px; + resize: vertical; + width: 100%; +} +.order-comments-history input[type="checkbox"] { + margin-right: 5px; +} +.order-history-comments-options { + float: left; +} +.order-comments-history .actions { + float: right; +} +[class^=" sales-order-"] .fieldset-wrapper address { + overflow: auto; +} +/* + Orders comments +-------------------------------------- */ +.note-list { + list-style: none; + padding: 0; +} +.note-list li { + border-top: 1px solid #ededed; + padding: 9px 0; +} +.note-list li:first-child { + border: 0; + padding-top: 13px; +} +.note-list div { + font-size: 12px; +} +.note-list .note-list-date, +.note-list .note-list-status, +.note-list .note-list-customer span { + font-weight: bold; +} +.note-list .note-list-time, +.note-list .note-list-status { + border-right: 1px solid #676056; + padding: 0 5px 0 0; + margin: 0 5px 0 0; +} +.note-list .note-list-customer { + white-space: nowrap; +} +.note-list .note-list-comment { + margin: 5px 0 0; +} +.note-list .note-list-customer-notapplicable { + color: #d87e34; +} +.note-list .note-list-customer-notified { + color: #185b00; +} +.note-list .note-list-customer-not-notified { + color: #963535; +} +.checkout-agreement-index .col-id, +[class^=" sales-billing-"] .col-id, +[class^=" sales-transactions-"] .col-id { + width: 35px; +} +[class^=" sales-order-shipment-"] .col-ship, +[class^=" sales-"] .col-return-to-stock, +.adminhtml-rma-new .col-select { + text-align: center; + width: 35px; +} +[class^=" sales-order-"] .col-price-original, +[class^=" sales-order-"] .col-tax-amount, +[class^=" sales-order-"] .col-tax-percent, +[class^=" sales-order-"] .col-discont, +[class^=" sales-order-"] .col-total, +[class^=" sales-order-"] .col-discount, +[class^=" sales-order-"] .col-tax, +[class^=" sales-"] .col-refunded, +[class^=" adminhtml-rma-"] .col-order, +[class^=" adminhtml-rma-"] .col-required, +[class^=" adminhtml-rma-"] .col-system, +[class^=" adminhtml-rma-"] .col-visible-on-front, +.checkout-agreement-index .col-status, +.adminhtml-rma-item-attribute-edit .col-position { + text-align: right; + white-space: nowrap; + width: 50px; +} +[class^=" sales-order-"] .col-subtotal, +[class^=" sales-order-"] .col-price, +[class^=" adminhtml-rma-"] .col-price { + text-align: right; + width: 50px; +} +.sales-order-invoice-view .col-subtotal, +.sales-order-invoice-view .col-price { + width: 10%; +} +[class^=" sales-"] .col-actions, +[class^=" adminhtml-rma-"] .col-actions, +[class^=" adminhtml-rma-"] .col-default { + width: 50px; +} +[class^=" sales-"] .col-select, +[class^=" adminhtml-rma-"] .col-select { + width: 60px; +} +[class^=" sales-"] .col-qty, +[class^=" sales-order-"] .col-qty-invoice, +[class^=" sales-order-"] .col-ordered-qty, +[class^=" adminhtml-rma-"] .col-qty, +[class^=" adminhtml-rma-"] .col-condition { + width: 70px; +} +[class^=" sales-"] .col-refund, +[class^=" sales-transactions-"] .col-closed, +.sales-order-view .col-closed { + text-align: center; + width: 70px; +} +[class^=" sales-"] .col-order-number, +[class^=" sales-"] .col-invoice-number, +[class^=" sales-"] .col-memo-number, +[class^=" sales-"] .col-shipment-number, +[class^=" sales-"] .col-rma-number, +[class^=" sales-"] .col-status, +[class^=" adminhtml-rma-"] .col-order-number, +[class^=" adminhtml-rma-"] .col-rma-number, +[class^=" sales-transactions-"] .col-order-id, +.sales-order-view .col-refunded { + white-space: normal; + width: 75px; +} +[class^=" sales-"] .col-gtbase, +[class^=" sales-"] .col-gtpurchased { + text-align: right; + white-space: normal; + width: 75px; +} +[class^=" sales-"] .col-order-number, +[class^=" sales-"] .col-rma-number, +[class^=" adminhtml-rma-"] .col-order-number, +[class^=" adminhtml-rma-"] .col-rma-number { + text-align: left; +} +[class^=" adminhtml-rma-"] .col-status, +[class^=" adminhtml-rma-"] .col-reason, +[class^=" adminhtml-rma-"] .col-resolution, +[class^=" sales-transactions-"] .col-transaction-type, +.sales-order-view .col-memo { + width: 100px; +} +[class^=" sales-"] tr.headings .col-parent-transaction-id > span, +[class^=" sales-"] tr.headings .col-method > span, +[class^=" sales-"] tr.headings .col-transaction-id > span, +[class^=" sales-"] tr.headings .col-transaction-type > span, +[class^=" sales-"] tr.headings .col-gtbase > span, +[class^=" sales-"] tr.headings .col-gtpurchased > span, +[class^=" sales-order-"] tr.headings .col-discont > span { + white-space: normal; +} +[class^=" sales-"] .col-period, +[class^=" adminhtml-rma-"] .col-period { + width: 150px; +} +[class^=" sales-order-shipment-"] .col-carrier { + width: 190px; +} +.checkout-agreement-index .col-store-view { + white-space: nowrap; + width: 200px; +} +[class^=" sales-transactions-"] .log-details .data-table tbody tr th, +[class^=" sales-transactions-"] .col-key { + width: 22%; +} +.sales-order-index .col-1-layout table.data { + table-layout: fixed; + word-wrap: break-word; +} +.eq-ie8 .sales-order-index .col-1-layout table.data { + table-layout: auto; + word-wrap: normal; +} +[class^=" sales-"] .col-from-store { + width: 15%; +} +[class^=" sales-"] .col-2-left-layout .hor-scroll { + margin-bottom: -4px; + overflow: auto; + padding-bottom: 4px; + width: 100%; +} +[class^=" sales-order-"] .order-totals .actions, +[class^=" adminhtml-rma-"] .col-qty, +[class^=" adminhtml-rma-"] .col-qty_ordered, +.sales-order-view .col-refunded { + text-align: right; +} +[class^=" sales-order-"] .col-price .label, +[class^=" sales-order-"] .col-subtotal .label { + display: inline-block; + min-width: 60px; + white-space: nowrap; +} +[class^=" sales-order-"] .col-price .price-excl-tax .price, +[class^=" sales-order-"] .col-price .price-incl-tax .price, +[class^=" sales-order-"] .col-subtotal .price-excl-tax .price, +[class^=" sales-order-"] .col-subtotal .price-incl-tax .price { + font-weight: bold; +} +[class^=" sales-order-"] .grid .col-qty table, +[class^=" sales-order-"] .grid .col-qty tbody, +[class^=" sales-order-"] .grid .col-qty tr, +[class^=" sales-order-"] .grid .col-qty td, +[class^=" sales-order-"] .grid .col-ordered-qty table, +[class^=" sales-order-"] .grid .col-ordered-qty tbody, +[class^=" sales-order-"] .grid .col-ordered-qty tr, +[class^=" sales-order-"] .grid .col-ordered-qty td { + background: none; + border: 0; +} +[class^=" sales-order-"] .col-ordered-qty td { + padding: 0 5px 3px; +} +[class^=" sales-order-"] .grid .product-title { + font-weight: bold; +} +[class^=" sales-order-"] .item-options { + margin: 5px 0 5px 10px; +} +[class^=" sales-order-"] .item-options dt { + font-weight: bold; +} +[class^=" sales-order-"] .item-options dd { + margin: 0 0 0 10px; +} +.adminhtml-rma-item-attribute-edit .col-position input { + text-align: center; +} +.order-subtotal .label { + text-align: right; +} +.items-to-invoice { + border: 1px solid #c0bbaf; + margin-top: 13px; + width: 100%; +} +.items-to-invoice td, +table.items-to-invoice tbody tr:hover td { + background-color: #e6e3de; + border: 0; + text-align: center; +} +[class^=" sales-order-creditmemo-"] .no-items { + padding-top: 13px; + text-align: center; +} +.items-to-invoice .grand-total { + color: #19a3d1; + font-weight: bold; +} +.sales-order-shipment-new .order-totals .fieldset-wrapper { + padding-top: 18px; +} +.sales-order-shipment-new .actions { + float: right; +} +.creditmemo-totals .data-table input[type="text"] { + text-align: right; + width: 60px; +} +[class^=" sales-order-"] .order-subtotal .label { + width: 80%; +} +.adminhtml-rma-new .rma-confirmation .actions { + margin-top: 10px; + text-align: right; +} +[class^=" adminhtml-rma-"] .rma-items th.col-qty span, +.adminhtml-rma-edit .rma-items th.col-qty span { + text-align: left; + white-space: normal; +} +.adminhtml-rma-edit .data-table .col-carrier, +[class^=" sales-billing-agreement-"] .log-details .data-table th { + width: 20%; +} +.adminhtml-rma-edit .data-table .col-title { + width: 35%; +} +.adminhtml-rma-edit .data-table .col-number { + width: 25%; +} +[class^=" sales-order-"] .order-shipping-address .price, +.order-shipping-address .shipping-description-title { + font-weight: bold; +} +[class^=" adminhtml-rma-"] .col-actions a { + cursor: pointer; + white-space: nowrap; +} +[class^=" adminhtml-rma-"] .col-reason input[type="text"] { + margin: 5px 0 0; + width: 100%; +} +[class^=" adminhtml-rma-"] .col-actions .separator { + margin: 0 3px; +} +[class^=" sales-"] .order-payment-method .data-table { + margin-top: 15px; +} +[class^=" sales-"] .order-payment-currency { + margin-top: 15px; +} +[class^=" sales-"] .grid tbody td { + vertical-align: top; +} +[class^=" sales-"] .grid tbody.even tr td { + background: #e6e3de; +} +[class^=" sales-"] .grid tbody.odd tr td { + border-bottom: 0; + background: #f5f2ed; +} +[class^=" sales-"] .grid .data { + border-bottom: 1px solid #c0bbaf; +} +[class^=" sales-"] .grid td .option-label { + font-weight: bold; +} +[class^=" sales-"] .grid td .option-value { + margin: 0 0 0 10px; +} +.col-product .product_to_add { + float: right; +} +/* + Packaging for Shipping Popup +-------------------------------------- */ +#popup-window-mask, +.popup-window-mask { + background: rgba(0, 0, 0, 0.5); + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 999; +} +.packaging-window, +.packed-window { + background: #fff; + -webkit-box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4); + box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4); + left: 50%; + margin: -200px 0 0 -471px; + position: fixed; + top: 50%; + width: 1000px; + z-index: 1000; +} +.packaging-window .entry-edit-head { + padding: 3px 5px; +} +.packaging-window .messages { + padding: 10px 26px 10px 32px; + border: 0; + -moz-border-radius: 0; + -webkit-border-radius: 0; + border-radius: 0; + color: #963535; + text-shadow: none; + position: relative; + background: #f3dcd8; + border: 1px solid #963535; + margin-top: -1px; +} +.packaging-window .messages:before { + position: absolute; + left: 8px; + top: 50%; + margin-top: -11px; + background: none; + text-shadow: none; + width: auto; + height: auto; + border: 0; + font-family: 'MUI-Icons'; + font-style: normal; + speak: none; + font-weight: normal; + -webkit-font-smoothing: antialiased; + font-size: 16px; + content: '\e069'; + color: #963535; +} +.packaging-window .validation-failed { + background: #fef0ed; + border: 1px dashed #d6340e; +} +.packaging-window .packaging-content { + overflow: auto; + overflow-x: hidden; + height: auto !important; + max-height: 400px; +} +.packaging-window .package-options { + width: 100%; + border-top: 1px solid #ccc; + padding: 10px 0 0; + margin: 3px 0 0; +} +.packaging-window .package-options td { + vertical-align: middle; +} +.packaging-window .package-options .input-text { + width: 50px; +} +.packaging-window .package_prapare { + margin-bottom: 15px; +} +.packaging-window .package-options .customs-value { + width: 80px; +} +.packaging-window .package-options .options-weight { + width: 75px; +} +.packaging-window .package-options .options-units-weight { + width: 45px; +} +.packaging-window .package-options .options-units-dimensions { + width: 45px; +} +.packaging-window .package-options .options-content-type { + width: 120px; +} +.packaging-window .package-options input[type=text].disabled, +.packaging-window .package-options select.disabled { + background: #eee; +} +.packaging-window .package-options-contents { + border-top: 0; +} +.packaging-window .package-add-products { + margin: 20px 0 0; +} +.packaging-window .package-add-products .grid { + padding: 0; +} +.packaging-window .package-add-products .grid button { + vertical-align: middle; +} +.packaging-window .package-number { + font-weight: bold; +} +.packaging-window .package-number span { + margin-left: 5px; +} +.packed-window .entry-edit-head { + padding: 3px 5px; +} +.packed-window .packed-content { + padding: 10px 10px 0; + overflow: auto; + max-height: 400px; +} +.packed-window .package { + border-top: 1px solid #ededed; + margin-bottom: 30px; + padding: 10px; +} +.packed-window .package:first-child { + border-top: 0; +} +.package-info { + background: #e6e3de; + border: 1px solid #c0bbaf; +} +.package-info th { + font-weight: bold; +} +.packed-window .package-info table tbody tr td, +.packed-window .package-info table tbody tr th, +.package-info table tbody tr:nth-child(2n+1) td, +.package-info table tbody tr:nth-child(2n+1) th { + background: none; + border: 0; + padding: 5px 5px 2px; +} +.packed-window .package .grid { + padding: 0; +} +.packed-window .package-options { + width: 60%; +} +.packed-window .package-options td, +.packed-window .package-options th { + padding: 1px 0; +} +.grid .popup-window { + text-align: left; +} +.grid tr.on-mouse td .popup-window .data-table tbody tr:nth-child(2n+1) td, +.grid table tbody tr.on-mouse:nth-child(odd):hover td .popup-window .data-table tbody tr:nth-child(2n+1) td, +.grid table tbody tr.on-mouse:nth-child(odd):hover td .popup-window .data-table tbody tr:nth-child(2n+1):hover td, +.grid table tbody tr.on-mouse:nth-child(2n+1):hover td .popup-window .data-table tbody tr:nth-child(2n+1) td, +.grid table tbody tr.on-mouse:nth-child(2n+1):hover td .popup-window .data-table tbody tr:nth-child(2n+1):hover td, +.grid table tbody tr.on-mouse:hover td .popup-window .data-table tbody tr:nth-child(2n+1), +.grid table tbody tr.on-mouse:hover th .popup-window .data-table tbody tr:nth-child(2n+1) { + background-color: #fbfaf6; +} +.grid .popup-window { + text-align: left; +} +.popup-window-buttons-set { + text-align: right; + padding: 25px; +} +.popup-window-title { + background: #f3efea; + padding: 19px 20px; +} +.popup-window-title .title { + color: #676056; + display: block; + font-size: 20px; + line-height: 1; +} +.popup-window-title .actions { + float: right; +} +.popup-window-content { + padding: 25px 25px 0; +} +.popup-window-content > ul { + list-style: none; + padding: 0; +} +.packaging-window .col-weight { + text-align: left; + width: 60px; +} +.packaging-window .col-qty { + text-align: left; + width: 80px; +} +.packed-window .col-qty, +.packed-window .col-weight, +.packed-window .col-qty_ordered { + text-align: right; + width: 70px; +} +.packaging-window .col-select, +.packaging-window .col-measure { + text-align: center; + width: 35px; +} +.popup-fieldset-title .title { + color: #666; + display: inline-block; + font-size: 18px; + font-weight: normal; + padding: 7px 0 10px; +} +.popup-fieldset-title .actions { + float: right; +} +.packaging-window select { + margin-bottom: 0; +} +.packaging-window .col-width, +.packaging-window .col-height, +.packaging-window .col-length, +.packaging-window .data-table .col-total-weight input[type="text"] { + width: 60px; +} +.packaging-window .col-total-weight { + white-space: nowrap; + width: 100px; +} +.packaging-window .col-signature { + width: 160px; +} +.packaging-window .data-table .col-actions, +.packaging-window .col-total-weight { + white-space: nowrap; +} +.packaging-window .data-table .action-delete { + margin: 5px 0 0 5px; +} +.packaging-window .grid tr th { + border-bottom: 1px solid #c9c2b8; +} +.packaging-window .grid tr th:first-child, +.packaging-window .grid td:first-child, +.packaging-window .grid td:last-child { + border-left: 0; + border-right: 0; +} +.packaging-window .data-table .col-qty-edit { + white-space: nowrap; + width: 50px; +} +.packaging-window .data-table .col-qty-edit input[type="text"] { + width: 50px; +} +.sp-methods > dt { + font-weight: bold; +} +.sp-methods > dd { + margin: 5px 0 5px 15px; +} +.sp-methods > dd > ul { + list-style: none; + padding: 0; +} +[class^=" sales-order-"] .order-billing-address .packaging-window .actions, +[class^=" sales-order-"] .order-shipping-address .packaging-window .actions { + margin: 0; +} +/* + Popup Configuration Popup +-------------------------------------- */ +#product_composite_configure_messages { + margin-left: 0 !important; + padding: 10px 15px; +} +.rma-popup, +.cms-popup { + background: #fff; + box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4); + cursor: default; + position: fixed; + left: 50%; + top: 50%; + z-index: 1000; +} +.rma-popup { + width: 540px; + margin: 0 0 0 -271px; +} +.rma-popup .entry-edit .fieldset { + border: none; +} +.rma-popup .validation-advice, +.rma-popup label.mage-error { + margin-left: 0; +} +.rma-popup .content { + background: #fff; + border-bottom: 1px solid #ccc; + max-height: 400px; + overflow: auto; +} +.rma-popup .content .grid { + padding: 0; +} +.rma-popup .content .grid table { + border-bottom: 1px solid #cbd3d4; +} +.rma-popup .product-options { + border-bottom: 1px solid #e7e7e7; + margin: 0 0 15px; + padding: 0 0 12px; +} +.rma-popup .product-options .required { + color: #333 !important; + font-weight: normal !important; +} +.rma-popup .product-options .required em { + color: #d40707; +} +.rma-popup .last-fieldset .product-options { + border: 0 none; + margin-bottom: 0; + padding-bottom: 0; +} +.rma-popup .buttons-set { + text-align: right; + margin: 0; + overflow: hidden; + padding: 7px 10px 8px; +} +.rma-popup .buttons-set { + width: 518px; +} +.cms-popup .buttons-set { + width: 289px; +} +.rma-popup .buttons-set button { + margin: 0 0 0 5px; +} +.grid .rma-popup .form-list tr, +.grid tr.even .rma-popup .form-list tr, +.grid tr.on-mouse .rma-popup .form-list tr { + background: #fff !important; +} +/* + URL rewrite +-------------------------------------- */ +.adminhtml-urlrewrite-edit .field-url-rewrite-option-select .label { + width: auto; +} +/* + Shopping Cart Price Rule +-------------------------------------- */ +.fieldset .field-coupon_code, +.fieldset .field-rule_use_auto_generation { + margin-bottom: 0; +} +.field-rule_use_auto_generation .label { + margin-left: 5px; +} +.field-rule_use_auto_generation .nested { + margin-bottom: 29px; +} +/* + Product Image Placeholders +-------------------------------------- */ +#catalog_placeholder .input-file, +#catalog_placeholder .delete-image > input { + margin-right: 5px; +} +/* Permanent Redirect for old URL */ +.control > [name="product[url_key_create_redirect]"], +.control > [name="general[url_key_create_redirect]"] { + float: left; + margin: 8px 5px 0 0; +} +.control > [name="product[url_key_create_redirect]"] + .label, +.control > [name="general[url_key_create_redirect]"] + .label { + width: auto; +} +/* + New Product Attribute Set +-------------------------------------- */ +.field-skeleton_set .select { + width: 100%; +} +/* + Cache Management +-------------------------------------- */ +.additional-cache-management .label { + margin-top: 5px; +} +/* + Currency Symbols +-------------------------------------- */ +.adminhtml-system-currencysymbol-index th.col-symbol .required:after { + content: '*'; + margin-left: 3px; +} +.adminhtml-system-currencysymbol-index td.col-currency .label { + margin-top: 5px; +} +/* + Clearfix +-------------------------------------- */ +.order-gift-options:before, +.order-gift-options:after, +.image-panel:before, +.image-panel:after, +.images:before, +.images:after, +.tax-rate-popup .field:before, +.tax-rate-popup .field:after, +.clearfix:before, +.clearfix:after { + content: ""; + display: table; +} +.order-gift-options:after, +.image-panel:after, +.images:after, +.tax-rate-popup .field:after, +.clearfix:after { + clear: both; +} +/* + This file was created to debug old classes in order to indicate where we must replase it with new ones + The types of messages are generated in file: \app\code\core\Mage\Core\Block\Messages.php like $html .= '<' . $this->_messagesSecondLevelTagName . ' class="' . $type . '-msg">'; +-------------------------------------- */ +/* + All messages to identify and refactor: + +label.mage-error, +.notice, +.messages ul, +.messages li, +.messages ul li, +.error-msg, +.success-msg, +.notice-msg, +.warning-msg + +Done: +.notification-global +.notification-global-notice +-------------------------------------- */ +.debug { + border: 1px solid red !important; +} +.messages ul, +ul.messages { + list-style: none; + margin: 0; + padding: 0; +} +ul.messages > li { + margin: 20px 0; +} +ul.messages li li { + padding: 10px 26px 10px 35px; + border-radius: 5px; + color: #676056; + text-shadow: none; + position: relative; + background: #fffbf0; + border: 1px solid #d87e34; + margin-top: -1px; +} +ul.messages li li:first-child { + margin-top: 0; +} +ul.messages li li:before { + position: absolute; + left: 11px; + top: 50%; + margin-top: -11px; + background: none; + text-shadow: none; + width: auto; + height: auto; + border: 0; + font-family: 'MUI-Icons'; + font-style: normal; + speak: none; + font-weight: normal; + -webkit-font-smoothing: antialiased; + font-size: 16px; + content: '\e046'; + /* icon-info */ + + color: #d87e34; +} +ul.messages li.error-msg li { + color: #963535; + border-color: #963535; + background: #f3dcd8; +} +ul.messages li.error-msg li:before { + content: '\e069'; + color: #963535; +} +ul.messages li.success-msg li { + border-color: #ceceb6; + background: #e4eecb; + color: #185b00; +} +ul.messages li.success-msg li:before { + content: '\e067'; + color: #185b00; +} +/* + Accordion +------------------------*/ +.accordion { + margin: 0 0 8px; + padding: 0; +} +.accordion > dt, +.accordion > dd.open, +.accordion .collapseable, +.section-config.active > .collapseable + input + fieldset, +.accordion .collapseable.open + input + fieldset { + background: #fff; + border: 1px solid #eae6e0; + border-radius: 5px; + margin: 0 0 8px; + padding: 5px 18px 2px; + position: relative; +} +.accordion > dt + dd { + display: none; +} +.accordion > dt.open, +.section-config.active > .collapseable, +.accordion .collapseable.open { + margin: 0; + border-bottom: 0; + border-radius: 5px 5px 0 0; +} +.section-config.active > .collapseable + input + fieldset, +.accordion > dt + dd.open, +.accordion .collapseable.open + input + fieldset { + padding: 25px 18px 18px; + display: block; + border-top: 0; + border-radius: 0 0 5px 5px; +} +.section-config > .collapseable > a, +.accordion > dt a, +.accordion .collapseable > a { + color: #676056; + font-size: 20px; + font-weight: 400; + display: block; + padding: 7px 0 10px 22px; + text-decoration: none; + position: relative; + cursor: pointer; +} +.section-config > .collapseable > a i, +.accordion > dt a i, +.accordion .collapseable > a i { + color: #676056; + font-size: 20px; + font-style: italic; + font-weight: 400; +} +.section-config.active > .collapseable > a, +.accordion .collapseable.open a, +.accordion dt.open a { + border-bottom: 1px solid #ededed; +} +.section-config > .collapseable > a:before, +.accordion > dt a:before, +.accordion .collapseable > a:before { + position: absolute; + left: 0; + top: 7px; + font-family: 'MUI-Icons'; + font-style: normal; + speak: none; + font-weight: normal; + -webkit-font-smoothing: antialiased; + content: '\e02a'; + /* arrow right icon */ + + color: #b2b0ad; +} +.section-config.active > .collapseable > a:before, +.accordion > dt.open a:before, +.accordion .collapseable.open a:before { + content: '\e02c'; + /* arrow down icon */ + +} +.section-config > .collapseable > a:hover:before, +.accordion > dt a:hover:before, +.accordion .collapseable > a:hover:before { + color: #7e7e7e; +} +/* PayPal connected */ +.section-config.complex .section-config.with-button { + padding: 20px 15px; + margin: 0 -30px 0 -15px; + border-bottom: 1px solid #eae6e0; +} +.section-config.complex tr:last-child .section-config.with-button { + border-bottom: 0; +} +.section-config.complex .section-config.with-button > .entry-edit-head { + padding: 0; + padding-left: 25px; + border: 0; +} +.section-config.complex .section-config.with-button.enabled > .entry-edit-head:before { + content: "\e01e"; + color: #fff; + background: #65940a; + font-family: "MUI-Icons"; + font-weight: normal; + padding: 3px; + font-size: 10px; + width: 10px; + height: 10px; + line-height: 10px; + overflow: hidden; + border-radius: 8px; + display: block; + float: left; + margin-left: -25px; + margin-top: 0; +} +.section-config.complex .section-config.with-button > .config { + margin: 10px -10px; + border: 1px solid #d1d0ce; + border-radius: 5px; + padding: 5px 0; +} +.section-config.complex .section-config.with-button > .config > table > tbody > tr > td { + padding: 0; +} +.section-config.complex .section-config.with-button > .config > table > tbody > tr > td > .section-config > .entry-edit-head { + border: 0; + border-radius: 0; + margin-bottom: 0; + padding: 5px 10px 2px; + border-bottom: 1px solid #d1d0ce; + background: transparent; +} +.section-config.complex .section-config.with-button > .config > table > tbody > tr:last-child > td > .section-config > .entry-edit-head { + border: 0; +} +.section-config.complex .section-config.with-button > .config > table > tbody > tr > td > .section-config > .entry-edit-head a { + border-bottom: 0; +} +.section-config.complex .section-config.with-button > .config > table > tbody > tr > td > .section-config > .config { + border: 0; + border-bottom: 1px solid #d1d0ce; + border-radius: 0; + margin: 0; + padding-bottom: 50px; +} +.section-config.complex .section-config.with-button > .config > table > tbody > tr:last-child > td > .section-config > .config { + border-bottom: 0; +} +.section-config .config h4 { + padding-left: 25%; + font-size: 18px; +} +.section-config .config td.label label.enabled:before { + content: "\e01e"; + color: #fff; + background: #65940a; + font-family: "MUI-Icons"; + font-weight: normal; + padding: 3px; + font-size: 10px; + width: 10px; + height: 10px; + line-height: 10px; + overflow: hidden; + border-radius: 8px; + display: block; + float: left; + margin-right: 5px; +} +.section-config.complex .section-config.with-button > .config:before { + content: ''; + height: 9px; + width: 20px; + overflow: hidden; + display: block; + position: absolute; + bottom: 100%; + left: 50%; + zoom: 1; + z-index: 2; + margin-left: -10px; + background: url(../images/subconfig-bg.png) no-repeat 0 0; +} +.section-config.config-advanced { + padding: 30px 0 0; +} +.section-config.config-advanced > .entry-edit-head { + border: 0; + padding: 0; + padding-left: 25%; +} +.section-config.config-advanced > .entry-edit-head a { + border: 0 !important; +} +.section-config.config-advanced > .config { + padding-left: 0!important; + padding-right: 0!important; + border: 0!important; + border-radius: 0!important; +} +.section-config.config-advanced > .entry-edit-head a { + margin-left: -22px; +} +.section-config.with-button .config-heading strong { + display: block; + color: #676056; + font-size: 14px; + font-weight: 700; + margin-bottom: 5px; +} +.section-config.with-button .config-heading .button-container { + margin: 15px 0 0; +} +.section-config.with-button .button-container { + line-height: 28px; +} +.section-config.with-button .button-container a { + margin-left: 20px; +} +.section-config.with-button .action-configure span { + display: block; + position: relative; + text-align: center; +} +.section-config.with-button .action-configure .state-opened { + visibility: hidden; + height: 0; + overflow: hidden; +} +.section-config.with-button .action-configure.open .state-opened { + visibility: visible; + height: auto; + overflow: auto; +} +.section-config.with-button .action-configure.open .state-closed { + visibility: hidden; + height: 0; + overflow: hidden; +} +.accordion > dt + dd { + display: none; +} +.accordion > dt + .open:empty { + background: #ffffff url(../mui/images/ajax-loader-big.gif) no-repeat center; + height: 100px; +} +/* TODO: arrange configuration tables */ +.accordion .collapseable.disabled { + background: #f1f1f1; +} +.accordion .collapseable.disabled > a { + cursor: not-allowed; +} +.accordion .collapseable.disabled > a:before { + content: ''; +} +.accordion .config { + border: 0; +} +.accordion .config .comment a { + color: #007dbd; + font-size: 14px; + font-weight: 400; +} +.accordion .config .comment a:focus, +.accordion .config .comment a:hover { + text-decoration: underline; +} +.accordion .config legend { + display: none; +} +.eq-ie8 .accordion .config legend { + position: absolute; + left: -999em; + display: block; + width: 0; + height: 0; + padding: 0; + margin: 0; + overflow: hidden; +} +.accordion .config table { + width: 100%; +} +.accordion .config .label { + float: none; + width: 25%; + text-align: right; + color: #676056; + font-size: 13px; + font-weight: 600; +} +.accordion .config .value .label { + padding: 6px 5px 0 15px; + vertical-align: top; + width: auto; +} +.accordion .config .value .label:first-child { + padding-left: 0; +} +.accordion .config .label label { + padding-top: 6px; +} +.accordion .config td { + background: none; + border: 0; + padding: 8px 15px 0 0; + vertical-align: top; +} +.accordion .paypal-selection-simplified { + padding-left: 30px; +} +.accordion .paypal-selection input[type="checkbox"] { + margin: -4px 7px 0 0; +} +.accordion .config input[type="text"], +.accordion .config input[type="password"], +.accordion .config select, +.accordion .config textarea { + width: 100%; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} +.accordion .config input.input-file { + margin-top: 4px; +} +.accordion .config select.select-date { + width: 20%; +} +.accordion .config .value { + width: 50%; + padding-right: 40px; +} +.accordion .config .value.with-tooltip { + padding-top: 5px; +} +.accordion .config .value.with-tooltip .tooltip { + position: relative; + top: 0; + left: 0; + right: 0; + bottom: 0; + margin: 0; + float: right; + margin-right: -20px; + margin-top: 6px; +} +.accordion .config .value.with-tooltip .tooltip-content { + padding: 15px; + right: 0; + margin-left: 0; + margin-right: -19px; + margin-bottom: 10px; + left: auto; + top: auto; + bottom: 100%; + width: 400px; + max-width: 400px; + line-height: 1.333; +} +.accordion .config .value.with-tooltip .tooltip-content:before { + content: ''; + position: absolute; + width: 0; + height: 0; + top: auto; + bottom: -5px; + left: auto; + right: 20px; + border-left: 5px solid transparent; + border-right: 5px solid transparent; + border-top: 5px solid #000; + border-bottom: 0; + opacity: .8; +} +.accordion .config .value.with-tooltip .help { + position: relative; + width: auto; + margin: 0; +} +.accordion .config .scope-label { + color: #999; + font-size: 12px; + letter-spacing: 0.05em; + padding: 15px 15px 0 0; +} +.accordion .config .note { + color: #676056; + font-size: 12px; + font-weight: 400; + padding-left: 15px; + margin: 5px 0; +} +.accordion .config .note a { + color: #007dbd; + font-size: 12px; + font-weight: 400; +} +.accordion .config .note a:focus, +.accordion .config .note a:hover { + text-decoration: underline; +} +.accordion .config .note:before { + position: absolute; + margin: 4px 0 0 -14px; + content: ''; + display: inline-block; + vertical-align: top; + font-size: 0; + line-height: 0; + width: 0; + border-bottom: 5px solid #666; + border-left: 5px solid transparent; + border-right: 5px solid transparent; +} +.accordion .config .system-tooltip-box { + position: absolute; +} +.accordion .paypal-selection { + margin: 10px; + width: 98%; +} +.accordion .paypal-selection th { + padding: 6px 10px 7px; +} +.accordion .paypal-selection { + border-bottom: 2px solid #c0bbaf; +} +.accordion .paypal-payment-notice { + margin: 10px; +} +.accordion .custom-options { + border: 1px solid #999; + padding: 0 10px; + margin: 0 0 20px; +} +/* TODO: arrange range inputs width in tables */ +.grid td input.input-text-range { + width: 35%; +} +.grid td input.input-text-range-date { + width: 31%; +} +/* TODO: styles for required TH fields */ +th.required:after { + color: red; + content: "*"; + margin-left: 5px; +} +/* TODO: set color for messages in Cache Storage Management */ +.grid-severity-critical, +.grid-severity-major, +.grid-severity-notice, +.grid-severity-minor { + display: block; + border: 1px solid #c76f35; + background: #fffbf0; + text-align: center; +} +.grid-severity-critical { + border-color: #6e1313; + background: #f7bfbf; + color: #6e1313; +} +.grid-severity-major { + border-color: #963535; + background: #f3dcd8; + color: #963535; +} +.grid-severity-notice { + border-color: #185b00; + background: #e6ecc0; + color: #185b00; +} +/* + Sales +-------------------------------------- */ +.order-items .entry-edit-head .form-buttons { + float: right; +} +.order-items .entry-edit-head .icon-head { + display: inline; +} +.order-items .entry-edit-head { + margin-bottom: 20px; +} +.order-items .entry-edit-head:before, +.order-items .entry-edit-head:after { + content: ""; + display: table; +} +.order-items .entry-edit-head:after { + clear: both; +} +/* + Import-export tax rates +-------------------------------------- */ +.import-export-tax-rates input[type=file] { + margin-right: 10px; +} +.import-tax-rates, +.export-tax-rates { + float: left; + width: 48.9362%; +} +.export-tax-rates { + margin-left: 2.12766%; +} +.import-export-tax-rates:before, +.import-export-tax-rates:after { + content: ""; + display: table; +} +.import-export-tax-rates:after { + clear: both; +} +/* + Product +-------------------------------------- */ +.tier { + margin: 20px 0 0; +} +/* + Edit attribute set +-------------------------------------- */ +.attribute-set-col { + display: block; + float: left; + width: 100%; + margin-left: 2.127659574%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + -ms-box-sizing: border-box; + box-sizing: border-box; + width: 31.9149%; +} +.attribute-set-col:first-child { + margin-left: 0; +} +.attribute-set-tree { + margin-top: 5px; + overflow: auto; + height: 400px; + width: 100%; +} +.attribute-set:before, +.attribute-set:after { + content: ""; + display: table; +} +.attribute-set:after { + clear: both; +} +/* + Manage Categories +-------------------------------------- */ +.catalog-category-edit .category-edit-title { + float: left; +} +/* + Catalog Price Rule +-------------------------------------- */ +.rule-tree-wrapper { + line-height: 28px; +} +.rule-tree ul { + list-style: none; + padding-left: 16px; + border-left: dotted 1px #888; +} +.rule-tree li { + margin: 0 0 10px; +} +.rule-tree .x-tree ul { + padding-left: 0 !important; + border-left: none !important; +} +.rule-param .label { + color: #000; + float: none; + text-align: left; + padding: 0; + vertical-align: baseline; + width: auto; +} +.rule-param .label-disabled { + color: #eee; + cursor: default; + text-decoration: none; +} +.rule-chooser, +.rule-param .element, +.rule-param-edit .label { + display: none; +} +.rule-param input, +.rule-param select { + width: auto !important; + margin: 0; + min-width: 170px; +} +.rule-param-edit .element { + display: inline; +} +.rule-param-edit .element .addafter { + padding-left: 5px; +} +[class^="rule-param-"] img, +.rule-chooser-trigger img { + vertical-align: middle; +} +.rule-chooser { + border: solid 1px #CCC; + margin: 20px; + padding: 15px 10px 5px; +} +.rule-param-wait { + background: url(../mui/images/ajax-loader-small.gif) no-repeat left center; + padding-left: 20px; +} +/* + + URL Rewrite +-------------------------------------- */ +.field-url-rewrite-option-select { + padding-top: 13px; +} +/* jstree */ +.jstree-default .disabled > a { + color: #a29c94; +} +/* File brouser */ diff --git a/app/design/adminhtml/magento_backend/js/antiscroll.js b/app/design/adminhtml/magento_backend/js/antiscroll.js deleted file mode 100644 index bfbe47fbe5b60b5ba43b0cab782c0a4813faa045..0000000000000000000000000000000000000000 --- a/app/design/adminhtml/magento_backend/js/antiscroll.js +++ /dev/null @@ -1,463 +0,0 @@ -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ - -(function ($) { - - /** - * Augment jQuery prototype. - */ - - $.fn.antiscroll = function (options) { - return this.each(function () { - if ($(this).data('antiscroll')) { - $(this).data('antiscroll').destroy(); - } - - $(this).data('antiscroll', new $.Antiscroll(this, options)); - }); - }; - - /** - * Expose constructor. - */ - - $.Antiscroll = Antiscroll; - - /** - * Antiscroll pane constructor. - * - * @param {Element|jQuery} main pane - * @parma {Object} options - * @api public - */ - - function Antiscroll (el, opts) { - this.el = $(el); - this.options = opts || {}; - - this.x = false !== this.options.x; - this.y = false !== this.options.y; - this.padding = undefined == this.options.padding ? 2 : this.options.padding; - - this.inner = this.el.find('.antiscroll-inner'); - /*this.inner.css({ - 'width': '+=' + scrollbarSize() - , 'height': '+=' + scrollbarSize() - });*/ - - this.refresh(); - }; - - /** - * refresh scrollbars - * - * @api public - */ - - Antiscroll.prototype.refresh = function() { - var needHScroll = this.inner.get(0).scrollWidth > this.el.width() - , needVScroll = this.inner.get(0).scrollHeight > this.el.height(); - - if (!this.horizontal && needHScroll && this.x) { - this.horizontal = new Scrollbar.Horizontal(this); - } else if (this.horizontal && !needHScroll) { - this.horizontal.destroy(); - this.horizontal = null - } - - if (!this.vertical && needVScroll && this.y) { - this.vertical = new Scrollbar.Vertical(this); - } else if (this.vertical && !needVScroll) { - this.vertical.destroy(); - this.vertical = null - } - }; - - /** - * Cleans up. - * - * @return {Antiscroll} for chaining - * @api public - */ - - Antiscroll.prototype.destroy = function () { - if (this.horizontal) { - this.horizontal.destroy(); - } - if (this.vertical) { - this.vertical.destroy(); - } - return this; - }; - - /** - * Rebuild Antiscroll. - * - * @return {Antiscroll} for chaining - * @api public - */ - - Antiscroll.prototype.rebuild = function () { - this.destroy(); - this.inner.attr('style', ''); - Antiscroll.call(this, this.el, this.options); - return this; - }; - - /** - * Scrollbar constructor. - * - * @param {Element|jQuery} element - * @api public - */ - - function Scrollbar (pane) { - this.pane = pane; - this.pane.el.append(this.el); - this.innerEl = this.pane.inner.get(0); - - this.dragging = false; - this.enter = false; - this.shown = false; - - // hovering - this.pane.el.mouseenter($.proxy(this, 'mouseenter')); - this.pane.el.mouseleave($.proxy(this, 'mouseleave')); - - // dragging - this.el.mousedown($.proxy(this, 'mousedown')); - - // scrolling - this.pane.inner.scroll($.proxy(this, 'scroll')); - - // wheel -optional- - this.pane.inner.bind('mousewheel', $.proxy(this, 'mousewheel')); - - // show - var initialDisplay = this.pane.options.initialDisplay; - - if (initialDisplay !== false) { - this.show(); - this.hiding = setTimeout($.proxy(this, 'hide'), parseInt(initialDisplay, 10) || 3000); - } - }; - - /** - * Cleans up. - * - * @return {Scrollbar} for chaining - * @api public - */ - - Scrollbar.prototype.destroy = function () { - this.el.remove(); - return this; - }; - - /** - * Called upon mouseenter. - * - * @api private - */ - - Scrollbar.prototype.mouseenter = function () { - this.enter = true; - this.show(); - }; - - /** - * Called upon mouseleave. - * - * @api private - */ - - Scrollbar.prototype.mouseleave = function () { - this.enter = false; - - if (!this.dragging) { - this.hide(); - } - } - - /** - * Called upon wrap scroll. - * - * @api private - */ - - Scrollbar.prototype.scroll = function () { - if (!this.shown) { - this.show(); - if (!this.enter && !this.dragging) { - this.hiding = setTimeout($.proxy(this, 'hide'), 1500); - } - } - - this.update(); - }; - - /** - * Called upon scrollbar mousedown. - * - * @api private - */ - - Scrollbar.prototype.mousedown = function (ev) { - ev.preventDefault(); - - this.dragging = true; - - this.startPageY = ev.pageY - parseInt(this.el.css('top'), 10); - this.startPageX = ev.pageX - parseInt(this.el.css('left'), 10); - - // prevent crazy selections on IE - document.onselectstart = function () { return false; }; - - var pane = this.pane - , move = $.proxy(this, 'mousemove') - , self = this - - $(document) - .mousemove(move) - .mouseup(function () { - self.dragging = false; - document.onselectstart = null; - - $(document).unbind('mousemove', move); - - if (!self.enter) { - self.hide(); - } - }) - }; - - /** - * Show scrollbar. - * - * @api private - */ - - Scrollbar.prototype.show = function (duration) { - if (!this.shown) { - this.update(); - this.el.addClass('antiscroll-scrollbar-shown'); - if (this.hiding) { - clearTimeout(this.hiding); - this.hiding = null; - } - this.shown = true; - } - }; - - /** - * Hide scrollbar. - * - * @api private - */ - - Scrollbar.prototype.hide = function () { - var autoHide = this.pane.options.autoHide; - if (autoHide !== false && this.shown) { - // check for dragging - this.el.removeClass('antiscroll-scrollbar-shown'); - this.shown = false; - } - }; - - /** - * Horizontal scrollbar constructor - * - * @api private - */ - - Scrollbar.Horizontal = function (pane) { - this.el = $('<div class="antiscroll-scrollbar antiscroll-scrollbar-horizontal">'); - Scrollbar.call(this, pane); - } - - /** - * Inherits from Scrollbar. - */ - - inherits(Scrollbar.Horizontal, Scrollbar); - - /** - * Updates size/position of scrollbar. - * - * @api private - */ - - Scrollbar.Horizontal.prototype.update = function () { - var paneWidth = this.pane.el.width() - , trackWidth = paneWidth - this.pane.padding * 2 - , innerEl = this.pane.inner.get(0) - - this.el - .css('width', trackWidth * paneWidth / innerEl.scrollWidth) - .css('left', trackWidth * innerEl.scrollLeft / innerEl.scrollWidth) - } - - /** - * Called upon drag. - * - * @api private - */ - - Scrollbar.Horizontal.prototype.mousemove = function (ev) { - var trackWidth = this.pane.el.width() - this.pane.padding * 2 - , pos = ev.pageX - this.startPageX - , barWidth = this.el.width() - , innerEl = this.pane.inner.get(0) - - // minimum top is 0, maximum is the track height - var y = Math.min(Math.max(pos, 0), trackWidth - barWidth) - - innerEl.scrollLeft = (innerEl.scrollWidth - this.pane.el.width()) - * y / (trackWidth - barWidth) - }; - - /** - * Called upon container mousewheel. - * - * @api private - */ - - Scrollbar.Horizontal.prototype.mousewheel = function (ev, delta, x, y) { - if ((x < 0 && 0 == this.pane.inner.get(0).scrollLeft) || - (x > 0 && (this.innerEl.scrollLeft + Math.ceil(this.pane.el.width()) - == this.innerEl.scrollWidth))) { - ev.preventDefault(); - return false; - } - }; - - /** - * Vertical scrollbar constructor - * - * @api private - */ - - Scrollbar.Vertical = function (pane) { - this.el = $('<div class="antiscroll-scrollbar antiscroll-scrollbar-vertical">'); - Scrollbar.call(this, pane); - }; - - /** - * Inherits from Scrollbar. - */ - - inherits(Scrollbar.Vertical, Scrollbar); - - /** - * Updates size/position of scrollbar. - * - * @api private - */ - - Scrollbar.Vertical.prototype.update = function () { - var paneHeight = this.pane.el.height() - , trackHeight = paneHeight - this.pane.padding * 2 - , innerEl = this.innerEl - - this.el - .css('height', trackHeight * paneHeight / innerEl.scrollHeight) - .css('top', trackHeight * innerEl.scrollTop / innerEl.scrollHeight) - }; - - /** - * Called upon drag. - * - * @api private - */ - - Scrollbar.Vertical.prototype.mousemove = function (ev) { - var paneHeight = this.pane.el.height() - , trackHeight = paneHeight - this.pane.padding * 2 - , pos = ev.pageY - this.startPageY - , barHeight = this.el.height() - , innerEl = this.innerEl - - // minimum top is 0, maximum is the track height - var y = Math.min(Math.max(pos, 0), trackHeight - barHeight) - - innerEl.scrollTop = (innerEl.scrollHeight - paneHeight) - * y / (trackHeight - barHeight) - }; - - /** - * Called upon container mousewheel. - * - * @api private - */ - - Scrollbar.Vertical.prototype.mousewheel = function (ev, delta, x, y) { - if ((y > 0 && 0 == this.innerEl.scrollTop) || - (y < 0 && (this.innerEl.scrollTop + Math.ceil(this.pane.el.height()) - == this.innerEl.scrollHeight))) { - ev.preventDefault(); - return false; - } - }; - - /** - * Cross-browser inheritance. - * - * @param {Function} constructor - * @param {Function} constructor we inherit from - * @api private - */ - - function inherits (ctorA, ctorB) { - function f() {}; - f.prototype = ctorB.prototype; - ctorA.prototype = new f; - }; - - /** - * Scrollbar size detection. - */ - - var size; - - function scrollbarSize () { - if (size === undefined) { - var div = $( - '<div style="width:50px;height:50px;overflow:hidden;' - + 'position:absolute;top:-200px;left:-200px;"><div style="height:100px;">' - + '</div>' - ); - - $('body').append(div); - - var w1 = $('div', div).innerWidth(); - div.css('overflow-y', 'scroll'); - var w2 = $('div', div).innerWidth(); - $(div).remove(); - - size = w1 - w2; - } - - return size; - }; - -})(jQuery); diff --git a/app/design/adminhtml/magento_backend/less/clearless/all.less b/app/design/adminhtml/magento_backend/less/clearless/all.less new file mode 100644 index 0000000000000000000000000000000000000000..5711be3aa7527738110861b9049df639508a9e3a --- /dev/null +++ b/app/design/adminhtml/magento_backend/less/clearless/all.less @@ -0,0 +1,35 @@ +///** +// * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. +// * +// * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) +// * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +// */ + +// ============================================== +// Handily import all ClearLess mixins +// ============================================== + +@import "settings"; +@import "typography"; +@import "resets"; +@import "helpers"; +@import "sprites"; +@import "icons"; +@import "arrows"; +@import "grids"; \ No newline at end of file diff --git a/app/design/adminhtml/magento_backend/less/clearless/arrows.less b/app/design/adminhtml/magento_backend/less/clearless/arrows.less new file mode 100644 index 0000000000000000000000000000000000000000..ec4f3a670802222bbfad1e0eba9a093ff8c21b90 --- /dev/null +++ b/app/design/adminhtml/magento_backend/less/clearless/arrows.less @@ -0,0 +1,171 @@ +///** +// * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. +// * +// * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) +// * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +// */ + +.arrow(@pos, @size, @bg-color) { + width: 0; + height: 0; + border: @size solid transparent; + ._abbor_el( @pos, @bg-color ); +} + +.arrowbox(@pos, @size, @bg-color, @offset:50%) { + + @after-margin: @size * -1px; + + position: relative; + background: @bg-color; + + &:after, + &:before { + ._abpos(@pos); + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; + pointer-events: none; + } + + &:after { + border-color: transparent; + ._abbor_el(@pos, @bg-color); + border-width: @size; + ._abpos_el(@pos, @size, @offset); + ._abmar_el(@pos, @after-margin); + } + +} + +.arrowbox(@pos, @size, @bg-color, @border-width, @border-color, @offset:50%) { + + @before-margin: (@size + round(@border-width * 1.41421356)) * -1px; + + .arrowbox(@pos, @size, @bg-color, @offset); + + border: @border-width solid @border-color; + + &:before { + border-color: transparent; + ._abbor_el(@pos, @border-color); + border-width: @before-margin * -1; + ._abpos_el(@pos, @size, @offset); + ._abmar_el(@pos, @before-margin); + } + +} + +._abpos( @pos ) when ( @pos = left ) { + right: 100%; +} + +._abpos( @pos ) when ( @pos = right ) { + left: 100%; +} + +._abpos( @pos ) when ( @pos = up ) { + bottom: 100%; +} + +._abpos( @pos ) when ( @pos = down ) { + top: 100%; +} + +._abpos_el( @pos, @size, @offset ) when ( @offset = 0 ) and ( @pos = left ) { + top: @size; +} + +._abpos_el( @pos, @size, @offset ) when ( @offset = 0 ) and ( @pos = right ) { + top: @size; +} + +._abpos_el( @pos, @size, @offset ) when ( @offset = 0 ) and ( @pos = up ) { + left: @size; +} + +._abpos_el( @pos, @size, @offset ) when ( @offset = 0 ) and ( @pos = down ) { + left: @size; +} + +._abpos_el( @pos, @size, @offset ) when not ( @offset = 0 ) and not ( ispixel(@offset) ) and ( @pos = left ) { + top: @offset; +} + +._abpos_el( @pos, @size, @offset ) when not ( @offset = 0 ) and not ( ispixel(@offset) ) and ( @pos = right ) { + top: @offset; +} + +._abpos_el( @pos, @size, @offset ) when not ( @offset = 0 ) and not ( ispixel(@offset) ) and ( @pos = up ) { + left: @offset; +} + +._abpos_el( @pos, @size, @offset ) when not ( @offset = 0 ) and not ( ispixel(@offset) ) and ( @pos = down ) { + left: @offset; +} + +._abpos_el( @pos, @size, @offset ) when not ( @offset = 0 ) and ( ispixel(@offset) ) and ( @pos = left ) { + top: @offset + @size; +} + +._abpos_el( @pos, @size, @offset ) when not ( @offset = 0 ) and ( ispixel(@offset) ) and ( @pos = right ) { + top: @offset + @size; +} + +._abpos_el( @pos, @size, @offset ) when not ( @offset = 0 ) and ( ispixel(@offset) ) and ( @pos = up ) { + left: @offset + @size; +} + +._abpos_el( @pos, @size, @offset ) when not ( @offset = 0 ) and ( ispixel(@offset) ) and ( @pos = down ) { + left: @offset + @size; +} + +._abbor_el( @pos, @color ) when ( @pos = left ) { + border-right-color: @color; +} + +._abbor_el( @pos, @color ) when ( @pos = right ) { + border-left-color: @color; +} + +._abbor_el( @pos, @color ) when ( @pos = up ) { + border-bottom-color: @color; +} + +._abbor_el( @pos, @color ) when ( @pos = down ) { + border-top-color: @color; +} + +._abmar_el( @pos, @margin ) when ( @pos = left ) { + margin-top: @margin; +} + +._abmar_el( @pos, @margin ) when ( @pos = right ) { + margin-top: @margin; +} + +._abmar_el( @pos, @margin ) when ( @pos = up ) { + margin-left: @margin; +} + +._abmar_el( @pos, @margin ) when ( @pos = down ) { + margin-left: @margin; +} diff --git a/app/design/adminhtml/magento_backend/less/clearless/grids.less b/app/design/adminhtml/magento_backend/less/clearless/grids.less new file mode 100644 index 0000000000000000000000000000000000000000..8cb84913c931f0687bbe88dc77c1fc2e952fabf7 --- /dev/null +++ b/app/design/adminhtml/magento_backend/less/clearless/grids.less @@ -0,0 +1,185 @@ +///** +// * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. +// * +// * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) +// * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +// */ + +// ============================================== +// Grid mixins +// ============================================== + +// You shouldn't need to touch this! Internal use only. +@column-width: 1; +@total-columns: 1; +@gutter-width: 1; +@grid-width: (@column-width*@total-columns) + (@gutter-width*(@total-columns - 1)); + +.column-wrapper() { + width: 100%; +} + +.inline-column-wrapper() when not (@using-ieclasses) { + letter-spacing: -0.31em; + *letter-spacing: normal; + word-spacing: -0.43em; +} + +.inline-column-wrapper() when (@using-ieclasses) { + letter-spacing: -0.31em; + word-spacing: -0.43em; + .ie7 & { + letter-spacing: normal; + } +} + +.column() { + float: left; + .column-gutter(); +} + +.column( @span ) when (@span = false) { + float: left; +} + +.column( @span, @total-columns:@total-columns, @end-column:false ) when (isnumber(@span)) and (isnumber(@total-columns)) and not (isnumber(@end-column)) { + @showgutter: false; + .column(@showgutter); + .span( @span, @total-columns ); +} + +.column( @span, @total-columns:@total-columns, @end-column:false ) when (isnumber(@span)) and (isnumber(@total-columns)) and (@end-column = true) { + @showgutter: false; + .column(@showgutter); + .span( @span, @total-columns ); + .end-column(); +} + +.column( @span, @end-column ) when (isnumber(@span)) and not (isnumber(@end-column)) { + @showgutter: false; + .column(@showgutter); + .span( @span ); +} + +.column( @span, @end-column ) when (isnumber(@span)) and ( @end-column = true ) { + @showgutter: false; + .column(@showgutter); + .span( @span ); + .end-column(); +} + +.inline-column() { + .inline-block(); + vertical-align: top; + letter-spacing: normal; + word-spacing: normal; + .column-gutter(); +} + +.inline-column( @span ) when (@span = false) { + .inline-block(); + vertical-align: top; + letter-spacing: normal; + word-spacing: normal; +} + +.inline-column( @span, @total-columns:@total-columns, @end-column:false ) when (isnumber(@span)) and (isnumber(@total-columns)) { + @showgutter: false; + .inline-column(@showgutter); + .span( @span, @total-columns ); +} + +.inline-column( @span, @total-columns:@total-columns, @end-column:false ) when (isnumber(@span)) and (@end-column = true) { + @showgutter: false; + .inline-column(@showgutter); + .span( @span, @total-columns ); + .inline-end-column(); +} + +.inline-column( @span, @end-column ) when not (isnumber(@end-column)) { + @showgutter: false; + .inline-column(@showgutter); + .span( @span ); +} + +.inline-column( @span, @end-column ) when (@end-column = true) { + @showgutter: false; + .inline-column(@showgutter); + .span( @span ); + .inline-end-column(); +} + +.end-column() { + margin-right: 0; + float: right; +} + +.inline-end-column() { + margin-right: 0; +} + +.span( @span ) { + .column-width(@span, @total-columns); +} + +.span( @span, @total-columns ) when (isnumber(@total-columns)) { + .column-width(@span, @total-columns); + .column-gutter(@total-columns); +} + +.pre-pad( @span, @total-columns:@total-columns ) { + @calc-column-width: 100%*((((@gutter-width+@column-width)*@span)) / @grid-width); + padding-left: @calc-column-width; +} + +.post-pad( @span, @total-columns:@total-columns ) { + @calc-column-width: 100%*((((@gutter-width+@column-width)*@span)) / @grid-width); + padding-right: @calc-column-width; +} + +.pre-push( @span, @total-columns:@total-columns ) { + @calc-column-width: 100%*((((@gutter-width+@column-width)*@span)) / @grid-width); + margin-left: @calc-column-width; +} + +.post-push( @span, @total-columns:@total-columns ) { + @calc-column-width: 100%*((((@gutter-width+@column-width)*@span)+@gutter-width) / @grid-width); + margin-right: @calc-column-width; +} + +.post-push-end( @span, @total-columns:@total-columns ) { + @calc-column-width: 100%*((((@gutter-width+@column-width)*@span)) / @grid-width); + margin-right: @calc-column-width; +} + +.column-width(@span, @total-columns:@total-columns) { + @calc-column-width: 100%*((((@gutter-width+@column-width)*@span)-@gutter-width) / @grid-width); + width: @calc-column-width; +} + +.column-gutter(@total-columns:@total-columns, @end-column:false) when (@end-column) { + margin-right: 0; +} + +.column-gutter(@total-columns:@total-columns, @end-column:false) when not (@end-column) { + @calc-gutter-width: 100%*(@gutter-width/@grid-width); + margin-right: @calc-gutter-width; +} + + diff --git a/app/design/adminhtml/magento_backend/less/clearless/helpers.less b/app/design/adminhtml/magento_backend/less/clearless/helpers.less new file mode 100644 index 0000000000000000000000000000000000000000..48da878ffd013dc02c1cf6bd1fdcaadbadd104af --- /dev/null +++ b/app/design/adminhtml/magento_backend/less/clearless/helpers.less @@ -0,0 +1,247 @@ +///** +// * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. +// * +// * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) +// * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +// */ + +// ============================================== +// Misc helpers and shortcuts +// ============================================== + +// Shortcuts -------------------------------- + +.border-radius(@radius:5px) { + -webkit-border-radius: @arguments; + -moz-border-radius: @arguments; + border-radius: @arguments; +} + +.box-sizing(@type: border-box) { + -moz-box-sizing: @type; + -webkit-box-sizing: @type; + -ms-box-sizing: @type; + box-sizing: @type; +} + +.box-shadow(@shadow: 1px 1px 2px rgba(0,0,0,0.25)) { + -webkit-box-shadow: @shadow; + -moz-box-shadow: @shadow; + box-shadow: @shadow; +} + +.filter(@filter: grayscale(100%)) { + -webkit-filter: @filter; + -moz-filter: @filter; + -ms-filter: @filter; + -o-filter: @filter; + filter: @filter; +} + +.transition(@transition) { + -webkit-transition: @transition; + -moz-transition: @transition; + transition: @transition; +} + +.rotate(@rotation) { + -webkit-transform: rotate(@rotation); + -moz-transform: rotate(@rotation); + -o-transform: rotate(@rotation); + transform: rotate(@rotation); +} + +.placeholder(@color: #DDD) { + :-moz-placeholder { + color: @color; + } + ::-webkit-input-placeholder { + color: @color; + } +} + +#gradient { + .horizontal (@start-color, @end-color) when not (@disable-filters) { + background-color: @end-color; + background-repeat: repeat-x; + background-image: -khtml-gradient(linear, left top, right top, from(@start-color), to(@end-color)); /* Konqueror */ + background-image: -moz-linear-gradient(left, @start-color, @end-color); /* FF 3.6+ */ + background-image: -ms-linear-gradient(left, @start-color, @end-color); /* IE10 */ + background-image: -webkit-gradient(linear, left top, right top, color-stop(0%, @start-color), color-stop(100%, @end-color)); /* Safari 4+, Chrome 2+ */ + background-image: -webkit-linear-gradient(left, @start-color, @end-color); /* Safari 5.1+, Chrome 10+ */ + background-image: -o-linear-gradient(left, @start-color, @end-color); /* Opera 11.10 */ + background-image: -ms-linear-gradient(left, @start-color 0%, @end-color 100%); /* IE10+ */ + background-image: linear-gradient(left, @start-color, @end-color); /* the standard */ + filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",@start-color,@end-color)); /* IE6 & IE7 */ + -ms-filter: %("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",@start-color,@end-color); /* IE8+ */ + } + .horizontal (@start-color, @end-color) when (@disable-filters) { + background-color: @end-color; + background-repeat: repeat-x; + background-image: -khtml-gradient(linear, left top, right top, from(@start-color), to(@end-color)); /* Konqueror */ + background-image: -moz-linear-gradient(left, @start-color, @end-color); /* FF 3.6+ */ + background-image: -ms-linear-gradient(left, @start-color, @end-color); /* IE10 */ + background-image: -webkit-gradient(linear, left top, right top, color-stop(0%, @start-color), color-stop(100%, @end-color)); /* Safari 4+, Chrome 2+ */ + background-image: -webkit-linear-gradient(left, @start-color, @end-color); /* Safari 5.1+, Chrome 10+ */ + background-image: -o-linear-gradient(left, @start-color, @end-color); /* Opera 11.10 */ + background-image: -ms-linear-gradient(left, @start-color 0%, @end-color 100%); /* IE10+ */ + background-image: linear-gradient(left, @start-color, @end-color); /* the standard */ + } + .vertical (@start-color, @end-color) when (@disable-filters) { + background-color: @end-color; + background-repeat: repeat-x; + background-image: -khtml-gradient(linear, left top, left bottom, from(@start-color), to(@end-color)); /* Konqueror */ + background-image: -moz-linear-gradient(@start-color, @end-color); /* FF 3.6+ */ + background-image: -ms-linear-gradient(@start-color, @end-color); /* IE10 */ + background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, @start-color), color-stop(100%, @end-color)); /* Safari 4+, Chrome 2+ */ + background-image: -webkit-linear-gradient(@start-color, @end-color); /* Safari 5.1+, Chrome 10+ */ + background-image: -o-linear-gradient(@start-color, @end-color); /* Opera 11.10 */ + background-image: -ms-linear-gradient(top, @start-color 0%, @end-color 100%); /* IE10+ */ + background-image: linear-gradient(@start-color, @end-color); /* the standard */ + } + .vertical (@start-color, @end-color) when not (@disable-filters) { + background-color: @end-color; + background-repeat: repeat-x; + background-image: -khtml-gradient(linear, left top, left bottom, from(@start-color), to(@end-color)); /* Konqueror */ + background-image: -moz-linear-gradient(@start-color, @end-color); /* FF 3.6+ */ + background-image: -ms-linear-gradient(@start-color, @end-color); /* IE10 */ + background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, @start-color), color-stop(100%, @end-color)); /* Safari 4+, Chrome 2+ */ + background-image: -webkit-linear-gradient(@start-color, @end-color); /* Safari 5.1+, Chrome 10+ */ + background-image: -o-linear-gradient(@start-color, @end-color); /* Opera 11.10 */ + background-image: -ms-linear-gradient(top, @start-color 0%, @end-color 100%); /* IE10+ */ + background-image: linear-gradient(@start-color, @end-color); /* the standard */ + filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",@start-color,@end-color)); /* IE6 & IE7 */ + -ms-filter: %("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",@start-color,@end-color); /* IE8+ */ + } +} + +// Helpers -------------------------------- + +.clearfix() when not (@using-ieclasses) { + &:before, + &:after { + content: ""; + display: table; + } + &:after { + clear: both; + } + *zoom: 1; +} + +.clearfix() when (@using-ieclasses) { + &:before, + &:after { + content: ""; + display: table; + } + &:after { + clear: both; + } + .ie6 &, .ie7 & { + zoom: 1; + } +} + +.inline-block() when (@using-ieclasses) { + display: inline-block; + .ie7 & { + display: inline; + zoom: 1; + } +} + +.inline-block() when not (@using-ieclasses) { + display: inline-block; + *display: inline; + *zoom: 1; +} + +.ir() { + border: 0; + font: 0/0 a; + text-shadow: none; + color: transparent; + background-color: transparent; +} + +.hidden() { + display: none !important; + visibility: hidden; +} + +.visually-hidden() { + border: 0; + clip: rect(0 0 0 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; + &.focusable:active, + &.focusable:focus { + clip: auto; + height: auto; + margin: 0; + overflow: visible; + position: static; + width: auto; + } +} + +.size(@thesize) { + width: @thesize; + height: @thesize; +} + +.size(@width, @height) { + width: @width; + height: @height; +} + +// System -------------------------------- + +.nudge-l( @pos ) when ( @pos = 0 ) { +} + +.nudge-l( @pos ) when not ( @pos = 0 ) { + left: @pos; +} + +.nudge-r( @pos ) when ( @pos = 0 ) { +} + +.nudge-r( @pos ) when not ( @pos = 0 ) { + right: @pos; +} + +.nudge-t( @pos ) when ( @pos = 0 ) { +} + +.nudge-t( @pos ) when not ( @pos = 0 ) { + top: @pos; +} + +.nudge-b( @pos ) when ( @pos = 0 ) { +} + +.nudge-b( @pos ) when not ( @pos = 0 ) { + bottom: @pos; +} diff --git a/app/design/adminhtml/magento_backend/less/clearless/icons.less b/app/design/adminhtml/magento_backend/less/clearless/icons.less new file mode 100644 index 0000000000000000000000000000000000000000..911fd9c297175c2b021e69d7365efaca5f55eff5 --- /dev/null +++ b/app/design/adminhtml/magento_backend/less/clearless/icons.less @@ -0,0 +1,326 @@ +///** +// * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. +// * +// * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) +// * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +// */ + +// ============================================== +// Generated content icon helpers +// ---------------------------------------------- +// These can only be used on block or inline-block elements. +// ============================================== + +// Non-sprited icons -------------------------------- + +.prepend-icon( @icon-image, @width, @height, @nudge-left:0, @nudge-top:0, @pad:10px ) when (@using-modernizr) { + .generatedcontent & { + position: relative; + padding-left: @width + @pad; + } + .generatedcontent &:before { + ._generated-icon( @width, @height, @icon-image ); + top: @nudge-top; + left: @nudge-left; + } +} + +.prepend-icon( @icon-image, @width, @height, @nudge-left:0, @nudge-top:0, @pad:10px ) when not (@using-modernizr) { + position: relative; + padding-left: @width + @pad; + &:before { + ._generated-icon( @width, @height, @icon-image ); + top: @nudge-top; + left: @nudge-left; + } +} + +.append-icon( @icon-image, @width, @height, @nudge-right:0, @nudge-top:0, @pad:10px ) when (@using-modernizr) { + .generatedcontent & { + position: relative; + padding-right: @width + @pad; + } + .generatedcontent &:after { + ._generated-icon( @width, @height, @icon-image ); + top: @nudge-top; + right: @nudge-right; + } +} + +.append-icon( @icon-image, @width, @height, @nudge-right:0, @nudge-top:0, @pad:10px ) when not (@using-modernizr) { + position: relative; + padding-right: @width + @pad; + .generatedcontent &:after { + ._generated-icon( @width, @height, @icon-image ); + top: @nudge-top; + right: @nudge-right; + } +} + +// Sprited icons -------------------------------- + +.prepend-sprite-icon(@x, @y, @width, @height, @nudge-left:0, @nudge-top:0, @pad:10px, @sprite-image:@sprite-image, @sprite-grid:@sprite-grid) when (@using-modernizr) { + .generatedcontent & { + position: relative; + padding-left: @width + @pad; + } + .generatedcontent &:before { + ._generated-sprite-icon( @x, @y, @width, @height, @sprite-image, @sprite-grid ); + top: @nudge-top; + left: @nudge-left; + } +} + +.prepend-sprite-icon(@x, @y, @width, @height, @nudge-left:0, @nudge-top:0, @pad:10px, @sprite-image:@sprite-image, @sprite-grid:@sprite-grid) when not (@using-modernizr) { + position: relative; + padding-left: @width + @pad; + &:before { + ._generated-sprite-icon( @x, @y, @width, @height, @sprite-image, @sprite-grid ); + top: @nudge-top; + left: @nudge-left; + } +} + +.append-sprite-icon(@x, @y, @width, @height, @nudge-right:0, @nudge-top:0, @pad:10px, @sprite-image:@sprite-image, @sprite-grid:@sprite-grid) when (@using-modernizr) { + .generatedcontent & { + padding-right: @width + @pad; + position: relative; + } + .generatedcontent &:after { + ._generated-sprite-icon( @x, @y, @width, @height, @sprite-image, @sprite-grid ); + top: @nudge-top; + right: @nudge-right; + } +} + +.append-sprite-icon(@x, @y, @width, @height, @nudge-right:0, @nudge-top:0, @pad:10px, @sprite-image:@sprite-image, @sprite-grid:@sprite-grid) when not (@using-modernizr) { + position: relative; + padding-right: @width + @pad; + &:after { + ._generated-sprite-icon( @x, @y, @width, @height, @sprite-image, @sprite-grid ); + top: @nudge-top; + right: @nudge-right; + } +} + +.prepend-sprite-icon-pos(@x, @y, @nudge-left:0, @nudge-top:0, @sprite-grid:@sprite-grid) when (@using-modernizr) { + .generatedcontent &:before { + .sprite-pos(@x, @y, @sprite-grid); + .nudge-l(@nudge-left); + .nudge-t(@nudge-top); + } +} + +.prepend-sprite-icon-pos(@x, @y, @nudge-left:0, @nudge-top:0, @sprite-grid:@sprite-grid) when not (@using-modernizr) { + &:before { + .sprite-pos(@x, @y, @sprite-grid); + .nudge-l(@nudge-left); + .nudge-t(@nudge-top); + } +} + +.append-sprite-icon-pos(@x, @y, @nudge-right:0, @nudge-top:0, @sprite-grid:@sprite-grid) when (@using-modernizr) { + .generatedcontent &:after { + .sprite-pos(@x, @y, @sprite-grid); + .nudge-r(@nudge-right); + .nudge-t(@nudge-top); + } +} + +.append-sprite-icon-pos(@x, @y, @nudge-right:0, @nudge-top:0, @sprite-grid:@sprite-grid) when not (@using-modernizr) { + &:after { + .sprite-pos(@x, @y, @sprite-grid); + .nudge-r(@nudge-right); + .nudge-t(@nudge-top); + } +} + +// ---- Partials ----------------------- + +.prepend-icon-setup(@width:0, @height:0, @nudge-left:0, @nudge-top:0, @pad:10px) when (@using-modernizr) { + .generatedcontent & { + position: relative; + ._pad-left(@width, @pad); + } + .generatedcontent &:before { + position: absolute; + display: block; + content: ' '; + top: 0; + left: 0; + ._size(@width, @height); + } +} + +.prepend-icon-setup(@width:0, @height:0, @nudge-left:0, @nudge-top:0, @pad:10px) when not (@using-modernizr) { + position: relative; + ._pad-left(@width, @pad); + &:before { + position: absolute; + display: block; + content: ' '; + top: 0; + left: 0; + ._size(@width, @height); + } +} + +.append-icon-setup(@width:0, @height:0, @nudge-left:0, @nudge-top:0, @pad:10px) when (@using-modernizr) { + .generatedcontent & { + position: relative; + ._pad-right(@width, @pad); + } + .generatedcontent &:after { + position: absolute; + display: block; + content: ' '; + top: 0; + right: 0; + ._size(@width, @height); + } +} + +.append-icon-setup(@width:0, @height:0, @nudge-left:0, @nudge-top:0, @pad:10px) when not (@using-modernizr) { + position: relative; + ._pad-right(@width, @pad); + &:after { + position: absolute; + display: block; + content: ' '; + top: 0; + right: 0; + ._size(@width, @height); + } +} + +.prepend-icon-image(@icon-image, @width:0, @height:0, @nudge-left:0, @nudge-top:0, @pad:10px) when (@using-modernizr) { + ._gc-pad-left(@width, @pad); + .generatedcontent &:before { + background: url(@icon-image) no-repeat 0 0; + ._size(@width, @height); + .nudge-l(@nudge-left); + .nudge-t(@nudge-top); + } +} + +.prepend-icon-image(@icon-image, @width:0, @height:0, @nudge-left:0, @nudge-top:0, @pad:10px) when not (@using-modernizr) { + ._pad-left(@width, @pad); + &:before { + background: url(@icon-image) no-repeat 0 0; + ._size(@width, @height); + .nudge-l(@nudge-left); + .nudge-t(@nudge-top); + } +} + +.append-icon-image(@icon-image, @width:0, @height:0, @nudge-right:0, @nudge-top:0, @pad:10px) when (@using-modernizr) { + ._gc-pad-right(@width, @pad); + .generatedcontent &:after { + background: url(@icon-image) no-repeat 0 0; + ._size(@width, @height); + .nudge-r(@nudge-right); + .nudge-t(@nudge-top); + } +} + +.append-icon-image(@icon-image, @width:0, @height:0, @nudge-right:0, @nudge-top:0, @pad:10px) when not (@using-modernizr) { + ._pad-right(@width, @pad); + &:after { + background: url(@icon-image) no-repeat 0 0; + ._size(@width, @height); + .nudge-r(@nudge-right); + .nudge-t(@nudge-top); + } +} + +// ---- internal use mixins ----------------------- + +._generated-icon(@width, @height, @icon-image) { + position: absolute; + display: block; + content: ' '; + background: url(@icon-image) no-repeat 0 0; + .size(@width, @height); +} + +._generated-sprite-icon(@x, @y, @width, @height, @sprite-image:@sprite-image, @sprite-grid:@sprite-grid) { + position: absolute; + display: block; + content: ' '; + .sprite-sized(@x, @y, @width, @height, @sprite-image, @sprite-grid); +} + +._pad-left(@width, @pad) when (@width = 0) { +} + +._pad-left(@width, @pad) when not (@width = 0) { + padding-left: @width + @pad; +} + +._pad-right(@width, @pad) when (@width = 0) { +} + +._pad-right(@width, @pad) when not (@width = 0) { + padding-right: @width + @pad; +} + +._gc-pad-left(@width, @pad) when (@width = 0) { +} + +._gc-pad-right(@width, @pad) when (@width = 0) { +} + +._gc-pad-left(@width, @pad) when not (@width = 0) and (@using-modernizr) { + .generatedcontent & { + ._pad-left(@width, @pad); + } +} + +._gc-pad-left(@width, @pad) when not (@width = 0) and not (@using-modernizr) { + ._pad-left(@width, @pad); +} + +._gc-pad-right(@width, @pad) when not (@width = 0) { + .generatedcontent & { + ._pad-right(@width, @pad); + } +} + +._gc-pad-right(@width, @pad) when not (@width = 0) and not (@using-modernizr) { + ._pad-right(@width, @pad); +} + +._size(@width, @height) when (@width = 0) and (@height = 0) { +} + +._size(@width, @height) when (@width = 0) and not (@height = 0) { + height: @height; +} + +._size(@width, @height) when not (@width = 0) and (@height = 0) { + width: @width; +} + +._size(@width, @height) when not (@width = 0) and not (@height = 0) { + width: @width; + height: @height; +} + + + diff --git a/app/design/adminhtml/magento_backend/less/clearless/resets.less b/app/design/adminhtml/magento_backend/less/clearless/resets.less new file mode 100644 index 0000000000000000000000000000000000000000..a216ad3f0ca49d5fa736e5182a4c650071584e72 --- /dev/null +++ b/app/design/adminhtml/magento_backend/less/clearless/resets.less @@ -0,0 +1,306 @@ +///** +// * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. +// * +// * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) +// * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +// */ + +.normalize() { + + /* normalize.css 2012-03-11T12:53 UTC - http://github.com/necolas/normalize.css */ + + article, + aside, + details, + figcaption, + figure, + footer, + header, + hgroup, + nav, + section, + summary { + display: block; + } + audio, + canvas, + video { + display: inline-block; + *display: inline; + *zoom: 1; + } + audio:not([controls]) { + display: none; + height: 0; + } + [hidden] { + display: none; + } + html { + font-size: 100%; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; + } + html, + button, + input, + select, + textarea { + font-family: sans-serif; + } + body { + margin: 0; + } + a:focus { + outline: thin dotted; + } + a:hover, + a:active { + outline: 0; + } + h1 { + font-size: 2em; + margin: 0.67em 0; + } + h2 { + font-size: 1.5em; + margin: 0.83em 0; + } + h3 { + font-size: 1.17em; + margin: 1em 0; + } + h4 { + font-size: 1em; + margin: 1.33em 0; + } + h5 { + font-size: 0.83em; + margin: 1.67em 0; + } + h6 { + font-size: 0.75em; + margin: 2.33em 0; + } + abbr[title] { + border-bottom: 1px dotted; + } + b, + strong { + font-weight: bold; + } + blockquote { + margin: 1em 40px; + } + dfn { + font-style: italic; + } + mark { + background: #ff0; + color: #000; + } + p, + pre { + margin: 1em 0; + } + pre, + code, + kbd, + samp { + font-family: monospace, serif; + _font-family: 'courier new', monospace; + font-size: 1em; + } + pre { + white-space: pre; + white-space: pre-wrap; + word-wrap: break-word; + } + q { + quotes: none; + } + q:before, + q:after { + content: ''; + content: none; + } + small { + font-size: 75%; + } + sub, + sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; + } + sup { + top: -0.5em; + } + sub { + bottom: -0.25em; + } + dl, + menu, + ol, + ul { + margin: 1em 0; + } + dd { + margin: 0 0 0 40px; + } + menu, + ol, + ul { + padding: 0 0 0 40px; + } + nav ul, + nav ol { + list-style: none; + list-style-image: none; + } + img { + border: 0; + -ms-interpolation-mode: bicubic; + } + svg:not(:root) { + overflow: hidden; + } + figure { + margin: 0; + } + form { + margin: 0; + } + fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; + } + legend { + border: 0; + padding: 0; + white-space: normal; + *margin-left: -7px; + } + button, + input, + select, + textarea { + font-size: 100%; + margin: 0; + vertical-align: baseline; + *vertical-align: middle; + } + button, + input { + line-height: normal; + } + button, + input[type="button"], + input[type="reset"], + input[type="submit"] { + cursor: pointer; + -webkit-appearance: button; + *overflow: visible; + } + button[disabled], + input[disabled] { + cursor: default; + } + input[type="checkbox"], + input[type="radio"] { + box-sizing: border-box; + padding: 0; + *height: 13px; + *width: 13px; + } + input[type="search"] { + -webkit-appearance: textfield; + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; + box-sizing: content-box; + } + input[type="search"]::-webkit-search-decoration, + input[type="search"]::-webkit-search-cancel-button { + -webkit-appearance: none; + } + button::-moz-focus-inner, + input::-moz-focus-inner { + border: 0; + padding: 0; + } + textarea { + overflow: auto; + vertical-align: top; + } + table { + border-collapse: collapse; + border-spacing: 0; + } +} + +.reset() { + + /* http://meyerweb.com/eric/tools/css/reset/ v2.0 | 20110126 */ + + html, body, div, span, applet, object, iframe, + h1, h2, h3, h4, h5, h6, p, blockquote, pre, + a, abbr, acronym, address, big, cite, code, + del, dfn, em, img, ins, kbd, q, s, samp, + small, strike, strong, sub, sup, tt, var, + b, u, i, center, + dl, dt, dd, ol, ul, li, + fieldset, form, label, legend, + table, caption, tbody, tfoot, thead, tr, th, td, + article, aside, canvas, details, embed, + figure, figcaption, footer, header, hgroup, + menu, nav, output, ruby, section, summary, + time, mark, audio, video { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline; + } + article, aside, details, figcaption, figure, + footer, header, hgroup, menu, nav, section { + display: block; + } + body { + line-height: 1; + } + ol, ul { + list-style: none; + } + blockquote, q { + quotes: none; + } + blockquote:before, blockquote:after, + q:before, q:after { + content: ''; + content: none; + } + table { + border-collapse: collapse; + border-spacing: 0; + } + +} \ No newline at end of file diff --git a/app/design/adminhtml/magento_backend/less/clearless/settings.less b/app/design/adminhtml/magento_backend/less/clearless/settings.less new file mode 100644 index 0000000000000000000000000000000000000000..b84bb8c6021157d2d3a5bbe8b41899d0a29ce685 --- /dev/null +++ b/app/design/adminhtml/magento_backend/less/clearless/settings.less @@ -0,0 +1,49 @@ +///** +// * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. +// * +// * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) +// * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +// */ + +// ============================================== +// ClearLess default settings +// ---------------------------------------------- +// Override on a per-project basis as required. +// ============================================== + +// General -------------------------------- + +@using-ieclasses: true; // whether or not the markup has html5-boilerplate style IE classes in it or not +@using-modernizr: false; // whether or not modernizer feature-detection classes are being used +@disable-filters: true; // whether or not to disable MS-specific 'filter' properties (can make IE slow!) + +// Typography -------------------------------- + +@base-font-size: 16; // base pixel font size. Used as a default for px -> (r)em conversions + +// Sprites -------------------------------- + +@sprite-image: '/example.png'; +@sprite-grid: 50px; + +// Grid -------------------------------- + +@total-columns: 12; +@column-width: 60px; +@gutter-width: 20px; diff --git a/app/design/adminhtml/magento_backend/less/clearless/sprites.less b/app/design/adminhtml/magento_backend/less/clearless/sprites.less new file mode 100644 index 0000000000000000000000000000000000000000..30500d26037b7563d218e490d2351b1178e45e2d --- /dev/null +++ b/app/design/adminhtml/magento_backend/less/clearless/sprites.less @@ -0,0 +1,74 @@ +///** +// * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. +// * +// * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) +// * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +// */ + +// ============================================== +// Sprite helpers +// ============================================== + +.sprite(@x, @y, @sprite-image:@sprite-image, @sprite-grid:@sprite-grid) { + .sprite-image(@sprite-image); + .sprite-pos(@x, @y, @sprite-grid); +} + +.sprite-sized(@x, @y, @size, @sprite-image:@sprite-image, @sprite-grid:@sprite-grid) when not (isnumber(@sprite-image)) { + .sprite(@x, @y, @sprite-image, @sprite-grid); + .size(@size); +} + +.sprite-sized(@x, @y, @width, @height, @sprite-image:@sprite-image, @sprite-grid:@sprite-grid) when (isnumber(@height)) { + .sprite(@x, @y, @sprite-image, @sprite-grid); + .size(@width,@height); +} + +.sprite-ir(@x, @y, @size, @sprite-image:@sprite-image, @sprite-grid:@sprite-grid) when not (isnumber(@sprite-image)) { + .ir(); + .sprite(@x, @y, @sprite-image, @sprite-grid); + .size(@size); +} + +.sprite-ir(@x, @y, @width, @height, @sprite-image:@sprite-image, @sprite-grid:@sprite-grid) when (isnumber(@height)) { + .ir(); + .sprite(@x, @y, @sprite-image, @sprite-grid); + .size(@width,@height); +} + +.sprite-image(@sprite-image:@sprite-image) { + background-image: url(@sprite-image); + background-repeat: no-repeat; +} + +.sprite-pos(@x, @y, @sprite-grid:@sprite-grid) { + background-position: -(@x*@sprite-grid*1px) -(@y*@sprite-grid*1px); +} + +.sprite-pos-sized(@x, @y, @size, @sprite-grid:@sprite-grid) when not (isnumber(@sprite-image)) { + .sprite-pos(@x, @y, @sprite-grid); + .size(@size); +} + +.sprite-pos-sized(@x, @y, @width, @height, @sprite-grid:@sprite-grid) when (isnumber(@height)) { + .sprite-pos(@x, @y, @sprite-grid); + .size(@width,@height); +} + + diff --git a/app/design/adminhtml/magento_backend/less/clearless/typography.less b/app/design/adminhtml/magento_backend/less/clearless/typography.less new file mode 100644 index 0000000000000000000000000000000000000000..b8dee6682797a11d1abfb06df1d18755afd6d6bd --- /dev/null +++ b/app/design/adminhtml/magento_backend/less/clearless/typography.less @@ -0,0 +1,65 @@ +///** +// * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. +// * +// * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) +// * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +// */ + +// ============================================== +// Typography related mixins +// ============================================== + +.font-size-rems(@px-size) { + @rem-size: @px-size / @base-font-size; + font-size: ~"@{px-size}px"; + font-size: ~"@{rem-size}rem"; +} + +.font-size-ems(@target-px-size, @context-px-size:@base-font-size) { + font-size: (@target-px-size / @context-px-size) * 1em; +} + +.font-face( @family-name, @font-path, @font-weight:normal, @font-style:normal, @include-svg:false ) when not (@include-svg) { + @font-face { + font-family: @family-name; + src: url('@{font-path}.eot'); + src: url('@{font-path}.eot?#iefix') format('embedded-opentype'), url('@{font-path}.woff') format('woff'), url('@{font-path}.ttf') format('truetype'); + font-weight: @font-weight; + font-style: @font-style; + } +} + +.font-face( @family-name, @font-path, @font-weight:normal, @font-style:normal, @include-svg:false ) when (@include-svg) { + @font-face { + font-family: @family-name; + src: url('@{font-path}.eot'); + src: url('@{font-path}.eot?#iefix') format('embedded-opentype'), url('@{font-path}.woff') format('woff'), url('@{font-path}.ttf') format('truetype'), url('@{font-path}.svg#@{family-name}') format('svg'); + font-weight: @font-weight; + font-style: @font-style; + } +} + +.wrap-words() { + -ms-word-break: break-all; + word-break: break-all; + word-break: break-word; + -webkit-hyphens: auto; + -moz-hyphens: auto; + hyphens: auto; +} \ No newline at end of file diff --git a/app/design/adminhtml/magento_backend/less/lib/buttons.less b/app/design/adminhtml/magento_backend/less/lib/buttons.less new file mode 100644 index 0000000000000000000000000000000000000000..43dd5010336888035a776fe9caaf0aa091766c5c --- /dev/null +++ b/app/design/adminhtml/magento_backend/less/lib/buttons.less @@ -0,0 +1,193 @@ +// /** +// * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. +// * +// * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) +// * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +// */ + +// Default Button +.DefaultButton { + font: 14px/19px @baseFont; + font-weight: 500; + background: @defaultButton1; + border: 1px solid @defaultButton2; + color: @defaultButton3; + display: inline-block; + padding: 5px 14px; + text-align: center; + text-decoration: none; + vertical-align: top; + cursor: pointer; + border-radius: 2px; + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + &:hover, + &:focus, + &:active { + background: @defaultButton4; + color: @defaultButton3; + } + &:active { + border: 1px solid @defaultButton5; + } + &:visited { + color: @defaultButton3; + } + &[disabled], + &.disabled { + &:hover, + &:active { + color: @defaultButton3; + background: @defaultButton1; + border: 1px solid @defaultButton2; + } + cursor: not-allowed; + opacity: 0.5; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=50); + } +} + +// Primary Button +.PrimaryButton { + &:extend(.DefaultButton all); + color: #fff; + background: @primaryButton1; + border: 1px solid @primaryButton2; + &:focus, + &:hover { + color: #fff; + background: @primaryButton3; + border: 1px solid @primaryButton3; + } + &:active { + color: #fff; + background: @primaryButton3; + border: 1px solid @primaryButton4; + } + &:visited { + color: #fff; + } + &[disabled], + &.disabled { + &:hover, + &:active { + color: #fff; + background: @primaryButton1; + border: 1px solid @primaryButton2; + } + } +} + +// Primary Add Button +.PrimaryAddButton { + &:extend(.PrimaryButton all); + width: 36px; + height: 31px; + overflow: hidden; + position: relative; + z-index: 1; + padding: 0; + &:focus { + outline: none; + } + > span { + text-indent: -999em; + display: block; + width: 34px; + height: 29px; + &:before { + text-indent: 0; + font-family: 'MUI-Icons'; + font-weight: normal; + font-size: 22px; + content: '\e02d'; + color: #fff; + position: absolute; + width: 34px; + height: 29px; + line-height: 29px; + text-align: center; + vertical-align: middle; + top: 0; + left: 0; + overflow: hidden; + .eq-ie9 & { + line-height: 31px; + } + } + } +} + +// Primary Split and Primary Add Split Button +.PrimarySplitButton { + &.btn-round { + .action-default.primary { + &:extend(.PrimaryAddButton all); + border-radius: 2px 0 0 2px; + &:focus { + outline: none; + } + } + } + > .action-default.primary { + border-radius: 2px 0 0 2px; + &:focus { + outline: none; + } + } + > .action-toggle.primary { + &:extend(.PrimaryButton all); + overflow: hidden; + z-index: 1; + padding: 0; + border-radius: 0 2px 2px 0; + font-size: 15px; + width: 30px; + height: 31px; + line-height: 30px; + margin-left: -1px; + position: relative; + z-index: 2; + filter: none; + &:focus { + outline: none; + } + &:before { + text-align: center; + } + } + .dropdown-menu { + left: 0; + right: auto; + z-index: 1; + > li > .item { + padding: 9px 10px 10px; + } + } + &.active { + > .action-toggle.primary, + > .action-toggle.primary:hover { + background: @primaryButton3; + border: 1px solid @primaryButton4; + } + } +} diff --git a/app/design/adminhtml/magento_backend/less/styles.less b/app/design/adminhtml/magento_backend/less/styles.less new file mode 100644 index 0000000000000000000000000000000000000000..791f30f4b49cb572e40402bebd35df1f902f07f3 --- /dev/null +++ b/app/design/adminhtml/magento_backend/less/styles.less @@ -0,0 +1,31 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ + +@import "clearless/all.less"; +@import "styles/base.less"; +@import "vars.less"; +@import "lib/buttons.less"; +@import "styles/admin.less"; +@import "styles/header.less"; +@import "styles/pages.less"; +@import "styles/debug.less"; diff --git a/app/design/adminhtml/magento_backend/css/admin.css b/app/design/adminhtml/magento_backend/less/styles/admin.less similarity index 91% rename from app/design/adminhtml/magento_backend/css/admin.css rename to app/design/adminhtml/magento_backend/less/styles/admin.less index fde65899effbe9a25104fb007e5a2edaa42fb487..9201fb7567f1a23172ccd336598641634ee66fc3 100644 --- a/app/design/adminhtml/magento_backend/css/admin.css +++ b/app/design/adminhtml/magento_backend/less/styles/admin.less @@ -1,5 +1,5 @@ -/** - * Magento +// /** +// * Magento * * NOTICE OF LICENSE * @@ -16,261 +16,11 @@ * Do not edit or add to this file if you wish to upgrade Magento to newer * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ - -/* - Fonts --------------------------------------- */ - -@font-face { - font-family: 'CallunaSans'; - src: url('../fonts/calluna/CallunaSansLight-webfont.woff'); - src: url('../fonts/calluna/CallunaSansLight-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/calluna/CallunaSansLight-webfont.svg#webfont85gDAx2H') format('svg'), url('../fonts/calluna/CallunaSansLight-webfont.woff') format('woff'), url('../fonts/calluna/CallunaSansLight-webfont.ttf') format('truetype'); - font-style: normal; - font-weight: 200; -} - -@font-face { - font-family: 'CallunaSans'; - src: url('../fonts/calluna/CallunaSansRegular-webfont.woff'); - src: url('../fonts/calluna/CallunaSansRegular-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/calluna/CallunaSansRegular-webfont.svg#webfont85gDAx2D') format('svg'), url('../fonts/calluna/CallunaSansRegular-webfont.woff') format('woff'), url('../fonts/calluna/CallunaSansRegular-webfont.ttf') format('truetype'); - font-style: normal; - font-weight: 400; -} - -@font-face { - font-family: 'CallunaSans'; - src: url('../fonts/calluna/CallunaSansSemiBold-webfont.woff'); - src: url('../fonts/calluna/CallunaSansSemiBold-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/calluna/CallunaSansSemiBold-webfont.svg#webfont85gDAx2A') format('svg'), url('../fonts/calluna/CallunaSansSemiBold-webfont.woff') format('woff'), url('../fonts/calluna/CallunaSansSemiBold-webfont.ttf') format('truetype'); - font-style: normal; - font-weight: 500; -} - -@font-face { - font-family: 'CallunaSans'; - src: url('../fonts/calluna/CallunaSansBold-webfont.woff'); - src: url('../fonts/calluna/CallunaSansBold-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/calluna/CallunaSansBold-webfont.svg#webfont85gDAx2C') format('svg'), url('../fonts/calluna/CallunaSansBold-webfont.woff') format('woff'), url('../fonts/calluna/CallunaSansBold-webfont.ttf') format('truetype'); - font-style: normal; - font-weight: 600; -} +// * +// * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) +// * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +// */ -@font-face { - font-family: 'admin-icons'; - src: url('../fonts/icons/admin-icons.eot'); - src: url('../fonts/icons/admin-icons.eot?#iefix') format('embedded-opentype'), url('../fonts/icons/admin-icons.svg#admin-icons') format('svg'), url('../fonts/icons/admin-icons.woff') format('woff'), url('../fonts/icons/admin-icons.ttf') format('truetype'); - font-weight: normal; - font-style: normal; -} - -@font-face { - font-family: 'MUI-Icons'; - src: url('../mui/fonts/MUI-Icons.eot'); - src: url('../mui/fonts/MUI-Icons.eot?#iefix') format('embedded-opentype'), url('../mui/fonts/MUI-Icons.svg#MUI-Icons') format('svg'), url('../mui/fonts/MUI-Icons.woff') format('woff'), url('../mui/fonts/MUI-Icons.ttf') format('truetype'); - font-weight: normal; - font-style: normal; -} - -body, html { - min-height: 100%; - height: 100%; -} - -body { - position: relative; - background: url(../images/body-bg.jpg); - height: auto; -} - -/* - Headers and titles --------------------------------------- */ -h1, h2, h3, h4, h5, h6 { - font-family: 'CallunaSans', Arial, sans-serif; - font-weight: 400; -} - -h1 { - font-size: 26px; -} - -h2 { - font-size: 22px; -} - -h3 { - font-size: 18px; -} - -h4 { - font-size: 16px; -} - -h5 { - font-size: 14px; -} - -h6 { - font-size: 13px; - font-weight: 500; -} - -/* - Primary "button view" action (default size) --------------------------------------- */ -input[type=button].primary, -input[type=submit].primary, -input[type=reset].primary, -button.primary, -input[type=button].primary:visited, -input[type=submit].primary:visited, -input[type=reset].primary:visited, -button.primary:visited, -.primary, -.primary:visited, -.popup-window .add-widget, -.popup-window .add-widget:visited { - box-shadow: inset 0 1px 1px rgba(255, 255, 255, .1); - border: 1px solid #e4731c; - color: #fff; - text-shadow: 0 1px 1px #8e3b05; - background: #f58227; - background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2Y1ODIyNyIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNmMDcyMWMiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); - background: -moz-linear-gradient(top, #f58227 0%, #f0721c 100%); - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #f58227), color-stop(100%, #f0721c)); - background: -webkit-linear-gradient(top, #f58227 0%, #f0721c 100%); - background: -o-linear-gradient(top, #f58227 0%, #f0721c 100%); - background: -ms-linear-gradient(top, #f58227 0%, #f0721c 100%); - background: linear-gradient(to bottom, #f58227 0%, #f0721c 100%); -} - -.eq-ie8 input[type=button].primary, -.eq-ie8 input[type=submit].primary, -.eq-ie8 input[type=reset].primary, -.eq-ie8 button.primary, -.eq-ie8 input[type=button].primary:visited, -.eq-ie8 input[type=submit].primary:visited, -.eq-ie8 input[type=reset].primary:visited, -.eq-ie8 button.primary:visited, -.eq-ie8 .primary, -.eq-ie8 .primary:visited, -.eq-ie8 .popup-window .add-widget, -.eq-ie8 .popup-window .add-widget:visited, -.page-login button.primary { - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f58227', endColorstr='#f0721c', GradientType=0); -} - -input[type=button].primary:hover, -input[type=submit].primary:hover, -input[type=reset].primary:hover, -button.primary:hover, -input[type=button].primary:focus, -input[type=submit].primary:focus, -input[type=reset].primary:focus, -button.primary:focus, -.primary:hover, -.primary:focus, -.popup-window .add-widget:hover, -.popup-window .add-widget:focus { - color: #fff; - background: #e47821; - background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2U0NzgyMSIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNkZTY4MTciIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); - background: -moz-linear-gradient(top, #e47821 0%, #de6817 100%); - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #e47821), color-stop(100%, #de6817)); - background: -webkit-linear-gradient(top, #e47821 0%, #de6817 100%); - background: -o-linear-gradient(top, #e47821 0%, #de6817 100%); - background: -ms-linear-gradient(top, #e47821 0%, #de6817 100%); - background: linear-gradient(to bottom, #e47821 0%, #de6817 100%); -} - -.eq-ie8 input[type=button].primary:hover, -.eq-ie8 input[type=submit].primary:hover, -.eq-ie8 input[type=reset].primary:hover, -.eq-ie8 button.primary:hover, -.eq-ie8 input[type=button].primary:focus, -.eq-ie8 input[type=submit].primary:focus, -.eq-ie8 input[type=reset].primary:focus, -.eq-ie8 button.primary:focus, -.eq-ie8 .primary:hover, -.eq-ie8 .primary:focus, -.eq-ie8 .popup-window .add-widget:hover, -.eq-ie8 .popup-window .add-widget:focus, -.page-login button.primary:hover, -.page-login button.primary:focus { - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#e47821', endColorstr='#de6817', GradientType=0); -} - -input[type=button].primary:active, -input[type=submit].primary:active, -input[type=reset].primary:active, -button.primary:active, -input[type=button].primary.active, -input[type=submit].primary.active, -input[type=reset].primary.active, -button.primary.active, -.primary:active, -.primary.active, -.popup-window .add-widget:active, -.page-login button.primary:active { - background: #e2701a; - box-shadow: 0 1px 2px #bf5f16 inset; - text-shadow: 0 -1px 1px #bf5f16; -} - -.eq-ie8 input[type=button].primary:active, -.eq-ie8 input[type=submit].primary:active, -.eq-ie8 input[type=reset].primary:active, -.eq-ie8 button.primary:active, -.eq-ie8 input[type=button].primary.active, -.eq-ie8 input[type=submit].primary.active, -.eq-ie8 input[type=reset].primary.active, -.eq-ie8 button.primary.active, -.eq-ie8 .primary:active, -.eq-ie8 .primary.active, -.eq-ie8 .popup-window .add-widget:active { - filter: none; -} - -input[type=button].primary[disabled], -input[type=button].primary[disabled]:hover, -input[type=submit].primary[disabled], -input[type=submit].primary[disabled]:hover, -input[type=reset].primary[disabled], -input[type=reset].primary[disabled]:hover, -button.primary[disabled], -button.primary[disabled]:hover, -input[type=button].primary.disabled, -input[type=button].primary.disabled:hover, -input[type=submit].primary.disabled, -input[type=submit].primary.disabled:hover, -input[type=reset].primary.disabled, -input[type=reset].primary.disabled:hover, -button.primary.disabled, -button.primary.disabled:hover, -.primary[disabled], -.primary[disabled]:hover, -.primary.disabled, -.primary.disabled:hover { - cursor: not-allowed; - color: #fff; - opacity: 0.6; - box-shadow: none; - border: 1px solid #e4731c; - text-shadow: none; - background: #f47b20 !important; - filter: progid:DXImageTransform.Microsoft.Alpha(opacity=60); -} - -/* - Placeholder for all big sized "button" actions (simple/primary). - Usage: - .popup .action-save, - .page-actions .action-open { - // styles - } --------------------------------------- */ .dont-use-this-class-big-size { font-size: 18px; line-height: 24px; @@ -1201,7 +951,7 @@ textarea, margin: 0; background-color: #fff; height: 28px; - color: #333; + .style9(); border: 1px solid #ccc; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; @@ -1481,10 +1231,7 @@ input.mage-error ~ .addafter { .fieldset-wrapper > .fieldset-wrapper-title .title, .fieldset > .legend span { - font-family: 'CallunaSans', Arial, sans-serif; - font-size: 18px; - color: #666; - font-weight: normal; + .style10(); padding: 7px 0 10px; display: inline-block; } @@ -1667,6 +1414,10 @@ input.mage-error ~ .addafter { margin: 0 0 29px; } +.with-note .note, .field .note { + .style19(); +} + .fieldset .field .options-list { list-style: none; margin: 0; @@ -1689,7 +1440,15 @@ input.mage-error ~ .addafter { } .fieldset .label { - color: #666; + .style2(); +} + +.fieldset .control .label { + .style9(); +} + +.field.required > .label:after { + .style8(); } .with-addon .textarea { @@ -2104,7 +1863,7 @@ table td { table tbody tr td { background: #F5F2ED; - color: #676056; + color: @primary1; padding-top: 12px; } @@ -2179,7 +1938,6 @@ table tbody tr:nth-child(odd):hover th { .tipsy-inner .error h5 { color: #be0a0a; font-size: 16px; - font-family: "CallunaSans"; font-weight: 500; margin: 0 0 6px 0; } @@ -2333,7 +2091,6 @@ table tbody tr:nth-child(odd):hover th { .tipsy-inner dt { margin: 0 0 4px; font-size: 16px; - font-family: 'CallunaSans'; font-weight: 400; color: #f47b20; } @@ -2532,13 +2289,11 @@ table tbody tr:nth-child(odd):hover th { position: absolute; top: 100%; padding: 19px 10px; - font-family: Helvetica, Arial, sans-serif; } .navigation .level-0 > .submenu a { display: block; - color: #19a3d1; - font-size: 13px; + .style6(); line-height: 1.385; padding: 5px 20px 4px; text-decoration: none; @@ -2550,26 +2305,18 @@ table tbody tr:nth-child(odd):hover th { margin-bottom: 1px; } -.navigation .level-0 > .submenu a:focus, -.navigation .level-0 > .submenu a:hover { - background: #19a3d1; - border-radius: 3px; - color: #fff; - -webkit-background-clip: padding-box; - -moz-background-clip: padding-box; - background-clip: padding-box; -} - .navigation .level-0 > .submenu a[href="#"] { cursor: default; display: block; - color: #676056; - font-size: 15px; - font-weight: bold; + .style30(); line-height: 1; margin: 7px 0 6px; padding: 0 20px; - background: transparent; + + &:focus, + &:hover { + text-decoration: none; + } } .navigation .level-0 { @@ -2585,10 +2332,7 @@ table tbody tr:nth-child(odd):hover th { position: relative; display: inline-block; padding: 37px 21px 11px; - color: #fff; - font-family: "CallunaSans", Arial, serif; - font-weight: 500; - font-size: 13px; + .style15(); text-shadow: 0 1px 3px #222; text-transform: uppercase; text-decoration: none; @@ -2596,11 +2340,6 @@ table tbody tr:nth-child(odd):hover th { -moz-transition: background .15s ease-out; } -/* TODO IE8 fix for CallunaSans */ -.eq-ie8 .navigation .level-0 > a { - font-size: 12px; -} - .navigation .level-0.active > a { background: #625d54; background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIxJSIgc3RvcC1jb2xvcj0iIzYyNWQ1NCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiM1NjUyNDkiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); @@ -2620,7 +2359,7 @@ table tbody tr:nth-child(odd):hover th { .eq-ie8 .navigation .level-0:hover > a,*/ .navigation .level-0.hover.recent > a { background: #fff; - color: #676056; + .style15I(); text-shadow: 0 1px 3px #c1bfbb; } @@ -3079,9 +2818,13 @@ table tbody tr:nth-child(odd):hover th { .page-login .header { margin-bottom: 30px; + background: transparent; + padding: 0; + z-index: auto; + position: static; } -.page-login .logo { +.page-login .header .logo { display: block; width: 262px; height: 64px; @@ -3216,10 +2959,7 @@ table tbody tr:nth-child(odd):hover th { } .page-title-inner > .title { - font-family: 'CallunaSans'; - font-size: 26px; - font-weight: 200; - color: #676056; + .style23(); display: inline-block; margin: 0; width: 100%; @@ -3465,15 +3205,17 @@ table tbody tr:nth-child(odd):hover th { .store-switcher-alt strong { display: block; - font: 14px/1.333 "CallunaSans", Arial, sans-serif; + font-size: 14px; font-weight: 500; + line-height: 1.333; color: #a6a098; padding: 5px 10px; } .store-switcher-alt .store-selected { - font: 12px/1.333 "CallunaSans", Arial, sans-serif; + font-size: 12px; font-weight: 400; + line-height: 1.333; color: #676056; cursor: pointer; } @@ -3721,6 +3463,10 @@ table tbody tr:nth-child(odd):hover th { display: inline-block; } +.field-store-switcher > .tooltip + div > a { + .style22(); +} + .field-store-switcher > .label { margin: 0; } @@ -3787,7 +3533,6 @@ table tbody tr:nth-child(odd):hover th { margin: 0 0 30px; padding: 0; list-style: none; - font-family: 'CallunaSans', Arial, sans-serif; font-weight: 500; } @@ -3916,7 +3661,8 @@ table tbody tr:nth-child(odd):hover th { display: block; padding: 7px 18px 9px; text-decoration: none; - font: 14px/1.666 CallunaSans, Arial, sans-serif; + font-size: 12px; + line-height: 1.666; color: #676056; } @@ -4045,11 +3791,7 @@ table tbody tr:nth-child(odd):hover th { } .switcher-label { - font-family: "CallunaSans", Arial, sans-serif; - font-size: 12px; - font-weight: 600; - color: #979087; - text-shadow: 0 1px #fff; + .style2(); text-transform: uppercase; } @@ -4162,7 +3904,6 @@ table tbody tr:nth-child(odd):hover th { .page-actions.fixed .page-actions-inner:before { content: attr(data-title); float: left; - font-family: 'CallunaSans'; font-size: 20px; max-width: 50%; overflow: hidden; @@ -4181,7 +3922,7 @@ table tbody tr:nth-child(odd):hover th { .grid { border-bottom: 0; - font-size: 13px; + .style18(); padding-bottom: .5em; } @@ -4259,7 +4000,7 @@ table tbody tr:nth-child(odd):hover th { .grid table td.empty-text { border: solid #c0bbaf; border-width: 0 1px; - font-size: 15px; + .style7(); text-align: center; padding: 15px; } @@ -4341,6 +4082,10 @@ table tbody tr:nth-child(odd):hover th { margin-left: 4px; } +.grid-actions .pager { + .style18(); +} + .grid-actions .pager select { width: 5em; margin: 0 4px; @@ -4446,7 +4191,7 @@ table tbody tr:nth-child(odd):hover th { Grid - Headings -------------------------------------- */ .grid tr.headings th { - font-size: 13px; + .style29(); border-right: 1px solid #837f79; padding: 0; vertical-align: bottom; @@ -4458,7 +4203,6 @@ table tbody tr:nth-child(odd):hover th { .grid tr.headings th > span { display: block; - font-weight: 500; border-bottom: 2px solid transparent; padding: 5px 5px 2px; white-space: nowrap; @@ -4480,7 +4224,7 @@ table tbody tr:nth-child(odd):hover th { .grid tr.headings th a { display: block; - color: #cac3b4; + .style29(); position: relative; text-decoration: none; } @@ -4605,6 +4349,8 @@ table tbody tr:nth-child(odd):hover th { .grid .filter .range select { margin: 0; + .style14(); + color: #bcb795; } .grid .filter .date { @@ -4917,7 +4663,7 @@ table .col-draggable .draggable-handle { .accordion .config .data-table thead th, .accordion .config .data-table tfoot td { background: #fff; - color: #666; + .style2(); } .data-table th { @@ -4931,7 +4677,7 @@ table .col-draggable .draggable-handle { .accordion .config .data-table td { background: #fff; padding: 5px 7px; - font-size: 12px; + .style9(); vertical-align: middle; border: solid #eae8e4; border-width: 0 0 1px; @@ -5046,9 +4792,6 @@ table .col-draggable .draggable-handle { /* Data table - alternative view -------------------------------------- */ -.invitation_information .data-table, -.invitee_information .data-table, -.inviter_information .data-table, .customer-information .data-table, .order-information .data-table, .order-account-information .data-table, @@ -5056,9 +4799,6 @@ table .col-draggable .draggable-handle { width: 100%; } -.invitation_information .data-table tbody tr th, -.invitee_information .data-table tbody tr th, -.inviter_information .data-table tbody tr th, .customer-information .data-table tbody tr th, .order-information .data-table tbody tr th, .order-account-information .data-table tbody tr th, @@ -5069,12 +4809,6 @@ table .col-draggable .draggable-handle { font-weight: bold; } -.invitation_information .data-table tbody tr td, -.invitation_information .data-table tbody tr th, -.invitee_information .data-table tbody tr td, -.invitee_information .data-table tbody tr th, -.inviter_information .data-table tbody tr td, -.inviter_information .data-table tbody tr th, .customer-information .data-table tbody tr td, .customer-information .data-table tbody tr th, .order-information .data-table tbody tr td, @@ -5096,12 +4830,6 @@ table .col-draggable .draggable-handle { vertical-align: top; } -.invitation_information .data-table tbody tr:nth-child(2n+1) td, -.invitation_information .data-table tbody tr:nth-child(2n+1) th, -.invitee_information .data-table tbody tr:nth-child(2n+1) td, -.invitee_information .data-table tbody tr:nth-child(2n+1) th, -.inviter_information .data-table tbody tr:nth-child(2n+1) td, -.inviter_information .data-table tbody tr:nth-child(2n+1) th, .customer-information .data-table tbody tr:nth-child(2n+1) td, .customer-information .data-table tbody tr:nth-child(2n+1) th, .order-information .data-table tbody tr:nth-child(2n+1) td, @@ -5119,12 +4847,6 @@ table .col-draggable .draggable-handle { background-color: #fbfaf6; } -.eq-ie8 .invitation_information .data-table tbody tr td, -.eq-ie8 .invitation_information .data-table tbody tr th, -.eq-ie8 .invitee_information .data-table tbody tr td, -.eq-ie8 .invitee_information .data-table tbody tr th, -.eq-ie8 .inviter_information .data-table tbody tr td, -.eq-ie8 .inviter_information .data-table tbody tr th, .eq-ie8 .customer-information .data-table tbody tr td, .eq-ie8 .customer-information .data-table tbody tr th, .eq-ie8 .order-information .data-table tbody tr td, @@ -5306,7 +5028,6 @@ table .col-draggable .draggable-handle { .tree-store-scope [class^="field field-w_"] .label, .tree-store-scope [class^="field field-sg_"] .label { text-align: left; - font-family: 'CallunaSans', Arial, sans-serif; font-size: 18px; padding-right: 0; width: auto; @@ -5572,10 +5293,6 @@ table .col-draggable .draggable-handle { float: none; } -.message-system a { - text-decoration: none; -} - .message-system-list { margin: 0; padding: 0; @@ -5594,8 +5311,6 @@ table .col-draggable .draggable-handle { .message-system-short { padding: 5px 13px 7px; - color: #aea79d; - font-size: 11px; float: right; } @@ -5612,8 +5327,6 @@ table .col-draggable .draggable-handle { .message-system-short a { padding-left: 27px; - color: #19a3d2; - font-size: 13px; position: relative; height: 16px; } @@ -5632,7 +5345,7 @@ table .col-draggable .draggable-handle { text-align: center; position: absolute; left: 7px; - top: 0; + top: 2px; } .message-system-list li:before { @@ -5786,9 +5499,261 @@ table .col-draggable .draggable-handle { clear: both; } -/* - Clearfix --------------------------------------- */ +// Default & Primary Button +input[type=button], +input[type=submit], +input[type=reset], +button, +[class^="action-"], +.popup-window .add-widget { + &:extend(.DefaultButton all); + &.primary { + &:extend(.PrimaryButton all); + } +} + +// Custom grids view +.CustomGridView { + .col-1-layout { + padding: 0; + background: transparent; + border: 0; + border-radius: 0; + max-width: 1300px; + min-width: 960px; + } +} + +// Custom grid action view for Primary Add Button at grid tables +.CustomGridAction { + .grid-actions { + border-radius: 5px 5px 0 0; + margin-top: 20px; + padding: 9px 16px 9px 65px; + } + .page-actions.fixed { + left: 0; + margin: 0; + padding: 0 21px; + position: fixed; + } + .page-actions { + position: absolute; + z-index: 2; + margin-top: 10px; + margin-left: 15px; + padding: 0; + } +} + +// Primary Add Button for grid tables on pages: +// sales +.sales-order-index, +.adminhtml-rma-index, +// marketing +.adminhtml-catalog-event-index, +.adminhtml-urlrewrite-index, +.catalog-search-index, +.catalog-product-review-index, +.catalog-rule-promo-catalog-index, +.sales-rule-promo-quote-index, +.adminhtml-reminder-index, +.adminhtml-newsletter-template-index, +.adminhtml-system-email-template-index, +.adminhtml-sitemap-index, +// products +.adminhtml-googleshopping-types-index, +// customers +.customer-index-index, +// cms +.adminhtml-cms-page-index, +.cms-block-index, +.adminhtml-banner-index, +.adminhtml-widget-instance-index, +.cms-page-index, +// system +.adminhtml-webapi-user-index, +.adminhtml-webapi-role-index, +.adminhtml-system-variable-index, +.adminhtml-user-index, +.adminhtml-user-role-index, +.adminhtml-webhook-subscription-index, +.adminhtml-integration-index, +// content +.adminhtml-system-design-theme-index, +.adminhtml-system-design-index, +// stores +.adminhtml-customer-attribute-index, +.adminhtml-customer-address-attribute-index, +.rating-index-index, +.tax-rule-index, +.tax-rate-index, +.adminhtml-rma-item-attribute-index, +.adminhtml-reward-rate-index, +.customer-group-index, +.checkout-agreement-index, +.catalog-product-attribute-index, +.catalog-product-set-index { + &:extend(.CustomGridView all); + &:extend(.CustomGridAction all); + .page-actions { + .add { + &:extend(.PrimaryAddButton all); + } + } +} + +.catalog-product-index { + &:extend(.CustomGridView all); + &:extend(.CustomGridAction all); +} + +// Primary Add Split Button or Primary Split Button +.catalog-product-new, +.catalog-product-edit, +.catalog-product-index { + .actions-split { + &:extend(.PrimarySplitButton all); + } +} + +// Custom Grid View for pages: +// sales +.sales-invoice-index, +.sales-shipment-index, +.sales-creditmemo-index, +.sales-billing-agreement-index, +.sales-transactions-index, +.sales-recurring-profile-index, +// products +.adminhtml-googleshopping-items-index, +// customer +.customer-online-index, +// marketing +.adminhtml-newsletter-queue-index, +.adminhtml-newsletter-subscriber-index, +// reports +.adminhtml-report-shopcart-product, +.adminhtml-report-shopcart-abandoned +.adminhtml-report-product-downloads, +.adminhtml-report-product-sold, +.adminhtml-report-product-lowstock, +.adminhtml-report-customer-accounts, +.adminhtml-report-customer-totals, +.adminhtml-report-customer-orders, +.adminhtml-report-customer-wishlist-wishlist, +.adminhtml-report-review-customer, +.adminhtml-report-review-product, +.adminhtml-report-search, +.adminhtml-report-statistics-index, +.adminhtml-newsletter-problem-index, +//store +.adminhtml-system-store-index, +.sales-order-status-index, +.adminhtml-system-currency-index, +.adminhtml-system-currencysymbol-index, +.adminhtml-scheduled-operation-index, +// system +.adminhtml-cache-index, +.adminhtml-system-backup-index, +.adminhtml-locks-index, +.adminhtml-notification-index, +.adminhtml-logging-archive, +.adminhtml-logging-index, +.adminhtml-process-list, +// product +.catalog-product-index { + &:extend(.CustomGridView all); +} + +// Custom page-actions view +.adminhtml-googleshopping-items-index .grid-title, +.adminhtml-system-backup-index .page-actions, +.adminhtml-scheduled-operation-index .page-actions, +.adminhtml-system-currency-index .page-actions, +.adminhtml-system-currencysymbol-index .page-actions, +.adminhtml-cache-index .page-actions, +.adminhtml-system-store-index .page-actions, +.sales-order-status-index .page-actions { + border: 1px solid #c0bbaf; + border-bottom: 0; + background: rgb(246, 243, 236); + background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2Y2ZjNlYyIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNlZGVhZTEiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); + background: -moz-linear-gradient(top, rgba(246, 243, 236, 1) 0%, rgba(237, 234, 225, 1) 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgba(246, 243, 236, 1)), color-stop(100%, rgba(237, 234, 225, 1))); + background: -webkit-linear-gradient(top, rgba(246, 243, 236, 1) 0%, rgba(237, 234, 225, 1) 100%); + background: -o-linear-gradient(top, rgba(246, 243, 236, 1) 0%, rgba(237, 234, 225, 1) 100%); + background: -ms-linear-gradient(top, rgba(246, 243, 236, 1) 0%, rgba(237, 234, 225, 1) 100%); + background: linear-gradient(to bottom, rgba(246, 243, 236, 1) 0%, rgba(237, 234, 225, 1) 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#f6f3ec', endColorstr = '#edeae1', GradientType = 0); + padding: 7px 8px 8px; + position: relative; + float: none; +} + +.adminhtml-googleshopping-items-index .grid { + padding-bottom: 25px; +} + +.adminhtml-googleshopping-items-index .grid-title .title { + font-size: 18px; +} + +.adminhtml-googleshopping-items-index .page-actions { + float: right; +} + +.adminhtml-system-backup-index .page-actions.fixed, +.adminhtml-scheduled-operation-index .page-actions.fixed, +.adminhtml-system-currency-index .page-actions.fixed, +.adminhtml-system-currencysymbol-index .page-actions.fixed, +.adminhtml-cache-index .page-actions.fixed, +.adminhtml-system-store-index .page-actions.fixed, +.sales-order-status-index .page-actions.fixed { + background-image: none; + padding: 0 21px; + position: fixed; +} + +.catalog-product-index .grid-actions { + padding-left: 90px; +} + +.catalog-rule-promo-catalog-index .grid-actions { + padding-left: 210px; +} + +.catalog-rule-promo-catalog-index .page-actions .apply { + float: right; + margin: 0 0 0 10px; +} + +.catalog-product-index .field-store-switcher { + padding: 0; +} + +.sidebar-actions { + padding: 14px 0; +} + +.sidebar-actions button { + margin: 0 0 5px; +} + +.sales-order-create-index .grid table .action-configure { + float: right; +} + +.adminhtml-system-currency-index .import-service { + float: left; +} + +.adminhtml-system-currency-index .page-actions.fixed .import-service { + display: inline-block; + float: none; +} + +// Clearfix .clearfix:before, .clearfix:after, [class$="-layout"]:after, diff --git a/app/design/adminhtml/magento_backend/less/styles/base.less b/app/design/adminhtml/magento_backend/less/styles/base.less new file mode 100644 index 0000000000000000000000000000000000000000..273e9f8e3477770e0be6fe032855d90edeb3ac44 --- /dev/null +++ b/app/design/adminhtml/magento_backend/less/styles/base.less @@ -0,0 +1,367 @@ +///** +// * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. +// * +// * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) +// * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +// */ + +.actionLink() { + display: inline; + color: @linkColor; + text-decoration: none; + &:visited, + &:active { + color: @linkColor; + } + &:focus, + &:hover { + color: @linkColor; + text-decoration: underline; + } +} + +.actionLinkI() { + display: inline; + color: @linkColor2; + text-decoration: underline; + &:visited, + &:active { + color: @linkColor2; + } + &:focus, + &:hover { + color: @linkColor2; + text-decoration: underline; + } +} + +.style1() { // absent in design +} + +.style2 { + color: @primary1; + font-size: 13px; + font-weight: @baseFontWeightSemibold; +} + +.style3() { + color: @primary5; + font-size: 14px; + font-weight: @baseFontWeight; + + &:focus, + &:hover { + text-decoration: underline; + } +} + +.style4() { // absent in design +} + +.style5() { // absent in design +} + +.style6() { + color: @primary5; + font-size: 13px; + font-weight: @baseFontWeight; + + &:focus, + &:hover { + text-decoration: underline; + } +} + +.style7() { + color: @primary1; + font-size: 16px; + font-weight: @baseFontWeight; +} + +.style8() { + color: @primary6; + font-size: 13px; + font-weight: @baseFontWeight; +} + +.style9() { + color: @primary1; + font-size: 14px; + font-weight: @baseFontWeight; +} + +.style10() { + color: @primary1; + font-size: 20px; + font-weight: @baseFontWeight; +} + +.style11() { // absent in design +} + +.style12() { // absent in design +} + +.style13() { // absent in design +} + +.style14() { + color: @primary1; + font-size: 11px; + font-weight: @baseFontWeight; +} + +.style15() { + color: @primary7; + font-size: 13px; + font-weight: @baseFontWeight; +} + +.style15I() { + color: @primary1; + font-size: 13px; + font-weight: @baseFontWeight; +} + +.style16() { + color: @primary4; + font-size: 12px; + font-weight: @baseFontWeightSemibold; +} + +.style17() { // absent in design +} + +.style18() { + color: @primary1; + font-size: 13px; + font-weight: @baseFontWeight; +} + +.style19() { + color: @primary1; + font-size: 12px; + font-weight: @baseFontWeight; +} + +.style20() { // absent in design + color: @primary2; + font-size: 12px; + font-weight: @baseFontWeightSemibold; +} + +.style21() { // absent in design + color: @primary1; + font-size: 11px; + font-weight: @baseFontWeight; +} + +.style22() { + color: @primary5; + font-size: 12px; + font-weight: @baseFontWeight; + &:focus, + &:hover { + text-decoration: underline; + } +} + +.style23() { + color: @primary1; + font-size: 28px; + font-weight: @baseFontWeight; +} + +.style24() { // absent in design + color: @primary1; + font-size: 12px; + font-weight: @baseFontWeight; +} + +.style25() { // absent in design + color: @primary8; + font-size: 14px; + font-weight: @baseFontWeight; + &:focus, + &:hover { + text-decoration: underline; + } +} + +.style26() { // absent in design + color: @primary4; + font-size: 30px; + font-weight: @baseFontWeightBold; +} + +.style27() { // absent in design + color: @primary9; + font-size: 20px; + font-weight: @baseFontWeightBold; +} + +.style28() { + color: @primary1; + font-size: 14px; + font-weight: @baseFontWeightBold; +} + +.style29() { + color: @primary4; + font-size: 13px; + font-weight: @baseFontWeightBold; +} + +.style30() { + color: @primary1; + font-size: 14px; + font-weight: @baseFontWeightSemibold; +} + +.style31() { + color: @primary1; + font-size: 20px; + font-style: italic; + font-weight: @baseFontWeight; +} + +.style32() { + color: @primary6; + font-size: 14px; + font-weight: @baseFontWeightBold; +} + +.style33() { + color: @primary3; + font-size: 12px; + font-weight: @baseFontWeightSemibold; + + &:focus, + &:hover { + text-decoration: underline; + } +} + +.style34() { // no such html yet + color: @primary2; + font-size: 12px; + font-weight: @baseFontWeight; + &:focus, + &:hover { + text-decoration: underline; + } +} + +// Fonts + +@font-face { + font-family: 'admin-icons'; + src: url('../fonts/icons/admin-icons.eot'); + src: url('../fonts/icons/admin-icons.eot?#iefix') format('embedded-opentype'), url('../fonts/icons/admin-icons.svg#admin-icons') format('svg'), url('../fonts/icons/admin-icons.woff') format('woff'), url('../fonts/icons/admin-icons.ttf') format('truetype'); + font-weight: normal; + font-style: normal; +} + +@font-face { + font-family: 'MUI-Icons'; + src: url('../mui/fonts/MUI-Icons.eot'); + src: url('../mui/fonts/MUI-Icons.eot?#iefix') format('embedded-opentype'), url('../mui/fonts/MUI-Icons.svg#MUI-Icons') format('svg'), url('../mui/fonts/MUI-Icons.woff') format('woff'), url('../mui/fonts/MUI-Icons.ttf') format('truetype'); + font-weight: normal; + font-style: normal; +} + +/* @import url(http://fonts.googleapis.com/css?family=Open+Sans:400italic,400,600,700 <http://fonts.googleapis.com/css?family=Open+Sans:400italic%2c400%2c600%2c700>); */ + +@font-face { + font-family: 'Open Sans'; + font-style: normal; + font-weight: 400; + src: local('Open Sans'), local('OpenSans'), url(//themes.googleusercontent.com/static/fonts/opensans/v6/cJZKeOuBrn4kERxqtaUH3T8E0i7KZn-EPnyo3HZu7kw.woff) format('woff'); +} +@font-face { + font-family: 'Open Sans'; + font-style: normal; + font-weight: 600; + src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(//themes.googleusercontent.com/static/fonts/opensans/v6/MTP_ySUJH_bn48VBG8sNSnhCUOGz7vYGh680lGh-uXM.woff) format('woff'); +} +@font-face { + font-family: 'Open Sans'; + font-style: normal; + font-weight: 700; + src: local('Open Sans Bold'), local('OpenSans-Bold'), url(//themes.googleusercontent.com/static/fonts/opensans/v6/k3k702ZOKiLJc3WVjuplzHhCUOGz7vYGh680lGh-uXM.woff) format('woff'); +} +@font-face { + font-family: 'Open Sans'; + font-style: italic; + font-weight: 400; + src: local('Open Sans Italic'), local('OpenSans-Italic'), url(//themes.googleusercontent.com/static/fonts/opensans/v6/xjAJXh38I15wypJXxuGMBobN6UDyHWBl620a-IRfuBk.woff) format('woff'); +} + +// Base + +body, html { + min-height: 100%; + height: 100%; +} + +body { + color: @baseColor; + font: @baseFontWeight @baseFontSize/@baseLineHeight @baseFont; + background: #f2ebde; + position: relative; + height: auto; +} + +// Headings + +h1 { + color: @h1color; + font: @h1font; +} + +h2 { + color: @h2color; + font: @h2font; +} + +h3 { + color: @h3color; + font: @h3font; +} + +h4 { + color: @h4color; + font: @h4font; +} + +h5 { + color: @h5color; + font: @h5font; +} + +h6 { + color: @h6color; + font: @h6font; +} + +// Links + +a { + .actionLink(); +} \ No newline at end of file diff --git a/app/design/adminhtml/magento_backend/less/styles/debug.less b/app/design/adminhtml/magento_backend/less/styles/debug.less new file mode 100644 index 0000000000000000000000000000000000000000..29254208bae6fb03df5cc011db51e4ac0cb12b6f --- /dev/null +++ b/app/design/adminhtml/magento_backend/less/styles/debug.less @@ -0,0 +1,831 @@ +// /** +// * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. +// * +// * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) +// * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +// */ + +/* + This file was created to debug old classes in order to indicate where we must replase it with new ones + The types of messages are generated in file: \app\code\core\Mage\Core\Block\Messages.php like $html .= '<' . $this->_messagesSecondLevelTagName . ' class="' . $type . '-msg">'; +-------------------------------------- */ + +/* + All messages to identify and refactor: + +label.mage-error, +.notice, +.messages ul, +.messages li, +.messages ul li, +.error-msg, +.success-msg, +.notice-msg, +.warning-msg + +Done: +.notification-global +.notification-global-notice +-------------------------------------- */ +.debug { + border: 1px solid red !important; +} + +.messages ul, +ul.messages { + list-style: none; + margin: 0; + padding: 0; +} + +ul.messages > li { + margin: 20px 0; + +} + +ul.messages li li { + padding: 10px 26px 10px 35px; + border-radius: 5px; + color: #676056; + text-shadow: none; + position: relative; + background: #fffbf0; + border: 1px solid #d87e34; + margin-top: -1px; +} + +ul.messages li li:first-child { + margin-top: 0; +} + +ul.messages li li:before { + position: absolute; + left: 11px; + top: 50%; + margin-top: -11px; + background: none; + text-shadow: none; + width: auto; + height: auto; + border: 0; + font-family: 'MUI-Icons'; + font-style: normal; + speak: none; + font-weight: normal; + -webkit-font-smoothing: antialiased; + font-size: 16px; + content: '\e046'; /* icon-info */ + color: #d87e34; +} + +ul.messages li.error-msg li { + color: #963535; + border-color: #963535; + background: #f3dcd8; +} + +ul.messages li.error-msg li:before { + content: '\e069'; + color: #963535; +} + +ul.messages li.success-msg li { + border-color: #ceceb6; + background: #e4eecb; + color: #185b00; +} + +ul.messages li.success-msg li:before { + content: '\e067'; + color: #185b00; +} + +/* + Accordion +------------------------*/ +.accordion { + margin: 0 0 8px; + padding: 0; +} + +.accordion > dt, +.accordion > dd.open, +.accordion .collapseable, +.section-config.active > .collapseable + input + fieldset, +.accordion .collapseable.open + input + fieldset { + background: #fff; + border: 1px solid #eae6e0; + border-radius: 5px; + margin: 0 0 8px; + padding: 5px 18px 2px; + position: relative; +} + +.accordion > dt + dd { + display: none; +} + +.accordion > dt.open, +.section-config.active > .collapseable, +.accordion .collapseable.open { + margin: 0; + border-bottom: 0; + border-radius: 5px 5px 0 0; +} +.section-config.active > .collapseable + input + fieldset, +.accordion > dt + dd.open, +.accordion .collapseable.open + input + fieldset { + padding: 25px 18px 18px; + display: block; + border-top: 0; + border-radius: 0 0 5px 5px; +} + +.section-config > .collapseable > a, +.accordion > dt a, +.accordion .collapseable > a { + .style10(); + display: block; + padding: 7px 0 10px 22px; + text-decoration: none; + position: relative; + cursor: pointer; +} + +.section-config > .collapseable > a i, +.accordion > dt a i, +.accordion .collapseable > a i { + .style31(); +} + +.section-config.active > .collapseable > a, +.accordion .collapseable.open a, +.accordion dt.open a { + border-bottom: 1px solid #ededed; +} +.section-config > .collapseable > a:before, +.accordion > dt a:before, +.accordion .collapseable > a:before { + position: absolute; + left: 0; + top: 7px; + font-family: 'MUI-Icons'; + font-style: normal; + speak: none; + font-weight: normal; + -webkit-font-smoothing: antialiased; + content: '\e02a'; /* arrow right icon */ + color: #b2b0ad; +} + + +.section-config.active > .collapseable > a:before, +.accordion > dt.open a:before, +.accordion .collapseable.open a:before { + content: '\e02c'; /* arrow down icon */ +} +.section-config > .collapseable > a:hover:before, +.accordion > dt a:hover:before, +.accordion .collapseable > a:hover:before { + color: #7e7e7e; +} + +/* PayPal connected */ + +.section-config.complex .section-config.with-button { + padding:20px 15px; + margin:0 -30px 0 -15px; + border-bottom:1px solid #eae6e0; +} + +.section-config.complex tr:last-child .section-config.with-button { + border-bottom:0; +} + +.section-config.complex .section-config.with-button > .entry-edit-head { + padding:0; + padding-left:25px; + border:0; +} + +.section-config.complex .section-config.with-button.enabled > .entry-edit-head:before { + content: "\e01e"; + color:#fff; + background: #65940a; + font-family: "MUI-Icons"; + font-weight: normal; + padding:3px; + font-size: 10px; + width:10px; + height:10px; + line-height: 10px; + overflow: hidden; + border-radius: 8px; + display: block; + float:left; + margin-left:-25px; + margin-top:0; +} + +.section-config.complex .section-config.with-button > .config { + margin:10px -10px; + border:1px solid #d1d0ce; + border-radius: 5px; + padding:5px 0; +} +.section-config.complex .section-config.with-button > .config > table > tbody > tr > td { + padding:0; +} + +.section-config.complex .section-config.with-button > .config > table > tbody > tr > td > .section-config > .entry-edit-head { + border:0; + border-radius: 0; + margin-bottom:0; + padding:5px 10px 2px; + border-bottom:1px solid #d1d0ce; + background: transparent; +} +.section-config.complex .section-config.with-button > .config > table > tbody > tr:last-child > td > .section-config > .entry-edit-head { + border:0; +} +.section-config.complex .section-config.with-button > .config > table > tbody > tr > td > .section-config > .entry-edit-head a { + border-bottom:0; +} + +.section-config.complex .section-config.with-button > .config > table > tbody > tr > td > .section-config > .config { + border:0; + border-bottom:1px solid #d1d0ce; + border-radius: 0; + margin:0; + padding-bottom:50px; +} +.section-config.complex .section-config.with-button > .config > table > tbody > tr:last-child > td > .section-config > .config { + border-bottom:0; +} + +.section-config .config h4 { + padding-left:25%; + font-size: 18px; +} + +.section-config .config td.label label.enabled:before { +} +.section-config .config td.label label.enabled:before { + content: "\e01e"; + color:#fff; + background: #65940a; + font-family: "MUI-Icons"; + font-weight: normal; + padding:3px; + font-size: 10px; + width:10px; + height:10px; + line-height: 10px; + overflow: hidden; + border-radius: 8px; + display: block; + float:left; + margin-right:5px; +} + +.section-config.complex .section-config.with-button > .config:before { + content:''; + height: 9px; + width: 20px; + overflow: hidden; + display: block; + position: absolute; + bottom: 100%; + left: 50%; + zoom: 1; + z-index: 2; + margin-left: -10px; + background: url(../images/subconfig-bg.png) no-repeat 0 0; +} + +.section-config.config-advanced { + padding:30px 0 0; +} +.section-config.config-advanced > .entry-edit-head { + border:0; + padding:0; + padding-left:25%; +} +.section-config.config-advanced > .entry-edit-head a { + border:0 !important; +} +.section-config.config-advanced > .config { + padding-left:0!important; + padding-right:0!important; + border:0!important; + border-radius: 0!important; +} + +.section-config.config-advanced > .entry-edit-head a { + margin-left:-22px; +} + + +.section-config.with-button .config-heading strong { + display: block; + .style28(); + margin-bottom:5px; +} + +.section-config.with-button .config-heading .button-container { + margin:15px 0 0; +} +.section-config.with-button .button-container { + line-height: 28px; +} +.section-config.with-button .button-container a { + margin-left:20px; +} + +.section-config.with-button .action-configure span { + display: block; + position: relative; + text-align: center; +} +.section-config.with-button .action-configure .state-opened { + visibility: hidden; + height:0; + overflow: hidden; +} +.section-config.with-button .action-configure.open .state-opened { + visibility: visible; + height:auto; + overflow: auto; +} +.section-config.with-button .action-configure.open .state-closed { + visibility: hidden; + height:0; + overflow: hidden; +} + +.accordion > dt + dd { + display: none; +} + +.accordion > dt + .open:empty { + background: #fff url(../mui/images/ajax-loader-big.gif) no-repeat center; + height: 100px; +} + +/* TODO: arrange configuration tables */ +.accordion .collapseable.disabled { + background: #f1f1f1; +} + +.accordion .collapseable.disabled > a { + cursor: not-allowed; +} + +.accordion .collapseable.disabled > a:before { + content: ''; +} + +.accordion .config { + border: 0; +} + +.accordion .config .comment a { + .style3(); +} + +.accordion .config legend { + display: none; +} + +.eq-ie8 .accordion .config legend { + position: absolute; + left: -999em; + display: block; + width: 0; + height: 0; + padding: 0; + margin: 0; + overflow: hidden; +} + +.accordion .config table { + width: 100%; +} + +.accordion .config .label { + float: none; + width: 25%; + text-align: right; + .style2(); +} + +.accordion .config .value .label { + padding: 6px 5px 0 15px; + vertical-align: top; + width: auto; +} + +.accordion .config .value .label:first-child { + padding-left: 0; +} + +.accordion .config .label label { + padding-top: 6px; +} + +.accordion .config td { + background: none; + border: 0; + padding: 8px 15px 0 0; + vertical-align: top; +} + +.accordion .paypal-selection-simplified { + padding-left: 30px; +} + +.accordion .paypal-selection input[type="checkbox"] { + margin: -4px 7px 0 0; +} + +.accordion .config input[type="text"], +.accordion .config input[type="password"], +.accordion .config select, +.accordion .config textarea { + width: 100%; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} + +.accordion .config input.input-file { + margin-top: 4px; +} + +.accordion .config select.select-date { + width: 20%; +} + +.accordion .config .value { + width: 50%; + padding-right:40px; +} + +.accordion .config .value.with-tooltip { + padding-top:5px; +} +.accordion .config .value.with-tooltip .tooltip { + position: relative; + top:0; + left:0; + right:0; + bottom:0; + margin:0; + float:right; + margin-right:-20px; + margin-top:6px; +} +.accordion .config .value.with-tooltip .tooltip-content { + padding:15px; + right:0; + margin-left:0; + margin-right:-19px; + margin-bottom:10px; + left:auto; + top:auto; + bottom:100%; + width: 400px; + max-width: 400px; + line-height: 1.333; +} +.accordion .config .value.with-tooltip .tooltip-content:before { + content: ''; + position: absolute; + width: 0; + height: 0; + top: auto; + bottom:-5px; + left:auto; + right: 20px; + border-left: 5px solid transparent; + border-right: 5px solid transparent; + border-top: 5px solid #000; + border-bottom:0; + opacity: .8; +} + +.accordion .config .value.with-tooltip .help { + position: relative; + width:auto; + margin:0; +} + +.accordion .config .scope-label { + color: #999; + font-size: 12px; + letter-spacing: 0.05em; + padding: 15px 15px 0 0; +} + +.accordion .config .note { + .style19(); + padding-left: 15px; + margin: 5px 0; +} + +.accordion .config .note a { + .style22(); +} + +.accordion .config .note:before { + position: absolute; + margin: 4px 0 0 -14px; + content: ''; + display: inline-block; + vertical-align: top; + font-size: 0; + line-height: 0; + width: 0; + border-bottom: 5px solid #666; + border-left: 5px solid transparent; + border-right: 5px solid transparent; +} + +.accordion .config .system-tooltip-box { + position: absolute; +} + +.accordion .paypal-selection { + margin: 10px; + width: 98%; +} + +.accordion .paypal-selection th { + padding: 6px 10px 7px; +} + +.accordion .paypal-selection { + border-bottom: 2px solid #c0bbaf; +} + +.accordion .paypal-payment-notice { + margin: 10px; +} + +.accordion .custom-options { + border: 1px solid #999; + padding: 0 10px; + margin: 0 0 20px; +} + +/* TODO: arrange range inputs width in tables */ +.grid td input.input-text-range { + width: 35%; +} + +.grid td input.input-text-range-date { + width: 31%; +} + +/* TODO: styles for required TH fields */ +th.required:after { + color: red; + content: "*"; + margin-left: 5px; +} + +/* TODO: set color for messages in Cache Storage Management */ +.grid-severity-critical, +.grid-severity-major, +.grid-severity-notice, +.grid-severity-minor { + display: block; + border: 1px solid #c76f35; + background: #fffbf0; + text-align: center; +} + +.grid-severity-critical { + border-color: #6e1313; + background: #f7bfbf; + color: #6e1313; +} + +.grid-severity-major { + border-color: #963535; + background: #f3dcd8; + color: #963535; +} + +.grid-severity-notice { + border-color: #185b00; + background: #e6ecc0; + color: #185b00; +} + +/* + Sales +-------------------------------------- */ + +.order-items .entry-edit-head .form-buttons { + float: right; +} + +.order-items .entry-edit-head .icon-head { + display: inline; +} + +.order-items .entry-edit-head { + margin-bottom: 20px; +} + +.order-items .entry-edit-head:before, +.order-items .entry-edit-head:after { + content: ""; + display: table; +} + +.order-items .entry-edit-head:after { + clear: both; +} + +/* + Import-export tax rates +-------------------------------------- */ +.import-export-tax-rates input[type=file] { + margin-right: 10px; +} + +.import-tax-rates, +.export-tax-rates { + float: left; + width: 48.9362%; +} + +.export-tax-rates { + margin-left: 2.12766%; +} + +.import-export-tax-rates:before, +.import-export-tax-rates:after { + content: ""; + display: table; +} + +.import-export-tax-rates:after { + clear: both; +} + +/* + Product +-------------------------------------- */ +.tier { + margin: 20px 0 0; +} + +/* + Edit attribute set +-------------------------------------- */ +.attribute-set-col { + display: block; + float: left; + width: 100%; + margin-left: 2.127659574%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + -ms-box-sizing: border-box; + box-sizing: border-box; + width: 31.9149%; +} + +.attribute-set-col:first-child { + margin-left: 0; +} + +.attribute-set-tree { + margin-top: 5px; + overflow: auto; + height: 400px; + width: 100%; +} + +.attribute-set:before, +.attribute-set:after { + content: ""; + display: table; +} +.attribute-set:after { + clear: both; +} + +/* + Manage Categories +-------------------------------------- */ +.catalog-category-edit .category-edit-title { + float: left; +} + +/* + Catalog Price Rule +-------------------------------------- */ +.rule-tree-wrapper { + line-height: 28px; +} + +.rule-tree ul { + list-style: none; + padding-left: 16px; + border-left: dotted 1px #888; +} + +.rule-tree li { + margin: 0 0 10px; +} + +.rule-tree .x-tree ul { + padding-left: 0 !important; + border-left: none !important; +} + +.rule-param .label { + color: #000; + float: none; + text-align: left; + padding: 0; + vertical-align: baseline; + width: auto; +} + +.rule-param .label-disabled { + color: #eee; + cursor: default; + text-decoration: none; +} + +.rule-chooser, +.rule-param .element, +.rule-param-edit .label { + display: none; +} + +.rule-param input, +.rule-param select { + width: auto !important; + margin: 0; + min-width: 170px; +} + +.rule-param-edit .element { + display: inline; +} + +.rule-param-edit .element .addafter { + padding-left: 5px; +} + +[class^="rule-param-"] img, +.rule-chooser-trigger img { + vertical-align: middle; +} + +.rule-chooser { + border: solid 1px #CCC; + margin: 20px; + padding: 15px 10px 5px; +} + +.rule-param-wait { + background: url(../mui/images/ajax-loader-small.gif) no-repeat left center; + padding-left: 20px; +} + +/* + + URL Rewrite +-------------------------------------- */ +.field-url-rewrite-option-select { + padding-top: 13px; +} + + +/* jstree */ +.jstree-default .disabled > a { + color: #a29c94; +} +/* File brouser */ diff --git a/app/design/adminhtml/magento_backend/css/header.css b/app/design/adminhtml/magento_backend/less/styles/header.less similarity index 96% rename from app/design/adminhtml/magento_backend/css/header.css rename to app/design/adminhtml/magento_backend/less/styles/header.less index 0ee25f3fb8e7af0794d3182f16871654c96d14d2..c54f085dfb07ed3374b81fe7950f5d4bdc27dc2a 100644 --- a/app/design/adminhtml/magento_backend/css/header.css +++ b/app/design/adminhtml/magento_backend/less/styles/header.less @@ -1,5 +1,5 @@ -/** - * Magento +// /** +// * Magento * * NOTICE OF LICENSE * @@ -16,10 +16,10 @@ * Do not edit or add to this file if you wish to upgrade Magento to newer * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ +// * +// * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) +// * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +// */ /* Header @@ -137,8 +137,6 @@ padding: 20px 30px 13px 18px; background: #f7f3eb; border-bottom: 1px solid #f7e4d0; - color: #8C867E; - font: 11px/13px Arial, Helvetica, sans-serif; white-space: normal; } @@ -306,10 +304,8 @@ } .header-panel .notifications .value { - font-size: 9px; - font-weight: bold; + .style16(); line-height: 11px; - color: #fff; padding: 1px 3px; min-width: 10px; background: #f58220; @@ -332,10 +328,8 @@ .header-panel .dropdown-menu > li { background: #fff; border-bottom: 0; - color: #8c867e; position: relative; padding: 13px 26px 14px 16px; - font: 11px/13px Arial, Helvetica, sans-serif; white-space: normal; } @@ -355,11 +349,10 @@ } .header-panel .notifications > .dropdown-menu .notification-description { - max-height: 40px; + max-height: 43px; overflow: hidden; display: block; - font-family: Helvetica, Arial, sans-serif; - color: #676056; + .style14(); } .header-panel .notifications > .dropdown-menu .notification-entry { @@ -459,7 +452,6 @@ .notification-entry-dialog .notification-dialog-content strong { display: block; color: #f58220; - font-family: "CallunaSans"; font-size: 18px; font-weight: 500; } @@ -546,7 +538,6 @@ .header-panel .search .autocomplete-results .title { display: block; color: #f58220; - font-family: "CallunaSans"; font-size: 14px; font-weight: 500; margin-bottom: 5px; @@ -554,13 +545,10 @@ .header-panel .notifications > .dropdown-menu li > strong { display: block; - font-family: "CallunaSans"; - font-size: 14px; - font-weight: 500; - color: #f47b20; - max-height: 34px; + .style33(); + max-height: 32px; overflow: hidden; - line-height: 1.2; + line-height: 1.4; margin-bottom: 4px; } @@ -633,11 +621,9 @@ } .header-panel .notifications > .dropdown-menu time { - color: #8c867e; + .style14(); display: block; margin-top: 7px; - font-size: 10px; - font-family: Helvetica, Arial, sans-serif; } .header-panel .notifications > .dropdown-menu a:focus ~ .action-close, diff --git a/app/design/adminhtml/magento_backend/css/pages.css b/app/design/adminhtml/magento_backend/less/styles/pages.less similarity index 86% rename from app/design/adminhtml/magento_backend/css/pages.css rename to app/design/adminhtml/magento_backend/less/styles/pages.less index fd1fd798dd86614441e1f15343e5890e1ecb525a..8e3cf0933e5bea74e23a2ffd2589a7eac7d0e1b5 100644 --- a/app/design/adminhtml/magento_backend/css/pages.css +++ b/app/design/adminhtml/magento_backend/less/styles/pages.less @@ -1,5 +1,5 @@ -/** - * Magento +// /** +// * Magento * * NOTICE OF LICENSE * @@ -16,10 +16,10 @@ * Do not edit or add to this file if you wish to upgrade Magento to newer * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ +// * +// * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) +// * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +// */ /* Product Creation @@ -263,45 +263,6 @@ padding: 0 0 18px 20%; } -/* - Invitations ---------------------------------------*/ -.invitee_information, -.inviter_information { - width: 48.9362%; -} - -.invitee_information { - float: left; -} - -.inviter_information { - float: right; -} - -.invitation_information .data-table th, -.invitee_information .data-table th, -.inviter_information .data-table th { - width: 20%; - white-space: nowrap; -} - -.invitation_information .data-table textarea, -.invitation_information .data-table input { - width: 100%; -} - -.invitations-history ul { - margin: 0; - padding-left: 25px; -} - -.invitations-history ul .status:before { - display: inline-block; - content: "|"; - margin: 0 10px; -} - /* Configuration -> Design -------------------------------------- */ @@ -316,6 +277,17 @@ clear: both; } +/* + Configuration -> Payment Methods +-------------------------------------- */ +.adminhtml-system-config-edit .payflow-settings-notice .important-label { + .style32(); +} + +.adminhtml-system-config-edit .payflow-settings-notice ul.options-list strong { + .style28(); +} + /* CMS -> Banners -------------------------------------- */ @@ -689,27 +661,6 @@ text-align: left; } -/* - Reports - Customer Segment Report --------------------------------------- */ -.filter-segments { - list-style: none; - padding: 0; -} - -.adminhtml-report-customer-customersegment-detail .col-id { - width: 35px; -} - -.adminhtml-report-customer-customersegment-detail .col-period { - white-space: nowrap; - width: 70px; -} - -.adminhtml-report-customer-customersegment-detail .col-zip { - width: 50px; -} - /* Reports - Most Viewed -------------------------------------- */ @@ -771,56 +722,6 @@ width: 80px; } -/* - Reports - Order Conversion Rate --------------------------------------- */ -.adminhtml-report-invitation-order .col-period { - white-space: nowrap; - width: 70px; -} - -.adminhtml-report-invitation-order .col-inv-sent, -.adminhtml-report-invitation-order .col-inv-acc, -.adminhtml-report-invitation-order .col-acc, -.adminhtml-report-invitation-order .col-rate { - text-align: right; - width: 23%; -} - -/* - Reports - Invitations - Customer --------------------------------------- */ -.adminhtml-report-invitation-customer .col-id { - width: 35px; -} - -.adminhtml-report-invitation-customer .col-period { - white-space: nowrap; - width: 70px; -} - -.adminhtml-report-invitation-customer .col-inv-sent, -.adminhtml-report-invitation-customer .col-inv-acc { - text-align: right; - width: 120px; -} - -/* - Reports - Invitations - General --------------------------------------- */ -.adminhtml-report-invitation-index .col-period { - white-space: nowrap; -} - -.adminhtml-report-invitation-index .col-inv-sent, -.adminhtml-report-invitation-index .col-inv-acc, -.adminhtml-report-invitation-index .col-inv-disc, -.adminhtml-report-invitation-index .col-inv-acc-rate, -.adminhtml-report-invitation-index .col-inv-disc-rate { - text-align: right; - width: 19%; -} - /* Reports - Abandoned Carts -------------------------------------- */ @@ -960,31 +861,6 @@ text-align: right; } -/* - Reports - Customer Segments --------------------------------------- */ - -.adminhtml-report-customer-customersegment-segment .col-id { - width: 35px; -} - -.adminhtml-report-customer-customersegment-segment .col-status { - width: 65px; -} - -.adminhtml-report-customer-customersegment-segment .col-qty { - width: 145px; -} - -.adminhtml-report-customer-customersegment-segment .col-segment, -.adminhtml-report-customer-customersegment-segment .col-website { - width: 35%; -} - -.adminhtml-report-customer-customersegment-segment .col-select { - width: 45px; -} - /* Reports - Low Stock -------------------------------------- */ @@ -1120,12 +996,9 @@ width: 150px; } -/* - Gift Registry ---------------------------------------*/ + .table-fieldset-alt, -.type-options, -.giftregistry-custom-attributes { +.type-options { margin-bottom: 20px; } @@ -1321,7 +1194,6 @@ .action-switch-to-analytics:visited, .action-switch-to-hub:link, .action-switch-to-hub:visited { - font-family: 'CallunaSans', Arial, sans-serif; font-weight: 400; font-size: 16px; color: #19a3d1; @@ -1355,6 +1227,14 @@ Sales -------------------------------------- */ +#order-totals strong { + .style28(); +} + +#order-shipping-method-summary a { + .style3(); +} + .customer-current-activity { float: left; width: 22%; @@ -1596,24 +1476,7 @@ } .sales-order-create-index #order-data .fieldset-wrapper .actions .action-add { - background: #f58227; - background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2Y1ODIyNyIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNmMDcyMWMiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); - background: -moz-linear-gradient(top, #f58227 0%, #f0721c 100%); - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #f58227), color-stop(100%, #f0721c)); - background: -webkit-linear-gradient(top, #f58227 0%, #f0721c 100%); - background: -o-linear-gradient(top, #f58227 0%, #f0721c 100%); - background: -ms-linear-gradient(top, #f58227 0%, #f0721c 100%); - background: linear-gradient(to bottom, #f58227 0%, #f0721c 100%); - border: 1px solid #e4731c; - border-radius: 5px; - margin: 0 20px 0 0; - box-shadow: inset 0 1px 1px rgba(255, 255, 255, .1); - color: #fff; - margin-top: 7px; - margin-bottom: 8px; - padding: 4px 14px; - text-shadow: 0 1px 1px #8e3b05; - text-decoration: none; + margin: 7px 8px 8px 0; } .sales-order-create-index .order-additional-area.fieldset-wrapper .actions { @@ -1622,26 +1485,6 @@ padding: 0; } -.sales-order-create-index #order-data .fieldset-wrapper .actions .action-add:hover { - color: #fff; - background: #e47821; - background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2U0NzgyMSIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNkZTY4MTciIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); - background: -moz-linear-gradient(top, #e47821 0%, #de6817 100%); - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #e47821), color-stop(100%, #de6817)); - background: -webkit-linear-gradient(top, #e47821 0%, #de6817 100%); - background: -o-linear-gradient(top, #e47821 0%, #de6817 100%); - background: -ms-linear-gradient(top, #e47821 0%, #de6817 100%); - background: linear-gradient(to bottom, #e47821 0%, #de6817 100%); -} - -.eq-ie8 .sales-order-create-index #order-data .fieldset-wrapper .actions .action-add { - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f58227', endColorstr='#f0721c', GradientType=0); -} - -.eq-ie8 .sales-order-create-index #order-data .fieldset-wrapper .action-add:hover { - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#e47821', endColorstr='#de6817', GradientType=0); -} - .sales-order-create-index #order-data .fieldset-wrapper .actions .action-delete { margin: 11px 0 0; } @@ -1664,17 +1507,23 @@ } .create-order-sidebar-container > div .head h5 { + .style9(); margin: 17px 0 7px; } .customer-current-activity-inner > h4 { + .style10(); border-bottom: 1px solid #ededed; margin-top: 0; padding: 0 0 16px; } .customer-current-activity-inner .data-table th { - font-size: 11px; + .style18(); +} + +.customer-current-activity-inner .data-table td { + .style19(); } .customer-current-activity .action-refresh { @@ -1714,6 +1563,7 @@ } .customer-current-activity .auto-scroll { + .style18(); overflow: auto; max-height: 150px; } @@ -1849,11 +1699,7 @@ color: #963535; } -.adminhtml-giftwrapping-index th.col-id { - text-align: left; -} -.adminhtml-giftwrapping-index .col-id, .checkout-agreement-index .col-id, [class^=" sales-billing-"] .col-id, [class^=" sales-transactions-"] .col-id { @@ -1888,8 +1734,7 @@ [class^=" sales-order-"] .col-subtotal, [class^=" sales-order-"] .col-price, -[class^=" adminhtml-rma-"] .col-price, -.adminhtml-giftwrapping-index .col-price { +[class^=" adminhtml-rma-"] .col-price { text-align: right; width: 50px; } @@ -1901,14 +1746,12 @@ [class^=" sales-"] .col-actions, [class^=" adminhtml-rma-"] .col-actions, -[class^=" adminhtml-rma-"] .col-default, -.adminhtml-giftwrapping-index .col-actions { +[class^=" adminhtml-rma-"] .col-default { width: 50px; } [class^=" sales-"] .col-select, -[class^=" adminhtml-rma-"] .col-select, -.adminhtml-giftwrapping-index .col-select { +[class^=" adminhtml-rma-"] .col-select { width: 60px; } @@ -1936,7 +1779,6 @@ [class^=" adminhtml-rma-"] .col-order-number, [class^=" adminhtml-rma-"] .col-rma-number, [class^=" sales-transactions-"] .col-order-id, -.adminhtml-giftwrapping-index .col-status, .sales-order-view .col-refunded { white-space: normal; width: 75px; @@ -1983,7 +1825,6 @@ width: 190px; } -.adminhtml-giftwrapping-index .col-websites, .checkout-agreement-index .col-store-view { white-space: nowrap; width: 200px; @@ -2022,7 +1863,6 @@ text-align: right; } -.adminhtml-giftwrapping-index .col-price .label, [class^=" sales-order-"] .col-price .label, [class^=" sales-order-"] .col-subtotal .label { display: inline-block; @@ -2030,8 +1870,6 @@ white-space: nowrap; } -.adminhtml-giftwrapping-index .col-price .price-excl-tax .price, -.adminhtml-giftwrapping-index .col-price .price-incl-tax .price, [class^=" sales-order-"] .col-price .price-excl-tax .price, [class^=" sales-order-"] .col-price .price-incl-tax .price, [class^=" sales-order-"] .col-subtotal .price-excl-tax .price, @@ -2428,7 +2266,8 @@ table.items-to-invoice tbody tr:hover td { .popup-window-title .title { color: #676056; display: block; - font: 20px/1 'CallunaSans', Arial, sans-serif; + font-size: 20px; + line-height: 1; } .popup-window-title .actions { @@ -2470,7 +2309,6 @@ table.items-to-invoice tbody tr:hover td { .popup-fieldset-title .title { color: #666; display: inline-block; - font-family: 'CallunaSans', Arial, sans-serif; font-size: 18px; font-weight: normal; padding: 7px 0 10px; @@ -2640,59 +2478,6 @@ table.items-to-invoice tbody tr:hover td { background: #fff !important; } -.adminhtml-giftwrapping-edit .field-image .control { - line-height: 28px; -} - -.adminhtml-giftwrapping-edit .field-image a { - display: inline-block; - margin: 0 5px 0 0; -} - -.adminhtml-giftwrapping-edit .field-image img { - vertical-align: middle; -} - -.adminhtml-giftwrapping-new .field-image .input-file, -.adminhtml-giftwrapping-edit .field-image .input-file { - display: inline-block; - margin: 0 15px 0 0; - width: auto; -} - -.adminhtml-giftwrapping-new .field-image .addafter, -.adminhtml-giftwrapping-edit .field-image .addafter { - border: 0; - box-shadow: none; - display: inline-block; - margin: 0 15px 0 0; - height: auto; - width: auto; -} - -.adminhtml-giftwrapping-new .field-image .delete-image, -.adminhtml-giftwrapping-edit .field-image .delete-image { - display: inline-block; - white-space: nowrap; -} - -.adminhtml-giftwrapping-edit .field-image .delete-image input { - margin: -3px 5px 0 0; - width: auto; - display: inline-block; -} - -.adminhtml-giftwrapping-edit .field-image .addon .delete-image input:focus + label { - border: 0; - box-shadow: none; -} - -.adminhtml-giftwrapping-edit .store-switcher { - float: left; - position: relative; - bottom: -14px; -} - /* URL rewrite -------------------------------------- */ diff --git a/app/design/adminhtml/magento_backend/less/vars.less b/app/design/adminhtml/magento_backend/less/vars.less new file mode 100644 index 0000000000000000000000000000000000000000..716bfa4a9976479d37f5a1a7d4b3e0eea107b610 --- /dev/null +++ b/app/design/adminhtml/magento_backend/less/vars.less @@ -0,0 +1,87 @@ +// /** +// * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. +// * +// * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) +// * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +// */ + +@baseDir: ~".."; + +// Primary colors +@primary1: #676056; +@primary2: #ed4f2e; +@primary3: #026294; +@primary4: #fff; +@primary5: #007dbd; +@primary6: #e22626; +@primary7: #f2ebde; +@primary8: #31302b; +@primary9: #ef672f; + +// Buttons +// Default Buttons +@defaultButton1: #f2ebde; +@defaultButton2: #ada89e; +@defaultButton3: #676056; +@defaultButton4: #cac3b4; +@defaultButton5: #989287; + +// Primary Buttons +@primaryButton1: #007dbd; +@primaryButton2: #0574ad; +@primaryButton3: #026294; +@primaryButton4: #004c74; + +// Links +@linkColor: @primary3; +@linkColor2: @primary4; + +// Base font +@baseFont: 'Open Sans', sans-serif; +@baseFontSize: 14px; +@baseFontWeight: 400; +@baseFontWeightSemibold: 600; +@baseFontWeightBold: 700; +@baseLineHeight: 1.33; +@baseColor: @primary1; + +// Headings +// H1 +@h1color: @primary1; +@h1font: 400 28px/1.2 @baseFont; + +// H2 +@h2color: @primary1; +@h2font: 400 20px/1.2 @baseFont; + +// H3 +@h3color: @primary1; +@h3font: 600 16px/1.2 @baseFont; + +// H4 +@h4color: @primary1; +@h4font: 600 14px/1.2 @baseFont; + +// H5 +@h5color: @primary1; +@h5font: 600 13px/1.2 @baseFont; + +// H6 +@h6color: @primary1; +@h6font: 600 12px/1.2 @baseFont; diff --git a/app/design/adminhtml/magento_backend/mui/base.css b/app/design/adminhtml/magento_backend/mui/base.css index 9c5d6afbde1bd5b7ed4c85777c5b8bfa1cbe648c..8762d4d8fa98973f3001a5cd99dccb39b5c497da 100644 --- a/app/design/adminhtml/magento_backend/mui/base.css +++ b/app/design/adminhtml/magento_backend/mui/base.css @@ -29,184 +29,6 @@ font-style: normal; } -/* - Simple 'button view' action (default size) --------------------------------------- */ -input[type=button], -input[type=submit], -input[type=reset], -button, -input[type=button]:visited, -input[type=submit]:visited, -input[type=reset]:visited, -button:visited, -[class^="action-"], -[class^="action-"]:visited { - font: 14px/18px 'CallunaSans', Arial, Helvetica, sans-serif; - font-weight: 500; - background: #e8e5e0; - background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2U4ZTVlMCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNkZGRhZDMiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); - background: -moz-linear-gradient(top, #e8e5e0 0%, #dddad3 100%); - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#e8e5e0), color-stop(100%,#dddad3)); - background: -webkit-linear-gradient(top, #e8e5e0 0%,#dddad3 100%); - background: -o-linear-gradient(top, #e8e5e0 0%,#dddad3 100%); - background: -ms-linear-gradient(top, #e8e5e0 0%,#dddad3 100%); - background: linear-gradient(to bottom, #e8e5e0 0%,#dddad3 100%); - color: #47413a; - display: inline-block; - padding: 4px 14px; - text-align: center; - text-decoration: none; - vertical-align: top; - cursor: pointer; - border: 1px solid #c5c0b9; - border-radius: 5px; - -webkit-touch-callout: none; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - text-shadow: 0 1px 0 rgba(255,255,255,.5); - box-shadow: inset 0 1px 1px rgba(255,255,255,.5); -} - -.eq-ie8 input[type=button], -.eq-ie8 input[type=submit], -.eq-ie8 input[type=reset], -.eq-ie8 button, -.eq-ie8 input[type=button]:visited, -.eq-ie8 input[type=submit]:visited, -.eq-ie8 input[type=reset]:visited, -.eq-ie8 button:visited, -.eq-ie8 [class^="action-"], -.eq-ie8 [class^="action-"]:visited { - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e8e5e0', endColorstr='#dddad3',GradientType=0 ); -} - -input[type=button]:hover, -input[type=submit]:hover, -input[type=reset]:hover, -button:hover, -input[type=button]:focus, -input[type=submit]:focus, -input[type=reset]:focus, -button:focus, -[class^="action-"]:hover, -[class^="action-"]:focus { - background: #dfdbd4; - background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2RmZGJkNCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNkM2NkYzQiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); - background: -moz-linear-gradient(top, #dfdbd4 0%, #d3cdc4 100%); - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#dfdbd4), color-stop(100%,#d3cdc4)); - background: -webkit-linear-gradient(top, #dfdbd4 0%,#d3cdc4 100%); - background: -o-linear-gradient(top, #dfdbd4 0%,#d3cdc4 100%); - background: -ms-linear-gradient(top, #dfdbd4 0%,#d3cdc4 100%); - background: linear-gradient(to bottom, #dfdbd4 0%,#d3cdc4 100%); - color: #322e2a; -} - -.eq-ie8 input[type=button]:hover, -.eq-ie8 input[type=submit]:hover, -.eq-ie8 input[type=reset]:hover, -.eq-ie8 button:hover, -.eq-ie8 input[type=button]:focus, -.eq-ie8 input[type=submit]:focus, -.eq-ie8 input[type=reset]:focus, -.eq-ie8 button:focus, -.eq-ie8 [class^="action-"]:hover, -.eq-ie8 [class^="action-"]:focus { - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#dfdbd4', endColorstr='#d3cdc4',GradientType=0 ); -} - -input[type=button]:active, -input[type=submit]:active, -input[type=reset]:active, -button:active, -input[type=button].active, -input[type=submit].active, -input[type=reset].active, -button.active, -[class^="action-"]:active, -[class^="action-"].active { - background: #dbd6ce; - box-shadow: 0 1px 1px #aaa59b inset; - text-shadow: none; -} - -.eq-ie8 input[type=button]:active, -.eq-ie8 input[type=submit]:active, -.eq-ie8 input[type=reset]:active, -.eq-ie8 button:active, -.eq-ie8 input[type=button].active, -.eq-ie8 input[type=submit].active, -.eq-ie8 input[type=reset].active, -.eq-ie8 button.active, -.eq-ie8 [class^="action-"]:active, -.eq-ie8 [class^="action-"].active { - filter: none; -} - -input[type=button][disabled], -input[type=submit][disabled], -input[type=reset][disabled], -button[disabled], -input[type=button].disabled, -input[type=submit].disabled, -input[type=reset].disabled, -button.disabled, -input[type=button][disabled]:hover, -input[type=submit][disabled]:hover, -input[type=reset][disabled]:hover, -button[disabled]:hover, -input[type=button].disabled:hover, -input[type=submit].disabled:hover, -input[type=reset].disabled:hover, -button.disabled:hover, -input[type=button][disabled]:focus, -input[type=submit][disabled]:focus, -input[type=reset][disabled]:focus, -button[disabled]:focus, -input[type=button].disabled:focus, -input[type=submit].disabled:focus, -input[type=reset].disabled:focus, -button.disabled:focus, -input[type=button][disabled]:active, -input[type=submit][disabled]:active, -input[type=reset][disabled]:active, -button[disabled]:active, -input[type=button].disabled:active, -input[type=submit].disabled:active, -input[type=reset].disabled:active, -button.disabled:active, -input[type=button][disabled].active, -input[type=submit][disabled].active, -input[type=reset][disabled].active, -button[disabled].active, -input[type=button].disabled.active, -input[type=submit].disabled.active, -input[type=reset].disabled.active, -button.disabled.active, -[class^="action-"][disabled], -[class^="action-"].disabled, -[class^="action-"][disabled]:visited, -[class^="action-"].disabled:visited, -[class^="action-"][disabled]:hover, -[class^="action-"].disabled:hover, -[class^="action-"][disabled]:focus, -[class^="action-"].disabled:focus, -[class^="action-"][disabled]:active, -[class^="action-"].disabled:active, -[class^="action-"][disabled].active, -[class^="action-"].disabled.active { - color: #bbb3b4; - color: rgba(71, 65, 58, 0.6); - cursor: not-allowed; - opacity: 0.6; - background: #e4e1db; - box-shadow: none; - text-shadow: none; - filter:progid:DXImageTransform.Microsoft.Alpha(opacity=60); -} - /* Buttons group -------------------------------------- */ diff --git a/app/design/frontend/magento_backup/Magento_Checkout/cart.phtml b/app/design/frontend/magento_backup/Magento_Checkout/cart.phtml new file mode 100644 index 0000000000000000000000000000000000000000..2931540d95f4714dc5564cb95fb40995c191c057 --- /dev/null +++ b/app/design/frontend/magento_backup/Magento_Checkout/cart.phtml @@ -0,0 +1,172 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category design + * @package base_default + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +?> +<?php +/** + * Shopping cart template + * + * @see \Magento\Checkout\Block\Cart + */ +?> +<?php if ($this->getItemsCount()): ?> +<div class="cart"> + <div class="page-title title-buttons"> + <h1><?php echo __('Shopping Cart') ?></h1> + <?php if(!$this->hasError()): ?> + <ul class="checkout-types"> + <?php foreach ($this->getMethods('top_methods') as $method): ?> + <?php if ($methodHtml = $this->getMethodHtml($method)): ?> + <li><?php echo $methodHtml; ?></li> + <?php endif; ?> + <?php endforeach; ?> + </ul> + <?php endif; ?> + </div> + <?php echo $this->getMessagesBlock()->getGroupedHtml() ?> + <?php echo $this->getChildHtml('form_before') ?> + <form action="<?php echo $this->getUrl('checkout/cart/updatePost') ?>" method="post" id="form-validate" data-mage-init="{validation: []}"> + <fieldset> + <table id="shopping-cart-table" class="data-table cart-table"> + <col width="1" /> + <col /> + <col width="1" /> + <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllowInCart()) : ?> + <col width="1" /> + <?php endif ?> + <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartPriceExclTax() || $this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> + <col width="1" /> + <?php endif; ?> + <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartPriceInclTax() || $this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> + <col width="1" /> + <?php endif; ?> + <col width="1" /> + <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartPriceExclTax() || $this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> + <col width="1" /> + <?php endif; ?> + <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartPriceInclTax() || $this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> + <col width="1" /> + <?php endif; ?> + <col width="1" /> + + <?php $mergedCells = ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices() ? 2 : 1); ?> + <thead> + <tr> + <th rowspan="<?php echo $mergedCells; ?>"> </th> + <th rowspan="<?php echo $mergedCells; ?>"><span class="nobr"><?php echo __('Product Name') ?></span></th> + <th rowspan="<?php echo $mergedCells; ?>"></th> + <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllowInCart()) : ?> + <th rowspan="<?php echo $mergedCells; ?>" class="a-center"><span class="nobr"><?php echo __('Move to Wish List') ?></span></th> + <?php endif ?> + <th class="a-center" colspan="<?php echo $mergedCells; ?>"><span class="nobr"><?php echo __('Unit Price') ?></span></th> + <th rowspan="<?php echo $mergedCells; ?>" class="a-center"><?php echo __('Qty') ?></th> + <th class="a-center" colspan="<?php echo $mergedCells; ?>"><?php echo __('Subtotal') ?></th> + <th rowspan="<?php echo $mergedCells; ?>" class="a-center"> </th> + </tr> + <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> + <tr> + <th class="a-right"><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(false) ?></th> + <th><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(true) ?></th> + <th class="a-right"><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(false) ?></th> + <th><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(true) ?></th> + </tr> + <?php endif; ?> + </thead> + <tfoot> + <tr> + <td colspan="50" class="a-right"> + <?php if($this->getContinueShoppingUrl()): ?> + <button type="button" title="<?php echo __('Continue Shopping') ?>" class="button btn-continue"><span><span><?php echo __('Continue Shopping') ?></span></span></button> + <?php endif; ?> + <button type="submit" name="update_cart_action" value="update_qty" title="<?php echo __('Update Shopping Cart'); ?>" class="button btn-update"><span><span><?php echo __('Update Shopping Cart'); ?></span></span></button> + <button type="submit" name="update_cart_action" value="empty_cart" title="<?php echo __('Clear Shopping Cart'); ?>" class="button btn-empty" id="empty_cart_button"><span><span><?php echo __('Clear Shopping Cart'); ?></span></span></button> + <!--[if lt IE 8]> + <input type="hidden" value="" id="update_cart_action_container" /> + <![endif]--> + <script type="text/javascript"> + //<![CDATA[ + (function($) { + head.js("<?php echo $this->getViewFileUrl('Magento_Checkout::js/shopping-cart.js')?>", + function() { + // Internet Explorer (lt 8) does not support value attribute in button elements + $('#shopping-cart-table').shoppingCart({ + continueShoppingButton: 'button.btn-continue', + continueShoppingUrl: '<?php echo $this->getContinueShoppingUrl() ?>', + emptyCartButton: 'button.btn-empty', + updateCartActionContainer: '#update_cart_action_container' + }); + }); + })(jQuery); + //]]> + </script> + </td> + </tr> + </tfoot> + <tbody> + <?php foreach($this->getItems() as $_item): ?> + <?php echo $this->getItemHtml($_item) ?> + <?php endforeach ?> + </tbody> + </table> + <script type="text/javascript">(function($) {$('#shopping-cart-table').decorate('table')})(jQuery)</script> + </fieldset> + </form> + <div class="cart-collaterals"> + <div class="col2-set"> + <div class="col-1"> + <?php echo $this->getChildHtml('crosssell') ?> + </div> + <div class="col-2"> + <?php /* Extensions placeholder */ ?> + <?php echo $this->getChildHtml('checkout.cart.extra') ?> + <?php if (!$this->getIsVirtual()): echo $this->getChildHtml('shipping'); endif; ?> + </div> + </div> + <div class="totals"> + <?php echo $this->getChildHtml('totals'); ?> + <?php if(!$this->hasError()): ?> + <ul class="checkout-types"> + <?php foreach ($this->getMethods('methods') as $method): ?> + <?php if ($methodHtml = $this->getMethodHtml($method)): ?> + <li><?php echo $methodHtml; ?></li> + <?php endif; ?> + <?php endforeach; ?> + </ul> + <?php endif; ?> + </div> + </div> +</div> +<?php else: ?> +<div class="page-title"> + <h1><?php echo __('Shopping Cart is Empty') ?></h1> +</div> +<div class="cart-empty"> + <?php echo $this->getMessagesBlock()->getGroupedHtml() ?> + <?php echo $this->getChildHtml('checkout_cart_empty_widget'); ?> + <p><?php echo __('You have no items in your shopping cart.') ?></p> + <p><?php echo __('Click <a href="%1">here</a> to continue shopping.', $this->getContinueShoppingUrl()) ?></p> + <?php echo $this->getChildHtml('shopping.cart.table.after'); ?> +</div> +<?php endif; ?> diff --git a/app/design/frontend/magento_backup/Magento_Checkout/cart/coupon.phtml b/app/design/frontend/magento_backup/Magento_Checkout/cart/coupon.phtml new file mode 100644 index 0000000000000000000000000000000000000000..9386430baa075ad710322dcb1a5fa508286e4e3d --- /dev/null +++ b/app/design/frontend/magento_backup/Magento_Checkout/cart/coupon.phtml @@ -0,0 +1,60 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category design + * @package base_default + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +?> +<form id="discount-coupon-form" action="<?php echo $this->getUrl('checkout/cart/couponPost') ?>" method="post"> + <div class="discount"> + <h2><?php echo __('Discount Codes') ?></h2> + <div class="discount-form"> + <label for="coupon_code"><?php echo __('Enter your coupon code if you have one.') ?></label> + <input type="hidden" name="remove" id="remove-coupon" value="0" /> + <div class="input-box"> + <input class="input-text" id="coupon_code" name="coupon_code" value="<?php echo $this->escapeHtml($this->getCouponCode()) ?>" /> + </div> + <div class="buttons-set"> + <button type="button" title="<?php echo __('Apply Coupon') ?>" class="button apply-coupon" value="<?php echo __('Apply Coupon') ?>"><span><span><?php echo __('Apply Coupon') ?></span></span></button> + <?php if(strlen($this->getCouponCode())): ?> + <button type="button" title="<?php echo __('Cancel Coupon') ?>" class="button cancel-coupon" value="<?php echo __('Cancel Coupon') ?>"><span><span><?php echo __('Cancel Coupon') ?></span></span></button> + <?php endif;?> + </div> + </div> + </div> +</form> +<script type="text/javascript"> +//<![CDATA[ + (function($) { + head.js("<?php echo $this->getViewFileUrl('jquery/jquery.validate.js')?>", + "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation/validation.js')?>", + "<?php echo $this->getViewFileUrl('Magento_Checkout::js/discount-codes.js')?>", function() { + $('#discount-coupon-form').discountCode({ + couponCodeSelector: '#coupon_code', removeCouponSelector: '#remove-coupon', + applyButton: 'button.apply-coupon', cancelButton: 'button.cancel-coupon' + }); + }); + })(jQuery); +//]]> +</script> diff --git a/app/code/Magento/Checkout/view/frontend/cart/crosssell.phtml b/app/design/frontend/magento_backup/Magento_Checkout/cart/crosssell.phtml similarity index 100% rename from app/code/Magento/Checkout/view/frontend/cart/crosssell.phtml rename to app/design/frontend/magento_backup/Magento_Checkout/cart/crosssell.phtml diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/cart/item/configure/updatecart.phtml b/app/design/frontend/magento_backup/Magento_Checkout/cart/item/configure/updatecart.phtml similarity index 71% rename from app/design/frontend/magento_plushe/Magento_Checkout/cart/item/configure/updatecart.phtml rename to app/design/frontend/magento_backup/Magento_Checkout/cart/item/configure/updatecart.phtml index 34e87f8932f92affe0888571715dfde03719b34e..e24f55d04aea4a74711e05b4f80b15e9e37c34ca 100644 --- a/app/design/frontend/magento_plushe/Magento_Checkout/cart/item/configure/updatecart.phtml +++ b/app/design/frontend/magento_backup/Magento_Checkout/cart/item/configure/updatecart.phtml @@ -19,25 +19,27 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design + * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> + <?php $_product = $this->getProduct(); ?> <?php $buttonTitle = __('Update Cart'); ?> <?php if ($_product->isSaleable()): ?> - <div class="box tocart update"> + <div class="add-to-cart"> <?php if (!$_product->isGrouped()): ?> - <div class="field qty"> - <label class="label" for="qty"><span><?php echo __('Qty:') ?></span></label> - <div class="control"> - <input type="text" name="qty" id="qty" maxlength="12" value="<?php echo $this->getProductDefaultQty() * 1 ?>" title="<?php echo __('Qty') ?>" class="input-text qty" data-validate=" {required:true,digits:true}"/> - </div> - </div> + <label for="qty"><?php echo __('Qty:') ?></label> + <input type="text" name="qty" id="qty" maxlength="12" value="<?php echo $this->getProductDefaultQty() * 1 ?>" + title="<?php echo __('Qty') ?>" class="input-text qty" + <?php if ($_product->getStockItem() && $_product->getStockItem()->getIsQtyDecimal()) : ?> + data-validate="{required:true, 'validate-greater-than-zero':true}"/> + <?php else: ?> + data-validate="{required:true, digits:true}"/> + <?php endif; ?> <?php endif; ?> - <div class="actions"> - <button type="button" class="action primary tocart" title="<?php echo $buttonTitle ?>" id="product-updatecart-button"><span><?php echo $buttonTitle ?></span></button> - </div> + <button type="button" title="<?php echo $buttonTitle ?>" class="button btn-cart" id="product-updatecart-button"><span><span><?php echo $buttonTitle ?></span></span></button> <?php echo $this->getChildHtml('', true) ?> </div> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/cart/item/default.phtml b/app/design/frontend/magento_backup/Magento_Checkout/cart/item/default.phtml similarity index 78% rename from app/design/frontend/magento_plushe/Magento_Checkout/cart/item/default.phtml rename to app/design/frontend/magento_backup/Magento_Checkout/cart/item/default.phtml index 9871473d843837bfabb5d987bc90d34f6c6b18dd..1c3fff9ed0a2b45d28fdc44109e6726736c2005b 100644 --- a/app/design/frontend/magento_plushe/Magento_Checkout/cart/item/default.phtml +++ b/app/design/frontend/magento_backup/Magento_Checkout/cart/item/default.phtml @@ -19,77 +19,95 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design + * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> <?php +/** @var $_item \Magento\Sales\Model\Quote\Item */ $_item = $this->getItem(); $isVisibleProduct = $_item->getProduct()->isVisibleInSiteVisibility(); $canApplyMsrp = $this->helper('Magento\Catalog\Helper\Data')->canApplyMsrp($_item->getProduct(), \Magento\Catalog\Model\Product\Attribute\Source\Msrp\Type::TYPE_BEFORE_ORDER_CONFIRM); ?> -<tbody class="cart item"> -<tr class="item info"> - <td class="col item"> - <?php if ($this->hasProductUrl()):?><a href="<?php echo $this->getProductUrl() ?>" title="<?php echo $this->escapeHtml($this->getProductName()) ?>" class="product photo"> - <?php else:?> - <span class="product photo"> - <?php endif;?> - <?php echo $this->getLayout()->createBlock('Magento\Catalog\Block\Product\Image')->init($_item->getProduct(), 'cart_page_product_thumbnail')->toHtml(); ?> - <?php if ($this->hasProductUrl()):?></a><?php else: ?></span><?php endif; ?> - <div class="product details"> - <strong class="product name"> - <?php if ($this->hasProductUrl()):?> - <a href="<?php echo $this->getProductUrl() ?>"><?php echo $this->escapeHtml($this->getProductName()) ?></a> - <?php else: ?> - <?php echo $this->escapeHtml($this->getProductName()) ?> - <?php endif; ?> - </strong> - <?php if ($_options = $this->getOptionList()):?> - <dl class="cart item options"> - <?php foreach ($_options as $_option) : ?> - <?php $_formatedOptionValue = $this->getFormatedOptionValue($_option) ?> - <dt><?php echo $this->escapeHtml($_option['label']) ?></dt> - <dd<?php if (isset($_formatedOptionValue['full_view'])): ?> class="truncated" data-mage-init="{truncateOptions:[]}"<?php endif; ?>><?php echo $_formatedOptionValue['value'] ?> - <?php if (isset($_formatedOptionValue['full_view'])): ?> - <div class="truncated_full_value"> - <dl class="item-options"> - <dt><?php echo $this->escapeHtml($_option['label']) ?></dt> - <dd><?php echo $_formatedOptionValue['full_view'] ?></dd> - </dl> - </div> - <?php endif; ?> - </dd> - <?php endforeach; ?> - </dl> - <?php endif;?> - <?php if ($messages = $this->getMessages()): ?> - <?php foreach ($messages as $message): ?> - <p class="cart item message <?php echo $message['type'] ?>">* <?php echo $this->escapeHtml($message['text']) ?></p> +<tr> + <td><?php if ($this->hasProductUrl()):?><a href="<?php echo $this->getProductUrl() ?>" title="<?php echo $this->escapeHtml($this->getProductName()) ?>" class="product-image"><?php endif;?><img src="<?php echo $this->getProductThumbnailUrl() ?>" width="<?php echo $this->getThumbnailSize()?>" height="<?php echo $this->getThumbnailSize()?>" alt="<?php echo $this->escapeHtml($this->getProductName()) ?>" /><?php if ($this->hasProductUrl()):?></a><?php endif;?></td> + <td> + <h2 class="product-name"> + <?php if ($this->hasProductUrl()):?> + <a href="<?php echo $this->getProductUrl() ?>"><?php echo $this->escapeHtml($this->getProductName()) ?></a> + <?php else: ?> + <?php echo $this->escapeHtml($this->getProductName()) ?> + <?php endif; ?> + </h2> + <?php if ($_options = $this->getOptionList()):?> + <dl class="item-options"> + <?php foreach ($_options as $_option) : ?> + <?php $_formatedOptionValue = $this->getFormatedOptionValue($_option) ?> + <dt><?php echo $this->escapeHtml($_option['label']) ?></dt> + <dd<?php if (isset($_formatedOptionValue['full_view'])): ?> class="truncated" data-mage-init="{truncateOptions:[]}"<?php endif; ?>><?php echo $_formatedOptionValue['value'] ?> + <?php if (isset($_formatedOptionValue['full_view'])): ?> + <div class="truncated_full_value"> + <dl class="item-options"> + <dt><?php echo $this->escapeHtml($_option['label']) ?></dt> + <dd><?php echo $_formatedOptionValue['full_view'] ?></dd> + </dl> + </div> + <?php endif; ?> + </dd> <?php endforeach; ?> - <?php endif; ?> - <?php $addInfoBlock = $this->getProductAdditionalInformationBlock(); ?> - <?php if ($addInfoBlock): ?> - <?php echo $addInfoBlock->setItem($_item)->toHtml() ?> - <?php endif;?> - </div> + </dl> + <?php endif;?> + <?php if ($messages = $this->getMessages()): ?> + <?php foreach ($messages as $message): ?> + <p class="item-msg <?php echo $message['type'] ?>">* <?php echo $this->escapeHtml($message['text']) ?></p> + <?php endforeach; ?> + <?php endif; ?> + <?php $addInfoBlock = $this->getProductAdditionalInformationBlock(); ?> + <?php if ($addInfoBlock): ?> + <?php echo $addInfoBlock->setItem($_item)->toHtml() ?> + <?php endif;?> + </td> + <td class="a-center"> + <?php if ($isVisibleProduct): ?> + <a href="<?php echo $this->getConfigureUrl() ?>" title="<?php echo __('Edit item parameters') ?>"><?php echo __('Edit') ?></a> + <?php endif ?> </td> + <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllowInCart()) : ?> + <td class="a-center"> + <?php if ($isVisibleProduct): ?> + <a href="<?php echo $this->helper('Magento\Wishlist\Helper\Data')->getMoveFromCartUrl($_item->getId()); ?>" class="link-wishlist use-ajax"><?php echo __('Move'); ?></a> + <?php endif ?> + </td> + <?php endif ?> <?php if ($canApplyMsrp): ?> - <td class="col msrp a-right"<?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> colspan="2"<?php endif; ?>> + <td class="a-right"<?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> colspan="2"<?php endif; ?>> <span class="cart-price"> <span class="cart-msrp-unit"><?php echo __('See price before order confirmation.'); ?></span> <?php $helpLinkId = 'cart-msrp-help-' . $_item->getId(); ?> <a id="<?php echo $helpLinkId ?>" href="#" class="map-help-link"><?php echo __("What's this?"); ?></a> + <?php $_product = $_item->getProduct(); ?> <script type="text/javascript"> - Catalog.Map.addHelpLink($('<?php echo $helpLinkId ?>'), "<?php echo __("What's this?") ?>"); + (function ($) { + head.js("<?php echo $this->getViewFileUrl('Magento_Catalog::js/msrp.js') ?>", function () { + $('#<?php echo $helpLinkId ?>').addToCart({ + popupId: "#<?php echo $helpLinkId ?>", + productName: '<?php echo $_product->getName() ?>', + realPrice: '<?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_item->getCalculationPrice()) ?>', + msrpPrice: '<?php echo $this->helper('Magento\Core\Helper\Data')->currency($_product->getMsrp(),true,true) ?>', + closeButtonId: '#map-popup-close', + showAddToCart: false + }); + }); + })(jQuery); </script> </span> </td> <?php else: ?> <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartPriceExclTax() || $this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> - <td class="col price excl tax"> + <td class="a-right"> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> <span class="cart-tax-total" data-tax-toggle='{"itemTaxId" : "#eunit-item-tax-details<?php echo $_item->getId(); ?>"}'> <?php else: ?> @@ -129,10 +147,9 @@ $canApplyMsrp = $this->helper('Magento\Catalog\Helper\Data')->canApplyMsrp($_ite <?php endif; ?> <?php endif; ?> </td> - <?php endif; ?> <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartPriceInclTax() || $this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> - <td class="col price incl tax"> + <td> <?php $_incl = $this->helper('Magento\Checkout\Helper\Data')->getPriceInclTax($_item); ?> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> <span class="cart-tax-total" data-tax-toggle='{"itemTaxId" : "#unit-item-tax-details<?php echo $_item->getId(); ?>"}'> @@ -174,13 +191,11 @@ $canApplyMsrp = $this->helper('Magento\Catalog\Helper\Data')->canApplyMsrp($_ite </td> <?php endif; ?> <?php endif; ?> - <td class="col qty"> - <div class="control qty"> - <input name="cart[<?php echo $_item->getId() ?>][qty]" value="<?php echo $this->getQty() ?>" type="text" size="4" title="<?php echo __('Qty') ?>" class="input-text qty" maxlength="12" data-validate="{required:true,'validate-greater-than-zero':true}"/> - </div> + <td class="a-center"> + <input name="cart[<?php echo $_item->getId() ?>][qty]" value="<?php echo $this->getQty() ?>" size="4" title="<?php echo __('Qty') ?>" class="input-text qty" maxlength="12" data-validate="{required:true,'validate-greater-than-zero':true}"/> </td> <?php if (($this->helper('Magento\Tax\Helper\Data')->displayCartPriceExclTax() || $this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()) && !$_item->getNoSubtotal()): ?> - <td class="col subtotal excl tax"> + <td class="a-right"> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> <span class="cart-tax-total" data-tax-toggle='{"itemTaxId" : "#esubtotal-item-tax-details<?php echo $_item->getId(); ?>"}'> <?php else: ?> @@ -225,7 +240,7 @@ $canApplyMsrp = $this->helper('Magento\Catalog\Helper\Data')->canApplyMsrp($_ite </td> <?php endif; ?> <?php if (($this->helper('Magento\Tax\Helper\Data')->displayCartPriceInclTax() || $this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()) && !$_item->getNoSubtotal()): ?> - <td class="col subtotal incl tax"> + <td> <?php $_incl = $this->helper('Magento\Checkout\Helper\Data')->getSubtotalInclTax($_item); ?> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> <span class="cart-tax-total" data-tax-toggle='{"itemTaxId" : "#subtotal-item-tax-details<?php echo $_item->getId(); ?>"}'> @@ -272,25 +287,5 @@ $canApplyMsrp = $this->helper('Magento\Catalog\Helper\Data')->canApplyMsrp($_ite <?php endif; ?> </td> <?php endif; ?> + <td class="a-center"><a href="<?php echo $this->getDeleteUrl()?>" title="<?php echo __('Remove item')?>" class="btn-remove btn-remove2"><?php echo __('Remove item')?></a></td> </tr> -<tr class="item actions"> - <td colspan="100"> - <div class="actions"> - - <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllowInCart()) : ?> - <?php if ($isVisibleProduct): ?> - <a href="<?php echo $this->helper('Magento\Wishlist\Helper\Data')->getMoveFromCartUrl($_item->getId()); ?>" class="use-ajax action towishlist"> - <span><?php echo __('Move to Wishlist'); ?></span> - </a> - <?php endif ?> - <?php endif ?> - - <?php if ($isVisibleProduct): ?> - <a class="action edit" href="<?php echo $this->getConfigureUrl() ?>" title="<?php echo __('Edit item parameters') ?>"><span><?php echo __('Edit') ?></span></a> - <?php endif ?> - - <a href="<?php echo $this->getDeleteUrl()?>" title="<?php echo __('Remove item')?>" class="action delete"><span><?php echo __('Remove item')?></span></a> - </div> - </td> -</tr> -</tbody> diff --git a/app/design/frontend/magento_backup/Magento_Checkout/cart/shipping.phtml b/app/design/frontend/magento_backup/Magento_Checkout/cart/shipping.phtml new file mode 100644 index 0000000000000000000000000000000000000000..89aa5e352ffd5cb16516a746448430b46595c65c --- /dev/null +++ b/app/design/frontend/magento_backup/Magento_Checkout/cart/shipping.phtml @@ -0,0 +1,127 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category design + * @package base_default + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +?> +<?php /** @var $this \Magento\Checkout\Block\Cart\Shipping */ ?> +<div class="shipping"> + <h2><?php echo __('Estimate Shipping and Tax') ?></h2> + <div class="shipping-form"> + <form action="<?php echo $this->getUrl('checkout/cart/estimatePost') ?>" method="post" id="shipping-zip-form"> + <p><?php echo __('Enter your destination to get a shipping estimate.') ?></p> + <ul class="form-list"> + <li> + <label for="country" class="required"><em>*</em><?php echo __('Country') ?></label> + <div class="input-box"> + <?php echo $this->getDirectoryBlock()->getCountryHtmlSelect($this->getEstimateCountryId()) ?> + </div> + </li> + <?php //if($this->getStateActive()): ?> + <li> + <label for="region_id"<?php if ($this->isStateProvinceRequired()) echo ' class="required"' ?>><?php if ($this->isStateProvinceRequired()) echo '<em>*</em>' ?><?php echo __('State/Province') ?></label> + <div class="input-box"> + <select id="region_id" name="region_id" title="<?php echo __('State/Province') ?>" style="display:none;"<?php echo ($this->isStateProvinceRequired() ? ' class="validate-select"' : '') ?>> + <option value=""><?php echo __('Please select a region, state or province.') ?></option> + </select> + <input type="text" id="region" name="region" value="<?php echo $this->escapeHtml($this->getEstimateRegion()) ?>" title="<?php echo __('State/Province') ?>" class="input-text" style="display:none;" /> + </div> + </li> + <?php //endif; ?> + <?php if($this->getCityActive()): ?> + <li> + <label for="city"<?php if ($this->isCityRequired()) echo ' class="required"' ?>><?php if ($this->isCityRequired()) echo '<em>*</em>' ?><?php echo __('City') ?></label> + <div class="input-box"> + <input class="input-text<?php if ($this->isCityRequired()):?> required-entry<?php endif;?>" id="city" type="text" name="estimate_city" value="<?php echo $this->escapeHtml($this->getEstimateCity()) ?>" /> + </div> + </li> + <?php endif; ?> + <li> + <label for="postcode"<?php if ($this->isZipCodeRequired()) echo ' class="required"' ?>><?php if ($this->isZipCodeRequired()) echo '<em>*</em>' ?><?php echo __('Zip/Postal Code') ?></label> + <div class="input-box"> + <input class="input-text validate-postcode<?php if ($this->isZipCodeRequired()):?> required-entry<?php endif;?>" type="text" id="postcode" name="estimate_postcode" value="<?php echo $this->escapeHtml($this->getEstimatePostcode()) ?>" /> + </div> + </li> + </ul> + <div class="buttons-set"> + <button type="submit" title="<?php echo __('Get a Quote') ?>" class="button"><span><span><?php echo __('Get a Quote') ?></span></span></button> + </div> + </form> + <script type="text/javascript"> + (function($) { + head.js( + "<?php echo $this->getViewFileUrl('jquery/jquery.validate.js') ?>", + "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js') ?>", + "<?php echo $this->getViewFileUrl('mage/validation.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation/validation.js') ?>", + "<?php echo $this->getViewFileUrl('Magento_Checkout::js/region-updater.js') ?>", + function() { + $('#country').regionUpdater({ + optionalRegionAllowed: <?php echo ($this->getConfig('general/region/display_all')? 'true' : 'false'); ?>, + regionListId: '#region_id', + regionInputId: '#region', + postcodeId: '#postcode', + form: $('#shipping-zip-form').validation(), + regionJson: <?php echo $this->helper('Magento\Directory\Helper\Data')->getRegionJson() ?>, + defaultRegion: "<?php echo $this->getEstimateRegionId() ?>", + countriesWithOptionalZip: <?php echo $this->helper('Magento\Directory\Helper\Data')->getCountriesWithOptionalZip(true) ?> + }); + }); + })(jQuery); + </script> + + <?php if (($_shippingRateGroups = $this->getEstimateRates())): ?> + <form id="co-shipping-method-form" action="<?php echo $this->getUrl('checkout/cart/estimateUpdatePost') ?>"> + <dl class="sp-methods"> + <?php foreach ($_shippingRateGroups as $code => $_rates): ?> + <dt><?php echo $this->escapeHtml($this->getCarrierName($code)) ?></dt> + <dd> + <ul> + <?php foreach ($_rates as $_rate): ?> + <li<?php if ($_rate->getErrorMessage()) echo ' class="error-msg"';?>> + <?php if ($_rate->getErrorMessage()): ?> + <?php echo $this->escapeHtml($_rate->getErrorMessage()) ?> + <?php else: ?> + <input name="estimate_method" type="radio" value="<?php echo $this->escapeHtml($_rate->getCode()) ?>" id="s_method_<?php echo $_rate->getCode() ?>"<?php if($_rate->getCode()===$this->getAddressShippingMethod()) echo ' checked="checked"' ?> class="radio" /> + <label for="s_method_<?php echo $_rate->getCode() ?>"><?php echo $this->escapeHtml($_rate->getMethodTitle()) ?> + <?php $_excl = $this->getShippingPrice($_rate->getPrice(), $this->helper('Magento\Tax\Helper\Data')->displayShippingPriceIncludingTax()); ?> + <?php $_incl = $this->getShippingPrice($_rate->getPrice(), true); ?> + <?php echo $_excl; ?> + <?php if ($this->helper('Magento\Tax\Helper\Data')->displayShippingBothPrices() && $_incl != $_excl): ?> + (<?php echo __('Incl. Tax'); ?> <?php echo $_incl; ?>) + <?php endif; ?> + </label> + <?php endif ?> + </li> + <?php endforeach; ?> + </ul> + </dd> + <?php endforeach; ?> + </dl> + <div class="buttons-set"> + <button type="submit" title="<?php echo __('Update Total') ?>" class="button" name="do" value="<?php echo __('Update Total') ?>"><span><span><?php echo __('Update Total') ?></span></span></button> + </div> + </form> + <?php endif; ?> + </div> +</div> diff --git a/app/code/Magento/Checkout/view/frontend/cart/sidebar.phtml b/app/design/frontend/magento_backup/Magento_Checkout/cart/sidebar.phtml similarity index 100% rename from app/code/Magento/Checkout/view/frontend/cart/sidebar.phtml rename to app/design/frontend/magento_backup/Magento_Checkout/cart/sidebar.phtml diff --git a/app/design/frontend/magento_backup/Magento_Checkout/cart/sidebar/default.phtml b/app/design/frontend/magento_backup/Magento_Checkout/cart/sidebar/default.phtml new file mode 100644 index 0000000000000000000000000000000000000000..ca93d77ee3247a35e91836cc8754ff79736ba0bd --- /dev/null +++ b/app/design/frontend/magento_backup/Magento_Checkout/cart/sidebar/default.phtml @@ -0,0 +1,145 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category design + * @package base_default + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +?> +<?php + $_item = $this->getItem(); + $isVisibleProduct = $_item->getProduct()->isVisibleInSiteVisibility(); + $canApplyMsrp = $this->helper('Magento\Catalog\Helper\Data')->canApplyMsrp($_item->getProduct(), \Magento\Catalog\Model\Product\Attribute\Source\Msrp\Type::TYPE_BEFORE_ORDER_CONFIRM); +?> +<li class="item"> + <?php if ($this->hasProductUrl()): ?> + <a href="<?php echo $this->getProductUrl()?>" title="<?php echo $this->escapeHtml($this->getProductName()) ?>" class="product-image"><img src="<?php echo $this->getProductThumbnailSidebarUrl() ?>" width="<?php echo $this->getThumbnailSidebarSize()?>" height="<?php echo $this->getThumbnailSidebarSize()?>" alt="<?php echo $this->escapeHtml($this->getProductName()) ?>" /></a> + <?php else: ?> + <span class="product-image"><img src="<?php echo $this->getProductThumbnailSidebarUrl() ?>" width="<?php echo $this->getThumbnailSidebarSize()?>" height="<?php echo $this->getThumbnailSidebarSize()?>" alt="<?php echo $this->escapeHtml($this->getProductName()) ?>" /></span> + <?php endif; ?> + <div class="product-details"> + <a href="<?php echo $this->getDeleteUrl() ?>" title="<?php echo __('Remove This Item') ?>" class="btn-remove"><?php echo __('Remove This Item') ?></a> + <?php if ($isVisibleProduct): ?> + <a href="<?php echo $this->getConfigureUrl() ?>" title="<?php echo __('Edit item') ?>" class="btn-edit"><?php echo __('Edit item')?></a> + <?php endif ?> + <p class="product-name"><?php if ($this->hasProductUrl()): ?><a href="<?php echo $this->getProductUrl() ?>"><?php endif; ?><?php echo $this->escapeHtml($this->getProductName()) ?><?php if ($this->hasProductUrl()): ?></a><?php endif; ?></p> + <strong><?php echo $this->getQty() ?></strong> x + + <?php if ($canApplyMsrp): ?> + + <span class="map-cart-sidebar-item"><?php echo __('See price before order confirmation.'); ?></span> + + <?php else: ?> + + <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartPriceExclTax() || $this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> + <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> + <?php echo __('Excl. Tax'); ?>: + <?php endif; ?> + <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, array(0, 1, 4), 'sales')): ?> + <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?> + <?php else: ?> + <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_item->getCalculationPrice()) ?> + <?php endif; ?> + <?php if ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item)): ?> + <br /> + <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 1, 'sales')): ?> + <small> + <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> + <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount'],true,true); ?></span><br /> + <?php endforeach; ?> + </small> + <?php elseif ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 2, 'sales')): ?> + <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> + <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount_incl_tax'],true,true); ?></small></span><br /> + <?php endforeach; ?> + <?php elseif ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 4, 'sales')): ?> + <small> + <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> + <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount_incl_tax'],true,true); ?></span><br /> + <?php endforeach; ?> + </small> + <?php endif; ?> + <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 2, 'sales')): ?> + <span class="nobr"><?php echo __('Total'); ?>:<br /> <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?></span> + <?php endif; ?> + <?php endif; ?> + <?php endif; ?> + + + + <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartPriceInclTax() || $this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> + <?php $_incl = $this->helper('Magento\Checkout\Helper\Data')->getPriceInclTax($_item); ?> + <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> + <br /><?php echo __('Incl. Tax'); ?>: + <?php endif; ?> + <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, array(0, 1, 4), 'sales')): ?> + <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?> + <?php else: ?> + <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_incl-$_item->getWeeeTaxDisposition()) ?> + <?php endif; ?> + <?php if ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item)): ?> + <br /> + <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 1, 'sales')): ?> + <small> + <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> + <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount'],true,true); ?></span><br /> + <?php endforeach; ?> + </small> + <?php elseif ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 2, 'sales')): ?> + <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> + <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount_incl_tax'],true,true); ?></small></span><br /> + <?php endforeach; ?> + <?php elseif ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 4, 'sales')): ?> + <small> + <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> + <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount_incl_tax'],true,true); ?></span><br /> + <?php endforeach; ?> + </small> + <?php endif; ?> + <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 2, 'sales')): ?> + <span class="nobr"><?php echo __('Total incl. tax'); ?>:<br /> <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?></span> + <?php endif; ?> + <?php endif; ?> + <?php endif; ?> + + <?php endif; //Can apply MSRP ?> + + <?php if ($_options = $this->getOptionList()):?> + <div class="truncated" data-mage-init="{truncateOptions:[]}"> + <div class="truncated_full_value"> + <dl class="item-options"> + <?php foreach ($_options as $_option) : ?> + <dt><?php echo $this->escapeHtml($_option['label']) ?></dt> + <dd> + <?php if (is_array($_option['value'])): ?> + <?php echo nl2br(implode("\n", $_option['value'])) ?> + <?php else: ?> + <?php echo $_option['value'] ?> + <?php endif; ?> + </dd> + <?php endforeach; ?> + </dl> + </div> + <a href="#" onclick="return false;" class="details"><?php echo __('Details') ?></a> + </div> + <?php endif; ?> + </div> +</li> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/cart/totals.phtml b/app/design/frontend/magento_backup/Magento_Checkout/cart/totals.phtml similarity index 86% rename from app/design/frontend/magento_plushe/Magento_Checkout/cart/totals.phtml rename to app/design/frontend/magento_backup/Magento_Checkout/cart/totals.phtml index ea12c71727e504922bdcdb1efecb57b78ec02e06..53a0e844767325d825be65a7df87d18f394f4a54 100644 --- a/app/design/frontend/magento_plushe/Magento_Checkout/cart/totals.phtml +++ b/app/design/frontend/magento_backup/Magento_Checkout/cart/totals.phtml @@ -19,6 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design + * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ @@ -31,11 +32,10 @@ * @var $this \Magento\Checkout\Block\Cart\Totals */ ?> -<div class="cart totals"> <?php if ($this->canApplyMsrp()): ?> - <div class="cart-msrp-totals"><?php echo __('ORDER TOTAL WILL BE DISPLAYED BEFORE YOU SUBMIT THE ORDER'); ?></div> + <div class="cart-msrp-totals"><?php echo __('You will see the order total before you submit the order.'); ?></div> <?php else: ?> - <table id="shopping-cart-totals-table" class="table totals"> + <table id="shopping-cart-totals-table"> <col /> <col width="1" /> <tfoot> @@ -46,4 +46,3 @@ </tbody> </table> <?php endif; ?> -</div> \ No newline at end of file diff --git a/app/design/frontend/magento_backup/Magento_Checkout/cvv.gif b/app/design/frontend/magento_backup/Magento_Checkout/cvv.gif new file mode 100644 index 0000000000000000000000000000000000000000..6d6e9f2907839d58c27ec8de8644f30fc8b4467c Binary files /dev/null and b/app/design/frontend/magento_backup/Magento_Checkout/cvv.gif differ diff --git a/app/design/frontend/magento_backup/Magento_Checkout/js/accordion.js b/app/design/frontend/magento_backup/Magento_Checkout/js/accordion.js new file mode 100644 index 0000000000000000000000000000000000000000..e595f089b73c9380318a59e6a9473ea04f76cfea --- /dev/null +++ b/app/design/frontend/magento_backup/Magento_Checkout/js/accordion.js @@ -0,0 +1,58 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category mage checkout + * @package accordion + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +/*jshint jquery:true browser:true*/ +(function($) { + 'use strict'; + // mage.accordion base functionality + $.widget('mage.accordion', $.ui.accordion, { + options: { + heightStyle: 'content', + animate: false, + beforeActivate: function(e, ui) { + // Make sure sections below current are not clickable and sections above are clickable + var newPanelParent = $(ui.newPanel).parent(); + if (!newPanelParent.hasClass('allow')) { + return false; + } + newPanelParent.addClass('active allow').prevAll().addClass('allow'); + newPanelParent.nextAll().removeClass('allow'); + $(ui.oldPanel).parent().removeClass('active'); + } + }, + + /** + * Accordion creation + * @protected + */ + _create: function() { + // Custom to enable section + this.element.on('enableSection', function(event, data) { + $(data.selector).addClass('allow').find('h2').trigger('click'); + }); + this._super(); + $(this.options.activeSelector).addClass('allow active').find('h2').trigger('click'); + } + }); +})(jQuery); diff --git a/app/design/frontend/magento_backup/Magento_Checkout/js/components.phtml b/app/design/frontend/magento_backup/Magento_Checkout/js/components.phtml new file mode 100644 index 0000000000000000000000000000000000000000..fb4954de06b54f679581d5506e3f4cf14c2a3b46 --- /dev/null +++ b/app/design/frontend/magento_backup/Magento_Checkout/js/components.phtml @@ -0,0 +1,40 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category design + * @package base_default + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +?> +<script type="text/javascript"> + (function($) { + "use strict"; + /** + * Declaration of resources needed for defined components + */ + $.mage.component({ + paymentAuthentication: [ + '<?php echo $this->getViewFileUrl('Magento_Checkout::js/payment-authentication.js') ?>' + ] + }); + })(jQuery); +</script> +<?php echo $this->getChildHtml() ?> \ No newline at end of file diff --git a/app/design/frontend/magento_backup/Magento_Checkout/js/discount-codes.js b/app/design/frontend/magento_backup/Magento_Checkout/js/discount-codes.js new file mode 100644 index 0000000000000000000000000000000000000000..73fdcc71420ce343947b23613ca18c0cc0733f49 --- /dev/null +++ b/app/design/frontend/magento_backup/Magento_Checkout/js/discount-codes.js @@ -0,0 +1,47 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category checkout coupon discount codes + * @package mage + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +/*jshint browser:true jquery:true*/ +(function ($) { + $.widget('mage.discountCode', { + options: { + }, + _create: function () { + this.couponCode = $(this.options.couponCodeSelector); + this.removeCoupon = $(this.options.removeCouponSelector); + + $(this.options.applyButton).on('click', $.proxy(function () { + this.couponCode.attr('data-validate', '{required:true}'); + this.removeCoupon.attr('value', '0'); + $(this.element).validation().submit(); + }, this)); + + $(this.options.cancelButton).on('click', $.proxy(function () { + this.couponCode.removeAttr('data-validate'); + this.removeCoupon.attr('value', '1'); + this.element.submit(); + }, this)); + } + }); +})(jQuery); diff --git a/app/design/frontend/magento_backup/Magento_Checkout/js/multi-shipping.js b/app/design/frontend/magento_backup/Magento_Checkout/js/multi-shipping.js new file mode 100644 index 0000000000000000000000000000000000000000..279f7f8687d7bfdbc0a3aef71a9aac163255138e --- /dev/null +++ b/app/design/frontend/magento_backup/Magento_Checkout/js/multi-shipping.js @@ -0,0 +1,63 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category checkout multi-shipping addresses + * @package mage + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +/*jshint jquery:true*/ +(function($) { + "use strict"; + $.widget('mage.multiShipping', { + options: { + addNewAddressBtn: 'button[data-role="add-new-address"]', // Add a new multishipping address. + addNewAddressFlag: '#add_new_address_flag', // Hidden input field with value 0 or 1. + canContinueBtn: 'button[data-role="can-continue"]', // Continue (update quantity or go to shipping). + canContinueFlag: '#can_continue_flag' // Hidden input field with value 0 or 1. + }, + + /** + * Bind event handlers to click events for corresponding buttons. + * @private + */ + _create: function() { + $(this.options.addNewAddressBtn).on('click', $.proxy(this._addNewAddress, this)); + $(this.options.canContinueBtn).on('click', $.proxy(this._canContinue, this)); + }, + + /** + * Add a new address. Set the hidden input field and submit the form. Then enter a new shipping address. + * @private + */ + _addNewAddress: function() { + $(this.options.addNewAddressFlag).val(1); + this.element.submit(); + }, + + /** + * Can the user continue to the next step? The data-flag attribute holds either 0 (no) or 1 (yes). + * @private + * @param event {Event} - Click event on the corresponding button. + */ + _canContinue: function(event) { + $(this.options.canContinueFlag).val(parseInt($(event.currentTarget).data('flag'), 10)); + } + }); +})(jQuery); diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/js/opcheckout.js b/app/design/frontend/magento_backup/Magento_Checkout/js/opcheckout.js similarity index 75% rename from app/design/frontend/magento_plushe/Magento_Checkout/js/opcheckout.js rename to app/design/frontend/magento_backup/Magento_Checkout/js/opcheckout.js index 0a77675d28078b1ffc33f5f162087ba74bfcb6b9..b9e20dd2b43ac369dfdc67cf8904fb73357cb3dd 100644 --- a/app/design/frontend/magento_plushe/Magento_Checkout/js/opcheckout.js +++ b/app/design/frontend/magento_backup/Magento_Checkout/js/opcheckout.js @@ -34,7 +34,7 @@ loginRegisterSelector: '#login\\:register', loginFormSelector: '#login-form', continueSelector: '#onepage-guest-register-button', - registerCustomerPasswordSelector: '#co-billing-form .field.password,#co-billing-form .field.confirm', + registerCustomerPasswordSelector: '#register-customer-password', suggestRegistration: false }, sectionSelectorPrefix: '#opc-', @@ -42,12 +42,8 @@ ajaxLoaderPlaceButton: false, updateSelectorPrefix: '#checkout-', updateSelectorSuffix: '-load', - backSelector: '.action.back', - minBalance: 0.0001, - methodsListContainer: 'dl', - methodContainer: 'dt', - methodDescription : 'dd ul', - methodOn: 'dt input:radio' + backSelector: '.back-link', + minBalance: 0.0001 }, _create: function() { @@ -66,6 +62,8 @@ _this.element.trigger('enableSection', {selector: _this.options.sectionSelectorPrefix + section}); }) .on('ajaxError', $.proxy(this._ajaxError, this)) + .on('showAjaxLoader', $.proxy(this._ajaxSend, this)) + .on('hideAjaxLoader', $.proxy(this._ajaxComplete, this)) .on('click', this.options.backSelector, function() { _this.element.trigger('enableSection', {selector: '#' + _this.element.find('.active').prev().attr('id')}); }) @@ -85,7 +83,6 @@ * @private */ _ajaxSend: function() { - this.element.addClass('loading'); var loader = this.element.find('.section.active .please-wait').show(); if (this.options.ajaxLoaderPlaceButton) { loader.siblings('.button').hide(); @@ -97,7 +94,6 @@ * @private */ _ajaxComplete: function() { - this.element.removeClass('loading'); this.element.find('.please-wait').hide(); if (this.options.ajaxLoaderPlaceButton) { this.element.find('.button').show(); @@ -158,7 +154,7 @@ } if ($.type(response) === 'object' && !$.isEmptyObject(response)) { if (response.error) { - var msg = response.message; + var msg = response.message || response.error_messages; if (msg) { if ($.type(msg) === 'array') { msg = msg.join("\n"); @@ -236,13 +232,13 @@ this._super(); this.element .on('change', this.options.billing.addressDropdownSelector, $.proxy(function(e) { - this.element.find(this.options.billing.newAddressFormSelector).toggle(!$(e.target).val()); - }, this)) + this.element.find(this.options.billing.newAddressFormSelector).toggle(!$(e.target).val()); + }, this)) .on('click', this.options.billing.continueSelector, $.proxy(function() { - if ($(this.options.billing.form).validation && $(this.options.billing.form).validation('isValid')) { - this._billingSave(); - } - }, this)) + if ($(this.options.billing.form).validation && $(this.options.billing.form).validation('isValid')) { + this._billingSave(); + } + }, this)) .find(this.options.billing.form).validation(); } , @@ -271,24 +267,24 @@ this._super(); this.element .on('change', this.options.shipping.addressDropdownSelector, $.proxy(function(e) { - $(this.options.shipping.newAddressFormSelector).toggle(!$(e.target).val()); - }, this)) + $(this.options.shipping.newAddressFormSelector).toggle(!$(e.target).val()); + }, this)) .on('input propertychange', this.options.shipping.form + ' :input[name]', $.proxy(function() { - $(this.options.shipping.copyBillingSelector).prop('checked', false); - }, this)) + $(this.options.shipping.copyBillingSelector).prop('checked', false); + }, this)) .on('click', this.options.shipping.copyBillingSelector, $.proxy(function(e) { - if ($(e.target).is(':checked')) { - this._billingToShipping(); - } - }, this)) + if ($(e.target).is(':checked')) { + this._billingToShipping(); + } + }, this)) .on('click', this.options.shipping.continueSelector, $.proxy(function() { - if ($(this.options.shipping.form).validation && $(this.options.shipping.form).validation('isValid')) { + if ($(this.options.shipping.form).validation && $(this.options.shipping.form).validation('isValid')) { this._ajaxContinue(this.options.shipping.saveUrl, $(this.options.shipping.form).serialize(), false, function() { //Trigger indicating shipping save. eg. GiftMessage listens to this to inject gift options this.element.trigger('shippingSave'); }); - } - }, this)) + } + }, this)) .find(this.options.shipping.form).validation(); }, @@ -322,12 +318,12 @@ var _this = this; this.element .on('click', this.options.shippingMethod.continueSelector, $.proxy(function() { - if (this._validateShippingMethod()&& - $(this.options.shippingMethod.form).validation && - $(this.options.shippingMethod.form).validation('isValid')) { - this._ajaxContinue(this.options.shippingMethod.saveUrl, $(this.options.shippingMethod.form).serialize()); - } - }, this)) + if (this._validateShippingMethod()&& + $(this.options.shippingMethod.form).validation && + $(this.options.shippingMethod.form).validation('isValid')) { + this._ajaxContinue(this.options.shippingMethod.saveUrl, $(this.options.shippingMethod.form).serialize()); + } + }, this)) .on('click', 'input[name="shipping_method"]', function() { var selectedPrice = _this.shippingCodePrice[$(this).val()] || 0, oldPrice = _this.shippingCodePrice[_this.currentShippingMethod] || 0; @@ -335,9 +331,9 @@ _this.currentShippingMethod = $(this).val(); }) .on('contentUpdated', $.proxy(function() { - this.currentShippingMethod = this.element.find('input[name="shipping_method"]:checked').val(); - this.shippingCodePrice = this.element.find('[data-shipping-code-price]').data('shipping-code-price'); - }, this)) + this.currentShippingMethod = this.element.find('input[name="shipping_method"]:checked').val(); + this.shippingCodePrice = this.element.find('[data-shipping-code-price]').data('shipping-code-price'); + }, this)) .find(this.options.shippingMethod.form).validation(); }, @@ -349,13 +345,13 @@ _validateShippingMethod: function() { var methods = this.element.find('[name="shipping_method"]'); if (methods.length === 0) { - alert($.mage.__('Your order cannot be completed at this time as there is no shipping methods available for it. Please make necessary changes in your shipping address.')); + alert($.mage.__('We are not able to ship to the selected shipping address. Please choose another address or edit the current address.')); return false; } if (methods.filter(':checked').length) { return true; } - alert($.mage.__('Please specify shipping method.')); + alert($.mage.__('Please specify a shipping method.')); return false; } }); @@ -378,41 +374,49 @@ this._super(); this.element .on('click', this.options.payment.continueSelector, $.proxy(function() { - if (this._validatePaymentMethod() && - $(this.options.payment.form).validation && - $(this.options.payment.form).validation('isValid')) { - this._ajaxContinue(this.options.payment.saveUrl, $(this.options.payment.form).serialize()); - } - }, this)) + if (this._validatePaymentMethod() && + $(this.options.payment.form).validation && + $(this.options.payment.form).validation('isValid')) { + this._ajaxContinue(this.options.payment.saveUrl, $(this.options.payment.form).serialize()); + } + }, this)) .on('updateCheckoutPrice', $.proxy(function(event, data) { - if (data.price) { - this.checkoutPrice += data.price; - } - if (data.totalPrice) { - data.totalPrice = this.checkoutPrice; - } - if (this.checkoutPrice < this.options.minBalance) { - // Add free input field, hide and disable unchecked checkbox payment method and all radio button payment methods - this._disablePaymentMethods(); - } else { - // Remove free input field, show all payment method - this._enablePaymentMethods(); - } - }, this)) + if (data.price) { + this.checkoutPrice += data.price; + } + if (data.totalPrice) { + data.totalPrice = this.checkoutPrice; + } + if (this.checkoutPrice < this.options.minBalance) { + // Add free input field, hide and disable unchecked checkbox payment method and all radio button payment methods + this._disablePaymentMethods(); + } else { + // Remove free input field, show all payment method + this._enablePaymentMethods(); + } + }, this)) .on('contentUpdated', this.options.payment.form, $.proxy(function() { - $(this.options.payment.form).find('dd [name^="payment["]').prop('disabled', true); - var checkoutPrice = this.element.find(this.options.payment.form).find('[data-checkout-price]').data('checkout-price'); - if ($.isNumeric(checkoutPrice)) { - this.checkoutPrice = checkoutPrice; - } - if (this.checkoutPrice < this.options.minBalance) { - this._disablePaymentMethods(); - } else { - this._enablePaymentMethods(); - } - }, this)) + $(this.options.payment.form).find('dd [name^="payment["]').prop('disabled', true); + var checkoutPrice = this.element.find(this.options.payment.form).find('[data-checkout-price]').data('checkout-price'); + if ($.isNumeric(checkoutPrice)) { + this.checkoutPrice = checkoutPrice; + } + if (this.checkoutPrice < this.options.minBalance) { + this._disablePaymentMethods(); + } else { + this._enablePaymentMethods(); + } + }, this)) .on('click', this.options.payment.form + ' dt input:radio', $.proxy(this._paymentMethodHandler, this)) - .find(this.options.payment.form).validation(); + .find(this.options.payment.form).validation({ + errorPlacement: function(error, element) { + if (element.attr('data-validate') && element.attr('data-validate').indexOf('validate-cc-ukss') >= 0) { + element.parents('form').find('[data-validation-msg="validate-cc-ukss"]').html(error); + } else { + element.after(error); + } + } + }); }, /** @@ -422,11 +426,11 @@ */ _paymentMethodHandler: function(e) { var _this = $(e.target), - parentsDl = _this.closest(this.options.methodsListContainer); - parentsDl.find(this.options.methodOn).prop('checked', false); + parentsDl = _this.closest('dl'); + parentsDl.find('dt input:radio').prop('checked', false); _this.prop('checked', true); - parentsDl.find(this.options.methodDescription).hide().find('[name^="payment["]').prop('disabled', true); - _this.parent().nextUntil(this.options.methodContainer).find(this.options.methodDescription).show().find('[name^="payment["]').prop('disabled', false); + parentsDl.find('dd ul').hide().find('[name^="payment["]').prop('disabled', true); + _this.parent().nextUntil('dt').find('ul').show().find('[name^="payment["]').prop('disabled', false); }, /** @@ -437,7 +441,7 @@ _validatePaymentMethod: function() { var methods = this.element.find('[name^="payment["]'); if (methods.length === 0) { - alert($.mage.__('Your order cannot be completed at this time as there is no payment methods available for it.')); + alert($.mage.__("We can't complete your order because you don't have a payment method available.")); return false; } if (this.checkoutPrice < this.options.minBalance) { @@ -469,6 +473,7 @@ _enablePaymentMethods: function() { var paymentForm = $(this.options.payment.form); paymentForm.find('input[name="payment[method]"]').prop('disabled', false); + paymentForm.find('input[name="payment[method]"]:checked').trigger('click'); paymentForm.find(this.options.payment.methodsContainer).show(); paymentForm.find('input[id^="use"][name^="payment[use"]:not(:checked)').prop('disabled', false).parent().show(); paymentForm.find(this.options.payment.freeInput.selector).remove(); @@ -479,21 +484,35 @@ $.widget('mage.opcheckout', $.mage.opcheckout, { options: { review: { - continueSelector: '#review-buttons-container .button' + continueSelector: '#review-buttons-container .button', + container: '#opc-review', + agreementFormSelector:'#checkout-agreements', + submitContainer: '#checkout-review-submit' } }, _create: function() { this._super(); this.element - .on('click', this.options.review.continueSelector, $.proxy(function() { - if ($(this.options.payment.form).validation && - $(this.options.payment.form).validation('isValid')) { - this._ajaxContinue( - this.options.review.saveUrl, - $(this.options.payment.form).serialize()); + .on('click', this.options.review.continueSelector, $.proxy(this._saveOrder, this)) + .on('saveOrder', this.options.review.container, $.proxy(this._saveOrder, this)) + .on('contentUpdated', this.options.review.container, $.proxy(function() { + var paypalIframe = this.element.find(this.options.review.container) + .find('[data-container="paypal-iframe"]'); + if (paypalIframe.length) { + paypalIframe.show(); + $(this.options.review.submitContainer).hide(); } }, this)); + }, + + _saveOrder: function() { + if ($(this.options.payment.form).validation && + $(this.options.payment.form).validation('isValid')) { + this._ajaxContinue( + this.options.review.saveUrl, + $(this.options.payment.form).serialize() + '&' + $(this.options.review.agreementFormSelector).serialize()); + } } }); })(jQuery, window); diff --git a/app/design/frontend/magento_backup/Magento_Checkout/js/overview.js b/app/design/frontend/magento_backup/Magento_Checkout/js/overview.js new file mode 100644 index 0000000000000000000000000000000000000000..e2f53ed1d13452bc3aea164332a451709c5dc714 --- /dev/null +++ b/app/design/frontend/magento_backup/Magento_Checkout/js/overview.js @@ -0,0 +1,61 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category checkout multi-shipping review order overview + * @package mage + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +/*jshint jquery:true*/ +/*global alert*/ +(function($) { + "use strict"; + $.widget('mage.orderOverview', { + options: { + opacity: 0.5, // CSS opacity for the 'Place Order' button when it's clicked and then disabled. + pleaseWaitLoader: 'span.please-wait', // 'Submitting order information...' Ajax loader. + placeOrderSubmit: 'button[type="submit"]', // The 'Place Order' button. + agreements: '#checkout-agreements' // Container for all of the checkout billing agreements. + }, + + /** + * Bind a submit handler to the form. + * @private + */ + _create: function() { + this.element.on('submit', $.proxy(this._showLoader, this)); + }, + + /** + * Verify that all agreements and terms/conditions are checked. Show the Ajax loader. Disable + * the submit button (i.e. Place Order). + * @return {Boolean} + * @private + */ + _showLoader: function() { + if ($(this.options.agreements).find('input[type="checkbox"]:not(:checked)').length > 0) { + alert($.mage.__('Please agree to all Terms and Conditions before placing the orders.')); + return false; + } + this.element.find(this.options.pleaseWaitLoader).show().end() + .find(this.options.placeOrderSubmit).prop('disabled', true).css('opacity', this.options.opacity); + return true; + } + }); +})(jQuery); diff --git a/app/design/frontend/magento_backup/Magento_Checkout/js/payment-authentication.js b/app/design/frontend/magento_backup/Magento_Checkout/js/payment-authentication.js new file mode 100644 index 0000000000000000000000000000000000000000..04f406adca6a5cb33b95815ebc09879063ae62fa --- /dev/null +++ b/app/design/frontend/magento_backup/Magento_Checkout/js/payment-authentication.js @@ -0,0 +1,49 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * 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 js + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +/*jshint jquery:true*/ +(function ($) { + "use strict"; + $.widget('mage.paymentAuthentication', { + options : { + bodySelector: '[data-container="body"]' + }, + + _create: function () { + // add a trigger on the body for payment authentication state changes + this.element.closest(this.options.bodySelector).on("paymentAuthentication", $.proxy(this._paymentmentAthenticationTrigger, this)); + }, + + /** + * This method processes the paymentAuthentication actions. + */ + _paymentmentAthenticationTrigger: function (event, data) { + if (data.state === 'start') { + this.element.hide(); + } else { + this.element.show(); + } + } + }); +})(jQuery); diff --git a/app/design/frontend/magento_backup/Magento_Checkout/js/payment.js b/app/design/frontend/magento_backup/Magento_Checkout/js/payment.js index e0028755b9be2b1d5f6f99f685d443fd0da4a60b..fbc1983892d9d911f30205223995e3880c0ac63a 100644 --- a/app/design/frontend/magento_backup/Magento_Checkout/js/payment.js +++ b/app/design/frontend/magento_backup/Magento_Checkout/js/payment.js @@ -72,8 +72,8 @@ var element = $(e.target), parentsDl = element.closest('dl'); parentsDl.find('dt input:radio').prop('checked', false); - parentsDl.find('dd ul').hide().find('[name^="payment["]').prop('disabled', true); - element.prop('checked', true).parent().nextUntil('dt').find('ul').show().find('[name^="payment["]').prop('disabled', false); + parentsDl.find('.items').hide().find('[name^="payment["]').prop('disabled', true); + element.prop('checked', true).parent().nextUntil('dt').find('.items').show().find('[name^="payment["]').prop('disabled', false); }, /** diff --git a/app/design/frontend/magento_backup/Magento_Checkout/js/region-updater.js b/app/design/frontend/magento_backup/Magento_Checkout/js/region-updater.js new file mode 100644 index 0000000000000000000000000000000000000000..4be2fa30b5d5c053041ac29c07b00555e0c82e12 --- /dev/null +++ b/app/design/frontend/magento_backup/Magento_Checkout/js/region-updater.js @@ -0,0 +1,177 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category frontend Checkout region-updater + * @package mage + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +/*jshint browser:true jquery:true expr:true*/ +(function($) { + $.widget('mage.regionUpdater', { + options: { + regionTemplate: '<option value="${value}" title="${title}" {{if isSelected}}selected="selected"{{/if}}>${title}</option>', + isRegionRequired: true, + isZipRequired: true, + isCountryRequired: true + }, + + _create: function() { + this._updateRegion(this.element.find('option:selected').val()); + this.element.on('change', $.proxy(function(e) { + this._updateRegion($(e.target).val()); + }, this)); + if (this.isCountryRequired) { + this.element.addClass('required-entry'); + } + $(this.options.regionListId).on('change', $.proxy(function(e) { + this.setOption = false; + this.currentRegionOption = $(e.target).val(); + }, this)); + $(this.options.regionInputId).on('focusout', $.proxy(function() { + this.setOption = true; + }, this)); + }, + + /** + * Remove options from dropdown list + * @param {object} selectElement - jQuery object for dropdown list + * @private + */ + _removeSelectOptions: function(selectElement) { + selectElement.find('option').each(function(index) { + if (index) { + $(this).remove(); + } + }); + }, + + /** + * Render dropdown list + * @param {object} selectElement - jQuery object for dropdown list + * @param {string} key - region code + * @param {object} value - region object + * @private + */ + _renderSelectOption: function(selectElement, key, value) { + selectElement.append($.proxy(function() { + $.template('regionTemplate', this.options.regionTemplate); + if (this.options.defaultRegion === key) { + return $.tmpl('regionTemplate', {value: key, title: value.name, isSelected: true}); + } else { + return $.tmpl('regionTemplate', {value: key, title: value.name}); + } + }, this)); + }, + + /** + * Takes clearError callback function as first option + * If no form is passed as option, look up the closest form and call clearError method. + * @private + */ + _clearError: function() { + if (this.options.clearError && typeof(this.options.clearError) === "function") { + this.options.clearError.call(this); + } else { + if (!this.options.form) { + this.options.form = this.element.closest('form').length ? $(this.element.closest('form')[0]) : null; + } + this.options.form && this.options.form.data('validation') && this.options.form.validation('clearError', + this.options.regionListId, this.options.regionInputId, this.options.postcodeId); + } + }, + /** + * Update dropdown list based on the country selected + * @param {string} country - 2 uppercase letter for country code + * @private + */ + _updateRegion: function(country) { + // Clear validation error messages + var regionList = $(this.options.regionListId), + regionInput = $(this.options.regionInputId), + postcode = $(this.options.postcodeId), + requiredLabel = regionList.parent().siblings('label').children('em'); + this._clearError(); + this._checkRegionRequired(country); + // Populate state/province dropdown list if available or use input box + if (this.options.regionJson[country]) { + this._removeSelectOptions(regionList); + $.each(this.options.regionJson[country], $.proxy(function(key, value) { + this._renderSelectOption(regionList, key, value); + }, this)); + if (this.currentRegionOption) { + regionList.val(this.currentRegionOption); + } + if (this.setOption) { + regionList.find("option").filter(function() { + return this.text === regionInput.val(); + }).attr('selected', true); + } + if (this.options.isRegionRequired) { + regionList.addClass('required-entry').removeAttr('disabled'); + requiredLabel.show(); + } else { + regionList.removeClass('required-entry validate-select').removeAttr('data-validate'); + requiredLabel.hide(); + if (!this.options.optionalRegionAllowed) { + regionList.attr('disabled', 'disabled'); + } + } + regionList.show(); + regionInput.hide(); + } else { + if (this.options.isRegionRequired) { + regionInput.addClass('required-entry').removeAttr('disabled'); + requiredLabel.show(); + } else { + if (!this.options.optionalRegionAllowed) { + regionInput.attr('disabled', 'disabled'); + } + } + regionList.removeClass('required-entry').hide(); + regionInput.show(); + requiredLabel.hide(); + } + // If country is in optionalzip list, make postcode input not required + if (this.options.isZipRequired) { + $.inArray(country, this.options.countriesWithOptionalZip) >= 0 ? + postcode.removeClass('required-entry').parent().siblings('label').children('em').hide() : + postcode.addClass('required-entry').parent().siblings('label').children('em').show(); + } + // Add defaultvalue attribute to state/province select element + regionList.attr('defaultvalue', this.options.defaultRegion); + }, + + /** + * Check if the selected country has a mandatory region selection + * + * @param {string} country Code of the country - 2 uppercase letter for country code + * @private + */ + _checkRegionRequired: function(country) { + this.options.isRegionRequired = false; + var self = this; + $.each(this.options.regionJson.config.regions_required, function(index, elem){ + if (elem == country) { + self.options.isRegionRequired = true; + } + }); + } + }); +})(jQuery); \ No newline at end of file diff --git a/app/design/frontend/magento_backup/Magento_Checkout/js/shopping-cart.js b/app/design/frontend/magento_backup/Magento_Checkout/js/shopping-cart.js new file mode 100644 index 0000000000000000000000000000000000000000..1e6baf526475ae33fb1a1888944ceeb4545e585d --- /dev/null +++ b/app/design/frontend/magento_backup/Magento_Checkout/js/shopping-cart.js @@ -0,0 +1,41 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category mage checkout shopping cart + * @package mage + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +/*jshint browser:true jquery:true*/ +(function($) { + $.widget('mage.shoppingCart', { + _create: function() { + if ($(this.options.updateCartActionContainer).length > 0) { /* <!--[if lt IE 8]> Only */ + $(this.options.emptyCartButton).on('click', $.proxy(function() { + $(this.options.emptyCartButton).attr('name', 'update_cart_action_temp'); + $(this.options.updateCartActionContainer) + .attr('name', 'update_cart_action').attr('value', 'empty_cart'); + }, this)); + } + $(this.options.continueShoppingButton).on('click', $.proxy(function() { + location.href = this.options.continueShoppingUrl; + }, this)); + } + }); +})(jQuery); diff --git a/app/design/frontend/magento_backup/Magento_Checkout/js/sidebar.js b/app/design/frontend/magento_backup/Magento_Checkout/js/sidebar.js new file mode 100644 index 0000000000000000000000000000000000000000..825b4bb73c0f6817f177f541afdcb28186debac6 --- /dev/null +++ b/app/design/frontend/magento_backup/Magento_Checkout/js/sidebar.js @@ -0,0 +1,44 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category mage side bar + * @package mage + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +/*jshint browser:true jquery:true*/ +/*global confirm:true*/ +(function ($) { + $.widget('mage.sidebar', { + options: { + checkoutUrl: '', + checkoutButton: '', + removeButton: '', + confirmMessage: '' + }, + _create: function() { + $(this.options.checkoutButton).on('click', $.proxy(function() { + location.href = this.options.checkoutUrl; + }, this)); + $(this.options.removeButton).on('click', $.proxy(function() { + return confirm(this.options.confirmMessage); + }, this)); + } + }); +})(jQuery); diff --git a/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_cart_configure.xml b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_cart_configure.xml new file mode 100644 index 0000000000000000000000000000000000000000..edb922b5c54b2fd2e4aaef04b1b82e294cdd1a23 --- /dev/null +++ b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_cart_configure.xml @@ -0,0 +1,41 @@ +<?xml version="1.0"?> +<!-- +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <update handle="catalog_product_view"/> + <referenceBlock name="product.info"> + <block class="Magento\Checkout\Block\Cart\Item\Configure" name="checkout.cart.item.configure.block"/> + </referenceBlock> + <referenceBlock name="product.info.addtocart"> + <action method="setTemplate"> + <argument name="template" xsi:type="string">Magento_Checkout::cart/item/configure/updatecart.phtml</argument> + </action> + </referenceBlock> + <referenceBlock name="product.info.addtocart.additional"> + <action method="setTemplate"> + <argument name="template" xsi:type="string">Magento_Checkout::cart/item/configure/updatecart.phtml</argument> + </action> + </referenceBlock> +</layout> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/layout/checkout_onepage_review.xml b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_cart_configure_type_configurable.xml similarity index 86% rename from app/design/frontend/magento_plushe/Magento_Checkout/layout/checkout_onepage_review.xml rename to app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_cart_configure_type_configurable.xml index 0b9179276af83290680cf57f990d34d7d5397f21..2f306b55b6e658561b294f426183f258d4730015 100644 --- a/app/design/frontend/magento_plushe/Magento_Checkout/layout/checkout_onepage_review.xml +++ b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_cart_configure_type_configurable.xml @@ -24,7 +24,5 @@ */ --> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <referenceBlock name="root"> - <container name="additional.product.info" after="order_review" label="Additional Product Info"/> - </referenceBlock> + <update handle="catalog_product_view_type_configurable"/> </layout> diff --git a/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_cart_configure_type_simple.xml b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_cart_configure_type_simple.xml new file mode 100644 index 0000000000000000000000000000000000000000..7ff60b04ca055b8db85bcfad8ef4bf2dcd3c2c90 --- /dev/null +++ b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_cart_configure_type_simple.xml @@ -0,0 +1,28 @@ +<?xml version="1.0"?> +<!-- +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <update handle="catalog_product_view_type_simple"/> +</layout> diff --git a/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_cart_index.xml b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_cart_index.xml new file mode 100644 index 0000000000000000000000000000000000000000..72685dcf9048c5ec6f9ee0d2b271d5100ed56c67 --- /dev/null +++ b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_cart_index.xml @@ -0,0 +1,56 @@ +<?xml version="1.0"?> +<!-- +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <referenceBlock name="root"> + <action method="setTemplate"> + <argument name="template" xsi:type="string">1column.phtml</argument> + </action> + </referenceBlock> + <referenceContainer name="content"> + <block class="Magento\Checkout\Block\Cart" name="checkout.cart" template="cart.phtml"> + <block class="Magento\Checkout\Block\Cart\Item\Renderer" as="simple" template="cart/item/default.phtml"/> + <block class="Magento\Checkout\Block\Cart\Item\Renderer\Grouped" as="grouped" template="cart/item/default.phtml"/> + <block class="Magento\Checkout\Block\Cart\Item\Renderer\Configurable" as="configurable" template="cart/item/default.phtml"/> + <container name="checkout.cart.empty.widget" as="checkout_cart_empty_widget" label="Empty Shopping Cart Content Before"/> + <container name="checkout.cart.top_methods" as="top_methods" label="Payment Methods Before Checkout Button"> + <block class="Magento\Checkout\Block\Onepage\Link" name="checkout.cart.methods.onepage.top" template="onepage/link.phtml"/> + </container> + <container name="checkout.cart.form.before" as="form_before" label="Shopping Cart Form Before"/> + <container name="checkout.cart.methods" as="methods" label="Payment Methods After Checkout Button"> + <block class="Magento\Checkout\Block\Onepage\Link" name="checkout.cart.methods.onepage.bottom" template="onepage/link.phtml"/> + <block class="Magento\Checkout\Block\Multishipping\Link" name="checkout.cart.methods.multishipping" template="multishipping/link.phtml"/> + </container> + <container name="checkout.cart.extra" label="Shopping Cart Extra Contents"> + <container name="checkout.cart.widget" as="checkout_cart_widget" before="-" label="Shopping Cart Items After"/> + <block class="Magento\Checkout\Block\Cart\Coupon" name="checkout.cart.coupon" as="coupon" template="cart/coupon.phtml"/> + </container> + <block class="Magento\Checkout\Block\Cart\Shipping" name="checkout.cart.shipping" as="shipping" template="cart/shipping.phtml"/> + <block class="Magento\Checkout\Block\Cart\Crosssell" name="checkout.cart.crosssell" as="crosssell" template="cart/crosssell.phtml"/> + <block class="Magento\Checkout\Block\Cart\Totals" name="checkout.cart.totals" as="totals" template="cart/totals.phtml"/> + </block> + </referenceContainer> + <container name="additional.product.info" label="Additional Product Info"/> +</layout> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/layout/checkout_multishipping_overview.xml b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_multishipping.xml similarity index 68% rename from app/design/frontend/magento_plushe/Magento_Checkout/layout/checkout_multishipping_overview.xml rename to app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_multishipping.xml index 64eb779675a5a74c21c52b8fc60b1300395504d4..6992a9165dc27dc8a182b4adb75c970e33642878 100644 --- a/app/design/frontend/magento_plushe/Magento_Checkout/layout/checkout_multishipping_overview.xml +++ b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_multishipping.xml @@ -23,11 +23,13 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <referenceBlock name="page.main.title"> - <action method="setPageTitle"> - <argument translate="true" name="label" xsi:type="string">Review Order</argument> +<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" label="Multishipping Checkout" design_abstraction="custom"> + <referenceBlock name="root"> + <action method="setTemplate"> + <argument name="template" xsi:type="string">1column.phtml</argument> </action> </referenceBlock> - <container name="additional.product.info" label="Additional Product Info"/> + <referenceContainer name="content"> + <block class="Magento\Checkout\Block\Multishipping\State" name="checkout_state" template="multishipping/state.phtml"/> + </referenceContainer> </layout> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/layout/checkout_multishipping_address_editaddress.xml b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_multishipping_address_editaddress.xml similarity index 83% rename from app/design/frontend/magento_plushe/Magento_Checkout/layout/checkout_multishipping_address_editaddress.xml rename to app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_multishipping_address_editaddress.xml index b99353cee0e184ce30bbb9d17962b151844280f8..01155fca00b61a3a223960aeccda1a52c0f05ed8 100644 --- a/app/design/frontend/magento_plushe/Magento_Checkout/layout/checkout_multishipping_address_editaddress.xml +++ b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_multishipping_address_editaddress.xml @@ -26,9 +26,4 @@ <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <update handle="checkout_multishipping"/> <update handle="checkout_multishipping_customer_address"/> - <referenceBlock name="page.main.title"> - <action method="setPageTitle"> - <argument translate="true" name="label" xsi:type="string">Edit Address</argument> - </action> - </referenceBlock> </layout> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/layout/checkout_multishipping_address_editbilling.xml b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_multishipping_address_editbilling.xml similarity index 83% rename from app/design/frontend/magento_plushe/Magento_Checkout/layout/checkout_multishipping_address_editbilling.xml rename to app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_multishipping_address_editbilling.xml index 024408703e3f6021981088ad69c3f23f861a2003..01155fca00b61a3a223960aeccda1a52c0f05ed8 100644 --- a/app/design/frontend/magento_plushe/Magento_Checkout/layout/checkout_multishipping_address_editbilling.xml +++ b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_multishipping_address_editbilling.xml @@ -26,9 +26,4 @@ <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <update handle="checkout_multishipping"/> <update handle="checkout_multishipping_customer_address"/> - <referenceBlock name="page.main.title"> - <action method="setPageTitle"> - <argument translate="true" name="label" xsi:type="string">Change Billing Address</argument> - </action> - </referenceBlock> </layout> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/layout/checkout_multishipping_address_editshipping.xml b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_multishipping_address_editshipping.xml similarity index 83% rename from app/design/frontend/magento_plushe/Magento_Checkout/layout/checkout_multishipping_address_editshipping.xml rename to app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_multishipping_address_editshipping.xml index 6354c13f57ac58537621b9ac2b952af5d37309f9..01155fca00b61a3a223960aeccda1a52c0f05ed8 100644 --- a/app/design/frontend/magento_plushe/Magento_Checkout/layout/checkout_multishipping_address_editshipping.xml +++ b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_multishipping_address_editshipping.xml @@ -26,9 +26,4 @@ <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <update handle="checkout_multishipping"/> <update handle="checkout_multishipping_customer_address"/> - <referenceBlock name="page.main.title"> - <action method="setPageTitle"> - <argument translate="true" name="label" xsi:type="string">Edit Shipping Address</argument> - </action> - </referenceBlock> </layout> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/layout/checkout_multishipping_address_newbilling.xml b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_multishipping_address_newbilling.xml similarity index 83% rename from app/design/frontend/magento_plushe/Magento_Checkout/layout/checkout_multishipping_address_newbilling.xml rename to app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_multishipping_address_newbilling.xml index 7830a2c990e7f6dc45054fe2fa242a99bef1aad1..01155fca00b61a3a223960aeccda1a52c0f05ed8 100644 --- a/app/design/frontend/magento_plushe/Magento_Checkout/layout/checkout_multishipping_address_newbilling.xml +++ b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_multishipping_address_newbilling.xml @@ -26,9 +26,4 @@ <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <update handle="checkout_multishipping"/> <update handle="checkout_multishipping_customer_address"/> - <referenceBlock name="page.main.title"> - <action method="setPageTitle"> - <argument translate="true" name="label" xsi:type="string">Create Billing Address</argument> - </action> - </referenceBlock> </layout> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/layout/checkout_multishipping_address_newshipping.xml b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_multishipping_address_newshipping.xml similarity index 83% rename from app/design/frontend/magento_plushe/Magento_Checkout/layout/checkout_multishipping_address_newshipping.xml rename to app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_multishipping_address_newshipping.xml index f9a3309971af37a910d2886d766c763015a6d27c..01155fca00b61a3a223960aeccda1a52c0f05ed8 100644 --- a/app/design/frontend/magento_plushe/Magento_Checkout/layout/checkout_multishipping_address_newshipping.xml +++ b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_multishipping_address_newshipping.xml @@ -26,9 +26,4 @@ <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <update handle="checkout_multishipping"/> <update handle="checkout_multishipping_customer_address"/> - <referenceBlock name="page.main.title"> - <action method="setPageTitle"> - <argument translate="true" name="label" xsi:type="string">Create Shipping Address</argument> - </action> - </referenceBlock> </layout> diff --git a/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_multishipping_address_select.xml b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_multishipping_address_select.xml new file mode 100644 index 0000000000000000000000000000000000000000..8476c3644e26d46eed734f111f6d07ebce62d9bf --- /dev/null +++ b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_multishipping_address_select.xml @@ -0,0 +1,31 @@ +<?xml version="1.0"?> +<!-- +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" label="Multishipping Checkout Shipping Address Selection" design_abstraction="custom"> + <update handle="checkout_multishipping"/> + <referenceContainer name="content"> + <block class="Magento\Checkout\Block\Multishipping\Address\Select" name="checkout_address_select" template="multishipping/address/select.phtml"/> + </referenceContainer> +</layout> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/layout/checkout_multishipping_address_selectbilling.xml b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_multishipping_address_selectbilling.xml similarity index 84% rename from app/design/frontend/magento_plushe/Magento_Checkout/layout/checkout_multishipping_address_selectbilling.xml rename to app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_multishipping_address_selectbilling.xml index e93e4be3ff0a5f3401ae2a056275abb37879f7da..edbe6ce92e8a5de9ea4e21341d9db672b9eca134 100644 --- a/app/design/frontend/magento_plushe/Magento_Checkout/layout/checkout_multishipping_address_selectbilling.xml +++ b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_multishipping_address_selectbilling.xml @@ -28,9 +28,4 @@ <referenceContainer name="content"> <block class="Magento\Checkout\Block\Multishipping\Address\Select" name="checkout_address_select" template="multishipping/address/select.phtml"/> </referenceContainer> - <referenceBlock name="page.main.title"> - <action method="setPageTitle"> - <argument name="label" translate="true" xsi:type="string">Change Billing Address</argument> - </action> - </referenceBlock> </layout> diff --git a/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_multishipping_addresses.xml b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_multishipping_addresses.xml new file mode 100644 index 0000000000000000000000000000000000000000..cb8f206e7354716af5da1032b29bac04c2b7baad --- /dev/null +++ b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_multishipping_addresses.xml @@ -0,0 +1,35 @@ +<?xml version="1.0"?> +<!-- +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <update handle="checkout_multishipping"/> + <referenceContainer name="content"> + <block class="Magento\Checkout\Block\Multishipping\Addresses" name="checkout_addresses" template="multishipping/addresses.phtml"> + <block class="Magento\Checkout\Block\Cart\Item\Renderer" as="default" template="multishipping/item/default.phtml"/> + <block class="Magento\Checkout\Block\Cart\Item\Renderer\Grouped" as="grouped" template="multishipping/item/default.phtml"/> + <block class="Magento\Checkout\Block\Cart\Item\Renderer\Configurable" as="configurable" template="multishipping/item/default.phtml"/> + </block> + </referenceContainer> +</layout> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/layout/checkout_multishipping_billing.xml b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_multishipping_billing.xml similarity index 65% rename from app/design/frontend/magento_plushe/Magento_Checkout/layout/checkout_multishipping_billing.xml rename to app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_multishipping_billing.xml index 26afc1048ab20db23ea9003441ea7067e5e1de59..727670fe7b56bd7281e08ff961b94cadf5be183d 100644 --- a/app/design/frontend/magento_plushe/Magento_Checkout/layout/checkout_multishipping_billing.xml +++ b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_multishipping_billing.xml @@ -24,13 +24,13 @@ */ --> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <referenceBlock name="page.main.title"> - <action method="setPageTitle"> - <argument translate="true" name="label" xsi:type="string">Billing Information</argument> - </action> - </referenceBlock> - <referenceBlock name="checkout_billing"> - <container name="payment_methods_before" label="Payment Methods Before"/> - <container name="payment_methods_after" label="Payment Methods After"/> - </referenceBlock> + <update handle="checkout_multishipping"/> + <referenceContainer name="content"> + <block class="Magento\Checkout\Block\Multishipping\Billing" name="checkout_billing" template="multishipping/billing.phtml"> + <action method="setMethodFormTemplate"> + <argument name="method" xsi:type="string">purchaseorder</argument> + <argument name="template" xsi:type="string">Magento_Payment::form/purchaseorder.phtml</argument> + </action> + </block> + </referenceContainer> </layout> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/layout/override/base/checkout_multishipping_customer_address.xml b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_multishipping_customer_address.xml similarity index 88% rename from app/design/frontend/magento_plushe/Magento_Checkout/layout/override/base/checkout_multishipping_customer_address.xml rename to app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_multishipping_customer_address.xml index 189b3da3dbfad3045aa6c793310ea26f58ed2cfb..8e46496c74a4abeae1308d37ec5d2d8b73abe645 100644 --- a/app/design/frontend/magento_plushe/Magento_Checkout/layout/override/base/checkout_multishipping_customer_address.xml +++ b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_multishipping_customer_address.xml @@ -23,9 +23,8 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> +<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" label="Multishipping Checkout Customer Address Edit Form" design_abstraction="custom"> <referenceContainer name="content"> <block class="Magento\Customer\Block\Address\Edit" name="customer_address_edit" template="address/edit.phtml"/> </referenceContainer> - <update handle="customer_form_template_handle"/> </layout> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/layout/checkout_multishipping.xml b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_multishipping_login.xml similarity index 95% rename from app/design/frontend/magento_plushe/Magento_Checkout/layout/checkout_multishipping.xml rename to app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_multishipping_login.xml index 6ee5a363eadc0836dd20546da184878c6a27d14e..db128f00b8c2ad1e461a633f235a29cccbe556cf 100644 --- a/app/design/frontend/magento_plushe/Magento_Checkout/layout/checkout_multishipping.xml +++ b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_multishipping_login.xml @@ -24,4 +24,5 @@ */ --> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <update handle="customer_account_login"/> </layout> diff --git a/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_multishipping_overview.xml b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_multishipping_overview.xml new file mode 100644 index 0000000000000000000000000000000000000000..6fae4733fab34f677ddb6b62c02f9f764b3bc604 --- /dev/null +++ b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_multishipping_overview.xml @@ -0,0 +1,46 @@ +<?xml version="1.0"?> +<!-- +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <update handle="checkout_multishipping"/> + <referenceContainer name="content"> + <block class="Magento\Checkout\Block\Multishipping\Overview" name="checkout_overview" template="multishipping/overview.phtml"> + <block class="Magento\Checkout\Block\Cart\Item\Renderer" as="default" template="multishipping/item/default.phtml"/> + <block class="Magento\Checkout\Block\Cart\Item\Renderer\Grouped" as="grouped" template="multishipping/item/default.phtml"/> + <block class="Magento\Checkout\Block\Cart\Item\Renderer\Configurable" as="configurable" template="multishipping/item/default.phtml"/> + <block class="Magento\Checkout\Block\Cart\Item\Renderer\Grouped" as="row-grouped" template="multishipping/overview/item.phtml"/> + <block class="Magento\Checkout\Block\Cart\Item\Renderer\Configurable" as="row-configurable" template="multishipping/overview/item.phtml"/> + <block class="Magento\Checkout\Block\Multishipping\Payment\Info" name="payment_info"> + <action method="setInfoTemplate"> + <argument name="method" xsi:type="string"/> + <argument name="template" xsi:type="string"/> + </action> + </block> + <block class="Magento\Checkout\Block\Agreements" name="checkout.multishipping.agreements" as="agreements" template="multishipping/agreements.phtml"/> + <block class="Magento\Checkout\Block\Cart\Totals" name="totals"/> + <container name="checkout.multishipping.overview.items.after" as="items_after" label="Overview Items After"/> + </block> + </referenceContainer> +</layout> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/layout/default.xml b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_multishipping_register.xml similarity index 95% rename from app/design/frontend/magento_plushe/Magento_Checkout/layout/default.xml rename to app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_multishipping_register.xml index 94c94a523fe9b9df7235f716cb912acc1d1cd487..a3a49fd46d2637a2eef662f5a9765381d02ff1ff 100644 --- a/app/design/frontend/magento_plushe/Magento_Checkout/layout/default.xml +++ b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_multishipping_register.xml @@ -24,5 +24,5 @@ */ --> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <remove name="checkout_cart_link"/> + <update handle="customer_account_create"/> </layout> diff --git a/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_multishipping_shipping.xml b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_multishipping_shipping.xml new file mode 100644 index 0000000000000000000000000000000000000000..09e49208bc08b01f172ffa7f34981237f598f9ef --- /dev/null +++ b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_multishipping_shipping.xml @@ -0,0 +1,40 @@ +<?xml version="1.0"?> +<!-- +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <update handle="checkout_multishipping"/> + <referenceContainer name="content"> + <block class="Magento\Checkout\Block\Multishipping\Shipping" name="checkout_shipping" template="multishipping/shipping.phtml"> + <block class="Magento\Checkout\Block\Cart\Item\Renderer" as="default" template="multishipping/item/default.phtml"/> + <block class="Magento\Checkout\Block\Cart\Item\Renderer\Grouped" as="grouped" template="multishipping/item/default.phtml"/> + <block class="Magento\Checkout\Block\Cart\Item\Renderer\Configurable" as="configurable" template="multishipping/item/default.phtml"/> + <block class="Magento\Checkout\Block\Multishipping\Billing\Items" name="checkout_billing_items" template="multishipping/billing/items.phtml"> + <block class="Magento\Checkout\Block\Cart\Item\Renderer" as="default" template="multishipping/item/default.phtml"/> + <block class="Magento\Checkout\Block\Cart\Item\Renderer\Grouped" as="grouped" template="multishipping/item/default.phtml"/> + <block class="Magento\Checkout\Block\Cart\Item\Renderer\Configurable" as="configurable" template="multishipping/item/default.phtml"/> + </block> + </block> + </referenceContainer> +</layout> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/layout/checkout_multishipping_success.xml b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_multishipping_success.xml similarity index 80% rename from app/design/frontend/magento_plushe/Magento_Checkout/layout/checkout_multishipping_success.xml rename to app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_multishipping_success.xml index 9a4c4da6351b6b306fba32f413dbf20423bf2556..6e453eef56b5c4d07809923cc7659816b670f26f 100644 --- a/app/design/frontend/magento_plushe/Magento_Checkout/layout/checkout_multishipping_success.xml +++ b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_multishipping_success.xml @@ -24,9 +24,8 @@ */ --> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <referenceBlock name="page.main.title"> - <action method="setPageTitle"> - <argument translate="true" name="title" xsi:type="string">Your order has been received.</argument> - </action> - </referenceBlock> + <update handle="checkout_multishipping"/> + <referenceContainer name="content"> + <block class="Magento\Checkout\Block\Multishipping\Success" name="checkout_success" template="multishipping/success.phtml"/> + </referenceContainer> </layout> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/layout/override/base/checkout_onepage_additional.xml b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_onepage_additional.xml similarity index 91% rename from app/design/frontend/magento_plushe/Magento_Checkout/layout/override/base/checkout_onepage_additional.xml rename to app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_onepage_additional.xml index 46344f85d912c1d3fbc0a0e2d08c38364876b6d0..7784b3f5619752cf1c1472400b48aeb1d0494e47 100644 --- a/app/design/frontend/magento_plushe/Magento_Checkout/layout/override/base/checkout_onepage_additional.xml +++ b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_onepage_additional.xml @@ -24,7 +24,7 @@ */ --> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <block class="Magento\Checkout\Block\Onepage\Shipping\Method\Additional" name="shipping_method_available" output="1" template="onepage/shipping_method/additional.phtml"> + <block class="Magento\Checkout\Block\Onepage\Shipping\Method\Additional" name="shipping_method_additional" output="1" template="onepage/shipping_method/additional.phtml"> <action method="setDontDisplayContainer"> <argument name="param" xsi:type="string">1</argument> </action> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/layout/override/base/checkout_onepage_failure.xml b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_onepage_failure.xml similarity index 84% rename from app/design/frontend/magento_plushe/Magento_Checkout/layout/override/base/checkout_onepage_failure.xml rename to app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_onepage_failure.xml index f4a491f3acb67bdb34dcee15a4be63af559fbeb0..fa508817825c5823e9f48ef086cec96b34cd79ec 100644 --- a/app/design/frontend/magento_plushe/Magento_Checkout/layout/override/base/checkout_onepage_failure.xml +++ b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_onepage_failure.xml @@ -24,10 +24,9 @@ */ --> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <update handle="page_one_column"/> - <referenceBlock name="page.main.title"> - <action method="setPageTitle"> - <argument translate="true" name="title" xsi:type="string">Your order has been received.</argument> + <referenceBlock name="root"> + <action method="setTemplate"> + <argument name="template" xsi:type="string">2columns-right.phtml</argument> </action> </referenceBlock> <referenceContainer name="content"> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/layout/override/base/checkout_onepage_index.xml b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_onepage_index.xml similarity index 80% rename from app/design/frontend/magento_plushe/Magento_Checkout/layout/override/base/checkout_onepage_index.xml rename to app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_onepage_index.xml index eaefcb0bbd858fb01b5047bade94ce5fbe3c3474..ff432355736cf749f722057ac15a4a615be34556 100644 --- a/app/design/frontend/magento_plushe/Magento_Checkout/layout/override/base/checkout_onepage_index.xml +++ b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_onepage_index.xml @@ -26,17 +26,10 @@ <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <referenceBlock name="root"> <action method="setTemplate"> - <argument name="template" xsi:type="string">1column.phtml</argument> + <argument name="template" xsi:type="string">2columns-right.phtml</argument> </action> </referenceBlock> - <referenceBlock name="head"> - <block class="Magento\Page\Block\Html\Head\Script" name="magento-checkout-js-opcheckout-js"> - <arguments> - <argument name="file" xsi:type="string">Magento_Checkout::js/opcheckout.js</argument> - </arguments> - </block> - </referenceBlock> - <referenceContainer name="content"> + <referenceContainer name="right"> <container name="checkout.progress.wrapper" label="Checkout Progress Wrapper" htmlTag="div" htmlId="checkout-progress-wrapper"> <block class="Magento\Checkout\Block\Onepage\Progress" name="checkout.progress" before="-" template="onepage/progress.phtml"/> </container> @@ -45,12 +38,9 @@ <block class="Magento\Checkout\Block\Onepage" name="checkout.onepage" template="onepage.phtml"> <block class="Magento\Checkout\Block\Onepage\Login" name="checkout.onepage.login" as="login" template="onepage/login.phtml"> <container name="checkout.onepage.login.before" as="login_before" label="Login/Registration Before" htmlTag="div"/> - <container name="form.login.additional.info" label="invisible" as="form_additional_info"/> - </block> - <block class="Magento\Checkout\Block\Onepage\Billing" name="checkout.onepage.billing" as="billing" template="onepage/billing.phtml"> - <container name="form.billing.additional.info" label="invisible" as="form_additional_info"/> </block> - <block class="Magento\Checkout\Block\Onepage\Shipping" name="checkout.onepage.shipping" as="shipping" template="onepage/shipping.phtml" /> + <block class="Magento\Checkout\Block\Onepage\Billing" name="checkout.onepage.billing" as="billing" template="onepage/billing.phtml"/> + <block class="Magento\Checkout\Block\Onepage\Shipping" name="checkout.onepage.shipping" as="shipping" template="onepage/shipping.phtml"/> <block class="Magento\Checkout\Block\Onepage\Shipping\Method" name="checkout.onepage.shipping_method" as="shipping_method" template="onepage/shipping_method.phtml"> <block class="Magento\Checkout\Block\Onepage\Shipping\Method\Available" name="checkout.onepage.shipping_method.available" as="available" template="onepage/shipping_method/available.phtml"/> <block class="Magento\Checkout\Block\Onepage\Shipping\Method\Additional" name="checkout.onepage.shipping_method.additional" as="additional" template="onepage/shipping_method/additional.phtml"/> @@ -62,11 +52,10 @@ <argument name="template" xsi:type="string">Magento_Payment::form/purchaseorder.phtml</argument> </action> </block> - <block class="Magento\Core\Block\Template" name="checkout.onepage.payment.additional" as="additional"/> - <block class="Magento\Core\Block\Template" name="checkout.onepage.payment.methods_additional" as="methods_additional"/> + <block class="Magento\View\Block\Template" name="checkout.onepage.payment.additional" as="additional"/> + <block class="Magento\View\Block\Template" name="checkout.onepage.payment.methods_additional" as="methods_additional"/> </block> <block class="Magento\Checkout\Block\Onepage\Review" name="checkout.onepage.review" as="review" template="onepage/review.phtml"/> </block> </referenceContainer> - <update handle="customer_form_template_handle"/> </layout> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/layout/checkout_multishipping_addresses.xml b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_onepage_paymentmethod.xml similarity index 72% rename from app/design/frontend/magento_plushe/Magento_Checkout/layout/checkout_multishipping_addresses.xml rename to app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_onepage_paymentmethod.xml index c7e28ffe5a6766ea2bca0c3c78c1b475f440b82f..25a577d24d14df99f07b1f58a672146bddd8273b 100644 --- a/app/design/frontend/magento_plushe/Magento_Checkout/layout/checkout_multishipping_addresses.xml +++ b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_onepage_paymentmethod.xml @@ -22,12 +22,12 @@ * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ---> + --> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <container name="additional.product.info" label="Additional Product Info"/> - <referenceBlock name="page.main.title"> - <action method="setPageTitle"> - <argument translate="true" name="label" xsi:type="string">Ship to Multiple Addresses</argument> + <block class="Magento\Checkout\Block\Onepage\Payment\Methods" name="payment_method" output="1" template="onepage/payment/methods.phtml"> + <action method="setMethodFormTemplate"> + <argument name="method" xsi:type="string">purchaseorder</argument> + <argument name="template" xsi:type="string">Magento_Payment::form/purchaseorder.phtml</argument> </action> - </referenceBlock> + </block> </layout> diff --git a/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_onepage_progress.xml b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_onepage_progress.xml new file mode 100644 index 0000000000000000000000000000000000000000..80228f5a508414d315f492525309ceed9ea5b7af --- /dev/null +++ b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_onepage_progress.xml @@ -0,0 +1,35 @@ +<?xml version="1.0"?> +<!-- +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <block class="Magento\Checkout\Block\Onepage\Progress" name="progress" output="1" template="onepage/progress.phtml"> + <block class="Magento\Checkout\Block\Onepage\Payment\Info" name="payment_info"> + <action method="setInfoTemplate"> + <argument name="method" xsi:type="string"/> + <argument name="template" xsi:type="string"/> + </action> + </block> + </block> +</layout> diff --git a/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_onepage_review.xml b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_onepage_review.xml new file mode 100644 index 0000000000000000000000000000000000000000..04bf6de13458fe6d0719c76a80fb97b3c8e68068 --- /dev/null +++ b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_onepage_review.xml @@ -0,0 +1,37 @@ +<?xml version="1.0"?> +<!-- +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <block class="Magento\Checkout\Block\Onepage\Review\Info" name="order_review" output="1" template="onepage/review/info.phtml"> + <block class="Magento\Checkout\Block\Cart\Item\Renderer" as="default" template="onepage/review/item.phtml"/> + <block class="Magento\Checkout\Block\Cart\Item\Renderer\Grouped" as="grouped" template="onepage/review/item.phtml"/> + <block class="Magento\Checkout\Block\Cart\Item\Renderer\Configurable" as="configurable" template="onepage/review/item.phtml"/> + <block class="Magento\Checkout\Block\Cart\Totals" name="checkout.onepage.review.info.totals" as="totals" template="onepage/review/totals.phtml"/> + <container name="checkout.onepage.review.info.items.before" as="items_before" label="Items Before"/> + <container name="checkout.onepage.review.info.items.after" as="items_after" label="Items After"/> + <block class="Magento\Checkout\Block\Agreements" name="checkout.onepage.agreements" as="agreements" template="onepage/agreements.phtml"/> + <block class="Magento\View\Block\Template" name="checkout.onepage.review.button" as="button" template="Magento_Checkout::onepage/review/button.phtml"/> + </block> +</layout> diff --git a/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_onepage_shippingmethod.xml b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_onepage_shippingmethod.xml new file mode 100644 index 0000000000000000000000000000000000000000..01ea8488482668aeabb14ff500c89c79d8e79dd4 --- /dev/null +++ b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_onepage_shippingmethod.xml @@ -0,0 +1,28 @@ +<?xml version="1.0"?> +<!-- +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <block class="Magento\Checkout\Block\Onepage\Shipping\Method\Available" name="shipping_method" output="1" template="onepage/shipping_method/available.phtml"/> +</layout> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/layout/override/base/checkout_onepage_success.xml b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_onepage_success.xml similarity index 84% rename from app/design/frontend/magento_plushe/Magento_Checkout/layout/override/base/checkout_onepage_success.xml rename to app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_onepage_success.xml index 65a3aea343b758204154d4afec64798e1566d69d..ac8dc93f7f630c463afce9e137e14508e72e515c 100644 --- a/app/design/frontend/magento_plushe/Magento_Checkout/layout/override/base/checkout_onepage_success.xml +++ b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/checkout_onepage_success.xml @@ -24,10 +24,9 @@ */ --> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <update handle="page_one_column"/> - <referenceBlock name="page.main.title"> - <action method="setPageTitle"> - <argument translate="true" name="title" xsi:type="string">Your order has been received.</argument> + <referenceBlock name="root"> + <action method="setTemplate"> + <argument name="template" xsi:type="string">2columns-right.phtml</argument> </action> </referenceBlock> <referenceContainer name="content"> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/layout/override/base/default.xml b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/default.xml similarity index 68% rename from app/design/frontend/magento_plushe/Magento_Checkout/layout/override/base/default.xml rename to app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/default.xml index 38f1fbec78f27e6a5e7aedc638ed4219f27dd367..942683120c65281a8055278185cc71d80b7f134e 100644 --- a/app/design/frontend/magento_plushe/Magento_Checkout/layout/override/base/default.xml +++ b/app/design/frontend/magento_backup/Magento_Checkout/layout/override/base/default.xml @@ -25,15 +25,22 @@ --> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <referenceBlock name="head.components"> - <block class="Magento\Core\Block\Template" name="checkout_page_head_components" template="Magento_Checkout::js/components.phtml"/> + <block class="Magento\Page\Block\Js\Components" name="checkout_page_head_components" template="Magento_Checkout::js/components.phtml"/> </referenceBlock> - <referenceContainer name="header"> - <block class="Magento\Checkout\Block\Cart\Sidebar" name="minicart" as="minicart" after="logo" template="cart/minicart.phtml"> + <referenceBlock name="top.links"> + <block class="Magento\Checkout\Block\Cart\Link" name="my-cart-link"/> + <block class="Magento\Checkout\Block\Link" name="onepage-checkout-link" after="my-cart-link"> + <arguments> + <argument name="label" xsi:type="string">Checkout</argument> + </arguments> + </block> + </referenceBlock> + <referenceContainer name="right"> + <block class="Magento\Checkout\Block\Cart\Sidebar" name="cart_sidebar" template="cart/sidebar.phtml" before="-"> <block class="Magento\Checkout\Block\Cart\Item\Renderer" as="simple" template="cart/sidebar/default.phtml"/> <block class="Magento\Checkout\Block\Cart\Item\Renderer\Grouped" as="grouped" template="cart/sidebar/default.phtml"/> <block class="Magento\Checkout\Block\Cart\Item\Renderer\Configurable" as="configurable" template="cart/sidebar/default.phtml"/> - <container name="minicart.extra.info" as="minicart_info" label="My Cart Extra info"/> - <container name="topCart.extra_actions" as="extra_actions" label="My Cart Extra Actions"/> + <container name="cart_sidebar.extra_actions" as="extra_actions" label="My Cart Extra Actions"/> </block> </referenceContainer> </layout> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/multishipping/address/select.phtml b/app/design/frontend/magento_backup/Magento_Checkout/multishipping/address/select.phtml similarity index 50% rename from app/design/frontend/magento_plushe/Magento_Checkout/multishipping/address/select.phtml rename to app/design/frontend/magento_backup/Magento_Checkout/multishipping/address/select.phtml index 91a0dd3b6de0de8217a083b4e72daab891a6c236..4dea9b79df970b74ebce5326089d506aaae4986d 100644 --- a/app/design/frontend/magento_plushe/Magento_Checkout/multishipping/address/select.phtml +++ b/app/design/frontend/magento_backup/Magento_Checkout/multishipping/address/select.phtml @@ -19,42 +19,40 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design + * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -<div class="multicheckout block change billing"> - <div class="actions"> - <button type="button" class="action add" role="add-address" title="<?php echo __('Add New Address') ?>"><span><?php echo __('Add New Address') ?></span></button> +<div class="multiple-checkout"> + <div class="page-title title-buttons"> + <h1><?php echo __('Change Billing Address') ?></h1> + <button type="button" title="<?php echo __('Add New Address') ?>" class="button" onclick="setLocation('<?php echo $this->getAddNewUrl() ?>')"><span><span><?php echo __('Add New Address') ?></span></span></button> </div> + <?php echo $this->getMessagesBlock()->getGroupedHtml() ?> <?php $_index=0 ?> <?php foreach ($this->getAddressCollection() as $_address): ?> - <div class="box billing<?php if($_index%2==0): ?> odd<?php endif; ?>"> - <address> - <?php echo $_address->format('html') ?> + <?php if($_index%3==0): ?><div class="col3-set"><?php endif; ?> + <div class="col-<?php echo ($_index%3+1) ?>"> + <p class="actions"> + <a href="<?php echo $this->getEditAddressUrl($_address) ?>"><?php echo __('Edit Address') ?></a> <span class="separator">|</span> + <a href="<?php echo $this->getSetAddressUrl($_address) ?>"><strong><?php echo __('Select Address') ?></strong></a> + </p> + <address> + <?php echo $_address->format('html') ?> + </address> <?php if($this->isAddressDefaultBilling($_address)): ?> - <br /><strong><?php echo __('Default Billing') ?></strong> + <strong><?php echo __('Default Billing') ?></strong> <?php endif; ?> <?php if($this->isAddressDefaultShipping($_address)): ?> <br /><strong><?php echo __('Default Shipping') ?></strong> <?php endif; ?> - </address> - <div class="actions"> - <a href="<?php echo $this->getEditAddressUrl($_address) ?>" class="action edit"><span><?php echo __('Edit Address') ?></span></a> - <a href="<?php echo $this->getSetAddressUrl($_address) ?>" class="action select"><span><?php echo __('Select Address') ?></span></a> - </div> </div> <?php $_index++ ?> + <?php if($_index && $_index%3==0): ?></div><?php endif; ?> <?php endforeach; ?> - <div class="actions"> - <a href="<?php echo $this->getBackUrl() ?>" class="action back"><span><?php echo __('Back to Billing Information') ?></span></a> + <?php if(!$_index || $_index%3!=0): ?></div><?php endif; ?> + <div class="buttons-set"> + <p class="back-link"><a href="<?php echo $this->getBackUrl() ?>"><small>« </small><?php echo __('Back to Billing Information') ?></a></p> </div> </div> -<script type="text/javascript"> - head.js("<?php echo $this->getViewFileUrl('Magento_Customer::address.js'); ?>", function() { - jQuery('.actions').address({ - addAddress: "button[role='add-address']", - addAddressLocation: '<?php echo $this->getAddNewUrl() ?>' - }); - }); -</script> diff --git a/app/design/frontend/magento_backup/Magento_Checkout/multishipping/addresses.phtml b/app/design/frontend/magento_backup/Magento_Checkout/multishipping/addresses.phtml new file mode 100644 index 0000000000000000000000000000000000000000..2b55e1349e1152425924194ce734e89578c4bd99 --- /dev/null +++ b/app/design/frontend/magento_backup/Magento_Checkout/multishipping/addresses.phtml @@ -0,0 +1,93 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category design + * @package base_default + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +?> +<?php +/** + * Ship to multiple address template + * + * @see \Magento\Checkout\Block\Multishipping\Addresses + */ +?> +<?php echo $this->getMessagesBlock()->getGroupedHtml() ?> +<form id="checkout_multishipping_form" action="<?php echo $this->getPostActionUrl() ?>" method="post"> + <div class="multiple-checkout"> + <div class="page-title title-buttons"> + <h1><?php echo __('Ship to Multiple Addresses') ?></h1> + <button type="button" title="<?php echo __('Enter a New Address') ?>" class="button" data-role="add-new-address"><span><span><?php echo __('Enter a New Address') ?></span></span></button> + </div> + <input type="hidden" name="continue" value="0" id="can_continue_flag" /> + <input type="hidden" name="new_address" value="0" id="add_new_address_flag" /> + <h2><?php echo __('Please select a shipping address for applicable items.') ?></h2> + <table class="data-table" id="multiship-addresses-table"> + <col /> + <col width="1" /> + <col width="1" /> + <col width="1" /> + <thead> + <tr> + <th><?php echo __('Product') ?></th> + <th class="a-center"><?php echo __('Qty') ?></th> + <th><?php echo __('Send To') ?></th> + <th> </th> + </tr> + </thead> + <tfoot> + <tr> + <td colspan="100" class="a-right"><button type="submit" title="<?php echo __('Update Qty & Addresses') ?>" class="button" data-role="can-continue" data-flag="0"><span><span><?php echo __('Update Qty & Addresses') ?></span></span></button></td> + </tr> + </tfoot> + <tbody> + <?php foreach ($this->getItems() as $_index => $_item): ?> + <?php if ($_item->getQuoteItem()) :?> + <tr> + <td><?php echo $this->getItemHtml($_item->getQuoteItem())?></td> + <td><input type="text" name="ship[<?php echo $_index ?>][<?php echo $_item->getQuoteItemId() ?>][qty]" value="<?php echo $this->escapeHtml($_item->getQty()) ?>" size="2" class="input-text qty" data-validate="{number: true}"/></td> + <td><?php if ($_item->getProduct()->getIsVirtual()): echo __('Shipping selection is not applicable.'); else: echo $this->getAddressesHtmlSelect($_item, $_index); endif; ?></td> + <td class="a-center"><a href="<?php echo $this->getItemDeleteUrl($_item) ?>" title="<?php echo __('Remove Item') ?>" class="btn-remove2"><?php echo __('Remove Item') ?></a></td> + </tr> + <?php endif; ?> + <?php endforeach; ?> + </tbody> + </table> + <script type="text/javascript">jQuery('#multiship-addresses-table').decorate('table')</script> + <div class="buttons-set"> + <p class="back-link"><a href="<?php echo $this->getBackUrl() ?>"><small>« </small><?php echo __('Back to Shopping Cart') ?></a></p> + <button type="submit" title="<?php echo __('Continue to Shipping Information') ?>" class="button<?php if ($this->isContinueDisabled()):?> disabled<?php endif; ?>" data-role="can-continue" data-flag="1"<?php if ($this->isContinueDisabled()):?> disabled="disabled"<?php endif; ?>><span><span><?php echo __('Continue to Shipping Information') ?></span></span></button> + </div> + </div> +</form> +<script type="text/javascript"> + head.js( + "<?php echo $this->getViewFileUrl('jquery/jquery.validate.js') ?>", + "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js') ?>", + "<?php echo $this->getViewFileUrl('mage/validation.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation/validation.js') ?>", + "<?php echo $this->getViewFileUrl('Magento_Checkout::js/multi-shipping.js') ?>", + function() { + jQuery('#checkout_multishipping_form').multiShipping().validation(); + } + ); +</script> diff --git a/app/code/Magento/Checkout/view/frontend/multishipping/agreements.phtml b/app/design/frontend/magento_backup/Magento_Checkout/multishipping/agreements.phtml similarity index 100% rename from app/code/Magento/Checkout/view/frontend/multishipping/agreements.phtml rename to app/design/frontend/magento_backup/Magento_Checkout/multishipping/agreements.phtml diff --git a/app/design/frontend/magento_backup/Magento_Checkout/multishipping/billing.phtml b/app/design/frontend/magento_backup/Magento_Checkout/multishipping/billing.phtml new file mode 100644 index 0000000000000000000000000000000000000000..faa48086693017829739d07da92ced10af5c685e --- /dev/null +++ b/app/design/frontend/magento_backup/Magento_Checkout/multishipping/billing.phtml @@ -0,0 +1,111 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category design + * @package base_default + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +?> +<?php +/** + * Multishipping checkout billing information + * + * @see \Magento\Checkout\Block\Multishipping\Billing + */ +?> +<div class="multiple-checkout"> + <div class="page-title"> + <h1><?php echo __('Billing Information') ?></h1> + </div> + <?php echo $this->getMessagesBlock()->getGroupedHtml() ?> + <form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="multishipping-billing-form"> + <div class="col2-set"> + <div class="col-1 col-narrow"> + <div class="box"> + <div class="box-title"> + <h2><?php echo __('Billing Address') ?> <span class="separator">|</span> <a href="<?php echo $this->getSelectAddressUrl() ?>"><?php echo __('Change') ?></a></h2> + </div> + <div class="box-content"> + <?php $_address=$this->getAddress() ?> + <address><?php echo $_address->format('html') ?></address> + </div> + </div> + </div> + <div class="col-2 col-wide"> + <div class="box"> + <div class="box-title"> + <h2><?php echo __('Payment Method') ?></h2> + </div> + <div class="box-content"> + <!-- Payment methods forms list --> + <dl class="sp-methods"> + <?php + $_methods = $this->getMethods(); + $_methodsCount = count($_methods); + ?> + <?php foreach ($_methods as $_method): $_code = $_method->getCode() ?> + <dt> + <?php if ($_methodsCount > 1): ?> + <input type="radio" id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" name="payment[method]" title="<?php echo $this->escapeHtml($_method->getTitle()) ?>" <?php if($this->getSelectedMethodCode()==$_code): ?> checked="checked"<?php endif; ?> class="radio" /> + <?php else :?> + <span class="no-display"><input type="radio" id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" name="payment[method]" checked="checked" class="radio" /></span> + <?php endif;?> + <label for="p_method_<?php echo $_code ?>"><?php echo $this->escapeHtml($_method->getTitle()) ?></label> + </dt> + <?php if($html = $this->getChildHtml('payment.method.'.$_code)) : ?> + <dd> + <?php echo $html; ?> + </dd> + <?php endif; ?> + <?php endforeach; ?> + </dl> + <?php echo $this->getChildHtml('checkout_billing_items') ?> + </div> + </div> + </div> + </div> + <div class="buttons-set"> + <p class="back-link"><a href="<?php echo $this->getBackUrl() ?>"><small>« </small><?php echo __('Back to Shipping Information') ?></a></p> + <button id="payment-continue" type="submit" title="<?php echo __('Continue to Review Your Order') ?>" class="button"><span><span><?php echo __('Continue to Review Your Order') ?></span></span></button> + </div> + </form> + <script type="text/javascript"> + head.js( + "<?php echo $this->getViewFileUrl('jquery/jquery.validate.js')?>", + "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation/validation.js')?>", + "<?php echo $this->getViewFileUrl('Magento_Checkout::js/payment.js') ?>", + function() { + jQuery('#multishipping-billing-form').payment({ + checkoutPrice: <?php echo (float)$this->getQuoteBaseGrandTotal(); ?> + }).validation({ + errorPlacement: function(error, element) { + if (element.attr('data-validate') && element.attr('data-validate').indexOf('validate-cc-ukss') >= 0) { + element.parents('form').find('[data-validation-msg="validate-cc-ukss"]').html(error); + } else { + element.after(error); + } + } + }); + }); + </script> +</div> diff --git a/app/design/frontend/magento_backup/Magento_Checkout/multishipping/billing/items.phtml b/app/design/frontend/magento_backup/Magento_Checkout/multishipping/billing/items.phtml new file mode 100644 index 0000000000000000000000000000000000000000..96d7e0a4e99542c3be17e5adfd3e7776dd6388b4 --- /dev/null +++ b/app/design/frontend/magento_backup/Magento_Checkout/multishipping/billing/items.phtml @@ -0,0 +1,54 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category design + * @package base_default + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +?> +<?php if ($this->getQuote()->hasVirtualItems()): ?> + <div class="col2-set"> + <h2 class="legend"><?php echo __('Other Items in Your Order') ?></h2> + <div class="col-1 col-narrow"></div> + <div class="col-2 col-wide"> + <h3><?php echo __('Items') ?> <span class="separator">|</span> <a href="<?php echo $this->getVirtualProductEditUrl() ?>"><?php echo __('Edit Items') ?></a></h3> + <table class="data-table" id="unavailable-shipping-table"> + <col /> + <col width="1" /> + <thead> + <tr> + <th><?php echo __('Product Name') ?></th> + <th class="a-center"><?php echo __('Qty') ?></th> + </tr> + </thead> + <tbody> + <?php foreach ($this->getVirtualQuoteItems() as $_item): ?> + <tr> + <td><?php echo $this->getItemHtml($_item) ?></td> + <td class="a-center"><?php echo $_item->getQty() ?></td> + </tr> + <?php endforeach; ?> + </tbody> + </table> + <script type="text/javascript">(function($) {$('#unavailable-shipping-table').decorate('table')})(jQuery)</script> + </div> + </div> +<?php endif; ?> diff --git a/app/design/frontend/magento_backup/Magento_Checkout/multishipping/item/default.phtml b/app/design/frontend/magento_backup/Magento_Checkout/multishipping/item/default.phtml new file mode 100644 index 0000000000000000000000000000000000000000..9f29bfc973412e94b4a9b2fa7af944ebcb180449 --- /dev/null +++ b/app/design/frontend/magento_backup/Magento_Checkout/multishipping/item/default.phtml @@ -0,0 +1,45 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category design + * @package base_default + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +?> +<h3 class="product-name"><a href="<?php echo $this->getProductUrl() ?>"><?php echo $this->escapeHtml($this->getProductName()) ?></a></h3> +<?php if ($_options = $this->getOptionList()):?> +<dl class="item-options"> + <?php foreach ($_options as $_option) : ?> + <?php $_formatedOptionValue = $this->getFormatedOptionValue($_option) ?> + <dt><?php echo $this->escapeHtml($_option['label']) ?></dt> + <dd<?php if (isset($_formatedOptionValue['full_view'])): ?> class="truncated" data-mage-init="{truncateOptions:[]}"<?php endif; ?>><?php echo $_formatedOptionValue['value'] ?> + <?php if (isset($_formatedOptionValue['full_view'])): ?> + <div class="truncated_full_value"> + <dl class="item-options"> + <dt><?php echo $this->escapeHtml($_option['label']) ?></dt> + <dd><?php echo $_formatedOptionValue['full_view'] ?></dd> + </dl> + </div> + <?php endif; ?> + </dd> + <?php endforeach; ?> +</dl> +<?php endif; ?> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/multishipping/link.phtml b/app/design/frontend/magento_backup/Magento_Checkout/multishipping/link.phtml similarity index 82% rename from app/design/frontend/magento_plushe/Magento_Checkout/multishipping/link.phtml rename to app/design/frontend/magento_backup/Magento_Checkout/multishipping/link.phtml index 6d72e1a90090547a0e6fbda69b7543eb5b823f71..e141179eb76567af04b7515d9e753c0046fe51c1 100644 --- a/app/design/frontend/magento_plushe/Magento_Checkout/multishipping/link.phtml +++ b/app/design/frontend/magento_backup/Magento_Checkout/multishipping/link.phtml @@ -19,8 +19,9 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design + * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -<a class="action multicheckout" href="<?php echo $this->getCheckoutUrl()?>" title="<?php echo __('Checkout with Multiple Addresses');?>"><span><?php echo __('Checkout with Multiple Addresses');?></span></a> +<a href="<?php echo $this->getCheckoutUrl()?>" title="<?php echo __('Checkout with Multiple Addresses');?>"><?php echo __('Checkout with Multiple Addresses');?></a> diff --git a/app/design/frontend/magento_backup/Magento_Checkout/multishipping/overview.phtml b/app/design/frontend/magento_backup/Magento_Checkout/multishipping/overview.phtml new file mode 100644 index 0000000000000000000000000000000000000000..73b2f58a5c06abe3e9fc0f3105d1c29f61f521f5 --- /dev/null +++ b/app/design/frontend/magento_backup/Magento_Checkout/multishipping/overview.phtml @@ -0,0 +1,217 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category design + * @package base_default + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +?> +<?php /** @var $this \Magento\Checkout\Block\Multishipping\Overview */ ?> +<div class="multiple-checkout"> + <div class="page-title"> + <h1><?php echo __('Review Order') ?></h1> + </div> + <?php echo $this->getMessagesBlock()->getGroupedHtml() ?> + <form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="review-order-form"> + <div class="col2-set"> + <h2 class="legend"><?php echo __('Billing Information') ?></h2> + <div class="col-1"> + <div class="box"> + <?php $_address=$this->getBillingAddress() ?> + <div class="box-title"> + <h3><?php echo __('Billing Address') ?> <span class="separator">|</span> <a href="<?php echo $this->getEditBillingAddressUrl($_address) ?>"><?php echo __('Change') ?></a></h3> + </div> + <div class="box-content"> + <address> + <?php echo $_address->format('html') ?> + </address> + </div> + </div> + </div> + <div class="col-2"> + <div class="box"> + <div class="box-title"> + <h3><?php echo __('Payment Method') ?> <span class="separator">|</span> <a href="<?php echo $this->getEditBillingUrl() ?>"><?php echo __('Change') ?></a></h3> + </div> + <div class="box-content"> + <input type="hidden" name="payment[cc_number]" value="<?php echo $this->escapeHtml($this->getPayment()->getCcNumber())?>" /> + <input type="hidden" name="payment[cc_cid]" value="<?php echo $this->escapeHtml($this->getPayment()->getCcCid())?>" /> + <?php echo $this->getPaymentHtml() ?> + </div> + </div> + </div> + </div> + <?php $mergedCells = ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices() ? 2 : 1); ?> + <div class="col2-set"> + <h2 class="legend"><?php echo __('Shipping Information') ?></h2> + <?php foreach ($this->getShippingAddresses() as $_index => $_address): ?> + <h3 class="legend"><?php echo __('Address %1 of %2', ($_index+1), $this->getShippingAddressCount()) ?></h3> + <div class="col-1 col-narrow"> + <div class="box"> + <div class="box-title"> + <h4><?php echo __('Shipping To') ?> <span class="separator">|</span> <a href="<?php echo $this->getEditShippingAddressUrl($_address) ?>"><?php echo __('Change') ?></a></h4> + </div> + <div class="box-content"> + <address> + <?php echo $_address->format('html') ?> + </address> + </div> + </div> + <div class="box"> + <div class="box-title"> + <h4><?php echo __('Shipping Method') ?> <span class="separator">|</span> <a href="<?php echo $this->getEditShippingUrl() ?>"><?php echo __('Change') ?></a></h4> + </div> + <div class="box-content"> + <?php if($_rate=$this->getShippingAddressRate($_address)): ?> + <p> + <?php echo $this->escapeHtml($_rate->getCarrierTitle()) ?> - <?php echo $this->escapeHtml($_rate->getMethodTitle()) ?> + <?php $_excl = $this->getShippingPriceExclTax($_address); ?> + <?php $_incl = $this->getShippingPriceInclTax($_address); ?> + <?php echo $_excl; ?> + <?php if ($this->helper('Magento\Tax\Helper\Data')->displayShippingBothPrices() && $_incl != $_excl): ?> + (<?php echo __('Incl. Tax'); ?> <?php echo $_incl; ?>) + <?php endif; ?> + </p> + <?php endif; ?> + </div> + </div> + </div> + <div class="col-2 col-wide"> + <h4><?php echo __('Items') ?> <span class="separator">|</span> <a href="<?php echo $this->getAddressesEditUrl() ?>"><?php echo __('Edit Items') ?></a></h4> + <table class="data-table" id="overview-table-<?php echo $_address->getId() ?>"> + <col /> + <col width="1" /> + <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> + <col width="1" /> + <?php endif; ?> + <col width="1" /> + <col width="1" /> + <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> + <col width="1" /> + <?php endif; ?> + <thead> + <tr> + <th rowspan="<?php echo $mergedCells; ?>"><?php echo __('Product Name') ?></th> + <th colspan="<?php echo $mergedCells; ?>" class="a-center"><?php echo __('Price') ?></th> + <th rowspan="<?php echo $mergedCells; ?>"><?php echo __('Qty') ?></th> + <th colspan="<?php echo $mergedCells; ?>" class="a-center"><?php echo __('Subtotal') ?></th> + </tr> + <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> + <tr> + <th class="a-right"><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(false) ?></th> + <th><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(true) ?></th> + <th class="a-right"><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(false) ?></th> + <th><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(true) ?></th> + </tr> + <?php endif; ?> + </thead> + <tfoot> + <?php echo $this->renderTotals($this->getShippingAddressTotals($_address)); ?> + </tfoot> + <tbody> + <?php foreach ($this->getShippingAddressItems($_address) as $_item): ?> + <?php echo $this->getRowItemHtml($_item); ?> + <?php endforeach; ?> + </tbody> + </table> + <script type="text/javascript">jQuery('#overview-table-<?php echo $_address->getId() ?>').decorate('table')</script> + </div> + <?php if($this->getShippingAddressCount()!=$_index+1): ?> + <div class="divider"></div> + <?php endif; ?> + <?php endforeach; ?> + </div> + <?php if ($this->getQuote()->hasVirtualItems()): ?> + <div class="col2-set"> + <h2 class="legend"><?php echo __('Other Items in Your Order') ?></h2> + <div class="col-1 col-narrow"></div> + <div class="col-2 col-wide"> + <h3><?php echo __('Items') ?> <span class="separator">|</span> <a href="<?php echo $this->getVirtualProductEditUrl() ?>"><?php echo __('Edit Items') ?></a></h3> + <?php $mergedCells = ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices() ? 2 : 1); ?> + <table class="data-table" id="virtual-overview-table"> + <col /> + <col width="1" /> + <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> + <col width="1" /> + <?php endif; ?> + <col width="1" /> + <col width="1" /> + <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> + <col width="70" /> + <?php endif; ?> + <thead> + <tr> + <th rowspan="<?php echo $mergedCells; ?>"><?php echo __('Product Name') ?></th> + <th colspan="<?php echo $mergedCells; ?>" class="a-center"><?php echo __('Price') ?></th> + <th rowspan="<?php echo $mergedCells; ?>"><?php echo __('Qty') ?></th> + <th colspan="<?php echo $mergedCells; ?>" class="a-center"><?php echo __('Subtotal') ?></th> + </tr> + <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> + <tr> + <th class="a-right"><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(false) ?></th> + <th><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(true) ?></th> + <th class="a-right"><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(false) ?></th> + <th><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(true) ?></th> + </tr> + <?php endif; ?> + </thead> + <tfoot> + <?php echo $this->renderTotals($this->getBillinAddressTotals()); ?> + </tfoot> + <tbody> + <?php foreach ($this->getVirtualItems() as $_item): ?> + <?php echo $this->getRowItemHtml($_item); ?> + <?php endforeach; ?> + </tbody> + </table> + <script type="text/javascript">jQuery('#virtual-overview-table').decorate('table')</script> + </div> + </div> + <?php endif; ?> + + <?php echo $this->getChildHtml('items_after'); ?> + + <div id="checkout-review-submit" data-mage-init="{paymentAuthentication:{}}"> + <?php echo $this->getChildHtml('agreements') ?> + <div class="place-order"> + <div class="grand-total"> + <div class="inner"> + <big><?php echo __('Grand Total:') ?> <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($this->getTotal()) ?></big> + <div id="review-buttons-container"> + <button type="submit" title="<?php echo __('Place Order') ?>" class="button btn-checkout" id="review-button"><span><span><?php echo __('Place Order') ?></span></span></button> + </div> + </div> + </div> + <span class="please-wait" id="review-please-wait" style="display:none;"> + <img src="<?php echo $this->getViewFileUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo __('Submitting order information...') ?>" title="<?php echo __('Submitting order information...') ?>" class="v-middle" /> <?php echo __('Submitting order information...') ?> + </span> + </div> + </div> + <div class="buttons-set"> + <p class="back-link"><a href="<?php echo $this->getBackUrl() ?>"><small>« </small><?php echo __('Back to Billing Information') ?></a></p> + </div> + </form> + <script type="text/javascript"> + head.js("<?php echo $this->getViewFileUrl('Magento_Checkout::js/overview.js')?>", function() { + jQuery('#review-order-form').orderOverview(); + }); + </script> +</div> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/multishipping/overview/item.phtml b/app/design/frontend/magento_backup/Magento_Checkout/multishipping/overview/item.phtml similarity index 78% rename from app/design/frontend/magento_plushe/Magento_Checkout/multishipping/overview/item.phtml rename to app/design/frontend/magento_backup/Magento_Checkout/multishipping/overview/item.phtml index d7cb049a107c014e18046e15c7fdca1b7fa6340a..bc68ca43f9e8ef027261960f4724526541978f97 100644 --- a/app/design/frontend/magento_plushe/Magento_Checkout/multishipping/overview/item.phtml +++ b/app/design/frontend/magento_backup/Magento_Checkout/multishipping/overview/item.phtml @@ -33,14 +33,15 @@ ?> <?php $_item = $this->getItem() ?> <tr> - <td class="col item"><?php echo $this->getRenderedBlock()->getItemHtml($_item) ?></td> -<?php /* Excluding Tax */ ?> + <td><?php echo $this->getRenderedBlock()->getItemHtml($_item) ?></td> + + <!--- Excluding Tax --> <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartPriceExclTax() || $this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> - <td class="col price excl tax"> + <td class="a-right"> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - <span class="cart-tax-total" data-tax-toggle='{"itemTaxId" : "#eunit-item-tax-details<?php echo $_item->getId(); ?>"}'> + <div class="cart-tax-total" data-tax-toggle='{"itemTaxId" : "#eunit-item-tax-details<?php echo $_item->getId(); ?>"}'> <?php else: ?> - <span class="cart-price"> + <div class="cart-price"> <?php endif; ?> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> @@ -48,23 +49,27 @@ <?php else: ?> <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_item->getCalculationPrice()) ?> <?php endif; ?> - </span> + + </div> + <?php if ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item)): ?> <div class="cart-tax-info" id="eunit-item-tax-details<?php echo $_item->getId(); ?>" style="display: none;"> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> + <small> <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - <span class="weee"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount'],true,true); ?></span> + <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount'],true,true); ?></span><br /> <?php endforeach; ?> + </small> <?php elseif ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - <span class="weee"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount_incl_tax'],true,true); ?></span> + <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount_incl_tax'],true,true); ?></small></span><br /> <?php endforeach; ?> <?php elseif ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> <small> <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - <span class="weee"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount_incl_tax'],true,true); ?></span> + <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount_incl_tax'],true,true); ?></span><br /> <?php endforeach; ?> </small> <?php endif; ?> @@ -78,16 +83,16 @@ <?php endif; ?> </td> <?php endif; ?> -<?php /* // Excluding Tax */ ?> + <!--- // Excluding Tax --> -<?php /* Including Tax */ ?> + <!--- Including Tax --> <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartPriceInclTax() || $this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> - <td class="col price incll tax"> + <td> <?php $_incl = $this->helper('Magento\Checkout\Helper\Data')->getPriceInclTax($_item); ?> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - <span class="cart-tax-total" data-tax-toggle='{"itemTaxId" : "#unit-item-tax-details<?php echo $_item->getId(); ?>"}'> + <div class="cart-tax-total" data-tax-toggle='{"itemTaxId" : "#unit-item-tax-details<?php echo $_item->getId(); ?>"}'> <?php else: ?> - <span class="cart-price"> + <div class="cart-price"> <?php endif; ?> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> @@ -95,22 +100,27 @@ <?php else: ?> <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_incl-$_item->getWeeeTaxDisposition()) ?> <?php endif; ?> - </span> + + </div> <?php if ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item)): ?> <div class="cart-tax-info" id="unit-item-tax-details<?php echo $_item->getId(); ?>" style="display: none;"> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> + <small> <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - <span class="weee"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount'],true,true); ?></span> + <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount'],true,true); ?></span><br /> <?php endforeach; ?> + </small> <?php elseif ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - <span class="weee"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount_incl_tax'],true,true); ?></span> + <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount_incl_tax'],true,true); ?></small></span><br /> <?php endforeach; ?> <?php elseif ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> + <small> <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - <span class="weee"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount_incl_tax'],true,true); ?></span> + <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount_incl_tax'],true,true); ?></span><br /> <?php endforeach; ?> + </small> <?php endif; ?> </div> @@ -123,15 +133,17 @@ </td> <?php endif; ?> -<?php /* // Including Tax */ ?> - <td class="col qty"><?php echo $_item->getQty()*1 ?></td> -<?php /* Excluding Tax Subtotal */ ?> + <!--- // Including Tax --> + + <td class="a-center"><?php echo $_item->getQty()*1 ?></td> + + <!--- Excluding Tax Subtotal --> <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartPriceExclTax() || $this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> - <td class="col subtotal excl tax"> + <td class="a-right"> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - <span class="cart-tax-total" data-tax-toggle='{"itemTaxId" : "#esubtotal-item-tax-details<?php echo $_item->getId(); ?>"}'> + <div class="cart-tax-total" data-tax-toggle='{"itemTaxId" : "#esubtotal-item-tax-details<?php echo $_item->getId(); ?>"}'> <?php else: ?> - <span class="cart-price"> + <div class="cart-price"> <?php endif; ?> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> @@ -140,43 +152,47 @@ <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_item->getRowTotal()) ?> <?php endif; ?> - </span> + </div> <?php if ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item)): ?> <div class="cart-tax-info" id="esubtotal-item-tax-details<?php echo $_item->getId(); ?>" style="display: none;"> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> + <small> <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - <span class="weee"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['row_amount'],true,true); ?></span> + <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['row_amount'],true,true); ?></span><br /> <?php endforeach; ?> + </small> <?php elseif ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - <span class="weee"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span> + <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></small></span><br /> <?php endforeach; ?> <?php elseif ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> + <small> <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - <span class="weee"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span> + <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span><br /> <?php endforeach; ?> + </small> <?php endif; ?> </div> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> <div class="cart-tax-total" data-tax-toggle='{"itemTaxId" : "#esubtotal-item-tax-details<?php echo $_item->getId(); ?>"}'> - <span class="weee"><?php echo __('Total'); ?>:<br /> <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?></span> + <span class="nobr"><?php echo __('Total'); ?>:<br /> <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?></span> </div> <?php endif; ?> <?php endif; ?> </td> <?php endif; ?> -<?php /* //Excluding Tax Subtotal */ ?> + <!--- //Excluding Tax Subtotal --> -<?php /* Including Tax Subtotal */ ?> + <!--- Including Tax Subtotal --> <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartPriceInclTax() || $this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> - <td class="col subtotal incl tax"> + <td> <?php $_incl = $this->helper('Magento\Checkout\Helper\Data')->getSubtotalInclTax($_item); ?> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - <span class="cart-tax-total" data-tax-toggle='{"itemTaxId" : "#subtotal-item-tax-details<?php echo $_item->getId(); ?>"}'> + <div class="cart-tax-total" data-tax-toggle='{"itemTaxId" : "#subtotal-item-tax-details<?php echo $_item->getId(); ?>"}'> <?php else: ?> - <span class="cart-price"> + <div class="cart-price"> <?php endif; ?> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> @@ -184,33 +200,39 @@ <?php else: ?> <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?> <?php endif; ?> - </span> + + </div> + <?php if ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item)): ?> <div class="cart-tax-info" id="subtotal-item-tax-details<?php echo $_item->getId(); ?>" style="display: none;"> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> + <small> <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - <span class="weee"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['row_amount'],true,true); ?></span> + <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['row_amount'],true,true); ?></span><br /> <?php endforeach; ?> + </small> <?php elseif ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - <span class="weee"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span> + <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></small></span><br /> <?php endforeach; ?> <?php elseif ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> + <small> <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - <span class="weee"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span> + <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span><br /> <?php endforeach; ?> + </small> <?php endif; ?> </div> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> <div class="cart-tax-total" data-tax-toggle='{"itemTaxId" : "#subtotal-item-tax-details<?php echo $_item->getId(); ?>"}'> - <span class="weee"><?php echo __('Total incl. tax'); ?>:<br /> <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?></span> + <span class="nobr"><?php echo __('Total incl. tax'); ?>:<br /> <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?></span> </div> <?php endif; ?> <?php endif; ?> </td> <?php endif; ?> -<?php /* //Including Tax Subtotal */ ?> + <!--- //Including Tax Subtotal --> </tr> diff --git a/app/design/frontend/magento_backup/Magento_Checkout/multishipping/shipping.phtml b/app/design/frontend/magento_backup/Magento_Checkout/multishipping/shipping.phtml new file mode 100644 index 0000000000000000000000000000000000000000..50bd5ae841cca7231d7bb24af81513d23956fab2 --- /dev/null +++ b/app/design/frontend/magento_backup/Magento_Checkout/multishipping/shipping.phtml @@ -0,0 +1,130 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category design + * @package base_default + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +?> +<?php +/** + * Multishipping checkout shipping template + * + * @see \Magento\Checkout\Block\Multishipping\Shipping + * @var $this \Magento\Checkout\Block\Multishipping\Shipping + */ +?> +<div class="multiple-checkout"> + <div class="page-title"> + <h1><?php echo __('Select Shipping Method') ?></h1> + </div> + <?php echo $this->getMessagesBlock()->getGroupedHtml() ?> + <form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="shipping_method_form"> + <?php foreach ($this->getAddresses() as $_index => $_address): ?> + <div class="col2-set"> + <h2 class="legend"><?php echo __('Address %1 of %2', ($_index+1), $this->getAddressCount()) ?></h2> + <div class="col-1 col-narrow"> + <div class="box"> + <div class="box-title"> + <h3><?php echo __('Shipping To') ?> <span class="separator">|</span> <a href="<?php echo $this->getAddressEditUrl($_address) ?>"><?php echo __('Change') ?></a></h3> + </div> + <div class="box-content"> + <address><?php echo $_address->format('html') ?></address> + </div> + </div> + <div class="box box-sp-methods"> + <div class="pointer"></div> + <div class="box-title"> + <h3><?php echo __('Shipping Method') ?></h3> + </div> + <div class="box-content"> + <?php if (!($_shippingRateGroups = $this->getShippingRates($_address))): ?> + <p><?php echo __('Sorry, no quotes are available for this order.') ?></p> + <?php else: ?> + <dl class="sp-methods"> + <?php $_sole = count($_shippingRateGroups) == 1; foreach ($_shippingRateGroups as $code => $_rates): ?> + <dt><?php echo $this->escapeHtml($this->getCarrierName($code)) ?></dt> + <dd> + <ul> + <?php $_sole = $_sole && count($_rates) == 1; foreach ($_rates as $_rate): ?> + <li<?php if ($_rate->getErrorMessage()) echo ' class="error-msg"' ?>> + <?php if ($_rate->getErrorMessage()): ?> + <?php echo $this->escapeHtml($_rate->getCarrierTitle()) ?>: <?php echo $this->escapeHtml($_rate->getErrorMessage()) ?> + <?php else: ?> + <?php if ($_sole) : ?> + <span class="no-display"><input type="radio" name="shipping_method[<?php echo $_address->getId() ?>]" value="<?php echo $this->escapeHtml($_rate->getCode()) ?>" id="s_method_<?php echo $_address->getId() ?>_<?php echo $_rate->getCode() ?>" checked="checked"/></span> + <?php else: ?> + <input type="radio" name="shipping_method[<?php echo $_address->getId() ?>]" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_address->getId() ?>_<?php echo $_rate->getCode() ?>"<?php if($_rate->getCode()===$this->getAddressShippingMethod($_address)) echo ' checked="checked"' ?> class="radio" /> + <?php endif; ?> + <label for="s_method_<?php echo $_address->getId() ?>_<?php echo $_rate->getCode() ?>"><?php echo $this->escapeHtml($_rate->getMethodTitle()) ?> + <?php $_excl = $this->getShippingPrice($_address, $_rate->getPrice(), $this->helper('Magento\Tax\Helper\Data')->displayShippingPriceIncludingTax()); ?> + <?php $_incl = $this->getShippingPrice($_address, $_rate->getPrice(), true); ?> + <?php echo $_excl; ?> + <?php if ($this->helper('Magento\Tax\Helper\Data')->displayShippingBothPrices() && $_incl != $_excl): ?> + (<?php echo __('Incl. Tax'); ?> <?php echo $_incl; ?>) + <?php endif; ?> + </label> + <?php endif ?> + </li> + <?php endforeach; ?> + </ul> + </dd> + <?php endforeach; ?> + </dl> + <?php endif; ?> + </div> + </div> + </div> + <div class="col-2 col-wide"> + <?php echo $this->helper('Magento\GiftMessage\Helper\Message')->getInline('multishipping_adress_checkbox', $_address); ?> + <h3><?php echo __('Items') ?> <span class="separator">|</span> <a href="<?php echo $this->getItemsEditUrl($_address) ?>"><?php echo __('Edit Items') ?></a></h3> + <table class="data-table" id="shipping-table-<?php echo $_address->getId() ?>"> + <col /> + <col width="1" /> + <thead> + <tr> + <th><?php echo __('Product Name') ?></th> + <th class="a-center"><?php echo __('Qty') ?></th> + </tr> + </thead> + <tbody> + <?php foreach ($this->getAddressItems($_address) as $_item): ?> + <tr> + <td> + <?php echo $this->getItemHtml($_item->getQuoteItem()) ?> + </td> + <td class="a-center"><?php echo $_item->getQty() ?></td> + </tr> + <?php endforeach; ?> + </tbody> + </table> + <script type="text/javascript">(function($) {$('#shipping-table-<?php echo $_address->getId()?>').decorate('table')})(jQuery)</script> + <?php echo $this->helper('Magento\GiftMessage\Helper\Message')->getInline('multishipping_address', $_address); ?> + </div> + </div> + <?php endforeach; ?> + <?php echo $this->getChildHtml('checkout_billing_items') ?> + <div class="buttons-set"> + <p class="back-link"><a href="<?php echo $this->getBackUrl() ?>"><small>« </small><?php echo __('Back to Select Addresses') ?></a></p> + <button type="submit" title="<?php echo __('Continue to Billing Information') ?>" class="button"><span><span><?php echo __('Continue to Billing Information') ?></span></span></button> + </div> + </form> +</div> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/multishipping/state.phtml b/app/design/frontend/magento_backup/Magento_Checkout/multishipping/state.phtml similarity index 70% rename from app/design/frontend/magento_plushe/Magento_Checkout/multishipping/state.phtml rename to app/design/frontend/magento_backup/Magento_Checkout/multishipping/state.phtml index e718013b82cf764921affea3b70cf2ee3e642c09..660d5fe126cc8c7922d7df0d52b375355e0137f9 100644 --- a/app/design/frontend/magento_plushe/Magento_Checkout/multishipping/state.phtml +++ b/app/design/frontend/magento_backup/Magento_Checkout/multishipping/state.phtml @@ -24,15 +24,16 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -<?php +<?php /** * Mustishipping state - * + * * @see \Magento\Checkout\Block\Multishipping\State */ ?> -<ul class="block multicheckout progress" id="checkout-progress-state"> - <?php foreach ($this->getSteps() as $_step): ?> - <li title="<?php echo $_step->getLabel() ?>"<?php if($_step->getIsActive()): ?> class="active"<?php endif; ?>><span><?php echo $_step->getLabel() ?></span></li> - <?php endforeach; ?> +<ul class="checkout-progress" id="checkout-progress-state"> +<?php foreach ($this->getSteps() as $_step): ?> + <li title="<?php echo $_step->getLabel() ?>"<?php if($_step->getIsActive()): ?> class="active"<?php endif; ?>><span><?php echo $_step->getLabel() ?></span></li> +<?php endforeach; ?> </ul> +<script type="text/javascript">(function($) {$('#checkout-progress-state li').decorate('generic', ['first','last'])})(jQuery)</script> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/multishipping/success.phtml b/app/design/frontend/magento_backup/Magento_Checkout/multishipping/success.phtml similarity index 73% rename from app/design/frontend/magento_plushe/Magento_Checkout/multishipping/success.phtml rename to app/design/frontend/magento_backup/Magento_Checkout/multishipping/success.phtml index 51ef877cc16d55d41325f0686889d541da4a7250..d666ec7ca0aa75422584ac4bf86972a3dd8451b2 100644 --- a/app/design/frontend/magento_plushe/Magento_Checkout/multishipping/success.phtml +++ b/app/design/frontend/magento_backup/Magento_Checkout/multishipping/success.phtml @@ -24,22 +24,27 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -<div class="multicheckout success"> - <h2 class="subtitle"><?php echo __('Thank you for your purchase!') ?></h2> +<div class="multiple-checkout"> + <div class="page-title"> + <h1><?php echo __('Order Success') ?></h1> + </div> + <h2 class="sub-title"><?php echo __('Thank you for your purchase!') ?></h2> <p><?php echo __('Thanks for your order. We\'ll send you emails with order details and tracking information.') ?></p> <?php if($_orderIds = $this->getOrderIds()): ?> <p> <?php $flag = false ?> <?php echo __('Your order number is ') ?> <?php foreach ($_orderIds as $orderId=>$incrementId): ?> - <?php if ($flag): ?><?php echo ', ' ?><?php endif; ?> + <?php if ($flag): ?> + <?php echo ', ' ?> + <?php endif; ?> <?php $flag = true ?> <a href="<?php echo $this->getViewOrderUrl($orderId) ?>"><?php echo $incrementId ?></a> <?php endforeach; ?> </p> <?php endif; ?> <?php echo $this->getChildHtml() ?> - <div class="actions"> - <a class="action continue" title="<?php echo __('Continue Shopping') ?>" href="<?php echo $this->getContinueUrl() ?>"><span><?php echo __('Continue Shopping') ?></span></a> + <div class="buttons-set"> + <button type="button" title="<?php echo __('Continue Shopping') ?>" class="button" onclick="window.location = '<?php echo $this->getContinueUrl() ?>';"><span><span><?php echo __('Continue Shopping') ?></span></span></button> </div> </div> diff --git a/app/design/frontend/magento_backup/Magento_Checkout/onepage.phtml b/app/design/frontend/magento_backup/Magento_Checkout/onepage.phtml new file mode 100644 index 0000000000000000000000000000000000000000..1ee814f2e6397be8fb595d4fa8546cd41ca052fe --- /dev/null +++ b/app/design/frontend/magento_backup/Magento_Checkout/onepage.phtml @@ -0,0 +1,98 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category design + * @package base_default + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +?> +<?php +$_paymentBlock = $this->getLayout()->getBlock('checkout.onepage.payment'); +$_registerParam = $this->getRequest()->getParam('register'); +?> +<div class="page-title"> + <h1><?php echo __('Checkout') ?></h1> +</div> +<ol class="opc" id="checkoutSteps"> +<?php $i=0; foreach($this->getSteps() as $_stepId => $_stepInfo): ?> +<?php if (!$this->getChildBlock($_stepId) || !$this->getChildBlock($_stepId)->isShow()): continue; endif; $i++ ?> + <li id="opc-<?php echo $_stepId ?>" class="section<?php echo !empty($_stepInfo['allow'])?' allow':'' ?><?php echo !empty($_stepInfo['complete'])?' saved':'' ?>"> + <div class="step-title"> + <span class="number"><?php echo $i ?></span> + <h2><?php echo $_stepInfo['label'] ?></h2> + <a href="#"><?php echo __('Edit') ?></a> + </div> + <div id="checkout-step-<?php echo $_stepId ?>" class="step a-item" style="display:none;"> + <?php echo $this->getChildHtml($_stepId) ?> + </div> + </li> +<?php endforeach ?> +</ol> +<script type="text/javascript"> + (function($) { + head.js( + "<?php echo $this->getViewFileUrl('jquery/jquery.validate.js')?>", + "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation/validation.js')?>", + "<?php echo $this->getViewFileUrl('Magento_Checkout::js/opcheckout.js') ?>", + "<?php echo $this->getViewFileUrl('Magento_Checkout::js/accordion.js') ?>", + function() { + $('#checkoutSteps') + .accordion({ + activeSelector: '#opc-<?php echo $this->getActiveStep() ?>' + }) + .opcheckout({ + quoteBaseGrandTotal: <?php echo (float)$_paymentBlock->getQuoteBaseGrandTotal() ?>, + progressUrl: '<?php echo $this->getUrl('checkout/onepage/progress') ?>', + reviewUrl: '<?php echo $this->getUrl('checkout/onepage/review') ?>', + failureUrl: '<?php echo $this->getUrl('checkout/cart') ?>', + getAddressUrl: '<?php echo $this->getUrl('checkout/onepage/getAddress') ?>address/', + checkoutAgreements: '#checkout-agreements', + checkoutProgressContainer: '#checkout-progress-wrapper', + ajaxLoaderPlaceButton: true, + checkout: { + suggestRegistration: <?php echo ($_registerParam || $_registerParam === '') ? 'true' : 'false' ?>, + saveUrl: '<?php echo $this->getUrl('checkout/onepage/saveMethod') ?>' + }, + billing: { + saveUrl: '<?php echo $this->getUrl('checkout/onepage/saveBilling') ?>' + }, + shipping: { + saveUrl: '<?php echo $this->getUrl('checkout/onepage/saveShipping') ?>' + }, + shippingMethod: { + saveUrl: "<?php echo $this->getUrl('checkout/onepage/saveShippingMethod') ?>" + }, + payment: { + <?php if ($_paymentBlock->getChildBlock('methods')->getSelectedMethodCode()): ?> + defaultPaymentMethod: "<?php echo $_paymentBlock->getChildBlock('methods')->getSelectedMethodCode() ?>", + <?php endif ?> + saveUrl: '<?php echo $this->getUrl('checkout/onepage/savePayment') ?>' + }, + review: { + saveUrl: '<?php echo $this->getUrl('checkout/onepage/saveOrder') ?>', + successUrl: '<?php echo $this->getUrl('checkout/onepage/success') ?>' + } + }); + }); + })(jQuery); +</script> diff --git a/app/code/Magento/Checkout/view/frontend/onepage/accordion.js b/app/design/frontend/magento_backup/Magento_Checkout/onepage/accordion.js similarity index 100% rename from app/code/Magento/Checkout/view/frontend/onepage/accordion.js rename to app/design/frontend/magento_backup/Magento_Checkout/onepage/accordion.js diff --git a/app/code/Magento/Checkout/view/frontend/onepage/agreements.phtml b/app/design/frontend/magento_backup/Magento_Checkout/onepage/agreements.phtml similarity index 100% rename from app/code/Magento/Checkout/view/frontend/onepage/agreements.phtml rename to app/design/frontend/magento_backup/Magento_Checkout/onepage/agreements.phtml diff --git a/app/design/frontend/magento_backup/Magento_Checkout/onepage/billing.phtml b/app/design/frontend/magento_backup/Magento_Checkout/onepage/billing.phtml new file mode 100644 index 0000000000000000000000000000000000000000..35d3e9389cb7663e07ce5d3307fa465eb5882771 --- /dev/null +++ b/app/design/frontend/magento_backup/Magento_Checkout/onepage/billing.phtml @@ -0,0 +1,218 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category design + * @package base_default + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +?> +<?php /** @var $this \Magento\Checkout\Block\Onepage\Billing */ ?> +<form id="co-billing-form" action=""> +<fieldset> + <ul class="form-list"> + <?php if ($this->customerHasAddresses()): ?> + <li class="wide"> + <label for="billing-address-select"><?php echo __('Select a billing address from your address book or enter a new address.') ?></label> + <div class="input-box"> + <?php echo $this->getAddressesHtmlSelect('billing') ?> + </div> + </li> + <?php endif; ?> + <li id="billing-new-address-form"<?php if ($this->customerHasAddresses()): ?> style="display:none;"<?php endif; ?>> + <fieldset> + <input type="hidden" name="billing[address_id]" value="<?php echo $this->getAddress()->getId() ?>" id="billing:address_id" /> + <ul> + <li class="fields"><?php echo $this->getLayout()->createBlock('Magento\Customer\Block\Widget\Name')->setObject($this->getAddress()->getFirstname() ? $this->getAddress() : $this->getQuote()->getCustomer())->setForceUseCustomerRequiredAttributes(!$this->isCustomerLoggedIn())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?></li> + <li class="fields"> + <div class="field"> + <label for="billing:company"><?php echo __('Company') ?></label> + <div class="input-box"> + <input type="text" id="billing:company" name="billing[company]" value="<?php echo $this->escapeHtml($this->getAddress()->getCompany()) ?>" title="<?php echo __('Company') ?>" class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('company') ?>" /> + </div> + </div> + <?php if(!$this->isCustomerLoggedIn()): ?> + <div class="field"> + <label for="billing:email" class="required"><em>*</em><?php echo __('Email Address') ?></label> + <div class="input-box"> + <input type="text" name="billing[email]" id="billing:email" value="<?php echo $this->escapeHtml($this->getAddress()->getEmail()) ?>" title="<?php echo __('Email Address') ?>" class="input-text" data-validate="{required:true, 'validate-email':true}"/> + </div> + </div> + <?php endif; ?> + </li> + <?php $_streetValidationClass = $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('street'); ?> + <li class="wide"> + <label for="billing:street1" class="required"><em>*</em><?php echo __('Address') ?></label> + <div class="input-box"> + <input type="text" title="<?php echo __('Street Address') ?>" name="billing[street][]" id="billing:street1" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet(1)) ?>" class="input-text <?php echo $_streetValidationClass ?>" /> + </div> + </li> + <?php $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass)); ?> + <?php for ($_i = 2, $_n = $this->helper('Magento\Customer\Helper\Address')->getStreetLines(); $_i <= $_n; $_i++): ?> + <li class="wide"> + <div class="input-box"> + <input type="text" title="<?php echo __('Street Address %1', $_i) ?>" name="billing[street][]" id="billing:street<?php echo $_i ?>" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet($_i)) ?>" class="input-text <?php echo $_streetValidationClass ?>" /> + </div> + </li> + <?php endfor; ?> + <?php if ($this->helper('Magento\Customer\Helper\Address')->isVatAttributeVisible()) : ?> + <li class="wide"> + <label for="billing:vat_id"><?php echo __('VAT Number') ?></label> + <div class="input-box"> + <input type="text" id="billing:vat_id" name="billing[vat_id]" value="<?php echo $this->escapeHtml($this->getAddress()->getVatId()) ?>" title="<?php echo __('VAT Number') ?>" class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('vat_id') ?>" /> + </div> + </li> + <?php endif; ?> + <li class="fields"> + <div class="field"> + <label for="billing:city" class="required"><em>*</em><?php echo __('City') ?></label> + <div class="input-box"> + <input type="text" title="<?php echo __('City') ?>" name="billing[city]" value="<?php echo $this->escapeHtml($this->getAddress()->getCity()) ?>" class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('city') ?>" id="billing:city" /> + </div> + </div> + <div class="field"> + <label for="billing:region_id" class="required"><em>*</em><?php echo __('State/Province') ?></label> + <div class="input-box"> + <select id="billing:region_id" name="billing[region_id]" title="<?php echo __('State/Province') ?>" class="validate-select" style="display:none;" <?php if ($this->getConfig('general/region/display_all') === 0) { ?>disabled="disabled"<?php } ?>> + <option value=""><?php echo __('Please select region, state or province') ?></option> + </select> + <input type="text" id="billing:region" name="billing[region]" value="<?php echo $this->escapeHtml($this->getAddress()->getRegion()) ?>" title="<?php echo __('State/Province') ?>" class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('region') ?>" style="display:none;" <?php if ($this->getConfig('general/region/display_all') === 0) { ?>disabled="disabled"<?php } ?>/> + </div> + </div> + </li> + <li class="fields"> + <div class="field"> + <label for="billing:postcode" class="required"><em>*</em><?php echo __('Zip/Postal Code') ?></label> + <div class="input-box"> + <input type="text" title="<?php echo __('Zip/Postal Code') ?>" name="billing[postcode]" id="billing:postcode" value="<?php echo $this->escapeHtml($this->getAddress()->getPostcode()) ?>" class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('postcode') ?>" data-validate="{'validate-zip-international':true}"/> + </div> + </div> + <div class="field"> + <label for="billing:country_id" class="required"><em>*</em><?php echo __('Country') ?></label> + <div class="input-box"> + <?php echo $this->getCountryHtmlSelect('billing') ?> + </div> + </div> + </li> + <li class="fields"> + <div class="field"> + <label for="billing:telephone" class="required"><em>*</em><?php echo __('Telephone') ?></label> + <div class="input-box"> + <input type="text" name="billing[telephone]" value="<?php echo $this->escapeHtml($this->getAddress()->getTelephone()) ?>" title="<?php echo __('Telephone') ?>" class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('telephone') ?>" id="billing:telephone" /> + </div> + </div> + <div class="field"> + <label for="billing:fax"><?php echo __('Fax') ?></label> + <div class="input-box"> + <input type="text" name="billing[fax]" value="<?php echo $this->escapeHtml($this->getAddress()->getFax()) ?>" title="<?php echo __('Fax') ?>" class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('fax') ?>" id="billing:fax" /> + </div> + </div> + </li> + <?php if(!$this->isCustomerLoggedIn()): ?> + + <?php $_dob = $this->getLayout()->createBlock('Magento\Customer\Block\Widget\Dob') ?> + <?php $_gender = $this->getLayout()->createBlock('Magento\Customer\Block\Widget\Gender') ?> + <?php if ($_dob->isEnabled() || $_gender->isEnabled()): ?> + <li class="fields"> + <?php if ($_dob->isEnabled()): ?> + <div class="field"> + <?php echo $_dob->setDate($this->getQuote()->getCustomerDob())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?> + </div> + <?php endif; ?> + <?php if ($_gender->isEnabled()): ?> + <div class="field"> + <?php echo $_gender->setGender($this->getQuote()->getCustomerGender())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?> + </div> + <?php endif ?> + </li> + <?php endif ?> + + <?php $_taxvat = $this->getLayout()->createBlock('Magento\Customer\Block\Widget\Taxvat') ?> + <?php if ($_taxvat->isEnabled()): ?> + <li> + <?php echo $_taxvat->setTaxvat($this->getQuote()->getCustomerTaxvat())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?> + </li> + <?php endif ?> + + <li class="fields" id="register-customer-password"> + <div class="field"> + <label for="billing:customer_password" class="required"><em>*</em><?php echo __('Password') ?></label> + <div class="input-box"> + <input type="password" name="billing[customer_password]" id="billing:customer_password" title="<?php echo __('Password') ?>" class="input-text" data-validate="{required:true, 'validate-password':true}"/> + </div> + </div> + <div class="field"> + <label for="billing:confirm_password" class="required"><em>*</em><?php echo __('Confirm Password') ?></label> + <div class="input-box"> + <input type="password" name="billing[confirm_password]" title="<?php echo __('Confirm Password') ?>" id="billing:confirm_password" class="input-text" data-validate="{required:true, 'validate-cpassword':true}"/> + </div> + </div> + </li> + <?php endif; ?> + <?php if ($this->isCustomerLoggedIn() && $this->customerHasAddresses()):?> + <li class="control"> + <input type="checkbox" name="billing[save_in_address_book]" value="1" title="<?php echo __('Save in address book') ?>" id="billing:save_in_address_book" <?php if ($this->getAddress()->getSaveInAddressBook()):?> checked="checked"<?php endif;?> class="checkbox" /><label for="billing:save_in_address_book"><?php echo __('Save in address book') ?></label> + </li> + <?php else:?> + <li class="no-display"><input type="hidden" name="billing[save_in_address_book]" value="1" /></li> + <?php endif; ?> + <?php echo $this->getChildHtml('form.additional.info'); ?> + </ul> + </fieldset> + </li> + <?php /* Extensions placeholder */ ?> + <?php echo $this->getChildHtml('checkout.onepage.billing.extra')?> + <?php if ($this->canShip()): ?> + <li class="control"> + <input type="radio" name="billing[use_for_shipping]" id="billing:use_for_shipping_yes" value="1"<?php if ($this->isUseBillingAddressForShipping()) {?> checked="checked"<?php }?> title="<?php echo __('Ship to this address') ?>" class="radio" /><label for="billing:use_for_shipping_yes"><?php echo __('Ship to this address') ?></label></li> + <li class="control"> + <input type="radio" name="billing[use_for_shipping]" id="billing:use_for_shipping_no" value="0"<?php if (!$this->isUseBillingAddressForShipping()) {?> checked="checked"<?php }?> title="<?php echo __('Ship to different address') ?>" class="radio" /><label for="billing:use_for_shipping_no"><?php echo __('Ship to different address') ?></label> + </li> + <?php endif; ?> + </ul> + <?php if (!$this->canShip()): ?> + <input type="hidden" name="billing[use_for_shipping]" value="1" /> + <?php endif; ?> + <div class="buttons-set" id="billing-buttons-container"> + <p class="required"><?php echo __('* Required Fields') ?></p> + <button type="button" title="<?php echo __('Continue') ?>" class="button"><span><span><?php echo __('Continue') ?></span></span></button> + <span class="please-wait" id="billing-please-wait" style="display:none;"> + <img src="<?php echo $this->getViewFileUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo __('Loading next step...') ?>" title="<?php echo __('Loading next step...') ?>" class="v-middle" /> <?php echo __('Loading next step...') ?> + </span> + </div> +</fieldset> +</form> +<script type="text/javascript"> + (function($) { + head.js( + "<?php echo $this->getViewFileUrl('Magento_Checkout::js/region-updater.js') ?>", + function() { + $('#billing\\:country_id').regionUpdater({ + optionalRegionAllowed: <?php echo ($this->getConfig('general/region/display_all')? 'true' : 'false'); ?>, + regionListId: '#billing\\:region_id', + regionInputId: '#billing\\:region', + postcodeId: '#billing\\:postcode', + regionJson: <?php echo $this->helper('Magento\Directory\Helper\Data')->getRegionJson() ?>, + defaultRegion: "<?php echo $this->getAddress()->getRegionId() ?>", + countriesWithOptionalZip: <?php echo $this->helper('Magento\Directory\Helper\Data')->getCountriesWithOptionalZip(true) ?> + }); + }); + })(jQuery); +</script> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/onepage/failure.phtml b/app/design/frontend/magento_backup/Magento_Checkout/onepage/failure.phtml similarity index 89% rename from app/design/frontend/magento_plushe/Magento_Checkout/onepage/failure.phtml rename to app/design/frontend/magento_backup/Magento_Checkout/onepage/failure.phtml index f0ccb4c1f26307d3e57e498db791fa467bb58cd1..dfccd26f471f9e474cdca1e7574ec71987258f57 100644 --- a/app/design/frontend/magento_plushe/Magento_Checkout/onepage/failure.phtml +++ b/app/design/frontend/magento_backup/Magento_Checkout/onepage/failure.phtml @@ -19,10 +19,14 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design + * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> +<div class="page-title"> + <h1><?php echo __('Something went wrong while processing your payment.') ?></h1> +</div> <?php if ($this->getRealOrderId()) : ?><p><?php echo __('Order #') . $this->getRealOrderId() ?></p><?php endif ?> <?php if ($error = $this->getErrorMessage()) : ?><p><?php echo $error ?></p><?php endif ?> <p><?php echo __('Click <a href="%1">here</a> to continue shopping.', $this->getContinueShoppingUrl()) ?></p> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/onepage/link.phtml b/app/design/frontend/magento_backup/Magento_Checkout/onepage/link.phtml similarity index 75% rename from app/design/frontend/magento_plushe/Magento_Checkout/onepage/link.phtml rename to app/design/frontend/magento_backup/Magento_Checkout/onepage/link.phtml index a016f12eacaf26dee1e8409beae3f57259c731d2..e8cd3bda3e0324295c977f4973732458cd9e5b6e 100644 --- a/app/design/frontend/magento_plushe/Magento_Checkout/onepage/link.phtml +++ b/app/design/frontend/magento_backup/Magento_Checkout/onepage/link.phtml @@ -19,10 +19,11 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design + * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> <?php if ($this->isPossibleOnepageCheckout()):?> - <button type="button" title="<?php echo __('Proceed to Checkout') ?>" class="action primary checkout<?php if ($this->isDisabled()):?> disabled<?php endif; ?>"<?php if ($this->isDisabled()):?> disabled="disabled"<?php endif; ?> onclick="window.location='<?php echo $this->getCheckoutUrl() ?>';"><span><span><?php echo __('Proceed to Checkout') ?></span></span></button> + <button type="button" title="<?php echo __('Proceed to Checkout') ?>" class="button btn-proceed-checkout btn-checkout<?php if ($this->isDisabled()):?> no-checkout<?php endif; ?>"<?php if ($this->isDisabled()):?> disabled="disabled"<?php endif; ?> onclick="window.location='<?php echo $this->getCheckoutUrl() ?>';"><span><span><?php echo __('Proceed to Checkout') ?></span></span></button> <?php endif?> diff --git a/app/design/frontend/magento_backup/Magento_Checkout/onepage/login.phtml b/app/design/frontend/magento_backup/Magento_Checkout/onepage/login.phtml new file mode 100644 index 0000000000000000000000000000000000000000..db2cb53047d07c70020145cce63565351ca36535 --- /dev/null +++ b/app/design/frontend/magento_backup/Magento_Checkout/onepage/login.phtml @@ -0,0 +1,120 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category design + * @package base_default + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +?> +<?php /* Extensions placeholder */ ?> +<?php echo $this->getChildHtml('checkout.onepage.login.extra')?> +<div class="col2-set"> + <?php echo $this->getChildHtml('login_before')?> + <div class="col-1"> + <h3><?php if( $this->isAllowedGuestCheckout() ): ?><?php echo __('Checkout as a Guest or Register') ?><?php else: ?><?php echo __('Register to Create an Account') ?><?php endif; ?></h3> + <?php if( $this->isAllowedGuestCheckout() ): ?> + <p><?php echo __('Sign up with us to save time on your next checkout:') ?></p> + <?php else: ?> + <p><strong><?php echo __('Register and save time!') ?></strong><br /> + <?php echo __('Sign up with us to save time on your next checkout:') ?></p> + <ul> + <li><?php echo __('Fast and easy check out') ?></li> + <li><?php echo __('Get easy access to your order history and status.') ?></li> + </ul> + <?php endif; ?> + <?php if( $this->isAllowedGuestCheckout() ): ?> + <ul class="form-list"> + <?php if( $this->isAllowedGuestCheckout() ): ?> + <li class="control"> + <input type="radio" name="checkout_method" id="login:guest" value="guest"<?php if($this->getQuote()->getCheckoutMethod()==\Magento\Checkout\Model\Type\Onepage::METHOD_GUEST): ?> checked="checked"<?php endif; ?> class="radio" /><label for="login:guest"><?php echo __('Checkout as Guest') ?></label> + </li> + <?php endif; ?> + <li class="control"> + <input type="radio" name="checkout_method" id="login:register" value="register"<?php if($this->getQuote()->getCheckoutMethod()==\Magento\Checkout\Model\Type\Onepage::METHOD_REGISTER || !$this->isAllowedGuestCheckout()): ?> checked="checked"<?php endif ?> class="radio" /><label for="login:register"><?php echo __('Register') ?></label> + </li> + </ul> + <h4><?php echo __('Register and save time!') ?></h4> + <p><?php echo __('Sign up with us to save time on your next checkout:') ?></p> + <ul class="ul"> + <li><?php echo __('Fast and easy check out') ?></li> + <li><?php echo __('Get easy access to your order history and status.') ?></li> + </ul> + <?php else: ?> + <input type="hidden" name="checkout_method" id="login:register" value="register" checked="checked" /> + <?php endif; ?> + </div> + <div class="col-2"> + <h3><?php echo __('Login') ?></h3> + <?php echo $this->getMessagesBlock()->getGroupedHtml() ?> + <form id="login-form" action="<?php echo $this->getPostAction() ?>" method="post"> + <fieldset> + <h4><?php echo __('Already registered?') ?></h4> + <p><?php echo __('Please log in below:') ?></p> + <ul class="form-list"> + <li> + <label for="login-email" class="required"><em>*</em><?php echo __('Email Address') ?></label> + <div class="input-box"> + <input type="text" class="input-text" id="login-email" name="login[username]" data-validate="{required:true, 'validate-email':true}" value="<?php echo $this->escapeHtml($this->getUsername()) ?>" /> + </div> + </li> + <li> + <label for="login-password" class="required"><em>*</em><?php echo __('Password') ?></label> + <div class="input-box"> + <input type="password" class="input-text" id="login-password" name="login[password]" data-validate="{required:true}"/> + </div> + </li> + <?php echo $this->getChildHtml('login.form.additional.info'); ?> + </ul> + </fieldset> + </form> + </div> +</div> +<div class="col2-set"> + <div class="col-1"> + <div class="buttons-set"> + <p class="required"> </p> + <button type="button" class="button" data-checkout='{"isGuestCheckoutAllowed":true}'><span><span><?php echo ($this->isAllowedGuestCheckout() ? __('Continue') : __('Register')) ?></span></span></button> + <span class="please-wait" style="display:none;"> + <img src="<?php echo $this->getViewFileUrl('images/opc-ajax-loader.gif') ?>" alt="" class="v-middle" /> <?php echo __('Loading next step...') ?> + </span> + </div> + </div> + <div class="col-2"> + <div class="buttons-set"> + <p class="required"><?php echo __('* Required Fields') ?></p> + <a href="<?php echo $this->getUrl('customer/account/forgotpassword') ?>" class="f-left"><?php echo __('Forgot your password?') ?></a> + <button type="submit" class="button" data-action='login-form-submit'><span><span><?php echo __('Login') ?></span></span></button> + </div> + </div> +</div> +<script type="text/javascript"> + (function($) { + head.js( + "<?php echo $this->getViewFileUrl('jquery/jquery.validate.js') ?>", + "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js') ?>", + "<?php echo $this->getViewFileUrl('mage/validation.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation/validation.js') ?>", + function() { + $('#login-form').validation(); + } + )} + )(jQuery); +</script> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/onepage/payment.phtml b/app/design/frontend/magento_backup/Magento_Checkout/onepage/payment.phtml similarity index 57% rename from app/design/frontend/magento_plushe/Magento_Checkout/onepage/payment.phtml rename to app/design/frontend/magento_backup/Magento_Checkout/onepage/payment.phtml index fe8f86c816f82bf15bbdba719ea64e8602361cf8..4a11e6f8b6cc90e792f9f0f944ab986d54a67179 100644 --- a/app/design/frontend/magento_plushe/Magento_Checkout/onepage/payment.phtml +++ b/app/design/frontend/magento_backup/Magento_Checkout/onepage/payment.phtml @@ -19,25 +19,21 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design + * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -<form action="" id="co-payment-form" class="form payments"> - <fieldset class="fieldset"> - <?php echo $this->getChildChildHtml('methods_additional') ?> +<form action="" id="co-payment-form"> + <fieldset> <?php echo $this->getChildHtml('methods') ?> </fieldset> - <?php echo $this->getChildChildHtml('additional') ?> - <div class="buttons-set actions" id="payment-buttons-container"> - <div class="primary"> - <button type="button" class="button action continue"><span><?php echo __('Continue') ?></span></button> - </div> - <div class="secondary"> - <a class="action back" href="#"><span><?php echo __('Back') ?></span></a> - </div> - <span id="payment-please-wait" class="please-wait load indicator" style="display:none"> - <span><?php echo __('Loading next step...') ?></span> - </span> - </div> </form> +<div class="buttons-set" id="payment-buttons-container"> + <p class="required"><?php echo __('* Required Fields') ?></p> + <p class="back-link"><a href="#"><small>« </small><?php echo __('Back') ?></a></p> + <button type="button" class="button"><span><span><?php echo __('Continue') ?></span></span></button> + <span class="please-wait" id="payment-please-wait" style="display:none;"> + <img src="<?php echo $this->getViewFileUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo __('Loading next step...') ?>" title="<?php echo __('Loading next step...') ?>" class="v-middle" /> <?php echo __('Loading next step...') ?> + </span> +</div> diff --git a/app/design/frontend/magento_backup/Magento_Checkout/onepage/payment/methods.phtml b/app/design/frontend/magento_backup/Magento_Checkout/onepage/payment/methods.phtml new file mode 100644 index 0000000000000000000000000000000000000000..914206cc665cace5f5013dfa06b960e0f2eac313 --- /dev/null +++ b/app/design/frontend/magento_backup/Magento_Checkout/onepage/payment/methods.phtml @@ -0,0 +1,66 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category design + * @package base_default + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +?> +<?php +/** + * One page checkout payment methods + * + * @see \Magento\Checkout\Block\Onepage\Payment\Methods + */ +?> +<dl class="sp-methods" id="checkout-payment-method-load"> +<?php + $methods = $this->getMethods(); + $oneMethod = count($methods) <= 1; +?> +<?php if (empty($methods)): ?> + <dt> + <?php echo __('No Payment Methods') ?> + </dt> +<?php else: + foreach ($methods as $_method): + $_code = $_method->getCode(); +?> + <dt> + <?php if(!$oneMethod): ?> + <input id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" type="radio" name="payment[method]" title="<?php echo $this->escapeHtml($_method->getTitle()) ?>" <?php if($this->getSelectedMethodCode()==$_code): ?> checked="checked"<?php endif; ?> class="radio" /> + <?php else: ?> + <span class="no-display"><input id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" type="radio" name="payment[method]" checked="checked" class="radio" /></span> + <?php $oneMethod = $_code; ?> + <?php endif; ?> + <label for="p_method_<?php echo $_code ?>"><?php echo $this->escapeHtml($this->getMethodTitle($_method)) ?> <?php echo $this->getMethodLabelAfterHtml($_method) ?></label> + </dt> + <?php if ($html = $this->getPaymentMethodFormHtml($_method)): ?> + <dd> + <?php echo $html; ?> + </dd> + <?php endif; ?> +<?php endforeach; + endif; +?> +</dl> +<div class="no-display" data-checkout-price="<?php echo (float)$this->getQuote()->getBaseGrandTotal(); ?>" /> +<?php echo $this->getChildChildHtml('additional'); ?> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/onepage/progress.phtml b/app/design/frontend/magento_backup/Magento_Checkout/onepage/progress.phtml similarity index 95% rename from app/design/frontend/magento_plushe/Magento_Checkout/onepage/progress.phtml rename to app/design/frontend/magento_backup/Magento_Checkout/onepage/progress.phtml index 5719d1f996263d390f43aafc728e20ce66452ac5..c68bcf8d449b8e03f10967ad52094ca85ca009db 100644 --- a/app/design/frontend/magento_plushe/Magento_Checkout/onepage/progress.phtml +++ b/app/design/frontend/magento_backup/Magento_Checkout/onepage/progress.phtml @@ -19,16 +19,17 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design + * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /* @var $this \Magento\Checkout\Block\Onepage\Progress */ ?> -<div class="block progress onepage opc-block-progress"> - <div class="title"> - <strong><?php echo __('Your Checkout Progress') ?></strong> +<div class="block block-progress opc-block-progress"> + <div class="block-title"> + <strong><span><?php echo __('Your Checkout Progress') ?></span></strong> </div> - <div class="content"> + <div class="block-content"> <dl> <?php if ($this->getCheckout()->getStepData('billing', 'is_show')): ?> <?php if ($this->isStepComplete('billing')): ?> diff --git a/app/code/Magento/Core/view/frontend/link.phtml b/app/design/frontend/magento_backup/Magento_Checkout/onepage/review.phtml similarity index 86% rename from app/code/Magento/Core/view/frontend/link.phtml rename to app/design/frontend/magento_backup/Magento_Checkout/onepage/review.phtml index cb8494c6a5e30875d61a010b111886ea97a3950b..8b82981faf5f28dae164ead823e9340deb1770ba 100644 --- a/app/code/Magento/Core/view/frontend/link.phtml +++ b/app/design/frontend/magento_backup/Magento_Checkout/onepage/review.phtml @@ -23,6 +23,7 @@ * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ -/** @var $this \Magento\Core\Block\Html\Link */ ?> -<a <?php echo $this->getLinkAttributes() ?>><?php echo $this->escapeHtml($this->getAnchorText()) ?></a> +<div class="order-review" id="checkout-review-load"> + <?php echo $this->getChildHtml('info') ?> +</div> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/onepage/review/button.phtml b/app/design/frontend/magento_backup/Magento_Checkout/onepage/review/button.phtml similarity index 81% rename from app/design/frontend/magento_plushe/Magento_Checkout/onepage/review/button.phtml rename to app/design/frontend/magento_backup/Magento_Checkout/onepage/review/button.phtml index 35ddad1c26c8fceed6ea68be4bdd3c0da51b6fa6..82172d3fe298aedbcbadf965685bf1012b90581d 100644 --- a/app/design/frontend/magento_plushe/Magento_Checkout/onepage/review/button.phtml +++ b/app/design/frontend/magento_backup/Magento_Checkout/onepage/review/button.phtml @@ -19,8 +19,9 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design + * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -<button role='review-save' type="submit" title="<?php echo __('Place Order') ?>" class="button btn-checkout action checkout"><span><?php echo __('Place Order') ?></span></button> +<button data-role="review-save" type="submit" title="<?php echo __('Place Order') ?>" class="button btn-checkout"><span><span><?php echo __('Place Order') ?></span></span></button> diff --git a/app/design/frontend/magento_backup/Magento_Checkout/onepage/review/info.phtml b/app/design/frontend/magento_backup/Magento_Checkout/onepage/review/info.phtml new file mode 100644 index 0000000000000000000000000000000000000000..48f12caf1e4fb063d7fe560f04e2ecc8593ca6e4 --- /dev/null +++ b/app/design/frontend/magento_backup/Magento_Checkout/onepage/review/info.phtml @@ -0,0 +1,74 @@ +\<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category design + * @package base_default + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +?> +<?php echo $this->getChildHtml('items_before'); ?> +<div id="checkout-review-table-wrapper" data-mage-init="{paymentAuthentication:{}}"> + <table class="data-table" id="checkout-review-table"> + <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): $colspan = $rowspan = 2; else: $colspan = $rowspan = 1; endif; ?> + <col /> + <col width="1" /> + <col width="1" /> + <col width="1" /> + <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> + <col width="1" /> + <col width="1" /> + <?php endif; ?> + <thead> + <tr> + <th rowspan="<?php echo $rowspan ?>"><?php echo __('Product Name') ?></th> + <th colspan="<?php echo $colspan ?>" class="a-center"><?php echo __('Price') ?></th> + <th rowspan="<?php echo $rowspan ?>" class="a-center"><?php echo __('Qty') ?></th> + <th colspan="<?php echo $colspan ?>" class="a-center"><?php echo __('Subtotal') ?></th> + </tr> + <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> + <tr> + <th class="a-right"><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(false) ?></th> + <th><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(true) ?></th> + <th class="a-right"><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(false) ?></th> + <th><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(true) ?></th> + </tr> + <?php endif; ?> + </thead> + <?php echo $this->getChildHtml('totals'); ?> + <tbody> + <?php foreach($this->getItems() as $_item): ?> + <?php echo $this->getItemHtml($_item)?> + <?php endforeach ?> + </tbody> + </table> +</div> +<?php echo $this->getChildHtml('items_after'); ?> +<script type="text/javascript">jQuery('#checkout-review-table').decorate('table')</script> +<div id="checkout-review-submit" data-mage-init="{paymentAuthentication:{}}"> + <?php echo $this->getChildHtml('agreements') ?> + <div class="buttons-set" id="review-buttons-container"> + <p class="f-left"><?php echo __('Forgot an Item?') ?> <a href="<?php echo $this->getUrl('checkout/cart') ?>"><?php echo __('Edit Your Cart') ?></a></p> + <?php echo $this->getChildHtml('button') ?> + <span class="please-wait" id="review-please-wait" style="display:none;"> + <img src="<?php echo $this->getViewFileUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo __('Submitting order information...') ?>" title="<?php echo __('Submitting order information...') ?>" class="v-middle" /> <?php echo __('Submitting order information...') ?> + </span> + </div> +</div> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/onepage/review/item.phtml b/app/design/frontend/magento_backup/Magento_Checkout/onepage/review/item.phtml similarity index 97% rename from app/design/frontend/magento_plushe/Magento_Checkout/onepage/review/item.phtml rename to app/design/frontend/magento_backup/Magento_Checkout/onepage/review/item.phtml index a177ee2976dc58b8f86318dfc7ddd9d480d0cd99..e3ea7b940b3b9f3b2c184c2db6791a5c2ae76c40 100644 --- a/app/design/frontend/magento_plushe/Magento_Checkout/onepage/review/item.phtml +++ b/app/design/frontend/magento_backup/Magento_Checkout/onepage/review/item.phtml @@ -19,15 +19,16 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design + * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> <?php $_item = $this->getItem()?> <tr> - <td class="col item"><strong class="product name"><?php echo $this->escapeHtml($this->getProductName()) ?></strong> + <td><h3 class="product-name"><?php echo $this->escapeHtml($this->getProductName()) ?></h3> <?php if ($_options = $this->getOptionList()):?> - <dl class="review item options"> + <dl class="item-options"> <?php foreach ($_options as $_option) : ?> <?php $_formatedOptionValue = $this->getFormatedOptionValue($_option) ?> <dt><?php echo $this->escapeHtml($_option['label']) ?></dt> @@ -49,7 +50,7 @@ <?php endif;?> </td> <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartPriceExclTax() || $this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> - <td class="col price excl tax"> + <td class="a-right"> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> <span class="cart-tax-total" data-tax-toggle='{"itemTaxId" : "#eunit-item-tax-details<?php echo $_item->getId(); ?>"}'> <?php else: ?> @@ -96,7 +97,7 @@ </td> <?php endif; ?> <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartPriceInclTax() || $this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> - <td class="col price incl tax"> + <td> <?php $_incl = $this->helper('Magento\Checkout\Helper\Data')->getPriceInclTax($_item); ?> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> <span class="cart-tax-total" data-tax-toggle='{"itemTaxId" : "#unit-item-tax-details<?php echo $_item->getId(); ?>"}'> @@ -141,9 +142,9 @@ <?php endif; ?> </td> <?php endif; ?> - <td class="col qty"><span class="qty"><?php echo $_item->getQty() ?></span></td> + <td class="a-center"><?php echo $_item->getQty() ?></td> <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartPriceExclTax() || $this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> - <td class="col subtotal excl tax"> + <td class="a-right"> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> <span class="cart-tax-total" data-tax-toggle='{"itemTaxId" : "#esubtotal-item-tax-details<?php echo $_item->getId(); ?>"}'> <?php else: ?> @@ -188,7 +189,7 @@ </td> <?php endif; ?> <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartPriceInclTax() || $this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> - <td class="col subtotal incl tax"> + <td> <?php $_incl = $this->helper('Magento\Checkout\Helper\Data')->getSubtotalInclTax($_item); ?> <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> <span class="cart-tax-total" data-tax-toggle='{"itemTaxId" : "#subtotal-item-tax-details<?php echo $_item->getId(); ?>"}'> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/onepage/review/totals.phtml b/app/design/frontend/magento_backup/Magento_Checkout/onepage/review/totals.phtml similarity index 92% rename from app/design/frontend/magento_plushe/Magento_Checkout/onepage/review/totals.phtml rename to app/design/frontend/magento_backup/Magento_Checkout/onepage/review/totals.phtml index 70938f939717d65d40718bd15fdf8ad806881c6b..9479a681acc26c13612de4271303442c4e2e55cd 100644 --- a/app/design/frontend/magento_plushe/Magento_Checkout/onepage/review/totals.phtml +++ b/app/design/frontend/magento_backup/Magento_Checkout/onepage/review/totals.phtml @@ -19,6 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design + * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ @@ -34,10 +35,10 @@ <?php echo $this->renderTotals('footer', $_colspan); ?> <?php if ($this->needDisplayBaseGrandtotal()):?> <tr> - <td class="col label" colspan="<?php echo $_colspan; ?>"> + <td class="a-right" colspan="<?php echo $_colspan; ?>"> <small><?php echo __('Your credit card will be charged for') ?></small> </td> - <td class="col total"> + <td class="a-right"> <small><?php echo $this->displayBaseGrandtotal() ?></small> </td> </tr> diff --git a/app/design/frontend/magento_backup/Magento_Checkout/onepage/shipping.phtml b/app/design/frontend/magento_backup/Magento_Checkout/onepage/shipping.phtml new file mode 100644 index 0000000000000000000000000000000000000000..05f7c7fbcdc64226cb3f8d1e3ace267cfa331fbb --- /dev/null +++ b/app/design/frontend/magento_backup/Magento_Checkout/onepage/shipping.phtml @@ -0,0 +1,164 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category design + * @package base_default + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +?> +<?php /** @var $this \Magento\Checkout\Block\Onepage\Shipping */ ?> +<form action="" id="co-shipping-form"> + <ul class="form-list"> + <?php if ($this->customerHasAddresses()): ?> + <li class="wide"> + <label for="shipping-address-select"><?php echo __('Select a shipping address from your address book or enter a new address.') ?></label> + <div class="input-box"> + <?php echo $this->getAddressesHtmlSelect('shipping') ?> + </div> + </li> + <?php endif ?> + <li id="shipping-new-address-form"<?php if ($this->customerHasAddresses()): ?> style="display:none;"<?php endif ?>> + <fieldset> + <input type="hidden" name="shipping[address_id]" value="<?php echo $this->getAddress()->getId() ?>" id="shipping:address_id" /> + <ul> + <li class="fields"><?php echo $this->getLayout()->createBlock('Magento\Customer\Block\Widget\Name')->setObject($this->getAddress())->setFieldIdFormat('shipping:%s')->setFieldNameFormat('shipping[%s]')->toHtml() ?></li> + <li class="fields"> + <div class="fields"> + <label for="shipping:company"><?php echo __('Company') ?></label> + <div class="input-box"> + <input type="text" id="shipping:company" name="shipping[company]" value="<?php echo $this->escapeHtml($this->getAddress()->getCompany()) ?>" title="<?php echo __('Company') ?>" class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('company') ?>" /> + </div> + </div> + </li> + <?php $_streetValidationClass = $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('street'); ?> + <li class="wide"> + <label for="shipping:street1" class="required"><em>*</em><?php echo __('Address') ?></label> + <div class="input-box"> + <input type="text" title="<?php echo __('Street Address') ?>" name="shipping[street][]" id="shipping:street1" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet(1)) ?>" class="input-text <?php echo $_streetValidationClass ?>" /> + </div> + </li> + <?php $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass)); ?> + <?php for ($_i = 2, $_n = $this->helper('Magento\Customer\Helper\Address')->getStreetLines(); $_i <= $_n; $_i++): ?> + <li class="wide"> + <div class="input-box"> + <input type="text" title="<?php echo __('Street Address %1', $_i) ?>" name="shipping[street][]" id="shipping:street<?php echo $_i ?>" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet($_i)) ?>" class="input-text <?php echo $_streetValidationClass ?>" /> + </div> + </li> + <?php endfor; ?> + <?php if ($this->helper('Magento\Customer\Helper\Address')->isVatAttributeVisible()) : ?> + <li class="wide"> + <label for="billing:vat_id"><?php echo __('VAT Number'); ?></label> + <div class="input-box"> + <input type="text" id="shipping:vat_id" name="shipping[vat_id]" value="<?php echo $this->escapeHtml($this->getAddress()->getVatId()); ?>" title="<?php echo __('VAT Number'); ?>" class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('vat_id') ?>" /> + </div> + </li> + <?php endif; ?> + <li class="fields"> + <div class="field"> + <label for="shipping:city" class="required"><em>*</em><?php echo __('City') ?></label> + <div class="input-box"> + <input type="text" title="<?php echo __('City') ?>" name="shipping[city]" value="<?php echo $this->escapeHtml($this->getAddress()->getCity()) ?>" class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('city') ?>" id="shipping:city" /> + </div> + </div> + <div class="field"> + <label for="shipping:region" class="required"><em>*</em><?php echo __('State/Province') ?></label> + <div class="input-box"> + <select id="shipping:region_id" name="shipping[region_id]" title="<?php echo __('State/Province') ?>" class="validate-select" style="display:none;"> + <option value=""><?php echo __('Please select a region, state or province.') ?></option> + </select> + <input type="text" id="shipping:region" name="shipping[region]" value="<?php echo $this->escapeHtml($this->getAddress()->getRegion()) ?>" title="<?php echo __('State/Province') ?>" class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('region') ?>" style="display:none;" /> + </div> + </div> + </li> + <li class="fields"> + <div class="field"> + <label for="shipping:postcode" class="required"><em>*</em><?php echo __('Zip/Postal Code') ?></label> + <div class="input-box"> + <input type="text" title="<?php echo __('Zip/Postal Code') ?>" name="shipping[postcode]" id="shipping:postcode" value="<?php echo $this->escapeHtml($this->getAddress()->getPostcode()) ?>" class="input-text validate-zip-international <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('postcode') ?>" /> + </div> + </div> + <div class="field"> + <label for="shipping:country_id" class="required"><em>*</em><?php echo __('Country') ?></label> + <div class="input-box"> + <?php echo $this->getCountryHtmlSelect('shipping') ?> + </div> + </div> + </li> + <li class="fields"> + <div class="field"> + <label for="shipping:telephone" class="required"><em>*</em><?php echo __('Telephone') ?></label> + <div class="input-box"> + <input type="text" name="shipping[telephone]" value="<?php echo $this->escapeHtml($this->getAddress()->getTelephone()) ?>" title="<?php echo __('Telephone') ?>" class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('telephone') ?>" id="shipping:telephone" /> + </div> + </div> + <div class="field"> + <label for="shipping:fax"><?php echo __('Fax') ?></label> + <div class="input-box"> + <input type="text" name="shipping[fax]" value="<?php echo $this->escapeHtml($this->getAddress()->getFax()) ?>" title="<?php echo __('Fax') ?>" class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('fax') ?>" id="shipping:fax" /> + </div> + </div> + </li> + <?php if ($this->isCustomerLoggedIn() && $this->customerHasAddresses()):?> + <li class="control"> + <input type="checkbox" name="shipping[save_in_address_book]" value="1" title="<?php echo __('Save in address book') ?>" id="shipping:save_in_address_book" <?php if ($this->getAddress()->getSaveInAddressBook()):?> checked="checked"<?php endif;?> class="checkbox" /><label for="shipping:save_in_address_book"><?php echo __('Save in address book') ?></label></li> + <?php else:?> + <li class="no-display"><input type="hidden" name="shipping[save_in_address_book]" value="1" /></li> + <?php endif;?> + </ul> + </fieldset> + </li> + <li class="control"> + <input type="checkbox" name="shipping[same_as_billing]" id="shipping:same_as_billing" value="1"<?php if($this->getAddress()->getSameAsBilling()): ?> checked="checked"<?php endif; ?> title="<?php echo __('Use Billing Address') ?>" class="checkbox" /><label for="shipping:same_as_billing"><?php echo __('Use Billing Address') ?></label> + </li> + </ul> + <div class="buttons-set" id="shipping-buttons-container"> + <p class="required"><?php echo __('* Required Fields') ?></p> + <p class="back-link"><a href="#"><small>« </small><?php echo __('Back') ?></a></p> + <button type="button" class="button" title="<?php echo __('Continue') ?>"><span><span><?php echo __('Continue') ?></span></span></button> + <span id="shipping-please-wait" class="please-wait" style="display:none;"> + <img src="<?php echo $this->getViewFileUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo __('Loading next step...') ?>" title="<?php echo __('Loading next step...') ?>" class="v-middle" /> <?php echo __('Loading next step...') ?> + </span> + </div> +</form> +<script type="text/javascript"> + (function($) { + head.js( + "<?php echo $this->getViewFileUrl('Magento_Checkout::js/region-updater.js') ?>", + function() { + $('#shipping\\:country_id').regionUpdater({ + optionalRegionAllowed: <?php echo ($this->getConfig('general/region/display_all') ? 'true' : 'false'); ?>, + regionListId: '#shipping\\:region_id', + regionInputId: '#shipping\\:region', + postcodeId: '#shipping\\:postcode', + regionJson: <?php echo $this->helper('Magento\Directory\Helper\Data')->getRegionJson() ?>, + defaultRegion: "<?php echo $this->getAddress()->getRegionId() ?>", + countriesWithOptionalZip: <?php echo $this->helper('Magento\Directory\Helper\Data')->getCountriesWithOptionalZip(true) ?>, + clearError: function() { + var selectorArr = ['#shipping\\:region_id', '#shipping\\:region', '#shipping\\:postcode']; + for (var i = 0; i < selectorArr.length; i++) { + $(selectorArr[i]).removeClass('validation-failed').next("div.validation-advice").remove(); + } + } + }); + }); + })(jQuery); +</script> + diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/onepage/shipping_method.phtml b/app/design/frontend/magento_backup/Magento_Checkout/onepage/shipping_method.phtml similarity index 67% rename from app/design/frontend/magento_plushe/Magento_Checkout/onepage/shipping_method.phtml rename to app/design/frontend/magento_backup/Magento_Checkout/onepage/shipping_method.phtml index 955011f9ff0c8646b51e2a9ff3170083c0b62df2..ac7166ee1b1fecd1fdc690342a1c90bcf499c674 100644 --- a/app/design/frontend/magento_plushe/Magento_Checkout/onepage/shipping_method.phtml +++ b/app/design/frontend/magento_backup/Magento_Checkout/onepage/shipping_method.phtml @@ -19,22 +19,23 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design + * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -<form class="form shipping methods" id="co-shipping-method-form" action=""> +<form id="co-shipping-method-form" action=""> <div id="checkout-shipping-method-load"> <?php echo $this->getChildHtml('available') ?> </div> <div id="onepage-checkout-shipping-method-additional-load"> <?php echo $this->getChildHtml('additional') ?> </div> - <div class="actions buttons-set" id="shipping-method-buttons-container"> - <div class="primary"><button type="button" class="button action continue"><span><?php echo __('Continue') ?></span></button></div> - <div class="secondary"><a class="action back" href="#"><span><?php echo __('Back') ?></span></a></div> - <span id="shipping-method-please-wait" class="please-wait load indicator" style="display:none;"> - <span><?php echo __('Loading next step...') ?></span> + <div class="buttons-set" id="shipping-method-buttons-container"> + <p class="back-link"><a href="#"><small>« </small><?php echo __('Back') ?></a></p> + <button type="button" class="button"><span><span><?php echo __('Continue') ?></span></span></button> + <span id="shipping-method-please-wait" class="please-wait" style="display:none;"> + <img src="<?php echo $this->getViewFileUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo __('Loading next step...') ?>" title="<?php echo __('Loading next step...') ?>" class="v-middle" /> <?php echo __('Loading next step...') ?> </span> </div> </form> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/cart.phtml b/app/design/frontend/magento_backup/Magento_Checkout/onepage/shipping_method/additional.phtml similarity index 79% rename from app/design/frontend/magento_plushe/Magento_Checkout/cart.phtml rename to app/design/frontend/magento_backup/Magento_Checkout/onepage/shipping_method/additional.phtml index af7fcbff53faa066e9140a928f1516c3736611d0..9a816287728fb064b25a99cb0e2bab248743ca3c 100644 --- a/app/design/frontend/magento_plushe/Magento_Checkout/cart.phtml +++ b/app/design/frontend/magento_backup/Magento_Checkout/onepage/shipping_method/additional.phtml @@ -19,19 +19,11 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design + * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -<?php -/** - * Shopping cart template - * - * @see \Magento\Checkout\Block\Cart - */ -?> -<?php if ($this->getItemsCount()) { - echo $this->getChildHtml('with-items'); -} else { - echo $this->getChildHtml('no-items'); -} +<?php if (!$this->getQuote()->isVirtual()): ?> + <?php echo $this->helper('Magento\GiftMessage\Helper\Message')->getInline('onepage_checkout', $this->getQuote(), $this->getDontDisplayContainer()) ?> +<?php endif; ?> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/onepage/shipping_method/available.phtml b/app/design/frontend/magento_backup/Magento_Checkout/onepage/shipping_method/available.phtml similarity index 87% rename from app/design/frontend/magento_plushe/Magento_Checkout/onepage/shipping_method/available.phtml rename to app/design/frontend/magento_backup/Magento_Checkout/onepage/shipping_method/available.phtml index 15c7081b7466a32a3faea21b3562519221d4ee86..8fa017be225537ef5fdbd225c26cbc01d1260379 100644 --- a/app/design/frontend/magento_plushe/Magento_Checkout/onepage/shipping_method/available.phtml +++ b/app/design/frontend/magento_backup/Magento_Checkout/onepage/shipping_method/available.phtml @@ -19,6 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design + * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ @@ -26,16 +27,17 @@ <?php /** @var $this \Magento\Checkout\Block\Onepage\Shipping\Method\Available */ ?> <?php $_shippingRateGroups = $this->getShippingRates(); ?> <?php if (!$_shippingRateGroups): ?> - <p><?php echo __('Sorry, no quotes are available for this order at this time.') ?></p> + <p><?php echo __('Sorry, no quotes are available for this order.') ?></p> <?php else: ?> - <dl class="sp-methods items methods"> + <dl class="sp-methods"> <?php $shippingCodePrice = array(); ?> <?php $_sole = count($_shippingRateGroups) == 1; foreach ($_shippingRateGroups as $code => $_rates): ?> - <dt class="item title"><?php echo $this->escapeHtml($this->getCarrierName($code)) ?></dt> - <dd class="item options"> + <dt><?php echo $this->escapeHtml($this->getCarrierName($code)) ?></dt> + <dd> + <ul> <?php $_sole = $_sole && count($_rates) == 1; foreach ($_rates as $_rate): ?> <?php $shippingCodePrice[] = '"'.$_rate->getCode().'":'.(float)$_rate->getPrice(); ?> - <div class="field choice"> + <li> <?php if ($_rate->getErrorMessage()): ?> <ul class="messages"><li class="error-msg"><ul><li><?php echo $this->escapeHtml($_rate->getErrorMessage()) ?></li></ul></li></ul> <?php else: ?> @@ -44,18 +46,18 @@ <?php else: ?> <input name="shipping_method" type="radio" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?>"<?php if($_rate->getCode()===$this->getAddressShippingMethod()) echo ' checked="checked"' ?> class="radio"/> <?php endif; ?> - <label class="label" for="s_method_<?php echo $_rate->getCode() ?>"><span><?php echo $this->escapeHtml($_rate->getMethodTitle()) ?> + <label for="s_method_<?php echo $_rate->getCode() ?>"><?php echo $this->escapeHtml($_rate->getMethodTitle()) ?> <?php $_excl = $this->getShippingPrice($_rate->getPrice(), $this->helper('Magento\Tax\Helper\Data')->displayShippingPriceIncludingTax()); ?> <?php $_incl = $this->getShippingPrice($_rate->getPrice(), true); ?> <?php echo $_excl; ?> <?php if ($this->helper('Magento\Tax\Helper\Data')->displayShippingBothPrices() && $_incl != $_excl): ?> (<?php echo __('Incl. Tax'); ?> <?php echo $_incl; ?>) <?php endif; ?> - </span> </label> <?php endif ?> - </div> + </li> <?php endforeach; ?> + </ul> </dd> <?php endforeach; ?> </dl> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/success.phtml b/app/design/frontend/magento_backup/Magento_Checkout/success.phtml similarity index 54% rename from app/design/frontend/magento_plushe/Magento_Checkout/success.phtml rename to app/design/frontend/magento_backup/Magento_Checkout/success.phtml index 95681ab6f6e26bf453c8e003ce4d4f85ed7b3109..169c4d693f39925a402e7c303848f2dd45fec34c 100644 --- a/app/design/frontend/magento_plushe/Magento_Checkout/success.phtml +++ b/app/design/frontend/magento_backup/Magento_Checkout/success.phtml @@ -19,24 +19,30 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design + * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -<h2 class="subtitle"><?php echo __('Thank you for your purchase!') ?></h2> +<div class="page-title"> + <h1><?php echo __('We received your order.') ?></h1> +</div> +<?php echo $this->getMessagesBlock()->getGroupedHtml() ?> +<h2 class="sub-title"><?php echo __('Thank you for your purchase!') ?></h2> + <?php if ($this->getOrderId()):?> - <?php if ($this->getCanViewOrder()) :?> - <p><?php echo __('Your order # is: %1.', sprintf('<a href="%s">%s</a>', $this->escapeHtml($this->getViewOrderUrl()), $this->escapeHtml($this->getOrderId()))) ?></p> - <?php else :?> - <p><?php echo __('Your order # is: %1.', $this->escapeHtml($this->getOrderId())) ?></p> - <?php endif;?> - <p><?php echo __('You will receive an order confirmation email with details of your order and a link to track its progress.') ?></p> - <?php if ($this->getCanViewOrder() && $this->getCanPrintOrder()) :?> - <p> - <?php echo __('Click <a href="%1" onclick="this.target=\'_blank\'">here to print</a> a copy of your order confirmation.', $this->getPrintUrl()) ?> - <?php echo $this->getChildHtml() ?> - </p> - <?php endif;?> +<?php if ($this->getCanViewOrder()) :?> + <p><?php echo __('Your order # is: %1.', sprintf('<a href="%s">%s</a>', $this->escapeHtml($this->getViewOrderUrl()), $this->escapeHtml($this->getOrderId()))) ?></p> +<?php else :?> + <p><?php echo __('Your order # is: %1.', $this->escapeHtml($this->getOrderId())) ?></p> +<?php endif;?> + <p><?php echo __('We\'ll send you a confirmation email with order details and tracking information.') ?></p> +<?php if ($this->getCanViewOrder() && $this->getCanPrintOrder()) :?> + <p> + <?php echo __('Click <a href="%1" onclick="this.target=\'_blank\'">here to print</a> a copy of your order confirmation.', $this->getPrintUrl()) ?> + <?php echo $this->getChildHtml() ?> + </p> +<?php endif;?> <?php endif;?> <?php if ($this->getAgreementRefId()): ?> @@ -45,14 +51,14 @@ <?php if ($profiles = $this->getRecurringProfiles()):?> <p><?php echo __('Your recurring payment profiles:'); ?></p> -<ul> +<ul class="disc"> <?php foreach($profiles as $profile):?> <?php $profileIdHtml = ($this->getCanViewProfiles() ? sprintf('<a href="%s">%s</a>', $this->escapeHtml($this->getProfileUrl($profile)), $this->escapeHtml($this->getObjectData($profile, 'reference_id'))) : $this->escapeHtml($this->getObjectData($profile, 'reference_id')));?> - <li><?php echo __('Payment profile # %1: "%2".', $profileIdHtml, $this->escapeHtml($this->getObjectData($profile, 'schedule_description')))?></li> + <li><?php echo __('Payment profile # %1: "%2"', $profileIdHtml, $this->escapeHtml($this->getObjectData($profile, 'schedule_description')))?></li> <?php endforeach;?> </ul> <?php endif;?> -<div class="actions"> - <a class="action continue" title="<?php echo __('Continue Shopping') ?>" href="<?php echo $this->getUrl() ?>"><span><?php echo __('Continue Shopping') ?></span></a> +<div class="buttons-set"> + <button type="button" class="button" title="<?php echo __('Continue Shopping') ?>" onclick="window.location='<?php echo $this->getUrl() ?>'"><span><span><?php echo __('Continue Shopping') ?></span></span></button> </div> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/total/default.phtml b/app/design/frontend/magento_backup/Magento_Checkout/total/default.phtml similarity index 83% rename from app/design/frontend/magento_plushe/Magento_Checkout/total/default.phtml rename to app/design/frontend/magento_backup/Magento_Checkout/total/default.phtml index 06114863baefc625e15c6b09316610ecffcace03..d34e1906d404f3b85f42219f1c876f5fa51995e4 100644 --- a/app/design/frontend/magento_plushe/Magento_Checkout/total/default.phtml +++ b/app/design/frontend/magento_backup/Magento_Checkout/total/default.phtml @@ -19,19 +19,20 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design + * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -<tr class="discount"> - <td colspan="<?php echo $this->getColspan(); ?>" style="<?php echo $this->getTotal()->getStyle() ?>" class="mark"> +<tr> + <th colspan="<?php echo $this->getColspan(); ?>" style="<?php echo $this->getTotal()->getStyle() ?>" class="a-right"> <?php if ($this->getRenderingArea() == $this->getTotal()->getArea()): ?><strong><?php endif; ?> <?php echo $this->escapeHtml($this->getTotal()->getTitle()); ?> <?php if ($this->getRenderingArea() == $this->getTotal()->getArea()): ?></strong><?php endif; ?> - </td> - <td style="<?php echo $this->getTotal()->getStyle() ?>" class="amount"> + </th> + <td style="<?php echo $this->getTotal()->getStyle() ?>" class="a-right"> <?php if ($this->getRenderingArea() == $this->getTotal()->getArea()): ?><strong><?php endif; ?> - <span><?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($this->getTotal()->getValue()) ?></span> + <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($this->getTotal()->getValue()) ?> <?php if ($this->getRenderingArea() == $this->getTotal()->getArea()): ?></strong><?php endif; ?> </td> </tr> diff --git a/app/design/frontend/magento_backup/Magento_Checkout/total/nominal.phtml b/app/design/frontend/magento_backup/Magento_Checkout/total/nominal.phtml new file mode 100644 index 0000000000000000000000000000000000000000..58537f0ac3f29210e2bb38167ad6ad89f935df52 --- /dev/null +++ b/app/design/frontend/magento_backup/Magento_Checkout/total/nominal.phtml @@ -0,0 +1,56 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category design + * @package base_default + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +?> +<?php +/** + * @see \Magento\Checkout\Block\Total\Nominal + */ +?> +<tr> + <th colspan="<?php echo $this->getColspan() + 1; ?>" style="<?php echo $this->getTotalStyle() ?>" class="a-right"> + <?php echo sprintf(($this->getRenderingArea() == $this->getTotalArea()) ? '<strong>%s</strong>' : '%s', $this->escapeHtml($this->getTotalTitle())) ?> + </th> +</tr> +<?php foreach ($this->getTotalItems() as $i => $item): ?> +<?php foreach ($this->getTotalItemDetails($item) as $j => $row):?> +<tr class="summary-details <?php echo "summary-details-nominal-{$i}" . (0 == $j ? ' summary-details-first' : '') . ($this->getItemDetailsRowIsCompounded($row) ? '' : ' summary-details-excluded')?>" style="display:none;"> + <td colspan="<?php echo $this->getColspan(); ?>" style="<?php echo $this->getTotalStyle() ?>" class="a-right"> + <?php echo $this->escapeHtml($this->getItemDetailsRowLabel($row)) ?> + </td> + <td class="a-right"> + <?php echo $this->formatPrice($this->getItemDetailsRowAmount($row)) ?> + </td> +</tr> +<?php endforeach; ?> +<tr class="summary-total" onclick="expandDetails(this, '<?php echo ".summary-details-nominal-{$i}"?>')"> + <td colspan="<?php echo $this->getColspan(); ?>" style="<?php echo $this->getTotalStyle() ?>"> + <div class="summary-collapse"><?php echo $this->escapeHtml($this->getItemName($item)); ?></div> + </td> + <td class="a-right"> + <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($this->getItemRowTotal($item)) ?> + </td> +</tr> +<?php endforeach; ?> diff --git a/app/design/frontend/magento_backup/Magento_Checkout/total/tax.phtml b/app/design/frontend/magento_backup/Magento_Checkout/total/tax.phtml new file mode 100644 index 0000000000000000000000000000000000000000..998107b44cab928eb5c98b87cd72cfbc0b617e1e --- /dev/null +++ b/app/design/frontend/magento_backup/Magento_Checkout/total/tax.phtml @@ -0,0 +1,68 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category design + * @package base_default + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +?> +<?php global $taxIter; $taxIter++; ?> +<?php if ($this->helper('Magento\Tax\Helper\Data')->displayFullSummary() && $this->getTotal()->getValue()!=0): ?> +<?php $isTop = 1; ?> + <?php foreach ($this->getTotal()->getFullInfo() as $info): ?> + <?php if (isset($info['hidden']) && $info['hidden']) continue; ?> + <?php $percent = $info['percent']; ?> + <?php $amount = $info['amount']; ?> + <?php $rates = $info['rates']; ?> + <?php $isFirst = 1; ?> + + <?php foreach ($rates as $rate): ?> + <tr class="summary-details-<?php echo $taxIter; ?> summary-details<?php if ($isTop): echo ' summary-details-first'; endif; ?>" style="display:none;"> + <td class="a-right" style="<?php echo $this->getTotal()->getStyle() ?>" colspan="<?php echo $this->getColspan(); ?>"> + <?php echo $this->escapeHtml($rate['title']); ?> + <?php if (!is_null($rate['percent'])): ?> + (<?php echo (float)$rate['percent']; ?>%) + <?php endif; ?> + <br /> + </td> + <?php if ($isFirst): ?> + <td rowspan="<?php echo count($rates); ?>" class="a-right" style="<?php echo $this->getTotal()->getStyle() ?>"> + <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($amount); ?> + </td> + <?php endif; ?> + </tr> + <?php $isFirst = 0; ?> + <?php $isTop = 0; ?> + <?php endforeach; ?> + <?php endforeach; ?> +<?php endif;?> +<tr<?php if ($this->helper('Magento\Tax\Helper\Data')->displayFullSummary() && $this->getTotal()->getValue()!=0): ?> class="summary-total" onclick="expandDetails(this, '.summary-details-<?php echo $taxIter;?>')"<?php endif; ?>> + <td class="a-right" colspan="<?php echo $this->getColspan(); ?>" style="<?php echo $this->getTotal()->getStyle() ?>"> + <?php if ($this->helper('Magento\Tax\Helper\Data')->displayFullSummary()): ?> + <div class="summary-collapse"><?php echo $this->getTotal()->getTitle() ?></div> + <?php else: ?> + <?php echo $this->getTotal()->getTitle() ?> + <?php endif;?> + </td> + <td class="a-right" style="<?php echo $this->getTotal()->getStyle() ?>"> + <strong><?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($this->getTotal()->getValue()) ?></strong> + </td> +</tr> diff --git a/app/design/frontend/magento_backup/Magento_Customer/layout/override/base/customer_account_confirmation.xml b/app/design/frontend/magento_backup/Magento_Customer/layout/override/base/customer_account_confirmation.xml index 0b74bb3978f2da11efe1ad284343a3f813314eda..11665c9f4d3ffe45aaae6440acd9c1e503bd5e2d 100644 --- a/app/design/frontend/magento_backup/Magento_Customer/layout/override/base/customer_account_confirmation.xml +++ b/app/design/frontend/magento_backup/Magento_Customer/layout/override/base/customer_account_confirmation.xml @@ -33,6 +33,6 @@ </action> </referenceBlock> <referenceContainer name="content"> - <block class="Magento\Core\Block\Template" name="accountConfirmation" template="Magento_Customer::form/confirmation.phtml"/> + <block class="Magento\View\Block\Template" name="accountConfirmation" template="Magento_Customer::form/confirmation.phtml"/> </referenceContainer> </layout> diff --git a/app/design/frontend/magento_backup/Magento_Customer/layout/override/base/customer_account_index.xml b/app/design/frontend/magento_backup/Magento_Customer/layout/override/base/customer_account_index.xml index b360dfb9e65c091f64656d27c81b1489a1f10c19..e817f42626ac18a962e2a45288821499b4509eb4 100644 --- a/app/design/frontend/magento_backup/Magento_Customer/layout/override/base/customer_account_index.xml +++ b/app/design/frontend/magento_backup/Magento_Customer/layout/override/base/customer_account_index.xml @@ -33,7 +33,7 @@ <referenceContainer name="my.account.wrapper"> <block class="Magento\Customer\Block\Account\Dashboard" name="customer_account_dashboard" template="account/dashboard.phtml"> <block class="Magento\Customer\Block\Account\Dashboard\Hello" name="customer_account_dashboard_hello" as="hello" template="account/dashboard/hello.phtml"/> - <block class="Magento\Core\Block\Template" name="customer_account_dashboard_top" as="top"/> + <block class="Magento\View\Block\Template" name="customer_account_dashboard_top" as="top"/> <block class="Magento\Customer\Block\Account\Dashboard\Info" name="customer_account_dashboard_info" as="info" template="account/dashboard/info.phtml"/> <block class="Magento\Customer\Block\Account\Dashboard\Newsletter" name="customer_account_dashboard_newsletter" as="newsletter" template="account/dashboard/newsletter.phtml"/> <block class="Magento\Customer\Block\Account\Dashboard\Address" name="customer_account_dashboard_address" as="address" template="account/dashboard/address.phtml"/> diff --git a/app/design/frontend/magento_backup/Magento_Customer/layout/override/base/customer_account_logoutsuccess.xml b/app/design/frontend/magento_backup/Magento_Customer/layout/override/base/customer_account_logoutsuccess.xml index 05c3a7da0e2d411967f82590051f5c7a9d66e98a..f92de06af03eed39f62742a89dfe7072a6642c0d 100644 --- a/app/design/frontend/magento_backup/Magento_Customer/layout/override/base/customer_account_logoutsuccess.xml +++ b/app/design/frontend/magento_backup/Magento_Customer/layout/override/base/customer_account_logoutsuccess.xml @@ -30,6 +30,6 @@ </action> </referenceBlock> <referenceContainer name="content"> - <block class="Magento\Core\Block\Template" name="customer_logout" template="Magento_Customer::logout.phtml"/> + <block class="Magento\View\Block\Template" name="customer_logout" template="Magento_Customer::logout.phtml"/> </referenceContainer> </layout> diff --git a/app/design/frontend/magento_backup/Magento_Directory/js/optional_zip_countries.phtml b/app/design/frontend/magento_backup/Magento_Directory/js/optional_zip_countries.phtml index ed5551dcf498618eb23c19d5a5ead6d631a4243e..357a8e3afa6779cc2fd6bfc6e5d7afa52defe2d5 100644 --- a/app/design/frontend/magento_backup/Magento_Directory/js/optional_zip_countries.phtml +++ b/app/design/frontend/magento_backup/Magento_Directory/js/optional_zip_countries.phtml @@ -29,6 +29,6 @@ /** * JS block for including Countries with Optional Zip * - * @see \Magento\Core\Block\Template + * @see \Magento\View\Block\Template */ ?> diff --git a/app/design/frontend/magento_backup/Magento_GiftMessage/gift-options.js b/app/design/frontend/magento_backup/Magento_GiftMessage/gift-options.js new file mode 100644 index 0000000000000000000000000000000000000000..6f9b6cc23168a9f45a6075a2b5a2536916596510 --- /dev/null +++ b/app/design/frontend/magento_backup/Magento_GiftMessage/gift-options.js @@ -0,0 +1,95 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category gift message options toggle + * @package mage + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +/*jshint jquery:true*/ +(function($) { + "use strict"; + $.widget('mage.giftOptions', { + options: { + mageError: 'mage-error', + noDisplay: 'no-display', + requiredEntry: 'required-entry' + }, + + /** + * Initial toggle of the various gift options after widget instantiation. + * @private + */ + _init: function() { + this._toggleVisibility(); + }, + + /** + * Bind a click handler to the widget's context element. + * @private + */ + _create: function() { + this.element.on('click', $.proxy(this._toggleVisibility, this)); + $(this.element.data('selector').id).find('.giftmessage-area') + .on('change', $.proxy(this._toggleRequired, this)); + }, + + /** + * Toggle the visibility of the widget's context element's selector(s). + * @private + * @param event {Object} - Click event. Target is a checkbox. + */ + _toggleVisibility: function(event) { + var checkbox = event ? $(event.target) : this.element, + container = $(checkbox.data('selector').id); + if (checkbox.is(':checked')) { + container.show() + .find('.giftmessage-area:not(:visible)').each(function(x, element) { + if ($(element).val().length > 0) { + $(element).change(); + container.find('a').click(); + } + }); + } else { + var _this = this; + container.hide() + .find('.input-text:not(.giftmessage-area)').each(function(x, element) { + $(element).val(element.defaultValue).removeClass(_this.options.mageError) + .next('div.' + _this.options.mageError).remove(); + }).end() + .find('.giftmessage-area').val('').change().end() + .find('.select').val('').change().end() + .find('.checkbox:checked').prop('checked', false).click().prop('checked', false).end() + .find('.price-box').addClass(this.options.noDisplay).end(); + } + }, + + /** + * Make the From and To input fields required if a gift message has been written. + * @private + * @param event {Object} - Change event. Target is a textarea. + */ + _toggleRequired: function(event) { + var textArea = $(event.target), + length = textArea.val().length; + textArea.closest('li').prev('.fields') + .find('.input-text').toggleClass(this.options.requiredEntry, length > 0); + } + }); +})(jQuery); diff --git a/app/design/frontend/magento_backup/Magento_GiftMessage/inline.phtml b/app/design/frontend/magento_backup/Magento_GiftMessage/inline.phtml new file mode 100644 index 0000000000000000000000000000000000000000..b581f23b0ffe962af5acf03b695097ba453e1d7b --- /dev/null +++ b/app/design/frontend/magento_backup/Magento_GiftMessage/inline.phtml @@ -0,0 +1,252 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category design + * @package base_default + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +?> +<?php if ($this->isMessagesAvailable() || $this->isItemsAvailable()): ?> +<?php switch ($this->getType()): ?> +<?php case 'onepage_checkout': ?> + <div class="gift-messages"> + <h3><?php echo __('Does your order include gift items?'); ?></h3> + <p> + <input type="checkbox" name="allow_gift_messages" id="allow_gift_messages" value="1" data-selector='{"id":"#allow-gift-message-container"}'<?php if($this->getItemsHasMesssages() || $this->getEntityHasMessage()): ?> checked="checked"<?php endif; ?> class="checkbox" /> + <label for="allow_gift_messages"><?php echo __('Add gift options.') ?></label> + </p> + </div> + <div class="gift-messages-form" id="allow-gift-message-container"> + <div class="inner-box"> + <?php if ($this->isMessagesAvailable()): ?> + <h4><?php echo __('Gift Options for the Entire Order'); ?></h4> + <p> + <input type="checkbox" name="allow_gift_messages_for_order" id="allow_gift_messages_for_order" value="1" data-selector='{"id":"#allow-gift-messages-for-order-container"}'<?php if($this->getEntityHasMessage()): ?> checked="checked"<?php endif; ?> class="checkbox" /> + <label for="allow_gift_messages_for_order"><?php echo __('Add gift options for the Entire Order') ?></label> + </p> + <div class="allow-gift-messages-for-order-container" id="allow-gift-messages-for-order-container" style="display:none"> + <p><?php echo __('You can leave this box empty if you don\'t want to add a gift message for the whole order.') ?></p> + <input type="hidden" name="giftmessage[<?php echo $this->getEntity()->getId() ?>][type]" value="quote" /> + <ul class="form-list"> + <li class="fields"> + <div class="field"> + <label for="gift-message-whole-from"><?php echo __('From') ?></label> + <div class="input-box"> + <input type="text" name="giftmessage[<?php echo $this->getEntity()->getId() ?>][from]" id="gift-message-whole-from" title="<?php echo __('From') ?>" value="<?php echo $this->getEscaped($this->getMessage()->getSender(), $this->getDefaultFrom()) ?>" class="input-text" /> + </div> + </div> + <div class="field"> + <label for="gift-message-whole-to"><?php echo __('To') ?></label> + <div class="input-box"> + <input type="text" name="giftmessage[<?php echo $this->getEntity()->getId() ?>][to]" id="gift-message-whole-to" title="<?php echo __('To') ?>" value="<?php echo $this->getEscaped($this->getMessage()->getRecipient(), $this->getDefaultTo()) ?>" class="input-text" /> + </div> + </div> + </li> + <li class="wide"> + <label for="gift-message-whole-message"><?php echo __('Message') ?></label> + <div class="input-box"> + <textarea id="gift-message-whole-message" class="input-text giftmessage-area" name="giftmessage[<?php echo $this->getEntity()->getId() ?>][message]" title="<?php echo __('Message') ?>" rows="5" cols="10"><?php echo $this->getEscaped($this->getMessage()->getMessage()) ?></textarea> + </div> + </li> + </ul> + </div> + <?php endif; ?> + <?php if($this->isItemsAvailable()): ?> + <h4><?php echo __('Gift Options for Individual Items'); ?></h4> + <p> + <input type="checkbox" name="allow_gift_messages_for_items" id="allow_gift_messages_for_items" value="1" data-selector='{"id":"#allow-gift-messages-for-items-container"}'<?php if($this->getItemsHasMesssages()): ?> checked="checked"<?php endif; ?> class="checkbox" /> + <label for="allow_gift_messages_for_items"><?php echo __('Add gift options for Individual Items') ?></label> + </p> + <div id="allow-gift-messages-for-items-container"> + <p><?php echo __('You can leave this box empty if you don\'t want to add a gift message to this item.') ?></p> + <ol> + <?php foreach($this->getItems() as $_index=>$_item): ?> + <?php $_product=$_item->getProduct() ?> + <li class="item"> + <div class="product-img-box"> + <p class="product-image"> + <img src="<?php echo $this->getThumbnailUrl($_product) ?>" width="<?php echo $this->getThumbnailSize()?>" height="<?php echo $this->getThumbnailSize()?>" alt="<?php echo $this->escapeHtml($_product->getName()) ?>" title="<?php echo $this->escapeHtml($_product->getName()) ?>" /> + </p> + <p class="number"><?php echo __('Item %1 of %2', $_index+1, $this->countItems()) ?></p> + </div> + <div class="details"> + <div class="f-fix"> + <h5 class="product-name"><?php echo $this->escapeHtml($_product->getName()) ?></h5> + <input type="hidden" name="giftmessage[<?php echo $_item->getId() ?>][type]" value="quote_item" /> + <ul class="form-list"> + <li class="fields"> + <div class="field"> + <label for="gift-message-<?php echo $_item->getId() ?>-from"><?php echo __('From') ?></label> + <div class="input-box"> + <input type="text" name="giftmessage[<?php echo $_item->getId() ?>][from]" id="gift-message-<?php echo $_item->getId() ?>-from" title="<?php echo __('From') ?>" value="<?php echo $this->getEscaped($this->getMessage($_item)->getSender(), $this->getDefaultFrom()) ?>" class="input-text" /> + </div> + </div> + <div class="field"> + <label for="gift-message-<?php echo $_item->getId() ?>-to"><?php echo __('To') ?></label> + <div class="input-box"> + <input type="text" name="giftmessage[<?php echo $_item->getId() ?>][to]" id="gift-message-<?php echo $_item->getId() ?>-to" title="<?php echo __('To') ?>" value="<?php echo $this->getEscaped($this->getMessage($_item)->getRecipient(), $this->getDefaultTo()) ?>" class="input-text" /> + </div> + </div> + </li> + <li class="wide"> + <label for="gift-message-<?php echo $_item->getId() ?>-message"><?php echo __('Message') ?></label> + <div class="input-box"> + <textarea id="gift-message-<?php echo $_item->getId() ?>-message" class="input-text giftmessage-area" name="giftmessage[<?php echo $_item->getId() ?>][message]" title="<?php echo __('Message') ?>" rows="5" cols="40"><?php echo $this->getEscaped($this->getMessage($_item)->getMessage()) ?></textarea> + </div> + </li> + </ul> + </div> + </div> + </li> + <?php endforeach; ?> + </ol> + </div> + <?php endif; ?> + </div> + </div> + <script type="text/javascript"> + head.js("<?php echo $this->getViewFileUrl('Magento_GiftMessage::gift-options.js')?>", function() { + jQuery('#allow_gift_messages') + .add('#allow_gift_messages_for_order') + .add('#allow_gift_messages_for_items').giftOptions(); + }); + </script> +<?php break; ?> +<?php case 'multishipping_adress_checkbox': ?> + +<?php break; ?> +<?php case 'multishipping_address': ?> + <div class="gift-messages"> + <h3><?php echo __('Does your order include gift items?'); ?></h3> + <p> + <input type="checkbox" name="allow_gift_messages_<?php echo $this->getEntity()->getId() ?>" id="allow_gift_messages_<?php echo $this->getEntity()->getId() ?>" value="1" data-selector='{"id":"#allow-gift-message-container-<?php echo $this->getEntity()->getId() ?>"}'<?php if($this->getItemsHasMesssages() || $this->getEntityHasMessage()): ?> checked="checked"<?php endif ?> class="checkbox" /> + <label for="allow_gift_messages_<?php echo $this->getEntity()->getId() ?>"><?php echo __('Add gift options') ?></label> + </p> + </div> + <div class="gift-messages-form" id="allow-gift-message-container-<?php echo $this->getEntity()->getId() ?>"> + <div class="inner-box"> + <?php if ($this->isMessagesAvailable()): ?> + <h4><?php echo __('Gift Options for this address'); ?></h4> + <p> + <input type="checkbox" name="allow_gift_messages_for_order_<?php echo $this->getEntity()->getId() ?>" id="allow_gift_messages_for_order_<?php echo $this->getEntity()->getId() ?>" value="1" data-selector='{"id":"#allow-gift-messages-for-order-container-<?php echo $this->getEntity()->getId() ?>"}'<?php if($this->getEntityHasMessage()): ?> checked="checked"<?php endif; ?> class="checkbox" /> + <label for="allow_gift_messages_for_order"><?php echo __('Add gift options for the Entire Order') ?></label> + </p> + <div id="allow-gift-messages-for-order-container-<?php echo $this->getEntity()->getId() ?>"> + <p><?php echo __('You can leave this box empty if you don\'t want to add a gift message for this address.') ?></p> + <input type="hidden" name="giftmessage[<?php echo $this->getEntity()->getId() ?>][type]" value="quote_address" /> + <ul class="form-list"> + <li class="fields"> + <div class="field"> + <label for="gift-message-<?php echo $this->getEntity()->getId() ?>-from"><?php echo __('From') ?></label> + <div class="input-box"> + <input type="text" name="giftmessage[<?php echo $this->getEntity()->getId() ?>][from]" id="gift-message-<?php echo $this->getEntity()->getId() ?>-from" title="<?php echo __('From') ?>" value="<?php echo $this->getEscaped($this->getMessage()->getSender(), $this->getDefaultFrom()) ?>" class="input-text" /> + </div> + </div> + <div class="field"> + <label for="gift-message-<?php echo $this->getEntity()->getId() ?>-to"><?php echo __('To') ?></label> + <div class="input-box"> + <input type="text" name="giftmessage[<?php echo $this->getEntity()->getId() ?>][to]" id="gift-message-<?php echo $this->getEntity()->getId() ?>-to" title="<?php echo __('To') ?>" value="<?php echo $this->getEscaped($this->getMessage()->getRecipient(), $this->getDefaultTo()) ?>" class="input-text" /> + </div> + </div> + </li> + <li class="wide"> + <label for="gift-message-<?php echo $this->getEntity()->getId() ?>-message"><?php echo __('Message') ?></label> + <div class="input-box"> + <textarea id="gift-message-<?php echo $this->getEntity()->getId() ?>-message" class="input-text giftmessage-area" name="giftmessage[<?php echo $this->getEntity()->getId() ?>][message]" title="<?php echo __('Message') ?>" rows="5" cols="40"><?php echo $this->getEscaped($this->getMessage()->getMessage()) ?></textarea> + </div> + </li> + </ul> + </div> + <?php endif; ?> + <?php if($this->isItemsAvailable()): ?> + <h4><?php echo __('Gift Options for Individual Items'); ?></h4> + <p> + <input type="checkbox" name="allow_gift_messages_for_items_<?php echo $this->getEntity()->getId() ?>" id="allow_gift_messages_for_items_<?php echo $this->getEntity()->getId() ?>" value="1" data-selector='{"id":"#allow-gift-messages-for-items-container-<?php echo $this->getEntity()->getId() ?>"}'<?php if($this->getItemsHasMesssages()): ?> checked="checked"<?php endif; ?> class="checkbox" /> + <label for="allow_gift_messages_for_items_<?php echo $this->getEntity()->getId() ?>"><?php echo __('Add gift options for Individual Items') ?></label> + </p> + <div id="allow-gift-messages-for-items-container-<?php echo $this->getEntity()->getId() ?>"> + <p><?php echo __('You can leave this box empty if you don\'t want to add a gift message to this item.') ?></p> + <ol> + <?php foreach($this->getItems() as $_index=>$_item): ?> + <?php $_product=$_item->getProduct() ?> + <li class="item"> + <div class="product-img-box"> + <p class="product-image"><img src="<?php echo $this->getThumbnailUrl($_product) ?>" width="<?php echo $this->getThumbnailSize()?>" height="<?php echo $this->getThumbnailSize()?>" alt="<?php echo $this->escapeHtml($_product->getName()) ?>" title="<?php echo $this->escapeHtml($_product->getName()) ?>" /></p> + <p class="number"><?php echo __('Item %1 of %2', $_index+1, $this->countItems()) ?></p> + </div> + <div class="details"> + <div class="f-fix"> + <input type="hidden" name="giftmessage[<?php echo $_item->getId() ?>][type]" value="quote_address_item" /> + <input type="hidden" name="giftmessage[<?php echo $_item->getId() ?>][address]" value="<?php echo $this->getEntity()->getId()?>" /> + <h5 class="product-name"><?php echo $this->escapeHtml($_product->getName()) ?></h5> + <ul class="form-list"> + <li class="fields"> + <div class="field"> + <label for="gift-message-<?php echo $_item->getId() ?>-from"><?php echo __('From') ?></label> + <div class="input-box"> + <input type="text" name="giftmessage[<?php echo $_item->getId() ?>][from]" id="gift-message-<?php echo $_item->getId() ?>-from" title="<?php echo __('From') ?>" value="<?php echo $this->getEscaped($this->getMessage($_item)->getSender(), $this->getDefaultFrom()) ?>" class="input-text" /> + </div> + </div> + <div class="field"> + <label for="gift-message-<?php echo $_item->getId() ?>-to"><?php echo __('To') ?></label> + <div class="input-box"> + <input type="text" name="giftmessage[<?php echo $_item->getId() ?>][to]" id="gift-message-<?php echo $_item->getId() ?>-to" title="<?php echo __('To') ?>" value="<?php echo $this->getEscaped($this->getMessage($_item)->getRecipient(), $this->getDefaultTo()) ?>" class="input-text" /> + </div> + </div> + </li> + <li class="wide"> + <label for="gift-message-<?php echo $_item->getId() ?>-message"><?php echo __('Message') ?></label> + <div class="input-box"> + <textarea id="gift-message-<?php echo $_item->getId() ?>-message" class="input-text giftmessage-area" name="giftmessage[<?php echo $_item->getId() ?>][message]" title="<?php echo __('Message') ?>" rows="5" cols="10"><?php echo $this->getEscaped($this->getMessage($_item)->getMessage()) ?></textarea> + </div> + </li> + </ul> + </div> + </div> + </li> + <?php endforeach; ?> + </ol> + </div> + <?php endif; ?> + </div> + </div> + <script type="text/javascript"> + (function($) { + $(function() { + head.js("<?php echo $this->getViewFileUrl('Magento_GiftMessage::gift-options.js')?>", function() { + $('#allow_gift_messages_<?php echo $this->getEntity()->getId() ?>') + .add('#allow_gift_messages_for_order_<?php echo $this->getEntity()->getId() ?>') + .add('#allow_gift_messages_for_items_<?php echo $this->getEntity()->getId() ?>').giftOptions(); + }); + }); + })(jQuery); + </script> + <?php break; ?> +<?php endswitch ?> +<script type="text/javascript"> + head.js("<?php echo $this->getViewFileUrl('jquery/jquery.validate.js')?>", + "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation/validation.js')?>", function() { + jQuery("#shipping_method_form").validation(); + }); +</script> +<?php endif; ?> diff --git a/app/design/frontend/magento_backup/Magento_Paypal/hss/review/button.phtml b/app/design/frontend/magento_backup/Magento_Paypal/hss/review/button.phtml index 19163379e1a00e4d9a9f994ca49e110a8507bf10..c8781fc4fa731c7215d62d6a0fba8dc7da597a97 100644 --- a/app/design/frontend/magento_backup/Magento_Paypal/hss/review/button.phtml +++ b/app/design/frontend/magento_backup/Magento_Paypal/hss/review/button.phtml @@ -24,4 +24,4 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -<button type="submit" data-role="review-save" title="<?php echo __('Continue') ?>" class="button btn-checkout"><span><span><?php echo __('Continue') ?></span></span></button> +<button type="submit" data-role="review-save" title="<?php echo __('Continue') ?>" class="button btn-checkout"><span><?php echo __('Continue') ?></span></button> diff --git a/app/design/frontend/magento_backup/Magento_Persistent/layout/override/checkout_onepage_index.xml b/app/design/frontend/magento_backup/Magento_Persistent/layout/override/checkout_onepage_index.xml index 3a7af3478c36dfdad0a1cfabfb3e3392d38e844e..9fddb3a4ddb7169a7da433c8fa6c184ac723db95 100644 --- a/app/design/frontend/magento_backup/Magento_Persistent/layout/override/checkout_onepage_index.xml +++ b/app/design/frontend/magento_backup/Magento_Persistent/layout/override/checkout_onepage_index.xml @@ -35,6 +35,6 @@ <argument name="template" xsi:type="string">Magento_Persistent::checkout/onepage/billing.phtml</argument> </action> <block class="Magento\Persistent\Block\Form\Remember" name="checkout.onepage.billing.persistent.remember.me" as="persistent.remember.me" template="remember_me.phtml"/> - <block class="Magento\Core\Block\Template" name="checkout.onepage.billing.persistent.remember.me.tooltip" as="persistent.remember.me.tooltip" template="Magento_Persistent::remember_me_tooltip.phtml"/> + <block class="Magento\View\Block\Template" name="checkout.onepage.billing.persistent.remember.me.tooltip" as="persistent.remember.me.tooltip" template="Magento_Persistent::remember_me_tooltip.phtml"/> </referenceBlock> </layout> diff --git a/app/design/frontend/magento_backup/Magento_Persistent/layout/override/customer_account_create.xml b/app/design/frontend/magento_backup/Magento_Persistent/layout/override/customer_account_create.xml index d750cd77df5dec3f6d33e7104426469c98cfcfde..d6684926c37973b73897f1caef5986efaaeae716 100644 --- a/app/design/frontend/magento_backup/Magento_Persistent/layout/override/customer_account_create.xml +++ b/app/design/frontend/magento_backup/Magento_Persistent/layout/override/customer_account_create.xml @@ -29,6 +29,6 @@ <argument name="template" xsi:type="string">Magento_Persistent::customer/form/register.phtml</argument> </action> <block class="Magento\Persistent\Block\Form\Remember" name="customer_form_register.persistent.remember.me" as="persistent.remember.me" template="remember_me.phtml"/> - <block class="Magento\Core\Block\Template" name="customer_form_register.persistent.remember.me.tooltip" as="persistent.remember.me.tooltip" template="Magento_Persistent::remember_me_tooltip.phtml"/> + <block class="Magento\View\Block\Template" name="customer_form_register.persistent.remember.me.tooltip" as="persistent.remember.me.tooltip" template="Magento_Persistent::remember_me_tooltip.phtml"/> </referenceBlock> </layout> diff --git a/app/design/frontend/magento_backup/Magento_Persistent/layout/override/customer_account_login.xml b/app/design/frontend/magento_backup/Magento_Persistent/layout/override/customer_account_login.xml index 82366aead37eca150f30ae4bd9301b0ed9392f3b..d840de5dc3a4c91aa912ef98a0732c77cca6ed0d 100644 --- a/app/design/frontend/magento_backup/Magento_Persistent/layout/override/customer_account_login.xml +++ b/app/design/frontend/magento_backup/Magento_Persistent/layout/override/customer_account_login.xml @@ -29,6 +29,6 @@ <argument name="template" xsi:type="string">Magento_Persistent::customer/form/login.phtml</argument> </action> <block class="Magento\Persistent\Block\Form\Remember" name="customer_form_login.persistent.remember.me" as="persistent.remember.me" template="remember_me.phtml"/> - <block class="Magento\Core\Block\Template" name="customer_form_login.persistent.remember.me.tooltip" as="persistent.remember.me.tooltip" template="Magento_Persistent::remember_me_tooltip.phtml"/> + <block class="Magento\View\Block\Template" name="customer_form_login.persistent.remember.me.tooltip" as="persistent.remember.me.tooltip" template="Magento_Persistent::remember_me_tooltip.phtml"/> </referenceBlock> </layout> diff --git a/app/design/frontend/magento_backup/Magento_Persistent/remember_me_tooltip.phtml b/app/design/frontend/magento_backup/Magento_Persistent/remember_me_tooltip.phtml index 8bb7fc4eac60804cfff4939931c0aae12cbece0c..08cf4d99568835c5c5a94332cb5dd3fe91fc77cf 100644 --- a/app/design/frontend/magento_backup/Magento_Persistent/remember_me_tooltip.phtml +++ b/app/design/frontend/magento_backup/Magento_Persistent/remember_me_tooltip.phtml @@ -29,7 +29,7 @@ * "Remember Me" popup template (when click on "What's this?") * */ -/** @var $this \Magento\Core\Block\Template */ +/** @var $this \Magento\View\Block\Template */ ?> <div id="window-overlay" class="window-overlay" style="display:none;"></div> <div id="remember-me-popup" class="remember-me-popup" style="display:none;"> diff --git a/app/design/frontend/magento_backup/Magento_Sales/layout/override/sales_recurring_profile_view__tabs.xml b/app/design/frontend/magento_backup/Magento_Sales/layout/override/sales_recurring_profile_view__tabs.xml index da3289c27bad1c608378f6300e5466e4be0d173a..dae17f6f570b2302453e85fc7400f619c441f922 100644 --- a/app/design/frontend/magento_backup/Magento_Sales/layout/override/sales_recurring_profile_view__tabs.xml +++ b/app/design/frontend/magento_backup/Magento_Sales/layout/override/sales_recurring_profile_view__tabs.xml @@ -34,7 +34,7 @@ <action method="setShouldPrepareInfoTabs"> <argument name="value" xsi:type="string">1</argument> </action> - <block class="Magento\Core\Block\Text" as="profile_info" name="sales.recurring.profile.view.tab.profile" group="info_tabs"> + <block class="Magento\View\Block\Text" as="profile_info" name="sales.recurring.profile.view.tab.profile" group="info_tabs"> <action method="setViewLabel"> <argument translate="true" name="value" xsi:type="string">Profile Information</argument> </action> @@ -43,7 +43,7 @@ </action> </block> <!-- not implemented - <block class="Magento\Core\Block\Text" as="history" name="sales.recurring.profile.view.tab.history"> + <block class="Magento\View\Block\Text" as="history" name="sales.recurring.profile.view.tab.history"> <action method="addToParentGroup"> <argument name="value" xsi:type="string">info_tabs</argument> </action> @@ -55,7 +55,7 @@ </action> </block> --> - <block class="Magento\Core\Block\Text" as="related_orders" name="sales.recurring.profile.view.tab.orders" group="info_tabs"> + <block class="Magento\View\Block\Text" as="related_orders" name="sales.recurring.profile.view.tab.orders" group="info_tabs"> <action method="setViewLabel"> <argument translate="true" name="value" xsi:type="string">Related Orders</argument> </action> @@ -64,7 +64,7 @@ </action> </block> <!-- not implemented - <block class="Magento\Core\Block\Text" as="vendor_info" name="sales.recurring.profile.view.tab.vendor"> + <block class="Magento\View\Block\Text" as="vendor_info" name="sales.recurring.profile.view.tab.vendor"> <action method="addToParentGroup"> <argument name="value" xsi:type="string">info_tabs</argument> </action> diff --git a/app/design/frontend/magento_backup/Magento_Sales/recurring/grid.phtml b/app/design/frontend/magento_backup/Magento_Sales/recurring/grid.phtml index 9202a7a8faaeb6745d74fd542deb65e51710dd51..29dc6a233eb7f48bb4796d8defa353e15dcf4819 100644 --- a/app/design/frontend/magento_backup/Magento_Sales/recurring/grid.phtml +++ b/app/design/frontend/magento_backup/Magento_Sales/recurring/grid.phtml @@ -24,7 +24,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -<?php /* @var $this \Magento\Core\Block\Template */?> +<?php /* @var $this \Magento\View\Block\Template */?> <div <?php echo $this->getGridHtmlClass() ? ' class="' . $this->getGridHtmlClass() . '"' : ''?><?php echo $this->getGridHtmlCss() ? ' style="' . $this->getGridHtmlCss() . '"' : ''?>> <?php if ($caption = $this->getGridCaption()): ?> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/layout/checkout_multishipping_shipping.xml b/app/design/frontend/magento_backup/Magento_Shipping/layout/base/shipping_tracking_popup.xml similarity index 68% rename from app/design/frontend/magento_plushe/Magento_Checkout/layout/checkout_multishipping_shipping.xml rename to app/design/frontend/magento_backup/Magento_Shipping/layout/base/shipping_tracking_popup.xml index 8b7a2719c6ac532cca54ee999db395d4b5f76954..75df863046af48ca937d5793fa839ab6410de6bf 100644 --- a/app/design/frontend/magento_plushe/Magento_Checkout/layout/checkout_multishipping_shipping.xml +++ b/app/design/frontend/magento_backup/Magento_Shipping/layout/base/shipping_tracking_popup.xml @@ -23,11 +23,13 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <referenceBlock name="page.main.title"> - <action method="setPageTitle"> - <argument translate="true" name="title" xsi:type="string">Shipping Information</argument> +<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" label="Shipment Tracking Popup" type="page"> + <referenceBlock name="root"> + <action method="setTemplate"> + <argument name="template" xsi:type="string">popup.phtml</argument> </action> </referenceBlock> - <container name="additional.product.info" label="Additional Product Info"/> + <referenceContainer name="content"> + <block class="Magento\Shipping\Block\Tracking\Popup" name="shipping.tracking.popup" template="tracking/popup.phtml"/> + </referenceContainer> </layout> diff --git a/app/design/frontend/magento_backup/Magento_Shipping/tracking/popup.phtml b/app/design/frontend/magento_backup/Magento_Shipping/tracking/popup.phtml new file mode 100644 index 0000000000000000000000000000000000000000..66b76bc24340025fca67344de99d88be9d382258 --- /dev/null +++ b/app/design/frontend/magento_backup/Magento_Shipping/tracking/popup.phtml @@ -0,0 +1,177 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category design + * @package base_default + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +?> +<?php /** @var $this \Magento\Shipping\Block\Tracking\Popup */ ?> +<?php $_results = $this->getTrackingInfo(); ?> +<div class="page-title title-buttons"> + <h1><?php echo __('Tracking Information'); ?></h1> + <button class="button" onclick="window.close(); window.opener.focus();"><span><span><?php echo __('Close Window') ?></span></span></button> +</div> +<?php if(sizeof($_results)>0): ?> +<?php foreach($_results as $shipid => $_result): ?> + <?php if($shipid): ?> + <h2 class="sub-title"><?php echo __('Shipment #').$shipid; ?></h2> + <?php endif; ?> + <?php if(sizeof($_result)>0): ?> + <?php $rowCount = sizeof($_result); $counter = 1; ?> + <?php $_id = 0; foreach($_result as $track): ?> + <table class="tracking-table-popup data-table" id="tracking-table-popup-<?php echo $_id ?>"> + <col width="15%" /> + <col /> + <tbody> + <?php if(is_object($track)): ?> + <tr> + <th class="label"><?php echo __('Tracking Number:'); ?></th> + <td class="value"><?php echo $this->escapeHtml($track->getTracking()); ?></td> + </tr> + <?php if ($track->getCarrierTitle()): ?> + <tr> + <th class="label"><?php echo __('Carrier:'); ?></th> + <td class="value"><?php echo $this->escapeHtml($track->getCarrierTitle()); ?></td> + </tr> + <?php endif; ?> + <?php if($track->getErrorMessage()): ?> + <tr> + <th class="label"><?php echo __('Error:'); ?></th> + <td class="error"><?php echo __('Tracking information is not available. Please '); if ($this->getContactUsEnabled()) : ?><a href="<?php echo $this->getContactUs() ?>" title="<?php echo __('contact us') ?>" onclick="this.target='_blank'"><?php echo __('contact us') ?></a><?php echo __(' for more information or '); endif; echo __('email us at '); ?><a href="mailto:<?php echo $this->getStoreSupportEmail() ?>"><?php echo $this->getStoreSupportEmail() ?></a></td> + </tr> + <?php elseif($track->getTrackSummary()): ?> + <tr> + <th class="label"><?php echo __('Info:'); ?></th> + <td class="value"><?php echo $track->getTrackSummary(); ?></td> + </tr> + <?php elseif($track->getUrl()): ?> + <tr> + <th class="label"><?php echo __('Track:'); ?></th> + <td class="value"><a href="<?php echo $this->escapeHtml($track->getUrl()); ?>" onclick="this.target='_blank'"><?php echo $this->escapeHtml($track->getUrl()); ?></a></td> + </tr> + <?php else: ?> + <?php if ($track->getStatus()): ?> + <tr> + <th class="label"><?php echo __('Status:'); ?></th> + <td class="value"><?php echo $track->getStatus(); ?></td> + </tr> + <?php endif; ?> + + <?php if ($track->getDeliverydate()): ?> + <tr> + <th class="label"><?php echo __('Delivered on:'); ?></th> + <td class="value"><?php echo $this->formatDeliveryDateTime($track->getDeliverydate(),$track->getDeliverytime()); ?></td> + </tr> + <?php endif; ?> + + <?php if ($track->getSignedby()): ?> + <tr> + <th class="label"><?php echo __('Signed by:'); ?></th> + <td class="value"><?php echo $track->getSignedby(); ?></td> + </tr> + <?php endif; ?> + + <?php if ($track->getDeliveryLocation()): ?> + <tr> + <th class="label"><?php echo __('Delivered to:'); ?></th> + <td class="value"><?php echo $track->getDeliveryLocation(); ?></td> + </tr> + <?php endif; ?> + + <?php if ($track->getShippedDate()): ?> + <tr> + <th class="label"><?php echo __('Shipped or billed on:'); ?></th> + <td class="value"><?php echo $track->getShippedDate(); ?></td> + </tr> + <?php endif; ?> + + <?php if ($track->getService()): ?> + <tr> + <th class="label"><?php echo __('Service Type:'); ?></th> + <td class="value"><?php echo $track->getService(); ?></td> + </tr> + <?php endif; ?> + + <?php if ($track->getWeight()): ?> + <tr> + <th class="label"><?php echo __('Weight:'); ?></th> + <td class="value"><?php echo $track->getWeight(); ?></td> + </tr> + <?php endif; ?> + <?php endif; ?> + <?php elseif(isset($track['title']) && isset($track['number']) && $track['number']): ?> + <!--if the tracking is custom value--> + <tr> + <th class="label"><?php echo ($track['title'] ? $this->escapeHtml($track['title']) : __('N/A')); ?>:</th> + <td class="value"><?php echo (isset($track['number']) ? $this->escapeHtml($track['number']) : ''); ?></td> + </tr> + <?php endif; ?> + </tbody> + </table> + <script type="text/javascript">(function($) {$('#tracking-table-popup-<?php echo $_id++ ?>').decorate('table')})(jQuery)</script> + <?php if (is_object($track) && sizeof($track->getProgressdetail())>0): ?> + <br /> + <table class="data-table" id="track-history-table-<?php echo $track->getTracking(); ?>"> + <col /> + <col width="1" /> + <col width="1" /> + <col /> + <thead> + <tr> + <th><?php echo __('Location') ?></th> + <th><?php echo __('Date') ?></th> + <th><?php echo __('Local Time') ?></th> + <th><?php echo __('Description') ?></th> + </tr> + </thead> + <tbody> + <?php foreach($track->getProgressdetail() as $_detail): ?> + <?php $_detailDate = (isset($_detail['deliverydate']) ? $this->formatDeliveryDate($_detail['deliverydate']) : '') ?> + <?php $_detailTime = (isset($_detail['deliverytime']) ? $this->formatDeliveryTime($_detail['deliverytime'], $_detail['deliverydate']) : '') ?> + <tr> + <td><?php echo (isset($_detail['deliverylocation']) ? $_detail['deliverylocation'] : ''); ?></td> + <td><span class="nobr"><?php echo $_detailDate ?></span></td> + <td><span class="nobr"><?php echo $_detailTime ?></span></td> + <td><?php echo (isset($_detail['activity']) ? $_detail['activity'] : '') ?></td> + </tr> + <?php endforeach; ?> + </tbody> + </table> + <script type="text/javascript">(function($) {$('#track-history-table-<?php echo $track->getTracking(); ?>').decorate('table')})(jQuery)</script> + <?php endif; ?> + <div class="divider"></div> + <?php if($counter!=$rowCount): ?> + <?php endif; ?> + <?php $counter++; ?> + <!--end for each tracking information--> + <?php endforeach; ?> + <?php else: ?> + <p><?php echo __('There is no tracking available for this shipment.'); ?></p> + <?php endif; ?> + +<?php endforeach; ?> +<?php else: ?> + <p><?php echo __('There is no tracking available.'); ?></p> +<?php endif; ?> +<div class="buttons-set"> + <button type="button" title="<?php echo __('Close Window') ?>" class="button" onclick="window.close(); window.opener.focus();"><span><span><?php echo __('Close Window') ?></span></span></button> +</div> diff --git a/app/code/Magento/Widget/view/adminhtml/css/styles.css b/app/design/frontend/magento_backup/Magento_Tax/checkout/discount.phtml similarity index 95% rename from app/code/Magento/Widget/view/adminhtml/css/styles.css rename to app/design/frontend/magento_backup/Magento_Tax/checkout/discount.phtml index 61c59912295172d30818652f00ac68d8c6326e6c..1752f851ad76aa092222dc4d1459614122718dbb 100644 --- a/app/code/Magento/Widget/view/adminhtml/css/styles.css +++ b/app/design/frontend/magento_backup/Magento_Tax/checkout/discount.phtml @@ -1,3 +1,4 @@ +<?php /** * Magento * @@ -22,6 +23,3 @@ * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ -#layout_handle .fragment { - color: #e25203; -} diff --git a/app/design/frontend/magento_plushe/Magento_Tax/checkout/grandtotal.phtml b/app/design/frontend/magento_backup/Magento_Tax/checkout/grandtotal.phtml similarity index 75% rename from app/design/frontend/magento_plushe/Magento_Tax/checkout/grandtotal.phtml rename to app/design/frontend/magento_backup/Magento_Tax/checkout/grandtotal.phtml index b522d286f766615abb69bd387c15e8cba61f9af5..4880152304ddb2919c4f771f984682abb4f61cad 100644 --- a/app/design/frontend/magento_plushe/Magento_Tax/checkout/grandtotal.phtml +++ b/app/design/frontend/magento_backup/Magento_Tax/checkout/grandtotal.phtml @@ -19,6 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design + * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ @@ -28,29 +29,29 @@ */ ?> <?php if ($this->includeTax() && $this->getTotalExclTax()>=0):?> -<tr class="grand total excl"> - <td style="<?php echo $this->getStyle() ?>" class="mark" colspan="<?php echo $this->getColspan(); ?>"> +<tr> + <td style="<?php echo $this->getStyle() ?>" class="a-right" colspan="<?php echo $this->getColspan(); ?>"> <strong><?php echo __('Grand Total Excl. Tax')?></strong> </td> - <td style="<?php echo $this->getStyle() ?>" class="amount"> + <td style="<?php echo $this->getStyle() ?>" class="a-right"> <strong><?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($this->getTotalExclTax()) ?></strong> </td> </tr> <?php echo $this->renderTotals('taxes', $this->getColspan()); ?> -<tr class="grand total incl"> - <td style="<?php echo $this->getStyle() ?>" class="mark" colspan="<?php echo $this->getColspan(); ?>"> +<tr> + <td style="<?php echo $this->getStyle() ?>" class="a-right" colspan="<?php echo $this->getColspan(); ?>"> <strong><?php echo __('Grand Total Incl. Tax')?></strong> </td> - <td style="<?php echo $this->getStyle() ?>" class="amount"> + <td style="<?php echo $this->getStyle() ?>" class="a-right"> <strong><?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($this->getTotal()->getValue()) ?></strong> </td> </tr> <?php else:?> -<tr class="grand total"> - <td style="<?php echo $this->getStyle() ?>" class="mark" colspan="<?php echo $this->getColspan(); ?>"> +<tr> + <td style="<?php echo $this->getStyle() ?>" class="a-right" colspan="<?php echo $this->getColspan(); ?>"> <strong><?php echo $this->getTotal()->getTitle() ?></strong> </td> - <td style="<?php echo $this->getStyle() ?>" class="amount"> + <td style="<?php echo $this->getStyle() ?>" class="a-right"> <strong><?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($this->getTotal()->getValue()) ?></strong> </td> </tr> diff --git a/app/design/frontend/magento_plushe/Magento_Tax/checkout/shipping.phtml b/app/design/frontend/magento_backup/Magento_Tax/checkout/shipping.phtml similarity index 70% rename from app/design/frontend/magento_plushe/Magento_Tax/checkout/shipping.phtml rename to app/design/frontend/magento_backup/Magento_Tax/checkout/shipping.phtml index 29a032f765ecca49f312f26b7726d33b4122f910..9ca9c4e6adb10585aff79e57ffe0b6a2fb93eea6 100644 --- a/app/design/frontend/magento_plushe/Magento_Tax/checkout/shipping.phtml +++ b/app/design/frontend/magento_backup/Magento_Tax/checkout/shipping.phtml @@ -19,6 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design + * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ @@ -28,37 +29,37 @@ */ ?> <?php if ($this->displayBoth()):?> -<tr class="total shipping excl"> - <td style="<?php echo $this->getStyle() ?>" class="mark" colspan="<?php echo $this->getColspan(); ?>"> +<tr> + <td style="<?php echo $this->getStyle() ?>" class="a-right" colspan="<?php echo $this->getColspan(); ?>"> <?php echo $this->getExcludeTaxLabel() ?> </td> - <td style="<?php echo $this->getStyle() ?>" class="amount"> + <td style="<?php echo $this->getStyle() ?>" class="a-right"> <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($this->getShippingExcludeTax()) ?> </td> </tr> -<tr class="total shipping incl"> - <td style="<?php echo $this->getStyle() ?>" class="mark" colspan="<?php echo $this->getColspan(); ?>"> +<tr> + <td style="<?php echo $this->getStyle() ?>" class="a-right" colspan="<?php echo $this->getColspan(); ?>"> <?php echo $this->getIncludeTaxLabel() ?> </td> - <td style="<?php echo $this->getStyle() ?>" class="amount"> + <td style="<?php echo $this->getStyle() ?>" class="a-right"> <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($this->getShippingIncludeTax()) ?> </td> </tr> <?php elseif($this->displayIncludeTax()) : ?> -<tr class="total shipping incl"> - <td style="<?php echo $this->getStyle() ?>" class="mark" colspan="<?php echo $this->getColspan(); ?>"> +<tr> + <td style="<?php echo $this->getStyle() ?>" class="a-right" colspan="<?php echo $this->getColspan(); ?>"> <?php echo $this->getTotal()->getTitle() ?> </td> - <td style="<?php echo $this->getStyle() ?>" class="amount"> + <td style="<?php echo $this->getStyle() ?>" class="a-right"> <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($this->getShippingIncludeTax()) ?> </td> </tr> <?php else:?> -<tr class="total shipping excl"> - <td style="<?php echo $this->getStyle() ?>" class="mark" colspan="<?php echo $this->getColspan(); ?>"> +<tr> + <td style="<?php echo $this->getStyle() ?>" class="a-right" colspan="<?php echo $this->getColspan(); ?>"> <?php echo $this->escapeHtml($this->getTotal()->getTitle()) ?> </td> - <td style="<?php echo $this->getStyle() ?>" class="amount"> + <td style="<?php echo $this->getStyle() ?>" class="a-right"> <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($this->getShippingExcludeTax()) ?> </td> </tr> diff --git a/app/design/frontend/magento_plushe/Magento_Tax/checkout/subtotal.phtml b/app/design/frontend/magento_backup/Magento_Tax/checkout/subtotal.phtml similarity index 74% rename from app/design/frontend/magento_plushe/Magento_Tax/checkout/subtotal.phtml rename to app/design/frontend/magento_backup/Magento_Tax/checkout/subtotal.phtml index 7eecfc2657ad4767f357a2966d095690007d4f1f..bebb5a108879bf4b1ee453a98bebb1302702d6a6 100644 --- a/app/design/frontend/magento_plushe/Magento_Tax/checkout/subtotal.phtml +++ b/app/design/frontend/magento_backup/Magento_Tax/checkout/subtotal.phtml @@ -19,6 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design + * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ @@ -28,28 +29,28 @@ */ ?> <?php if ($this->displayBoth()):?> -<tr class="sub total excl"> - <td style="<?php echo $this->getStyle() ?>" class="mark" colspan="<?php echo $this->getColspan(); ?>"> +<tr> + <td style="<?php echo $this->getStyle() ?>" class="a-right" colspan="<?php echo $this->getColspan(); ?>"> <?php echo __('Subtotal (Excl. Tax)') ?> </td> - <td style="<?php echo $this->getStyle() ?>" class="amount"> + <td style="<?php echo $this->getStyle() ?>" class="a-right"> <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($this->getTotal()->getValueExclTax()) ?> </td> </tr> -<tr class="sub total incl"> - <td style="<?php echo $this->getStyle() ?>" class="mark" colspan="<?php echo $this->getColspan(); ?>"> +<tr> + <td style="<?php echo $this->getStyle() ?>" class="a-right" colspan="<?php echo $this->getColspan(); ?>"> <?php echo __('Subtotal (Incl. Tax)') ?> </td> - <td style="<?php echo $this->getStyle() ?>" class="amount"> + <td style="<?php echo $this->getStyle() ?>" class="a-right"> <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($this->getTotal()->getValueInclTax()) ?> </td> </tr> <?php else : ?> -<tr class="sub total"> - <td style="<?php echo $this->getStyle() ?>" class="mark" colspan="<?php echo $this->getColspan(); ?>"> +<tr> + <td style="<?php echo $this->getStyle() ?>" class="a-right" colspan="<?php echo $this->getColspan(); ?>"> <?php echo $this->getTotal()->getTitle() ?> </td> - <td style="<?php echo $this->getStyle() ?>" class="amount"> + <td style="<?php echo $this->getStyle() ?>" class="a-right"> <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($this->getTotal()->getValue()) ?> </td> </tr> diff --git a/app/design/frontend/magento_plushe/Magento_Tax/checkout/tax.phtml b/app/design/frontend/magento_backup/Magento_Tax/checkout/tax.phtml similarity index 84% rename from app/design/frontend/magento_plushe/Magento_Tax/checkout/tax.phtml rename to app/design/frontend/magento_backup/Magento_Tax/checkout/tax.phtml index 7fe118b5710b131ef5f350182fb0c2bd0b519073..c00c8d788d37e1a9a13b5a1d9d9d603938c213d9 100644 --- a/app/design/frontend/magento_plushe/Magento_Tax/checkout/tax.phtml +++ b/app/design/frontend/magento_backup/Magento_Tax/checkout/tax.phtml @@ -19,6 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design + * @package base_default * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ @@ -61,20 +62,13 @@ <?php endforeach; ?> <?php endforeach; ?> <?php endif;?> -<?php - $attributes = 'class="tax total"'; - if ($this->helper('Magento\Tax\Helper\Data')->displayFullSummary() && $_value!=0) { - $attributes = 'class="summary-total tax total" onclick="expandDetails(this, \'.summary-details-' . $taxIter . '\')"'; - } -?> - -<tr <?php echo $attributes; ?>> - <td style="<?php echo $_style ?>" class="mark" colspan="<?php echo $this->getColspan(); ?>"> +<tr <?php if ($this->helper('Magento\Tax\Helper\Data')->displayFullSummary() && $_value!=0): ?> class="summary-total" onclick="expandDetails(this, '.summary-details-<?php echo $taxIter;?>')"<?php endif; ?>> + <td style="<?php echo $_style ?>" class="a-right" colspan="<?php echo $this->getColspan(); ?>"> <?php if ($this->helper('Magento\Tax\Helper\Data')->displayFullSummary()): ?> <div class="summary-collapse"><?php echo $this->getTotal()->getTitle() ?></div> <?php else: ?> <?php echo $this->getTotal()->getTitle() ?> <?php endif;?> </td> - <td style="<?php echo $_style ?>" class="amount"><?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_value) ?></td> + <td style="<?php echo $_style ?>" class="a-right"><?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_value) ?></td> </tr> diff --git a/app/design/frontend/magento_backup/Magento_Tax/order/tax.phtml b/app/design/frontend/magento_backup/Magento_Tax/order/tax.phtml new file mode 100644 index 0000000000000000000000000000000000000000..e18c5909885c963b1a0939264f8fd928778c4b12 --- /dev/null +++ b/app/design/frontend/magento_backup/Magento_Tax/order/tax.phtml @@ -0,0 +1,81 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category design + * @package base_default + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +?> +<?php + $_order = $this->getOrder(); + $_source = $this->getSource(); + $_fullInfo = $_order->getFullTaxInfo(); + global $taxIter; $taxIter++; +?> +<?php ?> + +<?php if ($this->displayFullSummary()): ?> +<?php $isTop = 1; ?> + <?php if ($_fullInfo) foreach ($_fullInfo as $info): ?> + <?php if (isset($info['hidden']) && $info['hidden']) continue; ?> + <?php + $percent = $info['percent']; + $amount = $info['amount']; + $rates = $info['rates']; + $isFirst = 1; + ?> + <?php foreach ($rates as $rate): ?> + <tr class="summary-details-<?php echo $taxIter; ?> summary-details<?php if ($isTop): echo ' summary-details-first'; endif; ?>"<?php if (!$this->getIsPlaneMode()):?> style="display:none;"<?php endif;?>> + <td <?php echo $this->getLabelProperties()?>> + <?php echo $this->escapeHtml($rate['title']); ?> + <?php if (!is_null($rate['percent'])): ?> + (<?php echo (float)$rate['percent']; ?>%) + <?php endif; ?> + <br /> + </td> + <?php if ($isFirst): ?> + <td <?php echo $this->getValueProperties()?> rowspan="<?php echo count($rates); ?>"> + <?php echo $_order->formatPrice($amount); ?> + </td> + <?php endif; ?> + </tr> + <?php $isFirst = 0; ?> + <?php $isTop = 0; ?> + <?php endforeach; ?> + <?php endforeach; ?> +<?php endif;?> + +<?php if ($this->displayFullSummary() && $_fullInfo && !$this->getIsPlaneMode()): ?> +<tr class="summary-total" onclick="expandDetails(this, '.summary-details-<?php echo $taxIter;?>')"> +<?php elseif ($this->displayFullSummary() && $_fullInfo && $this->getIsPlaneMode()): ?> +<tr class="show-details"> +<?php else: ?> +<tr> +<?php endif; ?> + <td <?php echo $this->getLabelProperties()?>> + <?php if ($this->displayFullSummary()): ?> + <div class="summary-collapse"><?php echo __('Tax'); ?></div> + <?php else: ?> + <?php echo __('Tax'); ?> + <?php endif;?> + </td> + <td <?php echo $this->getValueProperties()?>><?php echo $_order->formatPrice($_source->getTaxAmount()) ?></td> +</tr> diff --git a/app/design/frontend/magento_plushe/Magento_Catalog/layout/default.xml b/app/design/frontend/magento_plushe/Magento_Catalog/layout/default.xml index 6268243ca28ffcf264267f07a409a7b0b848c337..f4a769d47529bda15b19c37917a4dde383a423f4 100644 --- a/app/design/frontend/magento_plushe/Magento_Catalog/layout/default.xml +++ b/app/design/frontend/magento_plushe/Magento_Catalog/layout/default.xml @@ -26,6 +26,6 @@ <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <!-- <block class="Magento\Catalog\Block\Product\Compare\Sidebar" name="catalog.compare.link" template="Magento_Catalog::product/compare/link.phtml"/> --> <referenceBlock name="header.links"> - <block class="Magento\Core\Block\Template" name="catalog.compare.link" before="-" template="Magento_Catalog::product/compare/link.phtml"/> + <block class="Magento\View\Block\Template" name="catalog.compare.link" before="-" template="Magento_Catalog::product/compare/link.phtml"/> </referenceBlock> </layout> diff --git a/app/design/frontend/magento_plushe/Magento_Catalog/layout/override/base/catalog_product_view.xml b/app/design/frontend/magento_plushe/Magento_Catalog/layout/override/base/catalog_product_view.xml index 20f6f77bc02f1fa2ca3103f48a1edcfe2d3be478..30838b8f2b0c223cb8d9b7ceaddfeaea97be0f4f 100644 --- a/app/design/frontend/magento_plushe/Magento_Catalog/layout/override/base/catalog_product_view.xml +++ b/app/design/frontend/magento_plushe/Magento_Catalog/layout/override/base/catalog_product_view.xml @@ -51,7 +51,7 @@ <container name="product.info.form.content" label="invisible" as="product_info_form_content"> <block class="Magento\Catalog\Block\Product\View" name="product.info.addtocart" as="addtocart" template="product/view/addtocart.phtml"/> </container> - <block class="Magento\Core\Block\Template" name="product.info.form.options" as="options_container"> + <block class="Magento\View\Block\Template" name="product.info.form.options" as="options_container"> <block class="Magento\Catalog\Block\Product\View" name="product.info.options.wrapper" as="product_options_wrapper" template="product/view/options/wrapper.phtml"> <block class="Magento\Catalog\Block\Product\View\Options" name="product.info.options" as="product_options" template="product/view/options.phtml"> <block class="Magento\Catalog\Block\Product\View\Options\Type\DefaultType" as="default" template="product/view/options/type/default.phtml"/> @@ -60,7 +60,7 @@ <block class="Magento\Catalog\Block\Product\View\Options\Type\Select" as="select" template="product/view/options/type/select.phtml"/> <block class="Magento\Catalog\Block\Product\View\Options\Type\Date" as="date" template="product/view/options/type/date.phtml"/> </block> - <block class="Magento\Core\Block\Html\Calendar" name="html_calendar" as="html_calendar" template="Magento_Page::js/calendar.phtml"/> + <block class="Magento\View\Block\Html\Calendar" name="html_calendar" as="html_calendar" template="Magento_Page::js/calendar.phtml"/> </block> <block class="Magento\Catalog\Block\Product\View" name="product.info.options.wrapper.bottom" as="product_options_wrapper_bottom" template="product/view/options/wrapper/bottom.phtml"> <block class="Magento\Catalog\Block\Product\View" name="product.info.addtocart.additional" as="product.info.addtocart" template="product/view/addtocart.phtml"/> diff --git a/app/design/frontend/magento_plushe/Magento_CatalogSearch/form.mini.phtml b/app/design/frontend/magento_plushe/Magento_CatalogSearch/form.mini.phtml index 20624b1c511f33cad556430a937d0c6c1f5523a9..40da82c16b7084da1bfb8adcb1627dabde19f62b 100644 --- a/app/design/frontend/magento_plushe/Magento_CatalogSearch/form.mini.phtml +++ b/app/design/frontend/magento_plushe/Magento_CatalogSearch/form.mini.phtml @@ -24,7 +24,7 @@ */ ?> <?php -/** @var $this \Magento\Core\Block\Template */ +/** @var $this \Magento\View\Block\Template */ /** @var $helper \Magento\CatalogSearch\Helper\Data */ $helper = $this->helper('Magento\CatalogSearch\Helper\Data'); ?> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/cart/coupon.phtml b/app/design/frontend/magento_plushe/Magento_Checkout/cart/coupon.phtml deleted file mode 100644 index 9bd1430c089ac0f129c4e1516fa8e323bd6fecf1..0000000000000000000000000000000000000000 --- a/app/design/frontend/magento_plushe/Magento_Checkout/cart/coupon.phtml +++ /dev/null @@ -1,69 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @category design - * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ -?> -<div class="block discount"> - <div class="title"><strong><?php echo __('Discount Codes') ?></strong></div> - <div class="content"> - <form id="discount-coupon-form" action="<?php echo $this->getUrl('checkout/cart/couponPost') ?>" method="post"> - <fieldset class="fieldset coupon<?php strlen($this->getCouponCode()) ? ' applied' : ''?>"> - <input type="hidden" name="remove" id="remove-coupon" value="0" /> - <div class="field"> - <label for="coupon_code" class="label"><span><?php echo __('Enter your coupon code if you have one.') ?></span></label> - <div class="control"> - <input type="text" class="input-text" id="coupon_code" name="coupon_code" value="<?php echo $this->escapeHtml($this->getCouponCode()) ?>" /> - </div> - </div> - <div class="actions"> - <div class="primary"> - <button class="action apply" type="button" value="<?php echo __('Apply Coupon') ?>"> - <span><?php echo __('Apply Coupon') ?></span> - </button> - </div> - <?php if(strlen($this->getCouponCode())): ?> - <div class="secondary"> - <button type="button" class="action cancel" value="<?php echo __('Cancel Coupon') ?>"><span><?php echo __('Cancel Coupon') ?></span></button> - </div> - <?php endif; ?> - </div> - </fieldset> - </form> - <script type="text/javascript"> - //<![CDATA[ - (function($) { - head.js("<?php echo $this->getViewFileUrl('jquery/jquery.validate.js')?>", - "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js')?>", - "<?php echo $this->getViewFileUrl('mage/validation.js')?>", - "<?php echo $this->getViewFileUrl('mage/validation/validation.js')?>", - "<?php echo $this->getViewFileUrl('Magento_Checkout::js/discount-codes.js')?>", function() { - $('#discount-coupon-form').discountCode({ - couponCodeSelector: '#coupon_code', removeCouponSelector: '#remove-coupon', - applyButton: 'button.action.apply', cancelButton: 'button.action.cancel' - }); - }); - })(jQuery); - //]]> - </script> - </div> -</div> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/cart/shipping.phtml b/app/design/frontend/magento_plushe/Magento_Checkout/cart/shipping.phtml deleted file mode 100644 index 35caee43ceebecf3572512850c505ef190228e76..0000000000000000000000000000000000000000 --- a/app/design/frontend/magento_plushe/Magento_Checkout/cart/shipping.phtml +++ /dev/null @@ -1,126 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @category design - * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ -?> -<?php /** @var $this \Magento\Checkout\Block\Cart\Shipping */ ?> -<div class="block shipping"> - <div class="title"><strong><?php echo __('Estimate Shipping and Tax') ?></strong></div> - <div class="content"> - <form action="<?php echo $this->getUrl('checkout/cart/estimatePost') ?>" method="post" id="shipping-zip-form"> - <fieldset class="fieldset estimate"> - <p class="field note"><?php echo __('Enter your destination to get a shipping estimate.') ?></p> - <div class="field country"> - <label for="country" class="label"><span><?php echo __('Country') ?></span></label> - <div class="control"> - <?php echo $this->getDirectoryBlock()->getCountryHtmlSelect($this->getEstimateCountryId()) ?> - </div> - </div> - <?php //if($this->getStateActive()): ?> - <div class="field region<?php if ($this->isStateProvinceRequired()) echo ' required' ?>"> - <label for="region_id" class="label"><span><?php echo __('State/Province') ?></span></label> - <div class="control"> - <select id="region_id" name="region_id" title="<?php echo __('State/Province') ?>" style="display:none;"<?php echo ($this->isStateProvinceRequired() ? ' class="validate-select"' : '') ?>> - <option value=""><?php echo __('Please select region, state or province') ?></option> - </select> - <input type="text" id="region" name="region" value="<?php echo $this->escapeHtml($this->getEstimateRegion()) ?>" title="<?php echo __('State/Province') ?>" class="input-text" style="display:none;" /> - </div> - </div> - <?php //endif; ?> - <?php if($this->getCityActive()): ?> - <div class="field city<?php if ($this->isCityRequired()) echo ' required' ?>"> - <label for="city" class="label"><span><?php echo __('City') ?></span></label> - <div class="control"> - <input class="input-text<?php if ($this->isCityRequired()):?> required-entry<?php endif;?>" id="city" type="text" name="estimate_city" value="<?php echo $this->escapeHtml($this->getEstimateCity()) ?>" /> - </div> - </div> - <?php endif; ?> - <div class="field postcode<?php if ($this->isZipCodeRequired()) echo ' required' ?>"> - <label for="postcode" class="label"><span><?php echo __('Zip/Postal Code') ?></span></label> - <div class="control"> - <input class="input-text validate-postcode<?php if ($this->isZipCodeRequired()):?> required-entry<?php endif;?>" type="text" id="postcode" name="estimate_postcode" value="<?php echo $this->escapeHtml($this->getEstimatePostcode()) ?>" /> - </div> - </div> - <div class="actions"> - <button type="submit" class="action quote"><span><?php echo __('Get a Quote') ?></span></button> - </div> - </fieldset> - </form> - <script type="text/javascript"> - (function($) { - head.js( - "<?php echo $this->getViewFileUrl('jquery/jquery.validate.js') ?>", - "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js') ?>", - "<?php echo $this->getViewFileUrl('mage/validation.js')?>", - "<?php echo $this->getViewFileUrl('mage/validation/validation.js') ?>", - "<?php echo $this->getViewFileUrl('Magento_Checkout::js/region-updater.js') ?>", - function() { - $('#country').regionUpdater({ - optionalRegionAllowed: <?php echo ($this->getConfig('general/region/display_all')? 'true' : 'false'); ?>, - regionListId: '#region_id', - regionInputId: '#region', - postcodeId: '#postcode', - form: $('#shipping-zip-form').validation(), - regionJson: <?php echo $this->helper('Magento\Directory\Helper\Data')->getRegionJson() ?>, - defaultRegion: "<?php echo $this->getEstimateRegionId() ?>", - countriesWithOptionalZip: <?php echo $this->helper('Magento\Directory\Helper\Data')->getCountriesWithOptionalZip(true) ?> - }); - }); - })(jQuery); - </script> - <?php if (($_shippingRateGroups = $this->getEstimateRates())): ?> - <form id="co-shipping-method-form" action="<?php echo $this->getUrl('checkout/cart/estimateUpdatePost') ?>"> - <fieldset class="fieldset rates"> - <dl class="items methods"> - <?php foreach ($_shippingRateGroups as $code => $_rates): ?> - <dt class="item title"><span><?php echo $this->escapeHtml($this->getCarrierName($code)) ?></span></dt> - <dd class="item options"> - <?php foreach ($_rates as $_rate): ?> - <div class="field choice item<?php if ($_rate->getErrorMessage()) echo ' error-msg';?>"> - <?php if ($_rate->getErrorMessage()): ?> - <?php echo $this->escapeHtml($_rate->getErrorMessage()) ?> - <?php else: ?> - <input name="estimate_method" type="radio" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?>"<?php if($_rate->getCode()===$this->getAddressShippingMethod()) echo ' checked="checked"' ?> class="radio" /> - <label class="label" for="s_method_<?php echo $_rate->getCode() ?>"> - <span><?php echo $this->escapeHtml($_rate->getMethodTitle()) ?></span> - <?php $_excl = $this->getShippingPrice($_rate->getPrice(), $this->helper('Magento\Tax\Helper\Data')->displayShippingPriceIncludingTax()); ?> - <?php $_incl = $this->getShippingPrice($_rate->getPrice(), true); ?> - <?php echo $_excl; ?> - <?php if ($this->helper('Magento\Tax\Helper\Data')->displayShippingBothPrices() && $_incl != $_excl): ?> - (<?php echo __('Incl. Tax'); ?> <?php echo $_incl; ?>) - <?php endif; ?> - </label> - <?php endif ?> - </div> - <?php endforeach; ?> - </dd> - <?php endforeach; ?> - </dl> - <div class="actions"> - <button type="submit" class="action update" name="do" value="<?php echo __('Update Total') ?>"><span><?php echo __('Update Total') ?></span></button> - </div> - </fieldset> - </form> - <?php endif; ?> - </div> -</div> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/cart/sidebar/default.phtml b/app/design/frontend/magento_plushe/Magento_Checkout/cart/sidebar/default.phtml deleted file mode 100644 index 32a7bb3c4aa59a9e34098da88ded5af0c53d9269..0000000000000000000000000000000000000000 --- a/app/design/frontend/magento_plushe/Magento_Checkout/cart/sidebar/default.phtml +++ /dev/null @@ -1,352 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @category design - * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ -?> -<?php $_item = $this->getItem() ?> -<?php $canApplyMsrp = $this->helper('Magento\Catalog\Helper\Data')->canApplyMsrp($_item->getProduct(), \Magento\Catalog\Model\Product\Attribute\Source\Msrp\Type::TYPE_BEFORE_ORDER_CONFIRM); ?> -<?php $imageBlock = $this->getLayout()->createBlock('Magento\Catalog\Block\Product\Image')?> -<li class="item product"> - <div class="product"> - <?php if ($this->hasProductUrl()): ?> - <a href="<?php echo $this->getProductUrl()?>" title="<?php echo $this->escapeHtml($this->getProductName()) ?>" class="product photo"> - <?php echo $imageBlock->init($_item->getProduct(), 'mini_cart_product_thumbnail')->toHtml() ?> - </a> - <?php else: ?> - <span class="product photo"> - <?php echo $imageBlock->init($_item->getProduct(), 'mini_cart_product_thumbnail')->toHtml() ?> - </span> - <?php endif; ?> - - <div class="product details"> - <strong class="product name"> - <?php if ($this->hasProductUrl()): ?> - <a href="<?php echo $this->getProductUrl() ?>"><?php echo $this->escapeHtml($this->getProductName()) ?></a> - <?php else: ?> - <?php echo $this->escapeHtml($this->getProductName()) ?> - <?php endif; ?> - </strong> - - - <?php if ($_options = $this->getOptionList()):?> - <div class="product options wrapper"> - <span class="more"><?php echo __('View Details') ?></span> - - <div class="product options details"> - <strong class="title"><?php echo __('Options Details'); ?></strong> - <dl class="product options list"> - <?php foreach ($_options as $_option) : ?> - <dt><?php echo $this->escapeHtml($_option['label']) ?></dt> - <dd> - <?php if (is_array($_option['value'])): ?> - <?php echo nl2br(implode("\n", $_option['value'])) ?> - <?php else: ?> - <?php echo $_option['value'] ?> - <?php endif; ?> - </dd> - <?php endforeach; ?> - </dl> - </div> - </div> - <?php endif; ?> - - <?php if ($_item->getProduct()->isVisibleInSiteVisibility()):?> - <a href="<?php echo $this->getConfigureUrl() ?>" title="<?php echo __('Edit item') ?>" class="action edit"><span><?php echo __('Edit')?></span></a> - <?php endif ?> - - -<?php // Prices ?> - -<div class="pricing details<?php echo $this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices() ? ' complex' : ''; ?>"> - - - <?php if ($canApplyMsrp): ?> - - <div class="rate map"> - <span class="label"><?php echo __('Price'); ?></span> - <span class="value"><?php echo __('See price before order confirmation.'); ?></span> - </div> - - <?php else: ?> - - <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartPriceExclTax() || $this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> - <div class="rate"> - <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> - <span class="label excl tax"><?php echo __('Excl. Tax'); ?></span> - <?php else: ?> - <span class="label display"><?php echo __('Price'); ?></span> - <?php endif; ?> - <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, array(0, 1, 4), 'sales')): ?> - <span class="value excl tax"> - <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?> - </span> - <?php else: ?> - <span class="value display"> - <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_item->getCalculationPrice()) ?> - </span> - <?php endif; ?> - </div> - - <?php if ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item)): ?> - <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 1, 'sales')): ?> - - <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - <div class="rate weee"> - <span class="label weee"><?php echo $tax['title']; ?></span> - <span class="value weee"><?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount'],true,true); ?></span> - </div> - <?php endforeach; ?> - - <?php elseif ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 2, 'sales')): ?> - <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - <div class="rate weee"> - <span class="label weee"><?php echo $tax['title']; ?></span> - <span class="value weee"><?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount_incl_tax'],true,true); ?></span> - </div> - <?php endforeach; ?> - <?php elseif ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 4, 'sales')): ?> - - <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - <div class="rate weee"> - <span class="label weee"><?php echo $tax['title']; ?></span> - <span class="value weee"><?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount_incl_tax'],true,true); ?></span> - </div> - <?php endforeach; ?> - - <?php endif; ?> - <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 2, 'sales')): ?> - <div class="rate weee total"> - <span class="label weee"><?php echo __('Total:'); ?></span> - <span class="value weee"><?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?></span> - </div> - <?php endif; ?> - <?php endif; ?> - <?php endif; ?> - - - - <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartPriceInclTax() || $this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> - <?php $_incl = $this->helper('Magento\Checkout\Helper\Data')->getPriceInclTax($_item); ?> - <div class="rate"> - <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> - <span class="label tax incl"><?php echo __('Incl. Tax'); ?></span> - <?php else: ?> - <span class="label display"><?php echo __('Price'); ?></span> - <?php endif; ?> - <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, array(0, 1, 4), 'sales')): ?> - <span class="value tax incl"><?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?></span> - <?php else: ?> - <span class="value display"><?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_incl-$_item->getWeeeTaxDisposition()) ?></span> - <?php endif; ?> - </div> - <?php if ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item)): ?> - - <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 1, 'sales')): ?> - <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - <div class="rate weee"> - <span class="label weee"><?php echo $tax['title']; ?></span> - <span class="value weee"><?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount'],true,true); ?></span> - </div> - <?php endforeach; ?> - <?php elseif ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 2, 'sales')): ?> - <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - <div class="rate weee"> - <span class="label weee"><?php echo $tax['title']; ?></span> - <span class="value weee"><?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount_incl_tax'],true,true); ?></span> - </div> - <?php endforeach; ?> - <?php elseif ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 4, 'sales')): ?> - <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - <div class="rate weee"> - <span class="label weee"><?php echo $tax['title']; ?></span> - <span class="value weee"><?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount_incl_tax'],true,true); ?></span> - </div> - <?php endforeach; ?> - <?php endif; ?> - <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 2, 'sales')): ?> - <div class="rate weee total"> - <span class="label weee tax incl"><?php echo __('Total incl. tax'); ?></span> - <span class="value weee"><?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?></span> - </div> - <?php endif; ?> - <?php endif; ?> - <?php endif; ?> - - <?php endif; //Can apply MSRP ?> - - <div class="details qty"> - <span class="label"><?php echo __('Qty'); ?></span> - <span class="value qty"><?php echo $this->getQty() ?></span> - </div> - -</div> - - - - - - <div class="product actions"> - <a href="<?php echo $this->getDeleteUrl() ?>" title="<?php echo __('Remove item') ?>" class="action delete"> - <span><?php echo __('Remove')?></span> - </a> - </div> - </div> - - - - - - -<?php /* - - - - - - - - <table cellpadding="0"> - - <?php if ($canApplyMsrp): ?> - - <tr><th><?php echo __('Price'); ?></th><td><span class="map-cart-sidebar-item"><?php echo __('See price before order confirmation.'); ?></span></td></tr> - - <?php else: ?> - - <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartPriceExclTax() || $this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> - <tr> - <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> - <th><?php echo __('Excl. Tax'); ?></th> - <?php else: ?> - <th><?php echo __('Price'); ?></th> - <?php endif; ?> - <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, array(0, 1, 4), 'sales')): ?> - <td><?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?></td> - <?php else: ?> - <td><?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_item->getCalculationPrice()) ?></td> - <?php endif; ?> - </tr> - - <?php if ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item)): ?> - <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 1, 'sales')): ?> - - <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - <tr> - <th><small><?php echo $tax['title']; ?>:</small></th> - <td><small><?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount'],true,true); ?></small></td> - </tr> - <?php endforeach; ?> - - <?php elseif ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 2, 'sales')): ?> - <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - <tr> - <th><small><?php echo $tax['title']; ?></small></th> - <td><small><?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount_incl_tax'],true,true); ?></small></td> - </tr> - <?php endforeach; ?> - <?php elseif ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 4, 'sales')): ?> - - <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - <tr> - <th><small><?php echo $tax['title']; ?></small></th> - <td><small><?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount_incl_tax'],true,true); ?></small></td> - </tr> - <?php endforeach; ?> - - <?php endif; ?> - <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 2, 'sales')): ?> - <tr> - <th><small><?php echo __('Total:'); ?></small></th> - <td><small><?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?></small></td> - </tr> - <?php endif; ?> - <?php endif; ?> - <?php endif; ?> - - - - <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartPriceInclTax() || $this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> - <?php $_incl = $this->helper('Magento\Checkout\Helper\Data')->getPriceInclTax($_item); ?> - <tr> - <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> - <th><?php echo __('Incl. Tax'); ?></th> - <?php else: ?> - <th><?php echo __('Price'); ?></th> - <?php endif; ?> - <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, array(0, 1, 4), 'sales')): ?> - <td><?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?></td> - <?php else: ?> - <td><?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_incl-$_item->getWeeeTaxDisposition()) ?></td> - <?php endif; ?> - </tr> - <?php if ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item)): ?> - - <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 1, 'sales')): ?> - <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - <tr> - <th><small><?php echo $tax['title']; ?></small></th> - <td><small><?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount'],true,true); ?></small></td> - </tr> - <?php endforeach; ?> - <?php elseif ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 2, 'sales')): ?> - <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - <tr> - <th><small><?php echo $tax['title']; ?></small></th> - <td><small><?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount_incl_tax'],true,true); ?></small></td> - </tr> - <?php endforeach; ?> - <?php elseif ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 4, 'sales')): ?> - <?php foreach ($this->helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - <tr> - <th><small><?php echo $tax['title']; ?></small></th> - <td><small><?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($tax['amount_incl_tax'],true,true); ?></small></td> - </tr> - <?php endforeach; ?> - <?php endif; ?> - <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_item, 2, 'sales')): ?> - <tr> - <th><small><?php echo __('Total incl. tax'); ?></small></th> - <td><small><?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?></small></td> - </tr> - <?php endif; ?> - <?php endif; ?> - <?php endif; ?> - - <?php endif; //Can apply MSRP ?> - <tr> - <th><?php echo __('Qty'); ?></th> - <td><?php echo $this->getQty() ?></td> - </tr> - </table> - - <?php if ($_item->getProduct()->isVisibleInSiteVisibility()):?> - <a href="<?php echo $this->getConfigureUrl() ?>" title="<?php echo __('Edit item') ?>" class="btn-edit"><?php echo __('Edit item')?></a> - | - <?php endif ?> - <a href="<?php echo $this->getDeleteUrl() ?>" title="<?php echo __('Remove item') ?>" class="btn-remove"><?php echo __('Remove item')?></a> - </div> - </div> - */ ?> - - </div> -</li> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/layout/checkout_cart_index.xml b/app/design/frontend/magento_plushe/Magento_Checkout/layout/checkout_cart_index.xml index 981ab1723548775e3b86c865e1050517d4078fdb..61b761c8e9f60aca1e7532b2a4f80d7f277ab30b 100644 --- a/app/design/frontend/magento_plushe/Magento_Checkout/layout/checkout_cart_index.xml +++ b/app/design/frontend/magento_plushe/Magento_Checkout/layout/checkout_cart_index.xml @@ -28,7 +28,7 @@ <referenceContainer name="checkout.cart.items"> <container name="checkout.cart.container" label="invisible" htmlTag="div" htmlClass="cart container" before="-"> <container name="cart.summary" label="Cart Summary Container" htmlTag="div" htmlClass="cart summary" after="-"> - <block class="Magento\Core\Block\Template" name="checkout.cart.summary.title" before="-" template="Magento_Core::text.phtml"> + <block class="Magento\View\Block\Template" name="checkout.cart.summary.title" before="-" template="Magento_Core::text.phtml"> <arguments> <argument translate="true" name="text" xsi:type="string">Summary</argument> <argument name="tag" xsi:type="string">strong</argument> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/layout/checkout_onepage_paymentmethod.xml b/app/design/frontend/magento_plushe/Magento_Checkout/layout/checkout_onepage_paymentmethod.xml deleted file mode 100644 index 9cd39e379f56bd11d369d1f9efdc5a5d1adb3750..0000000000000000000000000000000000000000 --- a/app/design/frontend/magento_plushe/Magento_Checkout/layout/checkout_onepage_paymentmethod.xml +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <referenceBlock name="payment_method"> - <block class="Magento\Core\Block\Template" name="checkout.onepage.payment.methods.scripts" as="scripts"/> - <block class="Magento\Core\Block\Template" name="checkout.onepage.payment.methods.additional" as="additional"/> - </referenceBlock> -</layout> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/layout/override/base/checkout_cart_index.xml b/app/design/frontend/magento_plushe/Magento_Checkout/layout/override/base/checkout_cart_index.xml deleted file mode 100644 index 36db150feda85c8734bada17ca0e9407a4ab9e62..0000000000000000000000000000000000000000 --- a/app/design/frontend/magento_plushe/Magento_Checkout/layout/override/base/checkout_cart_index.xml +++ /dev/null @@ -1,59 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <referenceContainer name="content"> - <block class="Magento\Checkout\Block\Cart" name="checkout.cart" template="cart.phtml"> - <container name="checkout.cart.items" label="invisible" as="with-items"> - <block class="Magento\Checkout\Block\Cart" name="checkout.cart.form" as="cart-items" template="cart/form.phtml"> - <block class="Magento\Checkout\Block\Cart\Item\Renderer" as="simple" template="cart/item/default.phtml"/> - <block class="Magento\Checkout\Block\Cart\Item\Renderer\Grouped" as="grouped" template="cart/item/default.phtml"/> - <block class="Magento\Checkout\Block\Cart\Item\Renderer\Configurable" as="configurable" template="cart/item/default.phtml"/> - <container name="checkout.cart.form.before" as="form_before" label="Shopping Cart Items Before" htmlTag="div" htmlClass="rewards"/> - <container name="checkout.cart.widget" as="checkout_cart_widget" label="Shopping Cart Items After"/> - </block> - <block class="Magento\Checkout\Block\Cart\Shipping" name="checkout.cart.shipping" as="shipping" after="checkout.cart.summary.title" template="cart/shipping.phtml"/> - <block class="Magento\Checkout\Block\Cart\Coupon" name="checkout.cart.coupon" as="coupon" after="checkout.cart.shipping" template="cart/coupon.phtml"/> - <block class="Magento\Checkout\Block\Cart\Totals" name="checkout.cart.totals" as="totals" template="cart/totals.phtml"/> - <block class="Magento\Checkout\Block\Cart" name="checkout.cart.methods.bottom" template="cart/methods.phtml"> - <container name="checkout.cart.methods" as="methods" label="Payment Methods After Checkout Button"> - <block class="Magento\Checkout\Block\Onepage\Link" name="checkout.cart.methods.onepage.bottom" template="onepage/link.phtml"/> - <block class="Magento\Checkout\Block\Multishipping\Link" name="checkout.cart.methods.multishipping" template="multishipping/link.phtml"/> - </container> - </block> - <block class="Magento\Checkout\Block\Cart\Crosssell" name="checkout.cart.crosssell" template="Magento_Catalog::product/list/items.phtml" after="-"> - <arguments> - <argument name="type" xsi:type="string">crosssell</argument> - </arguments> - </block> - </container> - <container name="checkout.cart.noitems" label="invisible" as="no-items"> - <block class="Magento\Checkout\Block\Cart" name="checkout.cart.empty" before="-" template="cart/noItems.phtml"/> - <container name="checkout.cart.empty.widget" as="checkout_cart_empty_widget" label="Empty Shopping Cart Content Before"/> - </container> - </block> - </referenceContainer> - <!-- <container name="additional.product.info" label="Additional Product Info"/> --> -</layout> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/multishipping/addresses.phtml b/app/design/frontend/magento_plushe/Magento_Checkout/multishipping/addresses.phtml deleted file mode 100644 index 61e84340c672e00529ca747688c46c3b6e250151..0000000000000000000000000000000000000000 --- a/app/design/frontend/magento_plushe/Magento_Checkout/multishipping/addresses.phtml +++ /dev/null @@ -1,96 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @category design - * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ -?> -<?php -/** - * Ship to multiple address template - * - * @see \Magento\Checkout\Block\Multishipping\Addresses - */ -?> -<form id="checkout_multishipping_form" action="<?php echo $this->getPostActionUrl() ?>" method="post" class="multicheckout address form"> - <div class="title"> - <strong><?php echo __('Please select a shipping address for applicable items.') ?></strong> - <button type="button" title="<?php echo __('Enter a New Address') ?>" class="action add" data-role="add-new-address"><span><?php echo __('Enter a New Address') ?></span></button> - </div> - <input type="hidden" name="continue" value="0" id="can_continue_flag"/> - <input type="hidden" name="new_address" value="0" id="add_new_address_flag"/> - <table class="items data" id="multiship-addresses-table"> - <thead> - <tr> - <th class="col product"><?php echo __('Product') ?></th> - <th class="col qty"><?php echo __('Qty') ?></th> - <th class="col address"><?php echo __('Send To') ?></th> - <th class="col delete"> </th> - </tr> - </thead> - <tbody> - <?php foreach ($this->getItems() as $_index => $_item): ?> - <?php if ($_item->getQuoteItem()) : ?> - <tr> - <td class="col product"><?php echo $this->getItemHtml($_item->getQuoteItem()) ?></td> - <td class="col qty"> - <div class="control qty"> - <input type="text" name="ship[<?php echo $_index ?>][<?php echo $_item->getQuoteItemId() ?>][qty]" value="<?php echo $this->escapeHtml($_item->getQty()) ?>" size="2" class="input-text qty" data-validate="{number: true}"/> - </div> - </td> - <td class="col address"> - <?php if ($_item->getProduct()->getIsVirtual()): ?> - <div class="applicable"><?php echo __('Shipping selection is not applicable.'); ?></div> - <?php else: ?> - <div class="control address"> - <?php echo $this->getAddressesHtmlSelect($_item, $_index); ?> - </div> - <?php endif; ?> - </td> - <td class="col delete"> - <a href="<?php echo $this->getItemDeleteUrl($_item) ?>" title="<?php echo __('Remove Item') ?>" class="action delete"> - <span><?php echo __('Remove item') ?></span> - </a> - </td> - </tr> - <?php endif; ?> - <?php endforeach; ?> - </tbody> - </table> - <div class="actions"> - <a href="<?php echo $this->getBackUrl() ?>" class="action back"><span><?php echo __('Back to Shopping Cart') ?></span></a> - <button type="submit" class="action update" data-role="can-continue" data-flag="0"><span><?php echo __('Update Qty & Addresses') ?></span></button> - <button type="submit" title="<?php echo __('Continue to Shipping Information') ?>" class="action continue<?php if ($this->isContinueDisabled()):?> disabled<?php endif; ?>" data-role="can-continue" data-flag="1"<?php if ($this->isContinueDisabled()):?> disabled="disabled"<?php endif; ?>><span><?php echo __('Continue to Shipping Information') ?></span></button> - </div> -</form> - -<script type="text/javascript"> - head.js( - "<?php echo $this->getViewFileUrl('jquery/jquery.validate.js') ?>", - "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js') ?>", - "<?php echo $this->getViewFileUrl('mage/validation.js')?>", - "<?php echo $this->getViewFileUrl('mage/validation/validation.js') ?>", - "<?php echo $this->getViewFileUrl('Magento_Checkout::js/multi-shipping.js') ?>", - function () { - jQuery('#checkout_multishipping_form').multiShipping().validation(); - } - ); -</script> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/multishipping/billing.phtml b/app/design/frontend/magento_plushe/Magento_Checkout/multishipping/billing.phtml deleted file mode 100644 index e9e312eb177c750f327a7a76c09aeea6f6b2618a..0000000000000000000000000000000000000000 --- a/app/design/frontend/magento_plushe/Magento_Checkout/multishipping/billing.phtml +++ /dev/null @@ -1,98 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @category design - * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ -?> -<?php -/** - * Multishipping checkout billing information - * - * @see \Magento\Checkout\Block\Multishipping\Billing - */ -?> -<form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="multishipping-billing-form" class="form multicheckout billing"> - <div class="block billing"> - <div class="box address"> - <strong class="subtitle"> - <span><?php echo __('Billing Address') ?></span> - <a href="<?php echo $this->getSelectAddressUrl() ?>" class="action"><span><?php echo __('Change') ?></span></a> - </strong> - <?php $_address = $this->getAddress() ?> - <address><?php echo $_address->format('html') ?></address> - </div> - <div class="box method"> - <strong class="subtitle"><span><?php echo __('Payment Method') ?></span></strong> - <?php echo $this->getChildHtml('payment_methods_before') ?> - <?php /* Payment methods forms list */ ?> - <dl class="sp-methods" id="payment-methods"> - <?php - $_methods = $this->getMethods(); - $_methodsCount = count($_methods); - ?> - <?php foreach ($_methods as $_method): $_code = $_method->getCode() ?> - <dt> - <?php if ($_methodsCount > 1): ?> - <input type="radio" id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" name="payment[method]" title="<?php echo $this->escapeHtml($_method->getTitle()) ?>" <?php if ($this->getSelectedMethodCode() == $_code): ?> checked="checked"<?php endif; ?> class="radio"/> - <?php else : ?> - <input type="radio" id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" name="payment[method]" checked="checked" class="radio solo method"/> - <?php endif; ?> - <label for="p_method_<?php echo $_code ?>"><?php echo $this->escapeHtml($_method->getTitle()) ?></label> - </dt> - <?php if ($html = $this->getChildHtml('payment.method.' . $_code)) : ?> - <dd> - <?php echo $html; ?> - </dd> - <?php endif; ?> - <?php endforeach; ?> - </dl> - <?php echo $this->getChildHtml('payment_methods_after') ?> - <?php echo $this->getChildHtml('checkout_billing_items') ?> - </div> - </div> - <div class="actions"> - <a href="<?php echo $this->getBackUrl() ?>" class="action back"><span><?php echo __('Back to Shipping Information') ?></span></a> - <button id="payment-continue" type="submit" class="action continue"><span><?php echo __('Continue to Review Your Order') ?></span></button> - </div> -</form> -<script type="text/javascript"> - head.js( - "<?php echo $this->getViewFileUrl('jquery/jquery.validate.js')?>", - "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js')?>", - "<?php echo $this->getViewFileUrl('mage/validation.js')?>", - "<?php echo $this->getViewFileUrl('mage/validation/validation.js')?>", - "<?php echo $this->getViewFileUrl('Magento_Checkout::js/payment.js') ?>", - function() { - jQuery('#multishipping-billing-form').payment({ - checkoutPrice: <?php echo (float)$this->getQuoteBaseGrandTotal(); ?> - }).validation({ - errorPlacement: function(error, element) { - if (element.attr('data-validate') && element.attr('data-validate').indexOf('validate-cc-ukss') >= 0) { - element.parents('form').find('[data-validation-msg="validate-cc-ukss"]').html(error); - } else { - element.after(error); - } - } - }); - }); -</script> - diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/multishipping/billing/items.phtml b/app/design/frontend/magento_plushe/Magento_Checkout/multishipping/billing/items.phtml deleted file mode 100644 index 25a6d9d17e64e11322938fe02418e8037112bcc5..0000000000000000000000000000000000000000 --- a/app/design/frontend/magento_plushe/Magento_Checkout/multishipping/billing/items.phtml +++ /dev/null @@ -1,52 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @category design - * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ -?> -<?php if ($this->getQuote()->hasVirtualItems()): ?> -<div class="block other"> - <div class="title"><strong><?php echo __('Other items in your order') ?></strong></div> - <div class="content"> - <strong class="subtitle"> - <span><?php echo __('Items') ?></span> - <a href="<?php echo $this->getVirtualProductEditUrl() ?>" class="action edit"><span><?php echo __('Edit Items') ?></></a> - </strong> - <table class="items data" id="unavailable-shipping-table"> - <thead> - <tr> - <th class="col item"><?php echo __('Product Name') ?></th> - <th class="col qty"><?php echo __('Qty') ?></th> - </tr> - </thead> - <tbody> - <?php foreach ($this->getVirtualQuoteItems() as $_item): ?> - <tr> - <td class="col item"><?php echo $this->getItemHtml($_item) ?></td> - <td class="col qty"><?php echo $_item->getQty() ?></td> - </tr> - <?php endforeach; ?> - </tbody> - </table> - </div> -</div> -<?php endif; ?> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/multishipping/item/default.phtml b/app/design/frontend/magento_plushe/Magento_Checkout/multishipping/item/default.phtml deleted file mode 100644 index 3b4ffb1fea8db24bace4937af3b892b16a34c290..0000000000000000000000000000000000000000 --- a/app/design/frontend/magento_plushe/Magento_Checkout/multishipping/item/default.phtml +++ /dev/null @@ -1,47 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @category design - * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ -?> -<div class="product details"> - <strong class="product name"><a href="<?php echo $this->getProductUrl() ?>"><?php echo $this->escapeHtml($this->getProductName()) ?></a></strong> - <?php if ($_options = $this->getOptionList()): ?> - <dl class="item options"> - <?php foreach ($_options as $_option) : ?> - <?php $_formatedOptionValue = $this->getFormatedOptionValue($_option) ?> - <dt><?php echo $this->escapeHtml($_option['label']) ?></dt> - <dd<?php if (isset($_formatedOptionValue['full_view'])): ?> class="truncated" data-mage-init="{truncateOptions:[]}"<?php endif; ?>><?php echo $_formatedOptionValue['value'] ?> - <?php if (isset($_formatedOptionValue['full_view'])): ?> - <dl class="item options"> - <dt><?php echo $this->escapeHtml($_option['label']) ?></dt> - <dd><?php echo $_formatedOptionValue['full_view'] ?></dd> - </dl> - <?php endif; ?> - </dd> - <?php endforeach; ?> - </dl> - <?php endif; ?> - <?php if ($addtInfoBlock = $this->getProductAdditionalInformationBlock()): ?> - <?php echo $addtInfoBlock->setItem($this->getItem())->toHtml() ?> - <?php endif; ?> -</div> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/multishipping/overview.phtml b/app/design/frontend/magento_plushe/Magento_Checkout/multishipping/overview.phtml deleted file mode 100644 index 781504d434a7ea7c0e4bdbefde485f0540b07964..0000000000000000000000000000000000000000 --- a/app/design/frontend/magento_plushe/Magento_Checkout/multishipping/overview.phtml +++ /dev/null @@ -1,186 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @category design - * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ -?> -<?php /** @var $this \Magento\Checkout\Block\Multishipping\Overview */ ?> -<form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="review-order-form" class="form multicheckout overview"> - <div class="block billing"> - <div class="title"><strong><?php echo __('Billing Information') ?></strong></div> - <div class="box address"> - <?php $_address=$this->getBillingAddress() ?> - <strong class="subtitle"> - <span><?php echo __('Billing Address') ?></span> - <a href="<?php echo $this->getEditBillingAddressUrl($_address) ?>" class="action edit"><span><?php echo __('Change') ?></span></a> - </strong> - <address> - <?php echo $_address->format('html') ?> - </address> - </div> - <div class="box method"> - <strong class="subtitle"> - <span><?php echo __('Payment Method') ?></span> - <a href="<?php echo $this->getEditBillingUrl() ?>" class="action edit"><span><?php echo __('Change') ?></span></a> - </strong> - <div class="content"> - <input type="hidden" name="payment[cc_number]" value="<?php echo $this->escapeHtml($this->getPayment()->getCcNumber())?>" /> - <input type="hidden" name="payment[cc_cid]" value="<?php echo $this->escapeHtml($this->getPayment()->getCcCid())?>" /> - <?php echo $this->getPaymentHtml() ?> - </div> - </div> - </div> - <div class="block shipping"> - <div class="title"><strong><?php echo __('Shipping Information') ?></strong></div> - <?php $mergedCells = ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices() ? 2 : 1); ?> - <?php foreach ($this->getShippingAddresses() as $_index => $_address): ?> - <div class="content"> - <div class="title"> - <strong><?php echo __('Address %1 of %2', ($_index+1), $this->getShippingAddressCount()) ?></strong> - </div> - <div class="box address"> - <strong class="subtitle"> - <span><?php echo __('Shipping To') ?></span> - <a href="<?php echo $this->getEditShippingAddressUrl($_address) ?>" class="action edit"><span><?php echo __('Change') ?></span></a> - </strong> - <address> - <?php echo $_address->format('html') ?> - </address> - </div> - <div class="box method"> - <strong class="subtitle"> - <span><?php echo __('Shipping Method') ?></span> - <a href="<?php echo $this->getEditShippingUrl() ?>" class="action edit"><span><?php echo __('Change') ?></span></a> - </strong> - <?php if($_rate=$this->getShippingAddressRate($_address)): ?> - <p> - <?php echo $this->escapeHtml($_rate->getCarrierTitle()) ?> (<?php echo $this->escapeHtml($_rate->getMethodTitle()) ?>) - <?php $_excl = $this->getShippingPriceExclTax($_address); ?> - <?php $_incl = $this->getShippingPriceInclTax($_address); ?> - - <?php echo $_excl; ?> - <?php if ($this->helper('Magento\Tax\Helper\Data')->displayShippingBothPrices() && $_incl != $_excl): ?> - (<?php echo __('Incl. Tax'); ?> <?php echo $_incl; ?>) - <?php endif; ?> - </p> - <?php endif; ?> - </div> - <div class="box items"> - <strong class="subtitle"> - <span><?php echo __('Items') ?></span> - <a href="<?php echo $this->getAddressesEditUrl() ?>" class="action edit"><span><?php echo __('Edit Items') ?></span></a> - </strong> - <table class="items data" id="overview-table-<?php echo $_address->getId() ?>"> - <thead> - <tr> - <th rowspan="<?php echo $mergedCells; ?>" class="col item"><?php echo __('Product Name') ?></th> - <th colspan="<?php echo $mergedCells; ?>" class="col price"><?php echo __('Price') ?></th> - <th rowspan="<?php echo $mergedCells; ?>" class="col qty"><?php echo __('Qty') ?></th> - <th colspan="<?php echo $mergedCells; ?>" class="col subtotal"><?php echo __('Subtotal') ?></th> - </tr> - <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> - <tr> - <th class="col price excl tax"><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(false) ?></th> - <th class="col price incl tax"><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(true) ?></th> - <th class="col subtotal excl tax"><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(false) ?></th> - <th class="col subtotal incl tax"><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(true) ?></th> - </tr> - <?php endif; ?> - </thead> - <tfoot> - <?php echo $this->renderTotals($this->getShippingAddressTotals($_address)); ?> - </tfoot> - <tbody> - <?php foreach ($this->getShippingAddressItems($_address) as $_item): ?> - <?php echo $this->getRowItemHtml($_item); ?> - <?php endforeach; ?> - </tbody> - </table> - </div> - <script type="text/javascript">jQuery('#overview-table-<?php echo $_address->getId() ?>').decorate('table')</script> - </div> - <?php if($this->getShippingAddressCount()!=$_index+1): ?> - <?php endif; ?> - <?php endforeach; ?> - </div> - - <?php if ($this->getQuote()->hasVirtualItems()): ?> - <div class="block other"> - <div class="title"><strong><?php echo __('Other items in your order') ?></strong></div> - <div class="content"> - <strong class="subtitle"> - <span><?php echo __('Items') ?></span> - <a href="<?php echo $this->getVirtualProductEditUrl() ?>" class="action edit"><span><?php echo __('Edit Items') ?></span></a> - </strong> - <?php $mergedCells = ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices() ? 2 : 1); ?> - <table class="items data" id="virtual-overview-table"> - <thead> - <tr> - <th rowspan="<?php echo $mergedCells; ?>" class="col item"><?php echo __('Product Name') ?></th> - <th colspan="<?php echo $mergedCells; ?>" class="col price"><?php echo __('Price') ?></th> - <th rowspan="<?php echo $mergedCells; ?>" class="col qty"><?php echo __('Qty') ?></th> - <th colspan="<?php echo $mergedCells; ?>" class="col subtotal"><?php echo __('Subtotal') ?></th> - </tr> - <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> - <tr> - <th class="col price excl tax"><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(false) ?></th> - <th class="col price incl tax"><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(true) ?></th> - <th class="col subtotal excl tax"><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(false) ?></th> - <th class="col subtotal incl tax"><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(true) ?></th> - </tr> - <?php endif; ?> - </thead> - <tfoot> - <?php echo $this->renderTotals($this->getBillinAddressTotals()); ?> - </tfoot> - <tbody> - <?php foreach ($this->getVirtualItems() as $_item): ?> - <?php echo $this->getRowItemHtml($_item); ?> - <?php endforeach; ?> - </tbody> - </table> - </div> - </div> - <?php endif; ?> - - <?php echo $this->getChildHtml('items_after'); ?> - - <div id="checkout-review-submit" class="checkout review"> - <?php echo $this->getChildHtml('agreements') ?> - <div class="grand total"> - <strong class="label"><?php echo __('Grand Total:') ?></strong> - <?php echo $this->helper('Magento\Checkout\Helper\Data')->formatPrice($this->getTotal()) ?> - </div> - <div class="actions" id="review-buttons-container"> - <a href="<?php echo $this->getBackUrl() ?>" class="action back"><span><?php echo __('Back to Billing Information') ?></span></a> - <button type="submit" class="action submit" id="review-button"><span><?php echo __('Place Order') ?></span></button> - <span id="review-please-wait" class="please-wait load indicator" style="display:none;"> - <span><?php echo __('Submitting order information...') ?></span> - </span> - </div> - </div> -</form> -<script type="text/javascript"> - head.js("<?php echo $this->getViewFileUrl('Magento_Checkout::js/overview.js')?>", function() { - jQuery('#review-order-form').orderOverview(); - }); -</script> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/multishipping/shipping.phtml b/app/design/frontend/magento_plushe/Magento_Checkout/multishipping/shipping.phtml deleted file mode 100644 index 9725a84bc7020b4e649d867459171aa1e6ede1fe..0000000000000000000000000000000000000000 --- a/app/design/frontend/magento_plushe/Magento_Checkout/multishipping/shipping.phtml +++ /dev/null @@ -1,118 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @category design - * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ -?> -<?php -/** - * Multishipping checkout shipping template - * - * @see \Magento\Checkout\Block\Multishipping\Shipping - * @var $this \Magento\Checkout\Block\Multishipping\Shipping - */ -?> -<form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="shipping_method_form" class="form multicheckout shipping"> - <div class="title"> - <strong><?php echo __('Select Shipping Method') ?></strong> - </div> - <?php foreach ($this->getAddresses() as $_index => $_address): ?> - <div class="block shipping"> - <div class="title"><strong><?php echo __('Address %1 of %2', ($_index+1), $this->getAddressCount()) ?></strong></div> - <div class="content"> - <div class="box address"> - <strong class="subtitle"> - <span><?php echo __('Shipping To') ?></span> - <a href="<?php echo $this->getAddressEditUrl($_address) ?>" class="action edit"><span><?php echo __('Change') ?></span></a> - </strong> - <address><?php echo $_address->format('html') ?></address> - </div> - <div class="box method"> - <strong class="subtitle"> - <span><?php echo __('Shipping Method') ?></span> - </strong> - <?php if (!($_shippingRateGroups = $this->getShippingRates($_address))): ?> - <p><?php echo __('Sorry, no quotes are available for this order at this time.') ?></p> - <?php else: ?> - <dl class="sp-methods items methods"> - <?php $_sole = count($_shippingRateGroups) == 1; foreach ($_shippingRateGroups as $code => $_rates): ?> - <dt class="item title"><?php echo $this->escapeHtml($this->getCarrierName($code)) ?></dt> - <dd class="item options"> - <?php $_sole = $_sole && count($_rates) == 1; foreach ($_rates as $_rate): ?> - <div class="field choice"> - <?php if ($_rate->getErrorMessage()): ?> - <strong><?php echo $this->escapeHtml($_rate->getCarrierTitle()) ?>: <?php echo $this->escapeHtml($_rate->getErrorMessage()) ?></strong> - <?php else: ?> - <?php if ($_sole) : ?> - <input type="radio" name="shipping_method[<?php echo $_address->getId() ?>]" value="<?php echo $this->escapeHtml($_rate->getCode()) ?>" id="s_method_<?php echo $_address->getId() ?>_<?php echo $_rate->getCode() ?>" class="radio solo method" checked="checked"/> - <?php else: ?> - <input type="radio" name="shipping_method[<?php echo $_address->getId() ?>]" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_address->getId() ?>_<?php echo $_rate->getCode() ?>"<?php if($_rate->getCode()===$this->getAddressShippingMethod($_address)) echo ' checked="checked"' ?> class="radio" /> - <?php endif; ?> - <label for="s_method_<?php echo $_address->getId() ?>_<?php echo $_rate->getCode() ?>"><?php echo $this->escapeHtml($_rate->getMethodTitle()) ?> - <?php $_excl = $this->getShippingPrice($_address, $_rate->getPrice(), $this->helper('Magento\Tax\Helper\Data')->displayShippingPriceIncludingTax()); ?> - <?php $_incl = $this->getShippingPrice($_address, $_rate->getPrice(), true); ?> - <?php echo $_excl; ?> - <?php if ($this->helper('Magento\Tax\Helper\Data')->displayShippingBothPrices() && $_incl != $_excl): ?> - (<?php echo __('Incl. Tax'); ?> <?php echo $_incl; ?>) - <?php endif; ?> - </label> - <?php endif ?> - </div> - <?php endforeach; ?> - </dd> - <?php endforeach; ?> - </dl> - <?php endif; ?> - </div> - <div class="box items"> - <?php echo $this->helper('Magento\GiftMessage\Helper\Message')->getInline('multishipping_adress_checkbox', $_address); ?> - <strong class="subtitle"> - <span><?php echo __('Items') ?></span> - <a href="<?php echo $this->getItemsEditUrl($_address) ?>" class="action edit"><span><?php echo __('Edit Items') ?></span></a> - </strong> - <table class="items data" id="shipping-table-<?php echo $_address->getId() ?>"> - <thead> - <tr> - <th class="col item"><?php echo __('Product Name') ?></th> - <th class="col qty"><?php echo __('Qty') ?></th> - </tr> - </thead> - <tbody> - <?php foreach ($this->getAddressItems($_address) as $_item): ?> - <tr> - <td class="col item"><?php echo $this->getItemHtml($_item->getQuoteItem()) ?></td> - <td class="col qty"><?php echo $_item->getQty() ?></td> - </tr> - <?php endforeach; ?> - </tbody> - </table> - <?php echo $this->helper('Magento\GiftMessage\Helper\Message')->getInline('multishipping_address', $_address); ?> - </div> - </div> - </div> - <?php endforeach; ?> - <?php echo $this->getChildHtml('checkout_billing_items') ?> - <div class="actions"> - <a href="<?php echo $this->getBackUrl() ?>" class="action back"><span><?php echo __('Back to Select Addresses') ?></span></a> - <button class="action continue" type="submit"><span><?php echo __('Continue to Billing Information') ?></span></button> - </div> -</form> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/onepage.phtml b/app/design/frontend/magento_plushe/Magento_Checkout/onepage.phtml deleted file mode 100644 index f1b0e3f94869c73c83124a93f3a2f655de7cc685..0000000000000000000000000000000000000000 --- a/app/design/frontend/magento_plushe/Magento_Checkout/onepage.phtml +++ /dev/null @@ -1,95 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @category design - * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ -?> -<?php -$_paymentBlock = $this->getLayout()->getBlock('checkout.onepage.payment'); -$_registerParam = $this->getRequest()->getParam('register'); -?> -<div class="opc wrapper"> - <ol class="opc" id="checkoutSteps"> - <?php $i=0; foreach($this->getSteps() as $_stepId => $_stepInfo): ?> - <?php if (!$this->getChildBlock($_stepId) || !$this->getChildBlock($_stepId)->isShow()): continue; endif; $i++ ?> - <li id="opc-<?php echo $_stepId ?>" class="section<?php echo !empty($_stepInfo['allow'])?' allow':'' ?><?php echo !empty($_stepInfo['complete'])?' saved':'' ?>"> - <div class="step-title"> - <span class="number"><?php echo $i ?></span> - <h2><?php echo $_stepInfo['label'] ?></h2> - <!--<a href="#"><?php echo __('Edit') ?></a>--> - </div> - <div id="checkout-step-<?php echo $_stepId ?>" class="step a-item" style="display:none;"> - <?php echo $this->getChildHtml($_stepId) ?> - </div> - </li> - <?php endforeach ?> - </ol> - <script type="text/javascript"> - (function($) { - head.js( - "<?php echo $this->getViewFileUrl('jquery/jquery.validate.js')?>", - "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js')?>", - "<?php echo $this->getViewFileUrl('mage/validation.js')?>", - "<?php echo $this->getViewFileUrl('mage/validation/validation.js')?>", - "<?php echo $this->getViewFileUrl('Magento_Checkout::js/accordion.js') ?>", - function() { - $('#checkoutSteps') - .accordion({ - activeSelector: '#opc-<?php echo $this->getActiveStep() ?>' - }) - .opcheckout({ - quoteBaseGrandTotal: <?php echo (float)$_paymentBlock->getQuoteBaseGrandTotal() ?>, - progressUrl: '<?php echo $this->getUrl('checkout/onepage/progress') ?>', - reviewUrl: '<?php echo $this->getUrl('checkout/onepage/review') ?>', - failureUrl: '<?php echo $this->getUrl('checkout/cart') ?>', - getAddressUrl: '<?php echo $this->getUrl('checkout/onepage/getAddress') ?>address/', - checkoutAgreements: '#checkout-agreements', - checkoutProgressContainer: '#checkout-progress-wrapper', - checkout: { - suggestRegistration: <?php echo ($_registerParam || $_registerParam === '') ? 'true' : 'false' ?>, - saveUrl: '<?php echo $this->getUrl('checkout/onepage/saveMethod') ?>' - }, - billing: { - saveUrl: '<?php echo $this->getUrl('checkout/onepage/saveBilling') ?>' - }, - shipping: { - saveUrl: '<?php echo $this->getUrl('checkout/onepage/saveShipping') ?>' - }, - shippingMethod: { - saveUrl: "<?php echo $this->getUrl('checkout/onepage/saveShippingMethod') ?>" - }, - payment: { - <?php if ($_paymentBlock->getChildBlock('methods')->getSelectedMethodCode()): ?> - defaultPaymentMethod: "<?php echo $_paymentBlock->getChildBlock('methods')->getSelectedMethodCode() ?>", - <?php endif ?> - saveUrl: '<?php echo $this->getUrl('checkout/onepage/savePayment') ?>' - }, - review: { - saveUrl: '<?php echo $this->getUrl('checkout/onepage/saveOrder') ?>', - successUrl: '<?php echo $this->getUrl('checkout/onepage/success') ?>' - }, - methodDescription : '.items' - }); - }); - })(jQuery); - </script> -</div> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/onepage/billing.phtml b/app/design/frontend/magento_plushe/Magento_Checkout/onepage/billing.phtml deleted file mode 100644 index 5e76f4cd52b38e8f799ae37e3b0dc5ef9ba93620..0000000000000000000000000000000000000000 --- a/app/design/frontend/magento_plushe/Magento_Checkout/onepage/billing.phtml +++ /dev/null @@ -1,212 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @category design - * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ -?> -<form class="form billing" id="co-billing-form" action="" data-hasrequired="<?php echo __('* Required Fields') ?>"> - - <?php if ($this->customerHasAddresses()): ?> - <div class="field addresses"> - <label class="label" for="billing-address-select"><span><?php echo __('Select a billing address from your address book or enter a new address.') ?></span></label> - <div class="control"> - <?php echo $this->getAddressesHtmlSelect('billing') ?> - </div> - </div> - <?php endif; ?> - <fieldset class="fieldset address" id="billing-new-address-form"<?php if ($this->customerHasAddresses()): ?> style="display:none;"<?php endif; ?> - <input type="hidden" name="billing[address_id]" value="<?php echo $this->getAddress()->getId() ?>" id="billing:address_id" /> - - <?php echo $this->getLayout()->createBlock('Magento\Customer\Block\Widget\Name')->setObject($this->getAddress()->getFirstname() ? $this->getAddress() : $this->getQuote()->getCustomer())->setForceUseCustomerRequiredAttributes(!$this->isCustomerLoggedIn())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?> - - <?php if (!$this->isCustomerLoggedIn()): ?> - <div class="field required"> - <label class="label" for="billing:email"><span><?php echo __('Email Address') ?></span></label> - <div class="control"> - <input type="text" name="billing[email]" id="billing:email" value="<?php echo $this->escapeHtml($this->getAddress()->getEmail()) ?>" title="<?php echo __('Email Address') ?>" class="input-text" data-validate="{required:true, 'validate-email':true}"/> - </div> - </div> - <?php endif; ?> - - <div class="field company"> - <label class="label" for="billing:company"><span><?php echo __('Company') ?></span></label> - <div class="control"> - <input type="text" id="billing:company" name="billing[company]" value="<?php echo $this->escapeHtml($this->getAddress()->getCompany()) ?>" title="<?php echo __('Company') ?>" class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('company') ?>" /> - </div> - </div> - - <?php if ($this->helper('Magento\Customer\Helper\Address')->isVatAttributeVisible()) : ?> - <div class="field taxvat"> - <label class="label" for="billing:vat_id"><span><?php echo __('VAT Number') ?></span></label> - <div class="control"> - <input type="text" id="billing:vat_id" name="billing[vat_id]" value="<?php echo $this->escapeHtml($this->getAddress()->getVatId()) ?>" title="<?php echo __('VAT Number') ?>" class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('vat_id') ?>" /> - </div> - </div> - <?php endif; ?> - - <?php $_streetValidationClass = $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('street'); ?> - <div class="field street required"> - <label class="label" for="billing:street1"><span><?php echo __('Address') ?></span></label> - <div class="control"> - <input type="text" title="<?php echo __('Street Address') ?>" name="billing[street][]" id="billing:street1" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet(1)) ?>" class="input-text <?php echo $_streetValidationClass ?>" /> - <div class="nested"> - <?php $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass)); ?> - <?php for ($_i = 2, $_n = $this->helper('Magento\Customer\Helper\Address')->getStreetLines(); $_i <= $_n; $_i++): ?> - <div class="field additional no-label"> - <div class="control"> - <input type="text" title="<?php echo __('Street Address %1', $_i) ?>" name="billing[street][]" id="billing:street<?php echo $_i ?>" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet($_i)) ?>" class="input-text <?php echo $_streetValidationClass ?>" /> - </div> - </div> - <?php endfor; ?> - </div> - </div> - </div> - - - <div class="field city required"> - <label class="label" for="billing:city"><span><?php echo __('City') ?></span></label> - <div class="control"> - <input type="text" title="<?php echo __('City') ?>" name="billing[city]" value="<?php echo $this->escapeHtml($this->getAddress()->getCity()) ?>" class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('city') ?>" id="billing:city" /> - </div> - </div> - - <div class="field region required"> - <label class="label" for="billing:region_id"><span><?php echo __('State/Province') ?></span></label> - <div class="control"> - <select id="billing:region_id" name="billing[region_id]" title="<?php echo __('State/Province') ?>" data-validate="{'validate-select':true}" style="display:none;"> - <option value=""><?php echo __('Please select region, state or province') ?></option> - </select> - <input type="text" id="billing:region" name="billing[region]" value="<?php echo $this->escapeHtml($this->getAddress()->getRegion()) ?>" title="<?php echo __('State/Province') ?>" class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('region') ?>" style="display:none;" /> - </div> - </div> - - <div class="field zip required"> - <label class="label" for="billing:postcode"><span><?php echo __('Zip/Postal Code') ?></span></label> - <div class="control"> - <input type="text" title="<?php echo __('Zip/Postal Code') ?>" name="billing[postcode]" id="billing:postcode" value="<?php echo $this->escapeHtml($this->getAddress()->getPostcode()) ?>" class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('postcode') ?>" data-validate="{'validate-zip-international':true}"/> - </div> - </div> - - <div class="field country required"> - <label class="label" for="billing:country_id"><span><?php echo __('Country') ?></span></label> - <div class="control"> - <?php echo $this->getCountryHtmlSelect('billing') ?> - </div> - </div> - - <div class="field telephone required"> - <label class="label" for="billing:telephone"><span><?php echo __('Telephone') ?></span></label> - <div class="control"> - <input type="text" name="billing[telephone]" value="<?php echo $this->escapeHtml($this->getAddress()->getTelephone()) ?>" title="<?php echo __('Telephone') ?>" class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('telephone') ?>" id="billing:telephone" /> - </div> - </div> - - <div class="field fax"> - <label class="label" for="billing:fax"><span><?php echo __('Fax') ?></span></label> - <div class="control"> - <input type="text" name="billing[fax]" value="<?php echo $this->escapeHtml($this->getAddress()->getFax()) ?>" title="<?php echo __('Fax') ?>" class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('fax') ?>" id="billing:fax" /> - </div> - </div> - - <?php if(!$this->isCustomerLoggedIn()): ?> - <?php $_dob = $this->getLayout()->createBlock('Magento\Customer\Block\Widget\Dob') ?> - <?php $_taxvat = $this->getLayout()->createBlock('Magento\Customer\Block\Widget\Taxvat') ?> - <?php $_gender = $this->getLayout()->createBlock('Magento\Customer\Block\Widget\Gender') ?> - - <?php if ($_dob->isEnabled()): ?> - <?php echo $_dob->setDate($this->getQuote()->getCustomerDob())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?> - <?php endif; ?> - <?php if ($_taxvat->isEnabled()): ?> - <?php echo $_taxvat->setTaxvat($this->getQuote()->getCustomerTaxvat())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?> - <?php endif ?> - <?php if ($_gender->isEnabled()): ?> - <?php echo $_gender->setGender($this->getQuote()->getCustomerGender())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?> - <?php endif ?> - <?php $customerAttributes = $this->getChildBlock('customer_form_customer_user_defined_attributes');?> - <?php if ($customerAttributes): ?> - <?php $customerAttributes->setEntityModelClass('Magento\Customer\Model\Customer')->setFieldIdFormat('billing:%1$s');?> - <?php $customerAttributes->setFieldNameFormat('billing[%1$s]')->setShowContainer(false);?> - <?php echo $customerAttributes->setExcludeFileAttributes(true)->toHtml()?> - <?php endif;?> - <div class="field password required"> - <label class="label" for="billing:customer_password"><span><?php echo __('Password') ?></span></label> - <div class="control"> - <input type="password" name="billing[customer_password]" id="billing:customer_password" title="<?php echo __('Password') ?>" class="input-text" data-validate="{required:true, 'validate-password':true}"/> - </div> - </div> - <div class="field confirm required"> - <label class="label" for="billing:confirm_password"><span><?php echo __('Confirm Password') ?></span></label> - <div class="control"> - <input type="password" name="billing[confirm_password]" title="<?php echo __('Confirm Password') ?>" id="billing:confirm_password" class="input-text" data-validate="{required:true, 'validate-cpassword':true}"/> - </div> - </div> - <?php endif; ?> - <?php echo $this->getChildHtml('form_additional_info'); ?> - <?php if ($this->isCustomerLoggedIn() && $this->customerHasAddresses()):?> - <div class="field save choice"> - <input type="checkbox" name="billing[save_in_address_book]" value="1" title="<?php echo __('Save in address book') ?>" id="billing:save_in_address_book" <?php if ($this->getAddress()->getSaveInAddressBook()):?> checked="checked"<?php endif;?> class="checkbox" /> - <label class="label" for="billing:save_in_address_book"><span><?php echo __('Save in address book') ?></span></label> - </div> - <?php else:?> - <input type="hidden" name="billing[save_in_address_book]" value="1" /> - <?php endif; ?> - <?php /* Extensions placeholder */ ?> - <?php echo $this->getChildHtml('checkout.onepage.billing.extra')?> -</fieldset> -<?php if ($this->canShip()): ?> - <div class="field choice"> - <input type="radio" name="billing[use_for_shipping]" id="billing:use_for_shipping_yes" value="1"<?php if ($this->isUseBillingAddressForShipping()) {?> checked="checked"<?php }?> class="radio" /> - <label class="label" for="billing:use_for_shipping_yes"><span><?php echo __('Ship to this address') ?></span></label> - </div> - <div class="field choice"> - <input type="radio" name="billing[use_for_shipping]" id="billing:use_for_shipping_no" value="0"<?php if (!$this->isUseBillingAddressForShipping()) {?> checked="checked"<?php }?> class="radio" /> - <label class="label" for="billing:use_for_shipping_no"><span><?php echo __('Ship to different address') ?></span></label> - </div> -<?php endif; ?> - -<?php if (!$this->canShip()): ?> - <input type="hidden" name="billing[use_for_shipping]" value="1" /> -<?php endif; ?> -<div class="actions buttons-set form-buttons btn-only" id="billing-buttons-container"> - <div class="primary"><button type="button" class="button action continue"><span><?php echo __('Continue') ?></span></button></div> - <span id="billing-please-wait" class="please-wait load indicator" style="display:none;"> - <span><?php echo __('Loading next step...') ?></span> - </span> -</div> -</form> -<script type="text/javascript"> - (function($) { - head.js( - "<?php echo $this->getViewFileUrl('Magento_Checkout::js/region-updater.js') ?>", - function() { - $('#billing\\:country_id').regionUpdater({ - optionalRegionAllowed: <?php echo ($this->getConfig('general/region/display_all')? 'true' : 'false'); ?>, - regionListId: '#billing\\:region_id', - regionInputId: '#billing\\:region', - postcodeId: '#billing\\:postcode', - regionJson: <?php echo $this->helper('Magento\Directory\Helper\Data')->getRegionJson() ?>, - defaultRegion: "<?php echo $this->getAddress()->getRegionId() ?>", - countriesWithOptionalZip: <?php echo $this->helper('Magento\Directory\Helper\Data')->getCountriesWithOptionalZip(true) ?> - }); - }); - })(jQuery); -</script> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/onepage/login.phtml b/app/design/frontend/magento_plushe/Magento_Checkout/onepage/login.phtml deleted file mode 100644 index a66ba381e917a45404acee1c659a75fd2f068c33..0000000000000000000000000000000000000000 --- a/app/design/frontend/magento_plushe/Magento_Checkout/onepage/login.phtml +++ /dev/null @@ -1,154 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @category design - * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ -?> -<?php -/** - * Customer onepage checkout login form template - * - */ -/** @var $this \Magento\Checkout\Block\Onepage\Login */ -?> -<div class="step login wrapper"> -<?php echo $this->getChildHtml('login_before')?> -<div class="block customer login"> - <div class="title"><strong><?php echo __('Login') ?></strong></div> - <div class="content"> - <form class="form login" id="login-form" action="<?php echo $this->getPostAction() ?>" method="post"> - <fieldset class="fieldset login" data-hasrequired="<?php echo __('* Required Fields') ?>"> - <p class="field note"><?php echo __('Already registered?') ?> <?php echo __('Please log in below:') ?></p> - <div class="field email required"> - <label class="label" for="login-email"><span><?php echo __('Email Address') ?></span></label> - <div class="control"> - <input type="text" class="input-text" id="login-email" name="login[username]" data-validate="{required:true, 'validate-email':true}" value="<?php echo $this->escapeHtml($this->getUsername()) ?>" /> - </div> - </div> - <div class="field password required"> - <label for="login-password" class="label"><span><?php echo __('Password') ?></span></label> - <div class="control"> - <input type="password" class="input-text" id="login-password" name="login[password]" data-validate="{required:true, 'validate-password':true}"/> - </div> - </div> - <?php echo $this->getChildHtml('form_additional_info'); ?> - <div class="actions"> - <input name="context" type="hidden" value="checkout" /> - <div class="primary"> - <button type="submit" class="action login"><span><?php echo __('Login') ?></span></button> - </div> - <div class="secondary"> - <a class="action remind" href="<?php echo $this->helper('Magento\Customer\Helper\Data')->getForgotPasswordUrl()?>"> - <span><?php echo __('Forgot Your Password?') ?></span> - </a> - </div> - </div> - </fieldset> - </form> - </div> - <script type="text/javascript"> - (function($) { - head.js( - "<?php echo $this->getViewFileUrl('jquery/jquery.validate.js') ?>", - "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js') ?>", - "<?php echo $this->getViewFileUrl('mage/validation.js')?>", - "<?php echo $this->getViewFileUrl('mage/validation/validation.js') ?>", - function() { - $('#login-form').validation(); - }); - })(jQuery); - </script> -</div> -<?php if ( $this->isAllowedGuestCheckout() || $this->helper('Magento\Customer\Helper\Data')->isRegistrationAllowed() ): ?> -<div class="block guest"> - <div class="title"> - <strong> - <?php if( $this->isAllowedGuestCheckout() && $this->helper('Magento\Customer\Helper\Data')->isRegistrationAllowed() ): ?> - <?php echo __('Checkout as a Guest or Register') ?> - <?php elseif ( $this->isAllowedGuestCheckout() && !$this->helper('Magento\Customer\Helper\Data')->isRegistrationAllowed() ): ?> - <?php echo __('Checkout as a Guest') ?> - <?php else: ?> - <?php echo __('Register to Create an Account') ?> - <?php endif; ?> - </strong> - </div> - <div class="content"> - <?php if( !$this->isAllowedGuestCheckout() && $this->helper('Magento\Customer\Helper\Data')->isRegistrationAllowed() ): ?> - <p><strong><?php echo __('Register and save time!') ?></strong><br /> - <?php echo __('Register with us for future convenience:') ?></p> - <ul> - <li><?php echo __('Fast and easy check out') ?></li> - <li><?php echo __('Easy access to your order history and status') ?></li> - </ul> - <?php elseif( $this->isAllowedGuestCheckout() && $this->helper('Magento\Customer\Helper\Data')->isRegistrationAllowed() ): ?> - <p class="note"><?php echo __('Register with us for future convenience:') ?></p> - <?php endif ?> - - <?php if( $this->isAllowedGuestCheckout() ): ?> - <fieldset class="fieldset guest"> - <?php if( $this->isAllowedGuestCheckout() ): ?> - <div class="field choice"> - <input type="radio" name="checkout_method" id="login:guest" value="guest"<?php if($this->getQuote()->getCheckoutMethod()==Magento\Checkout\Model\Type\Onepage::METHOD_GUEST): ?> checked="checked"<?php endif; ?> class="radio" /> - <label class="label" for="login:guest"><span><?php echo __('Checkout as Guest') ?></span></label> - </div> - <?php endif; ?> - <?php if( $this->helper('Magento\Customer\Helper\Data')->isRegistrationAllowed() ): ?> - <div class="field choice"> - <input type="radio" name="checkout_method" id="login:register" value="register"<?php if($this->getQuote()->getCheckoutMethod()==Magento\Checkout\Model\Type\Onepage::METHOD_REGISTER || !$this->isAllowedGuestCheckout()): ?> checked="checked"<?php endif ?> class="radio" /> - <label class="label" for="login:register"><span><?php echo __('Register') ?></span></label> - </div> - <?php endif; ?> - </fieldset> - <?php else: ?> - <input type="hidden" name="checkout_method" id="login:register" value="register" checked="checked" /> - <?php endif; ?> - <div class="actions"> - <span class="please-wait load indicator" style="display:none;"> - <span><?php echo __('Loading next step...') ?></span> - </span> - <?php if ($this->isAllowedGuestCheckout()): ?> - <button id="onepage-guest-register-button" type="button" class="action continue" data-checkout='{"isGuestCheckoutAllowed":true}'><span><?php echo __('Continue') ?></span></button> - <?php elseif ($this->helper('Magento\Checkout\Helper\Data')->isCustomerMustBeLogged()): ?> - <button id="onepage-guest-register-button" type="button" class="action register" data-checkout='{"isGuestCheckoutAllowed":false, "registrationUrl":"<?php echo $this->helper('Magento\Checkout\Helper\Url')->getRegistrationUrl();?>"}'><span><?php echo __('Register') ?></span></button> - <?php else: ?> - <form action="<?php echo $this->getUrl('persistent/index/saveMethod'); ?>"> - <button id="onepage-guest-register-button" type="submit" class="action register"><span><?php echo __('Register') ?></span></button> - </form> - <?php endif; ?> - </div> - </div> -</div> -<?php endif; ?> -</div> -<script type="text/javascript"> - (function($) { - head.js( - "<?php echo $this->getViewFileUrl('jquery/jquery.validate.js') ?>", - "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js') ?>", - "<?php echo $this->getViewFileUrl('mage/validation.js')?>", - "<?php echo $this->getViewFileUrl('mage/validation/validation.js') ?>", - function() { - $('#login-form').validation(); - } - )} - )(jQuery); -</script> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/onepage/review/info.phtml b/app/design/frontend/magento_plushe/Magento_Checkout/onepage/review/info.phtml deleted file mode 100644 index 9b8fc74bc4330f8dcf72c75614fbf8c67a5c0a0d..0000000000000000000000000000000000000000 --- a/app/design/frontend/magento_plushe/Magento_Checkout/onepage/review/info.phtml +++ /dev/null @@ -1,65 +0,0 @@ -\<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @category design - * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ -?> -<?php echo $this->getChildHtml('items_before'); ?> -<div id="checkout-review-table-wrapper" class="review table wrapper"> - <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): $colspan = $rowspan = 2; else: $colspan = $rowspan = 1; endif; ?> - <table class="order review items data" id="checkout-review-table"> - <thead> - <tr> - <th rowspan="<?php echo $rowspan ?>" class="col item"><?php echo __('Product Name') ?></th> - <th colspan="<?php echo $colspan ?>" class="col price"><?php echo __('Price') ?></th> - <th rowspan="<?php echo $rowspan ?>" class="col qty"><?php echo __('Qty') ?></th> - <th colspan="<?php echo $colspan ?>" class="col subtotal"><?php echo __('Subtotal') ?></th> - </tr> - <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> - <tr> - <th class="col price excl tax"><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(false) ?></th> - <th class="col price incl tax"><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(true) ?></th> - <th class="col subtotal excl tax"><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(false) ?></th> - <th class="col subtotal incl tax"><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(true) ?></th> - </tr> - <?php endif; ?> - </thead> - <?php echo $this->getChildHtml('totals'); ?> - <tbody> - <?php foreach($this->getItems() as $_item): ?> - <?php echo $this->getItemHtml($_item)?> - <?php endforeach ?> - </tbody> - </table> -</div> -<?php echo $this->getChildHtml('items_after'); ?> - -<div id="checkout-review-submit" class="checkout submit order"> - <?php echo $this->getChildHtml('agreements') ?> - <div class="buttons-set actions" id="review-buttons-container"> - <div class="primary"><?php echo $this->getChildHtml('button') ?></div> - <div class="secondary"><?php echo __('Forgot an Item?') ?> <a href="<?php echo $this->getUrl('checkout/cart') ?>" class="action edit"><span><?php echo __('Edit Your Cart') ?></span></a></div> - <span class="please-wait load indicator" id="review-please-wait" style="display:none;"> - <span><?php echo __('Submitting order information...') ?></span> - </span> - </div> -</div> diff --git a/app/design/frontend/magento_plushe/Magento_Checkout/onepage/shipping.phtml b/app/design/frontend/magento_plushe/Magento_Checkout/onepage/shipping.phtml deleted file mode 100644 index 6c183170aee1719231d54c70950ecaf79dd7c0e5..0000000000000000000000000000000000000000 --- a/app/design/frontend/magento_plushe/Magento_Checkout/onepage/shipping.phtml +++ /dev/null @@ -1,144 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @category design - * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ -?> -<form class="form shipping address" action="" id="co-shipping-form" data-hasrequired="<?php echo __('* Required Fields') ?>"> - -<?php if ($this->customerHasAddresses()): ?> - <div class="field addresses"> - <label class="label" for="shipping-address-select"><span><?php echo __('Select a shipping address from your address book or enter a new address.') ?></span></label> - <div class="control"><?php echo $this->getAddressesHtmlSelect('shipping') ?></div> - </div> -<?php endif ?> - <fieldset class="fieldset address" id="shipping-new-address-form"<?php if ($this->customerHasAddresses()): ?> style="display:none;"<?php endif ?>> - <input type="hidden" name="shipping[address_id]" value="<?php echo $this->getAddress()->getId() ?>" id="shipping:address_id" /> - <?php echo $this->getLayout()->createBlock('Magento\Customer\Block\Widget\Name')->setObject($this->getAddress())->setFieldIdFormat('shipping:%s')->setFieldNameFormat('shipping[%s]')->toHtml() ?> - <div class="field company"> - <label class="label" for="shipping:company"><span><?php echo __('Company') ?></span></label> - <div class="control"> - <input type="text" id="shipping:company" name="shipping[company]" value="<?php echo $this->escapeHtml($this->getAddress()->getCompany()) ?>" title="<?php echo __('Company') ?>" class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('company') ?>" /> - </div> - </div> - <?php if ($this->helper('Magento\Customer\Helper\Address')->isVatAttributeVisible()) : ?> - <div class="field taxvat"> - <label class="label" for="shipping:vat_id"><span><?php echo __('VAT Number'); ?></span></label> - <div class="control"> - <input type="text" id="shipping:vat_id" name="shipping[vat_id]" value="<?php echo $this->escapeHtml($this->getAddress()->getVatId()); ?>" title="<?php echo __('VAT Number'); ?>" class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('vat_id') ?>" /> - </div> - </div> - <?php endif; ?> - <?php $_streetValidationClass = $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('street'); ?> - <div class="field street required"> - <label class="label" for="shipping:street1"><span><?php echo __('Address') ?></span></label> - <div class="control"> - <input type="text" title="<?php echo __('Street Address') ?>" name="shipping[street][]" id="shipping:street1" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet(1)) ?>" class="input-text <?php echo $_streetValidationClass ?>" /> - <div class="nested"> - <?php $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass)); ?> - <?php for ($_i = 2, $_n = $this->helper('Magento\Customer\Helper\Address')->getStreetLines(); $_i <= $_n; $_i++): ?> - <div class="field additional no-label"> - <div class="control"> - <input type="text" title="<?php echo __('Street Address %1', $_i) ?>" name="shipping[street][]" id="shipping:street<?php echo $_i ?>" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet($_i)) ?>" class="input-text <?php echo $_streetValidationClass ?>" /> - </div> - </div> - <?php endfor; ?> - </div> - </div> - </div> - - <div class="field city required"> - <label class="label" for="shipping:city"><span><?php echo __('City') ?></span></label> - <div class="control"> - <input type="text" title="<?php echo __('City') ?>" name="shipping[city]" value="<?php echo $this->escapeHtml($this->getAddress()->getCity()) ?>" class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('city') ?>" id="shipping:city" /> - </div> - </div> - <div class="field region required"> - <label class="label" for="shipping:region"><span><?php echo __('State/Province') ?></span></label> - <div class="control"> - <select id="shipping:region_id" name="shipping[region_id]" title="<?php echo __('State/Province') ?>" class="validate-select" style="display:none;"> - <option value=""><?php echo __('Please select region, state or province') ?></option> - </select> - <input type="text" id="shipping:region" name="shipping[region]" value="<?php echo $this->escapeHtml($this->getAddress()->getRegion()) ?>" title="<?php echo __('State/Province') ?>" class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('region') ?>" style="display:none;" /> - </div> - </div> - <div class="field zip required"> - <label class="label" for="shipping:postcode"><span><?php echo __('Zip/Postal Code') ?></span></label> - <div class="control"> - <input type="text" title="<?php echo __('Zip/Postal Code') ?>" name="shipping[postcode]" id="shipping:postcode" value="<?php echo $this->escapeHtml($this->getAddress()->getPostcode()) ?>" class="input-text validate-zip-international <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('postcode') ?>" /> - </div> - </div> - <div class="field country required"> - <label class="label" for="shipping:country_id"><span><?php echo __('Country') ?></span></label> - <div class="control"> - <?php echo $this->getCountryHtmlSelect('shipping') ?> - </div> - </div> - <div class="field telephone required"> - <label class="label" for="shipping:telephone"><span><?php echo __('Telephone') ?></span></label> - <div class="control"> - <input type="text" name="shipping[telephone]" value="<?php echo $this->escapeHtml($this->getAddress()->getTelephone()) ?>" title="<?php echo __('Telephone') ?>" class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('telephone') ?>" id="shipping:telephone" /> - </div> - </div> - <div class="field fax"> - <label class="label" for="shipping:fax"><span><?php echo __('Fax') ?></span></label> - <div class="control"> - <input type="text" name="shipping[fax]" value="<?php echo $this->escapeHtml($this->getAddress()->getFax()) ?>" title="<?php echo __('Fax') ?>" class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('fax') ?>" id="shipping:fax" /> - </div> - </div> - - <?php if ($this->isCustomerLoggedIn() && $this->customerHasAddresses()):?> - <div class="field choice save"> - <input type="checkbox" name="shipping[save_in_address_book]" value="1" title="<?php echo __('Save in address book') ?>" id="shipping:save_in_address_book" <?php if ($this->getAddress()->getSaveInAddressBook()):?> checked="checked"<?php endif;?> class="checkbox" /> - <label class="label" for="shipping:save_in_address_book"><span><?php echo __('Save in address book') ?></span></label> - </div> - <?php else:?> - <input type="hidden" name="shipping[save_in_address_book]" value="1" /> - <?php endif;?> - </fieldset> - <div class="choice field"> - <input type="checkbox" name="shipping[same_as_billing]" id="shipping:same_as_billing" value="1"<?php if($this->getAddress()->getSameAsBilling()): ?> checked="checked"<?php endif; ?> class="checkbox" /> - <label class="label" for="shipping:same_as_billing"><span><?php echo __('Use Billing Address') ?></span></label> - </div> - <div class="actions buttons-set form-buttons" id="shipping-buttons-container"> - <div class="primary"><button type="button" class="button action continue"><span><?php echo __('Continue') ?></span></button></div> - <div class="secondary"><a href="#" class="action back"><span><?php echo __('Back') ?></span></a> - <span id="shipping-please-wait" class="please-wait load indicator" style="display:none;"><span><?php echo __('Loading next step...') ?></span></span> - </div> -</form> -<script type="text/javascript"> - (function($) { - head.js( - "<?php echo $this->getViewFileUrl('Magento_Checkout::js/region-updater.js') ?>", - function() { - $('#shipping\\:country_id').regionUpdater({ - optionalRegionAllowed: <?php echo ($this->getConfig('general/region/display_all')? 'true' : 'false'); ?>, - regionListId: '#shipping\\:region_id', - regionInputId: '#shipping\\:region', - postcodeId: '#shipping\\:postcode', - regionJson: <?php echo $this->helper('Magento\Directory\Helper\Data')->getRegionJson() ?>, - defaultRegion: "<?php echo $this->getAddress()->getRegionId() ?>", - countriesWithOptionalZip: <?php echo $this->helper('Magento\Directory\Helper\Data')->getCountriesWithOptionalZip(true) ?> - }); - }); - })(jQuery); -</script> diff --git a/app/design/frontend/magento_plushe/Magento_Core/template.phtml b/app/design/frontend/magento_plushe/Magento_Core/template.phtml new file mode 100644 index 0000000000000000000000000000000000000000..70aa089bb5ccd9d977f65fc7667c06f4b20cf9d3 --- /dev/null +++ b/app/design/frontend/magento_plushe/Magento_Core/template.phtml @@ -0,0 +1,27 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category design + * @package base_default + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +/** @var $this \Magento\View\Block\Template */ +echo $this->getChildHtml('', false); diff --git a/app/design/frontend/magento_plushe/Magento_GiftMessage/inline.phtml b/app/design/frontend/magento_plushe/Magento_GiftMessage/inline.phtml deleted file mode 100644 index dfb98bdc890a4ad48b621a3784d482863a686b43..0000000000000000000000000000000000000000 --- a/app/design/frontend/magento_plushe/Magento_GiftMessage/inline.phtml +++ /dev/null @@ -1,301 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @category design - * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ -?> -<?php $_giftMessage = false; ?> -<?php if(!$this->getDontDisplayContainer()): ?> -<script type="text/javascript"> - head.js("<?php echo $this->getViewFileUrl('js/extra-options.js') ?>", function() { - jQuery('#checkoutSteps').extraOptions({additionalUrl: '<?php echo $this->getAdditionalUrl(); ?>'}); - }); -</script> -<?php endif ?> - -<?php switch ($this->getType()): ?> -<?php case 'onepage_checkout': ?> - <fieldset class="fieldset gift message"> - <legend class="legend"><span><?php echo __('Do you have any gift items in your order?'); ?></span></legend><br> - - <div class="field choice" id="add-gift-options-<?php echo $this->getEntity()->getId() ?>"> - <input type="checkbox" name="allow_gift_options" id="allow_gift_options" value="1" data-selector='{"id":"#allow-gift-options-container"}'<?php if($this->getItemsHasMesssages() || $this->getEntityHasMessage()): ?> checked="checked"<?php endif; ?> class="checkbox" /> - <label for="allow_gift_options" class="label"><span><?php echo __('Add gift options') ?></span></label> - </div> - - <dl class="block items" id="allow-gift-options-container"> - <dt id="add-gift-options-for-order-<?php echo $this->getEntity()->getId() ?>" class="order"> - <div class="title"><span><?php echo __('Gift Options for the Entire Order'); ?></span></div> - <div class="field choice"> - <input type="checkbox" name="allow_gift_messages_for_order" id="allow_gift_options_for_order" value="1" data-selector='{"id":"#allow-gift-options-for-order-container"}'<?php if($this->getEntityHasMessage()): ?> checked="checked"<?php endif; ?> class="checkbox" /> - <label for="allow_gift_options_for_order" class="label"><span><?php echo __('Add gift options for the Entire Order') ?></span></label> - </div> - </dt> - - <dd id="allow-gift-options-for-order-container" class="options order"> - <div class="options-order-container" id="options-order-container-<?php echo $this->getEntity()->getId() ?>"></div> - <input type="hidden" name="giftoptions[<?php echo $this->getEntity()->getId() ?>][type]" value="quote" /> - <?php if ($this->isMessagesAvailable()): ?> - <a href="#" class="activate message" data-mage-init='{toggleAdvanced: {selectorsToggleClass:"no-display", toggleContainers:"#allow-gift-messages-for-order-container"}}'><?php echo __('Gift Message') ?></a> - <div id="allow-gift-messages-for-order-container" class="no-display"> - <fieldset class="fieldset"> - <input type="hidden" name="giftmessage[<?php echo $this->getEntity()->getId() ?>][type]" value="quote" /> - <p><?php echo __('If you don\'t want to leave a gift message for the entire order, leave this box blank.') ?></p> - <div class="field from"> - <label for="gift-message-whole-from" class="label"><span><?php echo __('From') ?></span></label> - <div class="control"> - <input type="text" name="giftmessage[<?php echo $this->getEntity()->getId() ?>][from]" id="gift-message-whole-from" title="<?php echo __('From') ?>" value="<?php echo $this->getEscaped($this->getMessage()->getSender(), $this->getDefaultFrom()) ?>" class="input-text"> - </div> - </div> - <div class="field to"> - <label for="gift-message-whole-to" class="label"><span><?php echo __('To') ?></span></label> - <div class="control"> - <input type="text" name="giftmessage[<?php echo $this->getEntity()->getId() ?>][to]" id="gift-message-whole-to" title="<?php echo __('To') ?>" value="<?php echo $this->getEscaped($this->getMessage()->getRecipient(), $this->getDefaultTo()) ?>" class="input-text"> - </div> - </div> - <div class="field text"> - <label for="gift-message-whole-message" class="label"><span><?php echo __('Message') ?></span></label> - <div class="control"> - <textarea id="gift-message-whole-message" class="input-text" name="giftmessage[<?php echo $this->getEntity()->getId() ?>][message]" title="<?php echo __('Message') ?>" rows="5" cols="10"><?php echo $this->getEscaped($this->getMessage()->getMessage()) ?></textarea> - </div> - </div> - </fieldset> - <script type="text/javascript"> - jQuery('#add-gift-options-<?php echo $this->getEntity()->getId() ?>') - .add('#add-gift-options-for-order-<?php echo $this->getEntity()->getId() ?>').removeClass('no-display'); - </script> - </div> - <?php endif ?> - </dd> - <?php if ($this->isItemsAvailable()): ?> - <dt id="add-gift-options-for-items-<?php echo $this->getEntity()->getId() ?>" class="individual"> - <div class="title"><span><?php echo __('Gift Options for Individual Items'); ?></span></div> - <div class="field choice"> - <input type="checkbox" name="allow_gift_options_for_items" id="allow_gift_options_for_items" value="1" data-selector='{"id":"#allow-gift-options-for-items-container"}'<?php if($this->getItemsHasMesssages()): ?> checked="checked"<?php endif; ?> class="checkbox" /> - <label for="allow_gift_options_for_items" class="label"><span><?php echo __('Add gift options for Individual Items') ?></span></label> - </div> - </dt> - - <dd id="allow-gift-options-for-items-container" class="options individual"> - <ol> - <?php foreach($this->getItems() as $_index=>$_item): ?> - <?php $_product=$_item->getProduct() ?> - <li class="item"> - <input type="hidden" name="giftoptions[<?php echo $_item->getId() ?>][type]" value="quote_item" /> - <p class="number"><?php echo __('Item %1 of %2', $_index+1, $this->countItems()) ?></p> - <div class="product"> - <div class="img photo container"> - <img src="<?php echo $this->getThumbnailUrl($_product); ?>" width="<?php echo $this->getThumbnailSize()?>" height="<?php echo $this->getThumbnailSize()?>" alt="<?php echo $this->escapeHtml($_product->getName()) ?>"title="<?php echo $this->escapeHtml($_product->getName()) ?>" /> - </div> - <strong class="product name"><?php echo $this->escapeHtml($_product->getName()) ?></strong> - </div> - <div class="item options"> - <div class="options-items-container" id="options-items-container-<?php echo $this->getEntity()->getId() ?>-<?php echo $_item->getId() ?>"></div> - <?php if ($this->isItemMessagesAvailable($_item)): ?> - <a href="#" class="activate message" data-mage-init='{toggleAdvanced: {selectorsToggleClass:"no-display", toggleContainers:"#gift-messages-for-item-container-<?php echo $_item->getId() ?>"}}'><?php echo __('Gift Message') ?></a> - <div id="gift-messages-for-item-container-<?php echo $_item->getId() ?>" class="block message no-display"> - <fieldset class="fieldset"> - <p><?php echo __('You can leave a box blank if you don\'t wish to add a gift message for the item.') ?></p> - <input type="hidden" name="giftmessage[<?php echo $_item->getId() ?>][type]" value="quote_item" > - <div class="field from"> - <label for="gift-message-<?php echo $_item->getId() ?>-from" class="label"><span><?php echo __('From') ?></span></label> - <div class="control"> - <input type="text" name="giftmessage[<?php echo $_item->getId() ?>][from]" id="gift-message-<?php echo $_item->getId() ?>-from" title="<?php echo __('From') ?>" value="<?php echo $this->getEscaped($this->getMessage($_item)->getSender(), $this->getDefaultFrom()) ?>" class="input-text"> - </div> - </div> - <div class="field to"> - <label for="gift-message-<?php echo $_item->getId() ?>-to" class="label"><span><?php echo __('To') ?></span></label> - <div class="control"> - <input type="text" name="giftmessage[<?php echo $_item->getId() ?>][to]" id="gift-message-<?php echo $_item->getId() ?>-to" title="<?php echo __('To') ?>" value="<?php echo $this->getEscaped($this->getMessage($_item)->getRecipient(), $this->getDefaultTo()) ?>" class="input-text"> - </div> - </div> - <div class="field text"> - <label for="gift-message-<?php echo $_item->getId() ?>-message" class="label"><span><?php echo __('Message') ?></span></label> - <div class="control"> - <textarea id="gift-message-<?php echo $_item->getId() ?>-message" class="input-text giftmessage-area" name="giftmessage[<?php echo $_item->getId() ?>][message]" title="<?php echo __('Message') ?>" rows="5" cols="40"><?php echo $this->getEscaped($this->getMessage($_item)->getMessage()) ?></textarea> - </div> - </div> - </fieldset> - </div> - <?php endif; ?> - </div> - </li> - <?php endforeach; ?> - </ol> - </dd> - <script type="text/javascript"> - jQuery('#add-gift-options-<?php echo $this->getEntity()->getId() ?>') - .add('#add-gift-options-for-items-<?php echo $this->getEntity()->getId() ?>').removeClass('no-display'); - </script> - <?php endif; ?> - <dt class="extra-options-container" id="extra-options-container-<?php echo $this->getEntity()->getId() ?>"></dt> - </dl> - </fieldset> - <script type="text/javascript"> - head.js("<?php echo $this->getViewFileUrl('Magento_GiftMessage::gift-options.js')?>", function() { - jQuery('#allow_gift_options') - .add('#allow_gift_options_for_order') - .add('#allow_gift_options_for_items').giftOptions(); - }); - </script> -<?php break; ?> -<?php case 'multishipping_adress_checkbox': ?> -<?php break; ?> - -<?php case 'multishipping_address': ?> - <fieldset id="add-gift-options-<?php echo $this->getEntity()->getId() ?>" class="fieldset gift message"> - <legend class="legend"><span><?php echo __('Do you have any gift items in your order?'); ?></span></legend><br> - - <div class="field choice" id="add-gift-options-<?php echo $this->getEntity()->getId() ?>"> - <input type="checkbox" name="allow_gift_options_<?php echo $this->getEntity()->getId() ?>" id="allow_gift_options_<?php echo $this->getEntity()->getId() ?>" value="1" data-selector='{"id":"#allow-gift-options-container-<?php echo $this->getEntity()->getId() ?>"}'<?php if($this->getItemsHasMesssages() || $this->getEntityHasMessage()): ?> checked="checked"<?php endif; ?> class="checkbox" /> - <label for="allow_gift_options_<?php echo $this->getEntity()->getId() ?>" class="label"><span><?php echo __('Add gift options') ?></span></label> - </div> - - <dl class="block items" id="allow-gift-options-container-<?php echo $this->getEntity()->getId() ?>"> - <dt id="add-gift-options-for-order-<?php echo $this->getEntity()->getId() ?>" class="order"> - <div class="title"><span><?php echo __('Gift Options for this address.'); ?></span></div> - <div class="field choice"> - <input type="checkbox" name="allow_gift_options_for_order_<?php echo $this->getEntity()->getId() ?>" id="allow_gift_options_for_order_<?php echo $this->getEntity()->getId() ?>" value="1" data-selector='{"id":"#allow-gift-options-for-order-container-<?php echo $this->getEntity()->getId() ?>"}'<?php if($this->getEntityHasMessage()): ?> checked="checked"<?php endif; ?> class="checkbox" /> - <label for="allow_gift_options_for_order_<?php echo $this->getEntity()->getId() ?>" class="label"><span><?php echo __('Add gift options for the Entire Order') ?></span></label> - </div> - </dt> - - <dd id="allow-gift-options-for-order-container-<?php echo $this->getEntity()->getId() ?>" class="options order"> - <div class="options-order-container" id="options-order-container-<?php echo $this->getEntity()->getId() ?>"></div> - <input type="hidden" name="giftoptions[<?php echo $this->getEntity()->getId() ?>][type]" value="quote_address" /> - <?php if ($this->isMessagesAvailable()): ?> - <?php $_giftMessage = true; ?> - <a href="#" class="activate message" data-mage-init='{toggleAdvanced: {selectorsToggleClass:"no-display", toggleContainers:"#gift-messages-for-order-container-<?php echo $this->getEntity()->getId() ?>"}}'><?php echo __('Gift Message') ?></a> - <div id="gift-messages-for-order-container-<?php echo $this->getEntity()->getId() ?>" class="block message no-display"> - <fieldset class="fieldset"> - <p><?php echo __('You can leave this box blank if you do not wish to add a gift message for this address.') ?></p> - <input type="hidden" name="giftmessage[<?php echo $this->getEntity()->getId() ?>][type]" value="quote_address" /> - <div class="field from"> - <label for="gift-message-<?php echo $this->getEntity()->getId() ?>-from" class="label"><span><?php echo __('From') ?></span></label> - <div class="control"> - <input type="text" name="giftmessage[<?php echo $this->getEntity()->getId() ?>][from]" id="gift-message-<?php echo $this->getEntity()->getId() ?>-from" title="<?php echo __('From') ?>" value="<?php echo $this->getEscaped($this->getMessage()->getSender(), $this->getDefaultFrom()) ?>" class="input-text"> - </div> - </div> - <div class="field to"> - <label for="gift-message-<?php echo $this->getEntity()->getId() ?>-to" class="label"><span><?php echo __('To') ?></span></label> - <div class="control"> - <input type="text" name="giftmessage[<?php echo $this->getEntity()->getId() ?>][to]" id="gift-message-<?php echo $this->getEntity()->getId() ?>-to" title="<?php echo __('To') ?>" value="<?php echo $this->getEscaped($this->getMessage()->getRecipient(), $this->getDefaultTo()) ?>" class="input-text"> - </div> - </div> - <div class="field text"> - <label for="gift-message-<?php echo $this->getEntity()->getId() ?>-message" class="label"><span><?php echo __('Message') ?></span></label> - <div class="control"> - <textarea id="gift-message-<?php echo $this->getEntity()->getId() ?>-message" class="input-text" name="giftmessage[<?php echo $this->getEntity()->getId() ?>][message]" title="<?php echo __('Message') ?>" rows="5" cols="40"><?php echo $this->getEscaped($this->getMessage()->getMessage()) ?></textarea> - </div> - </div> - </fieldset> - </div> - <?php endif; ?> - </dd> - - <?php if ($this->isItemsAvailable()): ?> - <dt id="add-gift-options-for-items-<?php echo $this->getEntity()->getId() ?>" class="individual"> - <div class="title"><span><?php echo __('Gift Options for Individual Items'); ?></span></div> - <div class="field choice"> - <input type="checkbox" name="allow_gift_options_for_items_<?php echo $this->getEntity()->getId() ?>" id="allow_gift_options_for_items_<?php echo $this->getEntity()->getId() ?>" value="1" data-selector='{"id":"#allow-gift-options-for-items-container-<?php echo $this->getEntity()->getId() ?>"}'<?php if($this->getItemsHasMesssages()): ?> checked="checked"<?php endif; ?> class="checkbox" /> - <label for="allow_gift_options_for_items_<?php echo $this->getEntity()->getId() ?>" class="label"><span><?php echo __('Add gift options for Individual Items') ?></span></label> - </div> - </dt> - - <dd id="allow-gift-options-for-items-container-<?php echo $this->getEntity()->getId() ?>" class="options individual"> - <ol> - <?php foreach($this->getItems() as $_index=>$_item): ?> - <?php $_product=$_item->getProduct() ?> - <li class="item"> - <p class="number"><?php echo __('Item %1 of %2', $_index+1, $this->countItems()) ?></p> - <div class="product"> - <div class="img photo container"> - <img src="<?php echo $this->getThumbnailUrl($_product); ?>" width="<?php echo $this->getThumbnailSize()?>" height="<?php echo $this->getThumbnailSize()?>" alt="<?php echo $this->escapeHtml($_product->getName()) ?>" title="<?php echo $this->escapeHtml($_product->getName()) ?>" /> - </div> - <strong class="product name"><?php echo $this->escapeHtml($_product->getName()) ?></strong> - </div> - <div class="item options"> - <div class="options-items-container" id="options-items-container-<?php echo $this->getEntity()->getId() ?>-<?php echo $_item->getId() ?>"></div> - <input type="hidden" name="giftoptions[<?php echo $_item->getId() ?>][type]" value="quote_address_item" /> - <input type="hidden" name="giftoptions[<?php echo $_item->getId() ?>][address]" value="<?php echo $this->getEntity()->getId()?>" /> - - <?php if ($this->isItemMessagesAvailable($_item)): ?> - <?php $_giftMessage = true; ?> - <a href="#" class="activate message" data-mage-init='{toggleAdvanced: {selectorsToggleClass:"no-display", toggleContainers:"#gift-messages-for-item-container-<?php echo $_item->getId() ?>"}}'><?php echo __('Gift Message') ?></a> - <div id="gift-messages-for-item-container-<?php echo $_item->getId() ?>" class="block message no-display"> - <fieldset class="fieldset"> - <p><?php echo __('You can leave this box blank if you do not wish to add a gift message for the item.') ?></p> - <input type="hidden" name="giftmessage[<?php echo $_item->getId() ?>][type]" value="quote_address_item" /> - <input type="hidden" name="giftmessage[<?php echo $_item->getId() ?>][address]" value="<?php echo $this->getEntity()->getId()?>" /> - <div class="field from"> - <label for="gift-message-<?php echo $_item->getId() ?>-from" class="label"><span><?php echo __('From') ?></span></label> - <div class="control"> - <input type="text" name="giftmessage[<?php echo $_item->getId() ?>][from]" id="gift-message-<?php echo $_item->getId() ?>-from" title="<?php echo __('From') ?>" value="<?php echo $this->getEscaped($this->getMessage($_item)->getSender(), $this->getDefaultFrom()) ?>" class="input-text"> - </div> - </div> - <div class="field to"> - <label for="gift-message-<?php echo $_item->getId() ?>-to" class="label"><span><?php echo __('To') ?></span></label> - <div class="control"> - <input type="text" name="giftmessage[<?php echo $_item->getId() ?>][to]" id="gift-message-<?php echo $_item->getId() ?>-to" title="<?php echo __('To') ?>" value="<?php echo $this->getEscaped($this->getMessage($_item)->getRecipient(), $this->getDefaultTo()) ?>" class="input-text"> - </div> - </div> - <div class="field text"> - <label for="gift-message-<?php echo $_item->getId() ?>-message" class="label"><span><?php echo __('Message') ?></span></label> - <div class="control"> - <textarea id="gift-message-<?php echo $_item->getId() ?>-message" class="input-text giftmessage-area" name="giftmessage[<?php echo $_item->getId() ?>][message]" title="<?php echo __('Message') ?>" rows="5" cols="10"><?php echo $this->getEscaped($this->getMessage($_item)->getMessage()) ?></textarea> - </div> - </div> - </fieldset> - </div> - <?php endif; ?> - </div> - </li> - <?php endforeach; ?> - </ol> - </dd> - <?php endif; ?> - <dt class="extra-options-container" id="extra-options-container-<?php echo $this->getEntity()->getId() ?>"></dt> - </dl> - </fieldset> - <script type="text/javascript"> - (function($) { - $(function() { - head.js("<?php echo $this->getViewFileUrl('Magento_GiftMessage::gift-options.js')?>", function() { - $('#allow_gift_options_<?php echo $this->getEntity()->getId() ?>') - .add('#allow_gift_options_for_order_<?php echo $this->getEntity()->getId() ?>') - .add('#allow_gift_options_for_items_<?php echo $this->getEntity()->getId() ?>').giftOptions(); - }); - }); - })(jQuery); - </script> - <?php break; ?> -<?php endswitch ?> -<?php if ($_giftMessage): ?> -<script type="text/javascript"> - head.js("<?php echo $this->getViewFileUrl('jquery/jquery.validate.js')?>", - "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js')?>", - "<?php echo $this->getViewFileUrl('mage/validation.js')?>", - "<?php echo $this->getViewFileUrl('mage/validation/validation.js')?>", function() { - jQuery("#shipping_method_form").validation(); - }); -</script> -<?php endif; ?> diff --git a/app/design/frontend/magento_plushe/Magento_Shipping/tracking/popup.phtml b/app/design/frontend/magento_plushe/Magento_Shipping/tracking/popup.phtml deleted file mode 100644 index c3ca1b3567643bdf83e89ad1d158c87dd074fe06..0000000000000000000000000000000000000000 --- a/app/design/frontend/magento_plushe/Magento_Shipping/tracking/popup.phtml +++ /dev/null @@ -1,174 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @category design - * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ -?> -<?php /** @var $this \Magento\Shipping\Block\Tracking\Popup */ ?> -<?php $_results = $this->getTrackingInfo(); ?> -<div class="page tracking"> - <div class="page title"> - <h1 class="title"> - <span class="base"><?php echo __('Tracking Information'); ?></span> - </h1> - </div> - <?php if(sizeof($_results)>0): ?> - <?php foreach($_results as $shipid => $_result): ?> - <?php if($shipid): ?> - <div class="order subtitle caption"><?php echo __('Shipment #').$shipid; ?></div> - <?php endif; ?> - <?php if(sizeof($_result)>0): ?> - <?php $rowCount = sizeof($_result); $counter = 1; ?> - <?php $_id = 0; foreach($_result as $track): ?> - <table class="data table order tracking" id="tracking-table-popup-<?php echo $_id ?>"> - <tbody> - <?php if(is_object($track)): ?> - <tr> - <th class="col label"><?php echo __('Tracking Number:'); ?></th> - <td class="col value"><?php echo $this->escapeHtml($track->getTracking()); ?></td> - </tr> - <?php if ($track->getCarrierTitle()): ?> - <tr> - <th class="col label"><?php echo __('Carrier:'); ?></th> - <td class="col value"><?php echo $this->escapeHtml($track->getCarrierTitle()); ?></td> - </tr> - <?php endif; ?> - <?php if($track->getErrorMessage()): ?> - <tr> - <th class="col label"><?php echo __('Error:'); ?></th> - <td class="col error"><?php echo __('Tracking information is currently not available. Please '); if ($this->getContactUsEnabled()) : ?><a href="<?php echo $this->getContactUs() ?>" title="<?php echo __('contact us') ?>" onclick="this.target='_blank'"><?php echo __('contact us') ?></a><?php echo __(' for more information or '); endif; echo __('email us at '); ?><a href="mailto:<?php echo $this->getStoreSupportEmail() ?>"><?php echo $this->getStoreSupportEmail() ?></a></td> - </tr> - <?php elseif($track->getTrackSummary()): ?> - <tr> - <th class="col label"><?php echo __('Info:'); ?></th> - <td class="col value"><?php echo $track->getTrackSummary(); ?></td> - </tr> - <?php elseif($track->getUrl()): ?> - <tr> - <th class="col label"><?php echo __('Track:'); ?></th> - <td class="col value"><a href="<?php echo $this->escapeHtml($track->getUrl()); ?>" onclick="this.target='_blank'"><?php echo $this->escapeHtml($track->getUrl()); ?></a></td> - </tr> - <?php else: ?> - <?php if ($track->getStatus()): ?> - <tr> - <th class="col label"><?php echo __('Status:'); ?></th> - <td class="col value"><?php echo $track->getStatus(); ?></td> - </tr> - <?php endif; ?> - - <?php if ($track->getDeliverydate()): ?> - <tr> - <th class="col label"><?php echo __('Delivered on:'); ?></th> - <td class="col value"><?php echo $this->formatDeliveryDateTime($track->getDeliverydate(),$track->getDeliverytime()); ?></td> - </tr> - <?php endif; ?> - - <?php if ($track->getSignedby()): ?> - <tr> - <th class="col label"><?php echo __('Signed by:'); ?></th> - <td class="col value"><?php echo $track->getSignedby(); ?></td> - </tr> - <?php endif; ?> - - <?php if ($track->getDeliveryLocation()): ?> - <tr> - <th class="col label"><?php echo __('Delivered to:'); ?></th> - <td class="col value"><?php echo $track->getDeliveryLocation(); ?></td> - </tr> - <?php endif; ?> - - <?php if ($track->getShippedDate()): ?> - <tr> - <th class="col label"><?php echo __('Shipped or billed on:'); ?></th> - <td class="col value"><?php echo $track->getShippedDate(); ?></td> - </tr> - <?php endif; ?> - - <?php if ($track->getService()): ?> - <tr> - <th class="col label"><?php echo __('Service Type:'); ?></th> - <td class="col value"><?php echo $track->getService(); ?></td> - </tr> - <?php endif; ?> - - <?php if ($track->getWeight()): ?> - <tr> - <th class="col label"><?php echo __('Weight:'); ?></th> - <td class="col value"><?php echo $track->getWeight(); ?></td> - </tr> - <?php endif; ?> - <?php endif; ?> - <?php elseif(isset($track['title']) && isset($track['number']) && $track['number']): ?> - <!--if the tracking is custom value--> - <tr> - <th class="col label"><?php echo ($track['title'] ? $this->escapeHtml($track['title']) : __('N/A')); ?>:</th> - <td class="col value"><?php echo (isset($track['number']) ? $this->escapeHtml($track['number']) : ''); ?></td> - </tr> - <?php endif; ?> - </tbody> - </table> - <?php if (is_object($track) && sizeof($track->getProgressdetail())>0): ?> - <table class="data table order tracking" id="track-history-table-<?php echo $track->getTracking(); ?>"> - <thead> - <tr> - <th class="col location"><?php echo __('Location') ?></th> - <th class="col date"><?php echo __('Date') ?></th> - <th class="col time"><?php echo __('Local Time') ?></th> - <th class="col description"><?php echo __('Description') ?></th> - </tr> - </thead> - <tbody> - <?php foreach($track->getProgressdetail() as $_detail): ?> - <?php $_detailDate = (isset($_detail['deliverydate']) ? $this->formatDeliveryDate($_detail['deliverydate']) : '') ?> - <?php $_detailTime = (isset($_detail['deliverytime']) ? $this->formatDeliveryTime($_detail['deliverytime'], $_detail['deliverydate']) : '') ?> - <tr> - <td class="col location"><?php echo (isset($_detail['deliverylocation']) ? $_detail['deliverylocation'] : ''); ?></td> - <td class="col date"><?php echo $_detailDate ?></td> - <td class="col time"><?php echo $_detailTime ?></td> - <td class="col description"><?php echo (isset($_detail['activity']) ? $_detail['activity'] : '') ?></td> - </tr> - <?php endforeach; ?> - </tbody> - </table> - <?php endif; ?> - <?php if($counter!=$rowCount): ?> - <?php endif; ?> - <?php $counter++; ?> - <!--end for each tracking information--> - <?php endforeach; ?> - <?php else: ?> - <p class="empty"><?php echo __('There is no tracking available for this shipment.'); ?></p> - <?php endif; ?> - - <?php endforeach; ?> - <?php else: ?> - <p class="empty"><?php echo __('There is no tracking available.'); ?></p> - <?php endif; ?> - <div class="actions"> - <button type="button" - title="<?php echo __('Close Window') ?>" - class="action close" - onclick="window.close(); window.opener.focus();"> - <span><?php echo __('Close Window') ?></span> - </button> - </div> -</div> \ No newline at end of file diff --git a/app/design/frontend/magento_plushe/css/styles.css b/app/design/frontend/magento_plushe/css/styles.css index fde4119c9a92dea4de4d9692a1cc2f5bdfdf456d..164b29e1a5fb4a0112d075e8f3559bac5c910e0a 100644 --- a/app/design/frontend/magento_plushe/css/styles.css +++ b/app/design/frontend/magento_plushe/css/styles.css @@ -431,7 +431,7 @@ input[type="button"], .popup .actions .action.submit, .page.title .action, .block.add.review .action.submit, -.opc.wrapper .form:not(.login) .actions button.action, +.opc.wrapper .actions button.action, .step.login.wrapper button.action:not(.reload), .multicheckout .action.continue, .multicheckout .action.submit, @@ -497,7 +497,7 @@ input[type="button"], .popup .actions .action.submit, .page.title .action, .block.add.review .action.submit, -.opc.wrapper .form:not(.login) .actions button.action, +.opc.wrapper .actions button.action, .step.login.wrapper button.action:not(.reload), .multicheckout .action.continue, .multicheckout .action.submit, @@ -589,9 +589,9 @@ input[type="button"]:hover, .block.add.review .action.submit:focus, .block.add.review .action.submit:active, .block.add.review .action.submit:hover, -.opc.wrapper .form:not(.login) .actions button.action:focus, -.opc.wrapper .form:not(.login) .actions button.action:active, -.opc.wrapper .form:not(.login) .actions button.action:hover, +.opc.wrapper .actions button.action:focus, +.opc.wrapper .actions button.action:active, +.opc.wrapper .actions button.action:hover, .step.login.wrapper button.action:not(.reload):focus, .step.login.wrapper button.action:not(.reload):active, .step.login.wrapper button.action:not(.reload):hover, @@ -882,7 +882,7 @@ input[type="reset"], .popup .actions .action.cancel, .page.title .action, .block.add.review .action.submit, -.opc.wrapper .form:not(.login) .actions button.action, +.opc.wrapper .actions button.action, .step.login.wrapper button.action:not(.reload), .multicheckout .action.update, .multicheckout .action.continue, @@ -1351,7 +1351,7 @@ textarea:disabled { .form.validation .fieldset { margin: 20px 0; } -.form.settings .field { +.form.settings > .field { display: inline-block; padding-right: 20px; vertical-align: top; @@ -1597,6 +1597,57 @@ textarea:disabled { display: block; position: absolute; } +/* Field with multiple fields */ +.fields.group { + letter-spacing: -0.31em; + /* webkit */ + + *letter-spacing: normal; + /* reset IE < 8 */ + + word-spacing: -0.43em; + /* IE < 8 && gecko */ + + margin-right: -20px; +} +.fields.group > * { + letter-spacing: normal; + word-spacing: normal; +} +.fields.group .field { + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + -ms-box-sizing: border-box; + box-sizing: border-box; + vertical-align: top; + margin: 0!important; +} +.fields.group .field .label { + width: auto; + float: none; + text-align: left; + padding-right: 0; +} +.fields.group .field .control { + float: none; + width: auto; +} +.fields.group.group-2 .field { + width: 50%!important; + display: inline-block; +} +.fields.group.group-3 .field { + width: 33.3%!important; + display: inline-block; +} +.fields.group.group-4 .field { + width: 25%!important; + display: inline-block; +} +.fields.group.group-5 .field { + width: 20%!important; + display: inline-block; +} .clearlessgrid1 { width: 100%; } @@ -2416,6 +2467,10 @@ ul.messages { html.opened { overflow: hidden; } + body { + width: 100%; + height: 100%; + } body.opened { -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; @@ -2427,6 +2482,9 @@ ul.messages { left: 0; -webkit-box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5); box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5); + -webkit-transition: left 0.3s ease-out 0; + -moz-transition: left 0.3s ease-out 0; + transition: left 0.3s ease-out 0; } body.opened .page.wrapper { margin-right: -86%; @@ -3756,7 +3814,7 @@ ul.messages { .opc .fieldset { margin: 20px 0; } -.opc .fieldset .field { +.opc .fieldset > .field { display: inline-block; padding-right: 20px; vertical-align: top; @@ -4122,6 +4180,11 @@ strong { list-style-type: none; list-style-image: none; } +.hidden, +.no-display { + display: none !important; + visibility: hidden; +} /* Forms -------------------------------------- */ @@ -4129,6 +4192,9 @@ strong { content: '*'; color: #da370a; } +.fields .field { + padding-right: 20px; +} /* Magento_Page -------------------------------------- */ @@ -5194,40 +5260,40 @@ body { .opc.wrapper > .opc .section { margin-bottom: 4px; } -.opc.wrapper > .opc .section > .step-title { +.opc.wrapper > .opc .section > .step.title { padding: 15px 20px; line-height: 1; background: #da370a; font-size: 22px; } -.opc.wrapper > .opc .section > .step-title h2 { +.opc.wrapper > .opc .section > .step.title h2 { font-weight: 400; font-size: 18px; margin: 0; padding: 0; color: #fff; } -.opc.wrapper > .opc .section > .step-title .number { +.opc.wrapper > .opc .section > .step.title .number { display: none; } -.opc.wrapper > .opc .section.active > .step-title { +.opc.wrapper > .opc .section.active > .step.title { background: #f8f8f8; margin-bottom: 0; } -.opc.wrapper > .opc .section.active > .step-title h2 { +.opc.wrapper > .opc .section.active > .step.title h2 { color: #675f55; } -.opc.wrapper > .opc .section.allow > .step-title { +.opc.wrapper > .opc .section.allow > .step.title { cursor: pointer; } -.opc.wrapper > .opc .section.allow > .step-title h2:after { +.opc.wrapper > .opc .section.allow > .step.title h2:after { display: block; } -.opc.wrapper > .opc .section > .step { +.opc.wrapper > .opc .section > .step.content { padding: 0 20px 20px; background: #f8f8f8; } -.opc.wrapper > .opc .section > .step:before { +.opc.wrapper > .opc .section > .step.content:before { content: ''; border-top: 3px solid #e5e5e5; display: block; @@ -5239,7 +5305,7 @@ body { border: 0; position: relative; } -.opc.wrapper .form:not(.login) .fieldset .field { +.opc.wrapper .form:not(.login) .fieldset > .field { display: inline-block; padding-right: 20px; vertical-align: top; @@ -5267,26 +5333,6 @@ body { display: block; padding-bottom: 5px; } -.opc.wrapper .form:not(.login) .actions { - *zoom: 1; - text-align: right; -} -.opc.wrapper .form:not(.login) .actions:before, -.opc.wrapper .form:not(.login) .actions:after { - content: ""; - display: table; -} -.opc.wrapper .form:not(.login) .actions:after { - clear: both; -} -.opc.wrapper .form:not(.login) .actions button.action { - float: right; -} -.opc.wrapper .form:not(.login) .actions .secondary { - padding-top: 10px; - clear: right; - float: right; -} .opc.wrapper .form:not(.login) .field.fullname + .field.company, .opc.wrapper .form:not(.login) .field.name-lastname + .field.company, .opc.wrapper .form:not(.login) .field.country, @@ -5316,63 +5362,25 @@ body { word-spacing: normal; color: #da370a; } -.opc.wrapper .form:not(.login) .field.date .nested { - display: inline-block; - margin-right: 5px; -} -.opc.wrapper .form:not(.login) .field.date select { - width: auto; -} -.opc.wrapper .tooltip { - background: #ffffff; - border: 1px solid #c2c2c2; - display: block; - cursor: default; - padding: 30px; - position: absolute; - left: 20px; - top: 10px; -} -.opc.wrapper .tooltip.hidden { - display: none; -} -.opc.wrapper .tooltip .action.close { - position: absolute; - right: 5px; - top: 5px; +.opc.wrapper .actions { + *zoom: 1; + text-align: right; } -.opc.wrapper .tooltip .action.close span { - width: 11px; - display: block; - line-height: 0; - white-space: nowrap; - vertical-align: middle; - text-align: center; - text-indent: -999em; +.opc.wrapper .actions:before, +.opc.wrapper .actions:after { + content: ""; + display: table; } -.opc.wrapper .tooltip .action.close span:after { - font-family: "icons"; - font-size: 11px; - line-height: 11px; - height: 11px; - margin: 0; - overflow: hidden; - content: "\e012"; - font-style: normal; - speak: none; - font-weight: normal; - -webkit-font-smoothing: antialiased; - display: inline-block; - vertical-align: middle; - text-align: center; +.opc.wrapper .actions:after { + clear: both; } -.opc.wrapper .tooltip .action.close span:active { - outline: 0; +.opc.wrapper .actions button.action { + float: right; } -.opc.wrapper .tooltip .action.close span:after { - text-indent: 0; - display: block; - margin: 0; +.opc.wrapper .actions .secondary { + padding-top: 10px; + clear: right; + float: right; } .opc.wrapper .check.payable { margin: 0 0 0 20px; @@ -5388,15 +5396,24 @@ body { padding: 5px 0; width: 68%; } -.opc.wrapper .sp-methods .items, -.opc.wrapper .sp-methods .fieldset.items { +.opc.wrapper .methods.payment { + margin: 15px 0; +} +.opc.wrapper .methods.payment .item.content { + padding: 0; +} +.opc.wrapper .methods.payment .item.content > * { + padding: 15px 0; +} +.opc.wrapper .methods.payment .items, +.opc.wrapper .methods.payment .fieldset.items { margin: 0 0 0 6px; } -.opc.wrapper .sp-methods .paypal.field.items { +.opc.wrapper .methods.payment .paypal.field.items { padding: 0; width: 100%; } -.opc.wrapper .sp-methods .paypal.icon { +.opc.wrapper .methods.payment .paypal.icon { display: inline-block; margin-right: 5px; vertical-align: middle; @@ -5418,10 +5435,88 @@ body { height: 100%; background: rgba(255, 255, 255, 0.1); } -.opc.loading .active .actions .action { +.opc.loading .active .actions .secondary, +.opc.loading .active .actions .primary { visibility: hidden; - width: 1px; overflow: hidden; + height: 0px; +} +.opc.loading .active .actions .load.indicator { + margin-top: 0; +} +.fieldset.ccard { + padding: 20px 0; + margin: 20px 0; + border: 0; + position: relative; +} +.fieldset.ccard > .legend { + margin: 15px 0; +} +.fieldset.ccard > .field { + display: inline-block; + padding-right: 20px; + vertical-align: top; + width: 50%; +} +.fieldset.ccard .nested .field { + width: 100%; +} +.fieldset.ccard .actions { + margin-right: 30px; +} +.fieldset.ccard .field { + margin: 0 0 10px; +} +.fieldset.ccard .field.logos img { + display: inline-block; + vertical-align: middle; +} +.fieldset.ccard .field:last-child { + margin-bottom: 0; +} +.fieldset.ccard .field .nested { + padding: 0 0 0; +} +.fieldset.ccard .field .nested .field { + margin: 5px 0; +} +.fieldset.ccard .field:not(.choice) .label { + display: block; + padding-bottom: 5px; +} +.fieldset.ccard .field.cvv input.cvv { + width: 80px; +} +.fieldset.ccard .field.cvv .tooltip { + -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.25); + -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.25); + box-shadow: 0 0 3px rgba(0, 0, 0, 0.25); + background: #ffffff; + border: 1px solid #c2c2c2; + z-index: 99; + width: 500px; + height: 250px; + position: fixed; + float: left; + top: 50%; + left: 50%; + padding: 25px; + text-align: center; + margin: -125px 0 0 -250px; + background-color: #ffffff; + border: 1px solid #e5e5e5; +} +.fieldset.ccard .field.cvv .tooltip:before { + content: ''; + position: fixed; + z-index: -1; + display: block; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: rgba(255, 255, 255, 0.15); } /* Load Indicator @@ -5523,7 +5618,7 @@ body { Step Review -------------------------------------- */ .checkout.submit.order .actions { - margin-top: 15px; + margin-top: 20px; *zoom: 1; } .checkout.submit.order .actions:before, @@ -5538,6 +5633,7 @@ body { float: right; } .checkout.submit.order .actions .secondary { + clear: none; float: left; line-height: 32px; } @@ -5569,6 +5665,23 @@ body { text-align: left; padding-left: 20px; } +.checkout.agreements { + margin: 10px 0; +} +.checkout.agreements .item { + margin: 0 0 10px; +} +.checkout.agreements .item:last-child { + margin: 0; +} +.checkout.agreements .agreement { + background-color: #f8f8f8; + border: 1px solid #e5e5e5; + font-size: 11px; + overflow: auto; + margin: 0 0 10px; + padding: 15px; +} /* Magento_Checkout Multishipping @@ -5717,27 +5830,6 @@ body { .multicheckout.overview > .block.shipping .content:last-child { margin-bottom: 0; } -.multicheckout.overview .checkout.agreements { - padding: 0; - margin: 0; - list-style-type: none; - list-style-image: none; - margin: 10px 0; -} -.multicheckout.overview .checkout.agreements .item { - margin: 0 0 10px; -} -.multicheckout.overview .checkout.agreements .item:last-child { - margin: 0; -} -.multicheckout.overview .checkout.agreements .agreement { - background-color: #f8f8f8; - border: 1px solid #e5e5e5; - font-size: 11px; - overflow: auto; - margin: 0 0 10px; - padding: 15px; -} .multicheckout.overview > .checkout.review .grand.total { margin: 15px 0; text-align: right; @@ -5917,9 +6009,8 @@ body { -webkit-box-sizing: border-box; -ms-box-sizing: border-box; box-sizing: border-box; - border: 1px solid #e5e5e5; - height: 310px; - overflow: auto; + background: #e5e5e5; + margin: 0 -20px; padding: 20px; } .gift.message dt { @@ -5943,34 +6034,6 @@ body { margin-top: 2px; vertical-align: top; } -.gift.message .design { - *zoom: 1; - margin: 10px 0 0; -} -.gift.message .design:before, -.gift.message .design:after { - content: ""; - display: table; -} -.gift.message .design:after { - clear: both; -} -.gift.message .design img { - height: 75px; - width: 75px; - float: left; - margin-right: 15px; -} -.gift.message .design > .price { - float: left; -} -.gift.message .field.gift.wrapping .label { - display: block; - padding-bottom: 5px; -} -.gift.message .field.gift.wrapping .control select { - width: 100%; -} .gift.message .activate.message { display: inline-block; margin: 10px 0 0; @@ -5978,18 +6041,6 @@ body { .gift.message .activate.message + div .fieldset { margin-top: 0; } -.gift.message .field.gift.wrapping .design > .price > .price, -.gift.message dt > .price > .price { - display: block; -} -.gift.message .field.gift.wrapping .design > .price > .price > span, -.gift.message dt > .price > .price > span { - display: inline-block; -} -.gift.message .no-display { - display: none; -} -.gift.message .options.order .field.gift.wrapping, .gift.message .options.order .field.text { width: 100%; } @@ -6072,17 +6123,6 @@ body { vertical-align: top; width: 50%; } -.data.table .gift.wrapping { - font-size: 13px; - margin: 0; -} -.data.table .gift.wrapping dt { - font-weight: 600; - margin: 5px 0 0; -} -.data.table .gift.wrapping dd { - margin: 0 0 5px; -} /* Magento_Checkout Shopping Cart @@ -6227,6 +6267,9 @@ body { margin: 0 0 10px 10px; padding: 0; } +.items.data .item.options dd em:after { + content: ':'; +} .cart.table.wrapper { float: left; width: 665px; @@ -6932,14 +6975,13 @@ body { font-size: 12px; } .block.minicart .products.minilist .item .product.options.wrapper + .action.edit { - margin-right: 8px; + margin-right: 16px; } .block.minicart .products.minilist .item .product.options.wrapper + .action.edit:before { content: '|'; display: inline-block; text-decoration: none; padding: 0 8px; - margin-right: -16px; } .block.minicart .products.minilist .item .product.options.wrapper + .action.edit:hover:before { color: #675f55; @@ -9726,18 +9768,18 @@ img[align="right"] { position: relative; z-index: 1; } -.form.send.friend .fieldset .field, -.form.address.edit .fieldset .field, -.form.edit.account .fieldset .field, -.form.search.advanced .fieldset .field, -.form.orders.search .fieldset .field, -.form.contact .fieldset .field, -.form.password.forget .fieldset .field, -.form.create.account .fieldset .field, -.form.wishlist.share .fieldset .field, -.form.password.reset .fieldset .field, -.form.paypal.review .fieldset .field, -.form.send.confirmation .fieldset .field { +.form.send.friend .fieldset > .field, +.form.address.edit .fieldset > .field, +.form.edit.account .fieldset > .field, +.form.search.advanced .fieldset > .field, +.form.orders.search .fieldset > .field, +.form.contact .fieldset > .field, +.form.password.forget .fieldset > .field, +.form.create.account .fieldset > .field, +.form.wishlist.share .fieldset > .field, +.form.password.reset .fieldset > .field, +.form.paypal.review .fieldset > .field, +.form.send.confirmation .fieldset > .field { display: inline-block; padding-right: 20px; vertical-align: top; @@ -11344,6 +11386,10 @@ img[align="right"] { content: ""; display: none; } +.data.table th, +.data.table td { + border-right-width: 0; +} .data.table.order { margin-bottom: 45px; width: 100%; @@ -11434,7 +11480,7 @@ img[align="right"] { .billing.agreements .data.table { margin-bottom: 40px; } -.billing.agreements .form.new.agreement .field { +.billing.agreements .form.new.agreement > .field { display: inline-block; padding-right: 20px; vertical-align: top; @@ -12772,10 +12818,11 @@ img[align="right"] { display: none; } .opc.wrapper .load.indicator { - left: 0; - position: absolute; - top: 10px; - width: 100%; + /* left: 0; + position: absolute; + top: 10px; + width: 100%;*/ + } .block.progress.onepage { background: #f8f8f8; @@ -13459,7 +13506,7 @@ img[align="right"] { /* My Account -> Billing agreements -------------------------------------- */ - .billing.agreements .form.new.agreement .field { + .billing.agreements .form.new.agreement > .field { display: inline-block; padding-right: 20px; vertical-align: top; diff --git a/app/design/frontend/magento_plushe/less/lib/forms.less b/app/design/frontend/magento_plushe/less/lib/forms.less index e31ebb390cc622a821ab7dce49f3b463341e2c8d..18723a86f7be45ade3b8932d5a54a2118677b437 100644 --- a/app/design/frontend/magento_plushe/less/lib/forms.less +++ b/app/design/frontend/magento_plushe/less/lib/forms.less @@ -156,7 +156,7 @@ } .formCols(@fieldWidth : 50%) { - .field { + > .field { display: inline-block; padding-right: 20px; vertical-align: top; @@ -916,4 +916,40 @@ textarea { display: block; position: absolute; } -} \ No newline at end of file +} + +/* Field with multiple fields */ + +.fields.group { + letter-spacing: -0.31em; /* webkit */ + *letter-spacing: normal; /* reset IE < 8 */ + word-spacing: -0.43em; /* IE < 8 && gecko */ + margin-right: -20px; + & > * { + letter-spacing: normal; + word-spacing: normal; + } + .field { + .box-sizing(); + vertical-align:top; + margin:0!important; + .label { width:auto; float:none; text-align: left; padding-right:0; } + .control { float:none; width:auto; } + } + &.group-2 .field { + width:50%!important; + display:inline-block; + } + &.group-3 .field { + width:33.3%!important; + display:inline-block; + } + &.group-4 .field { + width:25%!important; + display:inline-block; + } + &.group-5 .field { + width:20%!important; + display:inline-block; + } +} diff --git a/app/design/frontend/magento_plushe/less/lib/navigation.less b/app/design/frontend/magento_plushe/less/lib/navigation.less index 6b1bd5ccd974fca15f1c944cdf79127590238d24..2fc4100e9915d649a7afaddbee3bdcf5fdfd05b8 100644 --- a/app/design/frontend/magento_plushe/less/lib/navigation.less +++ b/app/design/frontend/magento_plushe/less/lib/navigation.less @@ -446,6 +446,8 @@ } body { + width: 100%; + height: 100%; &.opened { -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; @@ -457,6 +459,7 @@ left: 0; -webkit-box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5); box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5); + .transition(left .3s ease-out 0); } .page.wrapper { margin-right: -86%; diff --git a/app/design/frontend/magento_plushe/less/responsive/responsive.less b/app/design/frontend/magento_plushe/less/responsive/responsive.less index 15ace45ff259c0e77650145665bae869ee9fa4a0..e38d75756ff7b5b2160c2d55f3fd08984c49da01 100644 --- a/app/design/frontend/magento_plushe/less/responsive/responsive.less +++ b/app/design/frontend/magento_plushe/less/responsive/responsive.less @@ -1126,10 +1126,10 @@ and (max-width : @breakPoint1) { // Load indicator .load.indicator { - left: 0; +/* left: 0; position: absolute; top: 10px; - width: 100%; + width: 100%;*/ } } diff --git a/app/design/frontend/magento_plushe/less/styles.less b/app/design/frontend/magento_plushe/less/styles.less index 6fe0c23a23ca671211b407acdaf776b0d5534ca4..c50ba837fef60e1b913f13327101baf49f56cb14 100644 --- a/app/design/frontend/magento_plushe/less/styles.less +++ b/app/design/frontend/magento_plushe/less/styles.less @@ -45,6 +45,11 @@ strong { .resetList(); } +.hidden, +.no-display { + .hidden(); +} + /* Forms -------------------------------------- */ @@ -52,6 +57,9 @@ strong { content: '*'; color: @requiredField; } +.fields .field { + padding-right: 20px; +} /* Magento_Page @@ -857,7 +865,7 @@ body { .resetList(); .section { margin-bottom: 4px; - > .step-title { + > .step.title { padding: 15px 20px; line-height: 1; background: @secondary1; @@ -874,7 +882,7 @@ body { } } &.active { - > .step-title { + > .step.title { background: @primary1; margin-bottom: 0; h2 { @@ -882,13 +890,13 @@ body { } } } - &.allow > .step-title { + &.allow > .step.title { cursor: pointer; h2:after { display: block; } } - > .step { + > .step.content { padding: 0 20px 20px; background: @primary1; &:before { @@ -917,19 +925,6 @@ body { } } } - .actions { - .clearfix(); - text-align: right; - button.action { - float: right; - &:extend(.primary.action all); - } - .secondary { - padding-top: 10px; - clear: right; - float: right; - } - } .field.fullname + .field.company, .field.name-lastname + .field.company, .field.country, @@ -959,36 +954,18 @@ body { word-spacing: normal; color: @secondary1; } - .field.date { - .nested { - display: inline-block; - margin-right: 5px; - } - select { - width: auto; - } - } } - .tooltip { - background: @primary7; - border: 1px solid @primary3; - display: block; - cursor: default; - padding: 30px; - position: absolute; - left: 20px; - top: 10px; - &.hidden { - display: none; + .actions { + .clearfix(); + text-align: right; + button.action { + float: right; + &:extend(.primary.action all); } - .action.close { - position: absolute; - right: 5px; - top: 5px; - span { - .iconAfter(@content: @icon-close-thick, @size: 11px, @font: 'icons'); - .iconHideText(11px); - } + .secondary { + padding-top: 10px; + clear: right; + float: right; } } .check.payable { @@ -1005,7 +982,14 @@ body { width: 68%; } } - .sp-methods { + .methods.payment { + margin:15px 0; + .item.content { + padding:0; + & > * { + padding:15px 0; + } + } .items, .fieldset.items { margin: 0 0 0 6px; @@ -1039,10 +1023,68 @@ body { height: 100%; background: rgba(255, 255, 255, 0.1); } - .actions .action { + .actions .secondary, + .actions .primary { visibility: hidden; - width: 1px; overflow: hidden; + height:0px; + } + .actions .load.indicator { + margin-top:0; + } +} + +.fieldset.ccard { + > .legend { + margin:15px 0; + } + .formCols(); + padding: 20px 0; + margin: 20px 0; + border: 0; + position: relative; +} +.fieldset.ccard .field { + &.logos { + img { + display: inline-block; + vertical-align: middle; + } + } + .fieldStyle(); + &:not(.choice) { + .label { + display: block; + padding-bottom: 5px; + } + } + &.cvv { + input.cvv { width:80px; } + .tooltip { + .box-shadow(0 0 3px rgba(0,0,0,0.25)); + background: @primary7; + border: 1px solid @primary3; + z-index: 99; + width:500px; + height:250px; + position: fixed; + float:left; + top:50%; + left:50%; + padding:25px; + text-align: center; + margin:-125px 0 0 -250px; + background-color:@pageMainBg; + border:1px solid @primary2; + &:before { + content:''; + position: fixed; + z-index: -1; + display: block; + top:0; left: 0; right:0; bottom: 0; + background-color:fade(@pageMainBg, 15%); + } + } } } @@ -1133,12 +1175,13 @@ body { -------------------------------------- */ .checkout.submit.order { .actions { - margin-top: 15px; + margin-top: 20px; .clearfix(); .primary { float: right; } .secondary { + clear:none; float: left; line-height: 32px; } @@ -1179,6 +1222,24 @@ body { } } +.checkout.agreements { + margin: 10px 0; + .item { + margin: 0 0 10px; + &:last-child { + margin: 0; + } + } + .agreement { + background-color: @primary1; + border: 1px solid @primary2; + font-size: 11px; + overflow: auto; + margin: 0 0 10px; + padding: 15px; + } +} + /* Magento_Checkout Multishipping @@ -1303,24 +1364,6 @@ body { } } } - .checkout.agreements { - .resetList(); - margin: 10px 0; - .item { - margin: 0 0 10px; - &:last-child { - margin: 0; - } - } - .agreement { - background-color: @primary1; - border: 1px solid @primary2; - font-size: 11px; - overflow: auto; - margin: 0 0 10px; - padding: 15px; - } - } > .checkout.review { .grand.total { margin: 15px 0; @@ -1537,11 +1580,11 @@ body { } .block.items { .box-sizing(); - border: 1px solid @primary2; - height: 310px; - overflow: auto; + background: @primary2; + margin:0 -20px; + //height: 310px; + //overflow: auto; padding: 20px; - } dt { margin: 30px 0 0; @@ -1564,30 +1607,6 @@ body { margin-top: 2px; vertical-align: top; } - .design { - .clearfix(); - margin: 10px 0 0; - img { - height: 75px; - width: 75px; - float: left; - margin-right: 15px; - } - > .price { - float: left; - } - } - .field.gift.wrapping { - .label { - display: block; - padding-bottom: 5px; - } - .control { - select { - width: 100%; - } - } - } .activate.message { display: inline-block; margin: 10px 0 0; @@ -1597,20 +1616,7 @@ body { } } } - .field.gift.wrapping .design > .price, - dt > .price { - > .price { - display: block; - > span { - display: inline-block; - } - } - } - .no-display { - display: none; - } .options.order { - .field.gift.wrapping, .field.text { width: 100%; } @@ -1683,17 +1689,6 @@ body { } } } -.data.table .gift.wrapping { - font-size: 13px; - margin: 0; - dt { - font-weight: 600; - margin: 5px 0 0; - } - dd { - margin: 0 0 5px; - } -} /* Magento_Checkout @@ -1838,6 +1833,9 @@ body { font-weight: @baseFontWeightLighter; margin: 0 0 10px 10px; padding: 0; + em:after { + content:':'; + } } } @@ -2490,13 +2488,12 @@ body { font-size: @baseFontSizeMiddle; } .product.options.wrapper + .action.edit { - margin-right:8px; + margin-right:16px; &:before { content: '|'; display: inline-block; text-decoration: none; padding: 0 8px; - margin-right:-16px; } &:hover:before { color: @primary6; @@ -5343,6 +5340,11 @@ img[align="right"] { } } +.data.table { + th, td { + border-right-width:0; + } +} .data.table.order { margin-bottom: 45px; width: 100%; diff --git a/app/etc/di.xml b/app/etc/di.xml index cbf5699e2b332b7e3f1a8066dbf1cf771f09313f..fb25f5490970da61e28119b2879cee9e825846c0 100644 --- a/app/etc/di.xml +++ b/app/etc/di.xml @@ -36,7 +36,7 @@ <preference for="Magento\App\Cache\TypeListInterface" type="Magento\App\Cache\TypeList" /> <preference for="Magento\Core\Model\Store\ConfigInterface" type="Magento\Core\Model\Store\Config" /> <preference for="Magento\Core\Model\StoreManagerInterface" type="Magento\Core\Model\StoreManager" /> - <preference for="Magento\View\DesignInterface" type="Magento\Core\Model\View\Design" /> + <preference for="Magento\View\DesignInterface" type="Magento\Core\Model\View\Design\Proxy" /> <preference for="Magento\View\Design\ThemeInterface" type="Magento\Core\Model\Theme" /> <preference for="Magento\View\ConfigInterface" type="Magento\View\Config" /> <preference for="Magento\Core\Model\LocaleInterface" type="Magento\Core\Model\Locale" /> @@ -58,12 +58,27 @@ <preference for="Magento\App\Resource\ConfigInterface" type="Magento\App\Resource\Config\Proxy" /> <preference for="Magento\App\Cache\State\OptionsInterface" type="Magento\Core\Model\Resource\Cache" /> <preference for="Magento\Oauth\OauthInterface" type="Magento\Oauth\Oauth"/> + <preference for="Magento\View\Design\Theme\Domain\PhysicalInterface" type="Magento\Core\Model\Theme\Domain\Physical" /> + <preference for="Magento\View\Design\Theme\Domain\VirtualInterface" type="Magento\Core\Model\Theme\Domain\Virtual" /> + <preference for="Magento\View\Design\Theme\Domain\StagingInterface" type="Magento\Core\Model\Theme\Domain\Staging" /> <type name="Magento\View\BlockPool" shared="false" /> + <type name="Magento\App\Request\Http"> + <param name="pathInfoProcessor"> + <instance type="Magento\Core\App\Request\PathInfoProcessor\Proxy" /> + </param> + </type> <preference for="Magento\Error\HandlerInterface" type="Magento\App\Error\Handler" /> <preference for="Magento\Module\Output\ConfigInterface" type="Magento\Core\Model\Module\Output\Config" /> <preference for="Magento\View\Design\Theme\CustomizationInterface" type="Magento\View\Design\Theme\Customization" /> <preference for="Magento\Image\Adapter\ConfigInterface" type="Magento\Core\Model\Image\Adapter\Config" /> <preference for="Magento\View\Design\Theme\Image\PathInterface" type="Magento\Core\Model\Theme\Image\Path" /> + <preference for="Magento\TranslateInterface" type="Magento\Core\Model\Translate" /> + <preference for="Magento\Config\ScopeListInterface" type="interceptionConfigScope" /> + <virtualType name="interceptionConfigScope" type="Magento\Config\Scope"> + <param name="defaultScope"> + <value>global</value> + </param> + </virtualType> <type name="Magento\App\State"> <param name="installDate"> <value type="argument">Magento\App\State::PARAM_INSTALL_DATE</value> diff --git a/dev/tests/integration/framework/Magento/TestFramework/App/State.php b/dev/tests/integration/framework/Magento/TestFramework/App/State.php index 8f2fd38b31822ad9ee4342dd2c31778258274dca..eb86a656890af5a35dd2f73c9a2deeeb36b46854 100644 --- a/dev/tests/integration/framework/Magento/TestFramework/App/State.php +++ b/dev/tests/integration/framework/Magento/TestFramework/App/State.php @@ -37,7 +37,7 @@ class State extends \Magento\App\State */ public function getAreaCode() { - return $this->_areaCode;; + return $this->_areaCode; } /** diff --git a/dev/tests/integration/framework/Magento/TestFramework/Interception/PluginList.php b/dev/tests/integration/framework/Magento/TestFramework/Interception/PluginList.php new file mode 100644 index 0000000000000000000000000000000000000000..50aa310c4e66f1ccbcd73408bcf8435e547e7b37 --- /dev/null +++ b/dev/tests/integration/framework/Magento/TestFramework/Interception/PluginList.php @@ -0,0 +1,70 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\TestFramework\Interception; + +class PluginList extends \Magento\Interception\PluginList\PluginList +{ + /** + * @var array + */ + protected $_originScopeScheme = array(); + + /** + * @param \Magento\Config\ReaderInterface $reader + * @param \Magento\Config\ScopeInterface $configScope + * @param \Magento\Config\CacheInterface $cache + * @param \Magento\ObjectManager\Relations $relations + * @param \Magento\ObjectManager\Config $omConfig + * @param \Magento\Interception\Definition $definitions + * @param array $scopePriorityScheme + * @param \Magento\ObjectManager\Definition\Compiled $classDefinitions + * @param string $cacheId + */ + public function __construct( + \Magento\Config\ReaderInterface $reader, + \Magento\Config\ScopeInterface $configScope, + \Magento\Config\CacheInterface $cache, + \Magento\ObjectManager\Relations $relations, + \Magento\ObjectManager\Config $omConfig, + \Magento\Interception\Definition $definitions, + array $scopePriorityScheme, + \Magento\ObjectManager\Definition\Compiled $classDefinitions = null, + $cacheId = 'plugins' + ) { + parent::__construct($reader, $configScope, $cache, $relations, $omConfig, + $definitions, $scopePriorityScheme, $classDefinitions, $cacheId); + $this->_originScopeScheme = $this->_scopePriorityScheme; + } + + /** + * Reset internal cache + */ + public function reset() + { + $this->_scopePriorityScheme = $this->_originScopeScheme; + $this->_data = array(); + $this->_loadedScopes = array(); + } +} \ No newline at end of file diff --git a/dev/tests/integration/framework/Magento/TestFramework/ObjectManager.php b/dev/tests/integration/framework/Magento/TestFramework/ObjectManager.php index 36c179929c2f5405186289574c157be163fd55df..500805dd68bce30ebf3f2b019f28859f8cc99ca6 100644 --- a/dev/tests/integration/framework/Magento/TestFramework/ObjectManager.php +++ b/dev/tests/integration/framework/Magento/TestFramework/ObjectManager.php @@ -51,10 +51,16 @@ class ObjectManager extends \Magento\App\ObjectManager } \Magento\Core\Model\Config\Base::destroy(); - $sharedInstances = array('Magento\ObjectManager' => $this, 'Magento\App\ObjectManager' => $this); + $sharedInstances = array( + 'Magento\ObjectManager' => $this, 'Magento\App\ObjectManager' => $this + ); if (isset($this->_sharedInstances['Magento\App\Resource'])) { $sharedInstances['Magento\App\Resource'] = $this->_sharedInstances['Magento\App\Resource']; } + + if (isset($this->_sharedInstances['Magento\Config\Scope'])) { + $sharedInstances['Magento\Config\Scope'] = $this->_sharedInstances['Magento\Config\Scope']; + } $this->_sharedInstances = $sharedInstances; $this->_config->clean(); diff --git a/dev/tests/integration/framework/Magento/TestFramework/ObjectManagerFactory.php b/dev/tests/integration/framework/Magento/TestFramework/ObjectManagerFactory.php index d557af477e6a37c1d275af9d3b8af1a5bb993da4..ec9ea2a26b62f23afc8bfe1ffa21519209ea8b39 100644 --- a/dev/tests/integration/framework/Magento/TestFramework/ObjectManagerFactory.php +++ b/dev/tests/integration/framework/Magento/TestFramework/ObjectManagerFactory.php @@ -47,6 +47,11 @@ class ObjectManagerFactory extends \Magento\App\ObjectManagerFactory */ protected $_primaryConfigData = null; + /** + * @var \Magento\TestFramework\Interception\PluginList + */ + protected $_pluginList = null; + /** * Restore locator instance * @@ -65,6 +70,8 @@ class ObjectManagerFactory extends \Magento\App\ObjectManagerFactory \Magento\TestFramework\ObjectManager::setInstance($objectManager); + $this->_pluginList->reset(); + $objectManager->configure($this->_primaryConfigData); $objectManager->addSharedInstance($directories, 'Magento\App\Dir'); $objectManager->configure(array( @@ -113,4 +120,31 @@ class ObjectManagerFactory extends \Magento\App\ObjectManagerFactory } return $this->_primaryConfigData; } + + /** + * Create plugin list object + * + * @param \Magento\ObjectManager $locator + * @param \Magento\ObjectManager\Relations $relations + * @param \Magento\ObjectManager\DefinitionFactory $definitionFactory + * @param \Magento\ObjectManager\Config\Config $diConfig + * @param \Magento\ObjectManager\Definition $definitions + * @return \Magento\Interception\PluginList\PluginList + */ + protected function _createPluginList( + \Magento\ObjectManager $locator, + \Magento\ObjectManager\Relations $relations, + \Magento\ObjectManager\DefinitionFactory $definitionFactory, + \Magento\ObjectManager\Config\Config $diConfig, + \Magento\ObjectManager\Definition $definitions + ) { + $locator->configure(array('preferences' => + array('Magento\Interception\PluginList\PluginList' => 'Magento\TestFramework\Interception\PluginList') + )); + $this->_pluginList = parent::_createPluginList( + $locator, $relations, $definitionFactory, $diConfig, $definitions + ); + return $this->_pluginList; + } + } diff --git a/dev/tests/integration/framework/Magento/TestFramework/TestCase/AbstractController.php b/dev/tests/integration/framework/Magento/TestFramework/TestCase/AbstractController.php index b7fce6df7765fe184956c416b2bb9832cad8b3c1..e5d8c02f7e29aeec3b7cd30ecb9af307a433604e 100644 --- a/dev/tests/integration/framework/Magento/TestFramework/TestCase/AbstractController.php +++ b/dev/tests/integration/framework/Magento/TestFramework/TestCase/AbstractController.php @@ -97,7 +97,7 @@ abstract class AbstractController extends \PHPUnit_Framework_TestCase { if ($this->_assertSessionErrors) { // equalTo() is intentionally used instead of isEmpty() to provide the informative diff - $this->assertSessionMessages($this->equalTo(array()), \Magento\Core\Model\Message::ERROR); + $this->assertSessionMessages($this->equalTo(array()), \Magento\Message\Factory::ERROR); } } @@ -143,7 +143,7 @@ abstract class AbstractController extends \PHPUnit_Framework_TestCase */ public function assert404NotFound() { - $this->assertEquals('noRoute', $this->getRequest()->getActionName()); + $this->assertEquals('noroute', $this->getRequest()->getControllerName()); $this->assertContains('404 Not Found', $this->getResponse()->getBody()); } @@ -198,12 +198,12 @@ abstract class AbstractController extends \PHPUnit_Framework_TestCase /** * Assert that actual session messages meet expectations: * Usage examples: - * $this->assertSessionMessages($this->isEmpty(), \Magento\Core\Model\Message::ERROR); + * $this->assertSessionMessages($this->isEmpty(), \Magento\Message\Factory::ERROR); * $this->assertSessionMessages($this->equalTo(array('Entity has been saved.')), - * \Magento\Core\Model\Message::SUCCESS); + * \Magento\Message\Factory::SUCCESS); * * @param \PHPUnit_Framework_Constraint $constraint Constraint to compare actual messages against - * @param string|null $messageType Message type filter, one of the constants \Magento\Core\Model\Message::* + * @param string|null $messageType Message type filter, one of the constants \Magento\Message\Factory::* * @param string $sessionModel Class of the session model that manages messages */ public function assertSessionMessages( @@ -213,7 +213,7 @@ abstract class AbstractController extends \PHPUnit_Framework_TestCase /** @var $session \Magento\Core\Model\Session\AbstractSession */ $session = $this->_objectManager->get($sessionModel); $actualMessages = array(); - /** @var $message \Magento\Core\Model\Message\AbstractMessage */ + /** @var $message \Magento\Message\AbstractMessage */ foreach ($session->getMessages()->getItems($messageType) as $message) { $actualMessages[] = $message->getText(); } diff --git a/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/CookieTest.php b/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/CookieTest.php index ad10cd15d2fa474796fe7f8a7947488ad7aac7c1..62997c8abc9decfe2a7fe8db3464681e3e2e1458 100644 --- a/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/CookieTest.php +++ b/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/CookieTest.php @@ -49,8 +49,8 @@ class CookieTest extends \PHPUnit_Framework_TestCase $this->getMock('Magento\Core\Model\StoreManager', array(), array(), '', false), new \Magento\TestFramework\Request( $this->getMock('\Magento\App\Route\ConfigInterface'), - 'http://example.com', - $this->getMock('Magento\App\Request\PathInfoProcessorInterface') + $this->getMock('Magento\App\Request\PathInfoProcessorInterface'), + 'http://example.com' ), new \Magento\TestFramework\Response( $this->getMock('Magento\Event\ManagerInterface', array(), array(), '', false) diff --git a/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/RequestTest.php b/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/RequestTest.php index a6d9fa065cc7ecb0a06b5d20ec65ff6431fc1b0e..6ae043e4a1c3f2cabb4a49fc8a7b90a4939976c6 100644 --- a/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/RequestTest.php +++ b/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/RequestTest.php @@ -37,7 +37,8 @@ class RequestTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->_model = new \Magento\TestFramework\Request( - $this->getMock('Magento\App\Route\ConfigInterface', array(), array(), '', false) + $this->getMock('Magento\App\Route\ConfigInterface', array(), array(), '', false), + $this->getMock('Magento\App\Request\PathInfoProcessorInterface', array(), array(), '', false) ); } diff --git a/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/TestCase/ControllerAbstractTest.php b/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/TestCase/ControllerAbstractTest.php index b726dbefec984df1f54f2b98cb8199ba747ef53a..79704a1a07336c1662b925cec7909b03a42b33d8 100644 --- a/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/TestCase/ControllerAbstractTest.php +++ b/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/TestCase/ControllerAbstractTest.php @@ -37,16 +37,17 @@ class ControllerAbstractTest extends \Magento\TestFramework\TestCase\AbstractCon protected function setUp() { // emulate session messages - $messagesCollection = new \Magento\Core\Model\Message\Collection(); + $messagesCollection = new \Magento\Message\Collection(); $messagesCollection - ->add(new \Magento\Core\Model\Message\Warning('some_warning')) - ->add(new \Magento\Core\Model\Message\Error('error_one')) - ->add(new \Magento\Core\Model\Message\Error('error_two')) - ->add(new \Magento\Core\Model\Message\Notice('some_notice')) + ->add(new \Magento\Message\Warning('some_warning')) + ->add(new \Magento\Message\Error('error_one')) + ->add(new \Magento\Message\Error('error_two')) + ->add(new \Magento\Message\Notice('some_notice')) ; $session = new \Magento\Object(array('messages' => $messagesCollection)); $request = new \Magento\TestFramework\Request( - $this->getMock('\Magento\App\Route\ConfigInterface', array(), array(), '', false) + $this->getMock('\Magento\App\Route\ConfigInterface', array(), array(), '', false), + $this->getMock('Magento\App\Request\PathInfoProcessorInterface', array(), array(), '', false) ); $response = new \Magento\TestFramework\Response(); @@ -94,7 +95,7 @@ class ControllerAbstractTest extends \Magento\TestFramework\TestCase\AbstractCon */ public function testAssert404NotFound() { - $this->getRequest()->setActionName('noRoute'); + $this->getRequest()->setControllerName('noroute'); $this->getResponse()->setBody( '404 Not Found test <h3>We are sorry, but the page you are looking for cannot be found.</h3>' ); @@ -154,7 +155,7 @@ class ControllerAbstractTest extends \Magento\TestFramework\TestCase\AbstractCon { return array( 'no message type filtering' => array(array('some_warning', 'error_one', 'error_two', 'some_notice'), null), - 'message type filtering' => array(array('error_one', 'error_two'), \Magento\Core\Model\Message::ERROR), + 'message type filtering' => array(array('error_one', 'error_two'), \Magento\Message\Factory::ERROR), ); } diff --git a/dev/tests/integration/phpunit.xml.dist b/dev/tests/integration/phpunit.xml.dist index b4517d85707c35e70cfb7dae1ac9476ce3cf9fef..665146b3c0fce39119b53ae8f5ef17eed343406f 100644 --- a/dev/tests/integration/phpunit.xml.dist +++ b/dev/tests/integration/phpunit.xml.dist @@ -75,7 +75,7 @@ <!-- Metrics for Bamboo Profiler Output in PHP file that returns array --> <!--<const name="TESTS_BAMBOO_PROFILER_METRICS_FILE" value="../../build/profiler_metrics.php"/>--> <!-- Magento mode for tests execution. Possible values are "default", "developer" and "production". --> - <!--<const name="TESTS_MAGENTO_MODE" value="default"/>--> + <const name="TESTS_MAGENTO_MODE" value="developer"/> <!-- Connection parameters for MongoDB library tests --> <!--<const name="MONGODB_CONNECTION_STRING" value="mongodb://localhost:27017"/>--> <!--<const name="MONGODB_DATABASE_NAME" value="magento_integration_tests"/>--> diff --git a/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Newsletter/SubscriberTest.php b/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Newsletter/SubscriberTest.php index 85bdb121a2f45c8515fc7c6d8843b6dbef6d92b7..15a98eea39f1a3b5d49114a1f9a527d9d034b307 100644 --- a/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Newsletter/SubscriberTest.php +++ b/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Newsletter/SubscriberTest.php @@ -38,8 +38,8 @@ class SubscriberTest extends \PHPUnit_Framework_TestCase $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface'); /** @var $block \Magento\Adminhtml\Block\Newsletter\Subscriber */ $block = $layout->createBlock('Magento\Adminhtml\Block\Newsletter\Subscriber', 'block'); - /** @var $childBlock \Magento\Core\Block\Template */ - $childBlock = $layout->addBlock('Magento\Core\Block\Template', 'grid', 'block'); + /** @var $childBlock \Magento\View\Block\Template */ + $childBlock = $layout->addBlock('Magento\View\Block\Template', 'grid', 'block'); $expected = 'test_data'; $this->assertNotEquals($expected, $block->getShowQueueAdd()); diff --git a/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Widget/Form/ContainerTest.php b/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Widget/Form/ContainerTest.php index b6fb60bcc8b4036194dfe59266676a7867d7eaff..0e0e6b030721f4ca9aad6ee6bb6710ae32d22446 100644 --- a/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Widget/Form/ContainerTest.php +++ b/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Widget/Form/ContainerTest.php @@ -41,13 +41,13 @@ class ContainerTest extends \PHPUnit_Framework_TestCase /** @var $block \Magento\Adminhtml\Block\Widget\Form\Container */ $block = $this->getMock('Magento\Adminhtml\Block\Widget\Form\Container', array('_prepareLayout'), array( - $objectManager->create('Magento\Core\Helper\Data'), $objectManager->create('Magento\Backend\Block\Template\Context'), + $objectManager->create('Magento\Core\Helper\Data'), ) ); $layout->addBlock($block, 'block'); - $form = $layout->addBlock('Magento\Core\Block\Text', 'form', 'block'); + $form = $layout->addBlock('Magento\View\Block\Text', 'form', 'block'); $expectedHtml = '<b>html</b>'; $this->assertNotEquals($expectedHtml, $block->getFormHtml()); diff --git a/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Widget/Grid/Massaction/ItemTest.php b/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Widget/Grid/Massaction/ItemTest.php index 2bed5b208055e0c5aa700ef0d487cf9b9bdec31a..bdfc76be3fa0a421cebec567cd43471e70a783df 100644 --- a/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Widget/Grid/Massaction/ItemTest.php +++ b/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Widget/Grid/Massaction/ItemTest.php @@ -38,7 +38,7 @@ class ItemTest extends \PHPUnit_Framework_TestCase $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface'); /** @var $block \Magento\Adminhtml\Block\Widget\Grid\Massaction\Item */ $block = $layout->createBlock('Magento\Adminhtml\Block\Widget\Grid\Massaction\Item', 'block'); - $expected = $layout->addBlock('Magento\Core\Block\Template', 'additional_action', 'block'); + $expected = $layout->addBlock('Magento\View\Block\Template', 'additional_action', 'block'); $this->assertSame($expected, $block->getAdditionalActionBlock()); } } diff --git a/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Widget/GridTest.php b/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Widget/GridTest.php index 40e2e428d4bcf425e5f7d11179ed1f649ad228c1..f3bd2e292526b651af3da553e06ee2e3683b23d9 100644 --- a/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Widget/GridTest.php +++ b/dev/tests/integration/testsuite/Magento/Adminhtml/Block/Widget/GridTest.php @@ -38,7 +38,7 @@ class GridTest extends \PHPUnit_Framework_TestCase $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface'); /** @var $block \Magento\Adminhtml\Block\Widget\Grid */ $block = $layout->createBlock('Magento\Adminhtml\Block\Widget\Grid', 'block'); - $child = $layout->addBlock('Magento\Core\Block\Template', 'massaction', 'block'); + $child = $layout->addBlock('Magento\View\Block\Template', 'massaction', 'block'); $this->assertSame($child, $block->getMassactionBlock()); } } diff --git a/dev/tests/integration/testsuite/Magento/Adminhtml/Controller/CacheTest.php b/dev/tests/integration/testsuite/Magento/Adminhtml/Controller/CacheTest.php index 19fd31bbbdfd9552302c276e3c201814f24041a0..bd1f9102e7bc2e7a0ee4474ac24b5072778f32d3 100644 --- a/dev/tests/integration/testsuite/Magento/Adminhtml/Controller/CacheTest.php +++ b/dev/tests/integration/testsuite/Magento/Adminhtml/Controller/CacheTest.php @@ -174,7 +174,7 @@ class CacheTest extends \Magento\Backend\Utility\Controller $this->dispatch('backend/admin/cache/' . $action); $this->assertSessionMessages( $this->contains("Specified cache type(s) don't exist: invalid_type_1, invalid_type_2"), - \Magento\Core\Model\Message::ERROR + \Magento\Message\Factory::ERROR ); } diff --git a/dev/tests/integration/testsuite/Magento/Adminhtml/Controller/NewsletterQueueTest.php b/dev/tests/integration/testsuite/Magento/Adminhtml/Controller/NewsletterQueueTest.php index ccd72b23071216b35e5c026b823838aa21926d0e..89c3d5bf586126ada690f073c64f00c8034b5f13 100644 --- a/dev/tests/integration/testsuite/Magento/Adminhtml/Controller/NewsletterQueueTest.php +++ b/dev/tests/integration/testsuite/Magento/Adminhtml/Controller/NewsletterQueueTest.php @@ -71,13 +71,13 @@ class NewsletterQueueTest extends \Magento\Backend\Utility\Controller /** * Check that errors was generated and set to session */ - $this->assertSessionMessages($this->isEmpty(), \Magento\Core\Model\Message::ERROR); + $this->assertSessionMessages($this->isEmpty(), \Magento\Message\Factory::ERROR); /** * Check that success message is set */ $this->assertSessionMessages( - $this->equalTo(array('The newsletter queue has been saved.')), \Magento\Core\Model\Message::SUCCESS + $this->equalTo(array('The newsletter queue has been saved.')), \Magento\Message\Factory::SUCCESS ); } } diff --git a/dev/tests/integration/testsuite/Magento/Adminhtml/Controller/NewsletterTemplateTest.php b/dev/tests/integration/testsuite/Magento/Adminhtml/Controller/NewsletterTemplateTest.php index 74ff9121b0f702528674a88f1ea01038a35b855f..fe8d41fd44af1d7b8015f23c8b6f5c0630a33b88 100644 --- a/dev/tests/integration/testsuite/Magento/Adminhtml/Controller/NewsletterTemplateTest.php +++ b/dev/tests/integration/testsuite/Magento/Adminhtml/Controller/NewsletterTemplateTest.php @@ -72,12 +72,12 @@ class NewsletterTemplateTest extends \Magento\Backend\Utility\Controller /** * Check that errors was generated and set to session */ - $this->assertSessionMessages($this->isEmpty(), \Magento\Core\Model\Message::ERROR); + $this->assertSessionMessages($this->isEmpty(), \Magento\Message\Factory::ERROR); /** * Check that success message is set */ $this->assertSessionMessages( - $this->equalTo(array('The newsletter template has been saved.')), \Magento\Core\Model\Message::SUCCESS + $this->equalTo(array('The newsletter template has been saved.')), \Magento\Message\Factory::SUCCESS ); } @@ -94,13 +94,13 @@ class NewsletterTemplateTest extends \Magento\Backend\Utility\Controller /** * Check that errors was generated and set to session */ - $this->assertSessionMessages($this->isEmpty(), \Magento\Core\Model\Message::ERROR); + $this->assertSessionMessages($this->isEmpty(), \Magento\Message\Factory::ERROR); /** * Check that success message is set */ $this->assertSessionMessages( - $this->equalTo(array('The newsletter template has been saved.')), \Magento\Core\Model\Message::SUCCESS + $this->equalTo(array('The newsletter template has been saved.')), \Magento\Message\Factory::SUCCESS ); } @@ -121,12 +121,12 @@ class NewsletterTemplateTest extends \Magento\Backend\Utility\Controller /** * Check that errors was generated and set to session */ - $this->assertSessionMessages($this->logicalNot($this->isEmpty()), \Magento\Core\Model\Message::ERROR); + $this->assertSessionMessages($this->logicalNot($this->isEmpty()), \Magento\Message\Factory::ERROR); /** * Check that success message is not set */ - $this->assertSessionMessages($this->isEmpty(), \Magento\Core\Model\Message::SUCCESS); + $this->assertSessionMessages($this->isEmpty(), \Magento\Message\Factory::SUCCESS); } /** @@ -142,13 +142,13 @@ class NewsletterTemplateTest extends \Magento\Backend\Utility\Controller /** * Check that errors was generated and set to session */ - $this->assertSessionMessages($this->isEmpty(), \Magento\Core\Model\Message::ERROR); + $this->assertSessionMessages($this->isEmpty(), \Magento\Message\Factory::ERROR); /** * Check that success message is set */ $this->assertSessionMessages( - $this->equalTo(array('The newsletter template has been deleted.')), \Magento\Core\Model\Message::SUCCESS + $this->equalTo(array('The newsletter template has been deleted.')), \Magento\Message\Factory::SUCCESS ); } } diff --git a/dev/tests/integration/testsuite/Magento/App/FrontControllerTest.php b/dev/tests/integration/testsuite/Magento/App/FrontControllerTest.php index ae6a6e862ac716917c112d8e6ad4b50a3547f73d..84790e1e7f52e8e8a23fca0d9361765a7e09d98f 100644 --- a/dev/tests/integration/testsuite/Magento/App/FrontControllerTest.php +++ b/dev/tests/integration/testsuite/Magento/App/FrontControllerTest.php @@ -48,23 +48,6 @@ class FrontControllerTest extends \PHPUnit_Framework_TestCase $this->_model = $this->_objectManager->create('Magento\App\FrontController'); } - public function testGetRequest() - { - $this->assertNull($this->_model->getRequest()); - } - - public function testGetResponse() - { - \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\App')->setResponse( - \Magento\TestFramework\Helper\Bootstrap::getObjectManager() - ->get('Magento\App\ResponseInterface') - ); - if (!\Magento\TestFramework\Helper\Bootstrap::canTestHeaders()) { - $this->markTestSkipped('Can\'t test get response without sending headers'); - } - $this->assertInstanceOf('Magento\App\ResponseInterface', $this->_model->getResponse()); - } - public function testDispatch() { if (!\Magento\TestFramework\Helper\Bootstrap::canTestHeaders()) { @@ -75,8 +58,6 @@ class FrontControllerTest extends \PHPUnit_Framework_TestCase $request = $this->_objectManager->create('Magento\App\Request\Http'); /* empty action */ $request->setRequestUri('core/index/index'); - $this->_model->dispatch($request); - $this->assertEmpty($this->_model->getResponse()->getBody()); - $this->assertEquals($request, $this->_model->getRequest()); + $this->assertEmpty($this->_model->dispatch($request)->getBody()); } } diff --git a/dev/tests/integration/testsuite/Magento/Backend/Controller/AbstractActionTest.php b/dev/tests/integration/testsuite/Magento/Backend/App/AbstractActionTest.php similarity index 97% rename from dev/tests/integration/testsuite/Magento/Backend/Controller/AbstractActionTest.php rename to dev/tests/integration/testsuite/Magento/Backend/App/AbstractActionTest.php index 144358a0e02f28c8c13de4bda6c8e232ad5c0680..7b125d831498e97d520fa85efd3ab5195ab3c822 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Controller/AbstractActionTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/App/AbstractActionTest.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Backend\Controller; +namespace Magento\Backend\App; /** * Test class for \Magento\Backend\Controller\AbstractAction. @@ -50,7 +50,6 @@ class AbstractActionTest extends \Magento\Backend\Utility\Controller /** * Check login redirection * - * @covers \Magento\Backend\Controller\AbstractAction::_initAuthentication * @magentoDbIsolation enabled */ public function testInitAuthentication() diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/System/Config/FormTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/System/Config/FormTest.php index 136949b222917dc717515b76e0742cde8966af89..ca2e56e43f7a3355d845acf6d59f3e4a2afa0acd 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Block/System/Config/FormTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Block/System/Config/FormTest.php @@ -78,8 +78,8 @@ class FormTest extends \PHPUnit_Framework_TestCase /** @var $block \Magento\Backend\Block\System\Config\Form */ $block = $layout->createBlock('Magento\Backend\Block\System\Config\Form', 'block'); - /** @var $childBlock \Magento\Core\Block\Text */ - $childBlock = $layout->addBlock('Magento\Core\Block\Text', 'element_dependence', 'block'); + /** @var $childBlock \Magento\View\Block\Text */ + $childBlock = $layout->addBlock('Magento\View\Block\Text', 'element_dependence', 'block'); $expectedValue = 'dependence_html_relations'; $this->assertNotContains($expectedValue, $block->toHtml()); @@ -258,15 +258,6 @@ class FormTest extends \PHPUnit_Framework_TestCase { \Magento\TestFramework\Helper\Bootstrap::getObjectManager() ->get('Magento\App\ResponseInterface')->headersSentThrowsException = false; - \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\Core\Controller\Front\Action', - array( - 'request' => \Magento\TestFramework\Helper\Bootstrap::getObjectManager() - ->get('Magento\App\Request\Http'), - 'response' => \Magento\TestFramework\Helper\Bootstrap::getObjectManager() - ->get('Magento\Core\Model\App')->getResponse() - ) - ); \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\RequestInterface') ->setParam('section', 'general'); /** @var $block \Magento\Backend\Block\System\Config\Form */ diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Grid/ColumnSetTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Grid/ColumnSetTest.php index e8df531d5dae1f13ed915b31c5a2e6244981dece..b1a1059d4d67f3b66d817076c4ad68c849653ca1 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Grid/ColumnSetTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Grid/ColumnSetTest.php @@ -62,7 +62,7 @@ class ColumnSetTest extends \PHPUnit_Framework_TestCase )); $context = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() - ->create('Magento\Core\Block\Template\Context', array('layout' => $this->_layoutMock)); + ->create('Magento\View\Block\Template\Context', array('layout' => $this->_layoutMock)); $this->_block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface') ->createBlock( 'Magento\Backend\Block\Widget\Grid\ColumnSet', '', array('context' => $context) diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/GridTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/GridTest.php index 2ad1ec80e84bea86f16740a8a58d8198dc976595..6755bdcac1038743be2eef6b93584a3c81db7ff3 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/GridTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/GridTest.php @@ -87,12 +87,12 @@ class GridTest extends \PHPUnit_Framework_TestCase protected function _getColumnSetMock() { return $this->getMock('Magento\Backend\Block\Widget\Grid\ColumnSet', array(), array( - $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false), \Magento\TestFramework\Helper\Bootstrap::getObjectManager() - ->create('Magento\Core\Block\Template\Context', array( - 'dirs' => new \Magento\App\Dir(__DIR__), - 'filesystem' => new \Magento\Filesystem(new \Magento\Filesystem\Adapter\Local), - )), + ->create('Magento\View\Block\Template\Context', array( + 'dirs' => new \Magento\App\Dir(__DIR__), + 'filesystem' => new \Magento\Filesystem(new \Magento\Filesystem\Adapter\Local), + )), + $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false), \Magento\TestFramework\Helper\Bootstrap::getObjectManager() ->create('Magento\Backend\Model\Widget\Grid\Row\UrlGeneratorFactory'), \Magento\TestFramework\Helper\Bootstrap::getObjectManager() diff --git a/dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/IndexTest.php b/dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/IndexTest.php index aa6e5bc43791b164e6c9041e54d1ce99cfc5d260..a5d4d98a96db0c332ad563563174132b8c527505 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/IndexTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/IndexTest.php @@ -33,33 +33,19 @@ namespace Magento\Backend\Controller\Adminhtml; * * @magentoAppArea adminhtml */ -class IndexTest extends \Magento\TestFramework\TestCase\AbstractController +class IndexTest extends \Magento\Backend\Utility\Controller { /** - * @var \Magento\Backend\Model\Auth + * @covers \Magento\Backend\Controller\Adminhtml\Index::globalSearchAction */ - protected $_auth; - - /** - * Performs user login - */ - protected function _login() + public function testGlobalSearchAction() { - \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Backend\Model\Url') - ->turnOffSecretKey(); - $this->_auth = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Backend\Model\Auth'); - $this->_auth->login( - \Magento\TestFramework\Bootstrap::ADMIN_NAME, \Magento\TestFramework\Bootstrap::ADMIN_PASSWORD); - } + $this->getRequest()->setParam('isAjax', 'true'); + $this->getRequest()->setPost('query', 'dummy'); + $this->dispatch('backend/admin/index/globalSearch'); - /** - * Performs user logout - */ - protected function _logout() - { - $this->_auth->logout(); - \Magento\TestFramework\Helper\Bootstrap::getObjectManager() - ->get('Magento\Backend\Model\Url')->turnOnSecretKey(); + $actual = $this->getResponse()->getBody(); + $this->assertEquals(array(), json_decode($actual)); } /** @@ -68,6 +54,7 @@ class IndexTest extends \Magento\TestFramework\TestCase\AbstractController */ public function testNotLoggedIndexAction() { + $this->_auth->logout(); $this->dispatch('backend/admin/index/index'); $this->assertFalse($this->getResponse()->isRedirect()); @@ -83,9 +70,7 @@ class IndexTest extends \Magento\TestFramework\TestCase\AbstractController */ public function testLoggedIndexAction() { - $this->_login(); $this->dispatch('backend/admin/index/index'); $this->assertRedirect(); - $this->_logout(); } } diff --git a/dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/System/DesignTest.php b/dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/System/DesignTest.php index ccd6839cefc72e5d1a7e979282e482fc9bc59227..3fafa903eacbc5b150fc8c86051adfc1e12b6ef4 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/System/DesignTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/System/DesignTest.php @@ -33,7 +33,7 @@ namespace Magento\Backend\Controller\Adminhtml\System; class DesignTest extends \Magento\Backend\Utility\Controller { /** - * @covers \Magento\Backend\Controller\Adminhtml\Action::_addLeft + * @covers \Magento\Backend\App\Action::_addLeft */ public function testEditAction() { diff --git a/dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/System/VariableTest.php b/dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/System/VariableTest.php index 6bbb5070461866e836b28c06a3ee4b14bf772dfd..709979ee42b5f1de68289695d90a6618c6e559aa 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/System/VariableTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/System/VariableTest.php @@ -33,7 +33,7 @@ namespace Magento\Backend\Controller\Adminhtml\System; class VariableTest extends \Magento\Backend\Utility\Controller { /** - * @covers \Magento\Backend\Controller\Adminhtml\Action::_addLeft + * @covers \Magento\Backend\App\Action::_addLeft */ public function testEditAction() { diff --git a/dev/tests/integration/testsuite/Magento/Captcha/Model/ObserverTest.php b/dev/tests/integration/testsuite/Magento/Captcha/Model/ObserverTest.php index 2d400efa86a27b72d02d87709ad28129e7b1d092..0d7446806d527f0723ce933c0f767c4ce90979e5 100644 --- a/dev/tests/integration/testsuite/Magento/Captcha/Model/ObserverTest.php +++ b/dev/tests/integration/testsuite/Magento/Captcha/Model/ObserverTest.php @@ -119,7 +119,7 @@ class ObserverTest extends \Magento\TestFramework\TestCase\AbstractController $this->getRequest()->setPost(array('email' => 'dummy@dummy.com', 'captcha' => '1234')); $this->dispatch('backend/admin/auth/forgotpassword'); $this->assertSessionMessages( - $this->equalTo(array('Incorrect CAPTCHA')), \Magento\Core\Model\Message::ERROR, + $this->equalTo(array('Incorrect CAPTCHA')), \Magento\Message\Factory::ERROR, 'Magento\Backend\Model\Session' ); } diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Toolbar/AddTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Toolbar/AddTest.php index 35600bf3f9e10655ee940b79ec84d52d9a304907..9d361167fa07b597697cae10e288e042d66568d9 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Toolbar/AddTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Toolbar/AddTest.php @@ -41,7 +41,7 @@ class AddTest extends \PHPUnit_Framework_TestCase 'block'); $block->setArea('adminhtml')->unsetChild('setForm'); - $childBlock = $layout->addBlock('Magento\Core\Block\Template', 'setForm', 'block'); + $childBlock = $layout->addBlock('Magento\View\Block\Template', 'setForm', 'block'); $form = new \Magento\Object(); $childBlock->setForm($form); diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Super/Config/MatrixTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Super/Config/MatrixTest.php index 405a9c458a3b2ce43e25484417ada78b727d5a6a..b643a33212faa1d6a6fc1eb985c41ab0595fb845 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Super/Config/MatrixTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Super/Config/MatrixTest.php @@ -44,7 +44,7 @@ class MatrixTest extends \PHPUnit_Framework_TestCase ->register('current_product', \Magento\TestFramework\Helper\Bootstrap::getObjectManager() ->create('Magento\Catalog\Model\Product')->load(1)); \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface') - ->createBlock('Magento\Core\Block\Text', 'head'); + ->createBlock('Magento\View\Block\Text', 'head'); /** @var $usedAttribute \Magento\Catalog\Model\Entity\Attribute */ $usedAttribute = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() ->get('Magento\Catalog\Model\Entity\Attribute')->loadByCode( diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Super/ConfigTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Super/ConfigTest.php index 08e26287253ad13e8d802cd1b070af6c3f941f56..2f61f44383f1f0046deb788e06fc656a47fddd42 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Super/ConfigTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Super/ConfigTest.php @@ -57,7 +57,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $objectManager->get('Magento\Core\Model\Registry') ->register('current_product', $objectManager->create('Magento\Catalog\Model\Product')->load(1)); - $objectManager->get('Magento\View\LayoutInterface')->createBlock('Magento\Core\Block\Text', 'head'); + $objectManager->get('Magento\View\LayoutInterface')->createBlock('Magento\View\Block\Text', 'head'); $usedAttribute = $objectManager->get('Magento\Catalog\Model\Entity\Attribute')->loadByCode( \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Eav\Model\Config') ->getEntityType('catalog_product')->getId(), diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Edit/TabsTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Edit/TabsTest.php index 1e52d510c4264f1aaa1fc43ab2c065640b2aa696..c933d3fb36412caa2199a3ca0633eb20f158c7e2 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Edit/TabsTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Edit/TabsTest.php @@ -50,7 +50,7 @@ class TabsTest extends \PHPUnit_Framework_TestCase $objectManager->get('Magento\App\State')->setAreaCode('nonexisting'); /** @var $layout \Magento\Core\Model\Layout */ $layout = $objectManager->get('Magento\View\LayoutInterface'); - $layout->addBlock('Magento\Core\Block\Text', 'head'); + $layout->addBlock('Magento\View\Block\Text', 'head'); /** @var $block \Magento\Catalog\Block\Adminhtml\Product\Edit\Tabs */ $block = $layout->createBlock('Magento\Catalog\Block\Adminhtml\Product\Edit\Tabs'); $this->assertArrayHasKey(0, $block->getTabsIds()); diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ListTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ListTest.php index 2d907c48d0b81e3f6708c005b2bf47c16ccc9573..8d26cb491028ccce7288fd9d56b59ffe91ac2568 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ListTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ListTest.php @@ -98,7 +98,7 @@ class ListTest extends \PHPUnit_Framework_TestCase $layout = $this->_getLayout(); /** @var $parent \Magento\Catalog\Block\Product\ListProduct */ $parent = $layout->createBlock('Magento\Catalog\Block\Product\ListProduct'); - $childBlock = $layout->createBlock('Magento\Core\Block\Text', 'test', array('data' => array('text' => 'test'))); + $childBlock = $layout->createBlock('Magento\View\Block\Text', 'test', array('data' => array('text' => 'test'))); $layout->setChild($parent->getNameInLayout(), $childBlock->getNameInLayout(), 'additional'); $this->assertEquals('test', $parent->getAdditionalHtml()); } diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ProductList/CrosssellTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ProductList/CrosssellTest.php index 1b40e69e5ea07568b3dafc46f1077f6f5a6aceee..e76bd5620984ca125b6948d0e6fbe5a4dee1f9ca 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ProductList/CrosssellTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ProductList/CrosssellTest.php @@ -49,7 +49,8 @@ class CrosssellTest extends \PHPUnit_Framework_TestCase ->createBlock('Magento\Catalog\Block\Product\ProductList\Crosssell'); $block->setLayout(\Magento\TestFramework\Helper\Bootstrap::getObjectManager() ->get('Magento\View\LayoutInterface')); - $block->setTemplate('Magento_Checkout::cart/crosssell.phtml'); + $block->setTemplate('Magento_Catalog::product/list/items.phtml'); + $block->setType('crosssell'); $block->setItemCount(1); $html = $block->toHtml(); diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ProductList/ToolbarTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ProductList/ToolbarTest.php index be90d2fdb80c3fe766618ee7e16387f4df525de9..a85e6bb3ab7b9ebf969299ff57493020b8aa9826 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ProductList/ToolbarTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ProductList/ToolbarTest.php @@ -35,8 +35,8 @@ class ToolbarTest extends \PHPUnit_Framework_TestCase $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface'); /** @var $block \Magento\Catalog\Block\Product\ProductList\Toolbar */ $block = $layout->createBlock('Magento\Catalog\Block\Product\ProductList\Toolbar', 'block'); - /** @var $childBlock \Magento\Core\Block\Text */ - $childBlock = $layout->addBlock('Magento\Core\Block\Text', 'product_list_toolbar_pager', 'block'); + /** @var $childBlock \Magento\View\Block\Text */ + $childBlock = $layout->addBlock('Magento\View\Block\Text', 'product_list_toolbar_pager', 'block'); $expectedHtml = '<b>Any text there</b>'; $this->assertNotEquals($expectedHtml, $block->getPagerHtml()); diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/View/AdditionalTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/View/AdditionalTest.php index 1658e0dd36c1f9be0ff86e9a58d5466510dd6084..d5b05edbee9eae2ca30ddae73c1286594351ea4b 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/View/AdditionalTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/View/AdditionalTest.php @@ -36,13 +36,13 @@ class AdditionalTest extends \PHPUnit_Framework_TestCase /** @var $block \Magento\Catalog\Block\Product\View\Additional */ $block = $layout->createBlock('Magento\Catalog\Block\Product\View\Additional', 'block'); - /** @var $childFirst \Magento\Core\Block\Text */ - $childFirst = $layout->addBlock('Magento\Core\Block\Text', 'child1', 'block'); + /** @var $childFirst \Magento\View\Block\Text */ + $childFirst = $layout->addBlock('Magento\View\Block\Text', 'child1', 'block'); $htmlFirst = '<b>Any html of child1</b>'; $childFirst->setText($htmlFirst); - /** @var $childSecond \Magento\Core\Block\Text */ - $childSecond = $layout->addBlock('Magento\Core\Block\Text', 'child2', 'block'); + /** @var $childSecond \Magento\View\Block\Text */ + $childSecond = $layout->addBlock('Magento\View\Block\Text', 'child2', 'block'); $htmlSecond = '<b>Any html of child2</b>'; $childSecond->setText($htmlSecond); diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ViewTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ViewTest.php index 79845640ec6cb8123b197a6919ca123c15f219ac..daabbdfccd38a6a1296ca2108f272afe8a590179 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ViewTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ViewTest.php @@ -58,7 +58,7 @@ class ViewTest extends \PHPUnit_Framework_TestCase { /** @var $layout \Magento\Core\Model\Layout */ $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface'); - $headBlock = $layout->createBlock('Magento\Core\Block\Template', 'head'); + $headBlock = $layout->createBlock('Magento\View\Block\Template', 'head'); $layout->addBlock($this->_block); $this->assertNotEmpty($headBlock->getTitle()); diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/CategoryTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/CategoryTest.php index e066593db4d82f42bcbc11166f58ff214e05cd56..e1234f7e37d9f941110cf1f3cfb5f6917ffe9af4 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/CategoryTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/CategoryTest.php @@ -54,7 +54,7 @@ class CategoryTest extends \Magento\Backend\Utility\Controller $this->dispatch('backend/catalog/category/save'); $this->assertSessionMessages( - $this->equalTo(array('You saved the category.')), \Magento\Core\Model\Message::SUCCESS + $this->equalTo(array('You saved the category.')), \Magento\Message\Factory::SUCCESS ); /** @var $category \Magento\Catalog\Model\Category */ @@ -305,7 +305,7 @@ class CategoryTest extends \Magento\Backend\Utility\Controller )); $this->dispatch('backend/catalog/category/save'); $this->assertSessionMessages( - $this->equalTo(array('Unable to save the category')), \Magento\Core\Model\Message::ERROR + $this->equalTo(array('Unable to save the category')), \Magento\Message\Factory::ERROR ); } } diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/ProductTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/ProductTest.php index 22880b178c8006354a4150f626ad9537d1043186..4d97a63d5bf1bdef7e2f4a6ef5996bcb5fd2e32f 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/ProductTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/ProductTest.php @@ -80,7 +80,7 @@ class ProductTest extends \Magento\Backend\Utility\Controller )); $this->dispatch('backend/catalog/product/save'); $this->assertSessionMessages( - $this->equalTo(array('Unable to save product')), \Magento\Core\Model\Message::ERROR + $this->equalTo(array('Unable to save product')), \Magento\Message\Factory::ERROR ); $this->assertRedirect($this->stringContains('/backend/catalog/product/edit')); } @@ -94,7 +94,7 @@ class ProductTest extends \Magento\Backend\Utility\Controller $this->dispatch('backend/catalog/product/save/id/1'); $this->assertRedirect($this->stringStartsWith('http://localhost/index.php/backend/catalog/product/new/')); $this->assertSessionMessages( - $this->contains('You saved the product.'), \Magento\Core\Model\Message::SUCCESS + $this->contains('You saved the product.'), \Magento\Message\Factory::SUCCESS ); } @@ -112,10 +112,10 @@ class ProductTest extends \Magento\Backend\Utility\Controller $this->stringStartsWith('http://localhost/index.php/backend/catalog/product/edit/id/1/') )); $this->assertSessionMessages( - $this->contains('You saved the product.'), \Magento\Core\Model\Message::SUCCESS + $this->contains('You saved the product.'), \Magento\Message\Factory::SUCCESS ); $this->assertSessionMessages( - $this->contains('You duplicated the product.'), \Magento\Core\Model\Message::SUCCESS + $this->contains('You duplicated the product.'), \Magento\Message\Factory::SUCCESS ); } diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Controller/Product/CompareTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Controller/Product/CompareTest.php index 811f23658c1d8fdecdf4c9a7536484d88932730d..9266e5c55ba828bd667e535a891d3b53c7dcc61e 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Controller/Product/CompareTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Controller/Product/CompareTest.php @@ -40,7 +40,7 @@ class CompareTest extends \Magento\TestFramework\TestCase\AbstractController /** @var $session \Magento\Catalog\Model\Session */ $session = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Catalog\Model\Session'); - $this->assertInstanceOf('Magento\Core\Model\Message\Success', $session->getMessages()->getLastAddedMessage()); + $this->assertInstanceOf('Magento\Message\Success', $session->getMessages()->getLastAddedMessage()); $this->assertContains('Simple Product 1 Name', (string)$session->getMessages()->getLastAddedMessage()->getText()); @@ -68,7 +68,7 @@ class CompareTest extends \Magento\TestFramework\TestCase\AbstractController /** @var $session \Magento\Catalog\Model\Session */ $session = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Catalog\Model\Session'); - $this->assertInstanceOf('Magento\Core\Model\Message\Success', $session->getMessages()->getLastAddedMessage()); + $this->assertInstanceOf('Magento\Message\Success', $session->getMessages()->getLastAddedMessage()); $this->assertContains('Simple Product 2 Name', (string)$session->getMessages()->getLastAddedMessage()->getText()); @@ -108,7 +108,7 @@ class CompareTest extends \Magento\TestFramework\TestCase\AbstractController /** @var $session \Magento\Catalog\Model\Session */ $session = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Catalog\Model\Session'); - $this->assertInstanceOf('Magento\Core\Model\Message\Success', $session->getMessages()->getLastAddedMessage()); + $this->assertInstanceOf('Magento\Message\Success', $session->getMessages()->getLastAddedMessage()); $this->assertRedirect(); diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Helper/Product/ViewTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Helper/Product/ViewTest.php index 7cd53a74488a797801164706a8e2b248b0e28769..2ac45f964bf983429ce3c9df59c439d05c76f74d 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Helper/Product/ViewTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Helper/Product/ViewTest.php @@ -44,6 +44,11 @@ class ViewTest extends \PHPUnit_Framework_TestCase */ protected $_controller; + /** + * @var \Magento\View\LayoutInterface + */ + protected $_layout; + protected function setUp() { $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); @@ -52,7 +57,7 @@ class ViewTest extends \PHPUnit_Framework_TestCase ->setDefaultDesignTheme(); $this->_helper = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() ->get('Magento\Catalog\Helper\Product\View'); - $request = $objectManager->create('Magento\TestFramework\Request'); + $request = $objectManager->get('Magento\TestFramework\Request'); $request->setRouteName('catalog') ->setControllerName('product') ->setActionName('view'); @@ -62,13 +67,16 @@ class ViewTest extends \PHPUnit_Framework_TestCase ->get('Magento\TestFramework\Response'), ); $context = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() - ->create('Magento\Core\Controller\Varien\Action\Context', $arguments); + ->create('Magento\App\Action\Context', $arguments); $this->_controller = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( 'Magento\Catalog\Controller\Product', array( 'context' => $context, ) ); + + $this->_layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() + ->get('Magento\View\LayoutInterface'); } /** @@ -98,10 +106,10 @@ class ViewTest extends \PHPUnit_Framework_TestCase $objectManager->get('Magento\Core\Model\Registry')->register('product', $product); $this->_helper->initProductLayout($product, $this->_controller); - $rootBlock = $this->_controller->getLayout()->getBlock('root'); + $rootBlock = $this->_layout->getBlock('root'); $this->assertInstanceOf('Magento\Page\Block\Html', $rootBlock); $this->assertContains("product-{$uniqid}", $rootBlock->getBodyClass()); - $handles = $this->_controller->getLayout()->getUpdate()->getHandles(); + $handles = $this->_layout->getUpdate()->getHandles(); $this->assertContains('catalog_product_view_type_simple', $handles); } @@ -128,13 +136,7 @@ class ViewTest extends \PHPUnit_Framework_TestCase public function testPrepareAndRenderWrongController() { $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $controller = $objectManager->create( - 'Magento\Core\Controller\Front\Action', - array( - 'request' => $objectManager->get('Magento\TestFramework\Request'), - 'response' => $objectManager->get('Magento\TestFramework\Response'), - ) - ); + $controller = $objectManager->create('Magento\Catalog\Controller\Product'); $this->_helper->prepareAndRender(10, $controller); } @@ -172,14 +174,12 @@ class ViewTest extends \PHPUnit_Framework_TestCase $this->_helper->prepareAndRender(10, $this->_controller); // assert messages - $actualMessages = $this->_controller->getLayout() - ->getMessagesBlock() - ->getMessages(); + $actualMessages = $this->_layout->getMessagesBlock()->getMessages(); $this->assertSameSize($expectedMessages, $actualMessages); sort($expectedMessages); - /** @var $message \Magento\Core\Model\Message\Notice */ + /** @var $message \Magento\Message\Notice */ foreach ($actualMessages as $key => $message) { $actualMessages[$key] = $message->getText(); } diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/AttributeTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/AttributeTest.php index b1c61b27dc37771989a7348605d5a45c087295e2..48b2e4cb96c317ccfba0d19399c6632a3c27436d 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/AttributeTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/AttributeTest.php @@ -80,7 +80,7 @@ class AttributeTest extends \PHPUnit_Framework_TestCase $this->_model->apply( $request, \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface') - ->createBlock('Magento\Core\Block\Text')) + ->createBlock('Magento\View\Block\Text')) ; $this->assertEmpty($this->_model->getLayer()->getState()->getFilters()); @@ -96,7 +96,7 @@ class AttributeTest extends \PHPUnit_Framework_TestCase $this->_model->apply( $request, \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface') - ->createBlock('Magento\Core\Block\Text') + ->createBlock('Magento\View\Block\Text') ); $this->assertNotEmpty($this->_model->getLayer()->getState()->getFilters()); diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/CategoryTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/CategoryTest.php index ab426da3e1490e93d5e8e4aedd34b6834a3d0f1f..6f5b0a39c5fde14fbc1dba071afc50cc19508891 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/CategoryTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/CategoryTest.php @@ -70,7 +70,7 @@ class CategoryTest extends \PHPUnit_Framework_TestCase $this->_model->apply( $objectManager->get('Magento\TestFramework\Request'), \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface') - ->createBlock('Magento\Core\Block\Text') + ->createBlock('Magento\View\Block\Text') ); /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); @@ -85,7 +85,7 @@ class CategoryTest extends \PHPUnit_Framework_TestCase $this->_model->apply( $request, \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface') - ->createBlock('Magento\Core\Block\Text') + ->createBlock('Magento\View\Block\Text') ); /** @var $category \Magento\Catalog\Model\Category */ diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/DecimalTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/DecimalTest.php index d55907e94ff18a60fe28ad8fcf35048d9848b2cf..0c46998b7b9b1cef4ab68f16b7d1e0d66bda6329 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/DecimalTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/DecimalTest.php @@ -72,7 +72,7 @@ class DecimalTest extends \PHPUnit_Framework_TestCase $this->_model->apply( $request, \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface') - ->createBlock('Magento\Core\Block\Text') + ->createBlock('Magento\View\Block\Text') ); $this->assertEmpty($this->_model->getData('range')); @@ -89,7 +89,7 @@ class DecimalTest extends \PHPUnit_Framework_TestCase $this->_model->apply( $request, \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface') - ->createBlock('Magento\Core\Block\Text') + ->createBlock('Magento\View\Block\Text') ); $this->assertEmpty($this->_model->getData('range')); @@ -105,7 +105,7 @@ class DecimalTest extends \PHPUnit_Framework_TestCase $this->_model->apply( $request, \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface') - ->createBlock('Magento\Core\Block\Text') + ->createBlock('Magento\View\Block\Text') ); $this->assertEquals(100, $this->_model->getData('range')); diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/ItemTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/ItemTest.php index 18bf376162d755f432cdc73987bd40dba97312b0..24902a8cf6140e5e39829dea5d8656a0ad8caef3 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/ItemTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/ItemTest.php @@ -76,16 +76,14 @@ class ItemTest extends \PHPUnit_Framework_TestCase $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); /** @var $request \Magento\TestFramework\Request */ $request = $objectManager->get('Magento\TestFramework\Request'); - $action = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\Core\Controller\Front\Action', + \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( + 'Magento\App\Action\Action', array( 'request' => $request, 'response' => \Magento\TestFramework\Helper\Bootstrap::getObjectManager() ->get('Magento\TestFramework\Response'), ) ); - \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\App')->getFrontController() - ->setAction($action); // done in action's constructor $this->assertStringEndsWith('/?cat%5B0%5D=valuePart1&cat%5B1%5D=valuePart2', $this->_model->getUrl()); } @@ -110,7 +108,7 @@ class ItemTest extends \PHPUnit_Framework_TestCase $this->_model->getFilter()->apply( $request, \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface') - ->createBlock('Magento\Core\Block\Text') + ->createBlock('Magento\View\Block\Text') ); $this->assertStringEndsWith('/x/y/z/?cat=3', $this->_model->getRemoveUrl()); diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/Price/AlgorithmAdvancedTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/Price/AlgorithmAdvancedTest.php index 188807407e7df673a98cb114d97b3ba4678f261e..94d6c2bf252340a67e3b7ada390fe14aad29e12a 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/Price/AlgorithmAdvancedTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/Price/AlgorithmAdvancedTest.php @@ -68,7 +68,7 @@ class AlgorithmAdvancedTest extends \PHPUnit_Framework_TestCase $filter->apply( $request, \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface') - ->createBlock('Magento\Core\Block\Text') + ->createBlock('Magento\View\Block\Text') ); $interval = $filter->getInterval(); if ($interval) { diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/PriceTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/PriceTest.php index 2d8dd7464e52f9eeec0df8bff74b62a3b0b5f6a0..2b5cd688ff3179d423b452369424e2e18a6f9198 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/PriceTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/PriceTest.php @@ -105,7 +105,7 @@ class PriceTest extends \PHPUnit_Framework_TestCase $this->_model->apply( $request, \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface') - ->createBlock('Magento\Core\Block\Text') + ->createBlock('Magento\View\Block\Text') ); $this->assertEmpty($this->_model->getData('price_range')); @@ -122,7 +122,7 @@ class PriceTest extends \PHPUnit_Framework_TestCase $this->_model->apply( $request, \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface') - ->createBlock('Magento\Core\Block\Text') + ->createBlock('Magento\View\Block\Text') ); $this->assertEmpty($this->_model->getData('price_range')); @@ -141,7 +141,7 @@ class PriceTest extends \PHPUnit_Framework_TestCase $this->_model->apply( $request, \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface') - ->createBlock('Magento\Core\Block\Text') + ->createBlock('Magento\View\Block\Text') ); $this->assertEquals(array(10, 20), $this->_model->getData('interval')); diff --git a/dev/tests/integration/testsuite/Magento/CatalogSearch/Block/Advanced/ResultTest.php b/dev/tests/integration/testsuite/Magento/CatalogSearch/Block/Advanced/ResultTest.php index 8ece02d37628f2730458cf21f7294b60b5a57678..8273f564ee6d150156f67d915ac90ae1bd3796b5 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogSearch/Block/Advanced/ResultTest.php +++ b/dev/tests/integration/testsuite/Magento/CatalogSearch/Block/Advanced/ResultTest.php @@ -66,7 +66,7 @@ class ResultTest extends \PHPUnit_Framework_TestCase \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Catalog\Model\Layer') ->setCurrentCategory($category); - $childBlock = $this->_layout->addBlock('Magento\Core\Block\Text', 'search_result_list', 'block'); + $childBlock = $this->_layout->addBlock('Magento\View\Block\Text', 'search_result_list', 'block'); $expectedOptions = array( 'option1' => 'Label Option 1', @@ -82,8 +82,8 @@ class ResultTest extends \PHPUnit_Framework_TestCase */ public function testSetListModes() { - /** @var $childBlock \Magento\Core\Block\Text */ - $childBlock = $this->_layout->addBlock('Magento\Core\Block\Text', 'search_result_list', 'block'); + /** @var $childBlock \Magento\View\Block\Text */ + $childBlock = $this->_layout->addBlock('Magento\View\Block\Text', 'search_result_list', 'block'); $this->assertEmpty($childBlock->getModes()); $this->_block->setListModes(); $this->assertNotEmpty($childBlock->getModes()); @@ -91,8 +91,8 @@ class ResultTest extends \PHPUnit_Framework_TestCase public function testSetListCollection() { - /** @var $childBlock \Magento\Core\Block\Text */ - $childBlock = $this->_layout->addBlock('Magento\Core\Block\Text', 'search_result_list', 'block'); + /** @var $childBlock \Magento\View\Block\Text */ + $childBlock = $this->_layout->addBlock('Magento\View\Block\Text', 'search_result_list', 'block'); $this->assertEmpty($childBlock->getCollection()); $this->_block->setListCollection(); $this->assertInstanceOf( diff --git a/dev/tests/integration/testsuite/Magento/CatalogSearch/Block/ResultTest.php b/dev/tests/integration/testsuite/Magento/CatalogSearch/Block/ResultTest.php index 5ced3929b363a3c2ffbad9fdfb1538db0e455dba..71aae82a729af25ccd8dff7a46252f1dd47dbf25 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogSearch/Block/ResultTest.php +++ b/dev/tests/integration/testsuite/Magento/CatalogSearch/Block/ResultTest.php @@ -33,10 +33,10 @@ class ResultTest extends \PHPUnit_Framework_TestCase { /** @var $layout \Magento\Core\Model\Layout */ $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface'); - $layout->addBlock('Magento\Core\Block\Text', 'head'); // The tested block is using head block + $layout->addBlock('Magento\View\Block\Text', 'head'); // The tested block is using head block /** @var $block \Magento\CatalogSearch\Block\Result */ $block = $layout->addBlock('Magento\CatalogSearch\Block\Result', 'block'); - $childBlock = $layout->addBlock('Magento\Core\Block\Text', 'search_result_list', 'block'); + $childBlock = $layout->addBlock('Magento\View\Block\Text', 'search_result_list', 'block'); $this->assertSame($childBlock, $block->getListBlock()); } diff --git a/dev/tests/integration/testsuite/Magento/CatalogSearch/Helper/DataTest.php b/dev/tests/integration/testsuite/Magento/CatalogSearch/Helper/DataTest.php index f82c7743863ef9937bebf488530932441bd598db..a34d625c9f900c378948890ff5633b423268ce1a 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogSearch/Helper/DataTest.php +++ b/dev/tests/integration/testsuite/Magento/CatalogSearch/Helper/DataTest.php @@ -69,7 +69,7 @@ class DataTest extends \PHPUnit_Framework_TestCase /** @var \Magento\CatalogSearch\Helper\Data $catalogSearchHelper */ $catalogSearchHelper = $this->getMock('Magento\CatalogSearch\Helper\Data', array('getQueryText'), array( - $objectManager->get('Magento\Core\Helper\Context'), + $objectManager->get('Magento\App\Helper\Context'), $objectManager->get('Magento\Stdlib\String'), $objectManager->get('Magento\Core\Model\Store\ConfigInterface'), $objectManager->get('Magento\CatalogSearch\Model\QueryFactory'), diff --git a/dev/tests/integration/testsuite/Magento/Checkout/Block/CartTest.php b/dev/tests/integration/testsuite/Magento/Checkout/Block/CartTest.php index cb457468f0ceb8612de5eb553f9379c947f2f514..4cfec93d00ae629fb81cb7cccf57755b67f682fa 100644 --- a/dev/tests/integration/testsuite/Magento/Checkout/Block/CartTest.php +++ b/dev/tests/integration/testsuite/Magento/Checkout/Block/CartTest.php @@ -36,9 +36,9 @@ class CartTest extends \PHPUnit_Framework_TestCase { /** @var $layout \Magento\Core\Model\Layout */ $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface'); - $child = $layout->createBlock('Magento\Core\Block\Text') - ->setChild('child1', $layout->createBlock('Magento\Core\Block\Text', 'method1')) - ->setChild('child2', $layout->createBlock('Magento\Core\Block\Text', 'method2')); + $child = $layout->createBlock('Magento\View\Block\Text') + ->setChild('child1', $layout->createBlock('Magento\View\Block\Text', 'method1')) + ->setChild('child2', $layout->createBlock('Magento\View\Block\Text', 'method2')); /** @var $block \Magento\Checkout\Block\Cart */ $block = $layout->createBlock('Magento\Checkout\Block\Cart') ->setChild('child', $child); @@ -50,7 +50,7 @@ class CartTest extends \PHPUnit_Framework_TestCase { /** @var $layout \Magento\Core\Model\Layout */ $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface'); - $childEmpty = $layout->createBlock('Magento\Core\Block\Text'); + $childEmpty = $layout->createBlock('Magento\View\Block\Text'); /** @var $block \Magento\Checkout\Block\Cart */ $block = $layout->createBlock('Magento\Checkout\Block\Cart') ->setChild('child', $childEmpty); diff --git a/dev/tests/integration/testsuite/Magento/Checkout/Block/Onepage/Payment/MethodsTest.php b/dev/tests/integration/testsuite/Magento/Checkout/Block/Onepage/Payment/MethodsTest.php index de0357afe6356b7a925537bd271ae087043a9c26..610ac9efd056baaddfed58b00858f0ae9a63b32d 100644 --- a/dev/tests/integration/testsuite/Magento/Checkout/Block/Onepage/Payment/MethodsTest.php +++ b/dev/tests/integration/testsuite/Magento/Checkout/Block/Onepage/Payment/MethodsTest.php @@ -54,7 +54,7 @@ class MethodsTest extends \PHPUnit_Framework_TestCase $method = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() ->create('Magento\Payment\Model\Method\Free'); - $block = $this->_block->getLayout()->createBlock('Magento\Core\Block\Text') + $block = $this->_block->getLayout()->createBlock('Magento\View\Block\Text') ->setMethodTitle($expectedTitle) ->setMethodLabelAfterHtml($expectedLabel); diff --git a/dev/tests/integration/testsuite/Magento/Checkout/Controller/CartTest.php b/dev/tests/integration/testsuite/Magento/Checkout/Controller/CartTest.php index 25af4cba213ed50de4916038e58fde859b3f637e..a9a707c54070cc4212ec1d65c06e70550320c828 100644 --- a/dev/tests/integration/testsuite/Magento/Checkout/Controller/CartTest.php +++ b/dev/tests/integration/testsuite/Magento/Checkout/Controller/CartTest.php @@ -51,7 +51,7 @@ class CartTest extends \Magento\TestFramework\TestCase\AbstractController $this->assertSessionMessages( $this->isEmpty(), - \Magento\Core\Model\Message::ERROR, + \Magento\Message\Factory::ERROR, 'Magento\Checkout\Model\Session' ); @@ -78,7 +78,7 @@ class CartTest extends \Magento\TestFramework\TestCase\AbstractController $this->assertSessionMessages( $this->isEmpty(), - \Magento\Core\Model\Message::ERROR, + \Magento\Message\Factory::ERROR, 'Magento\Checkout\Model\Session' ); @@ -108,7 +108,7 @@ class CartTest extends \Magento\TestFramework\TestCase\AbstractController $this->assertSessionMessages( $this->isEmpty(), - \Magento\Core\Model\Message::ERROR, + \Magento\Message\Factory::ERROR, 'Magento\Checkout\Model\Session' ); @@ -135,7 +135,7 @@ class CartTest extends \Magento\TestFramework\TestCase\AbstractController $this->assertSessionMessages( $this->isEmpty(), - \Magento\Core\Model\Message::ERROR, + \Magento\Message\Factory::ERROR, 'Magento\Checkout\Model\Session' ); @@ -165,7 +165,7 @@ class CartTest extends \Magento\TestFramework\TestCase\AbstractController $this->assertSessionMessages( $this->isEmpty(), - \Magento\Core\Model\Message::ERROR, + \Magento\Message\Factory::ERROR, 'Magento\Checkout\Model\Session' ); diff --git a/dev/tests/integration/testsuite/Magento/Checkout/Controller/OnepageTest.php b/dev/tests/integration/testsuite/Magento/Checkout/Controller/OnepageTest.php index acc61a59d2e24cfd8ac1b704a1ed034eb5a0cf83..daf9a1cae82737d539da3d6ea78378903c7c19ff 100644 --- a/dev/tests/integration/testsuite/Magento/Checkout/Controller/OnepageTest.php +++ b/dev/tests/integration/testsuite/Magento/Checkout/Controller/OnepageTest.php @@ -50,7 +50,7 @@ class OnepageTest extends \Magento\TestFramework\TestCase\AbstractController $this->dispatch('checkout/onepage/index'); $html = $this->getResponse()->getBody(); $this->assertContains('<li id="opc-payment"', $html); - $this->assertContains('<dl class="sp-methods" id="checkout-payment-method-load">', $html); + $this->assertSelectCount('[id="checkout-payment-method-load"]', 1, $html); $this->assertSelectCount('form[id="co-billing-form"][action=""]', 1, $html); } diff --git a/dev/tests/integration/testsuite/Magento/Cms/Controller/RouterTest.php b/dev/tests/integration/testsuite/Magento/Cms/Controller/RouterTest.php index 7452d870143e94576906a19ceed76596c123ac09..14407bfa4c9115dd0422c970935ef39e0fb7b1bd 100644 --- a/dev/tests/integration/testsuite/Magento/Cms/Controller/RouterTest.php +++ b/dev/tests/integration/testsuite/Magento/Cms/Controller/RouterTest.php @@ -39,7 +39,7 @@ class RouterTest extends \PHPUnit_Framework_TestCase $this->markTestIncomplete('MAGETWO-3393'); $this->_model = new \Magento\Cms\Controller\Router( \Magento\TestFramework\Helper\Bootstrap::getObjectManager() - ->get('Magento\Core\Controller\Varien\Action\Factory'), + ->get('Magento\App\ActionFactory'), new \Magento\Event\ManagerInterfaceStub( $this->getMockForAbstractClass('Magento\Event\InvokerInterface'), $this->getMock('Magento\Event\Config', array(), array(), '', false), @@ -70,7 +70,7 @@ class RouterTest extends \PHPUnit_Framework_TestCase //Open Node $request->setPathInfo('parent_node'); $controller = $this->_model->match($request); - $this->assertInstanceOf('Magento\Core\Controller\Varien\Action\Redirect', $controller); + $this->assertInstanceOf('Magento\App\Action\Redirect', $controller); } } diff --git a/dev/tests/integration/testsuite/Magento/Cms/Helper/PageTest.php b/dev/tests/integration/testsuite/Magento/Cms/Helper/PageTest.php index 493db4c80bf4f008439724787a5989334481e1dc..72a6f3e10803770af79dfcde17170242884ac84e 100644 --- a/dev/tests/integration/testsuite/Magento/Cms/Helper/PageTest.php +++ b/dev/tests/integration/testsuite/Magento/Cms/Helper/PageTest.php @@ -46,14 +46,14 @@ class PageTest extends \PHPUnit_Framework_TestCase 'response' => $objectManager->get('Magento\TestFramework\Response') ); $context = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() - ->create('Magento\Core\Controller\Varien\Action\Context', $arguments); + ->create('Magento\App\Action\Context', $arguments); $page = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Cms\Model\Page'); $page->load('page_design_blank', 'identifier'); // fixture /** @var $pageHelper \Magento\Cms\Helper\Page */ $pageHelper = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Cms\Helper\Page'); $result = $pageHelper->renderPage( \Magento\TestFramework\Helper\Bootstrap::getObjectManager() - ->create('Magento\Core\Controller\Front\Action', array('context' => $context)), + ->create('Magento\App\Action\Action', array('context' => $context)), $page->getId() ); $design = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() diff --git a/dev/tests/integration/testsuite/Magento/Core/App/Router/BaseTest.php b/dev/tests/integration/testsuite/Magento/Core/App/Router/BaseTest.php index bd09b17b7d9ff6d51e209f9e9fdb0a693caf106e..1be8b26f82b365f2d322af05c4df27ebf9096a82 100644 --- a/dev/tests/integration/testsuite/Magento/Core/App/Router/BaseTest.php +++ b/dev/tests/integration/testsuite/Magento/Core/App/Router/BaseTest.php @@ -55,9 +55,9 @@ class BaseTest extends \PHPUnit_Framework_TestCase /** @var $request \Magento\TestFramework\Request */ $request = $objectManager->get('Magento\TestFramework\Request'); - $this->assertInstanceOf('Magento\Core\Controller\Varien\Action', $this->_model->match($request)); + $this->assertInstanceOf('Magento\App\ActionInterface', $this->_model->match($request)); $request->setRequestUri('core/index/index'); - $this->assertInstanceOf('Magento\Core\Controller\Varien\Action', $this->_model->match($request)); + $this->assertInstanceOf('Magento\App\ActionInterface', $this->_model->match($request)); $request->setPathInfo('not_exists/not_exists/not_exists') ->setModuleName('not_exists') diff --git a/dev/tests/integration/testsuite/Magento/Core/Controller/Varien/ActionTest.php b/dev/tests/integration/testsuite/Magento/Core/Controller/Varien/ActionTest.php deleted file mode 100644 index 88a17f1d8b0268e624b7d1a0db7bbfa050f64981..0000000000000000000000000000000000000000 --- a/dev/tests/integration/testsuite/Magento/Core/Controller/Varien/ActionTest.php +++ /dev/null @@ -1,373 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * 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_Core - * @subpackage integration_tests - * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - -namespace Magento\Core\Controller\Varien; - -/** - * @magentoAppArea frontend - */ -class ActionTest extends \PHPUnit_Framework_TestCase -{ - /** - * @var \Magento\Core\Controller\Varien\Action|\PHPUnit_Framework_MockObject_MockObject - */ - protected $_object; - - /** - * @var \Magento\ObjectManager - */ - protected $_objectManager; - - protected function setUp() - { - $this->_objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - - $this->_objectManager->get('Magento\App\State')->setAreaCode(\Magento\Core\Model\App\Area::AREA_FRONTEND); - $this->_objectManager->get('Magento\View\DesignInterface') - ->setDefaultDesignTheme(); - /** @var $objectManager \Magento\TestFramework\ObjectManager */ - $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - /** @var $request \Magento\TestFramework\Request */ - $request = $objectManager->get('Magento\App\RequestInterface'); - $arguments = array( - 'request' => $request, - 'response' => $this->_objectManager->get('Magento\TestFramework\Response'), - ); - $this->_objectManager->get('Magento\View\DesignInterface') - ->setDefaultDesignTheme(); - $context = $this->_objectManager->create('Magento\Core\Controller\Varien\Action\Context', $arguments); - $this->_object = $this->getMockForAbstractClass( - 'Magento\Core\Controller\Varien\Action', - array('context' => $context) - ); - } - - public function testHasAction() - { - $this->assertFalse($this->_object->hasAction('test')); - $this->assertTrue($this->_object->hasAction('noroute')); - } - - public function testGetRequest() - { - $this->assertInstanceOf('Magento\TestFramework\Request', $this->_object->getRequest()); - } - - public function testGetResponse() - { - $this->assertInstanceOf('Magento\TestFramework\Response', $this->_object->getResponse()); - } - - public function testSetGetFlag() - { - $this->assertEmpty($this->_object->getFlag('')); - - $this->_object->setFlag('test', 'test_flag', 'test_value'); - $this->assertFalse($this->_object->getFlag('', 'test_flag')); - $this->assertEquals('test_value', $this->_object->getFlag('test', 'test_flag')); - $this->assertNotEmpty($this->_object->getFlag('')); - - $this->_object->setFlag('', 'test', 'value'); - $this->assertEquals('value', $this->_object->getFlag('', 'test')); - } - - public function testGetFullActionName() - { - /* empty request */ - $this->assertEquals('__', $this->_object->getFullActionName()); - - $this->_object->getRequest()->setRouteName('test') - ->setControllerName('controller') - ->setActionName('action'); - $this->assertEquals('test/controller/action', $this->_object->getFullActionName('/')); - } - - /** - * @param string $controllerClass - * @param string $expectedArea - * @dataProvider controllerAreaDesignDataProvider - * @magentoAppIsolation enabled - */ - public function testGetLayout($controllerClass, $expectedArea) - { - \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\App') - ->loadArea($expectedArea); - - $this->_objectManager->get('Magento\Config\ScopeInterface')->setCurrentScope($expectedArea); - /** @var $controller \Magento\Core\Controller\Varien\Action */ - $controller = $this->_objectManager->create($controllerClass); - $this->assertInstanceOf('Magento\Core\Model\Layout', $controller->getLayout()); - $this->assertEquals($expectedArea, $controller->getLayout()->getArea()); - } - - /** - * @magentoAppIsolation enabled - * @expectedException \RuntimeException - * @expectedExceptionMessage Layout must be loaded only once. - */ - public function testLoadLayoutThrowsExceptionWhenCalledTwice() - { - $this->_object->loadLayout(); - $this->assertContains('default', $this->_object->getLayout()->getUpdate()->getHandles()); - $this->assertInstanceOf('Magento\Core\Block\AbstractBlock', $this->_object->getLayout()->getBlock('root')); - $this->_object->loadLayout('test'); - } - - public function testGetDefaultLayoutHandle() - { - $this->_object->getRequest() - ->setRouteName('Test') - ->setControllerName('Controller') - ->setActionName('Action'); - $this->assertEquals('test_controller_action', $this->_object->getDefaultLayoutHandle()); - } - - /** - * @param string $route - * @param string $controller - * @param string $action - * @param array $expected - * @param array $nonExpected - * - * @magentoAppIsolation enabled - * @dataProvider addActionLayoutHandlesDataProvider - */ - public function testAddActionLayoutHandles($route, $controller, $action, $expected, $nonExpected) - { - $this->_object->getRequest() - ->setRouteName($route) - ->setControllerName($controller) - ->setActionName($action); - $this->_object->addActionLayoutHandles(); - $handles = $this->_object->getLayout()->getUpdate()->getHandles(); - - foreach ($expected as $expectedHandle) { - $this->assertContains($expectedHandle, $handles); - } - foreach ($nonExpected as $nonExpectedHandle) { - $this->assertNotContains($nonExpectedHandle, $handles); - } - } - - /** - * @return array - */ - public function addActionLayoutHandlesDataProvider() - { - return array( - array('Test', 'Controller', 'Action', array('test_controller_action'), - array( - 'STORE_' . \Magento\TestFramework\Helper\Bootstrap::getObjectManager() - ->get('Magento\Core\Model\StoreManagerInterface')->getStore()->getCode() - ) - ), - array('catalog', 'product', 'gallery', array('catalog_product_gallery'), - array('default', 'catalog_product_view') - ) - ); - } - - /** - * @magentoAppIsolation enabled - */ - public function testAddPageLayoutHandles() - { - /* @var $update \Magento\Core\Model\Layout\Merge */ - $update = $this->_object->getLayout()->getUpdate(); - - $this->_object->getRequest()->setRouteName('test') - ->setControllerName('controller') - ->setActionName('action'); - $result = $this->_object->addPageLayoutHandles(); - $this->assertFalse($result); - $this->assertEmpty($update->getHandles()); - - $this->_object->getRequest()->setRouteName('catalog') - ->setControllerName('product') - ->setActionName('view'); - $update->addHandle('default'); - $result = $this->_object->addPageLayoutHandles(array('type' => 'simple')); - - $this->assertTrue($result); - $handles = $update->getHandles(); - $this->assertContains('default', $handles); - $this->assertContains('catalog_product_view', $handles); - $this->assertContains('catalog_product_view_type_simple', $handles); - } - - /** - * @magentoAppIsolation enabled - * @magentoAppArea frontend - */ - public function testRenderLayout() - { - $this->_object->loadLayout(); - $this->assertEmpty($this->_object->getResponse()->getBody()); - $this->_object->renderLayout(); - $this->assertNotEmpty($this->_object->getResponse()->getBody()); - } - - /** - * @magentoAppIsolation enabled - */ - public function testDispatch() - { - if (headers_sent()) { - $this->markTestSkipped('Can\' dispatch - headers already sent'); - } - /** @var $objectManager \Magento\TestFramework\ObjectManager */ - $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - /** @var $request \Magento\TestFramework\Request */ - $request = $objectManager->get('Magento\TestFramework\Request'); - $request->setDispatched(); - - $arguments = array( - 'request' => $request, - 'response' => $this->_objectManager->get('Magento\TestFramework\Response'), - ); - $context = $this->_objectManager->create('Magento\Core\Controller\Varien\Action\Context', $arguments); - - /* Area-specific controller is used because area must be known at the moment of loading the design */ - $this->_object = $this->_objectManager->create( - 'Magento\Core\Controller\Front\Action', - array('context' => $context) - ); - $this->_objectManager->get('Magento\Config\ScopeInterface')->setCurrentScope('frontend'); - $this->_object->dispatch('not_exists'); - - $this->assertFalse($request->isDispatched()); - $this->assertEquals('cms', $request->getModuleName()); - $this->assertEquals('index', $request->getControllerName()); - $this->assertEquals('noRoute', $request->getActionName()); - } - - public function testGetActionMethodName() - { - $this->assertEquals('testAction', $this->_object->getActionMethodName('test')); - } - - /** - * @magentoAppIsolation enabled - * @magentoAppArea frontend - */ - public function testNoCookiesAction() - { - $this->assertEmpty($this->_object->getResponse()->getBody()); - $this->_object->noCookiesAction(); - $redirect = array( - 'name' => 'Location', - 'value' => 'http://localhost/index.php/enable-cookies', - 'replace' => true, - ); - $this->assertEquals($redirect, $this->_object->getResponse()->getHeader('Location')); - } - - /** - * @magentoAppIsolation enabled - * @dataProvider controllerAreaDesignDataProvider - * - * @param string $controllerClass - * @param string $expectedArea - * @param string $expectedStore - * @param string $expectedDesign - * @param string $context - */ - public function testPreDispatch($controllerClass, $expectedArea, $expectedStore, $expectedDesign, $context) - { - $themes = array('frontend' => 'magento_blank', 'adminhtml' => 'magento_backend', 'install' => 'magento_basic'); - $design = $this->_objectManager->create('Magento\Core\Model\View\Design', array('themes' => $themes)); - $app = $this->_objectManager->create('Magento\Core\Model\App'); - $this->_objectManager->addSharedInstance($design, 'Magento\Core\Model\View\Design'); - $this->_objectManager->addSharedInstance($app, 'Magento\Core\Model\App'); - $this->_objectManager->addSharedInstance($app, 'Magento\TestFramework\App'); - $app->loadArea($expectedArea); - - /** @var $controller \Magento\Core\Controller\Varien\Action */ - $context = $this->_objectManager->create($context, array( - 'response' => $this->_objectManager->get('Magento\TestFramework\Response') - )); - $controller = $this->_objectManager->create($controllerClass, array('context' => $context)); - $controller->preDispatch(); - - $design = $this->_objectManager->get('Magento\View\DesignInterface'); - - $this->assertEquals($expectedArea, $design->getArea()); - $this->assertEquals($expectedStore, \Magento\TestFramework\Helper\Bootstrap::getObjectManager() - ->get('Magento\Core\Model\StoreManagerInterface')->getStore()->getCode()); - if ($expectedDesign) { - $this->assertEquals($expectedDesign, $design->getDesignTheme()->getThemePath()); - } - } - - /** - * @return array - */ - public function controllerAreaDesignDataProvider() - { - return array( - 'install' => array( - 'Magento\Install\Controller\Action', - 'install', - 'default', - 'magento_basic', - 'Magento\Core\Controller\Varien\Action\Context' - ), - 'frontend' => array( - 'Magento\Core\Controller\Front\Action', - 'frontend', - 'default', - 'magento_blank', - 'Magento\Core\Controller\Varien\Action\Context' - ), - 'backend' => array( - 'Magento\Backend\Controller\Adminhtml\Action', - 'adminhtml', - 'admin', - 'magento_backend', - 'Magento\Backend\Controller\Context' - ), - ); - } - - /** - * @magentoAppArea frontend - */ - public function testNoRouteAction() - { - $status = 'test'; - $this->_object->getRequest()->setParam('__status__', $status); - $caughtException = false; - $message = ''; - try { - $this->_object->norouteAction(); - } catch (\Exception $e) { - $caughtException = true; - $message = $e->getMessage(); - } - $this->assertFalse($caughtException, $message); - } -} diff --git a/dev/tests/integration/testsuite/Magento/Core/Helper/AbstractTest.php b/dev/tests/integration/testsuite/Magento/Core/Helper/AbstractTest.php index 8b054883ef3f6524b34ae630429312115ff959b3..21dffdba568270537b28d16e9838166c4105a3fd 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Helper/AbstractTest.php +++ b/dev/tests/integration/testsuite/Magento/Core/Helper/AbstractTest.php @@ -30,14 +30,14 @@ namespace Magento\Core\Helper; class AbstractTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Core\Helper\AbstractHelper|PHPUnit_Framework_MockObject_MockObject + * @var \Magento\App\Helper\AbstractHelper|PHPUnit_Framework_MockObject_MockObject */ protected $_helper = null; protected function setUp() { - $context = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Helper\Context'); - $this->_helper = $this->getMock('Magento\Core\Helper\AbstractHelper', array('_getModuleName'), array($context)); + $context = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\Helper\Context'); + $this->_helper = $this->getMock('Magento\App\Helper\AbstractHelper', array('_getModuleName'), array($context)); $this->_helper ->expects($this->any()) ->method('_getModuleName') @@ -46,8 +46,8 @@ class AbstractTest extends \PHPUnit_Framework_TestCase } /** - * @covers \Magento\Core\Helper\AbstractHelper::isModuleEnabled - * @covers \Magento\Core\Helper\AbstractHelper::isModuleOutputEnabled + * @covers \Magento\App\Helper\AbstractHelper::isModuleEnabled + * @covers \Magento\App\Helper\AbstractHelper::isModuleOutputEnabled */ public function testIsModuleEnabled() { diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/AppTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/AppTest.php index 5990ba818aa4544bd8633213a1d56d06b05ab971..a76f932b62d3bd3a6f4a780d427fd472822e3a58 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/AppTest.php +++ b/dev/tests/integration/testsuite/Magento/Core/Model/AppTest.php @@ -134,7 +134,7 @@ class AppTest extends \PHPUnit_Framework_TestCase { $this->_mageModel->getSafeStore(100); $request = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\Request\Http'); - $this->assertEquals('noRoute', $request->getActionName()); + $this->assertEquals('noroute', $request->getActionName()); } public function testGetStores() diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/DataService/LayoutTest/layout_update.xml b/dev/tests/integration/testsuite/Magento/Core/Model/DataService/LayoutTest/layout_update.xml index 2b41b519e4a81e1eceee0696e4fd06653b905f45..e844109ab93558020a5388698517d4b0468accf6 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/DataService/LayoutTest/layout_update.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/DataService/LayoutTest/layout_update.xml @@ -24,7 +24,7 @@ */ --> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <block class="Magento\Core\Block\Template" name="block_with_service_calls"> + <block class="Magento\View\Block\Template" name="block_with_service_calls"> <data service_call="testServiceCall" alias="testData"/> </block> </layout> diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/LayoutDirectivesTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/LayoutDirectivesTest.php index 9d3a7ea2da1196e2e7656efb8db942c36fb2988c..e7cfbed7b7abaceadd477ea18225c6e7d9a4b987 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/LayoutDirectivesTest.php +++ b/dev/tests/integration/testsuite/Magento/Core/Model/LayoutDirectivesTest.php @@ -58,8 +58,8 @@ class LayoutDirectivesTest extends \PHPUnit_Framework_TestCase public function testGetBlockUnscheduled() { $layout = $this->_getLayoutModel('get_block.xml'); - $this->assertInstanceOf('Magento\Core\Block\Text', $layout->getBlock('block1')); - $this->assertInstanceOf('Magento\Core\Block\Text', $layout->getBlock('block2')); + $this->assertInstanceOf('Magento\View\Block\Text', $layout->getBlock('block1')); + $this->assertInstanceOf('Magento\View\Block\Text', $layout->getBlock('block2')); } /** diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/LayoutTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/LayoutTest.php index 35bd88830c18acfd1ff5117641457cd64671eee4..4e1c95ccf3080454ef60f0e2545fb71db50ae9da 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/LayoutTest.php +++ b/dev/tests/integration/testsuite/Magento/Core/Model/LayoutTest.php @@ -86,7 +86,7 @@ class LayoutTest extends \PHPUnit_Framework_TestCase */ public function testDestructor() { - $this->_layout->addBlock('Magento\Core\Block\Text', 'test'); + $this->_layout->addBlock('Magento\View\Block\Text', 'test'); $this->assertNotEmpty($this->_layout->getAllBlocks()); $this->_layout->__destruct(); $this->assertEmpty($this->_layout->getAllBlocks()); @@ -125,11 +125,11 @@ class LayoutTest extends \PHPUnit_Framework_TestCase { $this->_layout->setXml(simplexml_load_string( '<layout> - <block class="Magento\Core\Block\Text" name="block1"> - <block class="Magento\Core\Block\Text"/> + <block class="Magento\View\Block\Text" name="block1"> + <block class="Magento\View\Block\Text"/> </block> - <block class="Magento\Core\Block\Text" template="test"/> - <block class="Magento\Core\Block\Text"/> + <block class="Magento\View\Block\Text" template="test"/> + <block class="Magento\View\Block\Text"/> </layout>', 'Magento\View\Layout\Element' )); @@ -154,7 +154,7 @@ class LayoutTest extends \PHPUnit_Framework_TestCase $this->_layout->getElementProperty($name, 'type')); $this->assertSame(2, $this->_layout->getElementProperty($name, 'option2')); - $this->_layout->addBlock('Magento\Core\Block\Text', 'text', $name); + $this->_layout->addBlock('Magento\View\Block\Text', 'text', $name); $this->assertEquals(\Magento\Core\Model\Layout::TYPE_BLOCK, $this->_layout->getElementProperty('text', 'type')); $this->assertSame(array('text' => 'text'), $this->_layout->getElementProperty( $name, \Magento\Data\Structure::CHILDREN @@ -169,7 +169,7 @@ class LayoutTest extends \PHPUnit_Framework_TestCase $this->assertFalse($this->_layout->isBlock('container')); $this->assertFalse($this->_layout->isBlock('block')); $this->_layout->addContainer('container', 'Container'); - $this->_layout->addBlock('Magento\Core\Block\Text', 'block'); + $this->_layout->addBlock('Magento\View\Block\Text', 'block'); $this->assertFalse($this->_layout->isBlock('container')); $this->assertTrue($this->_layout->isBlock('block')); } @@ -177,7 +177,7 @@ class LayoutTest extends \PHPUnit_Framework_TestCase public function testSetUnsetBlock() { $expectedBlockName = 'block_' . __METHOD__; - $expectedBlock = $this->_layout->createBlock('Magento\Core\Block\Text'); + $expectedBlock = $this->_layout->createBlock('Magento\View\Block\Text'); $this->_layout->setBlock($expectedBlockName, $expectedBlock); $this->assertSame($expectedBlock, $this->_layout->getBlock($expectedBlockName)); @@ -205,16 +205,16 @@ class LayoutTest extends \PHPUnit_Framework_TestCase { return array( 'named block' => array( - 'Magento\Core\Block\Template', + 'Magento\View\Block\Template', 'some_block_name_full_class', - array('type' => 'Magento\Core\Block\Template', 'is_anonymous' => false), + array('type' => 'Magento\View\Block\Template', 'is_anonymous' => false), '/^some_block_name_full_class$/' ), 'no name block' => array( - 'Magento\Core\Block\Text\ListText', + 'Magento\View\Block\Text\ListText', '', array( - 'type' => 'Magento\Core\Block\Text\ListText', + 'type' => 'Magento\View\Block\Text\ListText', 'key1' => 'value1', ), '/text\\\\list/' @@ -241,9 +241,9 @@ class LayoutTest extends \PHPUnit_Framework_TestCase public function testAddBlock() { - $this->assertInstanceOf('Magento\Core\Block\Text', $this->_layout->addBlock('Magento\Core\Block\Text', + $this->assertInstanceOf('Magento\View\Block\Text', $this->_layout->addBlock('Magento\View\Block\Text', 'block1')); - $block2 = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Core\Block\Text'); + $block2 = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\View\Block\Text'); $block2->setNameInLayout('block2'); $this->_layout->addBlock($block2, '', 'block1'); @@ -304,7 +304,7 @@ class LayoutTest extends \PHPUnit_Framework_TestCase public function testGetChildBlock() { $this->_layout->addContainer('parent', 'Parent'); - $block = $this->_layout->addBlock('Magento\Core\Block\Text', 'block', 'parent', 'block_alias'); + $block = $this->_layout->addBlock('Magento\View\Block\Text', 'block', 'parent', 'block_alias'); $this->_layout->addContainer('container', 'Container', array(), 'parent', 'container_alias'); $this->assertSame($block, $this->_layout->getChildBlock('parent', 'block_alias')); $this->assertFalse($this->_layout->getChildBlock('parent', 'container_alias')); @@ -363,9 +363,9 @@ class LayoutTest extends \PHPUnit_Framework_TestCase public function testGetChildBlocks() { $this->_layout->addContainer('parent', 'Parent'); - $block1 = $this->_layout->addBlock('Magento\Core\Block\Text', 'block1', 'parent'); + $block1 = $this->_layout->addBlock('Magento\View\Block\Text', 'block1', 'parent'); $this->_layout->addContainer('container', 'Container', array(), 'parent'); - $block2 = $this->_layout->addBlock('Magento\Core\Block\Template', 'block2', 'parent'); + $block2 = $this->_layout->addBlock('Magento\View\Block\Template', 'block2', 'parent'); $this->assertSame(array('block1' => $block1, 'block2' => $block2), $this->_layout->getChildBlocks('parent')); } @@ -384,7 +384,7 @@ class LayoutTest extends \PHPUnit_Framework_TestCase { $block = 'block'; $container = 'container'; - $this->_layout->addBlock('Magento\Core\Block\Text', $block); + $this->_layout->addBlock('Magento\View\Block\Text', $block); $this->_layout->addContainer($container, 'Container'); $this->assertFalse($this->_layout->isContainer($block)); $this->assertTrue($this->_layout->isContainer($container)); @@ -393,13 +393,13 @@ class LayoutTest extends \PHPUnit_Framework_TestCase public function testIsManipulationAllowed() { - $this->_layout->addBlock('Magento\Core\Block\Text', 'block1'); - $this->_layout->addBlock('Magento\Core\Block\Text', 'block2', 'block1'); + $this->_layout->addBlock('Magento\View\Block\Text', 'block1'); + $this->_layout->addBlock('Magento\View\Block\Text', 'block2', 'block1'); $this->assertFalse($this->_layout->isManipulationAllowed('block1')); $this->assertFalse($this->_layout->isManipulationAllowed('block2')); $this->_layout->addContainer('container1', 'Container 1'); - $this->_layout->addBlock('Magento\Core\Block\Text', 'block3', 'container1'); + $this->_layout->addBlock('Magento\View\Block\Text', 'block3', 'container1'); $this->_layout->addContainer('container2', 'Container 2', array(), 'container1'); $this->assertFalse($this->_layout->isManipulationAllowed('container1')); $this->assertTrue($this->_layout->isManipulationAllowed('block3')); @@ -412,7 +412,7 @@ class LayoutTest extends \PHPUnit_Framework_TestCase $expBlockName = 'block_renamed'; $containerName = 'container'; $expContainerName = 'container_renamed'; - $block = $this->_layout->createBlock('Magento\Core\Block\Text', $blockName); + $block = $this->_layout->createBlock('Magento\View\Block\Text', $blockName); $this->_layout->addContainer($containerName, 'Container'); $this->assertEquals($block, $this->_layout->getBlock($blockName)); @@ -428,7 +428,7 @@ class LayoutTest extends \PHPUnit_Framework_TestCase { $this->assertFalse($this->_layout->getBlock('test')); $block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\Layout') - ->createBlock('Magento\Core\Block\Text'); + ->createBlock('Magento\View\Block\Text'); $this->_layout->setBlock('test', $block); $this->assertSame($block, $this->_layout->getBlock('test')); } @@ -462,7 +462,7 @@ class LayoutTest extends \PHPUnit_Framework_TestCase $blockName = 'block_' . __METHOD__; $expectedText = "some_text_for_$blockName"; - $block = $this->_layout->addBlock('Magento\Core\Block\Text', $blockName); + $block = $this->_layout->addBlock('Magento\View\Block\Text', $blockName); $block->setText($expectedText); $this->_layout->addOutputElement($blockName); @@ -476,14 +476,14 @@ class LayoutTest extends \PHPUnit_Framework_TestCase public function testGetMessagesBlock() { - $this->assertInstanceOf('Magento\Core\Block\Messages', $this->_layout->getMessagesBlock()); + $this->assertInstanceOf('Magento\View\Block\Messages', $this->_layout->getMessagesBlock()); } public function testGetBlockSingleton() { - $block = $this->_layout->getBlockSingleton('Magento\Core\Block\Text'); - $this->assertInstanceOf('Magento\Core\Block\Text', $block); - $this->assertSame($block, $this->_layout->getBlockSingleton('Magento\Core\Block\Text')); + $block = $this->_layout->getBlockSingleton('Magento\View\Block\Text'); + $this->assertInstanceOf('Magento\View\Block\Text', $block); + $this->assertSame($block, $this->_layout->getBlockSingleton('Magento\View\Block\Text')); } public function testUpdateContainerAttributes() diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/StoreTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/StoreTest.php index 84b745c48b2b69c099ffcf6d222b0d39fce3d2c6..500aa52a910d68a7c8e3774b51cbe70053f31c48 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/StoreTest.php +++ b/dev/tests/integration/testsuite/Magento/Core/Model/StoreTest.php @@ -56,7 +56,6 @@ class StoreTest extends \PHPUnit_Framework_TestCase 'registry' => $objectManager->get('Magento\Core\Model\Registry'), 'configCacheType' => $objectManager->get('Magento\App\Cache\Type\Config'), 'url' => $objectManager->get('Magento\Core\Model\Url'), - 'appState' => $objectManager->get('Magento\App\State'), 'request' => $objectManager->get('Magento\App\RequestInterface'), 'configDataResource' => $objectManager->get('Magento\Core\Model\Resource\Config\Data'), 'dir' => $objectManager->get('Magento\App\Dir'), @@ -377,7 +376,8 @@ class StoreTest extends \PHPUnit_Framework_TestCase ->will($this->returnValue($isInstalled)); $params = $this->_modelParams; - $params['appState'] = $appStateMock; + $params['context'] = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() + ->create('Magento\Core\Model\Context', array('appState' => $appStateMock)); $model = $this->getMock('Magento\Core\Model\Store', array('getConfig'), $params); @@ -385,7 +385,7 @@ class StoreTest extends \PHPUnit_Framework_TestCase ->with($this->stringContains(\Magento\Core\Model\Store::XML_PATH_STORE_IN_URL)) ->will($this->returnValue($storeInUrl)); $model->setStoreId($storeId); - $this->assertEquals($model->isUseStoreInUrl(), $expectedResult); + $this->assertEquals($expectedResult, $model->isUseStoreInUrl()); } /** diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/TemplateTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/TemplateTest.php index 1c193d6359977c050b208aaa1ca153f0031774ac..fba431f12f7a5263e332e5834b374323bacc2dd5 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/TemplateTest.php +++ b/dev/tests/integration/testsuite/Magento/Core/Model/TemplateTest.php @@ -37,7 +37,7 @@ class TemplateTest extends \PHPUnit_Framework_TestCase { // \Magento\Core\Model\Template is an abstract class $model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() - ->create('Magento\Core\Model\Email\Template'); + ->create('Magento\Email\Model\Template'); $model->setDesignConfig($config); } diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/TranslateTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/TranslateTest.php index f5c37ecbd7098e732c68949179e3f6890fd82f8a..404cd1e8dc7ec9c833a0e8a7722f579fa62ef801 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/TranslateTest.php +++ b/dev/tests/integration/testsuite/Magento/Core/Model/TranslateTest.php @@ -104,7 +104,7 @@ class TranslateTest extends \PHPUnit_Framework_TestCase ->method('getDesignTheme') ->will($this->returnValue($theme)); - $objectManager->addSharedInstance($this->_designModel, 'Magento\Core\Model\View\Design'); + $objectManager->addSharedInstance($this->_designModel, 'Magento\Core\Model\View\Design\Proxy'); $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() ->create('Magento\Core\Model\Translate'); diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_cache_test_theme/layout_test_handle.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_cache_test_theme/layout_test_handle.xml index 883b198a2357f7caaa8d1d4e91bf98c1cc5be1b5..28e08efbb6d271c8201c175fe5f420db8fa32fdb 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_cache_test_theme/layout_test_handle.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_cache_test_theme/layout_test_handle.xml @@ -27,7 +27,7 @@ */ --> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > - <block class="Magento\Core\Block\Text" name="sample_text_block"> + <block class="Magento\View\Block\Text" name="sample_text_block"> <action method="setText"> <argument name="text" xsi:type="string">Text declared in the frontend/test/cache_test_theme</argument> </action> diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/Magento_Core/layout_test_handle_main.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/Magento_Core/layout_test_handle_main.xml index 3718fafe8d95302013fb71e9670fc1270b1b692e..78e759838fbdf4767dc60d8b7107d580728de7fd 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/Magento_Core/layout_test_handle_main.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/Magento_Core/layout_test_handle_main.xml @@ -38,7 +38,7 @@ </action> </referenceBlock> <referenceBlock name="some_element_1"/> - <block name="test.nonexisting.block" class="Magento\Core\Block\Text\ListText"/> + <block name="test.nonexisting.block" class="Magento\View\Block\Text\ListText"/> <remove name="test.nonexisting.block"/> <referenceBlock name="test.nonexisting.block"> <action method="getSomething"/> diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/Magento_Core/layout_test_handle_sample.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/Magento_Core/layout_test_handle_sample.xml index 32d2b549b05e920fcd921c00a283141cbd3a3831..042a16b16f64eab04a23e4df4a9cc51642fcf515 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/Magento_Core/layout_test_handle_sample.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/Magento_Core/layout_test_handle_sample.xml @@ -41,11 +41,11 @@ <action method="addJs" ifconfig="dev/js/deprecation"> <argument name="file" xsi:type="string">prototype/deprecation.js</argument> </action> - <block class="Magento\Core\Block\Html\Calendar" name="head.calendar" as="calendar" template="page/js/calendar.phtml"/> + <block class="Magento\View\Block\Html\Calendar" name="head.calendar" as="calendar" template="page/js/calendar.phtml"/> </block> <block class="Magento\Adminhtml\Block\Page\Header" name="header" as="header"/> <block class="Magento\Backend\Block\Menu" name="menu" as="menu"/> - <block class="Magento\Core\Block\Messages" name="messages" as="messages"/> - <block class="Magento\Core\Block\Text" as="no_name"/> + <block class="Magento\View\Block\Messages" name="messages" as="messages"/> + <block class="Magento\View\Block\Text" as="no_name"/> </block> </layout> diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_test_theme/layout_test_handle.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_test_theme/layout_test_handle.xml index 0338c3b8e3f7ba169c283c1edf0649d44f1de873..1cc34a278f3f18bf78ddfdf38868a0dc48f01a79 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_test_theme/layout_test_handle.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_test_theme/layout_test_handle.xml @@ -27,7 +27,7 @@ */ --> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > - <block class="Magento\Core\Block\Text" name="sample_text_block"> + <block class="Magento\View\Block\Text" name="sample_text_block"> <action method="setText"> <argument name="text" xsi:type="string">Text declared in the frontend/test/test_theme</argument> </action> diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout/container_attributes.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout/container_attributes.xml index 30104146190dca30d81d203c285a8fcc8d147332..788ebe73981f5e090d4b5048763575b4b3c556d9 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout/container_attributes.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout/container_attributes.xml @@ -25,28 +25,28 @@ --> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <container name="container1" label="test1" htmlTag="div" htmlId="container1-1" htmlClass="class11"> - <block class="Magento\Core\Block\Text" name="block11"> + <block class="Magento\View\Block\Text" name="block11"> <action method="setText"> <argument name="text" xsi:type="string">Test11</argument> </action> </block> </container> <referenceContainer name="container1" label="test1" htmlId="container1-2" htmlClass="class12"> - <block class="Magento\Core\Block\Text" name="block12"> + <block class="Magento\View\Block\Text" name="block12"> <action method="setText"> <argument name="text" xsi:type="string">Test12</argument> </action> </block> </referenceContainer> <container name="container2" label="test2" htmlTag="div" htmlClass="class21"> - <block class="Magento\Core\Block\Text" name="block21"> + <block class="Magento\View\Block\Text" name="block21"> <action method="setText"> <argument name="text" xsi:type="string">Test21</argument> </action> </block> </container> <referenceContainer name="container2" label="test2" htmlId="container2-2" htmlClass="class22"> - <block class="Magento\Core\Block\Text" name="block22"> + <block class="Magento\View\Block\Text" name="block22"> <action method="setText"> <argument name="text" xsi:type="string">Test22</argument> </action> diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/action_for_anonymous_parent_block.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/action_for_anonymous_parent_block.xml index 1fcbc2b0144e4b5d58017e8fcc57f79648460477..1889d197fbfe76405432dae797a5c9fd0ca82ecf 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/action_for_anonymous_parent_block.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/action_for_anonymous_parent_block.xml @@ -24,14 +24,14 @@ */ --> <layout> - <block name="test.block.insert" class="Magento\Core\Block\Text"/> - <block class="Magento\Core\Block\Template"> + <block name="test.block.insert" class="Magento\View\Block\Text"/> + <block class="Magento\View\Block\Template"> <action method="insert"> <argument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="element" xsi:type="string">test.block.insert</argument> </action> </block> - <block name="test.block.append" class="Magento\Core\Block\Text"/> - <block class="Magento\Core\Block\Text"> + <block name="test.block.append" class="Magento\View\Block\Text"/> + <block class="Magento\View\Block\Text"> <action method="append"> <argument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="element" xsi:type="string">test.block.append</argument> </action> diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/arguments.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/arguments.xml index 99dd1cc8bbfaa0da6017ebd5c4a2387e047e5f9a..5380bb06f0bfe125da2f0ce322191dbde0ec0270 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/arguments.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/arguments.xml @@ -24,7 +24,7 @@ */ --> <layout> - <block class="Magento\Core\Block\Text" name="block_with_args"> + <block class="Magento\View\Block\Text" name="block_with_args"> <arguments> <argument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="one" xsi:type="string">1</argument> <argument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="two" xsi:type="string">2</argument> diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/arguments_complex_values.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/arguments_complex_values.xml index ba8d89bb120e1636e009badcc92d20ad4fa64c26..e5ff876835e95b466436875921e37c29d622ae48 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/arguments_complex_values.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/arguments_complex_values.xml @@ -24,7 +24,7 @@ */ --> <layout> - <block class="Magento\Core\Block\Text" name="block_with_args_complex_values"> + <block class="Magento\View\Block\Text" name="block_with_args_complex_values"> <arguments> <argument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="one" xsi:type="array"> <item name="parameters" xsi:type="array"> diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/arguments_object_type.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/arguments_object_type.xml index 66e64db9141cdf03160fd127de1563d1f236d0fa..90bb85d17286a2c505af6fb3e0c64bac406e3eaf 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/arguments_object_type.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/arguments_object_type.xml @@ -24,7 +24,7 @@ */ --> <layout> - <block class="Magento\Core\Block\Text" name="block_with_object_args"> + <block class="Magento\View\Block\Text" name="block_with_object_args"> <arguments> <argument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="one" xsi:type="object">Magento\Data\Collection\Db</argument> <argument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="two" xsi:type="object">Magento\Data\Collection\Db</argument> diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/arguments_object_type_updaters.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/arguments_object_type_updaters.xml index 901136008658f1e3214ea1be52acfaf2b2290541..c87ac3cfcf1d93583c8b51d481fcf3a182091e7f 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/arguments_object_type_updaters.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/arguments_object_type_updaters.xml @@ -24,7 +24,7 @@ */ --> <layout> - <block class="Magento\Core\Block\Text" name="block_with_object_updater_args"> + <block class="Magento\View\Block\Text" name="block_with_object_updater_args"> <arguments> <argument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="one" xsi:type="object">Magento\Core\Model\DataSource</argument> <argument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="two" xsi:type="number">0</argument> diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/arguments_url_type.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/arguments_url_type.xml index f1bc97e0fac0fc25a5ed89fa9ea5d6152f27cf26..2812596b8c69c922569f8cb78c1ae6a5eb3137e2 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/arguments_url_type.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/arguments_url_type.xml @@ -24,7 +24,7 @@ */ --> <layout> - <block class="Magento\Core\Block\Text" name="block_with_url_args"> + <block class="Magento\View\Block\Text" name="block_with_url_args"> <arguments> <argument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="one" xsi:type="url" path="customer/account/login"> <param name="_current">1</param> diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/get_block.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/get_block.xml index d718bcd0de660ae6f4901eea89986f48c9d36f0d..76066a8776d51c8ac39334da53ee588954f8bdb5 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/get_block.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/get_block.xml @@ -24,10 +24,10 @@ */ --> <layout> - <block name="block1" class="Magento\Core\Block\Text"> + <block name="block1" class="Magento\View\Block\Text"> <action method="getChildBlock"> <argument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="value" xsi:type="string">block2</argument> </action> - <block name="block2" class="Magento\Core\Block\Text"/> + <block name="block2" class="Magento\View\Block\Text"/> </block> </layout> diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/get_block_exception.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/get_block_exception.xml index cbb8453025d70f4cce4fa7496e1300a711712978..c5b8865411774e47027f1435e5ffb0e2f553f2f5 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/get_block_exception.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/get_block_exception.xml @@ -24,7 +24,7 @@ */ --> <layout> - <block name="block1" class="Magento\Core\Block\Text"> + <block name="block1" class="Magento\View\Block\Text"> <container name="container" label="Container"/> <action method="getChildBlock"> <argument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="value" xsi:type="string">container</argument> diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/group.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/group.xml index 997f9b349da88df1fe9ca1f3e1cc0d85cd1864e0..b22987c91d0f924bcc738607c689737e9fd11033 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/group.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/group.xml @@ -24,18 +24,18 @@ */ --> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <block class="Magento\Core\Block\Text" name="block1"> - <block class="Magento\Core\Block\Text" name="block2" group="group1"> + <block class="Magento\View\Block\Text" name="block1"> + <block class="Magento\View\Block\Text" name="block2" group="group1"> <argumrnts> <argument xsi:type="string" name="text">blok2</argument> </argumrnts> </block> - <block class="Magento\Core\Block\Text" name="block3" group="group1" > + <block class="Magento\View\Block\Text" name="block3" group="group1" > <argumrnts> <argument xsi:type="string" name="text">blok3</argument> </argumrnts> </block> - <block class="Magento\Core\Block\Text" name="block4"> + <block class="Magento\View\Block\Text" name="block4"> <argumrnts> <argument xsi:type="string" name="text">blok4</argument> </argumrnts> diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/ifconfig.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/ifconfig.xml index 153b60eaaf8cc65bced5dca00565150b3fcd8bc9..9a457a04f60abbc775f53198ca71b9b3aed003ec 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/ifconfig.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/ifconfig.xml @@ -24,10 +24,10 @@ */ --> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <block class="Magento\Core\Block\Text" name="block1" ifconfig="not_exists"> - <block class="Magento\Core\Block\Text" name="block2"/> + <block class="Magento\View\Block\Text" name="block1" ifconfig="not_exists"> + <block class="Magento\View\Block\Text" name="block2"/> </block> - <block class="Magento\Core\Block\Text" name="block3" ifconfig="true_options"> - <block class="Magento\Core\Block\Text" name="block4" ifconfig="not_exists"/> + <block class="Magento\View\Block\Text" name="block3" ifconfig="true_options"> + <block class="Magento\View\Block\Text" name="block4" ifconfig="not_exists"/> </block> </layout> diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/move.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/move.xml index 4304fbd501380aaa7b51ac98d7edec2c15ddbe05..47ccbb54e712ea3324a2b829c4d7af61edad59ef 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/move.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/move.xml @@ -25,20 +25,20 @@ --> <layout> <container name="container1" label="Container 1"> - <block class="Magento\Core\Block\Text" name="no.name2" as="no.name2"/> + <block class="Magento\View\Block\Text" name="no.name2" as="no.name2"/> </container> <container name="container2" label="Container 2"/> <move element="container1" destination="container2"/> - <block class="Magento\Core\Block\Text" name="block_container" as="block.container"> - <block class="Magento\Core\Block\Text" name="child_block1"/> - <block class="Magento\Core\Block\Text" name="child_block2"/> + <block class="Magento\View\Block\Text" name="block_container" as="block.container"> + <block class="Magento\View\Block\Text" name="child_block1"/> + <block class="Magento\View\Block\Text" name="child_block2"/> </block> <container name="container3" label="Container 3"> - <block class="Magento\Core\Block\Text" name="no_name"/> + <block class="Magento\View\Block\Text" name="no_name"/> </container> <move element="no_name" destination="block_container" after="child_block1"/> - <block class="Magento\Core\Block\Text" name="no_name4"/> + <block class="Magento\View\Block\Text" name="no_name4"/> <move element="no_name4" destination="block_container" before="child_block2"/> <move element="no_name3" destination="block_container"/> - <block class="Magento\Core\Block\Text" name="no_name3"/> + <block class="Magento\View\Block\Text" name="no_name3"/> </layout> diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/move_alias_broken.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/move_alias_broken.xml index 765cb1b674599717dc109ef2ebc356fc676e5e4f..9a289aa37c2fdccd570a14a07a42d874c443831d 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/move_alias_broken.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/move_alias_broken.xml @@ -25,8 +25,8 @@ --> <layout> <container name="container1" label="Container 1"> - <block class="Magento\Core\Block\Text" name="no_name1" as="same_alias"/> + <block class="Magento\View\Block\Text" name="no_name1" as="same_alias"/> </container> <move element="no_name3" destination="container1" as="same_alias"/> - <block class="Magento\Core\Block\Text" name="no_name3" as="same_alias"/> + <block class="Magento\View\Block\Text" name="no_name3" as="same_alias"/> </layout> diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/move_broken.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/move_broken.xml index ddf91b247cd2ba5c3f710972c5c7533e9bebdf74..f697895b68be79d1d84056463465b6d8dddb27c5 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/move_broken.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/move_broken.xml @@ -26,5 +26,5 @@ <layout> <container name="container1" label="Container 1"/> <move element="no_name3"/> - <block class="Magento\Core\Block\Text" name="no_name3"/> + <block class="Magento\View\Block\Text" name="no_name3"/> </layout> diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/move_new_alias.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/move_new_alias.xml index e31291f030942351fc80f47c9507dab4033bdc3b..0e699133bbc63a25eb38a57f412d046b8d9ffcb1 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/move_new_alias.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/move_new_alias.xml @@ -25,8 +25,8 @@ --> <layout> <container name="container1" label="Container 1"> - <block class="Magento\Core\Block\Text" name="no_name1" as="same_alias"/> + <block class="Magento\View\Block\Text" name="no_name1" as="same_alias"/> </container> <move element="no_name3" destination="container1" as="new_alias"/> - <block class="Magento\Core\Block\Text" name="no_name3" as="same_alias"/> + <block class="Magento\View\Block\Text" name="no_name3" as="same_alias"/> </layout> diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/move_the_same_alias.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/move_the_same_alias.xml index 2c2d7c58615c4aace16e0773a8676c73c33fe393..3306c8580d1e3d676dfe9b43ae89818e8c3d58e1 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/move_the_same_alias.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/move_the_same_alias.xml @@ -25,8 +25,8 @@ --> <layout> <container name="container1" label="Container 1"> - <block class="Magento\Core\Block\Text" name="no_name1" as="same_alias"/> + <block class="Magento\View\Block\Text" name="no_name1" as="same_alias"/> </container> <move element="no_name3" destination="container1"/> - <block class="Magento\Core\Block\Text" name="no_name3" as="same_alias"/> + <block class="Magento\View\Block\Text" name="no_name3" as="same_alias"/> </layout> diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/remove.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/remove.xml index fa0cf05b393814986ff9b2136b903903b132906e..d51f5bb2d61e693e75f798f18f72535e03a0dd3b 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/remove.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/remove.xml @@ -25,13 +25,13 @@ --> <layout> <container name="container1" label="Container 1"> - <block class="Magento\Core\Block\Text" name="no_name2"/> + <block class="Magento\View\Block\Text" name="no_name2"/> </container> <remove name="container1"/> <remove name="child_block1"/> - <block class="Magento\Core\Block\Text" name="block_container" as="block.container"> - <block class="Magento\Core\Block\Text" name="child_block1"/> - <block class="Magento\Core\Block\Text" name="child_block2"/> + <block class="Magento\View\Block\Text" name="block_container" as="block.container"> + <block class="Magento\View\Block\Text" name="child_block1"/> + <block class="Magento\View\Block\Text" name="child_block2"/> </block> <remove name="not_exist"/> </layout> diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/remove_broken.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/remove_broken.xml index a0761fc257d9c65f8d0a5edaca5adea3995f9d92..691d29e02bf468b5171f75178b1dfaa41a05e346 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/remove_broken.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/remove_broken.xml @@ -24,9 +24,9 @@ */ --> <layout> - <block name="test.broken.block" type="Magento\Core\Block\Text"/> + <block name="test.broken.block" type="Magento\View\Block\Text"/> <remove name="test.broken.block"/> - <block class="Magento\Core\Block\Template" name="bug.without.name.action.is.ignored"> + <block class="Magento\View\Block\Template" name="bug.without.name.action.is.ignored"> <action method="insert"> <argument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="element" xsi:type="string">test.broken.block</argument> </action> diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/render.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/render.xml index 7735c7edee211f51670c2615cc6e0eb42d3824cc..5afed0bc447c71586410cca9ed74aa1a2403708f 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/render.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/render.xml @@ -31,12 +31,12 @@ </action> </referenceBlock> <container name="container1" label="Container 1"> - <block class="Magento\Core\Block\Text" name="block1"> + <block class="Magento\View\Block\Text" name="block1"> <action method="addText"> <argument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="value" xsi:type="string">2</argument> </action> </block> - <block class="Magento\Core\Block\Text" name="block2"> + <block class="Magento\View\Block\Text" name="block2"> <action method="setText"> <argument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="value" xsi:type="string">3</argument> </action> diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/sort_after_after.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/sort_after_after.xml index 5f41e08efa87d55d300cd828eccee16046e5c82c..4450ec759e55057eb860c8c33f54808a2755ed0a 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/sort_after_after.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/sort_after_after.xml @@ -25,17 +25,17 @@ --> <layout> <container name="root" label="Root"> - <block class="Magento\Core\Block\Text" name="element1" after="element3"> + <block class="Magento\View\Block\Text" name="element1" after="element3"> <action method="setText"> <argument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="text" xsi:type="string">1</argument> </action> </block> - <block class="Magento\Core\Block\Text" name="element2" after="element1"> + <block class="Magento\View\Block\Text" name="element2" after="element1"> <action method="setText"> <argument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="text" xsi:type="string">2</argument> </action> </block> - <block class="Magento\Core\Block\Text" name="element3" after="element_non_existing"> + <block class="Magento\View\Block\Text" name="element3" after="element_non_existing"> <action method="setText"> <argument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="text" xsi:type="string">3</argument> </action> diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/sort_after_previous.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/sort_after_previous.xml index fcbe9df5d913473af82dc6bd57965ec310ecaf55..c8ea855fba106ccf38a54f1e0ec51a9f418b4135 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/sort_after_previous.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/sort_after_previous.xml @@ -25,17 +25,17 @@ --> <layout> <container name="root" label="Root"> - <block class="Magento\Core\Block\Text" name="element1" after="element2"> + <block class="Magento\View\Block\Text" name="element1" after="element2"> <action method="setText"> <argument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="text" xsi:type="string">1</argument> </action> </block> - <block class="Magento\Core\Block\Text" name="element2" after="element3"> + <block class="Magento\View\Block\Text" name="element2" after="element3"> <action method="setText"> <argument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="text" xsi:type="string">2</argument> </action> </block> - <block class="Magento\Core\Block\Text" name="element3"> + <block class="Magento\View\Block\Text" name="element3"> <!-- neither "before" or "after" specified, therefore insert before all elements --> <action method="setText"> <argument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="text" xsi:type="string">3</argument> diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/sort_before_after.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/sort_before_after.xml index 2352b6327376d3041d5f6d464d778c76e189bd72..d7ecf105a82cb55566d81bf75af8514b36220be8 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/sort_before_after.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/sort_before_after.xml @@ -25,17 +25,17 @@ --> <layout> <container name="root" label="Root"> - <block class="Magento\Core\Block\Text" name="element1" before="element2"> + <block class="Magento\View\Block\Text" name="element1" before="element2"> <action method="setText"> <argument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="text" xsi:type="string">1</argument> </action> </block> - <block class="Magento\Core\Block\Text" name="element2" after="element3"> + <block class="Magento\View\Block\Text" name="element2" after="element3"> <action method="setText"> <argument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="text" xsi:type="string">2</argument> </action> </block> - <block class="Magento\Core\Block\Text" name="element3" after="-"> + <block class="Magento\View\Block\Text" name="element3" after="-"> <action method="setText"> <argument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="text" xsi:type="string">3</argument> </action> diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/sort_before_before.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/sort_before_before.xml index abb60d2a740619ef5f27e9d9536e02bc0681496e..06da3c34dad4a2167494328ff856130a2e2f2079 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/sort_before_before.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/layout_directives_test/sort_before_before.xml @@ -25,17 +25,17 @@ --> <layout> <container name="root" label="Root"> - <block class="Magento\Core\Block\Text" name="element1" before="element3"> + <block class="Magento\View\Block\Text" name="element1" before="element3"> <action method="setText"> <argument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="text" xsi:type="string">1</argument> </action> </block> - <block class="Magento\Core\Block\Text" name="element2" before="element1"> + <block class="Magento\View\Block\Text" name="element2" before="element1"> <action method="setText"> <argument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="text" xsi:type="string">2</argument> </action> </block> - <block class="Magento\Core\Block\Text" name="element3" before="element_non_existing"> + <block class="Magento\View\Block\Text" name="element3" before="element_non_existing"> <!-- element_non_existing doesn't exist, so element3 is generated at the end --> <action method="setText"> <argument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="text" xsi:type="string">3</argument> diff --git a/dev/tests/integration/testsuite/Magento/Core/Utility/Layout.php b/dev/tests/integration/testsuite/Magento/Core/Utility/Layout.php index 5e23a948fbb9ab22b0637ff60c3f6ff20225a1da..893f083e33c3a59f6e89bc62fa1087d895fcb72b 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Utility/Layout.php +++ b/dev/tests/integration/testsuite/Magento/Core/Utility/Layout.php @@ -98,7 +98,7 @@ class Layout 'themeFactory' => $objectManager->get('Magento\Core\Model\Resource\Theme\CollectionFactory'), 'logger' => $objectManager->get('Magento\Logger'), 'eventManager' => $objectManager->get('Magento\Event\ManagerInterface'), - 'factoryHelper' => $objectManager->get('Magento\Core\Model\Factory\Helper'), + 'factoryHelper' => $objectManager->get('Magento\App\Helper\HelperFactory'), 'coreData' => $objectManager->get('Magento\Core\Helper\Data'), 'design' => $objectManager->get('Magento\View\DesignInterface'), 'blockFactory' => $objectManager->create('Magento\View\Element\BlockFactory', array()), @@ -108,6 +108,7 @@ class Layout 'dataServiceGraph' => $objectManager->create('Magento\Core\Model\DataService\Graph', array()), 'coreStoreConfig' => $objectManager->create('Magento\Core\Model\Store\Config'), 'appState' => $objectManager->get('Magento\App\State'), + 'objectManager' => $objectManager ); } } diff --git a/dev/tests/integration/testsuite/Magento/Core/Utility/_files/layout/handle_one.xml b/dev/tests/integration/testsuite/Magento/Core/Utility/_files/layout/handle_one.xml index d2767f68d7a725f5ad863d390ea9556e5c2af87c..8003c92da01ed2e8ba8313e70106350dad1bb0f3 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Utility/_files/layout/handle_one.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Utility/_files/layout/handle_one.xml @@ -24,7 +24,7 @@ */ --> <layout> - <block class="Magento\Core\Block\Text" name="some_text_block"> + <block class="Magento\View\Block\Text" name="some_text_block"> <action method="setText"> <text>Some Default Text</text> </action> diff --git a/dev/tests/integration/testsuite/Magento/Core/Utility/_files/layout_merged/multiple_handles.xml b/dev/tests/integration/testsuite/Magento/Core/Utility/_files/layout_merged/multiple_handles.xml index f3593aaadd881981f1160789954e21fb236aea3a..94213cee83fbfc806ecc713baa894628ba144046 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Utility/_files/layout_merged/multiple_handles.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Utility/_files/layout_merged/multiple_handles.xml @@ -25,7 +25,7 @@ --> <layouts> <handle id="handle_one"> - <block class="Magento\Core\Block\Text" name="some_text_block"> + <block class="Magento\View\Block\Text" name="some_text_block"> <action method="setText"> <text>Some Default Text</text> </action> diff --git a/dev/tests/integration/testsuite/Magento/Customer/Controller/Adminhtml/GroupTest.php b/dev/tests/integration/testsuite/Magento/Customer/Controller/Adminhtml/GroupTest.php index a5c92a8a4c23bfa51794774dd5fb6ee73f0fbce8..de9be851472691000219593d406d37f7aefd374e 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Controller/Adminhtml/GroupTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Controller/Adminhtml/GroupTest.php @@ -67,7 +67,7 @@ class GroupTest extends \Magento\Backend\Utility\Controller * Check that success message is set */ $this->assertSessionMessages( - $this->equalTo(array('The customer group has been deleted.')), \Magento\Core\Model\Message::SUCCESS + $this->equalTo(array('The customer group has been deleted.')), \Magento\Message\Factory::SUCCESS ); } @@ -80,7 +80,7 @@ class GroupTest extends \Magento\Backend\Utility\Controller * Check that error message is set */ $this->assertSessionMessages( - $this->equalTo(array('The customer group no longer exists.')), \Magento\Core\Model\Message::ERROR + $this->equalTo(array('The customer group no longer exists.')), \Magento\Message\Factory::ERROR ); } } diff --git a/dev/tests/integration/testsuite/Magento/Customer/Controller/Adminhtml/IndexTest.php b/dev/tests/integration/testsuite/Magento/Customer/Controller/Adminhtml/IndexTest.php index f4854cbfc59b47050023e4123effab781406be11..4f8cfb4707f83f6749530ebf02291ceeb152e88d 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Controller/Adminhtml/IndexTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Controller/Adminhtml/IndexTest.php @@ -81,7 +81,7 @@ class IndexTest extends \Magento\Backend\Utility\Controller /** * Check that errors was generated and set to session */ - $this->assertSessionMessages($this->logicalNot($this->isEmpty()), \Magento\Core\Model\Message::ERROR); + $this->assertSessionMessages($this->logicalNot($this->isEmpty()), \Magento\Message\Factory::ERROR); /** * Check that customer data were set to session */ @@ -111,7 +111,7 @@ class IndexTest extends \Magento\Backend\Utility\Controller /** * Check that errors was generated and set to session */ - $this->assertSessionMessages($this->logicalNot($this->isEmpty()), \Magento\Core\Model\Message::ERROR); + $this->assertSessionMessages($this->logicalNot($this->isEmpty()), \Magento\Message\Factory::ERROR); /** * Check that customer data were set to session */ @@ -157,7 +157,7 @@ class IndexTest extends \Magento\Backend\Utility\Controller /** * Check that errors was generated and set to session */ - $this->assertSessionMessages($this->isEmpty(), \Magento\Core\Model\Message::ERROR); + $this->assertSessionMessages($this->isEmpty(), \Magento\Message\Factory::ERROR); /** * Check that customer data were set to session */ @@ -166,7 +166,7 @@ class IndexTest extends \Magento\Backend\Utility\Controller /** * Check that success message is set */ - $this->assertSessionMessages($this->logicalNot($this->isEmpty()), \Magento\Core\Model\Message::SUCCESS); + $this->assertSessionMessages($this->logicalNot($this->isEmpty()), \Magento\Message\Factory::SUCCESS); /** * Check that customer id set and addresses saved @@ -238,7 +238,7 @@ class IndexTest extends \Magento\Backend\Utility\Controller * Check that success message is set */ $this->assertSessionMessages( - $this->equalTo(array('You saved the customer.')), \Magento\Core\Model\Message::SUCCESS + $this->equalTo(array('You saved the customer.')), \Magento\Message\Factory::SUCCESS ); /** @var $objectManager \Magento\TestFramework\ObjectManager */ @@ -295,7 +295,7 @@ class IndexTest extends \Magento\Backend\Utility\Controller */ $this->assertSessionMessages( $this->equalTo(array('Customer with the same email already exists.')), - \Magento\Core\Model\Message::ERROR + \Magento\Message\Factory::ERROR ); $this->assertEquals($post, \Magento\TestFramework\Helper\Bootstrap::getObjectManager() ->get('Magento\Backend\Model\Session')->getCustomerData()); diff --git a/dev/tests/integration/testsuite/Magento/DesignEditor/Controller/Adminhtml/System/Design/EditorTest.php b/dev/tests/integration/testsuite/Magento/DesignEditor/Controller/Adminhtml/System/Design/EditorTest.php index 22104e681925754bced6bb2d5309c5c118fec5c7..298f51476b1d27146dcfa219450ebcc270116411 100644 --- a/dev/tests/integration/testsuite/Magento/DesignEditor/Controller/Adminhtml/System/Design/EditorTest.php +++ b/dev/tests/integration/testsuite/Magento/DesignEditor/Controller/Adminhtml/System/Design/EditorTest.php @@ -59,7 +59,7 @@ class EditorTest extends \Magento\Backend\Utility\Controller $this->dispatch('backend/admin/system_design_editor/launch'); $this->assertSessionMessages($this->equalTo( array('We can\'t find theme "' . $wrongThemeId . '".')), - \Magento\Core\Model\Message::ERROR + \Magento\Message\Factory::ERROR ); $expected = 'http://localhost/index.php/backend/admin/system_design_editor/index/'; $this->assertRedirect($this->stringStartsWith($expected)); diff --git a/dev/tests/integration/testsuite/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/LinksTest.php b/dev/tests/integration/testsuite/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/LinksTest.php index f01226a154a8bd167f07de95d421a28a40b9b9f3..8d65b73dbbc5ee852f96ba184ae778e7c1a6c755 100644 --- a/dev/tests/integration/testsuite/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/LinksTest.php +++ b/dev/tests/integration/testsuite/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/LinksTest.php @@ -40,9 +40,9 @@ class LinksTest /** * Reuse code for testing getUploadButtonHtml() * - * @param \Magento\Core\Block\AbstractBlock $block + * @param \Magento\View\Block\AbstractBlock $block */ - public static function performUploadButtonTest(\Magento\Core\Block\AbstractBlock $block) + public static function performUploadButtonTest(\Magento\View\Block\AbstractBlock $block) { /** @var $layout \Magento\View\LayoutInterface */ $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() @@ -50,7 +50,7 @@ class LinksTest $layout->addBlock($block, 'links'); $expected = uniqid(); $text = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface') - ->createBlock('Magento\Core\Block\Text', '', array('data' => array('text' => $expected))); + ->createBlock('Magento\View\Block\Text', '', array('data' => array('text' => $expected))); $block->unsetChild('upload_button'); $layout->addBlock($text, 'upload_button', 'links'); self::assertEquals($expected, $block->getUploadButtonHtml()); diff --git a/dev/tests/integration/testsuite/Magento/Eav/Block/Adminhtml/Attribute/Edit/Main/AbstractTest.php b/dev/tests/integration/testsuite/Magento/Eav/Block/Adminhtml/Attribute/Edit/Main/AbstractTest.php index 78ad066cc7aabd9a8bf0772551a85b456c7fad49..2ba6e9d740daa6e8450bc70e4515d41e8ab880fc 100644 --- a/dev/tests/integration/testsuite/Magento/Eav/Block/Adminhtml/Attribute/Edit/Main/AbstractTest.php +++ b/dev/tests/integration/testsuite/Magento/Eav/Block/Adminhtml/Attribute/Edit/Main/AbstractTest.php @@ -54,12 +54,11 @@ class AbstractTest $block = $this->getMockForAbstractClass( 'Magento\Eav\Block\Adminhtml\Attribute\Edit\Main\AbstractMain', array( + $objectManager->get('Magento\Backend\Block\Template\Context'), + $objectManager->get('Magento\Core\Helper\Data'), $objectManager->get('Magento\Core\Model\Registry'), $objectManager->get('Magento\Data\FormFactory'), - $objectManager->get('Magento\Core\Helper\Data'), - $objectManager->get('Magento\Backend\Block\Template\Context'), $objectManager->get('Magento\Eav\Helper\Data'), - $objectManager->get('Magento\Core\Model\LocaleInterface'), $objectManager->get('Magento\Backend\Model\Config\Source\YesnoFactory'), $objectManager->get('Magento\Eav\Model\Adminhtml\System\Config\Source\InputtypeFactory'), $objectManager->get('Magento\Eav\Model\Entity\Attribute\Config') diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/Email/Template/FilterTest.php b/dev/tests/integration/testsuite/Magento/Email/Model/Template/FilterTest.php similarity index 90% rename from dev/tests/integration/testsuite/Magento/Core/Model/Email/Template/FilterTest.php rename to dev/tests/integration/testsuite/Magento/Email/Model/Template/FilterTest.php index 6f6784cfdc8f5c570591fc00bc5c7619ddd495f7..d165b3f8eaf9cd2e8c56840e68945ff8b6bd5a46 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/Email/Template/FilterTest.php +++ b/dev/tests/integration/testsuite/Magento/Email/Model/Template/FilterTest.php @@ -25,19 +25,19 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Core\Model\Email\Template; +namespace Magento\Email\Model\Template; class FilterTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Core\Model\Email\Template\Filter + * @var \Magento\Email\Model\Template\Filter */ protected $_model = null; protected function setUp() { $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() - ->create('Magento\Core\Model\Email\Template\Filter'); + ->create('Magento\Email\Model\Template\Filter'); } /** @@ -100,7 +100,7 @@ class FilterTest extends \PHPUnit_Framework_TestCase } /** - * @magentoDataFixture Magento/Core/Model/Email/_files/themes.php + * @magentoDataFixture Magento/Email/Model/_files/themes.php * @magentoAppIsolation enabled * @dataProvider layoutDirectiveDataProvider * @@ -116,24 +116,26 @@ class FilterTest extends \PHPUnit_Framework_TestCase ) )); $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() - ->create('Magento\Core\Model\Email\Template\Filter'); + ->create('Magento\Email\Model\Template\Filter'); + + $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); + + $themes = array('frontend' => 'test_default', 'adminhtml' => 'test_default'); + $design = $objectManager->create('Magento\Core\Model\View\Design', array('themes' => $themes)); + $objectManager->addSharedInstance($design, 'Magento\Core\Model\View\Design'); + \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\App') ->loadArea($area); - $collection = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() - ->create('Magento\Core\Model\Resource\Theme\Collection'); + $collection = $objectManager->create('Magento\Core\Model\Resource\Theme\Collection'); $themeId = $collection->getThemeByFullPath('frontend/test_default')->getId(); - \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\StoreManagerInterface') + $objectManager->get('Magento\Core\Model\StoreManagerInterface') ->getStore()->setConfig( \Magento\Core\Model\View\Design::XML_PATH_THEME_ID, $themeId ); - $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $themes = array('frontend' => 'test_default', 'adminhtml' => 'test_default'); - $design = $objectManager->create('Magento\Core\Model\View\Design', array('themes' => $themes)); - $objectManager->addSharedInstance($design, 'Magento\Core\Model\View\Design'); /** @var $layout \Magento\View\LayoutInterface */ $layout = $objectManager->create('Magento\Core\Model\Layout'); @@ -177,7 +179,7 @@ class FilterTest extends \PHPUnit_Framework_TestCase ), 'custom parameter' => array( 'frontend', - 'handle="email_template_test_handle" template="sample_email_content_custom.phtml"', + 'handle="email_template_test_handle" template="Magento_Core::sample_email_content_custom.phtml"', 'Custom E-mail content for frontend/test_default theme', ), ); diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/Email/TemplateTest.php b/dev/tests/integration/testsuite/Magento/Email/Model/TemplateTest.php similarity index 93% rename from dev/tests/integration/testsuite/Magento/Core/Model/Email/TemplateTest.php rename to dev/tests/integration/testsuite/Magento/Email/Model/TemplateTest.php index b48d790e5197b3dbb80b05147569fbf85f3ed768..3a0885349e01c75bfb82f96f7e5a644026fa4dd0 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/Email/TemplateTest.php +++ b/dev/tests/integration/testsuite/Magento/Email/Model/TemplateTest.php @@ -25,12 +25,12 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Core\Model\Email; +namespace Magento\Email\Model; class TemplateTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Core\Model\Email\Template|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Email\Model\Template|\PHPUnit_Framework_MockObject_MockObject */ protected $_model; @@ -45,7 +45,7 @@ class TemplateTest extends \PHPUnit_Framework_TestCase 'Zend_Mail', array('send', 'addTo', 'addBcc', 'setReturnPath', 'setReplyTo'), array('utf-8') ); $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $this->_model = $this->getMockBuilder('Magento\Core\Model\Email\Template') + $this->_model = $this->getMockBuilder('Magento\Email\Model\Template') ->setMethods(array('_getMail')) ->setConstructorArgs(array( \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\Context'), @@ -57,10 +57,10 @@ class TemplateTest extends \PHPUnit_Framework_TestCase $objectManager->get('Magento\View\DesignInterface'), $objectManager->create('Magento\Core\Model\Store\Config'), $objectManager->create('Magento\Core\Model\Config'), - $objectManager->get('Magento\Core\Model\Email\Template\FilterFactory'), + $objectManager->get('Magento\Email\Model\Template\FilterFactory'), $objectManager->get('Magento\Core\Model\StoreManager'), $objectManager->get('Magento\App\Dir'), - $objectManager->get('Magento\Core\Model\Email\Template\Config'), + $objectManager->get('Magento\Email\Model\Template\Config'), )) ->getMock(); \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\State')->setAreaCode('frontend'); @@ -89,7 +89,7 @@ class TemplateTest extends \PHPUnit_Framework_TestCase ); $filter = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() - ->create('Magento\Core\Model\Email\Template\Filter'); + ->create('Magento\Email\Model\Template\Filter'); $this->_model->setTemplateFilter($filter); $this->assertSame($filter, $this->_model->getTemplateFilter()); } @@ -176,10 +176,10 @@ class TemplateTest extends \PHPUnit_Framework_TestCase } /** - * @covers \Magento\Core\Model\Email\Template::send - * @covers \Magento\Core\Model\Email\Template::addBcc - * @covers \Magento\Core\Model\Email\Template::setReturnPath - * @covers \Magento\Core\Model\Email\Template::setReplyTo + * @covers \Magento\Email\Model\Template::send + * @covers \Magento\Email\Model\Template::addBcc + * @covers \Magento\Email\Model\Template::setReturnPath + * @covers \Magento\Email\Model\Template::setReplyTo */ public function testSend() { diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/Email/_files/design/adminhtml/test_default/Magento_Core/layout/email_template_test_handle.xml b/dev/tests/integration/testsuite/Magento/Email/Model/_files/design/adminhtml/test_default/Magento_Core/layout/email_template_test_handle.xml similarity index 100% rename from dev/tests/integration/testsuite/Magento/Core/Model/Email/_files/design/adminhtml/test_default/Magento_Core/layout/email_template_test_handle.xml rename to dev/tests/integration/testsuite/Magento/Email/Model/_files/design/adminhtml/test_default/Magento_Core/layout/email_template_test_handle.xml diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/Email/_files/design/adminhtml/test_default/Magento_Core/sample_email_content.phtml b/dev/tests/integration/testsuite/Magento/Email/Model/_files/design/adminhtml/test_default/Magento_Core/sample_email_content.phtml similarity index 100% rename from dev/tests/integration/testsuite/Magento/Core/Model/Email/_files/design/adminhtml/test_default/Magento_Core/sample_email_content.phtml rename to dev/tests/integration/testsuite/Magento/Email/Model/_files/design/adminhtml/test_default/Magento_Core/sample_email_content.phtml diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/Email/_files/design/adminhtml/test_default/theme.xml b/dev/tests/integration/testsuite/Magento/Email/Model/_files/design/adminhtml/test_default/theme.xml similarity index 100% rename from dev/tests/integration/testsuite/Magento/Core/Model/Email/_files/design/adminhtml/test_default/theme.xml rename to dev/tests/integration/testsuite/Magento/Email/Model/_files/design/adminhtml/test_default/theme.xml diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/Email/_files/design/frontend/test_default/Magento_Core/layout/email_template_test_handle.xml b/dev/tests/integration/testsuite/Magento/Email/Model/_files/design/frontend/test_default/Magento_Core/layout/email_template_test_handle.xml similarity index 86% rename from dev/tests/integration/testsuite/Magento/Core/Model/Email/_files/design/frontend/test_default/Magento_Core/layout/email_template_test_handle.xml rename to dev/tests/integration/testsuite/Magento/Email/Model/_files/design/frontend/test_default/Magento_Core/layout/email_template_test_handle.xml index 450bacbf47257419fefe16491a362349fb98ed9f..05f821c354e2355dc38a94dab43e000c3ba28c94 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/Email/_files/design/frontend/test_default/Magento_Core/layout/email_template_test_handle.xml +++ b/dev/tests/integration/testsuite/Magento/Email/Model/_files/design/frontend/test_default/Magento_Core/layout/email_template_test_handle.xml @@ -27,8 +27,8 @@ */ --> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > - <block class="Magento\Core\Block\Template" name="sample_email_content" template="sample_email_content.phtml"/> - <block class="Magento\Core\Block\Text" name="ignored_email_content"> + <block class="Magento\View\Block\Template" name="sample_email_content" template="Magento_Core::sample_email_content.phtml"/> + <block class="Magento\View\Block\Text" name="ignored_email_content"> <action method="setText"> <argument name="text" xsi:type="string">Ignored e-mail content, only the first block is used</argument> </action> diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/Email/_files/design/frontend/test_default/Magento_Core/sample_email_content.phtml b/dev/tests/integration/testsuite/Magento/Email/Model/_files/design/frontend/test_default/Magento_Core/sample_email_content.phtml similarity index 100% rename from dev/tests/integration/testsuite/Magento/Core/Model/Email/_files/design/frontend/test_default/Magento_Core/sample_email_content.phtml rename to dev/tests/integration/testsuite/Magento/Email/Model/_files/design/frontend/test_default/Magento_Core/sample_email_content.phtml diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/Email/_files/design/frontend/test_default/Magento_Core/sample_email_content_custom.phtml b/dev/tests/integration/testsuite/Magento/Email/Model/_files/design/frontend/test_default/Magento_Core/sample_email_content_custom.phtml similarity index 100% rename from dev/tests/integration/testsuite/Magento/Core/Model/Email/_files/design/frontend/test_default/Magento_Core/sample_email_content_custom.phtml rename to dev/tests/integration/testsuite/Magento/Email/Model/_files/design/frontend/test_default/Magento_Core/sample_email_content_custom.phtml diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/Email/_files/design/frontend/test_default/theme.xml b/dev/tests/integration/testsuite/Magento/Email/Model/_files/design/frontend/test_default/theme.xml similarity index 100% rename from dev/tests/integration/testsuite/Magento/Core/Model/Email/_files/design/frontend/test_default/theme.xml rename to dev/tests/integration/testsuite/Magento/Email/Model/_files/design/frontend/test_default/theme.xml diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/Email/_files/themes.php b/dev/tests/integration/testsuite/Magento/Email/Model/_files/themes.php similarity index 100% rename from dev/tests/integration/testsuite/Magento/Core/Model/Email/_files/themes.php rename to dev/tests/integration/testsuite/Magento/Email/Model/_files/themes.php diff --git a/dev/tests/integration/testsuite/Magento/GoogleShopping/Block/Adminhtml/Items/ProductTest.php b/dev/tests/integration/testsuite/Magento/GoogleShopping/Block/Adminhtml/Items/ProductTest.php index 241a77401f6bad7321a55bb5f3fe9e5c6fe388f9..4df92be2738e67f698ba01670f997c610850b934 100644 --- a/dev/tests/integration/testsuite/Magento/GoogleShopping/Block/Adminhtml/Items/ProductTest.php +++ b/dev/tests/integration/testsuite/Magento/GoogleShopping/Block/Adminhtml/Items/ProductTest.php @@ -39,9 +39,9 @@ class ProductTest extends \PHPUnit_Framework_TestCase $block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface') ->createBlock('Magento\GoogleShopping\Block\Adminhtml\Items\Product'); $filter = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface') - ->createBlock('Magento\Core\Block\Text'); + ->createBlock('Magento\View\Block\Text'); $search = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface') - ->createBlock('Magento\Core\Block\Text'); + ->createBlock('Magento\View\Block\Text'); $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface'); $layout->addBlock($block, 'product'); diff --git a/dev/tests/integration/testsuite/Magento/Integration/Controller/Adminhtml/IntegrationTest.php b/dev/tests/integration/testsuite/Magento/Integration/Controller/Adminhtml/IntegrationTest.php index b5d777e7660482d41480c3cde1538f32c541f83c..17fcedfb37beea3aa4d4e668f89eb757d74c4e73 100644 --- a/dev/tests/integration/testsuite/Magento/Integration/Controller/Adminhtml/IntegrationTest.php +++ b/dev/tests/integration/testsuite/Magento/Integration/Controller/Adminhtml/IntegrationTest.php @@ -91,7 +91,7 @@ class IntegrationTest extends \Magento\Backend\Utility\Controller $this->dispatch('backend/admin/integration/save'); $this->assertSessionMessages( $this->equalTo(array("The integration '$integrationName' has been saved.")), - \Magento\Core\Model\Message::SUCCESS + \Magento\Message\Factory::SUCCESS ); $this->assertRedirect($this->stringContains('backend/admin/integration/index/')); } @@ -110,7 +110,7 @@ class IntegrationTest extends \Magento\Backend\Utility\Controller $this->assertSessionMessages( $this->equalTo(array("The integration '$integrationName' has been saved.")), - \Magento\Core\Model\Message::SUCCESS + \Magento\Message\Factory::SUCCESS ); $this->assertRedirect($this->stringContains('backend/admin/integration/index/')); } diff --git a/dev/tests/integration/testsuite/Magento/Newsletter/Model/QueueTest.php b/dev/tests/integration/testsuite/Magento/Newsletter/Model/QueueTest.php index 453ab4b5b3180df3dc5f68798c51fa4f17d1ed46..7922f12618cf240469af5432c57cce8315124229 100644 --- a/dev/tests/integration/testsuite/Magento/Newsletter/Model/QueueTest.php +++ b/dev/tests/integration/testsuite/Magento/Newsletter/Model/QueueTest.php @@ -42,7 +42,7 @@ class QueueTest extends \PHPUnit_Framework_TestCase $themes = array('frontend' => 'magento_blank'); /** @var $design \Magento\Core\Model\View\Design */ $design = $objectManager->create('Magento\View\DesignInterface', array('themes' => $themes)); - $objectManager->addSharedInstance($design, 'Magento\Core\Model\View\Design'); + $objectManager->addSharedInstance($design, 'Magento\Core\Model\View\Design\Proxy'); /** @var $appEmulation \Magento\Core\Model\App\Emulation */ $appEmulation = $objectManager->create('Magento\Core\Model\App\Emulation', array('viewDesign' => $design)); $objectManager->addSharedInstance($appEmulation, 'Magento\Core\Model\App\Emulation'); @@ -62,7 +62,7 @@ class QueueTest extends \PHPUnit_Framework_TestCase $subscriberOne->expects($this->any())->method('send'); $subscriberTwo = clone $subscriberOne; $subscriberOne->expects($this->once())->method('setBodyHTML')->with( - $this->stringEndsWith('/static/frontend/magento_blank/en_US/images/logo.gif') + $this->stringEndsWith('/static/frontend/magento_plushe/en_US/images/logo.gif') ); $subscriberTwo->expects($this->once())->method('setBodyHTML')->with( $this->stringEndsWith('/static/frontend/magento_demo/de_DE/images/logo.gif') @@ -70,7 +70,7 @@ class QueueTest extends \PHPUnit_Framework_TestCase /** @var $filter \Magento\Newsletter\Model\Template\Filter */ $filter = $objectManager->get('Magento\Newsletter\Model\Template\Filter'); - $emailTemplate = $this->getMock('Magento\Core\Model\Email\Template', + $emailTemplate = $this->getMock('Magento\Email\Model\Template', array('_getMail', '_getLogoUrl', '__wakeup', 'setTemplateFilter'), array( $objectManager->get('Magento\Core\Model\Context'), @@ -82,10 +82,10 @@ class QueueTest extends \PHPUnit_Framework_TestCase $design, $objectManager->get('Magento\Core\Model\Store\ConfigInterface'), $objectManager->get('Magento\Core\Model\ConfigInterface'), - $objectManager->get('Magento\Core\Model\Email\Template\FilterFactory'), + $objectManager->get('Magento\Email\Model\Template\FilterFactory'), $objectManager->get('Magento\Core\Model\StoreManagerInterface'), $objectManager->get('Magento\App\Dir'), - $objectManager->get('Magento\Core\Model\Email\Template\Config'), + $objectManager->get('Magento\Email\Model\Template\Config'), ) ); $emailTemplate->expects($this->once()) @@ -117,7 +117,7 @@ class QueueTest extends \PHPUnit_Framework_TestCase $errorMsg = md5(microtime()); $brokenMail->expects($this->any())->method('send')->will($this->throwException(new \Exception($errorMsg, 99))); $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $template = $this->getMock('Magento\Core\Model\Email\Template', + $template = $this->getMock('Magento\Email\Model\Template', array('_getMail', '_getLogoUrl', '__wakeup'), array( $objectManager->get('Magento\Core\Model\Context'), @@ -129,10 +129,10 @@ class QueueTest extends \PHPUnit_Framework_TestCase $objectManager->get('Magento\Core\Model\View\Design'), $objectManager->get('Magento\Core\Model\Store\ConfigInterface'), $objectManager->get('Magento\Core\Model\ConfigInterface'), - $objectManager->get('Magento\Core\Model\Email\Template\FilterFactory'), + $objectManager->get('Magento\Email\Model\Template\FilterFactory'), $objectManager->get('Magento\Core\Model\StoreManagerInterface'), $objectManager->get('Magento\App\Dir'), - $objectManager->get('Magento\Core\Model\Email\Template\Config'), + $objectManager->get('Magento\Email\Model\Template\Config'), ) ); $template->expects($this->any())->method('_getMail')->will($this->onConsecutiveCalls($mail, $brokenMail)); diff --git a/dev/tests/integration/testsuite/Magento/Page/Block/HtmlTest.php b/dev/tests/integration/testsuite/Magento/Page/Block/HtmlTest.php index a881908c4d96e45c6e23fd79324c6ff156d8a9e6..3d0297c92a7393fd3317895661601673e9235a02 100644 --- a/dev/tests/integration/testsuite/Magento/Page/Block/HtmlTest.php +++ b/dev/tests/integration/testsuite/Magento/Page/Block/HtmlTest.php @@ -64,7 +64,7 @@ class HtmlTest extends \PHPUnit_Framework_TestCase ->will($this->returnValue('http://localhost/pub/media/')); $context = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() - ->create('Magento\Core\Block\Template\Context', array( + ->create('Magento\View\Block\Template\Context', array( 'storeConfig' => $storeConfig, 'urlBuilder' => $urlBuilder, )); diff --git a/dev/tests/integration/testsuite/Magento/Payment/Block/InfoTest.php b/dev/tests/integration/testsuite/Magento/Payment/Block/InfoTest.php index 5047bf920a93e44dc9b9c44ce2a3c069ac3a81cb..0c62e072adf4f63d89fdfbaddadac218d1c59eee 100644 --- a/dev/tests/integration/testsuite/Magento/Payment/Block/InfoTest.php +++ b/dev/tests/integration/testsuite/Magento/Payment/Block/InfoTest.php @@ -51,7 +51,7 @@ class InfoTest extends \PHPUnit_Framework_TestCase $childBank->setInfo($paymentInfoBank); $nonExpectedHtml = 'non-expected html'; - $childHtml = $layout->addBlock('Magento\Core\Block\Text', 'child.html', 'block'); + $childHtml = $layout->addBlock('Magento\View\Block\Text', 'child.html', 'block'); $childHtml->setText($nonExpectedHtml); /** @var $paymentInfoCheckmo \Magento\Payment\Model\Info */ diff --git a/dev/tests/integration/testsuite/Magento/Paypal/Adminhtml/Paypal/ReportsTest.php b/dev/tests/integration/testsuite/Magento/Paypal/Adminhtml/Paypal/ReportsTest.php index 9f9e18b7c13ea6c90923adc5fd1c2c7a48cdbb86..fe2138d9a29af416ed3f7923de67e15f7afe17ff 100644 --- a/dev/tests/integration/testsuite/Magento/Paypal/Adminhtml/Paypal/ReportsTest.php +++ b/dev/tests/integration/testsuite/Magento/Paypal/Adminhtml/Paypal/ReportsTest.php @@ -43,7 +43,7 @@ class ReportsTest extends \Magento\Backend\Utility\Controller $this->dispatch('backend/admin/paypal_reports/fetch'); $this->assertSessionMessages( $this->equalTo(array("We couldn't fetch reports from 'login@127.0.0.1'.")), - \Magento\Core\Model\Message::ERROR + \Magento\Message\Factory::ERROR ); } } diff --git a/dev/tests/integration/testsuite/Magento/Rss/Controller/OrderTest.php b/dev/tests/integration/testsuite/Magento/Rss/Controller/OrderTest.php index 9b8d5897578a04d92de26c0bfd0daa0e2c62924a..4d90996df0a28db0882d87f470b9373c410ac23b 100644 --- a/dev/tests/integration/testsuite/Magento/Rss/Controller/OrderTest.php +++ b/dev/tests/integration/testsuite/Magento/Rss/Controller/OrderTest.php @@ -68,7 +68,6 @@ class OrderTest extends \Magento\TestFramework\TestCase\AbstractController * @param string $password * @dataProvider invalidAccessDataProvider * @magentoDataFixture Magento/User/_files/dummy_user.php - * @covers \Magento\Rss\Controller\Order::authenticateAndAuthorizeAdmin */ public function testInvalidAccess($login, $password) { diff --git a/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Items/AbstractTest.php b/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Items/AbstractTest.php index fc0bd995c015f3cb35c4f2f29dcf2f99e53be7ab..a92d2d1706868d1a6373169962fba042e571cce3 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Items/AbstractTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Items/AbstractTest.php @@ -44,8 +44,8 @@ class AbstractTest extends \PHPUnit_Framework_TestCase $this->assertEmpty($block->getItemExtraInfoHtml($item)); $expectedHtml ='<html><body>some data</body></html>'; - /** @var $childBlock \Magento\Core\Block\Text */ - $childBlock = $layout->addBlock('Magento\Core\Block\Text', 'other_block', 'block', 'order_item_extra_info'); + /** @var $childBlock \Magento\View\Block\Text */ + $childBlock = $layout->addBlock('Magento\View\Block\Text', 'other_block', 'block', 'order_item_extra_info'); $childBlock->setText($expectedHtml); $this->assertEquals($expectedHtml, $block->getItemExtraInfoHtml($item)); diff --git a/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Form/AbstractTest.php b/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Form/AbstractTest.php index 71a29157c8625bb8ada1f70d5bf880ed6367e9f7..4c3c5b741f4d135745ebfa28d11e7de78e168a64 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Form/AbstractTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Form/AbstractTest.php @@ -45,12 +45,13 @@ class AbstractTest $objectManager->get('Magento\View\DesignInterface') ->setDefaultDesignTheme(); $arguments = array( - $objectManager->get('Magento\Data\FormFactory'), + $objectManager->get('Magento\Backend\Block\Template\Context'), + $objectManager->get('Magento\Core\Helper\Data'), $objectManager->get('Magento\Adminhtml\Model\Session\Quote'), $objectManager->get('Magento\Sales\Model\AdminOrder\Create'), - $objectManager->get('Magento\Core\Helper\Data'), - $objectManager->get('Magento\Backend\Block\Template\Context'), + $objectManager->get('Magento\Data\FormFactory'), ); + /** @var $block \Magento\Sales\Block\Adminhtml\Order\Create\Form\AbstractForm */ $block = $this ->getMockForAbstractClass('Magento\Sales\Block\Adminhtml\Order\Create\Form\AbstractForm', $arguments); diff --git a/dev/tests/integration/testsuite/Magento/Sales/Block/Order/Creditmemo/ItemsTest.php b/dev/tests/integration/testsuite/Magento/Sales/Block/Order/Creditmemo/ItemsTest.php index dd082c4b87e5c3e4692398152a1521c6fe7ba992..041fa027d852df56546d5a61d75453924e674c51 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Block/Order/Creditmemo/ItemsTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Block/Order/Creditmemo/ItemsTest.php @@ -58,7 +58,7 @@ class ItemsTest extends \PHPUnit_Framework_TestCase */ public function testGetTotalsHtml() { - $childBlock = $this->_layout->addBlock('Magento\Core\Block\Text', 'creditmemo_totals', 'block'); + $childBlock = $this->_layout->addBlock('Magento\View\Block\Text', 'creditmemo_totals', 'block'); $expectedHtml = '<b>Any html</b>'; $this->assertEmpty($childBlock->getCreditmemo()); @@ -72,7 +72,7 @@ class ItemsTest extends \PHPUnit_Framework_TestCase public function testGetCommentsHtml() { - $childBlock = $this->_layout->addBlock('Magento\Core\Block\Text', 'creditmemo_comments', 'block'); + $childBlock = $this->_layout->addBlock('Magento\View\Block\Text', 'creditmemo_comments', 'block'); $expectedHtml = '<b>Any html</b>'; $this->assertEmpty($childBlock->getEntity()); diff --git a/dev/tests/integration/testsuite/Magento/Sales/Block/Order/Invoice/ItemsTest.php b/dev/tests/integration/testsuite/Magento/Sales/Block/Order/Invoice/ItemsTest.php index 54ddf9ea9c54679aaf2564d6c218739735d5caaf..7663aa8d94a41fd3c72a32cdd91099dfc6beb465 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Block/Order/Invoice/ItemsTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Block/Order/Invoice/ItemsTest.php @@ -58,7 +58,7 @@ class ItemsTest extends \PHPUnit_Framework_TestCase */ public function testGetInvoiceTotalsHtml() { - $childBlock = $this->_layout->addBlock('Magento\Core\Block\Text', 'invoice_totals', 'block'); + $childBlock = $this->_layout->addBlock('Magento\View\Block\Text', 'invoice_totals', 'block'); $expectedHtml = '<b>Any html</b>'; $this->assertEmpty($childBlock->getInvoice()); @@ -72,7 +72,7 @@ class ItemsTest extends \PHPUnit_Framework_TestCase public function testGetInvoiceCommentsHtml() { - $childBlock = $this->_layout->addBlock('Magento\Core\Block\Text', 'invoice_comments', 'block'); + $childBlock = $this->_layout->addBlock('Magento\View\Block\Text', 'invoice_comments', 'block'); $expectedHtml = '<b>Any html</b>'; $this->assertEmpty($childBlock->getEntity()); diff --git a/dev/tests/integration/testsuite/Magento/Sales/Block/Order/PrintOrder/CreditmemoTest.php b/dev/tests/integration/testsuite/Magento/Sales/Block/Order/PrintOrder/CreditmemoTest.php index 4111f8ba407dfb867047a743528b84ffdc5aa844..083be5f59ff51e1dc4ad9d294449eb5a7262dbfb 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Block/Order/PrintOrder/CreditmemoTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Block/Order/PrintOrder/CreditmemoTest.php @@ -46,7 +46,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface'); $block = $layout->createBlock('Magento\Sales\Block\Order\PrintOrder\Creditmemo', 'block'); - $childBlock = $layout->addBlock('Magento\Core\Block\Text', 'creditmemo_totals', 'block'); + $childBlock = $layout->addBlock('Magento\View\Block\Text', 'creditmemo_totals', 'block'); $expectedHtml = '<b>Any html</b>'; $creditmemo = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() diff --git a/dev/tests/integration/testsuite/Magento/Sales/Block/Order/PrintOrder/InvoiceTest.php b/dev/tests/integration/testsuite/Magento/Sales/Block/Order/PrintOrder/InvoiceTest.php index 1f437b4029f194333936dc0692a52a0ac7b281df..38e05d40f19fe0900d61730d6bf400f1ed509559 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Block/Order/PrintOrder/InvoiceTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Block/Order/PrintOrder/InvoiceTest.php @@ -46,7 +46,7 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface'); $block = $layout->createBlock('Magento\Sales\Block\Order\PrintOrder\Invoice', 'block'); - $childBlock = $layout->addBlock('Magento\Core\Block\Text', 'invoice_totals', 'block'); + $childBlock = $layout->addBlock('Magento\View\Block\Text', 'invoice_totals', 'block'); $expectedHtml = '<b>Any html</b>'; $invoice = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() diff --git a/dev/tests/integration/testsuite/Magento/Sales/Block/Order/Shipment/ItemsTest.php b/dev/tests/integration/testsuite/Magento/Sales/Block/Order/Shipment/ItemsTest.php index 7bc682f4bee49a890d850a25cfed2317834f0116..f39f69c46b1ec7411ef011eb2a2896110af5e88c 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Block/Order/Shipment/ItemsTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Block/Order/Shipment/ItemsTest.php @@ -33,7 +33,7 @@ class ItemsTest extends \PHPUnit_Framework_TestCase { $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface'); $block = $layout->createBlock('Magento\Sales\Block\Order\Shipment\Items', 'block'); - $childBlock = $layout->addBlock('Magento\Core\Block\Text', 'shipment_comments', 'block'); + $childBlock = $layout->addBlock('Magento\View\Block\Text', 'shipment_comments', 'block'); $shipment = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() ->create('Magento\Sales\Model\Order\Shipment'); diff --git a/dev/tests/integration/testsuite/Magento/Sales/Block/Order/TotalsTest.php b/dev/tests/integration/testsuite/Magento/Sales/Block/Order/TotalsTest.php index 39ffb55e26970325e23922ff1c346c8a6ecf56e8..14b97f1a47edf0d7dd5a2e577d0be1cc33a71967 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Block/Order/TotalsTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Block/Order/TotalsTest.php @@ -41,18 +41,18 @@ class TotalsTest extends \PHPUnit_Framework_TestCase ->create('Magento\Sales\Model\Order')) ->setTemplate('order/totals.phtml'); - $context = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Block\Context'); - $childOne = $this->getMock('Magento\Core\Block\Text', array('initTotals'), array($context)); + $context = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\Block\Context'); + $childOne = $this->getMock('Magento\View\Block\Text', array('initTotals'), array($context)); $childOne->expects($this->once()) ->method('initTotals'); $layout->addBlock($childOne, 'child1', 'block'); - $childTwo = $this->getMock('Magento\Core\Block\Text', array('initTotals'), array($context)); + $childTwo = $this->getMock('Magento\View\Block\Text', array('initTotals'), array($context)); $childTwo->expects($this->once()) ->method('initTotals'); $layout->addBlock($childTwo, 'child2', 'block'); - $childThree = $this->getMock('Magento\Core\Block\Text', array('initTotals'), array($context)); + $childThree = $this->getMock('Magento\View\Block\Text', array('initTotals'), array($context)); $childThree->expects($this->once()) ->method('initTotals'); $layout->addBlock($childThree, 'child3', 'block'); diff --git a/dev/tests/integration/testsuite/Magento/Sales/Block/Recurring/Profile/ViewTest.php b/dev/tests/integration/testsuite/Magento/Sales/Block/Recurring/Profile/ViewTest.php index 25235c897c7896c2e96cc86c42e330b1852cc0d2..fd0e8bf159c59218713aa8696a7007858e4055b0 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Block/Recurring/Profile/ViewTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Block/Recurring/Profile/ViewTest.php @@ -72,9 +72,9 @@ class ViewTest extends \PHPUnit_Framework_TestCase \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\State') ->setAreaCode('frontend'); $this->_block->setShouldPrepareInfoTabs(true); - $childOne = $this->_layout->addBlock('Magento\Core\Block\Text', 'child1', 'block'); + $childOne = $this->_layout->addBlock('Magento\View\Block\Text', 'child1', 'block'); $this->_layout->addToParentGroup('child1', 'info_tabs'); - $childTwo = $this->_layout->addBlock('Magento\Core\Block\Text', 'child2', 'block'); + $childTwo = $this->_layout->addBlock('Magento\View\Block\Text', 'child2', 'block'); $this->_layout->addToParentGroup('child2', 'info_tabs'); $this->assertEmpty($childOne->getViewUrl()); diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Magento/Payment/MethodsTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Magento/Payment/MethodsTest.php index bccf187f865f0548ce661aaa5ecdd4a58634d679..ad6e00c2b1c28273bdad619d50d5a7109a942201 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Magento/Payment/MethodsTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Magento/Payment/MethodsTest.php @@ -57,7 +57,7 @@ class MethodsTest extends \PHPUnit_Framework_TestCase $this->assertNotEmpty($model->getTitle()); foreach (array($model->getFormBlockType(), $model->getInfoBlockType()) as $blockClass) { $message = "Block class: {$blockClass}"; - /** @var $block \Magento\Core\Block\Template */ + /** @var $block \Magento\View\Block\Template */ $block = $blockFactory->createBlock($blockClass); $block->setArea('frontend'); $this->assertFileExists($block->getTemplateFile(), $message); diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Magento/Widget/TemplateFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Magento/Widget/TemplateFilesTest.php index ad84621677f98d0d9c0eb9feae1b6dae07fafb01..f702e88e2b8b719efae56f02efa9750546930f72 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Magento/Widget/TemplateFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Magento/Widget/TemplateFilesTest.php @@ -46,9 +46,9 @@ class TemplateFilesTest extends \PHPUnit_Framework_TestCase /** @var $blockFactory \Magento\View\Element\BlockFactory */ $blockFactory = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() ->get('Magento\View\Element\BlockFactory'); - /** @var \Magento\Core\Block\Template $block */ + /** @var \Magento\View\Block\Template $block */ $block = $blockFactory->createBlock($class); - $this->assertInstanceOf('Magento\Core\Block\Template', $block); + $this->assertInstanceOf('Magento\View\Block\Template', $block); $block->setTemplate((string)$template); $this->assertFileExists($block->getTemplateFile()); } @@ -70,7 +70,7 @@ class TemplateFilesTest extends \PHPUnit_Framework_TestCase ->create('Magento\Widget\Model\Widget\Instance'); $config = $instance->setType($row['type'])->getWidgetConfigAsArray(); $class = $row['type']; - if (is_subclass_of($class, 'Magento\Core\Block\Template')) { + if (is_subclass_of($class, 'Magento\View\Block\Template')) { if (isset($config['parameters']) && isset($config['parameters']['template']) && isset($config['parameters']['template']['values'])) { $templates = $config['parameters']['template']['values']; diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/BlockInstantiationTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/BlockInstantiationTest.php index cd24b6615e8348a4813d81f329b3523ec9ca1d69..519e494ed5a6cf67f096ed7b93a842cdd7f87064 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/BlockInstantiationTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/BlockInstantiationTest.php @@ -83,7 +83,7 @@ class BlockInstantiationTest extends \Magento\TestFramework\TestCase\AbstractInt continue; } $class = new \ReflectionClass($blockClass); - if ($class->isAbstract() || !$class->isSubclassOf('Magento\Core\Block\Template')) { + if ($class->isAbstract() || !$class->isSubclassOf('Magento\View\Block\Template')) { continue; } $templateBlocks = $this->_addBlock($module, $blockClass, $class, $templateBlocks); diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/Magento/Core/EmailTemplateConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/Magento/Email/EmailTemplateConfigFilesTest.php similarity index 83% rename from dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/Magento/Core/EmailTemplateConfigFilesTest.php rename to dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/Magento/Email/EmailTemplateConfigFilesTest.php index 21ab4f6955bfefc941aa3187c49a278cc3d72a13..37e0e4e38595fccaa7989a853ed0ec2d5f5ef4cb 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/Magento/Core/EmailTemplateConfigFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/Magento/Email/EmailTemplateConfigFilesTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Test\Integrity\Modular\Magento\Core; +namespace Magento\Test\Integrity\Modular\Magento\Email; class EmailTemplateConfigFilesTest extends \PHPUnit_Framework_TestCase { @@ -33,7 +33,7 @@ class EmailTemplateConfigFilesTest extends \PHPUnit_Framework_TestCase */ public function testFileFormat($file) { - $schemaFile = BP . '/app/code/Magento/Core/etc/email_templates_file.xsd'; + $schemaFile = BP . '/app/code/Magento/Email/etc/email_templates_file.xsd'; $dom = new \Magento\Config\Dom(file_get_contents($file)); $result = $dom->validate($schemaFile, $errors); $this->assertTrue($result, print_r($errors, true)); @@ -55,9 +55,9 @@ class EmailTemplateConfigFilesTest extends \PHPUnit_Framework_TestCase */ public function testTemplateReference($templateId) { - /** @var \Magento\Core\Model\Email\Template\Config $emailConfig */ + /** @var \Magento\Email\Model\Template\Config $emailConfig */ $emailConfig = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() - ->create('Magento\Core\Model\Email\Template\Config'); + ->create('Magento\Email\Model\Template\Config'); $templateFilename = $emailConfig->getTemplateFilename($templateId); $this->assertFileExists($templateFilename, 'Email template file, specified in the configuration, must exist'); } @@ -68,9 +68,9 @@ class EmailTemplateConfigFilesTest extends \PHPUnit_Framework_TestCase public function templateReferenceDataProvider() { $data = array(); - /** @var \Magento\Core\Model\Email\Template\Config $emailConfig */ + /** @var \Magento\Email\Model\Template\Config $emailConfig */ $emailConfig = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() - ->create('Magento\Core\Model\Email\Template\Config'); + ->create('Magento\Email\Model\Template\Config'); foreach ($emailConfig->getAvailableTemplates() as $templateId) { $data[$templateId] = array($templateId); } @@ -84,9 +84,9 @@ class EmailTemplateConfigFilesTest extends \PHPUnit_Framework_TestCase { $validationState = $this->getMock('Magento\Config\ValidationStateInterface'); $validationState->expects($this->any())->method('isValidated')->will($this->returnValue(true)); - /** @var \Magento\Core\Model\Email\Template\Config\Reader $reader */ + /** @var \Magento\Email\Model\Template\Config\Reader $reader */ $reader = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() - ->create('Magento\Core\Model\Email\Template\Config\Reader', array('validationState' => $validationState)); + ->create('Magento\Email\Model\Template\Config\Reader', array('validationState' => $validationState)); try { $reader->read(); } catch (\Exception $e) { diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/TemplateFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/TemplateFilesTest.php index 239dc1ca608b3cfceff3adbbe29f872122a3f966..7a30001afcade759d95dce7833b8b50dd3d1c55f 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/TemplateFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/TemplateFilesTest.php @@ -79,7 +79,7 @@ class TemplateFilesTest extends \Magento\TestFramework\TestCase\AbstractIntegrit continue; } $class = new \ReflectionClass($blockClass); - if ($class->isAbstract() || !$class->isSubclassOf('Magento\Core\Block\Template')) { + if ($class->isAbstract() || !$class->isSubclassOf('Magento\View\Block\Template')) { continue; } diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/_files/skip_blocks_ce.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/_files/skip_blocks_ce.php index e054bba8adfdbd7087fccca8d17cd304372ddb6b..84895375c02b90d083c73f5d7d126b24f0288156 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/_files/skip_blocks_ce.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/_files/skip_blocks_ce.php @@ -27,8 +27,8 @@ */ return array( // Blocks with abstract constructor arguments - 'Magento\Backend\Block\System\Email\Template', - 'Magento\Backend\Block\System\Email\Template\Edit', + 'Magento\Email\Block\Adminhtml\Template', + 'Magento\Email\Block\Adminhtml\Template\Edit', 'Magento\Backend\Block\System\Config\Edit', 'Magento\Backend\Block\System\Config\Form', 'Magento\Backend\Block\System\Config\Tabs', diff --git a/dev/tests/integration/testsuite/Magento/Test/Tools/Layout/Reference/_files/layoutInvalid.xml b/dev/tests/integration/testsuite/Magento/Test/Tools/Layout/Reference/_files/layoutInvalid.xml index d96e82bac2d7e266aacd0a6da016288ae052b2fa..83fadec45fb99155d7d018d5a98590be8f92e52e 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Tools/Layout/Reference/_files/layoutInvalid.xml +++ b/dev/tests/integration/testsuite/Magento/Test/Tools/Layout/Reference/_files/layoutInvalid.xml @@ -25,13 +25,13 @@ --> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <handle id="test"> - <block class="Magento\Core\Block\Template" name="block"/> + <block class="Magento\View\Block\Template" name="block"/> <container name="block" label="Container"/> <reference name="block"> - <block class="Magento\Core\Block\Template" name="another.block"/> + <block class="Magento\View\Block\Template" name="another.block"/> </reference> <reference name="broken.reference"> - <block class="Magento\Core\Block\Template" name="another.block"/> + <block class="Magento\View\Block\Template" name="another.block"/> </reference> </handle> </layout> diff --git a/dev/tests/integration/testsuite/Magento/Test/Tools/Layout/Reference/_files/layoutValid.xml b/dev/tests/integration/testsuite/Magento/Test/Tools/Layout/Reference/_files/layoutValid.xml index ae8fd79e9161aabcd5ce7519e73d707feb83ee8a..cfa01aa6376dd6830b6ea194070a7d4f22ed24f8 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Tools/Layout/Reference/_files/layoutValid.xml +++ b/dev/tests/integration/testsuite/Magento/Test/Tools/Layout/Reference/_files/layoutValid.xml @@ -25,10 +25,10 @@ --> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <handle id="test"> - <block class="Magento\Core\Block\Template" name="block"/> + <block class="Magento\View\Block\Template" name="block"/> <container name="container" label="Container"/> <reference name="block"> - <block class="Magento\Core\Block\Template" name="another.block"/> + <block class="Magento\View\Block\Template" name="another.block"/> </reference> <reference name="container"> <container name="another.container" label="Container"/> diff --git a/dev/tests/integration/testsuite/Magento/Test/Tools/Layout/Reference/_files/layoutValidExpectUpdated.xml b/dev/tests/integration/testsuite/Magento/Test/Tools/Layout/Reference/_files/layoutValidExpectUpdated.xml index aee8beb9174a2a98e1635d1902fedee1186d4c39..1978a9750dcaed8c62ccc1d77e1f801ccddf0adb 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Tools/Layout/Reference/_files/layoutValidExpectUpdated.xml +++ b/dev/tests/integration/testsuite/Magento/Test/Tools/Layout/Reference/_files/layoutValidExpectUpdated.xml @@ -25,10 +25,10 @@ --> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <handle id="test"> - <block class="Magento\Core\Block\Template" name="block"/> + <block class="Magento\View\Block\Template" name="block"/> <container name="container" label="Container"/> <referenceBlock name="block"> - <block class="Magento\Core\Block\Template" name="another.block"/> + <block class="Magento\View\Block\Template" name="another.block"/> </referenceBlock> <referenceContainer name="container"> <container name="another.container" label="Container"/> diff --git a/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/AuthTest.php b/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/AuthTest.php index 1a2ee090279367ff84e4135367b0dc0bec2bd37e..e90ac067a87bdaf1df3b1e1057a42138617c9fe5 100644 --- a/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/AuthTest.php +++ b/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/AuthTest.php @@ -100,7 +100,7 @@ class AuthTest extends \Magento\Backend\Utility\Controller $this->getRequest()->setQuery('token', 'dummy')->setQuery('id', 1); $this->dispatch('backend/admin/auth/resetpassword'); $this->assertSessionMessages( - $this->equalTo(array('Your password reset link has expired.')), \Magento\Core\Model\Message::ERROR + $this->equalTo(array('Your password reset link has expired.')), \Magento\Message\Factory::ERROR ); $this->assertRedirect(); } @@ -159,7 +159,7 @@ class AuthTest extends \Magento\Backend\Utility\Controller $this->getRequest()->setQuery('token', 'dummy')->setQuery('id', 1); $this->dispatch('backend/admin/auth/resetpasswordpost'); $this->assertSessionMessages( - $this->equalTo(array('Your password reset link has expired.')), \Magento\Core\Model\Message::ERROR + $this->equalTo(array('Your password reset link has expired.')), \Magento\Message\Factory::ERROR ); $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); @@ -203,7 +203,7 @@ class AuthTest extends \Magento\Backend\Utility\Controller $this->assertSessionMessages( $this->equalTo(array('Your password confirmation must match your password.')), - \Magento\Core\Model\Message::ERROR + \Magento\Message\Factory::ERROR ); $this->assertRedirect(); } diff --git a/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/UserTest.php b/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/UserTest.php index 1ddbdd08b8b62e8b48cad651b77c415f2b04fa23..45316f34035ccc02aa1766c98ea18d5d9349f6f8 100644 --- a/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/UserTest.php +++ b/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/UserTest.php @@ -60,7 +60,7 @@ class UserTest extends \Magento\Backend\Utility\Controller $this->getRequest()->setPost('user_id', $userId); $this->dispatch('backend/admin/user/save'); $this->assertSessionMessages( - $this->equalTo(array('This user no longer exists.')), \Magento\Core\Model\Message::ERROR + $this->equalTo(array('This user no longer exists.')), \Magento\Message\Factory::ERROR ); $this->assertRedirect($this->stringContains('backend/admin/user/index/')); } @@ -72,7 +72,7 @@ class UserTest extends \Magento\Backend\Utility\Controller { $this->_createNew(); $this->assertSessionMessages( - $this->equalTo(array('You saved the user.')), \Magento\Core\Model\Message::SUCCESS + $this->equalTo(array('You saved the user.')), \Magento\Message\Factory::SUCCESS ); $this->assertRedirect($this->stringContains('backend/admin/user/index/')); } diff --git a/dev/tests/integration/testsuite/Magento/User/Model/UserTest.php b/dev/tests/integration/testsuite/Magento/User/Model/UserTest.php index dd5778a2705751a2a4ba00f7a47da07da0fff08b..62868e97866c79d75dd30b536d00c14c2314ed4d 100644 --- a/dev/tests/integration/testsuite/Magento/User/Model/UserTest.php +++ b/dev/tests/integration/testsuite/Magento/User/Model/UserTest.php @@ -176,8 +176,8 @@ class UserTest extends \PHPUnit_Framework_TestCase /** @var $storeConfig \Magento\Core\Model\Store\Config */ $storeConfig = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() ->get('Magento\Core\Model\Store\Config'); - $mailer = $this->getMock('Magento\Core\Model\Email\Template\Mailer', array(), array( - $this->getMock('Magento\Core\Model\Email\TemplateFactory', array(), array(), '', false) + $mailer = $this->getMock('Magento\Email\Model\Template\Mailer', array(), array( + $this->getMock('Magento\Email\Model\TemplateFactory', array(), array(), '', false) )); $mailer->expects($this->once()) ->method('setTemplateId') diff --git a/dev/tests/integration/testsuite/Magento/Core/Block/AbstractBlockTest.php b/dev/tests/integration/testsuite/Magento/View/Block/AbstractBlockTest.php similarity index 91% rename from dev/tests/integration/testsuite/Magento/Core/Block/AbstractBlockTest.php rename to dev/tests/integration/testsuite/Magento/View/Block/AbstractBlockTest.php index 9a95efda719b768caf3d748d02719a9d570edb18..efdbf9b14acf62d41f0dc5e9890918878fb51099 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Block/AbstractBlockTest.php +++ b/dev/tests/integration/testsuite/Magento/View/Block/AbstractBlockTest.php @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Core\Block; +namespace Magento\View\Block; /** * @magentoAppIsolation enabled @@ -33,7 +33,7 @@ namespace Magento\Core\Block; class AbstractBlockTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Core\Block\AbstractBlock + * @var \Magento\View\Block\AbstractBlock */ protected $_block; @@ -49,8 +49,8 @@ class AbstractBlockTest extends \PHPUnit_Framework_TestCase \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\State')->setAreaCode('frontend'); \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\DesignInterface') ->setDefaultDesignTheme(); - $this->_block = $this->getMockForAbstractClass('Magento\Core\Block\AbstractBlock', array( - \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Block\Context'), + $this->_block = $this->getMockForAbstractClass('Magento\View\Block\AbstractBlock', array( + \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\Block\Context'), array('module_name' => 'Magento_Core') )); } @@ -92,7 +92,7 @@ class AbstractBlockTest extends \PHPUnit_Framework_TestCase $this->assertFalse($this->_block->getParentBlock()); // Need to create blocks through layout - $parentBlock = $this->_createBlockWithLayout('block1', 'block1', 'Magento\Core\Block\Text'); + $parentBlock = $this->_createBlockWithLayout('block1', 'block1', 'Magento\View\Block\Text'); $childBlock = $this->_createBlockWithLayout('block2', 'block2'); $this->assertEmpty($childBlock->getParentBlock()); @@ -101,13 +101,13 @@ class AbstractBlockTest extends \PHPUnit_Framework_TestCase } /** - * @covers \Magento\Core\Block\AbstractBlock::addChild + * @covers \Magento\View\Block\AbstractBlock::addChild */ public function testAddChild() { - $parentBlock = $this->_createBlockWithLayout('testAddChild', 'testAddChild', 'Magento\Core\Block\Text'); - $child = $parentBlock->addChild('testAddChildAlias', 'Magento\Core\Block\Text', array('content' => 'content')); - $this->assertInstanceOf('Magento\Core\Block\Text', $child); + $parentBlock = $this->_createBlockWithLayout('testAddChild', 'testAddChild', 'Magento\View\Block\Text'); + $child = $parentBlock->addChild('testAddChildAlias', 'Magento\View\Block\Text', array('content' => 'content')); + $this->assertInstanceOf('Magento\View\Block\Text', $child); $this->assertEquals('testAddChild.testAddChildAlias', $child->getNameInLayout()); $this->assertEquals($child, $parentBlock->getChildBlock('testAddChildAlias')); $this->assertEquals('content', $child->getContent()); @@ -123,11 +123,11 @@ class AbstractBlockTest extends \PHPUnit_Framework_TestCase // Setting second time, along with the layout $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface'); - $layout->createBlock('Magento\Core\Block\Template', $name); + $layout->createBlock('Magento\View\Block\Template', $name); $block = $layout->getBlock($name); - $this->assertInstanceOf('Magento\Core\Block\AbstractBlock', $block); + $this->assertInstanceOf('Magento\View\Block\AbstractBlock', $block); $block->setNameInLayout($name); - $this->assertInstanceOf('Magento\Core\Block\AbstractBlock', $layout->getBlock($name)); + $this->assertInstanceOf('Magento\View\Block\AbstractBlock', $layout->getBlock($name)); $this->assertEquals($name, $block->getNameInLayout()); $this->assertTrue($layout->hasElement($name)); $newName = 'new_name'; @@ -138,8 +138,8 @@ class AbstractBlockTest extends \PHPUnit_Framework_TestCase /** * @magentoAppIsolation enabled - * @covers \Magento\Core\Block\AbstractBlock::getChildNames - * @covers \Magento\Core\Block\AbstractBlock::insert + * @covers \Magento\View\Block\AbstractBlock::getChildNames + * @covers \Magento\View\Block\AbstractBlock::insert */ public function testGetChildNames() { @@ -220,8 +220,8 @@ class AbstractBlockTest extends \PHPUnit_Framework_TestCase /** * @magentoAppIsolation enabled - * @covers \Magento\Core\Block\AbstractBlock::unsetChildren - * @covers \Magento\Core\Block\AbstractBlock::getChildBlock + * @covers \Magento\View\Block\AbstractBlock::unsetChildren + * @covers \Magento\View\Block\AbstractBlock::getChildBlock */ public function testUnsetChildren() { @@ -252,21 +252,21 @@ class AbstractBlockTest extends \PHPUnit_Framework_TestCase // With layout /** @var $layout \Magento\Core\Model\Layout */ $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface'); - $child = $layout->createBlock('Magento\Core\Block\Text', $childName); + $child = $layout->createBlock('Magento\View\Block\Text', $childName); $layout->addBlock($this->_block, $parentName); $this->_block->setChild($childAlias, $child); $result = $this->_block->getChildBlock($childAlias); - $this->assertInstanceOf('Magento\Core\Block\Text', $result); + $this->assertInstanceOf('Magento\View\Block\Text', $result); $this->assertEquals($childName, $result->getNameInLayout()); $this->assertEquals($child, $result); } /** * @magentoAppIsolation enabled - * @covers \Magento\Core\Block\AbstractBlock::getChildHtml - * @covers \Magento\Core\Block\AbstractBlock::getChildChildHtml + * @covers \Magento\View\Block\AbstractBlock::getChildHtml + * @covers \Magento\View\Block\AbstractBlock::getChildChildHtml */ public function testGetChildHtml() { @@ -276,8 +276,8 @@ class AbstractBlockTest extends \PHPUnit_Framework_TestCase // With layout $parent = $this->_createBlockWithLayout('parent', 'parent'); - $blockOne = $this->_createBlockWithLayout('block1', 'block1', 'Magento\Core\Block\Text'); - $blockTwo = $this->_createBlockWithLayout('block2', 'block2', 'Magento\Core\Block\Text'); + $blockOne = $this->_createBlockWithLayout('block1', 'block1', 'Magento\View\Block\Text'); + $blockTwo = $this->_createBlockWithLayout('block2', 'block2', 'Magento\View\Block\Text'); $blockOne->setText('one'); $blockTwo->setText('two'); $parent->insert($blockTwo, '-', false, 'block2'); // make block2 1st @@ -308,10 +308,10 @@ class AbstractBlockTest extends \PHPUnit_Framework_TestCase $parent1 = $this->_createBlockWithLayout('parent1', 'parent1'); $parent2 = $this->_createBlockWithLayout('parent2', 'parent2'); - $block1 = $this->_createBlockWithLayout('block1', 'block1', 'Magento\Core\Block\Text'); - $block2 = $this->_createBlockWithLayout('block2', 'block2', 'Magento\Core\Block\Text'); - $block3 = $this->_createBlockWithLayout('block3', 'block3', 'Magento\Core\Block\Text'); - $block4 = $this->_createBlockWithLayout('block4', 'block4', 'Magento\Core\Block\Text'); + $block1 = $this->_createBlockWithLayout('block1', 'block1', 'Magento\View\Block\Text'); + $block2 = $this->_createBlockWithLayout('block2', 'block2', 'Magento\View\Block\Text'); + $block3 = $this->_createBlockWithLayout('block3', 'block3', 'Magento\View\Block\Text'); + $block4 = $this->_createBlockWithLayout('block4', 'block4', 'Magento\View\Block\Text'); $block1->setText('one'); $block2->setText('two'); @@ -332,7 +332,7 @@ class AbstractBlockTest extends \PHPUnit_Framework_TestCase /** @var $blockFactory \Magento\View\Element\BlockFactory */ $blockFactory = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() ->get('Magento\View\Element\BlockFactory'); - $block1 = $blockFactory->createBlock('Magento\Core\Block\Text'); + $block1 = $blockFactory->createBlock('Magento\View\Block\Text'); $block1->setText('Block text'); $block1->setNameInLayout('block'); $html = $this->_block->getBlockHtml('block'); @@ -341,7 +341,7 @@ class AbstractBlockTest extends \PHPUnit_Framework_TestCase // With layout $expected = 'Block2'; - $block2 = $this->_createBlockWithLayout('block2', 'block2', 'Magento\Core\Block\Text'); + $block2 = $this->_createBlockWithLayout('block2', 'block2', 'Magento\View\Block\Text'); $block3 = $this->_createBlockWithLayout('block3', 'block3'); $block2->setText($expected); $html = $block3->getBlockHtml('block2'); @@ -437,8 +437,8 @@ class AbstractBlockTest extends \PHPUnit_Framework_TestCase /** * @magentoAppIsolation enabled - * @covers \Magento\Core\Block\AbstractBlock::addToParentGroup - * @covers \Magento\Core\Block\AbstractBlock::getGroupChildNames + * @covers \Magento\View\Block\AbstractBlock::getGroupChildNames + * @covers \Magento\Core\Model\Layout::addToParentGroup */ public function testAddToParentGroup() { @@ -477,7 +477,7 @@ class AbstractBlockTest extends \PHPUnit_Framework_TestCase public function testSetFrameTags() { $block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface') - ->createBlock('Magento\Core\Block\Text'); + ->createBlock('Magento\View\Block\Text'); $block->setText('text'); $block->setFrameTags('p'); @@ -499,8 +499,8 @@ class AbstractBlockTest extends \PHPUnit_Framework_TestCase } /** - * @covers \Magento\Core\Block\AbstractBlock::getUrlBase64 - * @covers \Magento\Core\Block\AbstractBlock::getUrlEncoded + * @covers \Magento\View\Block\AbstractBlock::getUrlBase64 + * @covers \Magento\View\Block\AbstractBlock::getUrlEncoded */ public function testGetUrlBase64() { @@ -545,11 +545,11 @@ class AbstractBlockTest extends \PHPUnit_Framework_TestCase $this->_block->setLayout( \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface') ); - $this->assertInstanceOf('Magento\Core\Block\Messages', $this->_block->getMessagesBlock()); + $this->assertInstanceOf('Magento\View\Block\Messages', $this->_block->getMessagesBlock()); // Set explicitly $messages = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface') - ->createBlock('Magento\Core\Block\Messages'); + ->createBlock('Magento\View\Block\Messages'); $this->_block->setMessagesBlock($messages); $this->assertSame($messages, $this->_block->getMessagesBlock()); } @@ -641,7 +641,7 @@ class AbstractBlockTest extends \PHPUnit_Framework_TestCase { $name = uniqid('block.'); $block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface') - ->createBlock('Magento\Core\Block\Text'); + ->createBlock('Magento\View\Block\Text'); $block->setNameInLayout($name); $this->assertEquals(array($name), $block->getCacheKeyInfo()); } @@ -650,7 +650,7 @@ class AbstractBlockTest extends \PHPUnit_Framework_TestCase { $name = uniqid('block.'); $block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface') - ->createBlock('Magento\Core\Block\Text'); + ->createBlock('Magento\View\Block\Text'); $block->setNameInLayout($name); $key = $block->getCacheKey(); $this->assertNotEmpty($key); @@ -663,11 +663,11 @@ class AbstractBlockTest extends \PHPUnit_Framework_TestCase public function testGetCacheTags() { - $this->assertContains(\Magento\Core\Block\AbstractBlock::CACHE_GROUP, $this->_block->getCacheTags()); + $this->assertContains(\Magento\View\Block\AbstractBlock::CACHE_GROUP, $this->_block->getCacheTags()); $this->_block->setCacheTags(array('one', 'two')); $tags = $this->_block->getCacheTags(); - $this->assertContains(\Magento\Core\Block\AbstractBlock::CACHE_GROUP, $tags); + $this->assertContains(\Magento\View\Block\AbstractBlock::CACHE_GROUP, $tags); $this->assertContains('one', $tags); $this->assertContains('two', $tags); } @@ -687,7 +687,7 @@ class AbstractBlockTest extends \PHPUnit_Framework_TestCase * @param string $className * @return array */ - protected function _createSampleBlocks($qty, $withLayout = true, $className = 'Magento\Core\Block\Template') + protected function _createSampleBlocks($qty, $withLayout = true, $className = 'Magento\View\Block\Template') { $blocks = array(); $names = array(); $layout = false; @@ -715,16 +715,16 @@ class AbstractBlockTest extends \PHPUnit_Framework_TestCase * @param string $name * @param null|string $alias * @param null|string $type - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ protected function _createBlockWithLayout($name = 'block', $alias = null, - $type = 'Magento\Core\Block\AbstractBlock' + $type = 'Magento\View\Block\AbstractBlock' ) { $typePart = explode('\\', $type); $mockClass = array_pop($typePart) . 'Mock'; if (!isset(self::$_mocks[$mockClass])) { self::$_mocks[$mockClass] = $this->getMockForAbstractClass($type, array( - \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Block\Context'), + \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\Block\Context'), array('module_name' => 'Magento_Core') ), $mockClass diff --git a/dev/tests/integration/testsuite/Magento/Core/Block/TemplateTest.php b/dev/tests/integration/testsuite/Magento/View/Block/TemplateTest.php similarity index 90% rename from dev/tests/integration/testsuite/Magento/Core/Block/TemplateTest.php rename to dev/tests/integration/testsuite/Magento/View/Block/TemplateTest.php index 4681b04644e8877a9696d3ac5cadcf4fb2235c52..3d444fa170da08adf657cb6779555a750539bcea 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Block/TemplateTest.php +++ b/dev/tests/integration/testsuite/Magento/View/Block/TemplateTest.php @@ -25,12 +25,12 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Core\Block; +namespace Magento\View\Block; class TemplateTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Core\Block\Template + * @var \Magento\View\Block\Template */ protected $_block; @@ -38,15 +38,15 @@ class TemplateTest extends \PHPUnit_Framework_TestCase { $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $params = array('layout' => $objectManager->create('Magento\Core\Model\Layout', array())); - $context = $objectManager->create('Magento\Core\Block\Template\Context', $params); + $context = $objectManager->create('Magento\View\Block\Template\Context', $params); $this->_block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface') - ->createBlock('Magento\Core\Block\Template', '', array('context' => $context)); + ->createBlock('Magento\View\Block\Template', '', array('context' => $context)); } public function testConstruct() { $block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface') - ->createBlock('Magento\Core\Block\Template', '', array('data' => array('template' => 'value'))); + ->createBlock('Magento\View\Block\Template', '', array('data' => array('template' => 'value'))); $this->assertEquals('value', $block->getTemplate()); } @@ -69,8 +69,7 @@ class TemplateTest extends \PHPUnit_Framework_TestCase } /** - * @covers \Magento\Core\Block\Template::_toHtml - * @covers \Magento\Core\Block\AbstractBlock::toHtml + * @covers \Magento\View\Block\AbstractBlock::toHtml * @see testAssign() */ public function testToHtml() diff --git a/dev/tests/integration/testsuite/Magento/Core/Block/Text/ListTest.php b/dev/tests/integration/testsuite/Magento/View/Block/Text/ListTest.php similarity index 77% rename from dev/tests/integration/testsuite/Magento/Core/Block/Text/ListTest.php rename to dev/tests/integration/testsuite/Magento/View/Block/Text/ListTest.php index 31f29ae29801e138f4164d6758f3887d8f28be11..f43f1b978f16f6ef48ffffb1773c535d72eec9e3 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Block/Text/ListTest.php +++ b/dev/tests/integration/testsuite/Magento/View/Block/Text/ListTest.php @@ -18,14 +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_Core * @subpackage integration_tests * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Core\Block\Text; +namespace Magento\View\Block\Text; class ListTest extends \PHPUnit_Framework_TestCase { @@ -35,7 +33,7 @@ class ListTest extends \PHPUnit_Framework_TestCase protected $_layout; /** - * @var \Magento\Core\Block\Text\ListText + * @var \Magento\View\Block\Text\ListText */ protected $_block; @@ -43,15 +41,15 @@ class ListTest extends \PHPUnit_Framework_TestCase { $this->_layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() ->get('Magento\View\LayoutInterface'); - $this->_block = $this->_layout->createBlock('Magento\Core\Block\Text\ListText'); + $this->_block = $this->_layout->createBlock('Magento\View\Block\Text\ListText'); } public function testToHtml() { $children = array( - array('block1', 'Magento\Core\Block\Text', 'text1'), - array('block2', 'Magento\Core\Block\Text', 'text2'), - array('block3', 'Magento\Core\Block\Text', 'text3'), + array('block1', 'Magento\View\Block\Text', 'text1'), + array('block2', 'Magento\View\Block\Text', 'text2'), + array('block3', 'Magento\View\Block\Text', 'text3'), ); foreach ($children as $child) { $this->_layout->addBlock($child[1], $child[0], $this->_block->getNameInLayout()) @@ -64,10 +62,10 @@ class ListTest extends \PHPUnit_Framework_TestCase public function testToHtmlWithContainer() { $listName = $this->_block->getNameInLayout(); - $block1 = $this->_layout->addBlock('Magento\Core\Block\Text', '', $listName); + $block1 = $this->_layout->addBlock('Magento\View\Block\Text', '', $listName); $this->_layout->addContainer('container', 'Container', array(), $listName); - $block2 = $this->_layout->addBlock('Magento\Core\Block\Text', '', 'container'); - $block3 = $this->_layout->addBlock('Magento\Core\Block\Text', '', $listName); + $block2 = $this->_layout->addBlock('Magento\View\Block\Text', '', 'container'); + $block3 = $this->_layout->addBlock('Magento\View\Block\Text', '', $listName); $block1->setText('text1'); $block2->setText('text2'); $block3->setText('text3'); diff --git a/dev/tests/integration/testsuite/Magento/Core/Block/TextTest.php b/dev/tests/integration/testsuite/Magento/View/Block/TextTest.php similarity index 91% rename from dev/tests/integration/testsuite/Magento/Core/Block/TextTest.php rename to dev/tests/integration/testsuite/Magento/View/Block/TextTest.php index c427fd8346f762b7826fa2bd0e5fbabca4e6e1d2..1d2bd9649d9adca2454db29e717b4ffcf246b3bd 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Block/TextTest.php +++ b/dev/tests/integration/testsuite/Magento/View/Block/TextTest.php @@ -18,26 +18,24 @@ * 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_Core * @subpackage integration_tests * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Core\Block; +namespace Magento\View\Block; class TextTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Core\Block\Text + * @var \Magento\View\Block\Text */ protected $_block; protected function setUp() { $this->_block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface') - ->createBlock('Magento\Core\Block\Text'); + ->createBlock('Magento\View\Block\Text'); } public function testSetGetText() diff --git a/dev/tests/integration/testsuite/Magento/Core/Block/_files/frontend/magento_demo/css/wrong.css b/dev/tests/integration/testsuite/Magento/View/Block/_files/frontend/magento_demo/css/wrong.css similarity index 100% rename from dev/tests/integration/testsuite/Magento/Core/Block/_files/frontend/magento_demo/css/wrong.css rename to dev/tests/integration/testsuite/Magento/View/Block/_files/frontend/magento_demo/css/wrong.css diff --git a/dev/tests/integration/testsuite/Magento/View/Layout/_files/_layout_update.xml b/dev/tests/integration/testsuite/Magento/View/Layout/_files/_layout_update.xml index feacd5b8ce8ddd13095f749774e11f422444bda2..79ef0cc3b40e0ea9b6b4dfc01e898ea2711c89ba 100644 --- a/dev/tests/integration/testsuite/Magento/View/Layout/_files/_layout_update.xml +++ b/dev/tests/integration/testsuite/Magento/View/Layout/_files/_layout_update.xml @@ -47,12 +47,12 @@ <argument name="file" xsi:type="string">prototype/deprecation.js</argument> </arguments> </block> - <block class="Magento\Core\Block\Html\Calendar" name="head.calendar" as="calendar" template="page/js/calendar.phtml"/> + <block class="Magento\View\Block\Html\Calendar" name="head.calendar" as="calendar" template="page/js/calendar.phtml"/> </block> <block class="Magento\Adminhtml\Block\Page\Header" name="header" as="header"/> <block class="Magento\Backend\Block\Menu" name="menu" as="menu"/> - <block class="Magento\Core\Block\Messages" name="messages" as="messages"/> - <block class="Magento\Core\Block\Text" as="no_name"/> + <block class="Magento\View\Block\Messages" name="messages" as="messages"/> + <block class="Magento\View\Block\Text" as="no_name"/> </block> <update handle="layout_test_handle_sample"/> <remove name="header"/> @@ -65,7 +65,7 @@ </action> </referenceBlock> <referenceBlock name="some_element_1"/> - <block class="Magento\Core\Block\Text\ListText" name="test.nonexisting.block"/> + <block class="Magento\View\Block\Text\ListText" name="test.nonexisting.block"/> <remove name="test.nonexisting.block"/> <referenceBlock name="test.nonexisting.block"> <action method="getSomething"/> diff --git a/dev/tests/integration/testsuite/Magento/Webapi/Block/Adminhtml/User/Edit/TabsTest.php b/dev/tests/integration/testsuite/Magento/Webapi/Block/Adminhtml/User/Edit/TabsTest.php index e88f01267e49144a5ce1794ee54f9caacb783435..cab9d183e983aee58a4563ae23a045911f5062dd 100644 --- a/dev/tests/integration/testsuite/Magento/Webapi/Block/Adminhtml/User/Edit/TabsTest.php +++ b/dev/tests/integration/testsuite/Magento/Webapi/Block/Adminhtml/User/Edit/TabsTest.php @@ -70,13 +70,13 @@ class TabsTest extends \PHPUnit_Framework_TestCase // TODO: Move to unit tests after MAGETWO-4015 complete. /** @var \Magento\Webapi\Block\Adminhtml\User\Edit\Tab\Main $mainTabBlock */ $mainTabBlock = $this->_layout->addBlock( - 'Magento\Core\Block\Text', + 'Magento\View\Block\Text', 'webapi.user.edit.tab.main', 'webapi.user.edit.tabs' )->setText('Main Block Content'); $this->_layout->addBlock( - 'Magento\Core\Block\Text', + 'Magento\View\Block\Text', 'webapi.user.edit.tab.roles.grid', 'webapi.user.edit.tabs' )->setText('Grid Block Content'); diff --git a/dev/tests/integration/testsuite/Magento/Webhook/Block/Adminhtml/Registration/ActivateTest.php b/dev/tests/integration/testsuite/Magento/Webhook/Block/Adminhtml/Registration/ActivateTest.php index 997f03dc03a33bfdba4448b7daa3fc6dc20c2b65..d45a17cea2f36f150f38e05373286085ec941f22 100644 --- a/dev/tests/integration/testsuite/Magento/Webhook/Block/Adminhtml/Registration/ActivateTest.php +++ b/dev/tests/integration/testsuite/Magento/Webhook/Block/Adminhtml/Registration/ActivateTest.php @@ -54,9 +54,9 @@ class ActivateTest extends \PHPUnit_Framework_TestCase $registry->register(\Magento\Webhook\Block\Adminhtml\Registration\Activate::REGISTRY_KEY_CURRENT_SUBSCRIPTION, $subscriptionData); - /** @var \Magento\Core\Block\Template\Context $context */ + /** @var \Magento\View\Block\Template\Context $context */ $context = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() - ->create('Magento\Core\Block\Template\Context'); + ->create('Magento\View\Block\Template\Context'); /** @var \Magento\Webhook\Block\Adminhtml\Registration\Activate $block */ $block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() diff --git a/dev/tests/integration/testsuite/Magento/Webhook/Block/Adminhtml/Registration/Create/Form/ContainerTest.php b/dev/tests/integration/testsuite/Magento/Webhook/Block/Adminhtml/Registration/Create/Form/ContainerTest.php index e389d67d462b650c96f68f34ef4a9e227f05939b..abcecd94e39f696a2dca7189e1e681f4f4b7c4d8 100644 --- a/dev/tests/integration/testsuite/Magento/Webhook/Block/Adminhtml/Registration/Create/Form/ContainerTest.php +++ b/dev/tests/integration/testsuite/Magento/Webhook/Block/Adminhtml/Registration/Create/Form/ContainerTest.php @@ -52,8 +52,8 @@ class ContainerTest extends \PHPUnit_Framework_TestCase $registry->register(\Magento\Webhook\Block\Adminhtml\Registration\Activate::REGISTRY_KEY_CURRENT_SUBSCRIPTION, $subscriptionData); - /** @var \Magento\Core\Block\Template\Context $context */ - $context = $objectManager->create('Magento\Core\Block\Template\Context'); + /** @var \Magento\View\Block\Template\Context $context */ + $context = $objectManager->create('Magento\View\Block\Template\Context'); /** @var \Magento\Webhook\Block\Adminhtml\Registration\Activate $block */ $block = $objectManager diff --git a/dev/tests/integration/testsuite/Magento/Webhook/Block/Adminhtml/Registration/FailedTest.php b/dev/tests/integration/testsuite/Magento/Webhook/Block/Adminhtml/Registration/FailedTest.php index 53c61ca023ce3934ba3226c2b72187bd1cdd712e..71934daa19662a0849c582d441584659a20d6e52 100644 --- a/dev/tests/integration/testsuite/Magento/Webhook/Block/Adminhtml/Registration/FailedTest.php +++ b/dev/tests/integration/testsuite/Magento/Webhook/Block/Adminhtml/Registration/FailedTest.php @@ -39,14 +39,17 @@ class FailedTest extends \PHPUnit_Framework_TestCase /** @var \Magento\Backend\Model\Session $session */ $session = $objectManager->create('Magento\Backend\Model\Session'); - $context = $objectManager->create('Magento\Core\Block\Template\Context'); - $messageCollection = $objectManager->create('Magento\Core\Model\Message\Collection'); - $message = $objectManager->create('Magento\Core\Model\Message\Notice', array('code' => '')); + $context = $objectManager->create( + 'Magento\Backend\Block\Template\Context', + array('backendSession' => $session) + ); + $messageCollection = $objectManager->create('Magento\Message\Collection'); + $message = $objectManager->create('Magento\Message\Notice', array('code' => '')); $messageCollection->addMessage($message); $session->setData('messages', $messageCollection); $block = $objectManager->create('Magento\Webhook\Block\Adminhtml\Registration\Failed', - array($session, $context)); + array('context' => $context)); $this->assertEquals($message->toString(), $block->getSessionError()); } diff --git a/dev/tests/integration/testsuite/Magento/Webhook/Controller/Adminhtml/Webhook/RegistrationTest.php b/dev/tests/integration/testsuite/Magento/Webhook/Controller/Adminhtml/Webhook/RegistrationTest.php index 9deeab5d633e571f9cad7989cfda2428a0da171e..3061da492babe999568db55b140361985d2da97b 100644 --- a/dev/tests/integration/testsuite/Magento/Webhook/Controller/Adminhtml/Webhook/RegistrationTest.php +++ b/dev/tests/integration/testsuite/Magento/Webhook/Controller/Adminhtml/Webhook/RegistrationTest.php @@ -97,7 +97,7 @@ class RegistrationTest extends \Magento\Backend\Utility\Controller $this->dispatch('backend/admin/webhook_registration/register'); $this->assertSessionMessages( $this->equalTo(array("API Key, API Secret and Contact Email are required fields.")), - \Magento\Core\Model\Message::ERROR + \Magento\Message\Factory::ERROR ); $this->assertRedirect($this->stringContains('webhook_registration/failed')); } @@ -151,7 +151,7 @@ class RegistrationTest extends \Magento\Backend\Utility\Controller $this->dispatch('backend/admin/webhook_registration/register'); $this->assertSessionMessages( $this->equalTo(array("The subscription 'dummy' has been activated.")), - \Magento\Core\Model\Message::SUCCESS + \Magento\Message\Factory::SUCCESS ); $this->assertRedirect($this->stringContains('webhook_registration/succeeded')); } @@ -197,7 +197,7 @@ class RegistrationTest extends \Magento\Backend\Utility\Controller $this->getRequest()->setParam('id', $subscriptionId); $this->dispatch('backend/admin/webhook_registration/register'); $this->assertSessionMessages( - $this->equalTo(array("Invalid Email address provided")), \Magento\Core\Model\Message::ERROR + $this->equalTo(array("Invalid Email address provided")), \Magento\Message\Factory::ERROR ); } @@ -209,7 +209,7 @@ class RegistrationTest extends \Magento\Backend\Utility\Controller $this->assertContains('page-popup adminhtml-webhook-registration-succeeded', $response); $this->assertSessionMessages( $this->equalTo(array("The subscription 'dummy' has been activated.")), - \Magento\Core\Model\Message::SUCCESS + \Magento\Message\Factory::SUCCESS ); } diff --git a/dev/tests/integration/testsuite/Magento/Webhook/Controller/Adminhtml/Webhook/SubscriptionTest.php b/dev/tests/integration/testsuite/Magento/Webhook/Controller/Adminhtml/Webhook/SubscriptionTest.php index 87e0011236c5d1b50425981129df45a66f2ca047..6ba744711cec6a86a132aa28e9b14b1494abccb7 100644 --- a/dev/tests/integration/testsuite/Magento/Webhook/Controller/Adminhtml/Webhook/SubscriptionTest.php +++ b/dev/tests/integration/testsuite/Magento/Webhook/Controller/Adminhtml/Webhook/SubscriptionTest.php @@ -84,7 +84,7 @@ class SubscriptionTest extends \Magento\Backend\Utility\Controller $this->assertSessionMessages( $this->equalTo(array("The subscription 'dummy' has not been saved, as no data was provided.")), - \Magento\Core\Model\Message::ERROR + \Magento\Message\Factory::ERROR ); $this->assertRedirect($this->stringContains('backend/admin/webhook_subscription/edit/')); } @@ -100,7 +100,7 @@ class SubscriptionTest extends \Magento\Backend\Utility\Controller $this->dispatch('backend/admin/webhook_subscription/save'); $this->assertSessionMessages( $this->equalTo(array("The subscription 'dummy' has been saved.")), - \Magento\Core\Model\Message::SUCCESS + \Magento\Message\Factory::SUCCESS ); $this->assertRedirect($this->stringContains('backend/admin/webhook_subscription/index/')); } @@ -117,7 +117,7 @@ class SubscriptionTest extends \Magento\Backend\Utility\Controller $this->assertSessionMessages( $this->equalTo(array("The subscription '$subscriptionName' has been saved.")), - \Magento\Core\Model\Message::SUCCESS + \Magento\Message\Factory::SUCCESS ); $this->assertRedirect($this->stringContains('backend/admin/webhook_subscription/index/')); } @@ -128,7 +128,7 @@ class SubscriptionTest extends \Magento\Backend\Utility\Controller $this->assertSessionMessages( $this->equalTo(array("Subscription with ID '' doesn't exist.")), - \Magento\Core\Model\Message::ERROR + \Magento\Message\Factory::ERROR ); $this->assertRedirect($this->stringContains('backend/admin/webhook_subscription/index/')); } @@ -141,7 +141,7 @@ class SubscriptionTest extends \Magento\Backend\Utility\Controller $this->assertSessionMessages( $this->equalTo(array("The subscription 'dummy' can not be removed.")), - \Magento\Core\Model\Message::ERROR + \Magento\Message\Factory::ERROR ); $this->assertRedirect($this->stringContains('backend/admin/webhook_subscription/index/')); } @@ -153,7 +153,7 @@ class SubscriptionTest extends \Magento\Backend\Utility\Controller $this->assertSessionMessages( $this->equalTo(array("The subscription 'dummy' has been removed.")), - \Magento\Core\Model\Message::SUCCESS + \Magento\Message\Factory::SUCCESS ); $this->assertRedirect($this->stringContains('backend/admin/webhook_subscription/index/')); } @@ -165,7 +165,7 @@ class SubscriptionTest extends \Magento\Backend\Utility\Controller $this->assertSessionMessages( $this->equalTo(array("The subscription 'dummy' has been revoked.")), - \Magento\Core\Model\Message::SUCCESS + \Magento\Message\Factory::SUCCESS ); $this->assertRedirect($this->stringContains('backend/admin/webhook_subscription/index/')); } @@ -177,7 +177,7 @@ class SubscriptionTest extends \Magento\Backend\Utility\Controller $this->assertSessionMessages( $this->equalTo(array("The subscription 'dummy' has been activated.")), - \Magento\Core\Model\Message::SUCCESS + \Magento\Message\Factory::SUCCESS ); $this->assertRedirect($this->stringContains('backend/admin/webhook_subscription/index/')); } diff --git a/dev/tests/integration/testsuite/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/DesignAbstractionTest.php b/dev/tests/integration/testsuite/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/DesignAbstractionTest.php index a9e23b96f898da0a29437112f37d4f5b5799cec3..a508803fa38656fda994c086c6edaadf45e0cd29 100644 --- a/dev/tests/integration/testsuite/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/DesignAbstractionTest.php +++ b/dev/tests/integration/testsuite/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/DesignAbstractionTest.php @@ -48,7 +48,7 @@ class DesignAbstractionTest extends \PHPUnit_Framework_TestCase $appState = $objectManager->get('Magento\App\State'); $appState->setAreaCode(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE); $args = array( - 'context' => $objectManager->get('Magento\Core\Block\Template\Context'), + 'context' => $objectManager->get('Magento\View\Block\Template\Context'), 'layoutProcessorFactory' => $this->getMock('Magento\View\Layout\ProcessorFactory', array(), array(), '', false), 'themesFactory' => $objectManager->get('Magento\Core\Model\Resource\Theme\CollectionFactory'), diff --git a/dev/tests/integration/testsuite/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/LayoutTest.php b/dev/tests/integration/testsuite/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/LayoutTest.php index de00ff43ba8df1958fbb191146f0301064584180..2f781bf297340dec01a7ea0fd4ef73696bda8636 100644 --- a/dev/tests/integration/testsuite/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/LayoutTest.php +++ b/dev/tests/integration/testsuite/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/LayoutTest.php @@ -66,7 +66,7 @@ class LayoutTest extends \PHPUnit_Framework_TestCase ->will($this->returnValue($pageTypeValues)); $this->_block = new \Magento\Widget\Block\Adminhtml\Widget\Instance\Edit\Chooser\Layout( - $objectManager->get('Magento\Core\Block\Template\Context'), + $objectManager->get('Magento\View\Block\Template\Context'), $config, array( 'name' => 'page_type', diff --git a/dev/tests/integration/testsuite/Magento/Wishlist/Block/AbstractTest.php b/dev/tests/integration/testsuite/Magento/Wishlist/Block/AbstractTest.php index 6f38f51ecd7d5573a3731e2a81c0c3e04b5c8b83..fb0ac2302e13ab84cc2f5fd40b13fcf21e134571 100644 --- a/dev/tests/integration/testsuite/Magento/Wishlist/Block/AbstractTest.php +++ b/dev/tests/integration/testsuite/Magento/Wishlist/Block/AbstractTest.php @@ -38,13 +38,12 @@ class AbstractTest extends \PHPUnit_Framework_TestCase { $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $this->_block = $this->getMockForAbstractClass('Magento\Wishlist\Block\AbstractBlock', array( - $objectManager->get('Magento\Core\Model\StoreManagerInterface'), + $objectManager->get('Magento\View\Block\Template\Context'), + $objectManager->get('Magento\Core\Helper\Data'), $objectManager->get('Magento\Catalog\Model\Config'), $objectManager->get('Magento\Core\Model\Registry'), $objectManager->get('Magento\Tax\Helper\Data'), $objectManager->get('Magento\Catalog\Helper\Data'), - $objectManager->get('Magento\Core\Helper\Data'), - $objectManager->get('Magento\Core\Block\Template\Context'), $objectManager->get('Magento\Math\Random'), $objectManager->get('Magento\Wishlist\Helper\Data'), $objectManager->get('Magento\Customer\Model\Session'), diff --git a/dev/tests/integration/testsuite/Magento/Wishlist/Block/Customer/Wishlist/Item/ColumnTest.php b/dev/tests/integration/testsuite/Magento/Wishlist/Block/Customer/Wishlist/Item/ColumnTest.php index dde2bc457c271b1c08f062d4ca462daac591c49e..cfcac8100b6ed276912e3e7930db558ca6fc5803 100644 --- a/dev/tests/integration/testsuite/Magento/Wishlist/Block/Customer/Wishlist/Item/ColumnTest.php +++ b/dev/tests/integration/testsuite/Magento/Wishlist/Block/Customer/Wishlist/Item/ColumnTest.php @@ -44,7 +44,7 @@ class ColumnTest extends \PHPUnit_Framework_TestCase $this->_layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() ->get('Magento\View\LayoutInterface'); $this->_block = $this->_layout->addBlock('Magento\Wishlist\Block\Customer\Wishlist\Item\Column', 'test'); - $this->_layout->addBlock('Magento\Core\Block\Text', 'child', 'test'); + $this->_layout->addBlock('Magento\View\Block\Text', 'child', 'test'); } /** diff --git a/dev/tests/integration/testsuite/Magento/Wishlist/Block/Customer/Wishlist/ItemsTest.php b/dev/tests/integration/testsuite/Magento/Wishlist/Block/Customer/Wishlist/ItemsTest.php index 61eea886189487840354dd12cc0ae2a482a8c575..45ab6ffa1f492d2dd9cfdc0c8cfa72205a08a2f7 100644 --- a/dev/tests/integration/testsuite/Magento/Wishlist/Block/Customer/Wishlist/ItemsTest.php +++ b/dev/tests/integration/testsuite/Magento/Wishlist/Block/Customer/Wishlist/ItemsTest.php @@ -33,8 +33,8 @@ class ItemsTest extends \PHPUnit_Framework_TestCase { $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface'); $block = $layout->addBlock('Magento\Wishlist\Block\Customer\Wishlist\Items', 'test'); - $child = $this->getMock('Magento\Core\Block\Text', array('isEnabled'), - array(\Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Block\Context'))); + $child = $this->getMock('Magento\View\Block\Text', array('isEnabled'), + array(\Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\Block\Context'))); $child->expects($this->any()) ->method('isEnabled') ->will($this->returnValue(true)); diff --git a/dev/tests/performance/framework/Magento/TestFramework/Application.php b/dev/tests/performance/framework/Magento/TestFramework/Application.php index ff1421c248c2ce16af327335bde2f1dd7bf9f150..d2d65f029d02cbd10ecf57b6f30e18c1be5c1e43 100644 --- a/dev/tests/performance/framework/Magento/TestFramework/Application.php +++ b/dev/tests/performance/framework/Magento/TestFramework/Application.php @@ -31,6 +31,11 @@ namespace Magento\TestFramework; class Application { + /** + * Area code + */ + const AREA_CODE = 'install'; + /** * Configuration object * @@ -38,6 +43,13 @@ class Application */ protected $_config; + /** + * Application object + * + * @var \Magento\Core\Model\App + */ + protected $_application; + /** * Path to shell installer script * @@ -97,7 +109,7 @@ class Application if ($this->_config->getInstallOptions()) { $this->_uninstall() ->_install() - ->_reindex() + ->reindex() ->_updateFilesystemPermissions(); } else { $this->_isInstalled = true; @@ -105,6 +117,29 @@ class Application return $this; } + /** + * Reset application (uninstall, install, reindex, update permissions) + * + * @return Application + */ + public function reset() + { + return $this->_reset(); + } + + /** + * Run reindex + * + * @return Application + */ + public function reindex() + { + $this->_shell->execute( + 'php -f ' . $this->_config->getApplicationBaseDir() . '/dev/shell/indexer.php -- reindexall' + ); + return $this; + } + /** * Uninstall application * @@ -154,33 +189,12 @@ class Application return $this; } - /** - * Run all indexer processes - * - * @return \Magento\TestFramework\Application - */ - protected function _reindex() - { - $this->_bootstrap(); - - /** @var $indexer \Magento\Index\Model\Indexer */ - $indexer = $this->_objectManager->create('Magento\Index\Model\Indexer'); - /** @var $process \Magento\Index\Model\Process */ - foreach ($indexer->getProcessesCollection() as $process) { - if ($process->getIndexer()->isVisible()) { - $process->reindexEverything(); - } - } - - return $this; - } - /** * Update permissions for `var` directory */ protected function _updateFilesystemPermissions() { - \Magento\Io\File::chmodRecursive($this->_objectManager->get('Magento\App\Dir')->getDir('var'), 0777); + \Magento\Io\File::chmodRecursive($this->getObjectManager()->get('Magento\App\Dir')->getDir('var'), 0777); } /** @@ -190,14 +204,26 @@ class Application */ protected function _bootstrap() { - if (!$this->_objectManager) { - $this->_objectManager = new \Magento\App\ObjectManager(BP, $_SERVER); - } /** @var $app \Magento\Core\Model\App */ - $this->_objectManager->get('Magento\Core\Model\App'); + $this->_application = $this->getObjectManager()->get('Magento\Core\Model\App'); + $this->getObjectManager()->get('Magento\App\State')->setAreaCode(self::AREA_CODE); + $this->getObjectManager()->configure( + $this->getObjectManager()->get('Magento\App\ObjectManager\ConfigLoader')->load(self::AREA_CODE) + ); + $this->getObjectManager()->get('Magento\Config\ScopeInterface')->setCurrentScope(self::AREA_CODE); return $this; } + /** + * Bootstrap + * + * @return Application + */ + public function bootstrap() + { + return $this->_bootstrap(); + } + /** * Work on application, so that it has all and only $fixtures applied. May require reinstall, if * excessive fixtures has been applied before. @@ -218,14 +244,24 @@ class Application $this->_bootstrap(); foreach ($fixturesToApply as $fixtureFile) { - require $fixtureFile; + $this->applyFixture($fixtureFile); } $this->_fixtures = $fixtures; - $this->_reindex() + $this->reindex() ->_updateFilesystemPermissions(); } + /** + * Apply fixture file + * + * @param string $fixtureFilename + */ + public function applyFixture($fixtureFilename) + { + require $fixtureFilename; + } + /** * Compare list of fixtures needed to be set to the application, with the list of fixtures already in it. * Return, whether application reinstall (cleanup) is needed to properly apply the fixtures. @@ -240,10 +276,16 @@ class Application } /** + * Get object manager + * * @return \Magento\ObjectManager */ public function getObjectManager() { + if (!$this->_objectManager) { + $locatorFactory = new \Magento\App\ObjectManagerFactory(); + $this->_objectManager = $locatorFactory->create(BP, $_SERVER); + } return $this->_objectManager; } } diff --git a/dev/tests/performance/framework/Magento/TestFramework/Helper/Categories.php b/dev/tests/performance/framework/Magento/TestFramework/Helper/Categories.php new file mode 100644 index 0000000000000000000000000000000000000000..2c23d398639bc1cd1d7a916fea0004f9888b9179 --- /dev/null +++ b/dev/tests/performance/framework/Magento/TestFramework/Helper/Categories.php @@ -0,0 +1,124 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\TestFramework\Helper; + +/** + * Class Categories Helper + * + * @package Magento\TestFramework\Helper + */ +class Categories +{ + /** + * Object manager + * + * @var \Magento\ObjectManager\ObjectManager + */ + protected $_objectManager = null; + + /** + * Get categories + * + * @var array + */ + protected $_categories = array(); + + /** + * Categories count + * + * @var int + */ + protected $_categoriesNumber = 0; + + /** + * Constructor + */ + public function __construct() + { + + $rootCategoryId = $this->getObjectManager()->create('\Magento\Core\Model\StoreManager')->getDefaultStoreView() + ->getRootCategoryId(); + + /** @var $category \Magento\Catalog\Model\Category */ + $category = $this->getObjectManager()->get('Magento\Catalog\Model\Category'); + $category->load($rootCategoryId); + + /** @var $categoryResource \Magento\Catalog\Model\Resource\Category */ + $categoryResource = $category->getResource(); + $categories = $categoryResource->getAllChildren($category); + $this->_categoriesNumber = count($categories); + + /** + * Preapre categories paths for import + * + * @see \Magento\ImportExport\Model\Import\Entity\Product::_initCategories() + */ + foreach ($categories as $key => $categoryId) { + $category->load($categoryId); + $structure = explode('/', $category->getPath()); + $pathSize = count($structure); + if ($pathSize > 1) { + $path = array(); + for ($i = 1; $i < $pathSize; $i++) { + $path[] = $category->load($structure[$i])->getName(); + } + array_shift($path); + $categories[$key] = implode('/', $path); + } else { + $categories[$key] = $category->getName(); + } + } + + /** Removing store root categories */ + $this->_categories = array_values(array_filter($categories)); + $this->_categoriesNumber = count($this->_categories); + } + + /** + * Get object manager + * + * @return \Magento\ObjectManager\ObjectManager|null + */ + protected function getObjectManager() + { + if (!$this->_objectManager) { + $locatorFactory = new \Magento\App\ObjectManagerFactory(); + $this->_objectManager = $locatorFactory->create(BP, $_SERVER); + } + return $this->_objectManager; + } + + /** + * Get for import number by increment + * + * @param $index + * + * @return mixed + */ + public function getCategoryForImport($index) + { + return $this->_categories[$index % $this->_categoriesNumber]; + } +} diff --git a/dev/tests/performance/framework/Magento/TestFramework/Helper/Cli.php b/dev/tests/performance/framework/Magento/TestFramework/Helper/Cli.php new file mode 100644 index 0000000000000000000000000000000000000000..b5fa04ec983e12f5d59ba694ad61cf55b2d0eac5 --- /dev/null +++ b/dev/tests/performance/framework/Magento/TestFramework/Helper/Cli.php @@ -0,0 +1,70 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\TestFramework\Helper; + +/** + * Class Cli static helper + * + * @package Magento\TestFramework\Helper + */ +class Cli +{ + /** + * Getopt object + * + * @var \Zend_Console_Getopt + */ + protected static $_getopt; + + /** + * Set GetOpt object + * + * @param \Zend_Console_Getopt $getopt + */ + public static function setOpt(\Zend_Console_Getopt $getopt) + { + static::$_getopt = $getopt; + } + + /** + * Get option value + * + * @param string $key + * @param mixed $default + * + * @return mixed|null + */ + public static function getOption($key, $default = null) + { + if (!static::$_getopt instanceof \Zend_Console_Getopt) { + return $default; + } + $value = static::$_getopt->getOption($key); + if (is_null($value)) { + return $default; + } + return $value; + } +} diff --git a/dev/tests/performance/framework/Magento/TestFramework/ImportExport/Fixture/Complex/Generator.php b/dev/tests/performance/framework/Magento/TestFramework/ImportExport/Fixture/Complex/Generator.php new file mode 100644 index 0000000000000000000000000000000000000000..cc7890d514cbd98a904359e74b7011b76b940f7b --- /dev/null +++ b/dev/tests/performance/framework/Magento/TestFramework/ImportExport/Fixture/Complex/Generator.php @@ -0,0 +1,141 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\TestFramework\ImportExport\Fixture\Complex; + +/** + * Class Generator + * + * @package Magento\TestFramework\ImportExport\Fixture\Complex + * + */ +class Generator extends \Magento\ImportExport\Model\Import\AbstractSource +{ + /** + * Data row pattern + * + * @var \Magento\TestFramework\ImportExport\Fixture\Complex\Pattern + */ + protected $_pattern; + + /** + * Entities limit + * + * @var int + */ + protected $_limit = 0; + + /** + * Entities Count + * + * @var int + */ + protected $_count = 0; + + /** + * Array of template variables (static values or callables) + * + * @var array + */ + protected $_variables = array(); + + /** + * Current index + * + * @var int + */ + protected $_index = 1; + + /** + * Rows count in pattern + * + * @var int + */ + protected $_patternRowsCount = 0; + + /** + * Read the row pattern to determine which columns are dynamic, set the collection size + * + * @param Pattern $rowPattern + * @param int $count how many records to generate + */ + public function __construct(Pattern $rowPattern, $count) + { + $this->_pattern = $rowPattern; + $this->_count = $count; + $this->_patternRowsCount = $this->_pattern->getRowsCount(); + $this->_limit = (int)$count * $this->_patternRowsCount; + parent::__construct($this->_pattern->getHeaders()); + } + + /** + * Get row index for template + * + * @param $key + * + * @return float + */ + public function getIndex($key) + { + return floor($key / $this->_patternRowsCount) + 1; + } + + /** + * Whether limit of generated elements is reached (according to "Iterator" interface) + * + * @return bool + */ + public function valid() + { + return $this->_key + 1 <= $this->_limit; + } + + /** + * Get next row in set + * + * @return array|bool + */ + protected function _getNextRow() + { + $key = $this->key(); + $this->_index = $this->getIndex($key); + + if ($key > $this->_limit) { + return false; + } + return $this->_pattern->getRow($this->_index, $key); + } + + /** + * Return the current element + * + * Returns the row in associative array format: array(<col_name> => <value>, ...) + * + * @return array + */ + public function current() + { + return $this->_row; + } +} diff --git a/dev/tests/performance/framework/Magento/TestFramework/ImportExport/Fixture/Complex/Pattern.php b/dev/tests/performance/framework/Magento/TestFramework/ImportExport/Fixture/Complex/Pattern.php new file mode 100644 index 0000000000000000000000000000000000000000..0b99509fc6b7682c4b9e78993d0e18c634a6bc51 --- /dev/null +++ b/dev/tests/performance/framework/Magento/TestFramework/ImportExport/Fixture/Complex/Pattern.php @@ -0,0 +1,146 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\TestFramework\ImportExport\Fixture\Complex; + +/** + * Complex pattern class for complex generator (used for creating configurable products) + * + * @package Magento\TestFramework\ImportExport\Fixture\Complex + * + */ +class Pattern +{ + /** + * Pattern headers set + * + * @var array + */ + protected $_headers; + + /** + * Rows set - array of rows pattern, can contain as many rows as you need + * + * @var array(array) + */ + protected $_rowsSet; + + /** + * Position + * + * @var int + */ + protected $_position = 0; + + /** + * Set headers + * + * @param array $headers + * + * @return Pattern + */ + public function setHeaders(array $headers) + { + $this->_headers = $headers; + return $this; + } + + /** + * Get headers array + * + * @return array + */ + public function getHeaders() + { + return $this->_headers; + } + + /** + * Set combined rows set + * + * @param array $rowsSet + * + * @return Pattern + * @throws \Exception + */ + public function setRowsSet(array $rowsSet) + { + if (!count($rowsSet)) { + throw new \Exception("Rows set must contain at least 1 array representing a row pattern"); + } + $this->_rowsSet = $rowsSet; + if (!isset($this->_headers)) { + $this->_headers = array_keys($rowsSet[0]); + } + return $this; + } + + /** + * Add row + * + * @param array $row + * + * @return Pattern + */ + public function addRow(array $row) + { + $this->_rowsSet[] = $row; + return $this; + } + + /** + * Get row + * + * @param int $index + * @param int $generatorKey + * + * @return array|null + */ + public function getRow($index, $generatorKey) + { + $row = $this->_rowsSet[$generatorKey % count($this->_rowsSet)]; + foreach ($this->getHeaders() as $key) { + if (isset($row[$key])) { + if (is_callable($row[$key])) { + $row[$key] = call_user_func($row[$key], $index); + } else { + $row[$key] = str_replace('%s', $index, $row[$key]); + } + } else { + $row[$key] = ''; + } + } + return $row; + } + + /** + * Get rows count + * + * @return int + */ + public function getRowsCount() + { + return count($this->_rowsSet); + } +} diff --git a/dev/tests/performance/framework/Magento/TestFramework/Performance/Config.php b/dev/tests/performance/framework/Magento/TestFramework/Performance/Config.php index de0c97bc57e068ff61f7e689578350de7049aab6..b3903d70e34783581bc68b64af11e97f6da3983a 100644 --- a/dev/tests/performance/framework/Magento/TestFramework/Performance/Config.php +++ b/dev/tests/performance/framework/Magento/TestFramework/Performance/Config.php @@ -103,6 +103,16 @@ class Config $this->_parseScenarios($configData['scenario']); } + /** + * Get tests base directory + * + * @return string + */ + public function getTestsBaseDir() + { + return $this->_testsBaseDir; + } + /** * Validate high-level configuration structure * diff --git a/dev/tests/performance/framework/Magento/TestFramework/Performance/Testsuite.php b/dev/tests/performance/framework/Magento/TestFramework/Performance/Testsuite.php index a1b009537bd2bea0fe4d713f6c2903b2f8f38088..56450dbeb01ae21a72c3c0e8382e5ad1af0319b4 100644 --- a/dev/tests/performance/framework/Magento/TestFramework/Performance/Testsuite.php +++ b/dev/tests/performance/framework/Magento/TestFramework/Performance/Testsuite.php @@ -94,6 +94,16 @@ class Testsuite $this->_scenarioHandler = $scenarioHandler; } + /** + * Get test framework application instance + * + * @return \Magento\TestFramework\Application + */ + public function getApplication() + { + return $this->_application; + } + /** * Run entire test suite of scenarios */ diff --git a/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/ApplicationTest.php b/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/ApplicationTest.php index 567157b1b9f48f6b40c7e63c4cc28f53c8999bd5..b7ae1e8af061c07c04f20da8d731f4352c9620e1 100644 --- a/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/ApplicationTest.php +++ b/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/ApplicationTest.php @@ -27,6 +27,11 @@ namespace Magento\Test; +/** + * Class ApplicationTest + * + * @package Magento\Test + */ class ApplicationTest extends \PHPUnit_Framework_TestCase { /** @@ -35,12 +40,12 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase protected $_config; /** - * @var \Magento\Shell|PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Shell|\PHPUnit_Framework_MockObject_MockObject */ protected $_shell; /** - * @var \Magento\TestFramework\Application|PHPUnit_Framework_MockObject_MockObject + * @var \Magento\TestFramework\Application|\PHPUnit_Framework_MockObject_MockObject */ protected $_object; @@ -59,6 +64,9 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase */ protected $_fixtureConfigData; + /** + * Set Up before test + */ protected function setUp() { $this->_fixtureDir = __DIR__ . '/Performance/_files'; @@ -83,6 +91,9 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase $this->_object->applied = array(); // For fixture testing } + /** + * Tear down after test + */ protected function tearDown() { unset($this->_config); @@ -91,6 +102,8 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase } /** + * Constructor test + * * @expectedException \Magento\Exception */ public function testConstructorException() @@ -105,6 +118,8 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase /** + * Apply fixtures test + * * @param array $fixtures * @param array $expected * @dataProvider applyFixturesDataProvider @@ -116,6 +131,8 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase } /** + * Apply fixture data provider + * * @return array */ public function applyFixturesDataProvider() @@ -134,6 +151,8 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase } /** + * Apply fixture test + * * @param array $initialFixtures * @param array $subsequentFixtures * @param array $subsequentExpected @@ -148,6 +167,8 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase } /** + * Apply fixtture data provider + * * @return array */ public function applyFixturesSeveralTimesDataProvider() @@ -176,6 +197,7 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase * Adds file paths to fixture in a list * * @param array $fixture + * * @return array */ protected function _getFixtureFiles($fixtures) @@ -187,6 +209,9 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase return $result; } + /** + * Apply fixture with install + */ public function testApplyFixturesInstallsApplication() { // Expect uninstall and install @@ -202,9 +227,12 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase $this->_object->applyFixtures($fixture1); } + /** + * Apply fixture w/o install + */ public function testApplyFixturesSuperSetNoInstallation() { - $this->_shell->expects($this->exactly(2)) // Initial uninstall/install only + $this->_shell->expects($this->exactly(5)) // Initial uninstall/install only ->method('execute'); $fixture1 = $this->_getFixtureFiles(array('fixture1')); @@ -213,6 +241,9 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase $this->_object->applyFixtures($superSet); } + /** + * Apply fixtures test with no reinstall + */ public function testApplyFixturesIncompatibleSetReinstallation() { $this->_shell->expects($this->at(0)) @@ -223,11 +254,11 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase ->method('execute') ->with($this->logicalNot($this->stringContains('--uninstall')), $this->contains($this->_installerScript)); - $this->_shell->expects($this->at(2)) + $this->_shell->expects($this->at(4)) ->method('execute') ->with($this->stringContains('--uninstall'), $this->contains($this->_installerScript)); - $this->_shell->expects($this->at(3)) + $this->_shell->expects($this->at(5)) ->method('execute') ->with($this->logicalNot($this->stringContains('--uninstall')), $this->contains($this->_installerScript)); @@ -236,4 +267,12 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase $incompatibleSet = $this->_getFixtureFiles(array('fixture1')); $this->_object->applyFixtures($incompatibleSet); } + + /** + * Test application reset + */ + public function testAppReset() + { + $this->assertEquals(true, $this->_object->reset() instanceof \Magento\TestFramework\Application); + } } diff --git a/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Helper/CliTest.php b/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Helper/CliTest.php new file mode 100644 index 0000000000000000000000000000000000000000..1a2478998944bc358ff65bf4c8cf94bece80759b --- /dev/null +++ b/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Helper/CliTest.php @@ -0,0 +1,98 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * 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 performance_tests + * @subpackage unit_tests + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Test\Helper; + +/** + * Class CliTest + * + * @package Magento\Test\Helper + */ +class CliTest extends \PHPUnit_Framework_TestCase +{ + /** + * Getopt object + * + * @var \Zend_Console_Getopt + */ + protected $_getOpt; + + /** + * Param constants + */ + const TEST_OPTION_NAME = 'name'; + const TEST_OPTION_VALUE = 'test_option_value'; + + /** + * Set up before test + */ + public function setUp() + { + + $this->_getOpt = $this->getMock( + 'Zend_Console_Getopt', + array('getOption'), + array(array()) + ); + $this->_getOpt->expects($this->any())->method('getOption')->will($this->returnValueMap( + array( + array(self::TEST_OPTION_NAME, self::TEST_OPTION_VALUE), + array('xxx', null), + ) + )); + + \Magento\TestFramework\Helper\Cli::setOpt($this->_getOpt); + } + + /** + * Tesr down after test + */ + public function tearDown() + { + $this->_getOpt = null; + $this->_object = null; + } + + /** + * Test CLI helper + */ + public function testCli() + { + $this->assertEquals( + self::TEST_OPTION_VALUE, + \Magento\TestFramework\Helper\Cli::getOption(self::TEST_OPTION_NAME) + ); + $this->assertEquals( + null, + \Magento\TestFramework\Helper\Cli::getOption('xxx') + ); + $this->assertEquals( + 'default', + \Magento\TestFramework\Helper\Cli::getOption('xxx', 'default') + ); + } +} diff --git a/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/ImportExport/Fixture/Complex/ComplexGeneratorTest.php b/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/ImportExport/Fixture/Complex/ComplexGeneratorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..3248f273c32a49265927c55d8ffda3b356e93992 --- /dev/null +++ b/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/ImportExport/Fixture/Complex/ComplexGeneratorTest.php @@ -0,0 +1,109 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * 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 performance_tests + * @subpackage unit_tests + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Test\ImportExport\Fixture\Complex; + +/** + * Class ComplexGeneratorTest + * + * @package Magento\Test\ImportExport\Fixture\Complex + */ +class ComplexGeneratorTest extends \PHPUnit_Framework_TestCase +{ + /** + * Pattern instance + * + * @var \Magento\TestFramework\ImportExport\Fixture\Complex\Pattern + */ + protected $_pattern; + + /** + * Get pattern instance + * + * @return \Magento\TestFramework\ImportExport\Fixture\Complex\Pattern + */ + protected function getPattern() + { + if (!$this->_pattern instanceof \Magento\TestFramework\ImportExport\Fixture\Complex\Pattern) { + $patternData = array( + array( + 'id' => '%s', + 'name' => 'Static', + // @codingStandardsIgnoreStart + /** + * PHP_CodeSniffer bug - http://pear.php.net/bugs/bug.php?id=19290 (fixed in 1.4.0) + */ + 'calculated' => function ($index) { + return $index * 10; + }, + // @codingStandardsIgnoreEnd + ), + array( + 'name' => 'xxx %s' + ), + array( + 'name' => 'yyy %s' + ), + ); + $this->_pattern = new \Magento\TestFramework\ImportExport\Fixture\Complex\Pattern(); + $this->_pattern->setHeaders(array_keys($patternData[0])); + $this->_pattern->setRowsSet($patternData); + } + return $this->_pattern; + } + + /** + * Test complex generator iterator interface + */ + public function testIteratorInterface() + { + $model = new \Magento\TestFramework\ImportExport\Fixture\Complex\Generator($this->getPattern(), 2); + $rows = array(); + foreach ($model as $row) { + $rows[] = $row; + } + $this->assertEquals(array( + array('id' => '1', 'name' => 'Static', 'calculated' => 10), + array('id' => '', 'name' => 'xxx 1', 'calculated' => ''), + array('id' => '', 'name' => 'yyy 1', 'calculated' => ''), + array('id' => '2', 'name' => 'Static', 'calculated' => 20), + array('id' => '', 'name' => 'xxx 2', 'calculated' => ''), + array('id' => '', 'name' => 'yyy 2', 'calculated' => ''), + ), $rows); + } + + /** + * Test generator getIndex + */ + public function testGetIndex() + { + $model = new \Magento\TestFramework\ImportExport\Fixture\Complex\Generator($this->getPattern(), 4); + for ($i = 0; $i < 32; $i++) { + $this->assertEquals($model->getIndex($i), floor($i / $this->getPattern()->getRowsCount()) + 1); + } + } +} diff --git a/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/ImportExport/Fixture/Complex/PatternTest.php b/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/ImportExport/Fixture/Complex/PatternTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c0b2627c9052552e7f665e4f73dbd00a73948090 --- /dev/null +++ b/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/ImportExport/Fixture/Complex/PatternTest.php @@ -0,0 +1,123 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * 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 performance_tests + * @subpackage unit_tests + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Test\ImportExport\Fixture\Complex; + +/** + * Class PatternTest + * + * @package Magento\Test\ImportExport\Fixture\Complex + */ +class PatternTest extends \PHPUnit_Framework_TestCase +{ + /** + * Get pattern object + * + * @param $patternData + * + * @return \Magento\TestFramework\ImportExport\Fixture\Complex\Pattern + */ + protected function getPattern($patternData) + { + $pattern = new \Magento\TestFramework\ImportExport\Fixture\Complex\Pattern(); + $pattern->setHeaders(array_keys($patternData[0])); + $pattern->setRowsSet($patternData); + return $pattern; + } + + /** + * Data source for pattern + * + * @return array + */ + public function patternDataPrivider() + { + $result = array( + 0 => array( + array( + array( + 'id' => '%s', + 'name' => 'Static', + // @codingStandardsIgnoreStart + /** + * PHP_CodeSniffer bug - http://pear.php.net/bugs/bug.php?id=19290 (fixed in 1.4.0) + */ + 'calculated' => function ($index) { + return $index * 10; + }, + // @codingStandardsIgnoreEnd + ), + array( + 'name' => 'xxx %s' + ), + array( + 'name' => 'yyy %s' + ), + ), + 'ecpectedCount' => 3, + 'expectedRowsResult' => array( + array('id' => '1', 'name' => 'Static', 'calculated' => 10), + array('id' => '', 'name' => 'xxx 1', 'calculated' => ''), + array('id' => '', 'name' => 'yyy 1', 'calculated' => ''), + ) + ), + 1 => array( + array( + array( + 'id' => '%s', + 'name' => 'Dynamic %s', + 'calculated' => 'calc %s', + ) + ), + 'ecpectedCount' => 1, + 'expectedRowsResult' => array( + array('id' => '1', 'name' => 'Dynamic 1', 'calculated' => 'calc 1'), + ) + ) + ); + return $result; + } + + /** + * Test pattern object + * + * @param array $patternData + * @param int $expectedRowsCount + * @param array $expectedRowsResult + * + * @dataProvider patternDataPrivider + * @test + */ + public function testPattern($patternData, $expectedRowsCount, $expectedRowsResult) + { + $pattern = $this->getPattern($patternData); + $this->assertEquals($pattern->getRowsCount(), $expectedRowsCount); + foreach ($expectedRowsResult as $key => $expectedRow) { + $this->assertEquals($expectedRow, $pattern->getRow(floor($key / $pattern->getRowsCount()) + 1, $key)); + } + } +} \ No newline at end of file diff --git a/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/TestsuiteTest.php b/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/TestsuiteTest.php index fa2179e21e070c372964b0395d9f235c750ff4d2..a6dff0e87f8f230a48de1d0080b202b2c11f53ab 100644 --- a/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/TestsuiteTest.php +++ b/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/TestsuiteTest.php @@ -27,33 +27,51 @@ namespace Magento\Test\Performance; +/** + * Class TestsuiteTest + * + * @package Magento\Test\Performance + */ class TestsuiteTest extends \PHPUnit_Framework_TestCase { /** + * Testsuite object + * * @var \Magento\TestFramework\Performance\Testsuite */ protected $_object; /** + * Config object + * * @var \Magento\TestFramework\Performance\Config */ protected $_config; /** - * @var \Magento\TestFramework\Application|PHPUnit_Framework_MockObject_MockObject + * Application object + * + * @var \Magento\TestFramework\Application|\PHPUnit_Framework_MockObject_MockObject */ protected $_application; /** - * @var \Magento\TestFramework\Performance\Scenario\HandlerInterface|PHPUnit_Framework_MockObject_MockObject + * Scenario handler + * + * @var \Magento\TestFramework\Performance\Scenario\HandlerInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $_handler; /** + * Fixtures directory + * * @var string */ protected $_fixtureDir; + /** + * Set up before test + */ protected function setUp() { $this->_fixtureDir = __DIR__ . DIRECTORY_SEPARATOR . '_files'; @@ -74,6 +92,9 @@ class TestsuiteTest extends \PHPUnit_Framework_TestCase new \Magento\TestFramework\Performance\Testsuite($this->_config, $this->_application, $this->_handler); } + /** + * Teardown after test + */ protected function tearDown() { $this->_config = null; @@ -145,6 +166,9 @@ class TestsuiteTest extends \PHPUnit_Framework_TestCase } } + /** + * Test run testsuite + */ public function testRun() { $this->_expectScenarioWarmUp('Scenario with Error', 'scenario_error.jmx', 0); @@ -159,6 +183,9 @@ class TestsuiteTest extends \PHPUnit_Framework_TestCase $this->_object->run(); } + /** + * Scenario run test + */ public function testOnScenarioRun() { $this->_handler @@ -178,6 +205,8 @@ class TestsuiteTest extends \PHPUnit_Framework_TestCase } /** + * Test exception on scenario run + * * @expectedException \BadFunctionCallException */ public function testOnScenarioRunException() @@ -185,6 +214,9 @@ class TestsuiteTest extends \PHPUnit_Framework_TestCase $this->_object->onScenarioRun('invalid_callback'); } + /** + * Test scenario failure + */ public function testOnScenarioFailure() { $scenario = new \Magento\TestFramework\Performance\Scenario('Scenario with Error', 'scenario_error.jmx', @@ -224,10 +256,20 @@ class TestsuiteTest extends \PHPUnit_Framework_TestCase } /** + * Test exception on scenario failure + * * @expectedException \BadFunctionCallException */ public function testOnScenarioFailureException() { $this->_object->onScenarioFailure(array($this, 'invalid_callback')); } + + /** + * Test get application + */ + public function testGetApplication() + { + $this->assertEquals(true, $this->_object->getApplication() instanceof \Magento\TestFramework\Application); + } } diff --git a/dev/tests/static/framework/Magento/TestFramework/Integrity/Library/Injectable.php b/dev/tests/static/framework/Magento/TestFramework/Integrity/Library/Injectable.php index dd8ec067197f2c4ff01dba7dbaf5c31afd2388a1..0d5169fdb060e3ee67ea8ffd061f91318b5f1f49 100644 --- a/dev/tests/static/framework/Magento/TestFramework/Integrity/Library/Injectable.php +++ b/dev/tests/static/framework/Magento/TestFramework/Integrity/Library/Injectable.php @@ -49,6 +49,10 @@ class Injectable /** @var ClassReflection $class */ foreach ($class->getMethods() as $method) { /** @var \Zend\Code\Reflection\MethodReflection $method */ + if ($method->getDeclaringClass()->getName() != $class->getName()) { + continue; + } + foreach ($method->getParameters() as $parameter) { try { /** @var ParameterReflection $parameter */ diff --git a/dev/tests/static/framework/Magento/TestFramework/Utility/Classes.php b/dev/tests/static/framework/Magento/TestFramework/Utility/Classes.php index 6760c50ea075f93fbb7e71683df28a5e71c4dad0..a736ae9f5077c2bc113c69d0e1c0457f7ca61a8c 100644 --- a/dev/tests/static/framework/Magento/TestFramework/Utility/Classes.php +++ b/dev/tests/static/framework/Magento/TestFramework/Utility/Classes.php @@ -299,7 +299,7 @@ class Classes | (?:addBlock | createBlock | getBlockSingleton)\(\s*[\'"]([^\'"]+)[\'"]\s*[\),] # various methods, first argument - | \->(?:initReport | setDataHelperName | setEntityModelClass | _?initLayoutMessages + | \->(?:initReport | setDataHelperName | setEntityModelClass | setAttributeModel | setBackendModel | setFrontendModel | setSourceModel | setModel )\(\s*[\'"]([^\'"]+)[\'"]\s*[\),] diff --git a/dev/tests/static/framework/tests/unit/testsuite/Magento/Test/Integrity/Library/InjectableTest.php b/dev/tests/static/framework/tests/unit/testsuite/Magento/Test/Integrity/Library/InjectableTest.php index d4fa065f414ff3831298c5155340129c73fd4c4e..e501a99c4ef801d0c94e614e31e9e1d734bc5f70 100644 --- a/dev/tests/static/framework/tests/unit/testsuite/Magento/Test/Integrity/Library/InjectableTest.php +++ b/dev/tests/static/framework/tests/unit/testsuite/Magento/Test/Integrity/Library/InjectableTest.php @@ -46,6 +46,11 @@ class InjectableTest extends \PHPUnit_Framework_TestCase */ protected $parameterReflection; + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $declaredClass; + /** * @inheritdoc */ @@ -68,7 +73,15 @@ class InjectableTest extends \PHPUnit_Framework_TestCase ->disableOriginalConstructor() ->getMock(); + $this->declaredClass = $this->getMockBuilder('Zend\Code\Reflection\ClassReflection') + ->disableOriginalConstructor() + ->getMock(); + $methodReflection->expects($this->once()) + ->method('getDeclaringClass') + ->will($this->returnValue($this->declaredClass)); + + $methodReflection->expects($this->any()) ->method('getParameters') ->will($this->returnValue(array($this->parameterReflection))); @@ -149,4 +162,18 @@ class InjectableTest extends \PHPUnit_Framework_TestCase $this->injectable->getDependencies($this->fileReflection); } + + /** + * Covered when method declared in parent class + * + * @test + */ + public function testGetDependenciesWhenMethodDeclaredInParentClass() + { + $this->declaredClass->expects($this->once()) + ->method('getName') + ->will($this->returnValue('ParentClass')); + + $this->injectable->getDependencies($this->fileReflection); + } } diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/ClassesTest.php b/dev/tests/static/testsuite/Magento/Test/Integrity/ClassesTest.php index 179b69d371dbe47375644429d478f59168f4f34d..7b128a5f5e18834d0ba7ab5f1e3023ffa1ab5c29 100644 --- a/dev/tests/static/testsuite/Magento/Test/Integrity/ClassesTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Integrity/ClassesTest.php @@ -57,7 +57,7 @@ class ClassesTest extends \PHPUnit_Framework_TestCase \:\:get(?:ResourceModel | BlockSingleton | Model | Singleton)?\(\s*[\'"]([a-z\d\\\\]+)[\'"]\s*[\),] # various methods, first argument - | \->(?:initReport | addBlock | createBlock | setDataHelperName | _?initLayoutMessages + | \->(?:initReport | addBlock | createBlock | setDataHelperName | setAttributeModel | setBackendModel | setFrontendModel | setSourceModel | setModel )\(\s*\'([a-z\d\\\\]+)\'\s*[\),] diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/Di/CompilerTest.php b/dev/tests/static/testsuite/Magento/Test/Integrity/Di/CompilerTest.php index 4adc0eca3525c6458d5b0117eed0f6b4960d3490..392d57df4ddb03c3e69faee0d6cc59ce69d429f9 100644 --- a/dev/tests/static/testsuite/Magento/Test/Integrity/Di/CompilerTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Integrity/Di/CompilerTest.php @@ -61,7 +61,7 @@ class CompilerTest extends \PHPUnit_Framework_TestCase protected $_mapper; /** - * @var \Magento\Code\Validator\ConstructorIntegrity + * @var \Magento\Code\Validator */ protected $_validator; @@ -84,7 +84,10 @@ class CompilerTest extends \PHPUnit_Framework_TestCase $this->_command = 'php ' . $basePath . '/dev/tools/Magento/Tools/Di/compiler.php --generation=%s --di=%s'; $this->_mapper = new \Magento\ObjectManager\Config\Mapper\Dom(); - $this->_validator = new \Magento\Code\Validator\ConstructorIntegrity(); + $this->_validator = new \Magento\Code\Validator(); + $this->_validator->add(new \Magento\Code\Validator\ConstructorIntegrity()); + $this->_validator->add(new \Magento\Code\Validator\ContextAggregation()); + $this->_validator->add(new \Magento\Code\Validator\ArgumentSequence()); } protected function tearDown() @@ -161,16 +164,58 @@ class CompilerTest extends \PHPUnit_Framework_TestCase ); $replacements = array('', '', ''); + /** Convert file names into class name format */ $classes = array(); foreach ($files as $file) { $file = str_replace('/', '\\', $file); $filePath = preg_replace($patterns, $replacements, $file); $className = substr($filePath, 0, -4); if (class_exists($className)) { - $classes[$file] = array($className); + $classes[$file] = $className; } } - return $classes; + + /** Build class inheritance hierarchy */ + $output = array(); + foreach ($classes as $class) { + if (!in_array($class, $output)) { + $output = array_merge($output, $this->_buildInheritanceHierarchyTree($class)); + $output = array_unique($output); + } + } + + /** Convert data into data provider format */ + $outputClasses = array(); + foreach ($output as $className) { + $outputClasses[] = array($className); + } + return $outputClasses; + } + + /** + * Build inheritance hierarchy tree + * + * @param string $className + * @return array + */ + protected function _buildInheritanceHierarchyTree($className) + { + $output = array(); + if (0 !== strpos($className, '\\')) { + $className = '\\' . $className; + } + $class = new \ReflectionClass($className); + $parent = $class->getParentClass(); + if ($parent) { + $output = array_merge( + $this->_buildInheritanceHierarchyTree($parent->getName()), + array($className), + $output + ); + } else { + $output[] = $className; + } + return array_unique($output); } /** @@ -189,13 +234,13 @@ class CompilerTest extends \PHPUnit_Framework_TestCase } } + /** + * Validate DI configuration + */ public function testConfigurationOfInstanceParameters() { $invoker = new \Magento\TestFramework\Utility\AggregateInvoker($this); $invoker( - /** - * @param string $file - */ function ($file) { $this->_validateFile($file); }, @@ -203,6 +248,9 @@ class CompilerTest extends \PHPUnit_Framework_TestCase ); } + /** + * Validate constructor integrity + */ public function testConstructorIntegrity() { $autoloader = new \Magento\Autoload\IncludePath(); @@ -222,6 +270,8 @@ class CompilerTest extends \PHPUnit_Framework_TestCase } /** + * Test DI compiler + * * @depends testConfigurationOfInstanceParameters * @depends testConstructorIntegrity */ diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/Library/DependencyTest.php b/dev/tests/static/testsuite/Magento/Test/Integrity/Library/DependencyTest.php index b855f210f6332c0f2160d2d207b7b5af125e5b93..57e95653ec83b92bcc5e6287a5a714ce8f9bbcfd 100644 --- a/dev/tests/static/testsuite/Magento/Test/Integrity/Library/DependencyTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Integrity/Library/DependencyTest.php @@ -73,8 +73,7 @@ class DependencyTest extends \PHPUnit_Framework_TestCase foreach ($dependencies as $dependency) { if (preg_match('#^(\\\\|)' . implode('|', $this->getForbiddenNamespaces()) . '\\\\#', $dependency) - && !class_exists($dependency) - && !interface_exists($dependency) + && !file_exists(BP . '/lib/' . str_replace('\\', '/', $dependency) . '.php') ) { $this->errors[$fileReflection->getFileName()][] = $dependency; } diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/Library/_files/blacklist.txt b/dev/tests/static/testsuite/Magento/Test/Integrity/Library/_files/blacklist.txt index df93f0a6bb3b5528091aa7cb3512259d1cbb3904..23cb16b70ce8d695c45edf83c12914b5ffac8411 100644 --- a/dev/tests/static/testsuite/Magento/Test/Integrity/Library/_files/blacklist.txt +++ b/dev/tests/static/testsuite/Magento/Test/Integrity/Library/_files/blacklist.txt @@ -40,9 +40,12 @@ lib/Magento/Filter/Object/Grid.php lib/Magento/Filter/Object.php lib/Magento/View/Context.php -lib/Magento/View/Service.php -lib/Magento/View/Config.php -lib/Magento/View/Layout/File/Source/Decorator/ModuleOutput.php +lib/Magento/View/Block/Html/Calendar.php +lib/Magento/View/Block/Messages.php +lib/Magento/View/Block/AbstractBlock.php +lib/Magento/View/Block/Template.php +lib/Magento/View/Block/Context.php +lib/Magento/View/Block/Template/Context.php lib/Magento/App/Module/ResourceResolver.php lib/Magento/Event/Invoker/InvokerDefault.php @@ -50,3 +53,7 @@ lib/Magento/Phrase/Renderer/Translate.php lib/Magento/Backup/Snapshot.php lib/Magento/Outbound/Authentication/Hmac.php lib/Magento/Oauth/Exception.php + +lib/Magento/App/Helper/AbstractHelper.php +lib/Magento/App/Helper/Context.php + diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/_files/blacklist/namespace.txt b/dev/tests/static/testsuite/Magento/Test/Integrity/_files/blacklist/namespace.txt index 37dfcfb185141554f373b1d63d27fa0c8cbf227f..d4b10828388a66a92f88877ba3fb7f84de9ef477 100644 --- a/dev/tests/static/testsuite/Magento/Test/Integrity/_files/blacklist/namespace.txt +++ b/dev/tests/static/testsuite/Magento/Test/Integrity/_files/blacklist/namespace.txt @@ -53,4 +53,8 @@ dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/n dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/naming/property/normal_underscore.php dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/naming/property/underscore_absent.php dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/naming/property/underscore_middle.php -dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/naming/property/underscore_start_public.php \ No newline at end of file +dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/naming/property/underscore_start_public.php +dev/tests/unit/testsuite/Magento/Code/Validator/_files/ClassesForConstructorIntegrity.php +dev/tests/unit/testsuite/Magento/Code/Validator/_files/ClassesForContextAggregation.php +dev/tests/unit/testsuite/Magento/Code/Reader/_files/ClassesForArgumentsReader.php +dev/tests/unit/testsuite/Magento/Code/Validator/_files/ClassesForArgumentSequence.php \ No newline at end of file diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/LayoutTest.php b/dev/tests/static/testsuite/Magento/Test/Legacy/LayoutTest.php index 96e1fba1d74efd48b7d50613dcb202d8211396fc..5b1cfc991d6f82e570f44f9a60cc2aa0b0ac4114 100644 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/LayoutTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/LayoutTest.php @@ -145,8 +145,8 @@ class LayoutTest extends \PHPUnit_Framework_TestCase ); } $this->assertSame(array(), - $layoutXml->xpath('/layout//block[@class="Magento\Core\Block\Text\ListText"]'), - 'The class \Magento\Core\Block\Text\ListTest is not supposed to be used in layout anymore.' + $layoutXml->xpath('/layout//block[@class="Magento\View\Block\Text\ListText"]'), + 'The class \Magento\View\Block\Text\ListTest is not supposed to be used in layout anymore.' ); }, \Magento\TestFramework\Utility\Files::init()->getLayoutFiles() diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/Magento/Core/Block/AbstractBlockTest.php b/dev/tests/static/testsuite/Magento/Test/Legacy/Magento/Core/Block/AbstractBlockTest.php index 95c3329d669d92a07773b07fedc9cb4d5b98fc9c..564a6124eae1a425f2e66fa8a5735f4d5d4a4876 100644 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/Magento/Core/Block/AbstractBlockTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/Magento/Core/Block/AbstractBlockTest.php @@ -26,7 +26,7 @@ */ /** - * Tests usage of \Magento\Core\Block\AbstractBlock + * Tests usage of \Magento\View\Block\AbstractBlock */ namespace Magento\Test\Legacy\Magento\Core\Block; diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/ObsoleteCodeTest.php b/dev/tests/static/testsuite/Magento/Test/Legacy/ObsoleteCodeTest.php index ed833af0a5d6fc07964fa0042977596264a8169d..2e9825fc784411413a5917cac31d4016eac23608 100644 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/ObsoleteCodeTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/ObsoleteCodeTest.php @@ -308,7 +308,7 @@ class ObsoleteCodeTest extends \PHPUnit_Framework_TestCase if (0 === strpos($file, \Magento\TestFramework\Utility\Files::init()->getPathToSource() . '/app/')) { $this->_assertNotRegexp('/[^a-z\d_]getChild\s*\(/iS', $content, 'Block method getChild() is obsolete. ' . - 'Replacement suggestion: \Magento\Core\Block\AbstractBlock::getChildBlock()' + 'Replacement suggestion: \Magento\View\Block\AbstractBlock::getChildBlock()' ); } } diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_classes.php b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_classes.php index e6b008a1b25de230274a196b86e4e85f864fc572..4babc7a6336329a1d18bf7a98e31e7c6eab27a73 100644 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_classes.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_classes.php @@ -178,7 +178,31 @@ return array( array('Mage_Adminhtml_Block_System_Config_Dwstree', 'Magento\Backend\Block\System\Config\Dwstree'), array('Mage_Adminhtml_Block_System_Config_Switcher', 'Magento\Backend\Block\System\Config\Switcher'), array('Mage_Adminhtml_Block_System_Design_Grid'), + array('Magento\Adminhtml\Block\System\Email\Template', + 'Magento\Email\Block\Adminhtml\Template' + ), + array('Magento\Adminhtml\Block\System\Email\Template\Edit', + 'Magento\Email\Block\Adminhtml\Template\Edit' + ), + array('Magento\Adminhtml\Block\System\Email\Template\Edit\Form', + 'Magento\Email\Block\Adminhtml\Template\Edit\Form' + ), + array('Magento\Adminhtml\Block\System\Email\Template\Preview', + 'Magento\Email\Block\Adminhtml\Template\Preview' + ), array('Mage_Adminhtml_Block_System_Email_Template_Grid'), + array('Magento\Adminhtml\Block\System\Email\Template\Grid\Renderer\Action', + 'Magento\Email\Block\Adminhtml\Template\Grid\Renderer\Action' + ), + array('Magento\Adminhtml\Block\System\Email\Template\Grid\Renderer\Sender', + 'Magento\Email\Block\Adminhtml\Template\Grid\Renderer\Sender' + ), + array('Magento\Adminhtml\Block\System\Email\Template\Grid\Renderer\Type', + 'Magento\Email\Block\Adminhtml\Template\Grid\Renderer\Type' + ), + array('Magento\Adminhtml\Block\System\Email\Template\Grid\Filter\Type', + 'Magento\Email\Block\Adminhtml\Template\Grid\Filter\Type' + ), array('Mage_Adminhtml_Block_System_Variable_Grid'), array('Mage_Adminhtml_Block_Store_Switcher', 'Magento\Backend\Block\Store\Switcher'), array('Mage_Adminhtml_Block_Store_Switcher_Form_Renderer_Fieldset', @@ -193,9 +217,13 @@ return array( array('Mage_Adminhtml_Block_Tax_Rule_Grid'), array('Mage_Adminhtml_Block_Tree'), array('Mage_Adminhtml_Block_Urlrewrite_Grid'), + array('Magento\Adminhtml\Controller\System\Email\Template', + 'Magento\Email\Controller\Adminhtml\Template' + ), array('Mage_Adminhtml_Helper_Rss'), array('Mage_Adminhtml_Model_Config', 'Magento\Backend\Model\Config\Structure'), array('Mage_Adminhtml_Model_Config_Data', 'Magento\Backend\Model\Config'), + array('Magento\Adminhtml\Model\Email\Template', 'Magento\Email\Model\Adminhtml\Template'), array('Mage_Adminhtml_Model_Extension'), array('Mage_Adminhtml_Model_System_Config_Source_Shipping_Allowedmethods'), array('Mage_Adminhtml_Model_System_Config_Backend_Admin_Password_Link_Expirationperiod', @@ -593,11 +621,24 @@ return array( array('Mage_Core_Model_Config_System'), array('Mage_Core_Model_Design_Source_Apply'), array('Mage_Core_Model_Language'), + array('Magento\Core\Model\Email\Info', 'Magento\Email\Model\Info'), + array('Magento\Core\Model\Email\Sender', 'Magento\Email\Model\Sender'), + array('Magento\Core\Model\Email\Template', 'Magento\Email\Model\Template'), + array('Magento\Core\Model\Email\Transport', 'Magento\Email\Model\Transport'), + array('Magento\Core\Model\Email\Template\Config', 'Magento\Email\Model\Template\Config'), + array('Magento\Core\Model\Email\Template\Filter', 'Magento\Email\Model\Template\Filter'), + array('Magento\Core\Model\Email\Template\Mailer', 'Magento\Email\Model\Template\Mailer'), + array('Magento\Core\Model\Email\Template\Config\Converter', 'Magento\Email\Model\Template\Config\Converter'), + array('Magento\Core\Model\Template\Config\Data', 'Magento\Email\Model\Template\Config\Data'), + array('Magento\Core\Model\Template\Config\SchemaLocator', 'Magento\Email\Model\Template\Config\SchemaLocator'), + array('Magento\Core\Model\Resource\Email\Template', 'Magento\Email\Model\Resource\Template'), + array('Magento\Core\Model\Resource\Email\Template\Collection', 'Magento\Email\Model\Resource\Template\Collection'), array('Mage_Core_Model_Resource_Language'), array('Mage_Core_Model_Resource_Language_Collection'), array('Mage_Core_Model_Resource_Setup_Query_Modifier'), array('Mage_Core_Model_Session_Abstract_Varien'), array('Mage_Core_Model_Session_Abstract_Zend'), + array('Magento\Core\Model\Source\Email\Variables', 'Magento\Email\Model\Source\Variables'), array('Mage_Core_Model_Store_Group_Limitation'), array('Mage_Core_Model_Store_Limitation'), array('Magento\Core\Model\Variable\Observer'), @@ -1116,10 +1157,10 @@ return array( array('Magento\Core\Model\Layout\File\Source\Theme', 'Magento\View\Layout\File\Source\Theme'), array('Magento\Core\Model\Layout\File\SourceInterface', 'Magento\View\Layout\File\SourceInterface'), array('Magento\Core\Model\LayoutFactory', 'Magento\View\LayoutFactory'), - array('Magento\Core\Model\TemplateEngine\EngineInterface','Magento\View\TemplateEngineInterface'), - array('Magento\Core\Model\TemplateEngine\Factory','Magento\View\TemplateEngineFactory'), - array('Magento\Core\Model\TemplateEngine\Php','Magento\View\TemplateEngine\Php'), - array('Magento\Core\Model\TemplateEngine\Pool'), + array('Magento\Core\Model\TemplateEngine\EngineInterface', 'Magento\View\TemplateEngineInterface'), + array('Magento\Core\Model\TemplateEngine\Factory', 'Magento\View\TemplateEngineFactory'), + array('Magento\Core\Model\TemplateEngine\Php', 'Magento\View\TemplateEngine\Php'), + array('Magento\Core\Model\TemplateEngine\Pool', 'Magento\View\TemplateEnginePool'), array('Magento\Media\Model\File\Image'), array('Magento\Media\Model\Image'), array('Magento\Media\Helper\Data'), @@ -1251,10 +1292,6 @@ return array( 'Magento\Adminhtml\Controller\System\Design', 'Magento\Backend\Controller\Adminhtml\System\Design', ), - array( - 'Magento\Adminhtml\Controller\System\Email\Template', - 'Magento\Backend\Controller\Adminhtml\System\Email\Template', - ), array( 'Magento\Adminhtml\Controller\System\Store', 'Magento\Backend\Controller\Adminhtml\System\Store', @@ -1295,38 +1332,6 @@ return array( 'Magento\Adminhtml\Block\System\Design', 'Magento\Backend\Block\System\Design' ), - array( - 'Magento\Adminhtml\Block\System\Email\Template\Edit\Form', - 'Magento\Backend\Block\System\Email\Template\Edit\Form' - ), - array( - 'Magento\Adminhtml\Block\System\Email\Template\Edit', - 'Magento\Backend\Block\System\Email\Template\Edit' - ), - array( - 'Magento\Adminhtml\Block\System\Email\Template\Grid\Filter\Type', - 'Magento\Backend\Block\System\Email\Template\Grid\Filter\Type' - ), - array( - 'Magento\Adminhtml\Block\System\Email\Template\Grid\Renderer\Action', - 'Magento\Backend\Block\System\Email\Template\Grid\Renderer\Action' - ), - array( - 'Magento\Adminhtml\Block\System\Email\Template\Grid\Renderer\Sender', - 'Magento\Backend\Block\System\Email\Template\Grid\Renderer\Sender' - ), - array( - 'Magento\Adminhtml\Block\System\Email\Template\Grid\Renderer\Type', - 'Magento\Backend\Block\System\Email\Template\Grid\Renderer\Type' - ), - array( - 'Magento\Adminhtml\Block\System\Email\Template\Preview', - 'Magento\Backend\Block\System\Email\Template\Preview' - ), - array( - 'Magento\Adminhtml\Block\System\Email\Template', - 'Magento\Backend\Block\System\Email\Template' - ), array( 'Magento\Adminhtml\Block\System\Shipping\Ups', 'Magento\Backend\Block\System\Shipping\Ups' @@ -1430,7 +1435,8 @@ return array( array('Magento\Log\Model\EntryPoint\Shell', 'Magento\Log\App\Shell'), array('Magento\Index\Model\EntryPoint\Shell', 'Magento\Index\App\Shell'), array('Magento\Index\Model\EntryPoint\Indexer', 'Magento\Index\App\Indexer'), - array('\Magento\Core\Model\EntryPoint\Media', '\Magento\Core\App\Media'), + array('Magento\Core\Model\Config\Modules\Reader', 'Magento\Module\Dir\Reader'), + array('Magento\Data\Form\Factory', 'Magento\Data\FormFactory'), array('Magento\App\Cache\Config', 'Magento\Cache\Config'), array('Magento\App\Cache\Config\Converter', 'Magento\Cache\Config\Converter'), array('Magento\App\Cache\Config\Data', 'Magento\Cache\Config\Data'), @@ -1440,7 +1446,36 @@ return array( array('Magento\Core\Model\Fieldset\Config\Converter', 'Magento\Object\Copy\Config\Converter'), array('Magento\Core\Model\Fieldset\Config\Data', 'Magento\Object\Copy\Config\Data'), array('Magento\Core\Model\Fieldset\Config\Reader', 'Magento\Object\Copy\Config\Reader'), - array('Magento\Core\Model\Fieldset\Config\SchemaLocator', 'Magento\Object\Copy\Config\SchemaLocator'), - array('Magento\Core\Model\EntryPoint\Media', '\Magento\Core\App\Media'), + array('Magento\Core\Model\Fieldset\Config\SchemaLocator', 'Magento\Object\Copy\Config\SchemaLocator'), array('Magento\Core\Model\ModuleManager', 'Magento\Module\Manager'), + array('Magento\Core\Model\EntryPoint\Media', 'Magento\Core\App\Media'), + array('Magento\Core\Controller\Varien\Action', 'Magento\App\Action\Action'), + array('Magento\Core\Controller\Varien\Action\Context', 'Magento\App\Action\Context'), + array('Magento\Backend\Controller\AbstractAction', 'Magento\Backend\App\AbstractAction'), + array('Magento\Backend\Controller\Context', 'Magento\Backend\App\Action\Context'), + array('Magento\Backend\Controller\Adminhtml\Action', 'Magento\Backend\App\Action'), + array('Magento\Core\Block\Text', 'Magento\View\Block\Text'), + array('Magento\Core\Block\Text\ListText', 'Magento\View\Block\Text\ListText'), + array('Magento\Core\Block\Text\TextList\Item', 'Magento\View\Block\Text\TextList\Item'), + array('Magento\Core\Block\Text\TextList\Link', 'Magento\View\Block\Text\TextList\Link'), + array('Magento\Core\Block\Messages', 'Magento\View\Block\Messages'), + array('Magento\Core\Model\Message', 'Magento\Message\Factory'), + array('Magento\Core\Model\Message\AbstractMessage', 'Magento\Message\AbstractMessage'), + array('Magento\Core\Model\Message\Collection', 'Magento\Message\Collection'), + array('Magento\Core\Model\Message\CollectionFactory', 'Magento\Message\CollectionFactory'), + array('Magento\Core\Model\Message\Error', 'Magento\Message\Error'), + array('Magento\Core\Model\Message\Warning', 'Magento\Message\Warning'), + array('Magento\Core\Model\Message\Notice', 'Magento\Message\Notice'), + array('Magento\Core\Model\Message\Success', 'Magento\Message\Success'), + array('Magento\Core\Block\Html\Date', 'Magento\View\Block\Html\Date'), + array('Magento\Core\Block\Html\Select', 'Magento\View\Block\Html\Select'), + array('Magento\Core\Block\AbstractBlock', 'Magento\View\Block\AbstractBlock'), + array('Magento\Core\Block\Template', 'Magento\View\Block\Template'), + array('Magento\Core\Block\Html\Calendar', 'Magento\View\Block\Html\Calendar'), + array('Magento\Core\Block\Html\Link', 'Magento\View\Block\Html\Link'), + array('Magento\Core\Block\Context', 'Magento\View\Block\Context'), + array('Magento\Core\Model\Factory\Helper', 'Magento\App\Helper\HelperFactory'), + array('Magento\Core\Helper\AbstractHelper', 'Magento\App\Helper\AbstractHelper'), + array('Magento\Core\Helper\Context', 'Magento\App\Helper\Context'), + array('Magento\Core\Block\Template\Context', 'Magento\View\Block\Template\Context'), ); diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_config_nodes.php b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_config_nodes.php index 35306594018ffce631e2681685aa7400d1b8cfda..3cc13f9522f697d3d4e35466665fdb03bbd45d90 100644 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_config_nodes.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_config_nodes.php @@ -34,7 +34,7 @@ return array( '/config/general/locale' => 'This configuration moved to Di configuration of \Magento\Core\Model\Locale\Config model', '/config/global/can_use_base_url' => - 'This configuration moved to Di configuration of \Magento\Backend\Controller\Context class', + 'This configuration moved to Di configuration of \Magento\Backend\App\Action\Context class', '/config/global/locale/allow/codes' => 'This configuration moved to Di configuration of \Magento\Core\Model\Locale\Config model', '/config/global/locale/allow/currencies' => @@ -77,7 +77,7 @@ return array( '/config/global/secure_url' => 'This configuration moved to Di configuration of \Magento\Core\Model\Url\SecurityInfo', '/config/global/dev' => - 'This configuration moved to Di configuration of \Magento\Core\Controller\Varien\Action\Context', + 'This configuration moved to Di configuration of \Magento\App\Action\Context', '/config/global/webapi' => 'This configuration moved to Di configuration of \Magento\Webapi\Controller\Request\Rest\Interpreter\Factory' . ' and \Magento\Webapi\Controller\Response\Rest\Renderer\Factory', diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_constants.php b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_constants.php index 18297c73e2c2f319b94bf0c6fdba0203d985332d..2ad87198adc8115685d3e3caf17a48b0349a2c43 100644 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_constants.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_constants.php @@ -168,12 +168,12 @@ return array( array('XML_PATH_COUNTRY_DEFAULT', 'Magento\Paypal\Model\System\Config\Backend\MerchantCountry'), array( 'XML_PATH_DEBUG_TEMPLATE_HINTS', - 'Magento\Core\Block\Template', + 'Magento\View\Block\Template', 'Magento\Core\Model\TemplateEngine\Plugin::XML_PATH_DEBUG_TEMPLATE_HINTS' ), array( 'XML_PATH_DEBUG_TEMPLATE_HINTS_BLOCKS', - 'Magento\Core\Block\Template', + 'Magento\View\Block\Template', 'Magento\Core\Model\TemplateEngine\Plugin::XML_PATH_DEBUG_TEMPLATE_HINTS_BLOCKS' ), array('XML_PATH_DEFAULT_COUNTRY', 'Magento\Core\Model\Locale'), @@ -272,7 +272,7 @@ return array( ), array('XML_NODE_DIRECT_FRONT_NAMES', 'Magento\App\Request\Http'), array('XML_NODE_USET_AGENT_SKIP', 'Magento\Core\Model\Session\AbstractSession'), - array('XML_PAGE_TYPE_RENDER_INHERITED', 'Magento\Core\Controller\Varien\Action'), + array('XML_PAGE_TYPE_RENDER_INHERITED', 'Magento\App\Action\Action'), array('XML_PATH_ALLOW_MAP_UPDATE', 'Magento\Core\Model\Design\FileResolution\StrategyPool'), array('XML_PATH_WEBAPI_REQUEST_INTERPRETERS', 'Magento\Webapi\Controller\Request\Rest\Interpreter\Factory'), array('XML_PATH_WEBAPI_RESPONSE_RENDERS', 'Magento\Webapi\Controller\Response\Rest\Renderer\Factor'), diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_methods.php b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_methods.php index 504396a2aa61b1a25d747f4678d7f7d7124267da..8f3c6dbc791917e8f7576254a54b5cb74de6abca 100644 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_methods.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_methods.php @@ -122,6 +122,7 @@ return array( array('_initCache', 'Magento\Core\Model\App'), array('_initCurrentStore', 'Magento\Core\Model\App'), array('_initFileSystem', 'Magento\Core\Model\App'), + array('_initLayoutMessages', 'Magento\App\Action\Action'), array('_initLogger', 'Magento\Core\Model\App'), array('_initModules', 'Magento\Core\Model\App'), array('_initModulesPreNamespaces', 'Magento\Core\Model\Config'), @@ -356,12 +357,12 @@ return array( array('getDebug', 'Magento\Paypal\Model\Api\AbstractApi'), array('getDefaultBasePath', 'Magento\Core\Model\Store'), array('getDeleteUrl', 'Magento\Adminhtml\Block\Catalog\Product\Edit'), - array('getDirectOutput', 'Magento\Core\Block\Template'), + array('getDirectOutput', 'Magento\View\Block\Template'), array('getDirectOutput', 'Magento\Core\Model\Layout'), array('getDirectOutput', 'Magento\View\LayoutInterface'), array('getDistroServerVars', 'Magento\Core\Model\Config', 'getDistroBaseUrl'), array('getElementClass', 'Magento\Core\Model\Layout\Update'), - array('getEngineFactory', 'Magento\Core\Block\Template\Context', 'getEnginePool'), + array('getEngineFactory', 'Magento\View\Block\Template\Context', 'getEnginePool'), array('getEntityIdsToIncrementIds', 'Magento\Rss\Model\Resource\Order'), array('getEntityTypeIdsToTypes', 'Magento\Rss\Model\Resource\Order'), array('getEventConfig', 'Magento\Core\Model\Config'), @@ -498,7 +499,7 @@ return array( array('getSecure', 'Magento\Core\Model\Url', 'isSecure'), array('getSelectionFinalPrice', 'Magento\Bundle\Model\Product\Price'), array('getShipId', 'Magento\Shipping\Block\Tracking\Popup'), - array('getShowTemplateHints', 'Magento\Core\Block\Template'), + array('getShowTemplateHints', 'Magento\View\Block\Template'), array('getSortedChildBlocks', '', 'getChildNames() + $this->getLayout()->getBlock($name)'), array('getSortedChildren', '', 'getChildNames'), array('getSortedElements', 'Magento\Data\Form\Element\Fieldset', 'getElements'), @@ -575,6 +576,7 @@ return array( array('initCache'), array('initControllerRouters', 'Magento\Cms\Controller\Router'), array('initLabels', 'Magento\Catalog\Model\Resource\Eav\Attribute'), + array('initLayoutMessages', 'Magento\App\Action\Action'), array('initSerializerBlock', 'Magento\Adminhtml\Block\Catalog\Product\Edit\Tab\Ajax\Serializer'), array('initSerializerBlock', 'Magento\Backend\Block\Widget\Grid\Serializer'), array('initSpecified', 'Magento\Core\Model\App'), @@ -598,7 +600,7 @@ return array( array('isVerbose', 'Magento_Shell'), array('isWindowsOs', 'Magento\TestFramework\Helper\Memory'), array('load', 'Magento\Core\Model\Layout\Update', 'Magento\Core\Model\Layout\Merge'), - array('loadBaseContents', 'Magento\Core\Model\Email\Template'), + array('loadBaseContents', 'Magento\Email\Model\Template'), array('loadBase', 'Magento\Core\Model\Config'), array('loadDb', 'Magento\Core\Model\Config'), array('loadDiConfiguration', 'Magento\Core\Model\Config'), @@ -703,7 +705,7 @@ return array( array('setResourceConfig', 'Magento\App\Resource'), array('setSaveTemplateFlag', 'Magento\Newsletter\Model\Queue'), array('setScriptPath'), - array('setScriptPath', 'Magento\Core\Block\Template'), + array('setScriptPath', 'Magento\View\Block\Template'), array('setShipId', 'Magento\Shipping\Block\Tracking\Popup'), array('setSortElementsByAttribute', 'Magento\Data\Form\Element\Fieldset'), array('setStore', 'Magento\Captcha\Helper\Data'), @@ -822,8 +824,8 @@ return array( array('_initMetaTags', 'Magento\Page\Block\Html\Head'), array('addMetaTag', 'Magento\Page\Block\Html\Head'), array('getDefaultMetaTags', 'Magento\Page\Block\Html\Head'), - array('getDefaultTemplates', 'Magento\Core\Model\Email\Template'), - array('getDefaultTemplatesAsOptionsArray', 'Magento\Core\Model\Email\Template', + array('getDefaultTemplates', 'Magento\Email\Model\Template'), + array('getDefaultTemplatesAsOptionsArray', 'Magento\Email\Model\Template', 'Magento_Adminhtml_Block_System_Email_Template_Edit::_getDefaultTemplatesAsOptionsArray'), array('getMetaTags', 'Magento\Page\Block\Html\Head'), array('getMetaTagHtml', 'Magento\Page\Block\Html\Head'), @@ -889,11 +891,11 @@ return array( array('validateKey', '\Magento\Core\Helper\Data', '\Magento\Encryption\EncryptorInterface'), array('validateHash', '\Magento\Core\Helper\Data'), array('getHash', '\Magento\Core\Helper\Data'), - array('escapeHtml', '\Magento\Core\Helper\AbstractHelper', '\Magento\Escaper::escapeHtml'), - array('escapeUrl', '\Magento\Core\Helper\AbstractHelper', '\Magento\Escaper::escapeUrl'), - array('jsQuoteEscape', '\Magento\Core\Helper\AbstractHelper', '\Magento\Escaper::escapeJsQuote'), - array('quoteEscape', '\Magento\Core\Helper\AbstractHelper', '\Magento\Escaper::escapeQuote'), - array('removeTags', '\Magento\Core\Helper\AbstractHelper', '\Magento\Filter\FilterManager'), + array('escapeHtml', '\Magento\App\Helper\AbstractHelper', '\Magento\Escaper::escapeHtml'), + array('escapeUrl', '\Magento\App\Helper\AbstractHelper', '\Magento\Escaper::escapeUrl'), + array('jsQuoteEscape', '\Magento\App\Helper\AbstractHelper', '\Magento\Escaper::escapeJsQuote'), + array('quoteEscape', '\Magento\App\Helper\AbstractHelper', '\Magento\Escaper::escapeQuote'), + array('removeTags', '\Magento\App\Helper\AbstractHelper', '\Magento\Filter\FilterManager'), array('removeAccents', '\Magento\Core\Helper\Data', '\Magento\Filter\FilterManager'), array('splitWords', '\Magento\Core\Helper\String', '\Magento\Filter\FilterManager'), array('strlen', '\Magento\Core\Helper\String', '\Magento\Stdlib\String::strlen'), @@ -909,7 +911,9 @@ return array( array('is_empty_date'), array('now'), array('uniqHash', '\Magento\Core\Helper\Data', '\Magento\Math\Random::getUniqueHash'), - array('getMerchantCountryCode', '\Magento\Core\Helper\Data', '\Magento\Customer\Helper\Data::getMerchantCountryCode'), + array('getMerchantCountryCode', '\Magento\Core\Helper\Data', + '\Magento\Customer\Helper\Data::getMerchantCountryCode' + ), array('getMerchantVatNumber', '\Magento\Core\Helper\Data', '\Magento\Customer\Helper\Data::getMerchantVatNumber'), array('isCountryInEU', '\Magento\Core\Helper\Data', '\Magento\Customer\Helper\Data::isCountryInEU'), array('assocToXml', '\Magento\Core\Helper\Data', '\Magento\Convert\ConvertArray::assocToXml'), @@ -922,7 +926,8 @@ return array( array('getPublicFilesValidPath', '\Magento\Core\Helper\Data'), array('getViewConfig', '\Magento\Core\Model\View\Config', 'get'), array('_getSession', '\Magento\Catalog\Helper\Product\Compare', '$this->_catalogSession'), - array('getEnginePool', '\Magento\Core\Block\Template\Context', 'getEngineFactory'), + array('getEnginePool', '\Magento\View\Block\Template\Context', 'getEngineFactory'), + array('getHtml', 'Magento\View\Block\Messages'), array('is_dir_writeable'), array('destruct'), array('mageDebugBacktrace'), @@ -938,8 +943,76 @@ return array( array('getServerAddr', '\Magento\Core\Helper\Http', 'Magento\HTTP\PhpEnvironment\ServerAddress::getServerAddress'), array('formatDate', 'Magento\Core\Model\Resource\AbstractResource', '\Magento\Stdlib\DateTime::formatDate'), array('mktime', 'Magento\Core\Model\Resource\AbstractResource', '\Magento\Stdlib\DateTime::toTimestamp'), + array('getPlainTemplateMode', '\Magento\Email\Model\Template\Filter'), + array('getMessage', '\Magento\Core\Model\Session\Context', 'getMessageFactory'), + array('getMessageFactory', '\Magento\Core\Model\Session\Context', 'getMessagesFactory'), array('copyFieldsetToTarget', 'Magento\Core\Helper\Data', 'Magento\Object\Copy::copyFieldsetToTarget'), array('formatDate', '\Magento\Core\Helper\Data', '\Magento\Core\Model\Locale::formatDate'), array('formatTime', '\Magento\Core\Helper\Data', '\Magento\Core\Model\Locale::formatTime'), array('_getConfigTimezone', '\Magento\Core\Model\Date', '\Magento\Core\Model\Locale::getConfigTimezone'), + array('_filterPostData', '\Magento\Checkout\Controller\Onepage'), + array('_filterPostData', '\Magento\Customer\Controller\Account'), + array('_filterPostData', '\Magento\Customer\Controller\Adminhtml\Index'), + array('setRedirectWithCookieCheck', '\Magento\Core\Controller\Varien\Action'), + array('noCookiesAction', '\Magento\Core\Controller\Varien\Action'), + array('norouteAction', '\Magento\Core\Controller\Varien\Action'), + array('getActionMethodName', '\Magento\Core\Controller\Varien\Action'), + array('initLayoutMessages', '\Magento\Core\Controller\Varien\Action', '\Magento\Core\Model\Layout::initMessages'), + array('_initLayoutMessages', '\Magento\Core\Controller\Varien\Action', '\Magento\Core\Model\Layout::initMessages'), + array('preDispatch', '\Magento\Core\Controller\Varien\Action'), + array('postDispatch', '\Magento\Core\Controller\Varien\Action'), + array('hasAction', '\Magento\Core\Controller\Varien\Action'), + array('_startSession', '\Magento\Core\Controller\Varien\Action', + '\Magento\Core\App\Action\Plugin\Session::aroundDispatch' + ), + array('_redirectSuccess', '\Magento\Core\Controller\Varien\Action', + '\Magento\App\Response\RedirectInterface::success' + ), + array('_redirectUrl', '\Magento\Core\Controller\Varien\Action', + '\Magento\App\Response\RedirectInterface::redirect' + ), + array('_redirectError', '\Magento\Core\Controller\Varien\Action', '\Magento\App\Response\RedirectInterface::error'), + array('_redirectReferer', '\Magento\Core\Controller\Varien\Action'), + array('_validateFormKey', '\Magento\Core\Controller\Varien\Action', + '\Magento\Core\App\Action\FormKeyValidator::validate' + ), + array('_getRefererUrl', '\Magento\Core\Controller\Varien\Action', + '\Magento\App\Response\RedirectInterface::getRefererUrl' + ), + array('_isUrlInternal', '\Magento\Core\Controller\Varien\Action'), + array('_filterDateTime', '\Magento\Core\Controller\Varien\Action', '\Magento\Core\Filter\DateTime::filter'), + array('_filterDates', '\Magento\Core\Controller\Varien\Action', '\Magento\Core\Filter\Date::filter'), + + array('_initDesign', '\Magento\Core\Controller\Varien\Action', '\Magento\Core\Model\DesignLoader::load'), + array('_firePreDispatchEvents', '\Magento\Core\Controller\Varien\Action'), + array('_prepareDownloadResponse', '\Magento\Core\Controller\Varien\Action'), + array('_title', '\Magento\Core\Controller\Varien\Action', '\Magento\App\Action\Title::add'), + array('_renderTitles', '\Magento\Core\Controller\Varien\Action'), + array('getFlag', '\Magento\Core\Controller\Varien\Action', '\Magento\App\ActionFlag::get'), + array('setFlag', '\Magento\Core\Controller\Varien\Action', '\Magento\App\ActionFlag::set'), + array('loadLayout', '\Magento\Core\Controller\Varien\Action', '\Magento\App\ViewInterface::'), + array('addPageLayoutHandles', '\Magento\Core\Controller\Varien\Action', '\Magento\App\ViewInterface::loadLayout'), + array('getDefaultLayoutHandle', '\Magento\Core\Controller\Varien\Action', + '\Magento\App\ViewInterface::getDefaultLayoutHandle' + ), + array('generateLayoutXml', '\Magento\Core\Controller\Varien\Action', + '\Magento\App\ViewInterface::generateLayoutXml' + ), + array('renderLayout', '\Magento\Core\Controller\Varien\Action', '\Magento\App\ViewInterface::renderLayout'), + array('getLayout', '\Magento\Core\Controller\Varien\Action', '\Magento\App\ViewInterface::getLayout'), + array('loadLayoutUpdates', '\Magento\Core\Controller\Varien\Action', + '\Magento\App\ViewInterface::loadLayoutUpdates' + ), + array('generateLayoutBlocks', '\Magento\Core\Controller\Varien\Action', + '\Magento\App\ViewInterface::generateLayoutBlocks' + ), + array('addActionLayoutHandles', '\Magento\Core\Controller\Varien\Action', + '\Magento\App\ViewInterface::addActionLayoutHandles' + ), + array('getTranslator', '\Magento\App\Helper\Context'), + array('getTranslator', '\Magento\Core\Helper\Data'), + array('_loadCache', '\Magento\App\Helper\AbstractHelper'), + array('_saveCache', '\Magento\App\Helper\AbstractHelper'), + array('_removeCache', '\Magento\App\Helper\AbstractHelper'), + array('_cleanCache', '\Magento\App\Helper\AbstractHelper'), ); diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_properties.php b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_properties.php index 5ec57ca9d261b069a8f1d5009a586931da863c34..f9904b14edb75d6b394fed48ae07008328490943 100644 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_properties.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_properties.php @@ -49,7 +49,7 @@ return array( array('_currency', 'Magento\GoogleCheckout\Model\Api\Xml\Checkout'), array('_currencyNameTable'), array('_customEtcDir', 'Magento\Core\Model\Config'), - array('_defaultTemplates', 'Magento\Core\Model\Email\Template'), + array('_defaultTemplates', 'Magento\Email\Model\Template'), array('_designProductSettingsApplied'), array('_directOutput', 'Magento\Core\Model\Layout'), array('_dirs', 'Magento\App\Resource'), @@ -87,9 +87,9 @@ return array( array('_skipFieldsByModel'), array('_ship_id'), array('_shipTable', 'Magento\Shipping\Model\Resource\Carrier\Tablerate\Collection'), - array('_showTemplateHints', 'Magento\Core\Block\Template', + array('_showTemplateHints', 'Magento\View\Block\Template', 'Magento\Core\Model\TemplateEngine\Plugin\DebugHints'), - array('_showTemplateHintsBlocks', 'Magento\Core\Block\Template', + array('_showTemplateHintsBlocks', 'Magento\View\Block\Template', 'Magento\Core\Model\TemplateEngine\Plugin\DebugHints'), array('_sortedChildren'), array('_sortInstructions'), @@ -97,26 +97,34 @@ return array( array('_substServerVars'), array('_track_id'), array('_varSubFolders', null, 'Magento\App\Dir'), - array('_viewDir', 'Magento\Core\Block\Template', '_dirs'), + array('_viewDir', 'Magento\View\Block\Template', '_dirs'), array('decoratedIsFirst', null, 'getDecoratedIsFirst'), array('decoratedIsEven', null, 'getDecoratedIsEven'), array('decoratedIsOdd', null, 'getDecoratedIsOdd'), array('decoratedIsLast', null, 'getDecoratedIsLast'), - array('static', 'Magento\Core\Model\Email\Template\Filter'), + array('static', 'Magento\Email\Model\Template\Filter'), array('_useAnalyticFunction'), array('_defaultIndexer', 'Magento\CatalogInventory\Model\Resource\Indexer\Stock'), array('_engine', 'Magento\CatalogSearch\Model\Resource\Fulltext'), array('_allowedAreas', 'Magento\Core\Model\Config'), array('_app', 'Magento\Core\Block\AbstractBlock'), - array('_app', 'Magento\Core\Block\Template'), + array('_app', 'Magento\View\Block\Template'), array('_config', 'Magento\Backend\Helper\Data'), array('_defaultAreaFrontName', 'Magento\Backend\Helper\Data'), array('_areaFrontName', 'Magento\Backend\Helper\Data'), array('_backendFrontName', 'Magento\Backend\Helper\Data'), array('_app', 'Magento\Backend\Block\Widget\Grid\Column\Renderer\Currency'), - array('_enginePool', '\Magento\Core\Block\Template\Context', '_engineFactory'), + array('_enginePool', '\Magento\View\Block\Template\Context', '_engineFactory'), array('_allowedFormats', '\Magento\Core\Helper\Data', '\Magento\Core\Model\Locale'), array('types', '\Magento\Core\Model\Theme'), array('_collectionFactory', '\Magento\Install\Controller\Action', 'themeProvider'), array('_collectionFactory', '\Magento\Theme\Model\Config\Customization', 'themeProvider'), + array('_message', 'Magento\Checkout\Model\Cart', 'messageFactory'), + array('_message', 'Magento\Core\Model\Session\AbstractSession', 'messageFactory'), + array('_messageFactory', 'Magento\Core\Model\Session\AbstractSession', 'messagesFactory'), + array('_message', 'Magento\Core\Model\Session\Context', 'messageFactory'), + array('_messageFactory', 'Magento\Core\Model\Session\Context', 'messagesFactory'), + array('_sessionQuote', 'Magento\Sales\Block\Adminhtml\Order\Create\Messages', 'sessionQuote'), + array('_coreRegistry', 'Magento\Sales\Block\Adminhtml\Order\View\Messages', 'coreRegistry'), + array('_message', 'Magento\Sales\Model\Quote', 'messageFactory'), ); diff --git a/dev/tests/static/testsuite/Magento/Test/Php/_files/blacklist/common.txt b/dev/tests/static/testsuite/Magento/Test/Php/_files/blacklist/common.txt index 48008e71d27887d3dc0165519f85faadca0cca22..9be1da2d8625c2c30fbaaddf38e65186be9dc6c9 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/_files/blacklist/common.txt +++ b/dev/tests/static/testsuite/Magento/Test/Php/_files/blacklist/common.txt @@ -9,6 +9,7 @@ app/code/Magento/Backend/Block/Widget/Grid app/code/Magento/Backend/view app/code/Magento/Core/Model/Config/Element.php app/code/Magento/DesignEditor/view +app/code/Magento/Email/view app/code/Magento/Theme/view app/code/Magento/User/view app/code/Magento/Webapi/view diff --git a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcpd/blacklist/common.txt b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcpd/blacklist/common.txt index 527a291185fe59bbc0ea9fde2b74b65c84b7ab67..b5112146f16700b9b3fbe7046a8ff77068fe6186 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcpd/blacklist/common.txt +++ b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcpd/blacklist/common.txt @@ -77,6 +77,7 @@ Magento/Shipping/Model/Carrier Magento/CatalogRule/Model Magento/Tax/Block/Checkout Magento/Tax/Model/Sales/Pdf +Magento/Tax/Model/Config/Price Magento/Usa/Model/Shipping/Carrier Magento/Webapi/Model Magento/Webhook/Model diff --git a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpmd/ruleset.xml b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpmd/ruleset.xml index 549695ed7c4846701324e9125ae1f3a387018f33..302cc31a5658baeb327e4f5aa5c43414c073428c 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpmd/ruleset.xml +++ b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpmd/ruleset.xml @@ -37,12 +37,7 @@ <rule ref="rulesets/codesize.xml/ExcessiveMethodLength" /> <rule ref="rulesets/codesize.xml/ExcessiveParameterList" /> <rule ref="rulesets/codesize.xml/ExcessivePublicCount" /> - <rule ref="rulesets/codesize.xml/TooManyFields" /> - <rule ref="rulesets/codesize.xml/TooManyMethods"> - <properties> - <property name="maxmethods" value="50" /> - </properties> - </rule> + <rule ref="rulesets/codesize.xml/TooManyFields" /> <rule ref="rulesets/codesize.xml/ExcessiveClassComplexity"> <properties> <property name="maximum" value="100" /> @@ -56,7 +51,6 @@ <rule ref="rulesets/design.xml" /> <!-- Naming Rules --> - <rule ref="rulesets/naming.xml/ShortVariable" /> <rule ref="rulesets/naming.xml/ShortMethodName" /> <rule ref="rulesets/naming.xml/ConstructorWithNameAsEnclosingClass" /> <rule ref="rulesets/naming.xml/ConstantNamingConventions" /> diff --git a/dev/tests/static/testsuite/Magento/Test/Php/_files/whitelist/common.txt b/dev/tests/static/testsuite/Magento/Test/Php/_files/whitelist/common.txt index 220d9dfec78939457023e4491abc1f131c435d02..5a9165dfe78a4eaeb2145cd2e319befeb87bf5ae 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/_files/whitelist/common.txt +++ b/dev/tests/static/testsuite/Magento/Test/Php/_files/whitelist/common.txt @@ -44,8 +44,6 @@ app/code/Magento/Core/data app/code/Magento/Core/Model/Config app/code/Magento/Core/Model/DataService app/code/Magento/Core/Model/Design.php -app/code/Magento/Core/Model/Email/Template/Config -app/code/Magento/Core/Model/Email/Template/Config.php app/code/Magento/Core/Model/Layout/Factory.php app/code/Magento/Core/Model/Layout/Update.php app/code/Magento/Core/Model/Layout/Argument @@ -55,14 +53,12 @@ app/code/Magento/Core/Model/Page app/code/Magento/Core/Model/Page.php app/code/Magento/Core/Model/Resource/Theme app/code/Magento/Core/Model/Resource/Theme.php -app/code/Magento/Core/Model/Sender.php app/code/Magento/Core/Model/Session/Validator.php app/code/Magento/Core/Model/AbstractShell.php app/code/Magento/Core/Model/Theme app/code/Magento/Core/Model/Theme.php app/code/Magento/Core/Model/Url/SecurityInfo.php app/code/Magento/Core/Model/Url/SecurityInfoInterface.php -app/code/Magento/Core/Helper/AbstractHelper.php app/code/Magento/Core/sql/core_setup/upgrade-1.6.0.3-1.6.0.4.php app/code/Magento/Cron/Model/Config/Converter app/code/Magento/Cron/Model/Config/Reader @@ -83,6 +79,7 @@ app/code/Magento/GoogleShopping/Block/SiteVerification.php app/code/Magento/GoogleShopping/Model/AttributeFactory.php app/code/Magento/Eav/Model/Entity/Attribute/Config app/code/Magento/Eav/Model/Entity/Attribute/Config.php +app/code/Magento/Email app/code/Magento/ImportExport/Model/Import/Entity/CustomerComposite.php app/code/Magento/ImportExport/Model/Export/Config app/code/Magento/ImportExport/Model/Export/Config.php diff --git a/dev/tests/unit/framework/Magento/Test/Block/Adminhtml.php b/dev/tests/unit/framework/Magento/Test/Block/Adminhtml.php index c543c0b9ed37fa395abcc772b37d8728f544004d..b0c480d47a7ceecab6baff6a2a944efe0f78ca63 100644 --- a/dev/tests/unit/framework/Magento/Test/Block/Adminhtml.php +++ b/dev/tests/unit/framework/Magento/Test/Block/Adminhtml.php @@ -101,7 +101,7 @@ class Adminhtml extends \PHPUnit_Framework_TestCase $this->_translatorMock = $this->_makeMock('Magento\Core\Model\Translate'); $this->_layoutMock = $this->_makeMock('Magento\Core\Model\Layout'); $this->_requestMock = $this->_makeMock('Magento\App\RequestInterface'); - $this->_messagesMock = $this->_makeMock('Magento\Core\Block\Messages'); + $this->_messagesMock = $this->_makeMock('Magento\View\Block\Messages'); $this->_urlMock = $this->_makeMock('Magento\UrlInterface'); $this->_eventManagerMock = $this->_makeMock('Magento\Event\ManagerInterface'); $this->_controllerMock = $this->_makeMock('Magento\App\FrontController'); @@ -111,11 +111,11 @@ class Adminhtml extends \PHPUnit_Framework_TestCase $this->_cacheMock = $this->_makeMock('Magento\App\CacheInterface'); $this->_storeConfigMock = $this->_makeMock('Magento\Core\Model\Store\Config'); $this->_storeManagerMock = $this->_makeMock('Magento\Core\Model\StoreManager'); - $this->_helperFactoryMock = $this->_makeMock('Magento\Core\Model\Factory\Helper'); + $this->_helperFactoryMock = $this->_makeMock('Magento\App\Helper\HelperFactory'); $viewUrlMock = $this->_makeMock('Magento\View\Url'); $viewConfigMock = $this->_makeMock('Magento\View\ConfigInterface'); $viewFileSystemMock = $this->_makeMock('Magento\View\FileSystem'); - $templateFactoryMock = $this->_makeMock('Magento\View\TemplateEngineFactory'); + $templatePoolMock = $this->_makeMock('Magento\View\TemplateEnginePool'); $authorizationMock = $this->_makeMock('Magento\AuthorizationInterface'); $cacheStateMock = $this->_makeMock('Magento\App\Cache\StateInterface'); $appMock = $this->_makeMock('Magento\Core\Model\App'); @@ -134,7 +134,6 @@ class Adminhtml extends \PHPUnit_Framework_TestCase ->will($this->returnCallback(array($this, 'translateCallback'))); $this->_context = new \Magento\Backend\Block\Template\Context( - $this->_storeManagerMock, $this->_requestMock, $this->_layoutMock, $this->_eventManagerMock, @@ -153,14 +152,15 @@ class Adminhtml extends \PHPUnit_Framework_TestCase $this->_loggerMock, $this->_filesystemMock, $viewFileSystemMock, - $templateFactoryMock, - $authorizationMock, + $templatePoolMock, $appMock, $appState, $escaperMock, $filterManagerMock, - $backendSessionMock, $this->_localeMock, + $this->_storeManagerMock, + $authorizationMock, + $backendSessionMock, $this->_mathMock ); } diff --git a/dev/tests/unit/framework/tests/unit/testsuite/Magento/TestFramework/Helper/ObjectManagerTest.php b/dev/tests/unit/framework/tests/unit/testsuite/Magento/TestFramework/Helper/ObjectManagerTest.php index ea326c7cd0e6fcd509819ca78c50cd73e3f5315c..cea8eeb8a3ffca4b61d6e53ed930ed82bd69f2ce 100644 --- a/dev/tests/unit/framework/tests/unit/testsuite/Magento/TestFramework/Helper/ObjectManagerTest.php +++ b/dev/tests/unit/framework/tests/unit/testsuite/Magento/TestFramework/Helper/ObjectManagerTest.php @@ -38,7 +38,7 @@ class ObjectManagerTest extends \PHPUnit_Framework_TestCase 'request' => 'Magento\App\RequestInterface', 'layout' => 'Magento\View\LayoutInterface', 'eventManager' => 'Magento\Event\ManagerInterface', - 'translator' => 'Magento\Core\Model\Translate', + 'translator' => 'Magento\TranslateInterface', 'cache' => 'Magento\App\CacheInterface', 'design' => 'Magento\View\DesignInterface', 'session' => 'Magento\Core\Model\Session', @@ -52,7 +52,7 @@ class ObjectManagerTest extends \PHPUnit_Framework_TestCase * @var array */ protected $_modelDependencies = array( - 'eventDispatcher' => 'Magento\Event\ManagerInterface', + 'eventManager' => 'Magento\Event\ManagerInterface', 'cacheManager' => 'Magento\App\CacheInterface', 'resource' => 'Magento\Core\Model\Resource\AbstractResource', 'resourceCollection' => 'Magento\Data\Collection\Db' @@ -64,9 +64,9 @@ class ObjectManagerTest extends \PHPUnit_Framework_TestCase public function testGetBlock() { $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); - /** @var $template \Magento\Core\Block\Template */ - $template = $objectManager->getObject('Magento\Core\Block\Template'); - $this->assertInstanceOf('Magento\Core\Block\Template', $template); + /** @var $template \Magento\View\Block\Template */ + $template = $objectManager->getObject('Magento\View\Block\Template'); + $this->assertInstanceOf('Magento\View\Block\Template', $template); foreach ($this->_blockDependencies as $propertyName => $propertyType) { $this->assertAttributeInstanceOf($propertyType, '_' . $propertyName, $template); } @@ -76,13 +76,13 @@ class ObjectManagerTest extends \PHPUnit_Framework_TestCase $appStateMock = $this->getMock('Magento\App\State', array('getAreaCode'), array(), '', false); $appStateMock->expects($this->once())->method('getAreaCode')->will($this->returnValue($area)); - $context = $objectManager->getObject('Magento\Core\Block\Template\Context'); - $appStateProperty = new \ReflectionProperty('Magento\Core\Block\Template\Context', '_appState'); + $context = $objectManager->getObject('Magento\View\Block\Template\Context'); + $appStateProperty = new \ReflectionProperty('Magento\View\Block\Template\Context', '_appState'); $appStateProperty->setAccessible(true); $appStateProperty->setValue($context, $appStateMock); - /** @var $template \Magento\Core\Block\Template */ - $template = $objectManager->getObject('Magento\Core\Block\Template', array('context' => $context)); + /** @var $template \Magento\View\Block\Template */ + $template = $objectManager->getObject('Magento\View\Block\Template', array('context' => $context)); $this->assertEquals($area, $template->getArea()); } diff --git a/dev/tests/unit/testsuite/Magento/Adminhtml/Controller/CacheTest.php b/dev/tests/unit/testsuite/Magento/Adminhtml/Controller/CacheTest.php index 42e75dd3d7c3ff7e4bc6d23f2052757c9b71a1c2..abbc61af1f70ffb671e1d77e6cd36f6d62f8d479 100644 --- a/dev/tests/unit/testsuite/Magento/Adminhtml/Controller/CacheTest.php +++ b/dev/tests/unit/testsuite/Magento/Adminhtml/Controller/CacheTest.php @@ -29,50 +29,18 @@ class CacheTest extends \PHPUnit_Framework_TestCase public function testCleanMediaAction() { // Wire object with mocks - $context = $this->getMock('Magento\Backend\Controller\Context', array(), array(), '', false); - - $request = $this->getMock('Magento\App\RequestInterface', array(), array(), '', false); - $context->expects($this->any()) - ->method('getRequest') - ->will($this->returnValue($request)); - $response = $this->getMock('Magento\App\Response\Http', array(), array(), '', false); - $context->expects($this->any()) - ->method('getResponse') - ->will($this->returnValue($response)); - $objectManager = $this->getMock('Magento\ObjectManager'); - $context->expects($this->any()) - ->method('getObjectManager') - ->will($this->returnValue($objectManager)); - - $frontController = $this->getMock('Magento\App\FrontController', array(), array(), '', false); - $context->expects($this->any()) - ->method('getFrontController') - ->will($this->returnValue($frontController)); - $eventManager = $this->getMock('Magento\Event\ManagerInterface', array(), array(), '', false); - $eventManager->expects($this->once()) - ->method('dispatch') - ->with('clean_media_cache_after'); - $context->expects($this->any()) - ->method('getEventManager') - ->will($this->returnValue($eventManager)); - $backendHelper = $this->getMock('Magento\Backend\Helper\Data', array(), array(), '', false); - $context->expects($this->any()) - ->method('getHelper') - ->will($this->returnValue($backendHelper)); - - $cacheTypeListMock = $this->getMock('Magento\App\Cache\TypeListInterface'); - $cacheStateMock = $this->getMock('Magento\App\Cache\StateInterface'); - $cacheFrontendPool = $this->getMock('Magento\App\Cache\Frontend\Pool', array(), array(), '', false); - - $controller = new \Magento\Backend\Controller\Adminhtml\Cache( - $context, - $cacheTypeListMock, - $cacheStateMock, - $cacheFrontendPool + $session = $this->getMock('Magento\Adminhtml\Model\Session', array('addSuccess'), array(), '', false); + $helper = new \Magento\TestFramework\Helper\ObjectManager($this); + $controller = $helper->getObject('Magento\Backend\Controller\Adminhtml\Cache', array( + 'objectManager' => $objectManager, + 'response' => $response, + 'helper' => $backendHelper, + 'eventManager' => $eventManager + ) ); // Setup expectations @@ -80,7 +48,6 @@ class CacheTest extends \PHPUnit_Framework_TestCase $mergeService->expects($this->once()) ->method('cleanMergedJsCss'); - $session = $this->getMock('Magento\Adminhtml\Model\Session', array(), array(), '', false); $session->expects($this->once()) ->method('addSuccess') ->with('The JavaScript/CSS cache has been cleaned.'); @@ -101,12 +68,6 @@ class CacheTest extends \PHPUnit_Framework_TestCase $response->expects($this->once()) ->method('setRedirect') ->with('redirect_url'); - - $response->expects($this->once()) - ->method('getHeader') - ->with('X-Frame-Options') - ->will($this->returnValue(false)); - // Run $controller->cleanMediaAction(); } diff --git a/dev/tests/unit/testsuite/Magento/Adminhtml/DashboardTest.php b/dev/tests/unit/testsuite/Magento/Adminhtml/DashboardTest.php index 5dfb0e594519c0ec85549c1e5657bab953833d37..94b45cfe92e0c3cb972dd736972e0bf9c81f2c59 100644 --- a/dev/tests/unit/testsuite/Magento/Adminhtml/DashboardTest.php +++ b/dev/tests/unit/testsuite/Magento/Adminhtml/DashboardTest.php @@ -180,7 +180,7 @@ class DashboardTest extends \PHPUnit_Framework_TestCase 'objectManager' => $objectManager, 'frontController' => $varienFront, ); - $context = $helper->getObject('Magento\Backend\Controller\Context', $arguments); + $context = $helper->getObject('Magento\Backend\App\Action\Context', $arguments); return new \Magento\Backend\Controller\Adminhtml\Dashboard($context); } } diff --git a/dev/tests/unit/testsuite/Magento/App/Action/ForwardTest.php b/dev/tests/unit/testsuite/Magento/App/Action/ForwardTest.php index 22819d8ad4dbc5b6e722dbed3763bfd35ef2ead5..4a44073e8b325bc63e5f6768b1e2e4bb78bf5197 100644 --- a/dev/tests/unit/testsuite/Magento/App/Action/ForwardTest.php +++ b/dev/tests/unit/testsuite/Magento/App/Action/ForwardTest.php @@ -28,7 +28,7 @@ class ForwardTest extends \PHPUnit_Framework_TestCase /** * @var \Magento\App\Action\Forward */ - protected $_model; + protected $_actionAbstract; /** * @var \Magento\App\RequestInterface @@ -44,12 +44,55 @@ class ForwardTest extends \PHPUnit_Framework_TestCase { $this->_request = $this->getMock('Magento\App\Request\Http', array(), array(), '', false ); $this->_response = $this->getMock('\Magento\App\Response\Http'); - $this->_model = new \Magento\App\Action\Forward($this->_request, $this->_response); + + $this->_actionAbstract = new \Magento\App\Action\Forward( + $this->_request, + $this->_response); } public function testDispatch() { $this->_request->expects($this->once())->method('setDispatched')->with(false); - $this->_model->dispatch('actions'); + $this->_actionAbstract->dispatch($this->_request); + } + + /** + * Test for getRequest method + * + * @test + * @covers \Magento\App\Action\AbstractAction::getRequest + */ + public function testGetRequest() + { + $this->assertEquals($this->_request, $this->_actionAbstract->getRequest()); + } + + /** + * Test for getResponse method + * + * @test + * @covers \Magento\App\Action\AbstractAction::getResponse + */ + public function testGetResponse() + { + $this->assertEquals($this->_response, $this->_actionAbstract->getResponse()); + } + + /** + * Test for getResponse med. Checks that response headers are set correctly + * + * @test + * @covers \Magento\App\Action\AbstractAction::getResponse + */ + public function testResponseHeaders() + { + $infoProcessorMock = $this->getMock('Magento\App\Request\PathInfoProcessorInterface'); + $routerListMock = $this->getMock('Magento\App\Route\ConfigInterface'); + $request = new \Magento\App\Request\Http($routerListMock, $infoProcessorMock); + $response = new \Magento\App\Response\Http(); + $response->headersSentThrowsException = false; + $action = new \Magento\App\Action\Forward($request, $response); + + $this->assertEquals(array(), $action->getResponse()->getHeaders()); } } \ No newline at end of file diff --git a/dev/tests/unit/testsuite/Magento/App/Action/TitleTest.php b/dev/tests/unit/testsuite/Magento/App/Action/TitleTest.php new file mode 100644 index 0000000000000000000000000000000000000000..d3f2702a161381d03f64896dba19d0b8c6ebb481 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/App/Action/TitleTest.php @@ -0,0 +1,60 @@ +<?php +/** + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\App\Action; + +class TitleTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\App\Action\Title + */ + protected $_model; + + protected function setUp() + { + $this->_model = new \Magento\App\Action\Title(); + } + + public function testAddPrependFalse() + { + $this->_model->add('First Title'); + $this->_model->add('Second Title'); + $actual = $this->_model->get(); + $expected = array('First Title', 'Second Title'); + + $this->assertEquals($expected, $actual); + } + + public function testAddPrependTrue() + { + $this->_model->add('First Title'); + $this->_model->add('Second Title', true); + $actual = $this->_model->get(); + $expected = array('Second Title', 'First Title'); + + $this->assertEquals($expected, $actual); + } + +} diff --git a/dev/tests/unit/testsuite/Magento/App/ActionFlagTest.php b/dev/tests/unit/testsuite/Magento/App/ActionFlagTest.php new file mode 100644 index 0000000000000000000000000000000000000000..fedf0cb1f2eb54752a02da8cfd151d87fb6b41ad --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/App/ActionFlagTest.php @@ -0,0 +1,89 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\App; + +class ActionFlagTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\App\ActionFlag + */ + protected $_actionFlag; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_requestMock; + + protected function setUp() + { + + $this->_requestMock = $this->getMock('Magento\App\Request\Http', array(), array(), '', false); + $this->_actionFlag = new \Magento\App\ActionFlag($this->_requestMock); + } + + public function testSetIfActionNotExist() + { + $this->_requestMock->expects($this->once())->method('getActionName')->will($this->returnValue('action_name')); + $this->_requestMock->expects($this->once())->method('getRequestedRouteName'); + $this->_requestMock->expects($this->once())->method('getRequestedControllerName'); + $this->_actionFlag->set('', 'flag', 'value'); + } + + public function testSetIfActionExist() + { + $this->_requestMock->expects($this->never())->method('getActionName'); + $this->_requestMock->expects($this->once())->method('getRequestedRouteName'); + $this->_requestMock->expects($this->once())->method('getRequestedControllerName'); + $this->_actionFlag->set('action', 'flag', 'value'); + } + + public function testGetIfFlagNotExist() + { + $this->_requestMock->expects($this->once())->method('getActionName')->will($this->returnValue('action_name')); + $this->_requestMock->expects($this->once())->method('getRequestedRouteName'); + $this->_requestMock->expects($this->once())->method('getRequestedControllerName'); + $this->assertEquals(array(), $this->_actionFlag->get('')); + } + + public function testGetIfFlagExist() + { + $this->_requestMock->expects($this->never())->method('getActionName'); + $this->_requestMock->expects($this->exactly(3)) + ->method('getRequestedRouteName')->will($this->returnValue('route')); + $this->_requestMock->expects($this->exactly(3)) + ->method('getRequestedControllerName')->will($this->returnValue('controller')); + $this->_actionFlag->set('action', 'flag', 'value'); + $this->assertEquals('value', $this->_actionFlag->get('action', 'flag')); + } + public function testGetIfFlagWithControllerKryNotExist() + { + $this->_requestMock->expects($this->never())->method('getActionName'); + $this->_requestMock->expects($this->once()) + ->method('getRequestedRouteName')->will($this->returnValue('route')); + $this->_requestMock->expects($this->once()) + ->method('getRequestedControllerName')->will($this->returnValue('controller')); + $this->assertEquals(false, $this->_actionFlag->get('action', 'flag')); + } +} \ No newline at end of file diff --git a/dev/tests/unit/testsuite/Magento/App/Error/HandlerTest.php b/dev/tests/unit/testsuite/Magento/App/Error/HandlerTest.php index beee931fd0cd4b2b495fce56c71f306df372a3ae..309e7846d9091083d9c4d63043eb12fc21616159 100644 --- a/dev/tests/unit/testsuite/Magento/App/Error/HandlerTest.php +++ b/dev/tests/unit/testsuite/Magento/App/Error/HandlerTest.php @@ -50,7 +50,6 @@ class HandlerTest extends \PHPUnit_Framework_TestCase } /** - * @covers \Magento\Error\Handler::__construct * @covers \Magento\Error\Handler::processException */ public function testProcessExceptionPrint() @@ -68,7 +67,6 @@ class HandlerTest extends \PHPUnit_Framework_TestCase } /** - * @covers \Magento\Error\Handler::__construct * @covers \Magento\Error\Handler::processException */ public function testProcessExceptionReport() @@ -86,7 +84,6 @@ class HandlerTest extends \PHPUnit_Framework_TestCase } /** - * @covers \Magento\Error\Handler::__construct * @covers \Magento\Error\Handler::handler * @throws \Exception */ @@ -109,7 +106,6 @@ class HandlerTest extends \PHPUnit_Framework_TestCase } /** - * @covers \Magento\Error\Handler::__construct * @covers \Magento\Error\Handler::handler * @expectedException \Exception * @throws \Exception diff --git a/dev/tests/unit/testsuite/Magento/App/FrontController/Plugin/ClickjackingTest.php b/dev/tests/unit/testsuite/Magento/App/FrontController/Plugin/ClickjackingTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5e7e8d7e1073a2fd4c46e4170e0915ad13556fe0 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/App/FrontController/Plugin/ClickjackingTest.php @@ -0,0 +1,74 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\App\FrontController\Plugin; + +class ClickjackingTest extends \PHPUnit_Framework_TestCase +{ + + /** + * @var \Magento\App\FrontController\Plugin\Clickjacking + */ + protected $_plugin; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_responseMock; + + + protected function setUp() + { + $this->_responseMock = $this->getMock('Magento\App\Response\Http', array(), array(), '', false); + $this->_plugin = new \Magento\App\FrontController\Plugin\Clickjacking(); + } + + public function testAfterDispatchIfHeaderExist() + { + $this->_responseMock + ->expects($this->once()) + ->method('getHeader') + ->with('X-Frame-Options') + ->will($this->returnValue(false)); + $this->_responseMock + ->expects($this->once()) + ->method('setHeader') + ->with('X-Frame-Options', 'SAMEORIGIN') + ->will($this->returnValue($this->_responseMock)); + $this->assertEquals($this->_responseMock, $this->_plugin->afterDispatch($this->_responseMock)); + } + + public function testAfterDispatchIfHeaderNotExist() + { + $this->_responseMock + ->expects($this->once()) + ->method('getHeader') + ->with('X-Frame-Options') + ->will($this->returnValue(true)); + $this->_responseMock + ->expects($this->never()) + ->method('setHeader'); + $this->assertEquals($this->_responseMock, $this->_plugin->afterDispatch($this->_responseMock)); + } +} \ No newline at end of file diff --git a/dev/tests/unit/testsuite/Magento/App/FrontControllerTest.php b/dev/tests/unit/testsuite/Magento/App/FrontControllerTest.php index f08a293fce9e045124401c39f85ebd8d0826f32d..930a238c6b83d3c6607a779f5e31950196ca9592 100644 --- a/dev/tests/unit/testsuite/Magento/App/FrontControllerTest.php +++ b/dev/tests/unit/testsuite/Magento/App/FrontControllerTest.php @@ -82,10 +82,9 @@ class FrontControllerTest extends \PHPUnit_Framework_TestCase $this->_request->expects($this->any())->method('isDispatched')->will($this->returnValue(false)); $this->_routerList->expects($this->atLeastOnce())->method('valid')->will($this->returnValue(true)); $this->_routerList->expects($this->atLeastOnce())->method('current')->will($this->returnValue($this->_router)); - $controllerInstance = $this->getMock('\Magento\App\ActionInterface'); + $controllerInstance = $this->getMock('Magento\App\ActionInterface'); $this->_router->expects($this->atLeastOnce())->method('match')->will($this->returnValue($controllerInstance)); - $this->_request->expects($this->atLeastOnce())->method('getActionName')->will($this->returnValue('testString')); - $controllerInstance->expects($this->atLeastOnce())->method('dispatch')->with('testString'); + $controllerInstance->expects($this->atLeastOnce())->method('dispatch')->with($this->_request); $this->_model->dispatch($this->_request); } } diff --git a/dev/tests/unit/testsuite/Magento/App/Request/HttpTest.php b/dev/tests/unit/testsuite/Magento/App/Request/HttpTest.php index 51699cbe10221130ad5aca3f2dcdc0167a43f0e6..cc567ec923934428d7ecefec2f37e41e6b3171df 100644 --- a/dev/tests/unit/testsuite/Magento/App/Request/HttpTest.php +++ b/dev/tests/unit/testsuite/Magento/App/Request/HttpTest.php @@ -24,6 +24,8 @@ */ namespace Magento\App\Request; +use Magento\App\Request\Http as Request; + class HttpTest extends \PHPUnit_Framework_TestCase { /** @@ -36,33 +38,40 @@ class HttpTest extends \PHPUnit_Framework_TestCase */ protected $_routerListMock; + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_infoProcessorMock; + protected function setUp() { $this->_routerListMock = $this->getMock('Magento\App\Route\ConfigInterface'); + $this->_infoProcessorMock = $this->getMock('Magento\App\Request\PathInfoProcessorInterface'); + $this->_infoProcessorMock->expects($this->any())->method('process')->will($this->returnArgument(1)); } public function testGetOriginalPathInfoWithTestUri() { - $this->_model = new \Magento\App\Request\Http($this->_routerListMock, 'http://test.com/value'); + $this->_model = new Request($this->_routerListMock, $this->_infoProcessorMock, 'http://test.com/value'); $this->assertEquals('/value', $this->_model->getOriginalPathInfo()); } public function testGetOriginalPathInfoWithEmptyUri() { - $this->_model = new \Magento\App\Request\Http($this->_routerListMock, null); + $this->_model = new Request($this->_routerListMock, $this->_infoProcessorMock, null); $this->assertEmpty($this->_model->getOriginalPathInfo()); } public function testSetPathInfoWithNullValue() { - $this->_model = new \Magento\App\Request\Http($this->_routerListMock, null); + $this->_model = new Request($this->_routerListMock, $this->_infoProcessorMock, null); $actual = $this->_model->setPathInfo(); $this->assertEquals($this->_model, $actual); } public function testSetPathInfoWithValue() { - $this->_model = new \Magento\App\Request\Http($this->_routerListMock, null); + $this->_model = new Request($this->_routerListMock, $this->_infoProcessorMock, null); $expected = 'testPathInfo'; $this->_model->setPathInfo($expected); $this->assertEquals($expected, $this->_model->getPathInfo()); @@ -70,7 +79,11 @@ class HttpTest extends \PHPUnit_Framework_TestCase public function testSetPathInfoWithQueryPart() { - $this->_model = new \Magento\App\Request\Http($this->_routerListMock, 'http://test.com/node?queryValue'); + $this->_model = new Request( + $this->_routerListMock, + $this->_infoProcessorMock, + 'http://test.com/node?queryValue' + ); $this->_model->setPathInfo(); $this->assertEquals('/node', $this->_model->getPathInfo()); } @@ -78,7 +91,7 @@ class HttpTest extends \PHPUnit_Framework_TestCase public function testRewritePathInfoWithNewValue() { $expected = '/other/path'; - $this->_model = new \Magento\App\Request\Http($this->_routerListMock, 'http://test.com/one/two'); + $this->_model = new Request($this->_routerListMock, $this->_infoProcessorMock, 'http://test.com/one/two'); $this->_model->rewritePathInfo($expected); $this->assertEquals($expected, $this->_model->getPathInfo()); } @@ -86,35 +99,37 @@ class HttpTest extends \PHPUnit_Framework_TestCase public function testRewritePathInfoWithSameValue() { $expected = '/one/two'; - $this->_model = new \Magento\App\Request\Http($this->_routerListMock, 'http://test.com' . $expected); + $this->_model = new Request($this->_routerListMock, $this->_infoProcessorMock, 'http://test.com' . $expected); $this->_model->rewritePathInfo($expected); $this->assertEquals($expected, $this->_model->getPathInfo()); } public function testGetBasePathWithPath() { - $this->_model = new \Magento\App\Request\Http($this->_routerListMock); + + $this->_model = new Request($this->_routerListMock, $this->_infoProcessorMock); $this->_model->setBasePath('http:\/test.com\one/two'); $this->assertEquals('http://test.com/one/two', $this->_model->getBasePath()); } public function testGetBasePathWithoutPath() { - $this->_model = new \Magento\App\Request\Http($this->_routerListMock); + $this->_model = new Request($this->_routerListMock, $this->_infoProcessorMock); $this->_model->setBasePath(); $this->assertEquals('/', $this->_model->getBasePath()); } public function testGetBaseUrlWithUrl() { - $this->_model = new \Magento\App\Request\Http($this->_routerListMock); + + $this->_model = new Request($this->_routerListMock, $this->_infoProcessorMock); $this->_model->setBaseUrl('http:\/test.com\one/two'); $this->assertEquals('http://test.com/one/two', $this->_model->getBaseUrl()); } public function testGetBaseUrlWithEmptyUrl() { - $this->_model = new \Magento\App\Request\Http($this->_routerListMock); + $this->_model = new Request($this->_routerListMock, $this->_infoProcessorMock); $this->_model->setBaseUrl(); $this->assertEmpty($this->_model->getBaseUrl()); } @@ -123,67 +138,67 @@ class HttpTest extends \PHPUnit_Framework_TestCase { $router = $this->getMock('\Magento\App\Router\AbstractRouter', array(), array(), '', false); $this->_routerListMock->expects($this->any())->method('getRouteFrontName')->will($this->returnValue($router)); - $this->_model = new \Magento\App\Request\Http($this->_routerListMock); + $this->_model = new Request($this->_routerListMock, $this->_infoProcessorMock); $this->_model->setRouteName('RouterName'); $this->assertEquals('RouterName', $this->_model->getRouteName()); } public function testSetRouteNameWithNullRouterValue() { - $this->_model = new \Magento\App\Request\Http($this->_routerListMock); + $this->_model = new Request($this->_routerListMock, $this->_infoProcessorMock); $this->_routerListMock->expects($this->once())->method('getRouteFrontName')->will($this->returnValue(null)); $this->_model->setRouteName('RouterName'); } public function testGetFrontName() { - $this->_model = new \Magento\App\Request\Http($this->_routerListMock, 'http://test.com/one/two'); + $this->_model = new Request($this->_routerListMock, $this->_infoProcessorMock, 'http://test.com/one/two'); $this->assertEquals('one', $this->_model->getFrontName()); } public function testGetAliasWhenAliasExists() { - $this->_model = new \Magento\App\Request\Http($this->_routerListMock); + $this->_model = new Request($this->_routerListMock, $this->_infoProcessorMock); $this->_model->setAlias('AliasName', 'AliasTarget'); $this->assertEquals('AliasTarget', $this->_model->getAlias('AliasName') ); } public function testGetAliasWhenAliasesIsNull() { - $this->_model = new \Magento\App\Request\Http($this->_routerListMock); + $this->_model = new Request($this->_routerListMock, $this->_infoProcessorMock); $this->assertNull($this->_model->getAlias('someValue')); } public function testGetAliasesWhenAliasSet() { - $this->_model = new \Magento\App\Request\Http($this->_routerListMock); + $this->_model = new Request($this->_routerListMock, $this->_infoProcessorMock); $this->_model->setAlias('AliasName', 'AliasTarget'); $this->assertEquals(array('AliasName' => 'AliasTarget'), $this->_model->getAliases()); } public function testGetAliasesWhenAliasAreEmpty() { - $this->_model = new \Magento\App\Request\Http($this->_routerListMock); + $this->_model = new Request($this->_routerListMock, $this->_infoProcessorMock); $this->assertEmpty($this->_model->getAliases()); } public function testGetRequestedRouteNameWhenRequestedRouteIsSet() { - $this->_model = new \Magento\App\Request\Http($this->_routerListMock); + $this->_model = new Request($this->_routerListMock, $this->_infoProcessorMock); $this->_model->setRoutingInfo(array('requested_route' => 'ExpectedValue')); $this->assertEquals('ExpectedValue', $this->_model->getRequestedRouteName()); } public function testGetRequestedRouteNameWithNullValueRouteName() { - $this->_model = new \Magento\App\Request\Http($this->_routerListMock); + $this->_model = new Request($this->_routerListMock, $this->_infoProcessorMock); $this->_model->setRouteName('RouteName'); $this->assertEquals('RouteName', $this->_model->getRequestedRouteName()); } public function testGetRequestedRouteNameWithRewritePathInfo() { - $this->_model = new \Magento\App\Request\Http($this->_routerListMock); + $this->_model = new Request($this->_routerListMock, $this->_infoProcessorMock); $expected = 'TestValue'; $this->_model->setPathInfo($expected); $this->_model->rewritePathInfo($expected . '/other'); @@ -194,7 +209,7 @@ class HttpTest extends \PHPUnit_Framework_TestCase public function testGetRequestedRouteNameWithoutRewritePathInfo() { - $this->_model = new \Magento\App\Request\Http($this->_routerListMock); + $this->_model = new Request($this->_routerListMock, $this->_infoProcessorMock); $expected = 'RouteName'; $this->_model->setRouteName($expected); $this->assertEquals($expected, $this->_model->getRequestedRouteName()); @@ -202,7 +217,7 @@ class HttpTest extends \PHPUnit_Framework_TestCase public function testGetRequestedControllerNameWithRequestedController() { - $this->_model = new \Magento\App\Request\Http($this->_routerListMock); + $this->_model = new Request($this->_routerListMock, $this->_infoProcessorMock); $expected = array('requested_controller' => 'ControllerName'); $this->_model->setRoutingInfo($expected); $test = $this->_model->getRequestedControllerName(); @@ -211,7 +226,7 @@ class HttpTest extends \PHPUnit_Framework_TestCase public function testGetRequestedControllerNameWithRewritePathInfo() { - $this->_model = new \Magento\App\Request\Http($this->_routerListMock); + $this->_model = new Request($this->_routerListMock, $this->_infoProcessorMock); $path = 'one/two/'; $this->_model->setPathInfo($path); $this->_model->rewritePathInfo($path. '/last'); @@ -220,14 +235,14 @@ class HttpTest extends \PHPUnit_Framework_TestCase public function testGetRequestedActionNameWithRoutingInfo() { - $this->_model = new \Magento\App\Request\Http($this->_routerListMock); + $this->_model = new Request($this->_routerListMock, $this->_infoProcessorMock); $this->_model->setRoutingInfo(array('requested_action' => 'ExpectedValue')); $this->assertEquals('ExpectedValue', $this->_model->getRequestedActionName()); } public function testGetRequestedActionNameWithRewritePathInfo() { - $this->_model = new \Magento\App\Request\Http($this->_routerListMock); + $this->_model = new Request($this->_routerListMock, $this->_infoProcessorMock); $path = 'one/two/three'; $this->_model->setPathInfo($path); $this->_model->rewritePathInfo($path. '/last'); @@ -236,13 +251,24 @@ class HttpTest extends \PHPUnit_Framework_TestCase public function testIsStraightWithTrueValue() { - $this->_model = new \Magento\App\Request\Http($this->_routerListMock); + $this->_model = new Request($this->_routerListMock, $this->_infoProcessorMock); $this->assertTrue($this->_model->isStraight(true)); } public function testIsStraightWithDefaultValue() { - $this->_model = new \Magento\App\Request\Http($this->_routerListMock); + $this->_model = new Request($this->_routerListMock, $this->_infoProcessorMock); $this->assertFalse($this->_model->isStraight()); } + + public function testGetFullActionName() + { + $this->_model = new Request($this->_routerListMock, $this->_infoProcessorMock); + /* empty request */ + $this->assertEquals('__', $this->_model->getFullActionName()); + $this->_model->setRouteName('test') + ->setControllerName('controller') + ->setActionName('action'); + $this->assertEquals('test/controller/action', $this->_model->getFullActionName('/')); + } } diff --git a/dev/tests/unit/testsuite/Magento/App/Response/Http/FileFactoryTest.php b/dev/tests/unit/testsuite/Magento/App/Response/Http/FileFactoryTest.php new file mode 100644 index 0000000000000000000000000000000000000000..4920e80b83f037b0a3a295b1e3f9a69301fcc5d8 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/App/Response/Http/FileFactoryTest.php @@ -0,0 +1,88 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +namespace Magento\App\Response\Http; + +class FileFactoryTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\App\Response\Http\FileFactory + */ + protected $_model; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_responseFactory; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_fileSystemMock; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_responseMock; + + protected function setUp() + { + $this->_responseFactory = $this->getMock('Magento\App\ResponseFactory', array(), array(), '', false); + $this->_fileSystemMock = $this->getMock('Magento\Filesystem', array(), array(), '', false); + $this->_responseMock = $this->getMock('Magento\App\Response\Http', array('setHeader'), array(), '', false); + $this->_responseFactory + ->expects($this->any()) + ->method('create') + ->will($this->returnValue($this->_responseMock)); + $this->_responseMock->expects($this->any())->method('setHeader') + ->will($this->returnValue($this->_responseMock)); + $this->_model = new \Magento\App\Response\Http\FileFactory( + $this->_responseFactory, + $this->_fileSystemMock + ); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testCreateIfContentDoesntHaveRequiredKeys() + { + $this->_model->create('fileName', array()); + } + + /** + * @expectedException \Exception + * @exceptedExceptionMessage File not found + */ + public function testCreateIfFileNotExist() + { + $file = 'some_file'; + $content = array( + 'type' => 'filename', + 'value' => $file + ); + $this->_fileSystemMock->expects($this->once())->method('getFileSize')->will($this->returnValue('string')); + $this->_fileSystemMock->expects($this->once())->method('isFile')->with($file)->will($this->returnValue(false)); + $this->_model->create('fileName', $content); + } +} \ No newline at end of file diff --git a/dev/tests/unit/testsuite/Magento/App/ViewTest.php b/dev/tests/unit/testsuite/Magento/App/ViewTest.php new file mode 100644 index 0000000000000000000000000000000000000000..d4383b73411d18adb97701fe8d652de11d3937c9 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/App/ViewTest.php @@ -0,0 +1,265 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\App; + +class ViewTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\Backend\Model\View + */ + protected $_view; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_layoutMock; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_configScopeMock; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_requestMock; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_layoutProcessor; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_actionFlagMock; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_eventManagerMock; + + protected function setUp() + { + $helper = new \Magento\TestFramework\Helper\ObjectManager($this); + $this->_layoutMock = $this->getMock('Magento\Core\Model\Layout', array(), array(), '', false); + $this->_requestMock = $this->getMock('Magento\App\Request\Http', array(), array(), '', false); + $this->_configScopeMock = $this->getMock('Magento\Config\ScopeInterface'); + $this->_layoutProcessor = $this->getMock('Magento\View\Layout\ProcessorInterface'); + $this->_layoutMock + ->expects($this->any()) + ->method('getUpdate') + ->will($this->returnValue($this->_layoutProcessor)); + $this->_actionFlagMock = $this->getMock('Magento\App\ActionFlag', array(), array(), '', false); + $this->_eventManagerMock = $this->getMock('Magento\Event\ManagerInterface'); + $this->_view = $helper->getObject('Magento\App\View', array( + 'layout' => $this->_layoutMock, + 'request' => $this->_requestMock, + 'response' => $this->getMock('Magento\App\Response\Http', array(), array(), '', false), + 'configScope' => $this->_configScopeMock, + 'eventManager' => $this->_eventManagerMock, + 'actionFlag' => $this->_actionFlagMock + + ) + ); + } + + public function testGetLayout() + { + $this->_configScopeMock + ->expects($this->once()) + ->method('getCurrentScope') + ->will($this->returnValue('areaCode')); + $this->_layoutMock->expects($this->once())->method('setArea')->with('areaCode'); + $this->assertEquals($this->_layoutMock, $this->_view->getLayout()); + } + + /** + * @expectedException \RuntimeException + * @exceptedExceptionMessage 'Layout must be loaded only once.' + */ + public function testLoadLayoutWhenLayoutAlreadyLoaded() + { + $this->_view->setIsLayoutLoaded(true); + $this->_view->loadLayout(); + } + + public function testLoadLayoutWithDefaultSetup() + { + + $this->_layoutProcessor->expects($this->at(0))->method('addHandle')->with('default'); + $this->_requestMock + ->expects($this->any()) + ->method('getFullActionName') + ->will($this->returnValue('action_name')); + $this->_layoutMock->expects($this->once())->method('generateXml')->will($this->returnValue($this->_layoutMock)); + $this->_layoutMock->expects($this->once()) + ->method('generateElements') + ->will($this->returnValue($this->_layoutMock)); + $this->_view->loadLayout(); + } + + public function testLoadLayoutWhenBlocksNotGenerated() + { + $this->_layoutMock->expects($this->once()) + ->method('generateXml'); + $this->_layoutMock->expects($this->never()) + ->method('generateElements'); + $this->_view->loadLayout('', false, true); + } + + public function testLoadLayoutWhenXmlNotGenerated() + { + $this->_layoutMock->expects($this->never()) + ->method('generateElements'); + $this->_layoutMock->expects($this->never()) + ->method('generateXml'); + $this->_view->loadLayout('', true, false); + } + + public function testGetDefaultLayoutHandle() + { + $this->_requestMock + ->expects($this->once()) + ->method('getFullActionName') + ->will($this->returnValue('ExpectedValue')); + $this->assertEquals('expectedvalue', $this->_view->getDefaultLayoutHandle()); + } + + public function testAddActionLayoutHandlesWhenPageLayoutHandlesNotExist() + { + $defaultHandles = 'full_action_name'; + $this->_requestMock + ->expects($this->exactly(2)) + ->method('getFullActionName') + ->will($this->returnValue('Full_Action_Name')); + $this->_layoutProcessor->expects($this->once()) + ->method('addPageHandles') + ->with(array($defaultHandles)) + ->will($this->returnValue(false)); + $this->_layoutProcessor->expects($this->once())->method('addHandle')->with($defaultHandles); + $this->_view->addActionLayoutHandles(); + } + + public function testAddActionLayoutHandlesWhenPageLayoutHandlesExist() + { + $this->_requestMock + ->expects($this->once()) + ->method('getFullActionName') + ->will($this->returnValue('Full_Action_Name')); + $this->_layoutProcessor->expects($this->once()) + ->method('addPageHandles') + ->with(array('full_action_name')) + ->will($this->returnValue(true)); + $this->_layoutProcessor->expects($this->never())->method('addHandle'); + $this->_view->addActionLayoutHandles(); + } + + public function testAddPageLayoutHandles() + { + $pageHandles = array('full_action_name', 'full_action_name_key_value'); + $this->_requestMock + ->expects($this->once()) + ->method('getFullActionName') + ->will($this->returnValue('Full_Action_Name')); + $this->_layoutProcessor->expects($this->once()) + ->method('addPageHandles') + ->with($pageHandles); + $this->_view->addPageLayoutHandles(array('key' => 'value')); + } + + public function testGenerateLayoutBlocksWhenFlagIsNotSet() + { + + $valueMap = array( + array('', \Magento\App\Action\Action::FLAG_NO_DISPATCH_BLOCK_EVENT, false), + array('', \Magento\App\Action\Action::FLAG_NO_DISPATCH_BLOCK_EVENT, false), + ); + $this->_actionFlagMock->expects($this->any()) + ->method('get') + ->will($this->returnValueMap($valueMap)); + + $eventArgument = array('full_action_name' => 'Full_Name', 'layout' => $this->_layoutMock); + $this->_requestMock + ->expects($this->exactly(2)) + ->method('getFullActionName') + ->will($this->returnValue('Full_Name')); + $this->_eventManagerMock->expects($this->at(0)) + ->method('dispatch') + ->with('controller_action_layout_generate_blocks_before', $eventArgument); + $this->_eventManagerMock + ->expects($this->at(1)) + ->method('dispatch') + ->with('controller_action_layout_generate_blocks_after', $eventArgument); + $this->_view->generateLayoutBlocks(); + } + + public function testGenerateLayoutBlocksWhenFlagIsSet() + { + + $valueMap = array( + array('', \Magento\App\Action\Action::FLAG_NO_DISPATCH_BLOCK_EVENT, true), + array('', \Magento\App\Action\Action::FLAG_NO_DISPATCH_BLOCK_EVENT, true), + ); + $this->_actionFlagMock->expects($this->any()) + ->method('get') + ->will($this->returnValueMap($valueMap)); + + $this->_eventManagerMock->expects($this->never())->method('dispatch'); + $this->_view->generateLayoutBlocks(); + } + + public function testRenderLayoutIfActionFlagExist() + { + $this->_actionFlagMock + ->expects($this->once()) + ->method('get') + ->with('', 'no-renderLayout')->will($this->returnValue(true)); + $this->_eventManagerMock->expects($this->never())->method('dispatch'); + $this->_view->renderLayout(); + } + + public function testRenderLayoutWhenOutputNotEmpty() + { + $this->_actionFlagMock + ->expects($this->once()) + ->method('get') + ->with('', 'no-renderLayout')->will($this->returnValue(false)); + $this->_layoutMock->expects($this->once())->method('addOutputElement')->with('output'); + $this->_layoutMock->expects($this->once())->method('getOutput'); + $this->_view->renderLayout('output'); + } + + public function testRenderLayoutWhenOutputEmpty() + { + $this->_actionFlagMock + ->expects($this->once()) + ->method('get') + ->with('', 'no-renderLayout')->will($this->returnValue(false)); + $this->_layoutMock->expects($this->never())->method('addOutputElement'); + $this->_layoutMock->expects($this->once())->method('getOutput'); + $this->_view->renderLayout(); + } +} \ No newline at end of file diff --git a/dev/tests/unit/testsuite/Magento/Backend/App/Action/Plugin/MassactionKeyTest.php b/dev/tests/unit/testsuite/Magento/Backend/App/Action/Plugin/MassactionKeyTest.php new file mode 100644 index 0000000000000000000000000000000000000000..3780741ba46c97fbc576becec2e6f52722348c57 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Backend/App/Action/Plugin/MassactionKeyTest.php @@ -0,0 +1,99 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +namespace Magento\Backend\App\Action\Plugin; + +class MassactionKeyTest extends \PHPUnit_Framework_TestCase +{ + + /** + * @var \Magento\Backend\App\Action\Plugin\MassactionKey + */ + protected $_plugin; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_invocationChainMock; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_requestMock; + + protected function setUp() + { + $this->_invocationChainMock = $this->getMock( + 'Magento\Code\Plugin\InvocationChain', array(), array(), '', false + ); + $this->_requestMock = $this->getMock('Magento\App\Request\Http', array(), array(), '', false); + $this->_plugin = new \Magento\Backend\App\Action\Plugin\MassactionKey(); + } + + /** + * @covers \Magento\Backend\App\Action\Plugin\MassactionKey::aroundDispatch + * + * @param $postData array|string + * @param array $convertedData + * @dataProvider aroundDispatchDataProvider + */ + public function testAroundDispatchWhenMassactionPrepareKeyRequestExists($postData, $convertedData) + { + + $this->_requestMock ->expects($this->at(0)) + ->method('getPost')->with('massaction_prepare_key')->will($this->returnValue('key')); + $this->_requestMock->expects($this->at(1))->method('getPost')->with('key')->will($this->returnValue($postData)); + $this->_requestMock->expects($this->once())->method('setPost')->with('key', $convertedData); + $this->_invocationChainMock->expects($this->once()) + ->method('proceed')->with(array($this->_requestMock))->will($this->returnValue('Expected')); + $this->assertEquals('Expected', + $this->_plugin->aroundDispatch(array($this->_requestMock), $this->_invocationChainMock)); + } + + public function aroundDispatchDataProvider() + { + return array( + 'post_data_is_array' => array( + array('key'), array('key') + ), + 'post_data_is_string' => array( + 'key, key_two', array('key', ' key_two') + ) + ); + } + + /** + * @covers \Magento\Backend\App\Action\Plugin\MassactionKey::aroundDispatch + */ + public function testAroundDispatchWhenMassactionPrepareKeyRequestNotExists() + { + + $this->_requestMock ->expects($this->once()) + ->method('getPost')->with('massaction_prepare_key')->will($this->returnValue(false)); + $this->_requestMock->expects($this->never())->method('setPost'); + $this->_invocationChainMock->expects($this->once()) + ->method('proceed')->with(array($this->_requestMock))->will($this->returnValue('Expected')); + $this->assertEquals('Expected', + $this->_plugin->aroundDispatch(array($this->_requestMock), $this->_invocationChainMock)); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Backend/App/Action/Plugin/StoreTest.php b/dev/tests/unit/testsuite/Magento/Backend/App/Action/Plugin/StoreTest.php new file mode 100644 index 0000000000000000000000000000000000000000..fc155abfa7709d69e17c594767e4228d47d9dfac --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Backend/App/Action/Plugin/StoreTest.php @@ -0,0 +1,39 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +namespace Magento\Backend\App\Action\Plugin; + +class StoreTest extends \PHPUnit_Framework_TestCase +{ + + public function testAroundDispatch() + { + $storeManagerMock = $this->getMock('Magento\Core\Model\StoreManagerInterface', array(), array(), '', false); + $invocationChainMock = $this->getMock('Magento\Code\Plugin\InvocationChain', array(), array(), '', false); + $plugin = new \Magento\Backend\App\Action\Plugin\Store($storeManagerMock); + $storeManagerMock->expects($this->once())->method('setCurrentStore')->with('admin'); + $invocationChainMock->expects($this->once())->method('proceed') + ->with(array())->will($this->returnValue('expected')); + $this->assertEquals('expected', $plugin->aroundDispatch(array(), $invocationChainMock)); + } +} \ No newline at end of file diff --git a/dev/tests/unit/testsuite/Magento/Backend/App/Response/Http/FileFactoryTest.php b/dev/tests/unit/testsuite/Magento/Backend/App/Response/Http/FileFactoryTest.php new file mode 100644 index 0000000000000000000000000000000000000000..1e8fac0b3a2f542872a594493a3aa3d0fa7ebf4d --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Backend/App/Response/Http/FileFactoryTest.php @@ -0,0 +1,95 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +namespace Magento\Backend\App\Response\Http; + +class FileFactoryTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\App\Response\Http\FileFactory + */ + protected $_model; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_responseFactory; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_authMock; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_backendUrl; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_sessionMock; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_responseMock; + + protected function setUp() + { + $helper = new \Magento\TestFramework\Helper\ObjectManager($this); + $this->_responseFactory = $this->getMock('Magento\App\ResponseFactory', array(), array(), '', false); + $this->_responseMock = $this->getMock('Magento\App\Response\Http', array('setRedirect'), array(), '', false); + $this->_responseFactory + ->expects($this->any()) + ->method('create') + ->will($this->returnValue($this->_responseMock)); + $this->_responseMock + ->expects($this->any()) + ->method('setRedirect') + ->will($this->returnValue($this->_responseMock)); + $this->_sessionMock = + $this->getMock('Magento\Backend\Model\Session', array('setIsUrlNotice'), array(), '', false); + $this->_backendUrl = $this->getMock('Magento\Backend\Model\Url', array(), array(), '', false); + $this->_authMock = $this->getMock('Magento\Backend\Model\Auth', array(), array(), '', false); + $this->_model = $helper->getObject('Magento\Backend\App\Response\Http\FileFactory', array( + 'responseFactory' => $this->_responseFactory, + 'auth' => $this->_authMock, + 'backendUrl' => $this->_backendUrl, + 'session' => $this->_sessionMock, + ) + ); + } + + public function testCreate() + { + $authStorageMock = $this->getMock( + 'Magento\Backend\Model\Auth\StorageInterface', + array('isFirstPageAfterLogin', 'processLogout', 'processLogin ') + ); + $this->_authMock->expects($this->once())->method('getAuthStorage')->will($this->returnValue($authStorageMock)); + $authStorageMock->expects($this->once())->method('isFirstPageAfterLogin')->will($this->returnValue(true)); + $this->_sessionMock->expects($this->once())->method('setIsUrlNotice'); + $this->_model->create('fileName', null); + } +} \ No newline at end of file diff --git a/dev/tests/unit/testsuite/Magento/Backend/Block/Store/SwitcherTest.php b/dev/tests/unit/testsuite/Magento/Backend/Block/Store/SwitcherTest.php index d9a02d174f598ee16caba4430ba934fed29f0735..71afffb99f9591463ec7e0f8104aec0a8470eb62 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Block/Store/SwitcherTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Block/Store/SwitcherTest.php @@ -37,49 +37,23 @@ class SwitcherTest extends \PHPUnit_Framework_TestCase /** * @var \PHPUnit_Framework_MockObject_MockObject */ - protected $_applicationMock; + protected $_storeManagerMock; /** * @var \PHPUnit_Framework_MockObject_MockObject */ protected $_websiteFactoryMock; - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $_storeGroupMock; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $_coreHelperMock; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $_contextMock; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $_storeFactoryMock; - protected function setUp() { - $this->_coreHelperMock = $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false); - $this->_contextMock = $this->getMock('Magento\Backend\Block\Template\Context', array(), array(), '', false); - $this->_applicationMock = $this->getMock('Magento\Core\Model\App', array(), array(), '', false); + $helper = new \Magento\TestFramework\Helper\ObjectManager($this); + $this->_storeManagerMock = $this->getMock('Magento\Core\Model\StoreManager', array(), array(), '', false); $this->_websiteFactoryMock = $this->getMock('Magento\Core\Model\Website\Factory', array(), array(), '', false); - $this->_storeGroupMock = $this->getMock('Magento\Core\Model\Store\Group\Factory', array(), array(), '', false); - $this->_storeFactoryMock = $this->getMock('Magento\Core\Model\StoreFactory', array(), array(), '', false); - - $this->_object = new \Magento\Backend\Block\Store\Switcher( - $this->_coreHelperMock, - $this->_contextMock, - $this->_applicationMock, - $this->_websiteFactoryMock, - $this->_storeGroupMock, - $this->_storeFactoryMock + + $this->_object = $helper->getObject('Magento\Backend\Block\Store\Switcher', array( + 'websiteFactory' => $this->_websiteFactoryMock, + 'storeManager' => $this->_storeManagerMock + ) ); } @@ -148,7 +122,7 @@ class SwitcherTest extends \PHPUnit_Framework_TestCase $this->_object->setWebsiteIds(null); $expected = array('test', 'data', 'some'); - $this->_applicationMock->expects($this->once())->method('getWebsites')->will($this->returnValue($expected)); + $this->_storeManagerMock->expects($this->once())->method('getWebsites')->will($this->returnValue($expected)); $this->assertEquals($expected, $this->_object->getWebsites()); } @@ -174,7 +148,7 @@ class SwitcherTest extends \PHPUnit_Framework_TestCase 3 => 'site 3', 5 => 'site 5', ); - $this->_applicationMock->expects($this->once())->method('getWebsites')->will($this->returnValue($webSites)); + $this->_storeManagerMock->expects($this->once())->method('getWebsites')->will($this->returnValue($webSites)); $this->assertEquals($expected, $this->_object->getWebsites()); } @@ -196,7 +170,7 @@ class SwitcherTest extends \PHPUnit_Framework_TestCase $this->_object->setWebsiteIds($ids); $expected = array(); - $this->_applicationMock->expects($this->once())->method('getWebsites')->will($this->returnValue($webSites)); + $this->_storeManagerMock->expects($this->once())->method('getWebsites')->will($this->returnValue($webSites)); $this->assertEquals($expected, $this->_object->getWebsites()); } diff --git a/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/Form/Field/ExportTest.php b/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/Form/Field/ExportTest.php index 4a67f14b30464809436ccf6218d7a116ac05e75c..e44201052f19df5570a05bb64c9ad1c5438cf09e 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/Form/Field/ExportTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/Form/Field/ExportTest.php @@ -41,7 +41,7 @@ class ExportTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_helperFactoryMock = $this->getMock('Magento\Core\Model\Factory\Helper', + $this->_helperFactoryMock = $this->getMock('Magento\App\Helper\HelperFactory', array(), array(), '', false, false ); diff --git a/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/Form/FieldTest.php b/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/Form/FieldTest.php index ac90c8fb8ea385b14514da25f4efd222dc96040a..7e1426bfddba3af23a2cad639fe945cad2c37939 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/Form/FieldTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/Form/FieldTest.php @@ -57,11 +57,9 @@ class FieldTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->_appModelMock = $this->getMock('Magento\Core\Model\App', array(), array(), '', false, false); - $this->_layoutMock = $this->getMock('Magento\Core\Model\Layout', array(), array(), '', false, false); $data = array( - 'layout' => $this->_layoutMock, - 'application' => $this->_appModelMock, + 'app' => $this->_appModelMock, 'urlBuilder' => $this->getMock('Magento\Backend\Model\Url', array(), array(), '', false) ); $helper = new \Magento\TestFramework\Helper\ObjectManager($this); diff --git a/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/Form/FieldsetTest.php b/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/Form/FieldsetTest.php index 07d631498b5631f3cffd591a11871e2801aa8801..c39c1b54b55c6c1b6de8e2cd33cd2d5c6ef95fe2 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/Form/FieldsetTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/Form/FieldsetTest.php @@ -65,7 +65,7 @@ class FieldsetTest extends \PHPUnit_Framework_TestCase protected $_testHelper; /** - * @var \Magento\Core\Model\Factory\Helper + * @var \Magento\App\Helper\HelperFactory */ protected $_helperFactoryMock; @@ -79,7 +79,7 @@ class FieldsetTest extends \PHPUnit_Framework_TestCase false); $groupMock->expects($this->once())->method('getFieldsetCss')->will($this->returnValue('test_fieldset_css')); $this->_helperFactoryMock = $this->getMock( - 'Magento\Core\Model\Factory\Helper', array('get'), array(), '', false, false + 'Magento\App\Helper\HelperFactory', array('get'), array(), '', false, false ); $data = array( diff --git a/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/TabsTest.php b/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/TabsTest.php index c60079900a0f97b05902272a0de23f4e9b1e4dd4..54465b9b58055be13c6a165b124d4b79d7de047e 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/TabsTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/TabsTest.php @@ -50,7 +50,7 @@ class TabsTest extends \PHPUnit_Framework_TestCase protected $_urlBuilderMock; /** - * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Core\Model\Factory\Helper + * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\App\Helper\HelperFactory */ protected $_helperFactoryMock; @@ -64,7 +64,7 @@ class TabsTest extends \PHPUnit_Framework_TestCase $this->_urlBuilderMock = $this->getMock('Magento\Backend\Model\Url', array(), array(), '', false); $this->_helperFactoryMock = $this->getMock( - 'Magento\Core\Model\Factory\Helper', array('get'), array(), '', false, false + 'Magento\App\Helper\HelperFactory', array('get'), array(), '', false, false ); $backendHelperMock = $this->getMock('Magento\Backend\Helper\Data', array(), array(), '', false); $this->_helperFactoryMock diff --git a/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/ButtonTest.php b/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/ButtonTest.php index c648d6b3f8038f23d212a2caa8ea5b58418dcf4c..fdd866eb34bc778b75f420af74a7139dbc308619 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/ButtonTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/ButtonTest.php @@ -53,7 +53,7 @@ class ButtonTest extends \PHPUnit_Framework_TestCase protected $_buttonMock; /** - * @var \Magento\Core\Model\Factory\Helper + * @var \Magento\App\Helper\HelperFactory */ protected $_helperFactoryMock; @@ -63,7 +63,7 @@ class ButtonTest extends \PHPUnit_Framework_TestCase $this->getMock('Magento\Core\Model\Layout', array(), array(), '', false, false); $this->_helperFactoryMock = $this->getMock( - 'Magento\Core\Model\Factory\Helper', array('get'), array(), '', false, false + 'Magento\App\Helper\HelperFactory', array('get'), array(), '', false, false ); $arguments = array( diff --git a/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/Column/Renderer/CurrencyTest.php b/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/Column/Renderer/CurrencyTest.php index bbc79400119dde942bed9aa8fee6ac43257164c4..6010cad08349b27a77724f88d44f8a317e8524ca 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/Column/Renderer/CurrencyTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/Column/Renderer/CurrencyTest.php @@ -34,11 +34,6 @@ class CurrencyTest extends \PHPUnit_Framework_TestCase */ protected $_blockCurrency; - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $_appMock; - /** * @var \PHPUnit_Framework_MockObject_MockObject */ @@ -59,11 +54,6 @@ class CurrencyTest extends \PHPUnit_Framework_TestCase */ protected $_storeManagerMock; - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $_contextMock; - /** * @var \PHPUnit_Framework_MockObject_MockObject */ @@ -76,9 +66,7 @@ class CurrencyTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_contextMock = $this->getMock('Magento\Backend\Block\Context', array(), array(), '', false); - $this->_appMock = $this->getMock('Magento\Core\Model\App', array(), array(), '', false); - $this->_storeManagerMock = $this->getMock('\Magento\Core\Model\StoreManagerInterface'); + $this->_storeManagerMock = $this->getMock('Magento\Core\Model\StoreManagerInterface'); $this->_localeMock = $this->getMock('Magento\Core\Model\LocaleInterface'); $this->_requestMock = $this->getMock('Magento\App\RequestInterface'); @@ -92,36 +80,29 @@ class CurrencyTest extends \PHPUnit_Framework_TestCase ->method('getIndex') ->will($this->returnValue('columnIndex')); - $this->_contextMock->expects($this->any()) - ->method('getApp') - ->will($this->returnValue($this->_appMock)); - - $this->_contextMock->expects($this->any()) - ->method('getRequest') - ->will($this->returnValue($this->_requestMock)); - $this->_row = new \Magento\Object(array('columnIndex' => '10')); - $this->_blockCurrency = new \Magento\Backend\Block\Widget\Grid\Column\Renderer\Currency( - $this->_contextMock, - $this->_storeManagerMock, - $this->_localeMock, - $this->_curLocatorMock + $helper = new \Magento\TestFramework\Helper\ObjectManager($this); + $this->_blockCurrency = $helper->getObject('Magento\Backend\Block\Widget\Grid\Column\Renderer\Currency', array( + 'storeManager' => $this->_storeManagerMock, + 'locale' => $this->_localeMock, + 'currencyLocator' => $this->_curLocatorMock, + 'request' => $this->_requestMock + ) ); + $this->_blockCurrency->setColumn($this->_columnMock); } protected function tearDown() { - unset($this->_appMock); unset($this->_localeMock); unset($this->_curLocatorMock); unset($this->_columnMock); unset($this->_row); unset($this->_storeManagerMock); unset($this->_requestMock); - unset($this->_contextMock); unset($this->_blockCurrency); } diff --git a/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/ColumnTest.php b/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/ColumnTest.php index 344ad0aeece2cd9711eae21cea36ff80d1ade578..5bbe040e9b4a5a867a5c859e614a0755b4337217 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/ColumnTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/ColumnTest.php @@ -50,7 +50,7 @@ class ColumnTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->_layoutMock = $this->getMock('Magento\Core\Model\Layout', array(), array(), '', false, false); - $this->_blockMock = $this->getMock('Magento\Core\Block\Template', array('setColumn', 'getHtml'), array(), '', + $this->_blockMock = $this->getMock('Magento\View\Block\Template', array('setColumn', 'getHtml'), array(), '', false, false ); diff --git a/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/MassactionTest.php b/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/MassactionTest.php index a48df45bf62b9be164d7b81a639c312df53b4eef..d02b8e2bdd6ba99355cd05a62088804116579b54 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/MassactionTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/MassactionTest.php @@ -68,7 +68,7 @@ class MassactionTest extends \PHPUnit_Framework_TestCase protected $_requestMock; /** - * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Core\Model\Factory\Helper + * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\App\Helper\HelperFactory */ protected $_helperFactoryMock; @@ -101,7 +101,7 @@ class MassactionTest extends \PHPUnit_Framework_TestCase $this->_urlModelMock = $this->getMock('Magento\Backend\Model\Url', array(), array(), '', false); $this->_helperFactoryMock = $this->getMock( - 'Magento\Core\Model\Factory\Helper', array('get'), array(), '', false, false + 'Magento\App\Helper\HelperFactory', array('get'), array(), '', false, false ); $this->_helperFactoryMock ->expects($this->any()) diff --git a/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/GridTest.php b/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/GridTest.php index 3bfe1e2654cce374472bea6be9915cccfff75a36..52d4ffe8bc005a8049bf342f74e1148690476598 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/GridTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/GridTest.php @@ -50,8 +50,6 @@ class GridTest extends \PHPUnit_Framework_TestCase */ public function testAddGetClearRss($isUseStoreInUrl) { - $helperMock = $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false); - $urlMock = $this->getMock('Magento\Core\Model\Url', array(), array(), '', false); $storeMock = $this->getMock('Magento\Core\Model\Store', array(), array(), '', false); @@ -70,23 +68,20 @@ class GridTest extends \PHPUnit_Framework_TestCase ->will($this->returnValue($storeMock)); $urlBuilderMock = $this->getMock('Magento\Backend\Model\Url', array(), array(), '', false); - $contextMock = $this->getMock('Magento\Backend\Block\Template\Context', array(), array(), '', false); - $contextMock->expects($this->any()) - ->method('getStoreManager') - ->will($this->returnValue($storeManagerMock)); - $contextMock->expects($this->any()) - ->method('getApp') - ->will($this->returnValue($appMock)); - $contextMock->expects($this->any()) - ->method('getUrlBuilder') - ->will($this->returnValue($urlBuilderMock)); $urlBuilderMock->expects($this->any()) ->method('getUrl') ->will($this->returnValue('some_url')); + $helper = new \Magento\TestFramework\Helper\ObjectManager($this); - $block = new \Magento\Backend\Block\Widget\Grid($helperMock, $contextMock, $storeManagerMock, $urlMock); + $block = $helper->getObject('Magento\Backend\Block\Widget\Grid', array( + 'app' => $appMock, + 'storeManager' => $storeManagerMock, + 'urlModel' => $urlMock, + 'urlBuilder' => $urlBuilderMock, + ) + ); $this->assertFalse($block->getRssLists()); diff --git a/dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/System/AccountTest.php b/dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/System/AccountTest.php index 89261dddbb047ffc368bce0fe9f167184929c412..21f2458898e58c9425a386a8e76daacda6aed97a 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/System/AccountTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/System/AccountTest.php @@ -114,14 +114,7 @@ class AccountTest extends \PHPUnit_Framework_TestCase ->setMethods(array('_canUseCache')) ->getMock(); - $contextArgs = array( - 'getHelper', 'getSession', 'getAuthorization', 'getTranslator', 'getObjectManager', 'getFrontController', - 'getLayoutFactory', 'getEventManager', 'getRequest', 'getResponse' - ); - $contextMock = $this->getMockBuilder('Magento\Backend\Controller\Context') - ->disableOriginalConstructor() - ->setMethods($contextArgs) - ->getMock(); + $contextMock = $this->getMock('Magento\Backend\App\Action\Context', array(), array(), '', false); $contextMock->expects($this->any())->method('getRequest')->will($this->returnValue($this->_requestMock)); $contextMock->expects($this->any())->method('getResponse')->will($this->returnValue($this->_responseMock)); $contextMock->expects($this->any()) diff --git a/dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/System/Config/SaveTest.php b/dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/System/Config/SaveTest.php index bb5adfeedc5cc7549c1ee2332182781cf1922e81..7e1fd21540f4978414924c4603c2584d0b3eb425 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/System/Config/SaveTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/System/Config/SaveTest.php @@ -120,7 +120,7 @@ class SaveTest extends \PHPUnit_Framework_TestCase 'auth' => $this->_authMock ); - $context = $helper->getObject('Magento\Backend\Controller\Context', $arguments); + $context = $helper->getObject('Magento\Backend\App\Action\Context', $arguments); $this->_controller = $this->getMock( 'Magento\Backend\Controller\Adminhtml\System\Config\Save', array('deniedAction'), diff --git a/dev/tests/unit/testsuite/Magento/Backend/Helper/DataTest.php b/dev/tests/unit/testsuite/Magento/Backend/Helper/DataTest.php index f22f08adfbfadb8f100eaa9c8f581eb5e42fffdb..c7ffdb5836bdbad3761b7b0bbe9fd19b11287d85 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Helper/DataTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Helper/DataTest.php @@ -50,7 +50,7 @@ class DataTest extends \PHPUnit_Framework_TestCase $this->_frontResolverMock = $this->getMock('\Magento\Backend\App\Area\FrontNameResolver', array(), array(), '', false); $this->_helper = new \Magento\Backend\Helper\Data( - $this->getMock('Magento\Core\Helper\Context', array(), array(), '', false, false), + $this->getMock('Magento\App\Helper\Context', array(), array(), '', false, false), $this->getMock('\Magento\App\Route\Config', array(), array(), '', false), $this->getMock('Magento\Core\Model\App', array(), array(), '', false), $this->getMock('\Magento\Backend\Model\Url', array(), array(), '', false), diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Source/Email/TemplateTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Source/Email/TemplateTest.php index 773c4f0e17dc9fbb340408b06a22f377e5d9e491..6acf1d5079fb42a7fb309f8d0580587f844fe393 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Source/Email/TemplateTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Source/Email/TemplateTest.php @@ -36,15 +36,20 @@ class TemplateTest extends \PHPUnit_Framework_TestCase protected $_coreRegistry; /** - * @var \Magento\Core\Model\Email\Template\Config|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Email\Model\Template\Config|\PHPUnit_Framework_MockObject_MockObject */ protected $_emailConfig; + /** + * @var /Magento\Core\Model\Resource\Email\Template\CollectionFactory + */ + protected $_templatesFactory; + protected function setUp() { $this->_coreRegistry = $this->getMock('Magento\Core\Model\Registry', array(), array(), '', false, false); - $this->_emailConfig = $this->getMock('Magento\Core\Model\Email\Template\Config', array(), array(), '', false); - $this->_templatesFactory = $this->getMock('Magento\Core\Model\Resource\Email\Template\CollectionFactory', + $this->_emailConfig = $this->getMock('Magento\Email\Model\Template\Config', array(), array(), '', false); + $this->_templatesFactory = $this->getMock('Magento\Email\Model\Resource\Template\CollectionFactory', array(), array(), '', false); $this->_model = new \Magento\Backend\Model\Config\Source\Email\Template( $this->_coreRegistry, $this->_templatesFactory, $this->_emailConfig @@ -54,7 +59,7 @@ class TemplateTest extends \PHPUnit_Framework_TestCase public function testToOptionArray() { $collection = $this->getMock( - 'Magento\Core\Model\Resource\Email\Template\Collection', array(), array(), '', false + 'Magento\Email\Model\Resource\Template\Collection', array(), array(), '', false ); $collection ->expects($this->once()) diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/Menu/Item/FactoryTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/Menu/Item/FactoryTest.php index 7d54b106109fed9207e5050737845b7cc9081f68..3de350f30afb7a0f9412c9fb5cca15f850ae98e6 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/Menu/Item/FactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/Menu/Item/FactoryTest.php @@ -54,7 +54,7 @@ class FactoryTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->_objectFactoryMock = $this->getMock('Magento\ObjectManager'); - $this->_helperFactoryMock = $this->getMock('Magento\Core\Model\Factory\Helper', array(), array(), '', false); + $this->_helperFactoryMock = $this->getMock('Magento\App\Helper\HelperFactory', array(), array(), '', false); $this->_helperFactoryMock ->expects($this->any()) ->method('get') diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/Router/NoRouteHandlerTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/Router/NoRouteHandlerTest.php index 97ea067968fad98aef543a5abf2b517965524bb1..e23319befbe270a5b7778a8ab028540ecb48d113 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/Router/NoRouteHandlerTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/Router/NoRouteHandlerTest.php @@ -67,13 +67,13 @@ class NoRouteHandlerTest extends \PHPUnit_Framework_TestCase $this->_requestMock ->expects($this->once()) ->method('setControllerName') - ->with('index') + ->with('noroute') ->will($this->returnValue($this->_requestMock)); $this->_requestMock ->expects($this->once()) ->method('setActionName') - ->with('noRoute') + ->with('index') ->will($this->returnValue($this->_requestMock)); $this->assertEquals(true, $this->_model->process($this->_requestMock)); diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/ViewTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/ViewTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b8fa1a96ad783661d2b46939edab5d94c35d05ac --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/ViewTest.php @@ -0,0 +1,69 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Backend\Model; + + +class ViewTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\Backend\Model\View + */ + protected $_view; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_layoutMock; + + protected function setUp() + { + $helper = new \Magento\TestFramework\Helper\ObjectManager($this); + $aclFilter = $this->getMock('Magento\Core\Model\Layout\Filter\Acl', array(), array(), '', false); + $this->_layoutMock = $this->getMock('Magento\Core\Model\Layout', array(), array(), '', false); + $layoutProcessor = $this->getMock('Magento\View\Layout\ProcessorInterface'); + $node = new \Magento\Simplexml\Element('<node/>'); + $this->_layoutMock->expects($this->once())->method('getNode')->will($this->returnValue($node)); + $this->_layoutMock->expects($this->any())->method('getUpdate')->will($this->returnValue($layoutProcessor)); + $this->_view = $helper->getObject('Magento\Backend\Model\View', array( + 'aclFilter' => $aclFilter, + 'layout' => $this->_layoutMock, + 'request' => $this->getMock('Magento\App\Request\Http', array(), array(), '', false) + ) + ); + } + + public function testLoadLayoutWhenBlockIsGenerate() + { + $this->_layoutMock->expects($this->once())->method('generateElements'); + $this->_view->loadLayout(); + } + + public function testLoadLayoutWhenBlockIsNotGenerate() + { + $this->_layoutMock->expects($this->never())->method('generateElements'); + $this->_view->loadLayout(null, false, true); + } + +} \ No newline at end of file diff --git a/dev/tests/unit/testsuite/Magento/Captcha/Helper/DataTest.php b/dev/tests/unit/testsuite/Magento/Captcha/Helper/DataTest.php index fc023bf4429d8fed61eae6078a61f6d7bf910d6c..d71f39ff8fb2f944bdc71b66d1e7f14752c3b294 100644 --- a/dev/tests/unit/testsuite/Magento/Captcha/Helper/DataTest.php +++ b/dev/tests/unit/testsuite/Magento/Captcha/Helper/DataTest.php @@ -59,7 +59,7 @@ class DataTest extends \PHPUnit_Framework_TestCase $filesystem = $this->getMock('Magento\Filesystem', array(), array(), '', false); - $context = $this->getMock('Magento\Core\Helper\Context', array(), array(), '', false); + $context = $this->getMock('Magento\App\Helper\Context', array(), array(), '', false); return new \Magento\Captcha\Helper\Data( $context, $this->_dirMock, $storeManager, $config, $filesystem, $factory diff --git a/dev/tests/unit/testsuite/Magento/Captcha/Model/ObserverTest.php b/dev/tests/unit/testsuite/Magento/Captcha/Model/ObserverTest.php index 1b27b4f8f68c610f5d9756b80919a976d04d8e69..7eb623229d4f5ea2129a7918021a32c8e47f4b74 100644 --- a/dev/tests/unit/testsuite/Magento/Captcha/Model/ObserverTest.php +++ b/dev/tests/unit/testsuite/Magento/Captcha/Model/ObserverTest.php @@ -73,6 +73,11 @@ class ObserverTest extends \PHPUnit_Framework_TestCase */ protected $_objectManager; + /** + * @var \Magento\TestFramework\Helper\ObjectManager + */ + protected $_actionFlag; + protected function setUp() { $this->_objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); @@ -89,7 +94,7 @@ class ObserverTest extends \PHPUnit_Framework_TestCase $this->_helper = $this->getMock('Magento\Captcha\Helper\Data', array(), array(), '', false); $this->_urlManager = $this->getMock('Magento\Core\Model\Url', array(), array(), '', false); $this->_filesystem = $this->getMock('Magento\Filesystem', array(), array(), '', false); - + $this->_actionFlag = $this->getMock('Magento\App\ActionFlag', array(), array(), '', false); $this->_observer = $this->_objectManager->getObject( 'Magento\Captcha\Model\Observer', array( @@ -101,6 +106,7 @@ class ObserverTest extends \PHPUnit_Framework_TestCase 'helper' => $this->_helper, 'urlManager' => $this->_urlManager, 'filesystem' => $this->_filesystem, + 'actionFlag' => $this->_actionFlag ) ); @@ -112,7 +118,7 @@ class ObserverTest extends \PHPUnit_Framework_TestCase $formId = 'contact_us'; $captchaValue = 'some-value'; - $controller = $this->getMock('Magento\Core\Controller\Varien\Action', array(), array(), '', false); + $controller = $this->getMock('Magento\App\Action\Action', array(), array(), '', false); $request = $this->getMock('Magento\App\Request\Http', array(), array(), '', false); $request->expects($this->any()) ->method('getPost') @@ -150,7 +156,7 @@ class ObserverTest extends \PHPUnit_Framework_TestCase ->with($redirectRoutePath, null) ->will($this->returnValue($redirectUrl)); - $controller = $this->getMock('Magento\Core\Controller\Varien\Action', array(), array(), '', false); + $controller = $this->getMock('Magento\App\Action\Action', array(), array(), '', false); $request = $this->getMock('Magento\App\Request\Http', array(), array(), '', false); $response = $this->getMock('Magento\App\Response\Http', array(), array(), '', false); $request->expects($this->any())->method('getPost')->with(\Magento\Captcha\Helper\Data::INPUT_NAME_FIELD_VALUE, @@ -172,8 +178,8 @@ class ObserverTest extends \PHPUnit_Framework_TestCase ->with($formId) ->will($this->returnValue($this->_captcha)); $this->_session->expects($this->once())->method('addError')->with($warningMessage); - $controller->expects($this->once())->method('setFlag') - ->with('', \Magento\Core\Controller\Varien\Action::FLAG_NO_DISPATCH, true); + $this->_actionFlag->expects($this->once())->method('set') + ->with('', \Magento\App\Action\Action::FLAG_NO_DISPATCH, true); $this->_observer->checkContactUsForm(new \Magento\Event\Observer(array('controller_action' => $controller))); } diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Block/Adminhtml/Product/Composite/Fieldset/OptionsTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Block/Adminhtml/Product/Composite/Fieldset/OptionsTest.php index e09fd59acbb04e7acd9d871c999071a50c6e4056..ed604d4582cfde0aa60e2eec95b60fecadfec5eb 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Block/Adminhtml/Product/Composite/Fieldset/OptionsTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Block/Adminhtml/Product/Composite/Fieldset/OptionsTest.php @@ -60,7 +60,7 @@ class OptionsTest extends \PHPUnit_Framework_TestCase { $layout = $this->getMock('Magento\Core\Model\Layout', array('getChildName', 'getBlock', 'renderElement'), array(), '', false); - $context = $this->_objectHelper->getObject('Magento\Core\Block\Template\Context', array( + $context = $this->_objectHelper->getObject('Magento\View\Block\Template\Context', array( 'layout' => $layout )); $optionFactoryMock = $this->getMock('Magento\Catalog\Model\Product\Option\ValueFactory', array('create'), diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Super/Config/MatrixTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Super/Config/MatrixTest.php index f4c98982f1fe887cf77215bf58dbecc117099193..bc2b20f8ffbc952318bd80afafdccac8c7613287 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Super/Config/MatrixTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Super/Config/MatrixTest.php @@ -33,9 +33,6 @@ class MatrixTest extends \PHPUnit_Framework_TestCase */ protected $_block; - /** @var \Magento\Backend\Block\Template\Context|\PHPUnit_Framework_MockObject_MockObject */ - protected $_context; - /** @var \Magento\Core\Model\App|\PHPUnit_Framework_MockObject_MockObject */ protected $_application; @@ -44,11 +41,10 @@ class MatrixTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_context = $this->getMock('Magento\Backend\Block\Template\Context', array(), array(), '', false); $this->_application = $this->getMock('Magento\Core\Model\App', array(), array(), '', false); $this->_locale = $this->getMock('Magento\Core\Model\LocaleInterface', array(), array(), '', false); $data = array( - 'application' => $this->_application, + 'app' => $this->_application, 'locale' => $this->_locale, 'formFactory' => $this->getMock('Magento\Data\FormFactory', array(), array(), '', false), 'productFactory' => $this->getMock('Magento\Catalog\Model\ProductFactory', array(), array(), '', false), diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/View/OptionsTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/View/OptionsTest.php index 709826744233a9b39970264fa27581830b120538..8aa067b73ec20ed700ad7a49a39507a9bdab8f5e 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/View/OptionsTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/View/OptionsTest.php @@ -59,7 +59,7 @@ class OptionsTest extends \PHPUnit_Framework_TestCase { $layout = $this->getMock('Magento\Core\Model\Layout', array('getChildName', 'getBlock', 'renderElement'), array(), '', false); - $context = $this->_objectHelper->getObject('Magento\Core\Block\Template\Context', array( + $context = $this->_objectHelper->getObject('Magento\View\Block\Template\Context', array( 'layout' => $layout )); diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/View/TabsTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/View/TabsTest.php index 3f2afed8cdf0844724bab410a01f636ede036053..3b4d6ed2965b0b872a8aba5934b544f0abf188ad 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/View/TabsTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/View/TabsTest.php @@ -28,7 +28,7 @@ class TabsTest extends \PHPUnit_Framework_TestCase { public function testAddTab() { - $tabBlock = $this->getMock('Magento\Core\Block\Template', array(), array(), '', false); + $tabBlock = $this->getMock('Magento\View\Block\Template', array(), array(), '', false); $tabBlock->expects($this->once()) ->method('setTemplate') ->with('template') @@ -40,14 +40,11 @@ class TabsTest extends \PHPUnit_Framework_TestCase ->with('block') ->will($this->returnValue($tabBlock)); - $context = $this->getMock('Magento\Core\Block\Template\Context', array(), array(), '', false); - $context->expects($this->once()) - ->method('getLayout') - ->will($this->returnValue($layout)); - - $coreData = $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false); - - $block = new \Magento\Catalog\Block\Product\View\Tabs($coreData, $context); + $helper = new \Magento\TestFramework\Helper\ObjectManager($this); + $block = $helper->getObject('Magento\Catalog\Block\Product\View\Tabs', array( + 'layout' => $layout + ) + ); $block->addTab('alias', 'title', 'block', 'template', 'header'); $expectedTabs = array( diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Helper/UrlTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Helper/UrlTest.php index 894005d117e4ab00cc2e0a1d5631d1124e83a23c..1f78d584d2985d1431f647f11f7c8abe2f105cca 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Helper/UrlTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Helper/UrlTest.php @@ -37,7 +37,7 @@ class UrlTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $contextMock = $this->getMockBuilder('Magento\Core\Helper\Context')->disableOriginalConstructor()->getMock(); + $contextMock = $this->getMockBuilder('Magento\App\Helper\Context')->disableOriginalConstructor()->getMock(); $this->_configMock = $this->getMockBuilder('Magento\Core\Model\Config') ->disableOriginalConstructor()->getMock(); $storeManager = $this->getMock('Magento\Core\Model\StoreManager', array(), array(), '', false); diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Block/Cart/AbstractTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Block/Cart/AbstractTest.php index 94969e0559b499072ecc096a0dc409ae5dc62618..681b7689ef91b0b8a5d37450dace0d61d0667e78 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Block/Cart/AbstractTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Block/Cart/AbstractTest.php @@ -35,7 +35,7 @@ class AbstractTest extends \PHPUnit_Framework_TestCase public function testGetItemRenderer() { - $renderer = $this->getMock('Magento\Core\Block\AbstractBlock', array('setRenderedBlock'), array(), '', false); + $renderer = $this->getMock('Magento\View\Block\AbstractBlock', array('setRenderedBlock'), array(), '', false); $layout = $this->getMock('Magento\Core\Model\Layout', array( 'getChildName', 'getBlock' ), array(), '', false); @@ -93,7 +93,7 @@ class AbstractTest extends \PHPUnit_Framework_TestCase public function testPrepareLayout() { - $childBlock = $this->getMock('Magento\Core\Block\AbstractBlock', array(), array(), '', false); + $childBlock = $this->getMock('Magento\View\Block\AbstractBlock', array(), array(), '', false); /** @var $layout \Magento\View\LayoutInterface */ $layout = $this->getMock('Magento\Core\Model\Layout', array( 'createBlock', 'getChildName', 'setChild' diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Block/Cart/Item/RendererTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Block/Cart/Item/RendererTest.php index 44ce4d9adcf946e7a4bed9d5ca06dd3e3f63bf4d..53e585155f25b6c0a8b9ecaddfe9a9217a9c9808 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Block/Cart/Item/RendererTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Block/Cart/Item/RendererTest.php @@ -55,7 +55,7 @@ class RendererTest extends \PHPUnit_Framework_TestCase $helperImage->expects($this->any())->method('__toString')->will($this->returnValue($url)); $helperFactory = $this->getMock( - 'Magento\Core\Model\Factory\Helper', array('get'), array(), '', false, false + 'Magento\App\Helper\HelperFactory', array('get'), array(), '', false, false ); $helperFactory->expects($this->any()) ->method('get') diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Block/Cart/LinkTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Block/Cart/LinkTest.php index 950a36dcbe6abd7bfe742638219b02082343e549..5897ff1bbce831ef47a337a436d96618e048f16d 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Block/Cart/LinkTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Block/Cart/LinkTest.php @@ -48,7 +48,7 @@ class LinkTest extends \PHPUnit_Framework_TestCase ->getMock(); $context = $this->_objectManagerHelper->getObject( - 'Magento\Core\Block\Template\Context', + 'Magento\View\Block\Template\Context', array('urlBuilder' => $urlBuilder) ); $link = $this->_objectManagerHelper->getObject( @@ -70,15 +70,15 @@ class LinkTest extends \PHPUnit_Framework_TestCase $helper = $this->getMockBuilder('Magento\Customer\Helper\Data') ->disableOriginalConstructor() ->getMock(); - $helperFactory = $this->getMockBuilder('Magento\Core\Model\Factory\Helper') + $helperFactory = $this->getMockBuilder('Magento\App\Helper\HelperFactory') ->disableOriginalConstructor() ->setMethods(array('get')) ->getMock(); $helperFactory->expects($this->any())->method('get')->will($this->returnValue($helper)); - /** @var \Magento\Core\Block\Template\Context $context */ + /** @var \Magento\View\Block\Template\Context $context */ $context = $this->_objectManagerHelper->getObject( - 'Magento\Core\Block\Template\Context', + 'Magento\View\Block\Template\Context', array( 'helperFactory' => $helperFactory ) @@ -108,15 +108,15 @@ class LinkTest extends \PHPUnit_Framework_TestCase ->disableOriginalConstructor() ->setMethods(array('getSummaryCount')) ->getMock(); - $helperFactory = $this->getMockBuilder('Magento\Core\Model\Factory\Helper') + $helperFactory = $this->getMockBuilder('Magento\App\Helper\HelperFactory') ->disableOriginalConstructor() ->setMethods(array('get')) ->getMock(); $helperFactory->expects($this->any())->method('get')->will($this->returnValue($helper)); - /** @var \Magento\Core\Block\Template\Context $context */ + /** @var \Magento\View\Block\Template\Context $context */ $context = $this->_objectManagerHelper->getObject( - 'Magento\Core\Block\Template\Context', + 'Magento\View\Block\Template\Context', array( 'helperFactory' => $helperFactory ) diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Block/Cart/SidebarTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Block/Cart/SidebarTest.php index 7f21493b05bea278e858fa036d96409e26a9b5be..40e41cefafa886bab367c1cc6bb274e39b094684 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Block/Cart/SidebarTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Block/Cart/SidebarTest.php @@ -35,7 +35,7 @@ class SidebarTest extends \PHPUnit_Framework_TestCase public function testDeserializeRenders() { - $childBlock = $this->getMock('Magento\Core\Block\AbstractBlock', array(), array(), '', false); + $childBlock = $this->getMock('Magento\View\Block\AbstractBlock', array(), array(), '', false); /** @var $layout \Magento\View\LayoutInterface */ $layout = $this->getMock('Magento\Core\Model\Layout', array( 'createBlock', 'getChildName', 'setChild' diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Block/LinkTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Block/LinkTest.php index 8ce731291235df057ecdbd7e6fbaf34f0f08e2fc..539b18ed1de49d1d1a9357c219c53ed675ceb6ce 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Block/LinkTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Block/LinkTest.php @@ -44,7 +44,7 @@ class LinkTest extends \PHPUnit_Framework_TestCase $urlBuilder->expects($this->once())->method('getUrl')->with($path)->will($this->returnValue($url . $path)); $context = $this->_objectManagerHelper->getObject( - 'Magento\Core\Block\Template\Context', + 'Magento\View\Block\Template\Context', array('urlBuilder' => $urlBuilder) ); $link = $this->_objectManagerHelper->getObject( @@ -66,7 +66,7 @@ class LinkTest extends \PHPUnit_Framework_TestCase ->setMethods(array('canOnepageCheckout', 'isModuleOutputEnabled')) ->getMock(); - $helperFactory = $this->getMockBuilder('Magento\Core\Model\Factory\Helper') + $helperFactory = $this->getMockBuilder('Magento\App\Helper\HelperFactory') ->disableOriginalConstructor() ->setMethods(array('get')) ->getMock(); @@ -77,9 +77,9 @@ class LinkTest extends \PHPUnit_Framework_TestCase ->setMethods(array('isOutputEnabled')) ->getMock(); - /** @var \Magento\Core\Block\Template\Context $context */ + /** @var \Magento\View\Block\Template\Context $context */ $context = $this->_objectManagerHelper->getObject( - 'Magento\Core\Block\Template\Context', + 'Magento\View\Block\Template\Context', array('helperFactory' => $helperFactory) ); diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Controller/CartTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Controller/CartTest.php index d9f04b05fc691937228a2a8cb5bef121e4d47503..542a3964a2b8f51518c300e2bc05ee09bba159dd 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Controller/CartTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Controller/CartTest.php @@ -40,12 +40,10 @@ class CartTest extends \PHPUnit_Framework_TestCase public function testGoBack() { $helper = new \Magento\TestFramework\Helper\ObjectManager($this); + $storeManagerMock = $this->getMock('Magento\Core\Model\StoreManagerInterface'); + $responseMock = $this->getMock('Magento\App\Response\Http', array(), array(), '', false); $responseMock->headersSentThrowsException = false; - $responseMock->expects($this->once()) - ->method('setRedirect') - ->with('http://some-url/index.php/checkout/cart/') - ->will($this->returnSelf()); $requestMock = $this->getMock('Magento\App\Request\Http', array(), array(), '', false); $requestMock->expects($this->any())->method('getActionName')->will($this->returnValue('add')); @@ -53,9 +51,9 @@ class CartTest extends \PHPUnit_Framework_TestCase ->method('getParam')->with('return_url')->will($this->returnValue('http://malicious.com/')); $requestMock->expects($this->any()) ->method('getParam')->will($this->returnValue(null)); - $requestMock->expects($this->once()) - ->method('getServer') - ->with('HTTP_REFERER') + $redirect = $this->getMock('Magento\App\Response\RedirectInterface'); + $redirect->expects($this->any()) + ->method('getRefererUrl') ->will($this->returnValue('http://some-url/index.php/product.html')); $checkoutSessionMock = $this->getMock('Magento\Checkout\Model\Session', @@ -65,50 +63,26 @@ class CartTest extends \PHPUnit_Framework_TestCase ->with('http://some-url/index.php/product.html') ->will($this->returnSelf()); - $sessionMock = $this->getMock('Magento\Core\Model\Session', array(), array(), '', false); - - $urlMock = $this->getMock('Magento\Core\Model\Url', - array('getUrl'), array(), '', false); - $urlMock->expects($this->once()) - ->method('getUrl') - ->with('checkout/cart') + $redirect->expects($this->once()) + ->method('redirect') ->will($this->returnValue('http://some-url/index.php/checkout/cart/')); $storeMock = $this->getMock('Magento\Core\Model\Store', array(), array(), '', false); $storeMock->expects($this->any())->method('getBaseUrl')->will($this->returnValue('http://some-url/')); - $storeManager = $this->getMock('Magento\Core\Model\StoreManagerInterface'); - $storeManager->expects($this->any())->method('getStore')->will($this->returnValue($storeMock)); - $objectManager = $this->getMock('Magento\ObjectManager', array(), array(), '', false); - $objectManager->expects($this->at(0)) - ->method('get') - ->with($this->equalTo('Magento\Core\Model\StoreManagerInterface')) - ->will($this->returnValue($storeManager)); - $objectManager->expects($this->at(1)) - ->method('get') - ->with($this->equalTo('Magento\Core\Model\StoreManagerInterface')) - ->will($this->returnValue($storeManager)); - $objectManager->expects($this->at(2)) - ->method('get') - ->with($this->equalTo('Magento\Core\Model\Session')) - ->will($this->returnValue($sessionMock)); - $objectManager->expects($this->at(3)) - ->method('create') - ->with($this->equalTo('Magento\Core\Model\Url')) - ->will($this->returnValue($urlMock)); - - $configMock = $this->getMock('Magento\Core\Model\Store\Config', array('getConfig'), array(), '', false); + $configMock = $this->getMock('Magento\Core\Model\Store\ConfigInterface'); $configMock->expects($this->once()) ->method('getConfig') ->with('checkout/cart/redirect_to_cart') ->will($this->returnValue('1')); - + $storeManagerMock->expects($this->any())->method('getStore')->will($this->returnValue($storeMock)); $arguments = array( 'response' => $responseMock, 'request' => $requestMock, - 'objectManager' => $objectManager, 'checkoutSession' => $checkoutSessionMock, 'storeConfig' => $configMock, + 'redirect' => $redirect, + 'storeManager' => $storeManagerMock ); $controller = $helper->getObject('Magento\Checkout\Controller\Cart', $arguments); diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Model/SessionTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Model/SessionTest.php index c99873307bb42f20e9a09cbecf19e592d79085b8..85a77fe0818af08b687e6deae6f7d8bc8d65a7cc 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Model/SessionTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Model/SessionTest.php @@ -45,7 +45,7 @@ class SessionTest extends \PHPUnit_Framework_TestCase ->method('create') ->will($this->returnValue($orderMock)); - $messageCollFactory = $this->getMockBuilder('Magento\Core\Model\Message\CollectionFactory') + $messageCollFactory = $this->getMockBuilder('Magento\Message\CollectionFactory') ->disableOriginalConstructor() ->getMock(); $quoteFactory = $this->getMockBuilder('Magento\Sales\Model\QuoteFactory') diff --git a/dev/tests/unit/testsuite/Magento/Cms/Controller/NorouteTest.php b/dev/tests/unit/testsuite/Magento/Cms/Controller/NorouteTest.php new file mode 100644 index 0000000000000000000000000000000000000000..9d5892cea5730f18ead9e01e09330e8a2b400845 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Cms/Controller/NorouteTest.php @@ -0,0 +1,95 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Cms\Controller; + +class NorouteTest extends \PHPUnit_Framework_TestCase +{ + + /** + * @var \Magento\Cms\Controller\Noroute + */ + protected $_controller; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_cmsHelperMock; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_requestMock; + + protected function setUp() + { + $helper = new \Magento\TestFramework\Helper\ObjectManager($this); + $objectManagerMock = $this->getMock('Magento\ObjectManager'); + $responseMock = $this->getMock('Magento\App\Response\Http', array(), array(), '', false); + $responseMock->expects($this->at(0)) + ->method('setHeader')->with('HTTP/1.1', '404 Not Found')->will($this->returnValue($responseMock)); + $responseMock->expects($this->at(1)) + ->method('setHeader')->with('Status', '404 File not found')->will($this->returnValue($responseMock)); + + $storeConfigMock = $this->getMock('Magento\Core\Model\Store\Config', array(), array(), '', false); + $this->_requestMock = $this->getMock('Magento\App\Request\Http', array(), array(), '', false); + $this->_cmsHelperMock = $this->getMock('Magento\Cms\Helper\Page', array(), array(), '', false); + $valueMap = array( + array('Magento\Core\Model\Store\Config', $storeConfigMock), + array('Magento\Cms\Helper\Page', $this->_cmsHelperMock), + ); + $objectManagerMock->expects($this->any()) + ->method('get') + ->will($this->returnValueMap($valueMap)); + $storeConfigMock->expects($this->once()) + ->method('getConfig') + ->with(\Magento\Cms\Helper\Page::XML_PATH_NO_ROUTE_PAGE) + ->will($this->returnValue('pageId')); + $this->_controller = $helper->getObject('Magento\Cms\Controller\Noroute', array( + 'response' => $responseMock, + 'objectManager' => $objectManagerMock, + 'request' => $this->_requestMock + ) + ); + } + + /** + * @param bool $renderPage + * @dataProvider indexActionDataProvider + */ + public function testIndexAction($renderPage) + { + $this->_cmsHelperMock->expects($this->once())->method('renderPage')->will($this->returnValue($renderPage)); + $this->_requestMock->expects($this->any())->method('setActionName')->with('defaultNoRoute'); + $this->_controller->indexAction(); + } + + public function indexActionDataProvider() + { + return array( + 'renderPage_return_true' => array(true), + 'renderPage_return_false' => array(false) + ); + } +} \ No newline at end of file diff --git a/dev/tests/unit/testsuite/Magento/Code/Reader/ArgumentsReaderTest.php b/dev/tests/unit/testsuite/Magento/Code/Reader/ArgumentsReaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b34b28d1d745472bb6c70cc9419197e65bba37be --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Code/Reader/ArgumentsReaderTest.php @@ -0,0 +1,316 @@ +<?php +/** + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Code\Reader; + +require_once(__DIR__ . '/_files/ClassesForArgumentsReader.php'); + +class ArgumentsReaderTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\Code\Reader\ArgumentsReader + */ + protected $_model; + + protected function setUp() + { + $this->_model = new \Magento\Code\Reader\ArgumentsReader(); + } + + public function testGetConstructorArgumentsClassWithAllArgumentsType() + { + $expectedResult = array( + 'stdClassObject' => array( + 'name' => 'stdClassObject', + 'position' => 0, + 'type' => '\stdClass', + 'isOptional' => false, + 'default' => null + ), + 'withoutConstructorClassObject' => array( + 'name' => 'withoutConstructorClassObject', + 'position' => 1, + 'type' => '\ClassWithoutConstruct', + 'isOptional' => false, + 'default' => null + ), + 'someVariable' => array( + 'name' => 'someVariable', + 'position' => 2, + 'type' => null, + 'isOptional' => false, + 'default' => null + ), + 'const' => array( + 'name' => 'const', + 'position' => 3, + 'type' => null, + 'isOptional' => true, + 'default' => '\ClassWithAllArgumentTypes::DEFAULT_VALUE' + ), + 'optionalNumValue' => array( + 'name' => 'optionalNumValue', + 'position' => 4, + 'type' => null, + 'isOptional' => true, + 'default' => 9807 + ), + 'optionalStringValue' => array( + 'name' => 'optionalStringValue', + 'position' => 5, + 'type' => null, + 'isOptional' => true, + 'default' => "'optional string'" + ), + 'optionalArrayValue' => array( + 'name' => 'optionalArrayValue', + 'position' => 6, + 'type' => null, + 'isOptional' => true, + 'default' => "array('optionalKey' => 'optionalValue')" + ) + ); + $class = new \ReflectionClass('ClassWithAllArgumentTypes'); + $actualResult = $this->_model->getConstructorArguments($class); + + $this->assertEquals($expectedResult, $actualResult); + } + + public function testGetConstructorArgumentsClassWithoutOwnConstructorInheritedFalse() + { + $class = new \ReflectionClass('classWithoutOwnConstruct'); + $actualResult = $this->_model->getConstructorArguments($class); + + $this->assertEquals(array(), $actualResult); + } + + public function testGetConstructorArgumentsClassWithoutOwnConstructorInheritedTrue() + { + $expectedResult = array( + 'stdClassObject' => array( + 'name' => 'stdClassObject', + 'position' => 0, + 'type' => '\stdClass', + 'isOptional' => false, + 'default' => null + ), + 'withoutConstructorClassObject' => array( + 'name' => 'withoutConstructorClassObject', + 'position' => 1, + 'type' => '\ClassWithoutConstruct', + 'isOptional' => false, + 'default' => null + ), + 'someVariable' => array( + 'name' => 'someVariable', + 'position' => 2, + 'type' => null, + 'isOptional' => false, + 'default' => null + ), + 'const' => array( + 'name' => 'const', + 'position' => 3, + 'type' => null, + 'isOptional' => true, + 'default' => '\ClassWithAllArgumentTypes::DEFAULT_VALUE' + ), + 'optionalNumValue' => array( + 'name' => 'optionalNumValue', + 'position' => 4, + 'type' => null, + 'isOptional' => true, + 'default' => 9807 + ), + 'optionalStringValue' => array( + 'name' => 'optionalStringValue', + 'position' => 5, + 'type' => null, + 'isOptional' => true, + 'default' => "'optional string'" + ), + 'optionalArrayValue' => array( + 'name' => 'optionalArrayValue', + 'position' => 6, + 'type' => null, + 'isOptional' => true, + 'default' => "array('optionalKey' => 'optionalValue')" + ) + ); + $class = new \ReflectionClass('ClassWithoutOwnConstruct'); + $actualResult = $this->_model->getConstructorArguments($class, false, true); + + $this->assertEquals($expectedResult, $actualResult); + } + + public function testGetConstructorArgumentsClassWithoutConstructInheridetFalse() + { + $class = new \ReflectionClass('ClassWithoutConstruct'); + $actualResult = $this->_model->getConstructorArguments($class); + + $this->assertEquals(array(), $actualResult); + } + + public function testGetConstructorArgumentsClassWithoutConstructInheridetTrue() + { + $class = new \ReflectionClass('ClassWithoutConstruct'); + $actualResult = $this->_model->getConstructorArguments($class, false, true); + + $this->assertEquals(array(), $actualResult); + } + + public function testGetConstructorArgumentsClassExtendsDefaultPhpTypeInheridetFalse() + { + $class = new \ReflectionClass('ClassExtendsDefaultPhpType'); + $actualResult = $this->_model->getConstructorArguments($class); + + $this->assertEquals(array(), $actualResult); + } + + public function testGetConstructorArgumentsClassExtendsDefaultPhpTypeInheridetTrue() + { + $expectedResult = array( + 'message' => array( + 'name' => 'message', + 'position' => 0, + 'type' => null, + 'isOptional' => true, + 'default' => null + ), + 'code' => array( + 'name' => 'code', + 'position' => 1, + 'type' => null, + 'isOptional' => true, + 'default' => null + ), + 'previous' => array( + 'name' => 'previous', + 'position' => 2, + 'type' => null, + 'isOptional' => true, + 'default' => null + ) + ); + $class = new \ReflectionClass('ClassExtendsDefaultPhpType'); + $actualResult = $this->_model->getConstructorArguments($class, false, true); + + $this->assertEquals($expectedResult, $actualResult); + } + + public function testGetParentCallWithRightArgumentsOrder() + { + $class = new \ReflectionClass('ThirdClassForParentCall'); + $actualResult = $this->_model->getParentCall($class, + array( + 'stdClassObject' => array('type' => '\stdClass'), + 'secondClass' => array('type' => '\ClassExtendsDefaultPhpType') + )); + $expectedResult = array( + array( + 'name' => 'stdClassObject', + 'position' => 0, + 'type' => '\stdClass' + ), + array( + 'name' => 'secondClass', + 'position' => 1, + 'type' => '\ClassExtendsDefaultPhpType' + ) + ); + $this->assertEquals($expectedResult, $actualResult); + } + + public function testGetParentCallWithWrongArgumentsOrder() + { + $class = new \ReflectionClass('WrongArgumentsOrder'); + $actualResult = $this->_model->getParentCall($class, + array( + 'stdClassObject' => array('type' => '\stdClass'), + 'secondClass' => array('type' => '\ClassExtendsDefaultPhpType') + )); + $expectedResult = array( + array( + 'name' => 'secondClass', + 'position' => 0, + 'type' => '\ClassExtendsDefaultPhpType' + ), + array( + 'name' => 'stdClassObject', + 'position' => 1, + 'type' => '\stdClass' + ), + ); + $this->assertEquals($expectedResult, $actualResult); + } + + public function testGetParentCallWithSeparateLineFormat() + { + $class = new \ReflectionClass('ThirdClassForParentCall'); + $actualResult = $this->_model->getParentCall($class, + array( + 'stdClassObject' => array('type' => '\stdClass'), + 'secondClass' => array('type' => '\ClassExtendsDefaultPhpType') + )); + $expectedResult = array( + array( + 'name' => 'stdClassObject', + 'position' => 0, + 'type' => '\stdClass' + ), + array( + 'name' => 'secondClass', + 'position' => 1, + 'type' => '\ClassExtendsDefaultPhpType' + ) + ); + $this->assertEquals($expectedResult, $actualResult); + } + + /** + * @param string $requiredType + * @param string $actualType + * @param bool $expectedResult + * @dataProvider testIsCompatibleTypeDataProvider + */ + public function testIsCompatibleType($requiredType, $actualType, $expectedResult) + { + $actualResult = $this->_model->isCompatibleType($requiredType, $actualType); + $this->assertEquals($expectedResult, $actualResult); + } + + public function testIsCompatibleTypeDataProvider() + { + return array( + array('array', 10, false), + array('array', 'array', true), + array(null, null, true), + array(null, 'array', true), + array('\ClassWithAllArgumentTypes', '\ClassWithoutOwnConstruct', true), + array('\ClassWithoutOwnConstruct', '\ClassWithAllArgumentTypes', false), + ); + } + +} diff --git a/dev/tests/unit/testsuite/Magento/Code/Reader/_files/ClassesForArgumentsReader.php b/dev/tests/unit/testsuite/Magento/Code/Reader/_files/ClassesForArgumentsReader.php new file mode 100644 index 0000000000000000000000000000000000000000..202417430965f61c485879e8493ce55eb3577c62 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Code/Reader/_files/ClassesForArgumentsReader.php @@ -0,0 +1,208 @@ +<?php +/** + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +class ClassWithAllArgumentTypes +{ + const DEFAULT_VALUE = 'Const Value'; + /** + * @var stdClass + */ + protected $_stdClassObject; + /** + * @var classWithoutConstruct + */ + protected $_withoutConstructorClassObject; + /** + * @var mixed + */ + protected $_someVariable; + /** + * @var int + */ + protected $_optionalNumValue; + /** + * @var string + */ + protected $_optionalStringValue; + /** + * @var array + */ + protected $_optionalArrayValue; + + /** + * @var mixed + */ + protected $_constValue; + + /** + * @param stdClass $stdClassObject + * @param ClassWithoutConstruct $withoutConstructorClassObject + * @param $someVariable + * @param string $const + * @param int $optionalNumValue + * @param string $optionalStringValue + * @param array $optionalArrayValue + */ + public function __construct( + \stdClass $stdClassObject, + \ClassWithoutConstruct $withoutConstructorClassObject, + $someVariable, + $const = \ClassWithAllArgumentTypes::DEFAULT_VALUE, + $optionalNumValue = 9807, + $optionalStringValue = 'optional string', + $optionalArrayValue = array('optionalKey' => 'optionalValue') + ) { + $this->_stdClassObject = $stdClassObject; + $this->_withoutConstructorClassObject = $withoutConstructorClassObject; + $this->_someVariable = $someVariable; + $this->_optionalNumValue = $optionalNumValue; + $this->_optionalStringValue = $optionalStringValue; + $this->_optionalArrayValue = $optionalArrayValue; + $this->_constValue = $const; + } +} + +class ClassWithoutOwnConstruct extends ClassWithAllArgumentTypes +{ + +} + +class ClassWithoutConstruct +{ + +} + +class ClassExtendsDefaultPhpType extends \RuntimeException +{ + +} + +class FirstClassForParentCall +{ + /** + * @var stdClass + */ + protected $_stdClassObject; + /** + * @var ClassExtendsDefaultPhpType + */ + protected $_runeTimeException; + /** + * @var array + */ + protected $_arrayVariable; + + /** + * @param stdClass $stdClassObject + * @param ClassExtendsDefaultPhpType $runeTimeException + * @param array $arrayVariable + */ + public function __construct( + \stdClass $stdClassObject, + \ClassExtendsDefaultPhpType $runeTimeException, + $arrayVariable = array('key' => 'value') + ) { + $this->_stdClassObject = $stdClassObject; + $this->_runeTimeException = $runeTimeException; + $this->_arrayVariable = $arrayVariable; + } +} + +class ThirdClassForParentCall extends firstClassForParentCall +{ + /** + * @var stdClass + */ + protected $_stdClassObject; + /** + * @var ClassExtendsDefaultPhpType + */ + protected $_secondClass; + + /** + * @param stdClass $stdClassObject + * @param ClassExtendsDefaultPhpType $secondClass + */ + public function __construct( + \stdClass $stdClassObject, + \ClassExtendsDefaultPhpType $secondClass + ) { + parent::__construct($stdClassObject, $secondClass); + $this->_stdClassObject = $stdClassObject; + $this->_secondClass = $secondClass; + } +} + +class WrongArgumentsOrder extends firstClassForParentCall +{ + /** + * @var stdClass + */ + protected $_stdClassObject; + /** + * @var ClassExtendsDefaultPhpType + */ + protected $_secondClass; + + /** + * @param stdClass $stdClassObject + * @param ClassExtendsDefaultPhpType $secondClass + */ + public function __construct( + \stdClass $stdClassObject, + \ClassExtendsDefaultPhpType $secondClass + ) { + parent::__construct($secondClass, $stdClassObject); + $this->_stdClassObject = $stdClassObject; + $this->_secondClass = $secondClass; + } +} + +class ArgumentsOnSeparateLines extends firstClassForParentCall +{ + /** + * @var stdClass + */ + protected $_stdClassObject; + /** + * @var ClassExtendsDefaultPhpType + */ + protected $_secondClass; + + /** + * @param stdClass $stdClassObject + * @param ClassExtendsDefaultPhpType $secondClass + */ + public function __construct( + \stdClass $stdClassObject, + \ClassExtendsDefaultPhpType $secondClass + ) { + parent::__construct( + $secondClass, + $stdClassObject + ); + $this->_stdClassObject = $stdClassObject; + $this->_secondClass = $secondClass; + } +} \ No newline at end of file diff --git a/dev/tests/unit/testsuite/Magento/Code/Validator/ArgumentSequenceTest.php b/dev/tests/unit/testsuite/Magento/Code/Validator/ArgumentSequenceTest.php new file mode 100644 index 0000000000000000000000000000000000000000..38dad3805868fe870b7f2e84c97ccc942d38b195 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Code/Validator/ArgumentSequenceTest.php @@ -0,0 +1,103 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Code\Validator; + +require_once ('_files/ClassesForArgumentSequence.php'); + +class ArgumentSequenceTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\Code\Validator\ArgumentSequence + */ + protected $_validator; + + /** + * @var string + */ + protected $_fixturePath; + + protected function setUp() + { + $this->_fixturePath = realpath(__DIR__) + . DIRECTORY_SEPARATOR . '_files' + . DIRECTORY_SEPARATOR . 'ClassesForArgumentSequence.php'; + $this->_validator = $this->getMock('Magento\Code\Validator\ArgumentSequence', array('_isAllowedType')); + $this->_validator->expects($this->any())->method('_isAllowedType')->will($this->returnValue(true)); + } + + public function testValidSequence() + { + $this->assertTrue($this->_validator->validate('\ArgumentSequence\ValidChildClass')); + } + + /** + * @dataProvider invalidSequenceDataProvider + */ + public function testInvalidSequence($className, $expectedSequence) + { + $message = 'Incorrect argument sequence in class %s in ' . $this->_fixturePath . PHP_EOL + . 'Required: %s' . PHP_EOL; + $message = sprintf($message, $className, $expectedSequence); + try { + $this->_validator->validate($className); + } catch (\Magento\Code\ValidationException $exception) { + $this->assertStringStartsWith($message, $exception->getMessage()); + return; + } + $this->fail('Failed asserting that exception of type "\Magento\Code\ValidationException" is thrown'); + } + + /** + * @return array + */ + public function invalidSequenceDataProvider() + { + $expectedSequence = '$contextObject, $parentRequiredObject, $parentRequiredScalar, ' + . '$childRequiredObject, $childRequiredScalar, $parentOptionalObject, $data, $parentOptionalScalar, ' + . '$childOptionalObject, $childOptionalScalar'; + + $rule04 = '$contextObject, $parentRequiredObject, $parentRequiredScalar, $childRequiredObject, $argument, ' + . '$childRequiredScalar, $parentOptionalObject, $data, $parentOptionalScalar, ' + . '$childOptionalObject, $childOptionalScalar'; + + $rule06 = '$contextObject, $parentRequiredObject, $parentRequiredScalar, $childRequiredObject, ' + . '$childRequiredScalar, $parentOptionalObject, $data, $parentOptionalScalar, ' + . '$childOptionalObject, $argument, $childOptionalScalar'; + + return array( + 'Rule 01' => array('\ArgumentSequence\InvalidChildClassRule01', $expectedSequence), + 'Rule 02' => array('\ArgumentSequence\InvalidChildClassRule02', $expectedSequence), + 'Rule 03' => array('\ArgumentSequence\InvalidChildClassRule03', $expectedSequence), + 'Rule 04' => array('\ArgumentSequence\InvalidChildClassRule04', $rule04), + 'Rule 05' => array('\ArgumentSequence\InvalidChildClassRule05', $expectedSequence), + 'Rule 06' => array('\ArgumentSequence\InvalidChildClassRule06', $rule06), + 'Rule 07' => array('\ArgumentSequence\InvalidChildClassRule07', $expectedSequence), + 'Rule 08' => array('\ArgumentSequence\InvalidChildClassRule08', $expectedSequence), + 'Rule 09' => array('\ArgumentSequence\InvalidChildClassRule09', $expectedSequence), + 'Rule 10' => array('\ArgumentSequence\InvalidChildClassRule10', $expectedSequence), + ); + } +} + \ No newline at end of file diff --git a/dev/tests/unit/testsuite/Magento/Code/Validator/ConstructorIntegrityTest.php b/dev/tests/unit/testsuite/Magento/Code/Validator/ConstructorIntegrityTest.php index 008756fe0c4e211fd54796d9e78fc09b5fc7028f..09d5d255de2344996e42fa77db3bd7fa59767d0a 100644 --- a/dev/tests/unit/testsuite/Magento/Code/Validator/ConstructorIntegrityTest.php +++ b/dev/tests/unit/testsuite/Magento/Code/Validator/ConstructorIntegrityTest.php @@ -30,6 +30,7 @@ require_once __DIR__ . '/../_files/app/code/Magento/SomeModule/Model/One/Test.p require_once __DIR__ . '/../_files/app/code/Magento/SomeModule/Model/Four/Test.php'; require_once __DIR__ . '/../_files/app/code/Magento/SomeModule/Model/Five/Test.php'; require_once __DIR__ . '/../_files/app/code/Magento/SomeModule/Model/Six/Test.php'; +require_once __DIR__ . '/_files/ClassesForConstructorIntegrity.php'; class ConstructorIntegrityTest extends \PHPUnit_Framework_TestCase { @@ -83,9 +84,33 @@ class ConstructorIntegrityTest extends \PHPUnit_Framework_TestCase $fileName = realpath(__DIR__ . '/../_files/app/code/Magento/SomeModule/Model/Six/Test.php'); $this->setExpectedException( '\Magento\Code\ValidationException', - 'Incompatible argument type: Required type: Magento\SomeModule\Model\Proxy. ' . - 'Actual type: Magento\SomeModule\Model\ElementFactory; File: ' . $fileName + 'Incompatible argument type: Required type: \Magento\SomeModule\Model\Proxy. ' . + 'Actual type: \Magento\SomeModule\Model\ElementFactory; File: ' . PHP_EOL . $fileName ); $this->_model->validate('Magento\SomeModule\Model\Six\Test'); } + + public function testValidateWrongOrderForParentArguments() + { + $fileName = realpath(__DIR__) . DIRECTORY_SEPARATOR + . '_files' . DIRECTORY_SEPARATOR . 'ClassesForConstructorIntegrity.php'; + $this->setExpectedException( + '\Magento\Code\ValidationException', + 'Incompatible argument type: Required type: \Context. ' . + 'Actual type: \ClassA; File: ' . PHP_EOL . $fileName + ); + $this->_model->validate('ClassArgumentWrongOrderForParentArguments'); + } + + public function testValidateWrongOptionalParamsType() + { + $fileName = realpath(__DIR__) . DIRECTORY_SEPARATOR + . '_files' . DIRECTORY_SEPARATOR . 'ClassesForConstructorIntegrity.php'; + $this->setExpectedException( + '\Magento\Code\ValidationException', + 'Incompatible argument type: Required type: array. ' . + 'Actual type: \ClassB; File: ' . PHP_EOL . $fileName + ); + $this->_model->validate('ClassArgumentWithWrongParentArgumentsType'); + } } \ No newline at end of file diff --git a/dev/tests/unit/testsuite/Magento/Code/Validator/ContextAggregationTest.php b/dev/tests/unit/testsuite/Magento/Code/Validator/ContextAggregationTest.php new file mode 100644 index 0000000000000000000000000000000000000000..8ed355b6e7d8a61a0490b2de531aace00ddd6926 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Code/Validator/ContextAggregationTest.php @@ -0,0 +1,76 @@ +<?php +/** + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Code\Validator; + +require_once(__DIR__ . '/_files/ClassesForContextAggregation.php'); + +class ContextAggregationTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\Code\Validator\ContextAggregation + */ + protected $_model; + + /** + * @var string + */ + protected $_fixturePath; + + protected function setUp() + { + $this->_model = new \Magento\Code\Validator\ContextAggregation(); + $this->_fixturePath = realpath(__DIR__) . DIRECTORY_SEPARATOR + . '_files' . DIRECTORY_SEPARATOR . 'ClassesForContextAggregation.php'; + } + + public function testClassArgumentAlreadyInjectedIntoContext() + { + $message = 'Incorrect dependency in class ClassArgumentAlreadyInjectedInContext in ' + . $this->_fixturePath . PHP_EOL . '\ClassFirst already exists in context object'; + + $this->setExpectedException('\Magento\Code\ValidationException', $message); + $this->_model->validate('ClassArgumentAlreadyInjectedInContext'); + } + + public function testClassArgumentWithInterfaceImplementation() + { + $this->assertTrue($this->_model->validate('ClassArgumentWithInterfaceImplementation')); + } + + public function testClassArgumentWithInterface() + { + $this->assertTrue($this->_model->validate('ClassArgumentWithInterface')); + } + + public function testClassArgumentWithAlreadyInjectedInterface() + { + $message = 'Incorrect dependency in class ClassArgumentWithAlreadyInjectedInterface in ' + . $this->_fixturePath . PHP_EOL . '\\InterfaceFirst already exists in context object'; + + $this->setExpectedException('\Magento\Code\ValidationException', $message); + $this->_model->validate('ClassArgumentWithAlreadyInjectedInterface'); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Code/Validator/_files/ClassesForArgumentSequence.php b/dev/tests/unit/testsuite/Magento/Code/Validator/_files/ClassesForArgumentSequence.php new file mode 100644 index 0000000000000000000000000000000000000000..101fc25e36497414aed04174113ebfeba7997626 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Code/Validator/_files/ClassesForArgumentSequence.php @@ -0,0 +1,525 @@ +<?php +/** + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +namespace ArgumentSequence; + +/** + * Constructor Arguments Sequence Rules: + * + * 01. Parent Required Object Arguments + * 02. Parent Required Scalar Arguments + * 03. Child Required Object Arguments + * 04. Child Required Scalar Arguments + * 05. Parent Optional Object Arguments + * 06. Parent Optional Scalar Arguments + * 07. Child Optional Object Arguments + * 08. Child Optional Scalar Arguments + * 09. Context object must go first + * 10. Optional parameter with name data must go first among all optional scalar arguments + */ + +class ContextObject implements \Magento\ObjectManager\ContextInterface +{ + +} + +class ParentRequiredObject +{ + +} + +class ParentOptionalObject +{ + +} + +class ChildRequiredObject +{ + +} + +class ChildOptionalObject +{ + +} + +class ParentClass +{ + protected $contextObject; + protected $parentRequiredObject; + protected $parentRequiredScalar; + protected $parentOptionalObject; + protected $data; + protected $parentOptionalScalar; + + public function __construct( + ContextObject $contextObject, + ParentRequiredObject $parentRequiredObject, + array $parentRequiredScalar, + ParentOptionalObject $parentOptionalObject = null, + array $data = array(), + array $parentOptionalScalar = array() + ) { + $this->contextObject = $contextObject; + $this->parentRequiredObject = $parentRequiredObject; + $this->parentOptionalScalar = $parentRequiredScalar; + $this->parentOptionalObject = $parentOptionalObject; + $this->data = $data; + $this->parentOptionalScalar = $parentOptionalScalar; + } +} + +class ValidChildClass extends ParentClass +{ + protected $childRequiredObject; + protected $childRequiredScalar; + protected $childOptionalObject; + protected $childOptionalScalar; + + /** + * @SuppressWarnings(PHPMD.ExcessiveParameterList) + */ + public function __construct( + ContextObject $contextObject, + ParentRequiredObject $parentRequiredObject, + array $parentRequiredScalar, + ChildRequiredObject $childRequiredObject, + array $childRequiredScalar, + ParentOptionalObject $parentOptionalObject = null, + array $data = array(), + array $parentOptionalScalar = array(), + ChildOptionalObject $childOptionalObject = null, + array $childOptionalScalar = array() + ) { + $this->childRequiredObject = $childRequiredObject; + $this->childRequiredScalar = $childRequiredScalar; + $this->childOptionalObject = $childOptionalObject; + $this->childOptionalScalar = $childOptionalScalar; + + parent::__construct( + $contextObject, + $parentRequiredObject, + $parentRequiredScalar, + $parentOptionalObject, + $data, + $parentOptionalScalar + ); + } +} + +//Rule 01. Parent Required Object Arguments must go first +class InvalidChildClassRule01 extends ParentClass +{ + protected $childRequiredObject; + protected $childRequiredScalar; + protected $childOptionalObject; + protected $childOptionalScalar; + + /** + * @SuppressWarnings(PHPMD.ExcessiveParameterList) + */ + public function __construct( + ContextObject $contextObject, + array $parentRequiredScalar, + ParentRequiredObject $parentRequiredObject, + ChildRequiredObject $childRequiredObject, + array $childRequiredScalar, + ParentOptionalObject $parentOptionalObject = null, + array $data = array(), + array $parentOptionalScalar = array(), + ChildOptionalObject $childOptionalObject = null, + array $childOptionalScalar = array() + ) { + $this->childRequiredObject = $childRequiredObject; + $this->childRequiredScalar = $childRequiredScalar; + $this->childOptionalObject = $childOptionalObject; + $this->childOptionalScalar = $childOptionalScalar; + + parent::__construct( + $contextObject, + $parentRequiredObject, + $parentRequiredScalar, + $parentOptionalObject, + $data, + $parentOptionalScalar + ); + } +} + +// Rule 02. Parent Required Scalar Arguments must go after Parent Required Object Arguments +class InvalidChildClassRule02 extends ParentClass +{ + protected $childRequiredObject; + protected $childRequiredScalar; + protected $childOptionalObject; + protected $childOptionalScalar; + + /** + * @SuppressWarnings(PHPMD.ExcessiveParameterList) + */ + public function __construct( + ContextObject $contextObject, + ParentRequiredObject $parentRequiredObject, + ChildRequiredObject $childRequiredObject, + array $parentRequiredScalar, + array $childRequiredScalar, + ParentOptionalObject $parentOptionalObject = null, + array $data = array(), + array $parentOptionalScalar = array(), + ChildOptionalObject $childOptionalObject = null, + array $childOptionalScalar = array() + ) { + $this->childRequiredObject = $childRequiredObject; + $this->childRequiredScalar = $childRequiredScalar; + $this->childOptionalObject = $childOptionalObject; + $this->childOptionalScalar = $childOptionalScalar; + + parent::__construct( + $contextObject, + $parentRequiredObject, + $parentRequiredScalar, + $parentOptionalObject, + $data, + $parentOptionalScalar + ); + } +} + +//Rule 03. Child Required Object Arguments must go after Parent Required Scalar Arguments +class InvalidChildClassRule03 extends ParentClass +{ + protected $childRequiredObject; + protected $childRequiredScalar; + protected $childOptionalObject; + protected $childOptionalScalar; + + /** + * @SuppressWarnings(PHPMD.ExcessiveParameterList) + */ + public function __construct( + ContextObject $contextObject, + ParentRequiredObject $parentRequiredObject, + array $parentRequiredScalar, + array $childRequiredScalar, + ChildRequiredObject $childRequiredObject, + ParentOptionalObject $parentOptionalObject = null, + array $data = array(), + array $parentOptionalScalar = array(), + ChildOptionalObject $childOptionalObject = null, + array $childOptionalScalar = array() + ) { + $this->childRequiredObject = $childRequiredObject; + $this->childRequiredScalar = $childRequiredScalar; + $this->childOptionalObject = $childOptionalObject; + $this->childOptionalScalar = $childOptionalScalar; + + parent::__construct( + $contextObject, + $parentRequiredObject, + $parentRequiredScalar, + $parentOptionalObject, + $data, + $parentOptionalScalar + ); + } +} + +//Rule 04. Child Required Scalar Arguments must go after Child Required Object Arguments +class InvalidChildClassRule04 extends ParentClass +{ + protected $childRequiredObject; + protected $childRequiredScalar; + protected $childOptionalObject; + protected $childOptionalScalar; + protected $argument; + + /** + * @SuppressWarnings(PHPMD.ExcessiveParameterList) + */ + public function __construct( + ContextObject $contextObject, + ParentRequiredObject $parentRequiredObject, + array $parentRequiredScalar, + ChildRequiredObject $childRequiredObject, + array $childRequiredScalar, + ChildRequiredObject $argument, + ParentOptionalObject $parentOptionalObject = null, + array $data = array(), + array $parentOptionalScalar = array(), + ChildOptionalObject $childOptionalObject = null, + array $childOptionalScalar = array() + ) { + $this->childRequiredObject = $childRequiredObject; + $this->childRequiredScalar = $childRequiredScalar; + $this->childOptionalObject = $childOptionalObject; + $this->childOptionalScalar = $childOptionalScalar; + $this->argument = $argument; + + parent::__construct( + $contextObject, + $parentRequiredObject, + $parentRequiredScalar, + $parentOptionalObject, + $data, + $parentOptionalScalar + ); + } +} + +//Rule 05. Parent Optional Object Arguments must go after Child Required Scalar Arguments +class InvalidChildClassRule05 extends ParentClass +{ + protected $childRequiredObject; + protected $childRequiredScalar; + protected $childOptionalObject; + protected $childOptionalScalar; + + /** + * @SuppressWarnings(PHPMD.ExcessiveParameterList) + */ + public function __construct( + ContextObject $contextObject, + ParentRequiredObject $parentRequiredObject, + array $parentRequiredScalar, + ChildRequiredObject $childRequiredObject, + array $childRequiredScalar, + array $parentOptionalScalar = array(), + ParentOptionalObject $parentOptionalObject = null, + array $data = array(), + ChildOptionalObject $childOptionalObject = null, + array $childOptionalScalar = array() + ) { + $this->childRequiredObject = $childRequiredObject; + $this->childRequiredScalar = $childRequiredScalar; + $this->childOptionalObject = $childOptionalObject; + $this->childOptionalScalar = $childOptionalScalar; + + parent::__construct( + $contextObject, + $parentRequiredObject, + $parentRequiredScalar, + $parentOptionalObject, + $data, + $parentOptionalScalar + ); + } +} + +//Rule 06. Parent Optional Scalar Arguments must go after Parent Optional Object Arguments +class InvalidChildClassRule06 extends ParentClass +{ + protected $childRequiredObject; + protected $childRequiredScalar; + protected $childOptionalObject; + protected $childOptionalScalar; + protected $argument; + + /** + * @SuppressWarnings(PHPMD.ExcessiveParameterList) + */ + public function __construct( + ContextObject $contextObject, + ParentRequiredObject $parentRequiredObject, + array $parentRequiredScalar, + ChildRequiredObject $childRequiredObject, + array $childRequiredScalar, + ParentOptionalObject $parentOptionalObject = null, + array $data = array(), + array $parentOptionalScalar = array(), + ChildOptionalObject $childOptionalObject = null, + array $childOptionalScalar = array(), + ChildOptionalObject $argument = null + ) { + $this->childRequiredObject = $childRequiredObject; + $this->childRequiredScalar = $childRequiredScalar; + $this->childOptionalObject = $childOptionalObject; + $this->childOptionalScalar = $childOptionalScalar; + $this->argument = $argument; + + parent::__construct( + $contextObject, + $parentRequiredObject, + $parentRequiredScalar, + $parentOptionalObject, + $data, + $parentOptionalScalar + ); + } +} + +//Rule 07. Child Optional Object Arguments must go after Parent Optional Scalar Arguments +class InvalidChildClassRule07 extends ParentClass +{ + protected $childRequiredObject; + protected $childRequiredScalar; + protected $childOptionalObject; + protected $childOptionalScalar; + + /** + * @SuppressWarnings(PHPMD.ExcessiveParameterList) + */ + public function __construct( + ContextObject $contextObject, + ParentRequiredObject $parentRequiredObject, + array $parentRequiredScalar, + ChildRequiredObject $childRequiredObject, + array $childRequiredScalar, + ParentOptionalObject $parentOptionalObject = null, + array $data = array(), + array $parentOptionalScalar = array(), + array $childOptionalScalar = array(), + ChildOptionalObject $childOptionalObject = null + ) { + $this->childRequiredObject = $childRequiredObject; + $this->childRequiredScalar = $childRequiredScalar; + $this->childOptionalObject = $childOptionalObject; + $this->childOptionalScalar = $childOptionalScalar; + + parent::__construct( + $contextObject, + $parentRequiredObject, + $parentRequiredScalar, + $parentOptionalObject, + $data, + $parentOptionalScalar + ); + } +} + +//Rule 08. Child Optional Scalar Arguments must go after Child Optional Object Arguments +class InvalidChildClassRule08 extends ParentClass +{ + protected $childRequiredObject; + protected $childRequiredScalar; + protected $childOptionalObject; + protected $childOptionalScalar; + + /** + * @SuppressWarnings(PHPMD.ExcessiveParameterList) + */ + public function __construct( + ContextObject $contextObject, + ParentRequiredObject $parentRequiredObject, + array $parentRequiredScalar, + ChildRequiredObject $childRequiredObject, + array $childRequiredScalar, + ParentOptionalObject $parentOptionalObject = null, + array $data = array(), + ChildOptionalObject $childOptionalObject = null, + array $childOptionalScalar = array(), + array $parentOptionalScalar = array() + ) { + $this->childRequiredObject = $childRequiredObject; + $this->childRequiredScalar = $childRequiredScalar; + $this->childOptionalObject = $childOptionalObject; + $this->childOptionalScalar = $childOptionalScalar; + + parent::__construct( + $contextObject, + $parentRequiredObject, + $parentRequiredScalar, + $parentOptionalObject, + $data, + $parentOptionalScalar + ); + } +} + +//Rule 09. Context object must go first +class InvalidChildClassRule09 extends ParentClass +{ + protected $childRequiredObject; + protected $childRequiredScalar; + protected $childOptionalObject; + protected $childOptionalScalar; + + /** + * @SuppressWarnings(PHPMD.ExcessiveParameterList) + */ + public function __construct( + ParentRequiredObject $parentRequiredObject, + ContextObject $contextObject, + array $parentRequiredScalar, + ChildRequiredObject $childRequiredObject, + array $childRequiredScalar, + ParentOptionalObject $parentOptionalObject = null, + array $data = array(), + array $parentOptionalScalar = array(), + ChildOptionalObject $childOptionalObject = null, + array $childOptionalScalar = array() + ) { + $this->childRequiredObject = $childRequiredObject; + $this->childRequiredScalar = $childRequiredScalar; + $this->childOptionalObject = $childOptionalObject; + $this->childOptionalScalar = $childOptionalScalar; + + parent::__construct( + $contextObject, + $parentRequiredObject, + $parentRequiredScalar, + $parentOptionalObject, + $data, + $parentOptionalScalar + ); + } +} + +// Rule 10. Optional parameter with name data must go first among all optional scalar arguments +class InvalidChildClassRule10 extends ParentClass +{ + protected $childRequiredObject; + protected $childRequiredScalar; + protected $childOptionalObject; + protected $childOptionalScalar; + + /** + * @SuppressWarnings(PHPMD.ExcessiveParameterList) + */ + public function __construct( + ContextObject $contextObject, + ParentRequiredObject $parentRequiredObject, + array $parentRequiredScalar, + ChildRequiredObject $childRequiredObject, + array $childRequiredScalar, + ParentOptionalObject $parentOptionalObject = null, + array $parentOptionalScalar = array(), + array $data = array(), + ChildOptionalObject $childOptionalObject = null, + array $childOptionalScalar = array() + ) { + $this->childRequiredObject = $childRequiredObject; + $this->childRequiredScalar = $childRequiredScalar; + $this->childOptionalObject = $childOptionalObject; + $this->childOptionalScalar = $childOptionalScalar; + + parent::__construct( + $contextObject, + $parentRequiredObject, + $parentRequiredScalar, + $parentOptionalObject, + $data, + $parentOptionalScalar + ); + } +} \ No newline at end of file diff --git a/dev/tests/unit/testsuite/Magento/Code/Validator/_files/ClassesForConstructorIntegrity.php b/dev/tests/unit/testsuite/Magento/Code/Validator/_files/ClassesForConstructorIntegrity.php new file mode 100644 index 0000000000000000000000000000000000000000..7892d91e8fea28fa32468b80187c33bf12c37149 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Code/Validator/_files/ClassesForConstructorIntegrity.php @@ -0,0 +1,209 @@ +<?php +/** + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class ClassA +{ + +} +class ClassB +{ + +} +class ClassC +{ + +} + +interface InterfaceA +{ + +} +class ImplementationOfInterfaceA implements InterfaceA +{ + +} + +interface InterfaceB +{ + +} +class ImplementationOfInterfaceB implements InterfaceB +{ + +} + +class Context implements \Magento\ObjectManager\ContextInterface +{ + /** + * @var ClassA + */ + protected $_exA; + + /** + * @var ClassB + */ + protected $_exB; + + /** + * @var ClassC + */ + protected $_exC; + + /** + * @var InterfaceA + */ + protected $_interfaceA; + + /** + * @var ImplementationOfInterfaceB + */ + protected $_implOfBInterface; + + public function __construct( + \ClassA $exA, \ClassB $exB, \ClassC $exC, + \InterfaceA $interfaceA, + \ImplementationOfInterfaceB $implOfBInterface + ) { + $this->_exA = $exA; + $this->_exB = $exB; + $this->_exC = $exC; + $this->_interfaceA = $interfaceA; + $this->_implOfBInterface = $implOfBInterface; + } +} + +class ClassArgumentAlreadyInjectedIntoContext +{ + /** + * @var Context + */ + protected $_context; + /** + * @var ClassA + */ + protected $_exA; + + /** + * @param Context $context + * @param ClassA $exA + */ + public function __construct(\Context $context, \ClassA $exA) + { + $this->_context = $context; + $this->_exA = $exA; + } +} + +class ClassArgumentWrongOrderForParentArguments extends ClassArgumentAlreadyInjectedIntoContext +{ + /** + * @var Context + */ + protected $_context; + + /** + * @var ClassA + */ + protected $_exA; + + /** + * @var ClassB + */ + protected $_exB; + + /** + * @param Context $context + * @param ClassA $exA + * @param ClassB $exB + */ + public function __construct(\Context $context, \ClassA $exA, \ClassB $exB) + { + parent::__construct($exA, $context); + $this->_context = $context; + $this->_exA = $exA; + $this->_exB = $exB; + } +} + +class ClassArgumentWithOptionalParams +{ + /** + * @var Context + */ + protected $_context; + + /** + * @var array + */ + protected $_data; + + /** + * @param Context $context + * @param array $data + */ + public function __construct(\Context $context, array $data = array()) + { + $this->_context = $context; + $this->_data = $data; + } +} + +class ClassArgumentWithWrongParentArgumentsType extends ClassArgumentWithOptionalParams +{ + /** + * @var Context + */ + protected $_context; + + /** + * @var ClassB + */ + protected $_exB; + + /** + * @var ClassC + */ + protected $_exC; + + /** + * @var array + */ + protected $_data; + + /** + * @param Context $context + * @param ClassB $exB + * @param ClassC $exC + * @param array $data + */ + public function __construct(\Context $context, \ClassB $exB, \ClassC $exC, array $data = array()) + { + parent::__construct($context, $exB); + $this->_context = $context; + $this->_exB = $exB; + $this->_exC = $exC; + $this->_data = $data; + } +} \ No newline at end of file diff --git a/dev/tests/unit/testsuite/Magento/Code/Validator/_files/ClassesForContextAggregation.php b/dev/tests/unit/testsuite/Magento/Code/Validator/_files/ClassesForContextAggregation.php new file mode 100644 index 0000000000000000000000000000000000000000..fb3efa078c20b31c70ef141be3405c60442f90c2 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Code/Validator/_files/ClassesForContextAggregation.php @@ -0,0 +1,195 @@ +<?php +/** + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class ClassFirst +{ + +} +class ClassSecond +{ + +} +class ClassThird +{ + +} +class ClassD +{ + +} +interface InterfaceFirst +{ + +} +class ImplementationOfInterfaceFirst implements InterfaceFirst +{ + +} +interface InterfaceSecond +{ + +} +class ImplementationOfInterfaceSecond implements InterfaceSecond +{ + +} +class ContextFirst implements \Magento\ObjectManager\ContextInterface +{ + /** + * @var ClassFirst + */ + protected $_exA; + + /** + * @var ClassSecond + */ + protected $_exB; + + /** + * @var ClassThird + */ + protected $_exC; + + /** + * @var InterfaceFirst + */ + protected $_interfaceA; + + /** + * @var ImplementationOfInterfaceSecond + */ + protected $_implOfBInterface; + + /** + * @param ClassFirst $exA + * @param ClassSecond $exB + * @param ClassThird $exC + * @param InterfaceFirst $interfaceA + * @param ImplementationOfInterfaceSecond $implOfBInterface + */ + public function __construct( + \ClassFirst $exA, \ClassSecond $exB, \ClassThird $exC, + \InterfaceFirst $interfaceA, + \ImplementationOfInterfaceSecond $implOfBInterface + ) { + $this->_exA = $exA; + $this->_exB = $exB; + $this->_exC = $exC; + $this->_interfaceA = $interfaceA; + $this->_implOfBInterface = $implOfBInterface; + } +} + +class ClassArgumentAlreadyInjectedInContext +{ + /** + * @var ContextFirst + */ + protected $_context; + + /** + * @var ClassFirst + */ + protected $_exA; + + /** + * @param ContextFirst $context + * @param ClassFirst $exA + */ + public function __construct(\ContextFirst $context, \ClassFirst $exA) + { + $this->_context = $context; + $this->_exA = $exA; + } +} + +class ClassArgumentWithInterfaceImplementation +{ + /** + * @var ContextFirst + */ + protected $_context; + + /** + * @var ImplementationOfInterfaceFirst + */ + protected $_exA; + + /** + * @param ContextFirst $context + * @param ImplementationOfInterfaceFirst $exA + */ + public function __construct(\ContextFirst $context, \ImplementationOfInterfaceFirst $exA) + { + $this->_context = $context; + $this->_exA = $exA; + } +} + +class ClassArgumentWithInterface +{ + /** + * @var ContextFirst + */ + protected $_context; + + /** + * @var InterfaceSecond + */ + protected $_exB; + + /** + * @param ContextFirst $context + * @param InterfaceSecond $exB + */ + public function __construct(\ContextFirst $context, \InterfaceSecond $exB) + { + $this->_context = $context; + $this->_exB = $exB; + } +} + +class ClassArgumentWithAlreadyInjectedInterface +{ + /** + * @var ContextFirst + */ + protected $_context; + + /** + * @var InterfaceFirst + */ + protected $_exA; + + /** + * @param ContextFirst $context + * @param InterfaceFirst $exA + */ + public function __construct(\ContextFirst $context, \InterfaceFirst $exA) + { + $this->_context = $context; + $this->_exA = $exA; + } +} \ No newline at end of file diff --git a/dev/tests/unit/testsuite/Magento/Core/App/Action/FormKeyValidatorTest.php b/dev/tests/unit/testsuite/Magento/Core/App/Action/FormKeyValidatorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e19d146681c10d6974ee96d9d69dc9701fbbd689 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Core/App/Action/FormKeyValidatorTest.php @@ -0,0 +1,77 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Core\App\Action; + + +class FormKeyValidatorTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\Core\App\Action\FormKeyValidator + */ + protected $_model; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_sessionMock; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_requestMock; + + protected function setUp() + { + $this->_sessionMock = $this->getMock('Magento\Core\Model\Session', array('getFormKey'), array(), '', false); + $this->_requestMock = $this->getMock('Magento\App\Request\Http', array(), array(), '', false); + $this->_model = new \Magento\Core\App\Action\FormKeyValidator( + $this->_sessionMock + ); + } + + /** + * @param string $formKey + * param bool $expected + * @dataProvider validateDataProvider + */ + public function testValidate($formKey, $expected) + { + $this->_requestMock + ->expects($this->once()) + ->method('getParam') + ->with('form_key', null) + ->will($this->returnValue($formKey)); + $this->_sessionMock->expects($this->once())->method('getFormKey')->will($this->returnValue('formKey')); + $this->assertEquals($expected, $this->_model->validate($this->_requestMock)); + } + + public function validateDataProvider() + { + return array( + 'formKeyExist' => array('formKey', true), + 'formKeyNotEqualToFormKeyInSession' => array('formKeySession', false) + ); + } +} \ No newline at end of file diff --git a/dev/tests/unit/testsuite/Magento/Core/App/Action/Plugin/DesignTest.php b/dev/tests/unit/testsuite/Magento/Core/App/Action/Plugin/DesignTest.php new file mode 100644 index 0000000000000000000000000000000000000000..6bc8ea8479eac14507af9494daeac10755180f42 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Core/App/Action/Plugin/DesignTest.php @@ -0,0 +1,39 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Core\App\Action\Plugin; + +class DesignTest extends \PHPUnit_Framework_TestCase +{ + + public function testAroundDispatch() + { + $designLoaderMock = $this->getMock('Magento\Core\Model\DesignLoader', array(), array(), '', false); + $invocationChainMock = $this->getMock('Magento\Code\Plugin\InvocationChain', array(), array(), '', false); + $plugin = new \Magento\Core\App\Action\Plugin\Design($designLoaderMock); + $designLoaderMock->expects($this->once())->method('load'); + $invocationChainMock->expects($this->once())->method('proceed')->with(array()); + $plugin->aroundDispatch(array(), $invocationChainMock); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Core/App/Action/Plugin/InstallTest.php b/dev/tests/unit/testsuite/Magento/Core/App/Action/Plugin/InstallTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e014b52f5805cb83788b1f26d035fa4887aa4557 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Core/App/Action/Plugin/InstallTest.php @@ -0,0 +1,89 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +namespace Magento\Core\App\Action\Plugin; + +class InstallTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\Core\App\Action\Plugin\Install + */ + protected $_plugin; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_appStateMock; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_response; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_urlMock; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_invocationChainMock; + + protected function setUp() + { + $this->_appStateMock = $this->getMock('Magento\App\State', array(), array(), '', false); + $this->_response = $this->getMock('Magento\App\ResponseInterface', array('setRedirect', 'sendResponse')); + $this->_urlMock = $this->getMock('Magento\Core\Model\Url', array(), array(), '', false); + $this->_invocationChainMock = + $this->getMock('Magento\Code\Plugin\InvocationChain', array(), array(), '', false); + $this->_plugin = new \Magento\Core\App\Action\Plugin\Install( + $this->_appStateMock, + $this->_response, + $this->_urlMock, + $this->getMock('\Magento\App\ActionFlag', array(), array(), '', false) + ); + } + + public function testAroundDispatch() + { + $url = 'http://example.com'; + $this->_appStateMock->expects($this->once())->method('isInstalled')->will($this->returnValue(false)); + $this->_urlMock->expects($this->once())->method('getUrl')->with('install')->will($this->returnValue($url)); + $this->_response->expects($this->once())->method('setRedirect')->with($url); + $this->_invocationChainMock->expects($this->never())->method('proceed'); + $this->_plugin->aroundDispatch(array(), $this->_invocationChainMock); + } + + public function testAroundDispatchWhenApplicationIsInstalled() + { + $this->_appStateMock->expects($this->once())->method('isInstalled')->will($this->returnValue(true)); + + $this->_invocationChainMock + ->expects($this->once()) + ->method('proceed') + ->with(array()) + ->will($this->returnValue('ExpectedValue')); + $this->_plugin->aroundDispatch(array(), $this->_invocationChainMock); + } +} \ No newline at end of file diff --git a/dev/tests/unit/testsuite/Magento/Core/App/Action/Plugin/LastUrlTest.php b/dev/tests/unit/testsuite/Magento/Core/App/Action/Plugin/LastUrlTest.php new file mode 100644 index 0000000000000000000000000000000000000000..d5b05cd2fdf645055226935cd11e281e5683a360 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Core/App/Action/Plugin/LastUrlTest.php @@ -0,0 +1,42 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +namespace Magento\Core\App\Action\Plugin; + +class LastUrlTest extends \PHPUnit_Framework_TestCase +{ + public function testAfterDispatch() + { + $session = $this->getMock('\Magento\Core\Model\Session', array('setLastUrl'), array(), '', false); + $url = $this->getMock('\Magento\Core\Model\Url', array(), array(), '', false); + $plugin = new \Magento\Core\App\Action\Plugin\LastUrl($session, $url); + $session->expects($this->once())->method('setLastUrl')->with('http://example.com'); + $invocationChainMock = $this->getMock('Magento\Code\Plugin\InvocationChain', array(), array(), '', false); + $invocationChainMock->expects($this->once())->method('proceed')->will($this->returnValue('result')); + $url->expects($this->once()) + ->method('getUrl') + ->with('*/*/*', array('_current' => true)) + ->will($this->returnValue('http://example.com')); + $this->assertEquals('result', $plugin->aroundDispatch(array(), $invocationChainMock)); + } +} \ No newline at end of file diff --git a/dev/tests/unit/testsuite/Magento/Core/App/Action/Plugin/StoreCheckTest.php b/dev/tests/unit/testsuite/Magento/Core/App/Action/Plugin/StoreCheckTest.php new file mode 100644 index 0000000000000000000000000000000000000000..226308f3d0dac24868372e0e950e82dbfbc7fef1 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Core/App/Action/Plugin/StoreCheckTest.php @@ -0,0 +1,73 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +namespace Magento\Core\App\Action\Plugin; + +class StoreCheckTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\Core\App\Action\Plugin\StoreCheck + */ + protected $_plugin; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_storeManagerMock; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_storeMock; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_invocationChainMock; + + protected function setUp() + { + $this->_storeManagerMock = $this->getMock('Magento\Core\Model\StoreManagerInterface'); + $this->_storeMock = $this->getMock('Magento\Core\Model\Store', array(), array(), '', false); + $this->_storeManagerMock + ->expects($this->any())->method('getStore')->will($this->returnValue($this->_storeMock)); + $this->_invocationChainMock = + $this->getMock('Magento\Code\Plugin\InvocationChain', array(), array(), '', false); + $this->_invocationChainMock->expects($this->once())->method('proceed'); + $this->_plugin = new \Magento\Core\App\Action\Plugin\StoreCheck($this->_storeManagerMock); + } + + public function testBeforeDispatchWhenStoreNotActive() + { + $this->_storeMock->expects($this->any())->method('getIsActive')->will($this->returnValue(false)); + $this->_storeManagerMock->expects($this->once())->method('throwStoreException'); + $this->_plugin->aroundDispatch(array(), $this->_invocationChainMock); + } + + public function testBeforeDispatchWhenStoreIsActive() + { + $this->_storeMock->expects($this->any())->method('getIsActive')->will($this->returnValue(true)); + $this->_storeManagerMock->expects($this->never())->method('throwStoreException'); + $this->_plugin->aroundDispatch(array(), $this->_invocationChainMock); + } +} \ No newline at end of file diff --git a/dev/tests/unit/testsuite/Magento/Core/App/Area/Request/PathInfoProcessorTest.php b/dev/tests/unit/testsuite/Magento/Core/App/Area/Request/PathInfoProcessorTest.php index 2aebe7588ec542f7305826d4904ff1cbc9685492..54b429dca10f0e1c34597baf18b2a1d0b8365668 100644 --- a/dev/tests/unit/testsuite/Magento/Core/App/Area/Request/PathInfoProcessorTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/App/Area/Request/PathInfoProcessorTest.php @@ -79,7 +79,7 @@ class PathInfoProcessorTest extends \PHPUnit_Framework_TestCase $this->_requestMock ->expects($this->once())->method('isDirectAccessFrontendName') ->with('storeCode')->will($this->returnValue(true)); - $this->_requestMock->expects($this->once())->method('setActionName')->with('noRoute'); + $this->_requestMock->expects($this->once())->method('setActionName')->with('noroute'); $this->assertEquals($this->_pathInfo, $this->_model->process($this->_requestMock, $this->_pathInfo)); } diff --git a/dev/tests/unit/testsuite/Magento/Core/Controller/NorouteTest.php b/dev/tests/unit/testsuite/Magento/Core/Controller/NorouteTest.php new file mode 100644 index 0000000000000000000000000000000000000000..4143d7fcf5fa328ff45153e2c81f5a51acb60d9e --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Core/Controller/NorouteTest.php @@ -0,0 +1,102 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Core\Controller; + + +class NorouteTest extends \PHPUnit_Framework_TestCase +{ + + /** + * @var \Magento\Core\Controller\Noroute + */ + protected $_controller; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_requestMock; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_viewMock; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_statusMock; + + protected function setUp() + { + $helper = new \Magento\TestFramework\Helper\ObjectManager($this); + $this->_requestMock = $this->getMock('Magento\App\Request\Http', array(), array(), '', false); + $this->_viewMock = $this->getMock('\Magento\App\ViewInterface'); + $this->_statusMock = $this->getMock('Magento\Object', array('getLoaded'), array(), '', false); + $this->_controller = $helper->getObject('Magento\Core\Controller\Noroute', array( + 'request' => $this->_requestMock, + 'view' =>$this->_viewMock + ) + ); + } + + public function testIndexActionWhenStatusNotLoaded() + { + $this->_requestMock + ->expects($this->once()) + ->method('getParam') + ->with('__status__') + ->will($this->returnValue($this->_statusMock)); + $this->_statusMock->expects($this->any())->method('getLoaded')->will($this->returnValue(false)); + $this->_viewMock->expects($this->once())->method('loadLayout')->with(array('default', 'noroute')); + $this->_viewMock->expects($this->once())->method('renderLayout'); + $this->_controller->indexAction(); + } + + public function testIndexActionWhenStatusLoaded() + { + $this->_requestMock + ->expects($this->once()) + ->method('getParam') + ->with('__status__') + ->will($this->returnValue($this->_statusMock)); + $this->_statusMock->expects($this->any())->method('getLoaded')->will($this->returnValue(true)); + $this->_statusMock->expects($this->any())->method('getForwarded')->will($this->returnValue(false)); + $this->_viewMock->expects($this->never())->method('loadLayout'); + $this->_requestMock->expects($this->once()) + ->method('setActionName') + ->will($this->returnValue($this->_requestMock)); + $this->_controller->indexAction(); + } + + public function testIndexActionWhenStatusNotInstanceofMagentoObject() + { + $this->_requestMock + ->expects($this->once()) + ->method('getParam') + ->with('__status__') + ->will($this->returnValue('string')); + $this->_controller->indexAction(); + } +} \ No newline at end of file diff --git a/dev/tests/unit/testsuite/Magento/Core/Controller/Request/HttpTest.php b/dev/tests/unit/testsuite/Magento/Core/Controller/Request/HttpTest.php index 573c3ab53de5b9f84d2ec9c33f3cb3f61a061bd8..76458e49daa7c73306882bcbb106f909368a492e 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Controller/Request/HttpTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Controller/Request/HttpTest.php @@ -37,7 +37,9 @@ class HttpTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->_routerListMock = $this->getMock('\Magento\App\Route\ConfigInterface'); - $this->_model = new \Magento\App\Request\Http($this->_routerListMock); + $infoProcessorMock = $this->getMock('Magento\App\Request\PathInfoProcessorInterface'); + $infoProcessorMock->expects($this->any())->method('process')->will($this->returnArgument(1)); + $this->_model = new \Magento\App\Request\Http($this->_routerListMock, $infoProcessorMock); } /** diff --git a/dev/tests/unit/testsuite/Magento/Core/Controller/Varien/AbstractActionTest.php b/dev/tests/unit/testsuite/Magento/Core/Controller/Varien/AbstractActionTest.php deleted file mode 100644 index 10a92e5847a406cc0d9c963e05675c56457e3ecd..0000000000000000000000000000000000000000 --- a/dev/tests/unit/testsuite/Magento/Core/Controller/Varien/AbstractActionTest.php +++ /dev/null @@ -1,132 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * 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_Core - * @subpackage unit_tests - * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - -namespace Magento\Core\Controller\Varien; - -/** - * Test class \Magento\Core\Controller\Varien\AbstractAction - */ -class AbstractActionTest extends \PHPUnit_Framework_TestCase -{ - /** - * @var \Magento\App\Action\AbstractAction - */ - protected $_actionAbstract; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $_request; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $_response; - - /** - * Setup before tests - * - * Create request, response and forward action (child of AbstractAction) - */ - protected function setUp() - { - $this->_request = $this->getMock('Magento\App\Request\Http', array(), array(), '', false); - $this->_response = $this->getMock('Magento\App\Response\Http', array(), array(), '', false); - $this->_response->headersSentThrowsException = false; - $this->_actionAbstract = new \Magento\App\Action\Forward($this->_request, $this->_response); - } - - /** - * Test for getRequest method - * - * @test - * @covers \Magento\App\Action\AbstractAction::getRequest - */ - public function testGetRequest() - { - $this->assertEquals($this->_request, $this->_actionAbstract->getRequest()); - } - - /** - * Test for getResponse method - * - * @test - * @covers \Magento\App\Action\AbstractAction::getResponse - */ - public function testGetResponse() - { - $this->assertEquals($this->_response, $this->_actionAbstract->getResponse()); - } - - /** - * Test for getResponse med. Checks that response headers are set correctly - * - * @test - * @covers \Magento\App\Action\AbstractAction::getResponse - */ - public function testResponseHeaders() - { - $routerListMock = $this->getMock('Magento\App\Route\ConfigInterface'); - $request = new \Magento\App\Request\Http($routerListMock); - $response = new \Magento\App\Response\Http(); - $response->headersSentThrowsException = false; - $action = new \Magento\App\Action\Forward($request, $response); - - $headers = array( - array( - 'name' => 'X-Frame-Options', - 'value' => 'SAMEORIGIN', - 'replace' => false - ) - ); - - $this->assertEquals($headers, $action->getResponse()->getHeaders()); - } - - /** - * Test for getFullActionName method - * - * @test - * @covers \Magento\App\Action\AbstractAction::getFullActionName - */ - public function testGetFullActionName() - { - $this->_request->expects($this->once()) - ->method('getRequestedRouteName') - ->will($this->returnValue('adminhtml')); - - $this->_request->expects($this->once()) - ->method('getRequestedControllerName') - ->will($this->returnValue('index')); - - $this->_request->expects($this->once()) - ->method('getRequestedActionName') - ->will($this->returnValue('index')); - - $this->assertEquals('adminhtml_index_index', $this->_actionAbstract->getFullActionName()); - } -} diff --git a/dev/tests/unit/testsuite/Magento/Core/Controller/Varien/Action/FactoryTest.php b/dev/tests/unit/testsuite/Magento/Core/Controller/Varien/Action/FactoryTest.php deleted file mode 100644 index 9a2aa76dfb2b6dd8b2f6b30aa6548dffac61d527..0000000000000000000000000000000000000000 --- a/dev/tests/unit/testsuite/Magento/Core/Controller/Varien/Action/FactoryTest.php +++ /dev/null @@ -1,75 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * 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_Core - * @subpackage unit_tests - * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - -namespace Magento\Core\Controller\Varien\Action; - -/** - * Test class \Magento\Core\Controller\Varien\Action\Factory - */ -class FactoryTest extends \PHPUnit_Framework_TestCase -{ - /* - * Test controller class name - */ - const CONTROLLER_NAME = 'TestController'; - - /** - * ObjectManager mock for tests - * - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $_objectManager; - - /** - * Test class instance - * - * @var \Magento\App\ActionFactory - */ - protected $_model; - - protected function setUp() - { - $this->_objectManager = $this->getMock('Magento\ObjectManager'); - } - - public function testConstruct() - { - $this->_model = new \Magento\App\ActionFactory($this->_objectManager); - $this->assertAttributeInstanceOf('Magento\ObjectManager', '_objectManager', $this->_model); - } - - public function testCreateController() - { - $this->_objectManager->expects($this->at(1)) - ->method('create') - ->with(self::CONTROLLER_NAME) - ->will($this->returnValue('TestControllerInstance')); - - $this->_model = new \Magento\App\ActionFactory($this->_objectManager); - $this->assertEquals('TestControllerInstance', $this->_model->createController(self::CONTROLLER_NAME)); - } -} diff --git a/dev/tests/unit/testsuite/Magento/Core/Controller/Varien/Action/ForwardTest.php b/dev/tests/unit/testsuite/Magento/Core/Controller/Varien/Action/ForwardTest.php deleted file mode 100644 index 4ab9a3a2f97dc1a5ca7456719aa01eb7d5715fd3..0000000000000000000000000000000000000000 --- a/dev/tests/unit/testsuite/Magento/Core/Controller/Varien/Action/ForwardTest.php +++ /dev/null @@ -1,81 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * 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_Core - * @subpackage unit_tests - * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - -/** - * Test class \Magento\Core\Controller\Varien\Action\Forward - */ -namespace Magento\Core\Controller\Varien\Action; - -class ForwardTest extends \PHPUnit_Framework_TestCase -{ - /** - * @var \Magento\App\Action\Forward - */ - protected $_object = null; - - /** - * @var \Magento\App\RequestInterface - */ - protected $_request; - - /** - * @var \Magento\App\Response\Http - */ - protected $_response; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $_routerListMock; - - protected function setUp() - { - $this->_routerListMock = $this->getMock('Magento\App\Route\ConfigInterface'); - $this->_request = new \Magento\App\Request\Http($this->_routerListMock); - $this->_response = new \Magento\App\Response\Http(); - - $this->_object = new \Magento\App\Action\Forward($this->_request, $this->_response); - } - - protected function tearDown() - { - unset($this->_object); - unset($this->_request); - unset($this->_response); - } - - /** - * Test that \Magento\Core\Controller\Varien\Action\Forward::dispatch() does not change dispatched flag - */ - public function testDispatch() - { - $this->_request->setDispatched(true); - $this->assertTrue($this->_request->isDispatched()); - $this->_object->dispatch('any action'); - $this->assertFalse($this->_request->isDispatched()); - } -} diff --git a/dev/tests/unit/testsuite/Magento/Core/Controller/Varien/Action/RedirectTest.php b/dev/tests/unit/testsuite/Magento/Core/Controller/Varien/Action/RedirectTest.php deleted file mode 100644 index 0c5d634213d72153e9545bd6b88c23f90921c420..0000000000000000000000000000000000000000 --- a/dev/tests/unit/testsuite/Magento/Core/Controller/Varien/Action/RedirectTest.php +++ /dev/null @@ -1,83 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * 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_Core - * @subpackage unit_tests - * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - -/** - * Test class \Magento\Core\Controller\Varien\Action\Redirect - */ -namespace Magento\Core\Controller\Varien\Action; - -class RedirectTest extends \PHPUnit_Framework_TestCase -{ - /** - * @var \Magento\App\Action\Redirect - */ - protected $_object = null; - - /** - * @var \Magento\App\RequestInterface - */ - protected $_request; - - /** - * @var \Magento\App\Response\Http - */ - protected $_response; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $_routerListMock; - - protected function setUp() - { - $this->_routerListMock = $this->getMock('Magento\App\Route\ConfigInterface', array(), array(), '', false); - $this->_request = new \Magento\App\Request\Http($this->_routerListMock); - $this->_response = new \Magento\App\Response\Http(); - - $this->_object = new \Magento\App\Action\Redirect($this->_request, $this->_response); - } - - protected function tearDown() - { - unset($this->_object); - unset($this->_request); - unset($this->_response); - } - - public function testDispatch() - { - $this->_request->setDispatched(true); - $this->assertTrue($this->_request->isDispatched()); - $this->_object->dispatch('any action'); - $this->assertTrue($this->_request->isDispatched()); - - $this->_request->setDispatched(false); - $this->assertFalse($this->_request->isDispatched()); - $this->_object->dispatch('any action'); - $this->assertFalse($this->_request->isDispatched()); - } -} diff --git a/dev/tests/unit/testsuite/Magento/Core/Filter/DateTest.php b/dev/tests/unit/testsuite/Magento/Core/Filter/DateTest.php new file mode 100644 index 0000000000000000000000000000000000000000..50d0ec16ba16b01f8b990178e1860d994b650ff1 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Core/Filter/DateTest.php @@ -0,0 +1,21 @@ +<?php +/** + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +namespace Magento\Core\Filter; + +class DateTest extends \PHPUnit_Framework_TestCase +{ + public function testFilter() + { + $localeMock = $this->getMock('\Magento\Core\Model\LocaleInterface'); + $localeMock->expects($this->once()) + ->method('getDateFormat') + ->with(\Magento\Core\Model\LocaleInterface::FORMAT_TYPE_SHORT) + ->will($this->returnValue('MM-dd-yyyy')); + $model = new Date($localeMock); + // Check that date is converted to 'yyyy-MM-dd' format + $this->assertEquals('2241-12-31', $model->filter('12-31-2241')); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Core/Filter/DateTimeTest.php b/dev/tests/unit/testsuite/Magento/Core/Filter/DateTimeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..4ce5669e4193b166be18d1a51e53302fbd1ad9e3 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Core/Filter/DateTimeTest.php @@ -0,0 +1,21 @@ +<?php +/** + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +namespace Magento\Core\Filter; + +class DateTimeTest extends \PHPUnit_Framework_TestCase +{ + public function testFilter() + { + $localeMock = $this->getMock('\Magento\Core\Model\LocaleInterface'); + $localeMock->expects($this->once()) + ->method('getDateTimeFormat') + ->with(\Magento\Core\Model\LocaleInterface::FORMAT_TYPE_SHORT) + ->will($this->returnValue('HH:mm:ss MM-dd-yyyy')); + $model = new DateTime($localeMock); + // Check that datetime is converted to 'yyyy-MM-dd HH:mm:ss' format + $this->assertEquals('2241-12-31 23:59:53', $model->filter('23:59:53 12-31-2241')); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Core/Helper/CookieTest.php b/dev/tests/unit/testsuite/Magento/Core/Helper/CookieTest.php index 08abeee40e58400d66edee526064f96ec092b8c7..aa3af8956e27aedca26232910567bdbf72aeeac7 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Helper/CookieTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Helper/CookieTest.php @@ -37,7 +37,7 @@ class CookieTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->_object = new \Magento\Core\Helper\Cookie( - $this->getMock('Magento\Core\Helper\Context', array(), array(), '', false, false), + $this->getMock('Magento\App\Helper\Context', array(), array(), '', false, false), $this->getMock('Magento\Core\Model\StoreManager', array(), array(), '', false, false), $this->getMock('Magento\Core\Model\Cookie', array(), array(), '', false, false), array( @@ -52,7 +52,7 @@ class CookieTest extends \PHPUnit_Framework_TestCase { $this->assertFalse($this->_object->isUserNotAllowSaveCookie()); $this->_object = new \Magento\Core\Helper\Cookie( - $this->getMock('Magento\Core\Helper\Context', array(), array(), '', false, false), + $this->getMock('Magento\App\Helper\Context', array(), array(), '', false, false), $this->getMock('Magento\Core\Model\StoreManager', array(), array(), '', false, false), $this->getMock('Magento\Core\Model\Cookie', array(), array(), '', false, false), array( @@ -80,7 +80,7 @@ class CookieTest extends \PHPUnit_Framework_TestCase ->will($this->returnCallback('Magento\\Core\\Helper\\CookieTest::getConfigMethodStub')) ->with($this->equalTo('web/cookie/cookie_restriction_lifetime')); $this->_object = new \Magento\Core\Helper\Cookie( - $this->getMock('Magento\Core\Helper\Context', array(), array(), '', false, false), + $this->getMock('Magento\App\Helper\Context', array(), array(), '', false, false), $this->getMock('Magento\Core\Model\StoreManager', array(), array(), '', false, false), $this->getMock('Magento\Core\Model\Cookie', array(), array(), '', false, false), array( diff --git a/dev/tests/unit/testsuite/Magento/Core/Helper/ThemeTest.php b/dev/tests/unit/testsuite/Magento/Core/Helper/ThemeTest.php index 051698b63b4ce54fa430e8e5679b9f9417473e87..64a9d2ac9dc7bdcad6a83b63338102ca0994849d 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Helper/ThemeTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Helper/ThemeTest.php @@ -58,8 +58,8 @@ class ThemeTest extends \PHPUnit_Framework_TestCase /** @var $themeCollection \Magento\Core\Model\Resource\Theme\Collection */ $themeCollection = $this->getMock('Magento\Core\Model\Resource\Theme\Collection', null, array(), '', false); - /** @var $context \Magento\Core\Helper\Context */ - $context = $this->getMock('Magento\Core\Helper\Context', null, array(), '', false); + /** @var $context \Magento\App\Helper\Context */ + $context = $this->getMock('Magento\App\Helper\Context', null, array(), '', false); $fileSystem = $this->getMockBuilder('Magento\View\FileSystem')->disableOriginalConstructor() ->getMock(); @@ -113,8 +113,8 @@ class ThemeTest extends \PHPUnit_Framework_TestCase $themeCollection = $this->getMock('Magento\Core\Model\Resource\Theme\Collection', null, array(), '', false); // 6. - /** @var $context \Magento\Core\Helper\Context */ - $context = $this->getMock('Magento\Core\Helper\Context', null, array(), '', false); + /** @var $context \Magento\App\Helper\Context */ + $context = $this->getMock('Magento\App\Helper\Context', null, array(), '', false); // 7. Get view file system model mock $params = array( @@ -576,8 +576,8 @@ class ThemeTest extends \PHPUnit_Framework_TestCase /** @var $processorFactory \Magento\View\Layout\ProcessorFactory|\PHPUnit_Framework_MockObject_MockObject */ $processorFactory = $this->getMock('Magento\View\Layout\ProcessorFactory', array('create'), array(), '', false); - /** @var $context \Magento\Core\Helper\Context */ - $context = $this->getMock('Magento\Core\Helper\Context', null, array(), '', false); + /** @var $context \Magento\App\Helper\Context */ + $context = $this->getMock('Magento\App\Helper\Context', null, array(), '', false); /** @var $fileSystem \Magento\View\FileSystem|\PHPUnit_Framework_MockObject_MockObject */ $fileSystem = $this->getMockBuilder('Magento\View\FileSystem', array()) diff --git a/dev/tests/unit/testsuite/Magento/Core/Helper/Url/RewriteTest.php b/dev/tests/unit/testsuite/Magento/Core/Helper/Url/RewriteTest.php index 4a1b7694ef1a28744dac6aa194cc5b66e0b34ddf..1523dc5bf81d5a00bc362c110a341b39aad2bdb9 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Helper/Url/RewriteTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Helper/Url/RewriteTest.php @@ -65,7 +65,7 @@ class RewriteTest extends \PHPUnit_Framework_TestCase array(), '', false, false); $optionsMock->expects($this->any())->method('getRedirectOptions')->will($this->returnValue(array('R', 'RP'))); $helper = new \Magento\Core\Helper\Url\Rewrite( - $this->getMock('Magento\Core\Helper\Context', array(), array(), '', false, false), + $this->getMock('Magento\App\Helper\Context', array(), array(), '', false, false), $optionsMock ); $mockObject = new \Magento\Object(); diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/DesignLoaderTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/DesignLoaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e6be4f17fcebac977087cf822be47ccaebe326b5 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Core/Model/DesignLoaderTest.php @@ -0,0 +1,72 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Core\Model; + +class DesignLoaderTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\Core\Model\DesignLoader + */ + protected $_model; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_appMock; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_requestMock; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_layoutMock; + + protected function setUp() + { + $this->_appMock = $this->getMock('\Magento\Core\Model\App', array(), array(), '', false); + $this->_requestMock = $this->getMock('Magento\App\Request\Http', array(), array(), '', false); + $this->_layoutMock = $this->getMock('Magento\View\LayoutInterface'); + $this->_model = new \Magento\Core\Model\DesignLoader( + $this->_requestMock, + $this->_appMock, + $this->_layoutMock + ); + } + + public function testLoad() + { + $area = $this->getMock('Magento\Core\Model\App\Area', array(), array(), '', false); + $this->_layoutMock->expects($this->once())->method('getArea')->will($this->returnValue('area')); + $this->_appMock->expects($this->once())->method('getArea')->with('area')->will($this->returnValue($area)); + $area->expects($this->at(0))->method('load') + ->with(\Magento\Core\Model\App\Area::PART_DESIGN)->will($this->returnValue($area)); + $area->expects($this->at(1))->method('load') + ->with(\Magento\Core\Model\App\Area::PART_TRANSLATE)->will($this->returnValue($area)); + $this->_model->load($this->_requestMock); + } +} \ No newline at end of file diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/File/Storage/MediaTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/File/Storage/MediaTest.php index 17e6d421d17c859569d6805e4c94822e7c83264e..d8d633e9bd7a6286928479753b9f95b2cf027a2a 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/File/Storage/MediaTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/File/Storage/MediaTest.php @@ -38,7 +38,7 @@ class MediaTest extends \PHPUnit_Framework_TestCase protected $_loggerMock; /** - * @var \Magento\Core\Helper\Context + * @var \Magento\App\Helper\Context */ protected $_storageHelperMock; diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Layout/Argument/Handler/TestHelper.php b/dev/tests/unit/testsuite/Magento/Core/Model/Layout/Argument/Handler/TestHelper.php index b84f336adecc4cf9b1cfaf8c8d770d4f972a89af..021db10edca59f4ab539c088cbe5e93ac2b0823c 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/Layout/Argument/Handler/TestHelper.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/Layout/Argument/Handler/TestHelper.php @@ -27,7 +27,7 @@ namespace Magento\Core\Model\Layout\Argument\Handler; -class TestHelper extends \Magento\Core\Helper\AbstractHelper +class TestHelper extends \Magento\App\Helper\AbstractHelper { public function testMethod() { diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Layout/MergeTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Layout/MergeTest.php index f0f1f26f227b1071c0ed7db9f2e1e7ff99992e5c..88df23167e2c00ab01d7af1a0144dd400095ceb4 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/Layout/MergeTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/Layout/MergeTest.php @@ -29,7 +29,7 @@ class MergeTest extends \PHPUnit_Framework_TestCase /** * Fixture XML instruction(s) to be used in tests */ - const FIXTURE_LAYOUT_XML = '<block class="Magento\Core\Block\Template" template="fixture.phtml"/>'; + const FIXTURE_LAYOUT_XML = '<block class="Magento\View\Block\Template" template="fixture.phtml"/>'; /** * @var \Magento\Core\Model\Layout\Merge @@ -178,8 +178,8 @@ class MergeTest extends \PHPUnit_Framework_TestCase $this->assertEquals($handles, $this->_model->getHandles()); $expectedResult = ' <root> - <block class="Magento\Core\Block\Template" template="fixture_template_one.phtml"/> - <block class="Magento\Core\Block\Template" template="fixture_template_two.phtml"/> + <block class="Magento\View\Block\Template" template="fixture_template_one.phtml"/> + <block class="Magento\View\Block\Template" template="fixture_template_two.phtml"/> </root> '; $actualResult = '<root>' . $this->_model->asString() . '</root>'; diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Layout/_files/layout/fixture_handle_one.xml b/dev/tests/unit/testsuite/Magento/Core/Model/Layout/_files/layout/fixture_handle_one.xml index cfc16eda860cd3eef9eccd778651197d6446b902..13ecf2a8dfabec782b5ad9050e76cf7849d16d28 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/Layout/_files/layout/fixture_handle_one.xml +++ b/dev/tests/unit/testsuite/Magento/Core/Model/Layout/_files/layout/fixture_handle_one.xml @@ -24,5 +24,5 @@ */ --> <layout> - <block class="Magento\Core\Block\Template" template="fixture_template_one.phtml"/> + <block class="Magento\View\Block\Template" template="fixture_template_one.phtml"/> </layout> diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Layout/_files/layout/fixture_handle_two.xml b/dev/tests/unit/testsuite/Magento/Core/Model/Layout/_files/layout/fixture_handle_two.xml index 4e8876eb76c5744e1338699bd668b760a5d860c5..ce411351d14747647b3779e8da08eea96dc357fc 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/Layout/_files/layout/fixture_handle_two.xml +++ b/dev/tests/unit/testsuite/Magento/Core/Model/Layout/_files/layout/fixture_handle_two.xml @@ -24,5 +24,5 @@ */ --> <layout> - <block class="Magento\Core\Block\Template" template="fixture_template_two.phtml"/> + <block class="Magento\View\Block\Template" template="fixture_template_two.phtml"/> </layout> diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Layout/_files/merged.xml b/dev/tests/unit/testsuite/Magento/Core/Model/Layout/_files/merged.xml index 8949e8f0d88d50f7404b311f95e38d53ef7db890..872794f93bfd0b0ab7100034f7854c737050f032 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/Layout/_files/merged.xml +++ b/dev/tests/unit/testsuite/Magento/Core/Model/Layout/_files/merged.xml @@ -42,10 +42,10 @@ <container name="content" as="content" label="Main Content Area"/> </handle> <handle id="fixture_handle_one"> - <block class="Magento\Core\Block\Template" template="fixture_template_one.phtml"/> + <block class="Magento\View\Block\Template" template="fixture_template_one.phtml"/> </handle> <handle id="fixture_handle_two"> - <block class="Magento\Core\Block\Template" template="fixture_template_two.phtml"/> + <block class="Magento\View\Block\Template" template="fixture_template_two.phtml"/> </handle> <handle id="not_a_page_type" label="Handle that Is Not a Page Type"/> <handle id="page_empty" label="All Empty Layout Pages" design_abstraction="page_layout"/> diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/StoreManagerTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/StoreManagerTest.php index d1098d22c59b67e34ff12c4ad7fed11872b20dbc..12c3a6e7169cd5d94728a405dc12baadb40b0d7a 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/StoreManagerTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/StoreManagerTest.php @@ -60,7 +60,7 @@ class StoreManagerTest extends \PHPUnit_Framework_TestCase { $this->_factoryMock = $this->getMock('Magento\Core\Model\Store\StorageFactory', array(), array(), '', false); $this->_requestMock = $this->getMock('Magento\App\RequestInterface', array(), array(), '', false); - $this->_helperFactoryMock = $this->getMock('Magento\Core\Model\Factory\Helper', array(), array(), '', false); + $this->_helperFactoryMock = $this->getMock('Magento\App\Helper\HelperFactory', array(), array(), '', false); $this->_storage = $this->getMock('Magento\Core\Model\Store\StorageInterface'); $this->_model = new \Magento\Core\Model\StoreManager( @@ -202,7 +202,7 @@ class StoreManagerTest extends \PHPUnit_Framework_TestCase ->will($this->throwException(new \Exception('test'))); $this->_storage->expects($this->once())->method('getCurrentStore')->will($this->returnValue('current')); - $this->_requestMock->expects($this->once())->method('setActionName')->with('noRoute'); + $this->_requestMock->expects($this->once())->method('setActionName')->with('noroute'); $this->assertInstanceOf('Magento\Object', $this->_model->getSafeStore(10)); } diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Theme/Image/PathTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Theme/Image/PathTest.php index 05ced049f637b1be1edd423b64d36cf5cee1a5b9..3eacb9cef12f2a6c0bd7aff4f0672f684caca265 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/Theme/Image/PathTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/Theme/Image/PathTest.php @@ -89,7 +89,7 @@ class PathTest extends \PHPUnit_Framework_TestCase } /** - * @covers \Magento\Core\Model\Theme\Image\PathMagento\Core\Model\Theme\Image\Path::getPreviewImageDefaultUrl + * @covers Magento\Core\Model\Theme\Image\Path::getPreviewImageDefaultUrl */ public function testDefaultPreviewImageUrlGetter() { diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/View/Design/ProxyTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/View/Design/ProxyTest.php deleted file mode 100644 index 8fdabac5f1ea9c030112451ceb2f845e3f93b90b..0000000000000000000000000000000000000000 --- a/dev/tests/unit/testsuite/Magento/Core/Model/View/Design/ProxyTest.php +++ /dev/null @@ -1,69 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - -namespace Magento\Core\Model\View\Design; - -class ProxyTest extends \PHPUnit_Framework_TestCase -{ - /** - * @var \Magento\Core\Model\View\Design\Proxy - */ - protected $_model; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\ObjectManager - */ - protected $_objectManager; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\View\DesignInterface - */ - protected $_viewDesign; - - protected function setUp() - { - $this->_objectManager = $this->getMock('Magento\ObjectManager'); - $this->_viewDesign = $this->getMock('Magento\View\DesignInterface'); - $this->_objectManager->expects($this->once()) - ->method('get') - ->with('Magento\Core\Model\View\Design') - ->will($this->returnValue($this->_viewDesign)); - $this->_model = new \Magento\Core\Model\View\Design\Proxy($this->_objectManager); - } - - protected function tearDown() - { - $this->_objectManager = null; - $this->_model = null; - $this->_viewDesign = null; - } - - public function testGetDesignParams() - { - $this->_viewDesign->expects($this->once()) - ->method('getDesignParams') - ->will($this->returnValue('return value')); - $this->assertSame('return value', $this->_model->getDesignParams()); - } -} diff --git a/dev/tests/unit/testsuite/Magento/Customer/Block/Account/AuthorizationLinkTest.php b/dev/tests/unit/testsuite/Magento/Customer/Block/Account/AuthorizationLinkTest.php index b197d311b5a2db576458173f200e6e4b94abaee6..c8024168d82b29df36caacae2a02f1239b85b495 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Block/Account/AuthorizationLinkTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Block/Account/AuthorizationLinkTest.php @@ -63,7 +63,7 @@ class AuthorizationLinkTest extends \PHPUnit_Framework_TestCase ->setMethods(array('getLogoutUrl', 'getLoginUrl')) ->getMock(); - $context = $this->_objectManager->getObject('Magento\Core\Block\Template\Context'); + $context = $this->_objectManager->getObject('Magento\View\Block\Template\Context'); $context->getHelperFactory()->expects($this->any())->method('get')->will($this->returnValue($this->_helper)); diff --git a/dev/tests/unit/testsuite/Magento/Customer/Block/Account/LinkTest.php b/dev/tests/unit/testsuite/Magento/Customer/Block/Account/LinkTest.php index 643c65e5813c15a3d5507edd7420a4ee2e12d0ef..31f0814bafb225146dc53d02abff3cc8ff58321c 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Block/Account/LinkTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Block/Account/LinkTest.php @@ -38,7 +38,7 @@ class LinkTest extends \PHPUnit_Framework_TestCase ->setMethods(array('getAccountUrl')) ->getMock(); - $helperFactory = $this->getMockBuilder('Magento\Core\Model\Factory\Helper') + $helperFactory = $this->getMockBuilder('Magento\App\Helper\HelperFactory') ->disableOriginalConstructor() ->setMethods(array('get')) ->getMock(); @@ -50,7 +50,7 @@ class LinkTest extends \PHPUnit_Framework_TestCase ->getMock(); $context = $objectManager->getObject( - 'Magento\Core\Block\Template\Context', + 'Magento\View\Block\Template\Context', array( 'layout' => $layout, 'helperFactory' => $helperFactory diff --git a/dev/tests/unit/testsuite/Magento/Customer/Block/Account/RegisterLinkTest.php b/dev/tests/unit/testsuite/Magento/Customer/Block/Account/RegisterLinkTest.php index 951292fc13047fc6458fb9cba24c5a0e116b93c5..61a3a5bd932f18c6385e431b3ba54441584d2c5f 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Block/Account/RegisterLinkTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Block/Account/RegisterLinkTest.php @@ -44,7 +44,7 @@ class RegisterLinkTest extends \PHPUnit_Framework_TestCase public function testToHtml() { - $context = $this->_objectManager->getObject('Magento\Core\Block\Template\Context'); + $context = $this->_objectManager->getObject('Magento\View\Block\Template\Context'); $session = $this->getMockBuilder('Magento\Customer\Model\Session') ->disableOriginalConstructor() ->setMethods(array('isLoggedIn')) @@ -75,7 +75,7 @@ class RegisterLinkTest extends \PHPUnit_Framework_TestCase $helper->expects($this->any())->method('getRegisterUrl')->will($this->returnValue('register url')); - $context = $this->_objectManager->getObject('Magento\Core\Block\Template\Context'); + $context = $this->_objectManager->getObject('Magento\View\Block\Template\Context'); $context->getHelperFactory()->expects($this->once())->method('get')->will($this->returnValue($helper)); diff --git a/dev/tests/unit/testsuite/Magento/Customer/Controller/Adminhtml/IndexTest.php b/dev/tests/unit/testsuite/Magento/Customer/Controller/Adminhtml/IndexTest.php index 6cc18143e8475a1f0baca5d50aeeb75b117ce4ff..d32dec75c4b00260775cd7a580c4ae86de9bf2a2 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Controller/Adminhtml/IndexTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Controller/Adminhtml/IndexTest.php @@ -93,13 +93,7 @@ class IndexTest extends \PHPUnit_Framework_TestCase ->with($this->equalTo('X-Frame-Options')) ->will($this->returnValue(true)); - $this->_objectManager = $this->getMockBuilder('Magento\App\ObjectManager') - ->disableOriginalConstructor() - ->setMethods(array('get', 'create')) - ->getMock(); - $frontControllerMock = $this->getMockBuilder('Magento\App\FrontController') - ->disableOriginalConstructor() - ->getMock(); + $this->_objectManager = $this->getMock('Magento\ObjectManager'); $this->_session = $this->getMockBuilder('Magento\Backend\Model\Session') ->disableOriginalConstructor() @@ -112,36 +106,17 @@ class IndexTest extends \PHPUnit_Framework_TestCase ->setMethods(array('getUrl')) ->getMock(); - $translator = $this->getMockBuilder('Magento\Core\Model\Translate') - ->disableOriginalConstructor() - ->setMethods(array('getTranslateInline')) - ->getMock(); - - $contextArgs = array( - 'getHelper', 'getSession', 'getAuthorization', 'getTranslator', 'getObjectManager', 'getFrontController', - 'getLayoutFactory', 'getEventManager', 'getRequest', 'getResponse' - ); - $contextMock = $this->getMockBuilder('Magento\Backend\Controller\Context') - ->disableOriginalConstructor() - ->setMethods($contextArgs) - ->getMock(); - $contextMock->expects($this->any())->method('getRequest')->will($this->returnValue($this->_request)); - $contextMock->expects($this->any())->method('getResponse')->will($this->returnValue($this->_response)); - $contextMock->expects($this->any()) - ->method('getObjectManager') - ->will($this->returnValue($this->_objectManager)); - $contextMock->expects($this->any()) - ->method('getFrontController') - ->will($this->returnValue($frontControllerMock)); - - $contextMock->expects($this->any())->method('getHelper')->will($this->returnValue($this->_helper)); - $contextMock->expects($this->any())->method('getSession')->will($this->returnValue($this->_session)); - $contextMock->expects($this->any())->method('getTranslator')->will($this->returnValue($translator)); - - $args = array('context' => $contextMock); - $helperObjectManager = new \Magento\TestFramework\Helper\ObjectManager($this); - $this->_testedObject = $helperObjectManager->getObject('Magento\Customer\Controller\Adminhtml\Index', $args); + $this->_testedObject = $helperObjectManager->getObject('Magento\Customer\Controller\Adminhtml\Index', + array( + 'helper' => $this->_helper, + 'session' => $this->_session, + 'objectManager' => $this->_objectManager, + 'request' => $this->_request, + 'response' => $this->_response + + ) + ); } /** @@ -178,7 +153,7 @@ class IndexTest extends \PHPUnit_Framework_TestCase ->will($this->returnValue($customerId) ); - $customerMock = $this->_getCustomerMock($customerId); + $customerMock = $this->_getCustomerMock($customerId, false); $this->_objectManager->expects($this->any()) ->method('create') @@ -219,20 +194,15 @@ class IndexTest extends \PHPUnit_Framework_TestCase $customerMock->expects($this->once()) ->method('sendPasswordReminderEmail'); - $customerHelperMock = $this->getMockBuilder('Magento\Customer\Helper\Data') - ->disableOriginalConstructor() - ->setMethods(array('generateResetPasswordLinkToken')) - ->getMock(); - $customerHelperMock->expects($this->once()) + $customerHelperMock = $this->getMock('Magento\Customer\Helper\Data', + array('generateResetPasswordLinkToken'), array(), '', false + ); + $customerHelperMock->expects($this->any()) ->method('generateResetPasswordLinkToken') ->will($this->returnValue($token)); - $coreHelperMock = $this->getMockBuilder('Magento\Core\Model\Url') - ->disableOriginalConstructor() - ->setMethods(array('getUrl')) - ->getMock(); + $coreHelperMock = $this->getMock('Magento\Core\Model\Url', array(), array(), '', false); $coreHelperMock->expects($this->any())->method('getUrl')->will($this->returnValue($testUrl)); - $this->_objectManager->expects($this->at(0)) ->method('create') ->with($this->equalTo('Magento\Customer\Model\Customer')) @@ -263,11 +233,9 @@ class IndexTest extends \PHPUnit_Framework_TestCase */ protected function _getCustomerMock($customerId, $returnId = null) { - $customerMock = $this->getMockBuilder('Magento\Customer\Model\Customer') - ->disableOriginalConstructor() - ->setMethods(array('load', 'getId', 'changeResetPasswordLinkToken', 'setResetPasswordUrl', - 'sendPasswordReminderEmail')) - ->getMock(); + $customerMock = $this->getMock('Magento\Customer\Model\Customer', + array('setResetPasswordUrl', 'changeResetPasswordLinkToken', 'sendPasswordReminderEmail', 'load', 'getId'), + array(), '', false); $customerMock->expects($this->any()) ->method('load') ->with($this->equalTo($customerId)); diff --git a/dev/tests/unit/testsuite/Magento/Customer/Model/CustomerTest.php b/dev/tests/unit/testsuite/Magento/Customer/Model/CustomerTest.php index 291820d962e582ff0f522c7e94b5f50744c429c2..92b86aecf28ea9f556f4593c42ca68621659c6f7 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Model/CustomerTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/CustomerTest.php @@ -34,9 +34,6 @@ class CustomerTest extends \PHPUnit_Framework_TestCase /** @var \Magento\Customer\Model\Customer */ protected $_model; - /** @var \Magento\Customer\Helper\Data */ - protected $_customerData; - /** @var \Magento\Core\Model\Website|\PHPUnit_Framework_MockObject_MockObject */ protected $_website; @@ -52,88 +49,22 @@ class CustomerTest extends \PHPUnit_Framework_TestCase /** @var \Magento\Eav\Model\Attribute|\PHPUnit_Framework_MockObject_MockObject */ protected $_attribute; - /** @var \Magento\Core\Model\Context|\PHPUnit_Framework_MockObject_MockObject */ - protected $_contextMock; - - /** @var \Magento\Customer\Model\Resource\Customer\Collection|\PHPUnit_Framework_MockObject_MockObject */ - protected $_resourceMock; - - /** @var \Magento\Data\Collection\Db|\PHPUnit_Framework_MockObject_MockObject */ - protected $_collectionMock; - /** * Set required values */ protected function setUp() { - $this->_customerData = $this->getMockBuilder('Magento\Customer\Helper\Data') - ->disableOriginalConstructor() - ->setMethods(array('getResetPasswordLinkExpirationPeriod')) - ->getMock(); - $this->_website = $this->getMockBuilder('Magento\Core\Model\Website') - ->disableOriginalConstructor() - ->setMethods(array('getStoreIds', '__wakeup')) - ->getMock(); - $this->_senderMock = $this->getMockBuilder('Magento\Core\Model\Sender') - ->disableOriginalConstructor() - ->setMethods(array('send')) - ->getMock(); - $this->_config = $this->getMockBuilder('Magento\Eav\Model\Config') - ->disableOriginalConstructor() - ->setMethods(array('getAttribute')) - ->getMock(); - $this->_attribute = $this->getMockBuilder('Magento\Eav\Model\Attribute') - ->disableOriginalConstructor() - ->setMethods(array('getIsVisible', '__wakeup')) - ->getMock(); - $this->_resourceMock = $this->getMockBuilder('Magento\Customer\Model\Resource\Customer') - ->disableOriginalConstructor() - ->setMethods(array()) - ->getMock(); - $this->_collectionMock = $this->getMockBuilder('Magento\Data\Collection\Db') - ->disableOriginalConstructor() - ->setMethods(array()) - ->getMock(); - $coreRegistry = $this->getMock('Magento\Core\Model\Registry', array(), array(), '', false); - $coreStoreConfig = $this->getMock('Magento\Core\Model\Store\Config', array(), array(), '', false); - $encryptor = $this->getMockBuilder('\Magento\Encryption\EncryptorInterface') - ->disableOriginalConstructor() - ->setMethods(array()) - ->getMock(); - - $this->_storeManager = $this->getMockBuilder('Magento\Core\Model\StoreManager') - ->disableOriginalConstructor() - ->setMethods(array('getWebsite')) - ->getMock(); - $this->_contextMock = $this->getMockBuilder('Magento\Core\Model\Context') - ->disableOriginalConstructor() - ->setMethods(array('getStoreManager')) - ->getMock(); - $this->_contextMock->expects($this->any())->method('getStoreManager') - ->will($this->returnValue($this->_storeManager)); - - $this->_model = new \Magento\Customer\Model\Customer( - $this->getMock('Magento\Event\ManagerInterface', array(), array(), '', false), - $this->_customerData, - $this->_contextMock, - $coreRegistry, - $this->_senderMock, - $this->_storeManager, - $this->_config, - $coreStoreConfig, - $this->_resourceMock, - $this->getMock('Magento\Customer\Model\Config\Share', array(), array(), '', false), - $this->getMock('Magento\Customer\Model\AddressFactory', array(), array(), '', false), - $this->getMock('Magento\Customer\Model\Resource\Address\CollectionFactory', array(), array(), '', false), - $this->getMock('Magento\Core\Model\Email\Template\MailerFactory', array(), array(), '', false), - $this->getMock('Magento\Core\Model\Email\InfoFactory', array(), array(), '', false), - $this->getMock('Magento\Customer\Model\GroupFactory', array(), array(), '', false), - $this->getMock('Magento\Customer\Model\AttributeFactory', array(), array(), '', false), - $encryptor, - new \Magento\Math\Random, - new \Magento\Stdlib\DateTime, - $this->_collectionMock, - array() + $this->_website = $this->getMock('Magento\Core\Model\Website', array(), array(), '', false); + $this->_senderMock = $this->getMock('Magento\Email\Model\Sender', array(), array(), '', false); + $this->_config = $this->getMock('Magento\Eav\Model\Config', array(), array(), '', false); + $this->_attribute = $this->getMock('Magento\Eav\Model\Attribute', array(), array(), '', false); + $this->_storeManager = $this->getMock('Magento\Core\Model\StoreManager', array(), array(), '', false); + $helper = new \Magento\TestFramework\Helper\ObjectManager($this); + $this->_model = $helper->getObject('Magento\Customer\Model\Customer', array( + 'sender' => $this->_senderMock, + 'storeManager' => $this->_storeManager, + 'config' => $this->_config + ) ); } diff --git a/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/Editor/ContainerTest.php b/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/Editor/ContainerTest.php index 3334222ce77c639b210e57915538d3ccd0896a80..c1723270e9663c475ba04bea29df47965177042f 100644 --- a/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/Editor/ContainerTest.php +++ b/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/Editor/ContainerTest.php @@ -55,7 +55,7 @@ class ContainerTest extends \PHPUnit_Framework_TestCase */ protected function _getBlockArguments() { - $helperFactory = $this->getMock('Magento\Core\Model\Factory\Helper', array('get'), array(), '', false); + $helperFactory = $this->getMock('Magento\App\Helper\HelperFactory', array('get'), array(), '', false); return array( 'urlBuilder' => $this->getMock('Magento\Backend\Model\Url', array(), array(), '', false), diff --git a/dev/tests/unit/testsuite/Magento/DesignEditor/Controller/Adminhtml/System/Design/EditorTest.php b/dev/tests/unit/testsuite/Magento/DesignEditor/Controller/Adminhtml/System/Design/EditorTest.php index 5a1fac02b531377631ef92d612b64fb25b53b0ad..4db0da00ef9367ac6a5c16385c96980ad79be4c7 100644 --- a/dev/tests/unit/testsuite/Magento/DesignEditor/Controller/Adminhtml/System/Design/EditorTest.php +++ b/dev/tests/unit/testsuite/Magento/DesignEditor/Controller/Adminhtml/System/Design/EditorTest.php @@ -68,11 +68,11 @@ class EditorTest extends \PHPUnit_Framework_TestCase $layoutMock->expects($this->any())->method('generateXml')->will($this->returnSelf()); $layoutMock->expects($this->any())->method('getNode') ->will($this->returnValue(new \Magento\Simplexml\Element('<root />'))); - $blockMessage = $this->getMock('Magento\Core\Block\Messages', + $blockMessage = $this->getMock('Magento\View\Block\Messages', array('addMessages', 'setEscapeMessageFlag', 'addStorageType'), array(), '', false); $layoutMock->expects($this->any())->method('getMessagesBlock')->will($this->returnValue($blockMessage)); - $blockMock = $this->getMock('Magento\Core\Block\Template', array('setActive', 'getMenuModel', 'getParentItems'), + $blockMock = $this->getMock('Magento\View\Block\Template', array('setActive', 'getMenuModel', 'getParentItems'), array(), '', false); $blockMock->expects($this->any())->method('getMenuModel')->will($this->returnSelf()); $blockMock->expects($this->any())->method('getParentItems')->will($this->returnValue(array())); @@ -195,7 +195,7 @@ class EditorTest extends \PHPUnit_Framework_TestCase $backendSession = $this->getMock('Magento\Backend\Model\Session', array('getMessages', 'getEscapeMessages'), array(), '', false); $backendSession->expects($this->any())->method('getMessages')->will( - $this->returnValue($this->getMock('Magento\Core\Model\Message\Collection', array(), array(), '', false)) + $this->returnValue($this->getMock('Magento\Message\Collection', array(), array(), '', false)) ); $inlineMock = $this->getMock('Magento\Core\Model\Translate\Inline', array(), array(), '', false); diff --git a/dev/tests/unit/testsuite/Magento/DesignEditor/Controller/Varien/Router/StandardTest.php b/dev/tests/unit/testsuite/Magento/DesignEditor/Controller/Varien/Router/StandardTest.php index 05b1b85f2125b00534133625305a6282c6ee96b0..3b49363cbea6983880f7e17cb8b5292098e5d1c2 100644 --- a/dev/tests/unit/testsuite/Magento/DesignEditor/Controller/Varien/Router/StandardTest.php +++ b/dev/tests/unit/testsuite/Magento/DesignEditor/Controller/Varien/Router/StandardTest.php @@ -96,10 +96,13 @@ class StandardTest extends \PHPUnit_Framework_TestCase $routerListMock = $this->getMock('\Magento\App\Route\ConfigInterface'); + $infoProcessorMock = $this->getMock('Magento\App\Request\PathInfoProcessorInterface'); + $infoProcessorMock->expects($this->any())->method('process')->will($this->returnArgument(1)); + // test data to verify routers match logic $matchedRequest = $this->getMock('Magento\App\Request\Http', array('_isFrontArea'), - array($routerListMock, $vdeUrl) + array($routerListMock, $infoProcessorMock, $vdeUrl) ); $matchedController = $this->getMockForAbstractClass( @@ -125,11 +128,14 @@ class StandardTest extends \PHPUnit_Framework_TestCase array('matched' => $matchedRouter, 'not_matched' => $notMatchedRouter) ); + $infoProcessorMock = $this->getMock('Magento\App\Request\PathInfoProcessorInterface'); + $infoProcessorMock->expects($this->any())->method('process')->will($this->returnArgument(1)); + return array( 'not vde request' => array( '$request' => $this->getMock( 'Magento\App\Request\Http', array('_isFrontArea'), array( - $routerListMock, $notVdeUrl + $routerListMock, $infoProcessorMock, $notVdeUrl ) ), '$isVde' => false, @@ -137,15 +143,19 @@ class StandardTest extends \PHPUnit_Framework_TestCase ), 'not logged as admin' => array( '$request' => $this->getMock( - 'Magento\App\Request\Http', array('_isFrontArea'), array($routerListMock, $vdeUrl) - ), + 'Magento\App\Request\Http', + array('_isFrontArea'), + array($routerListMock, $infoProcessorMock, $vdeUrl) + ), '$isVde' => true, '$isLoggedIn' => false, ), 'no matched routers' => array( '$request' => $this->getMock( - 'Magento\App\Request\Http', array('_isFrontArea'), array($routerListMock, $vdeUrl) - ), + 'Magento\App\Request\Http', + array('_isFrontArea'), + array($routerListMock, $infoProcessorMock, $vdeUrl) + ), '$isVde' => true, '$isLoggedIn' => true, '$routers' => $excludedRouters diff --git a/dev/tests/unit/testsuite/Magento/DesignEditor/Helper/DataTest.php b/dev/tests/unit/testsuite/Magento/DesignEditor/Helper/DataTest.php index 2fb06c8c9bceaa76c2748a1914db5856fa7d1fe3..d88681bc08121d66c6e492c8b6d125731461db7f 100644 --- a/dev/tests/unit/testsuite/Magento/DesignEditor/Helper/DataTest.php +++ b/dev/tests/unit/testsuite/Magento/DesignEditor/Helper/DataTest.php @@ -57,7 +57,7 @@ class DataTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->_translatorMock = $this->getMock('Magento\Core\Model\Translate', array(), array(), '', false); - $this->_context = $this->getMock('Magento\Core\Helper\Context', array(), array(), '', false); + $this->_context = $this->getMock('Magento\App\Helper\Context', array(), array(), '', false); $this->_context ->expects($this->any())->method('getTranslator')->will($this->returnValue($this->_translatorMock)); } diff --git a/dev/tests/unit/testsuite/Magento/Directory/Helper/DataTest.php b/dev/tests/unit/testsuite/Magento/Directory/Helper/DataTest.php index 83597e142cde727125d3a6ef8bf43bc0d22c423e..d8d93c7b9065d0e05a9a9e5e18afa2c240309a91 100644 --- a/dev/tests/unit/testsuite/Magento/Directory/Helper/DataTest.php +++ b/dev/tests/unit/testsuite/Magento/Directory/Helper/DataTest.php @@ -54,7 +54,7 @@ class DataTest extends \PHPUnit_Framework_TestCase public function setUp() { $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); - $context = $this->getMock('Magento\Core\Helper\Context', array(), array(), '', false); + $context = $this->getMock('Magento\App\Helper\Context', array(), array(), '', false); $configCacheType = $this->getMock('Magento\App\Cache\Type\Config', array(), array(), '', false); diff --git a/dev/tests/unit/testsuite/Magento/Downloadable/Model/Sales/Order/Pdf/Items/CreditmemoTest.php b/dev/tests/unit/testsuite/Magento/Downloadable/Model/Sales/Order/Pdf/Items/CreditmemoTest.php index f114f127582ca6bfa3d59fe3b17459a8c21a0f78..1f621ce4b1e8ac366c32c4a0347b85ddf6e8fa56 100644 --- a/dev/tests/unit/testsuite/Magento/Downloadable/Model/Sales/Order/Pdf/Items/CreditmemoTest.php +++ b/dev/tests/unit/testsuite/Magento/Downloadable/Model/Sales/Order/Pdf/Items/CreditmemoTest.php @@ -52,10 +52,10 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase 'Magento\Catalog\Model\ProductFactory', array(), array(), '', false ), 'templateMailerFactory' => $this->getMock( - 'Magento\Core\Model\Email\Template\MailerFactory', array(), array(), '', false + 'Magento\Email\Model\Template\MailerFactory', array(), array(), '', false ), 'emailInfoFactory' => $this->getMock( - 'Magento\Core\Model\Email\InfoFactory', array(), array(), '', false + 'Magento\Email\Model\InfoFactory', array(), array(), '', false ), 'orderItemCollFactory' => $this->getMock( 'Magento\Sales\Model\Resource\Order\Item\CollectionFactory', array(), array(), '', false diff --git a/dev/tests/unit/testsuite/Magento/Backend/Block/System/Email/Template/EditTest.php b/dev/tests/unit/testsuite/Magento/Email/Block/Adminhtml/Template/EditTest.php similarity index 94% rename from dev/tests/unit/testsuite/Magento/Backend/Block/System/Email/Template/EditTest.php rename to dev/tests/unit/testsuite/Magento/Email/Block/Adminhtml/Template/EditTest.php index 62fcbfbbc8b618e95d75d630203b2b0bdd15c0a5..ae60231f57b05ba0cd701272490649256e34efdf 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Block/System/Email/Template/EditTest.php +++ b/dev/tests/unit/testsuite/Magento/Email/Block/Adminhtml/Template/EditTest.php @@ -25,12 +25,12 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Backend\Block\System\Email\Template; +namespace Magento\Email\Block\Adminhtml\Template; class EditTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Backend\Block\System\Email\Template\Edit + * @var \Magento\Email\Block\Adminhtml\Template\Edit */ protected $_block; @@ -45,7 +45,7 @@ class EditTest extends \PHPUnit_Framework_TestCase protected $_configStructureMock; /** - * @var \Magento\Core\Model\Email\Template\Config|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Email\Model\Template\Config|\PHPUnit_Framework_MockObject_MockObject */ protected $_emailConfigMock; @@ -84,7 +84,7 @@ class EditTest extends \PHPUnit_Framework_TestCase array(), array(), '', false, false ); $this->_emailConfigMock = $this->getMock( - 'Magento\Core\Model\Email\Template\Config', array(), array(), '', false + 'Magento\Email\Model\Template\Config', array(), array(), '', false ); $params = array( @@ -96,7 +96,7 @@ class EditTest extends \PHPUnit_Framework_TestCase 'emailConfig' => $this->_emailConfigMock, ); $arguments = $objectManager->getConstructArguments( - 'Magento\Backend\Block\System\Email\Template\Edit', + 'Magento\Email\Block\Adminhtml\Template\Edit', $params ); @@ -107,7 +107,7 @@ class EditTest extends \PHPUnit_Framework_TestCase $layoutMock->expects($this->any())->method('helper')->will($this->returnValue($helperMock)); - $this->_block = $objectManager->getObject('Magento\Backend\Block\System\Email\Template\Edit', $arguments); + $this->_block = $objectManager->getObject('Magento\Email\Block\Adminhtml\Template\Edit', $arguments); } public function testGetUsedCurrentlyForPaths() @@ -147,7 +147,7 @@ class EditTest extends \PHPUnit_Framework_TestCase $this->_configStructureMock->expects($this->any()) ->method('getElementByPathParts')->will($this->returnValueMap($map)); - $templateMock = $this->getMock('Magento\Backend\Model\Email\Template', array(), array(), '', false, false); + $templateMock = $this->getMock('Magento\Email\Model\BackendTemplate', array(), array(), '', false, false); $templateMock->expects($this->once()) ->method('getSystemConfigPathsWhereUsedCurrently') ->will($this->returnValue($this->_fixtureConfigPath)); diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/SenderTest.php b/dev/tests/unit/testsuite/Magento/Email/Model/SenderTest.php similarity index 86% rename from dev/tests/unit/testsuite/Magento/Core/Model/SenderTest.php rename to dev/tests/unit/testsuite/Magento/Email/Model/SenderTest.php index c998f096ce4cc63ec72425eb9b93765235663ccc..eb83184827c8d532e5a3de01d8ff3620d8dbb040 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/SenderTest.php +++ b/dev/tests/unit/testsuite/Magento/Email/Model/SenderTest.php @@ -1,6 +1,6 @@ <?php /** - * Unit test for \Magento\Core\Model\Sender + * Unit test for \Magento\Email\Model\Sender * * Magento * @@ -25,18 +25,18 @@ */ /** - * Test class for \Magento\Core\Model\Sender + * Test class for \Magento\Email\Model\Sender */ -namespace Magento\Core\Model; +namespace Magento\Email\Model; class SenderTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Core\Model\Sender + * @var \Magento\Email\Model\Sender */ protected $_model; - /** @var \Magento\Core\Model\Email\Template\Mailer|PHPUnit_Framework_MockObject_MockObject */ + /** @var \Magento\Email\Model\Template\Mailer|PHPUnit_Framework_MockObject_MockObject */ protected $_mailerMock; /** @var \Magento\Core\Model\Store|PHPUnit_Framework_MockObject_MockObject */ @@ -45,7 +45,7 @@ class SenderTest extends \PHPUnit_Framework_TestCase /** @var \Magento\Core\Model\StoreManagerInterface|PHPUnit_Framework_MockObject_MockObject */ protected $_storeManagerMock; - /** @var \Magento\Core\Model\Email\Info|PHPUnit_Framework_MockObject_MockObject */ + /** @var \Magento\Email\Model\Info|PHPUnit_Framework_MockObject_MockObject */ protected $_emailInfoMock; /** @@ -53,7 +53,7 @@ class SenderTest extends \PHPUnit_Framework_TestCase */ protected function setUp() { - $this->_mailerMock = $this->getMockBuilder('Magento\Core\Model\Email\Template\Mailer') + $this->_mailerMock = $this->getMockBuilder('Magento\Email\Model\Template\Mailer') ->disableOriginalConstructor() ->setMethods(array('addEmailInfo', 'setSender', 'setStoreId', 'setTemplateId', 'setTemplateParams', 'send')) ->getMock(); @@ -68,12 +68,12 @@ class SenderTest extends \PHPUnit_Framework_TestCase $this->_storeManagerMock->expects($this->any()) ->method('getStore') ->will($this->returnValue($this->_storeMock)); - $this->_emailInfoMock = $this->getMockBuilder('Magento\Core\Model\Email\Info') + $this->_emailInfoMock = $this->getMockBuilder('Magento\Email\Model\Info') ->disableOriginalConstructor() ->setMethods(array('addTo')) ->getMock(); - $this->_model = new \Magento\Core\Model\Sender($this->_mailerMock, $this->_emailInfoMock, + $this->_model = new \Magento\Email\Model\Sender($this->_mailerMock, $this->_emailInfoMock, $this->_storeManagerMock); } diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Email/Template/Config/ConverterTest.php b/dev/tests/unit/testsuite/Magento/Email/Model/Template/Config/ConverterTest.php similarity index 87% rename from dev/tests/unit/testsuite/Magento/Core/Model/Email/Template/Config/ConverterTest.php rename to dev/tests/unit/testsuite/Magento/Email/Model/Template/Config/ConverterTest.php index 3dda7069674bad9770c2017c8075aa42239bfe80..7be0d747df8278064cff37c813533f9948b74e97 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/Email/Template/Config/ConverterTest.php +++ b/dev/tests/unit/testsuite/Magento/Email/Model/Template/Config/ConverterTest.php @@ -21,18 +21,18 @@ * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Core\Model\Email\Template\Config; +namespace Magento\Email\Model\Template\Config; class ConverterTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Core\Model\Email\Template\Config\Converter + * @var \Magento\Email\Model\Template\Config\Converter */ protected $_model; public function setUp() { - $this->_model = new \Magento\Core\Model\Email\Template\Config\Converter(); + $this->_model = new \Magento\Email\Model\Template\Config\Converter(); } public function testConvert() diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Email/Template/Config/ReaderTest.php b/dev/tests/unit/testsuite/Magento/Email/Model/Template/Config/ReaderTest.php similarity index 90% rename from dev/tests/unit/testsuite/Magento/Core/Model/Email/Template/Config/ReaderTest.php rename to dev/tests/unit/testsuite/Magento/Email/Model/Template/Config/ReaderTest.php index 49cc3d2ef2e501a84a7f7e6b1270c84ece16b94f..035b1eba457c702a1813aca70dfb21d30198e99d 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/Email/Template/Config/ReaderTest.php +++ b/dev/tests/unit/testsuite/Magento/Email/Model/Template/Config/ReaderTest.php @@ -21,12 +21,12 @@ * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Core\Model\Email\Template\Config; +namespace Magento\Email\Model\Template\Config; class ReaderTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Core\Model\Email\Template\Config\Reader + * @var \Magento\Email\Model\Template\Config\Reader */ protected $_model; @@ -53,17 +53,17 @@ class ReaderTest extends \PHPUnit_Framework_TestCase ))) ; - $this->_converter = $this->getMock('Magento\Core\Model\Email\Template\Config\Converter', array('convert')); + $this->_converter = $this->getMock('Magento\Email\Model\Template\Config\Converter', array('convert')); $moduleReader = $this->getMock( 'Magento\Module\Dir\Reader', array('getModuleDir'), array(), '', false ); $moduleReader ->expects($this->once()) - ->method('getModuleDir')->with('etc', 'Magento_Core') + ->method('getModuleDir')->with('etc', 'Magento_Email') ->will($this->returnValue('stub')) ; - $schemaLocator = new \Magento\Core\Model\Email\Template\Config\SchemaLocator($moduleReader); + $schemaLocator = new \Magento\Email\Model\Template\Config\SchemaLocator($moduleReader); $validationState = $this->getMock('Magento\Config\ValidationStateInterface'); $validationState->expects($this->once())->method('isValidated')->will($this->returnValue(false)); @@ -72,7 +72,7 @@ class ReaderTest extends \PHPUnit_Framework_TestCase 'Magento\Module\Dir\ReverseResolver', array(), array(), '', false ); - $this->_model = new \Magento\Core\Model\Email\Template\Config\Reader( + $this->_model = new \Magento\Email\Model\Template\Config\Reader( $fileResolver, $this->_converter, $schemaLocator, diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Email/Template/Config/SchemaLocatorTest.php b/dev/tests/unit/testsuite/Magento/Email/Model/Template/Config/SchemaLocatorTest.php similarity index 87% rename from dev/tests/unit/testsuite/Magento/Core/Model/Email/Template/Config/SchemaLocatorTest.php rename to dev/tests/unit/testsuite/Magento/Email/Model/Template/Config/SchemaLocatorTest.php index 39aa0ba809757fb35d5cf2fd3a0935847325c99c..9610445afe4bc3b284368138a2172142c9e0c28b 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/Email/Template/Config/SchemaLocatorTest.php +++ b/dev/tests/unit/testsuite/Magento/Email/Model/Template/Config/SchemaLocatorTest.php @@ -21,12 +21,12 @@ * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Core\Model\Email\Template\Config; +namespace Magento\Email\Model\Template\Config; class SchemaLocatorTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Core\Model\Email\Template\Config\SchemaLocator + * @var \Magento\Email\Model\Template\Config\SchemaLocator */ protected $_model; @@ -42,10 +42,10 @@ class SchemaLocatorTest extends \PHPUnit_Framework_TestCase ); $this->_moduleReader ->expects($this->once()) - ->method('getModuleDir')->with('etc', 'Magento_Core') + ->method('getModuleDir')->with('etc', 'Magento_Email') ->will($this->returnValue('fixture_dir')) ; - $this->_model = new \Magento\Core\Model\Email\Template\Config\SchemaLocator($this->_moduleReader); + $this->_model = new \Magento\Email\Model\Template\Config\SchemaLocator($this->_moduleReader); } public function testGetSchema() diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Email/Template/Config/XsdTest.php b/dev/tests/unit/testsuite/Magento/Email/Model/Template/Config/XsdTest.php similarity index 97% rename from dev/tests/unit/testsuite/Magento/Core/Model/Email/Template/Config/XsdTest.php rename to dev/tests/unit/testsuite/Magento/Email/Model/Template/Config/XsdTest.php index 8b0836a86eab7000d314d27f6d97b342617867f6..63c8345ef123747313f5e7d645760880972ba74b 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/Email/Template/Config/XsdTest.php +++ b/dev/tests/unit/testsuite/Magento/Email/Model/Template/Config/XsdTest.php @@ -23,7 +23,7 @@ * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Core\Model\Email\Template\Config; +namespace Magento\Email\Model\Template\Config; class XsdTest extends \PHPUnit_Framework_TestCase { @@ -36,7 +36,7 @@ class XsdTest extends \PHPUnit_Framework_TestCase */ public function testIndividualXml($fixtureXml, array $expectedErrors) { - $schemaFile = BP . '/app/code/Magento/Core/etc/email_templates_file.xsd'; + $schemaFile = BP . '/app/code/Magento/Email/etc/email_templates_file.xsd'; $this->_testXmlAgainstXsd($fixtureXml, $schemaFile, $expectedErrors); } @@ -108,7 +108,7 @@ class XsdTest extends \PHPUnit_Framework_TestCase */ public function testMergedXml($fixtureXml, array $expectedErrors) { - $schemaFile = BP . '/app/code/Magento/Core/etc/email_templates.xsd'; + $schemaFile = BP . '/app/code/Magento/Email/etc/email_templates.xsd'; $this->_testXmlAgainstXsd($fixtureXml, $schemaFile, $expectedErrors); } diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Email/Template/Config/_files/Fixture/ModuleOne/etc/email_templates_one.xml b/dev/tests/unit/testsuite/Magento/Email/Model/Template/Config/_files/Fixture/ModuleOne/etc/email_templates_one.xml similarity index 100% rename from dev/tests/unit/testsuite/Magento/Core/Model/Email/Template/Config/_files/Fixture/ModuleOne/etc/email_templates_one.xml rename to dev/tests/unit/testsuite/Magento/Email/Model/Template/Config/_files/Fixture/ModuleOne/etc/email_templates_one.xml diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Email/Template/Config/_files/Fixture/ModuleTwo/etc/email_templates_two.xml b/dev/tests/unit/testsuite/Magento/Email/Model/Template/Config/_files/Fixture/ModuleTwo/etc/email_templates_two.xml similarity index 100% rename from dev/tests/unit/testsuite/Magento/Core/Model/Email/Template/Config/_files/Fixture/ModuleTwo/etc/email_templates_two.xml rename to dev/tests/unit/testsuite/Magento/Email/Model/Template/Config/_files/Fixture/ModuleTwo/etc/email_templates_two.xml diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Email/Template/Config/_files/email_templates_merged.php b/dev/tests/unit/testsuite/Magento/Email/Model/Template/Config/_files/email_templates_merged.php similarity index 100% rename from dev/tests/unit/testsuite/Magento/Core/Model/Email/Template/Config/_files/email_templates_merged.php rename to dev/tests/unit/testsuite/Magento/Email/Model/Template/Config/_files/email_templates_merged.php diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Email/Template/Config/_files/email_templates_merged.xml b/dev/tests/unit/testsuite/Magento/Email/Model/Template/Config/_files/email_templates_merged.xml similarity index 100% rename from dev/tests/unit/testsuite/Magento/Core/Model/Email/Template/Config/_files/email_templates_merged.xml rename to dev/tests/unit/testsuite/Magento/Email/Model/Template/Config/_files/email_templates_merged.xml diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Email/Template/ConfigTest.php b/dev/tests/unit/testsuite/Magento/Email/Model/Template/ConfigTest.php similarity index 86% rename from dev/tests/unit/testsuite/Magento/Core/Model/Email/Template/ConfigTest.php rename to dev/tests/unit/testsuite/Magento/Email/Model/Template/ConfigTest.php index 0c254fbeefc4bcedf159cc02304cbe83c269f156..d78f6d7b2cefe62695e34d1cd9fa54b17955ee8e 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/Email/Template/ConfigTest.php +++ b/dev/tests/unit/testsuite/Magento/Email/Model/Template/ConfigTest.php @@ -21,17 +21,17 @@ * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Core\Model\Email\Template; +namespace Magento\Email\Model\Template; class ConfigTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Core\Model\Email\Template\Config + * @var \Magento\Email\Model\Template\Config */ protected $_model; /** - * @var \Magento\Core\Model\Email\Template\Config\Data|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Email\Model\Template\Config\Data|\PHPUnit_Framework_MockObject_MockObject */ protected $_dataStorage; @@ -43,17 +43,15 @@ class ConfigTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->_dataStorage = $this->getMock( - 'Magento\Core\Model\Email\Template\Config\Data', array('get'), array(), '', false + 'Magento\Email\Model\Template\Config\Data', array('get'), array(), '', false ); $this->_dataStorage ->expects($this->any()) ->method('get') ->will($this->returnValue(require __DIR__ . '/Config/_files/email_templates_merged.php')) ; - $this->_moduleReader = $this->getMock( - 'Magento\Module\Dir\Reader', array('getModuleDir'), array(), '', false - ); - $this->_model = new \Magento\Core\Model\Email\Template\Config($this->_dataStorage, $this->_moduleReader); + $this->_moduleReader = $this->getMock('Magento\Module\Dir\Reader', array('getModuleDir'), array(), '', false); + $this->_model = new \Magento\Email\Model\Template\Config($this->_dataStorage, $this->_moduleReader); } public function testGetAvailableTemplates() @@ -118,14 +116,14 @@ class ConfigTest extends \PHPUnit_Framework_TestCase { $this->setExpectedException('UnexpectedValueException', $expectedException); $dataStorage = $this->getMock( - 'Magento\Core\Model\Email\Template\Config\Data', array('get'), array(), '', false + 'Magento\Email\Model\Template\Config\Data', array('get'), array(), '', false ); $dataStorage ->expects($this->atLeastOnce()) ->method('get') ->will($this->returnValue(array('fixture' => $fixtureFields))) ; - $model = new \Magento\Core\Model\Email\Template\Config($dataStorage, $this->_moduleReader); + $model = new \Magento\Email\Model\Template\Config($dataStorage, $this->_moduleReader); $model->$getterMethod('fixture'); } diff --git a/dev/tests/unit/testsuite/Magento/Encryption/UrlCoderTest.php b/dev/tests/unit/testsuite/Magento/Encryption/UrlCoderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..7c93be7bcfa5340ad6cc00b4693eab2768e11e5c --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Encryption/UrlCoderTest.php @@ -0,0 +1,67 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Encryption; + +class UrlCoderTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\Encryption\UrlCoder + */ + protected $_urlCoder; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_urlMock; + + /** + * @var string + */ + protected $_url = 'http://example.com'; + + /** + * @var string + */ + protected $_encodeUrl = 'aHR0cDovL2V4YW1wbGUuY29t'; + + protected function setUp() + { + $this->_urlMock = $this->getMock('Magento\UrlInterface', array(), array(), '', false); + $this->_urlCoder = new \Magento\Encryption\UrlCoder($this->_urlMock); + } + + public function testDecode() + { + $this->_urlMock + ->expects($this->once()) + ->method('sessionUrlVar')->with($this->_url)->will($this->returnValue('expected')); + $this->assertEquals('expected', $this->_urlCoder->decode($this->_encodeUrl)); + } + + public function testEncode() + { + $this->assertEquals($this->_encodeUrl, $this->_urlCoder->encode($this->_url)); + } +} \ No newline at end of file diff --git a/dev/tests/unit/testsuite/Magento/EscaperTest.php b/dev/tests/unit/testsuite/Magento/EscaperTest.php index 95cdb821297444fe9c2174499749b5d75bcf1f2b..dfae8dec4f96c3cee5945a9ea540bda801fefd0f 100644 --- a/dev/tests/unit/testsuite/Magento/EscaperTest.php +++ b/dev/tests/unit/testsuite/Magento/EscaperTest.php @@ -74,9 +74,10 @@ class EscaperTest extends \PHPUnit_Framework_TestCase */ public function testEscapeUrl() { - $data = '<two>"three</two>'; - $expected = '<two>"three</two>'; + $data = 'http://example.com/search?term=this+%26+that&view=list'; + $expected = 'http://example.com/search?term=this+%26+that&view=list'; $this->assertEquals($expected, $this->_escaper->escapeUrl($data)); + $this->assertEquals($expected, $this->_escaper->escapeUrl($expected)); } /** diff --git a/dev/tests/unit/testsuite/Magento/Filter/StripTagsTest.php b/dev/tests/unit/testsuite/Magento/Filter/StripTagsTest.php index 30f259b39d0ad307014c157bd9257757e435efe7..819acee6f287c757fc16562491d56806d83f5352 100644 --- a/dev/tests/unit/testsuite/Magento/Filter/StripTagsTest.php +++ b/dev/tests/unit/testsuite/Magento/Filter/StripTagsTest.php @@ -26,7 +26,6 @@ namespace Magento\Filter; class StripTagsTest extends \PHPUnit_Framework_TestCase { /** - * @covers \Magento\Filter\StripTags::_construct * @covers \Magento\Filter\StripTags::filter */ public function testStripTags() diff --git a/dev/tests/unit/testsuite/Magento/GoogleAdwords/Helper/DataTest.php b/dev/tests/unit/testsuite/Magento/GoogleAdwords/Helper/DataTest.php index 28370734e4c808e70aea57153085fea19d3a57d6..701bbf0c852f571ad802727199a3d07284ccc6bd 100644 --- a/dev/tests/unit/testsuite/Magento/GoogleAdwords/Helper/DataTest.php +++ b/dev/tests/unit/testsuite/Magento/GoogleAdwords/Helper/DataTest.php @@ -59,7 +59,7 @@ class DataTest extends \PHPUnit_Framework_TestCase $this->_registryMock = $this->getMock('Magento\Core\Model\Registry', array(), array(), '', false); $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); - $context = $this->getMock('Magento\Core\Helper\Context', array(), array(), '', false); + $context = $this->getMock('Magento\App\Helper\Context', array(), array(), '', false); $this->_helper = $objectManager->getObject('Magento\GoogleAdwords\Helper\Data', array( 'config' => $this->_configMock, 'storeConfig' => $this->_storeConfigMock, diff --git a/dev/tests/unit/testsuite/Magento/GoogleOptimizer/Helper/DataTest.php b/dev/tests/unit/testsuite/Magento/GoogleOptimizer/Helper/DataTest.php index 68a4a575441acc5bae458e9e81f60ba7a2730b7a..f5e681e1d613533300f832b2f0ef26b9bdde2669 100644 --- a/dev/tests/unit/testsuite/Magento/GoogleOptimizer/Helper/DataTest.php +++ b/dev/tests/unit/testsuite/Magento/GoogleOptimizer/Helper/DataTest.php @@ -53,7 +53,7 @@ class DataTest extends \PHPUnit_Framework_TestCase false); $objectManagerHelper = new \Magento\TestFramework\Helper\ObjectManager($this); - $context = $this->getMock('Magento\Core\Helper\Context', array(), array(), '', false); + $context = $this->getMock('Magento\App\Helper\Context', array(), array(), '', false); $this->_helper = $objectManagerHelper->getObject('Magento\GoogleOptimizer\Helper\Data', array( 'storeConfig' => $this->_storeConfigMock, 'analyticsHelper' => $this->_googleAnalyticsHelperMock, diff --git a/dev/tests/unit/testsuite/Magento/GoogleOptimizer/Helper/FormTest.php b/dev/tests/unit/testsuite/Magento/GoogleOptimizer/Helper/FormTest.php index 01b82b4aa8274bd9e121cee067d3f1fcd985ee98..fff6cf6c24689452f2a2e81ba9a573c4be2a0cc8 100644 --- a/dev/tests/unit/testsuite/Magento/GoogleOptimizer/Helper/FormTest.php +++ b/dev/tests/unit/testsuite/Magento/GoogleOptimizer/Helper/FormTest.php @@ -52,7 +52,7 @@ class FormTest extends \PHPUnit_Framework_TestCase $this->_fieldsetMock = $this->getMock('Magento\Data\Form\Element\Fieldset', array(), array(), '', false); $this->_experimentCodeMock = $this->getMock('Magento\GoogleOptimizer\Model\Code', array('getExperimentScript', 'getCodeId'), array(), '', false); - $context = $this->getMock('Magento\Core\Helper\Context', array(), array(), '', false); + $context = $this->getMock('Magento\App\Helper\Context', array(), array(), '', false); $data = array( 'context' => $context ); diff --git a/dev/tests/unit/testsuite/Magento/GoogleShopping/Block/SiteVerificationTest.php b/dev/tests/unit/testsuite/Magento/GoogleShopping/Block/SiteVerificationTest.php index 2184796f17628f32eb9ca08630bf32faca661015..23f579bd30563c19f5b566482341f832af6e397a 100644 --- a/dev/tests/unit/testsuite/Magento/GoogleShopping/Block/SiteVerificationTest.php +++ b/dev/tests/unit/testsuite/Magento/GoogleShopping/Block/SiteVerificationTest.php @@ -43,7 +43,7 @@ class SiteVerificationTest extends \PHPUnit_Framework_TestCase ->method('escapeHtml') ->with('Valor & Honor')->will($this->returnValue('Valor & Honor')); - $context = $objectHelper->getObject('Magento\Core\Block\Context', array( + $context = $objectHelper->getObject('Magento\View\Block\Context', array( 'escaper' => $escaper )); diff --git a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Export/Entity/Eav/Customer/AddressTest.php b/dev/tests/unit/testsuite/Magento/ImportExport/Model/Export/Entity/Eav/Customer/AddressTest.php index a5972f243c1c634b7c37ec88e314c5517df47dbe..9d9ebe7840f756d0a414dde50d9709193317a7a1 100644 --- a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Export/Entity/Eav/Customer/AddressTest.php +++ b/dev/tests/unit/testsuite/Magento/ImportExport/Model/Export/Entity/Eav/Customer/AddressTest.php @@ -240,8 +240,8 @@ class AddressTest extends \PHPUnit_Framework_TestCase $this->getMock('Magento\Customer\Model\Config\Share', array(), array(), '', false), $this->getMock('Magento\Customer\Model\AddressFactory', array(), array(), '', false), $this->getMock('Magento\Customer\Model\Resource\Address\CollectionFactory', array(), array(), '', false), - $this->getMock('Magento\Core\Model\Email\Template\MailerFactory', array(), array(), '', false), - $this->getMock('Magento\Core\Model\Email\InfoFactory', array(), array(), '', false), + $this->getMock('Magento\Email\Model\Template\MailerFactory', array(), array(), '', false), + $this->getMock('Magento\Email\Model\InfoFactory', array(), array(), '', false), $this->getMock('Magento\Customer\Model\GroupFactory', array(), array(), '', false), $this->getMock('Magento\Customer\Model\AttributeFactory', array(), array(), '', false), ); diff --git a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/CustomerCompositeTest.php b/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/CustomerCompositeTest.php index 9f935367a52a7b67b7dc416e4bfdd030bd57f5c9..b9ad6307a750b8c37c87ce5fdb466e92e2d23f63 100644 --- a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/CustomerCompositeTest.php +++ b/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/CustomerCompositeTest.php @@ -114,7 +114,7 @@ class CustomerCompositeTest extends \PHPUnit_Framework_TestCase $translator->expects($this->any()) ->method('isAllowed') ->will($this->returnValue(false)); - $context = $this->getMock('Magento\Core\Helper\Context', array('getTranslator'), array(), '', false); + $context = $this->getMock('Magento\App\Helper\Context', array('getTranslator'), array(), '', false); $context->expects($this->any())->method('getTranslator')->will($this->returnValue($translator)); $data = array( 'translator' => $translator, diff --git a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/AddressTest.php b/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/AddressTest.php index 4534db5ea8ad94022686b3453af664058ed425c3..1ec10a17795d286a5e5f54de63ca2a7a04741928 100644 --- a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/AddressTest.php +++ b/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/AddressTest.php @@ -297,8 +297,8 @@ class AddressTest extends \PHPUnit_Framework_TestCase $this->getMock('Magento\Customer\Model\Resource\Address\CollectionFactory', array(), array(), '', false ), - $this->getMock('Magento\Core\Model\Email\Template\MailerFactory', array(), array(), '', false), - $this->getMock('Magento\Core\Model\Email\InfoFactory', array(), array(), '', false), + $this->getMock('Magento\Email\Model\Template\MailerFactory', array(), array(), '', false), + $this->getMock('Magento\Email\Model\InfoFactory', array(), array(), '', false), $this->getMock('Magento\Customer\Model\GroupFactory', array(), array(), '', false), $this->getMock('Magento\Customer\Model\AttributeFactory', array(), array(), '', false), ); diff --git a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/EavAbstractTest.php b/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/EavAbstractTest.php index 2799c09f9d29bcd5b58d061dd03ab4b95573205a..354936ed32f993c9fb99d4ae680c168ae4ffc2ad 100644 --- a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/EavAbstractTest.php +++ b/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/EavAbstractTest.php @@ -135,7 +135,7 @@ class EavAbstractTest extends \PHPUnit_Framework_TestCase 'connection' => 'not_used', 'json_helper' => 'not_used', 'string_helper' => new \Magento\Core\Helper\String( - $this->getMock('Magento\Core\Helper\Context', array(), array(), '', false, false), + $this->getMock('Magento\App\Helper\Context', array(), array(), '', false, false), $localeMock, $string, new \Magento\Stdlib\String($string) diff --git a/dev/tests/unit/testsuite/Magento/Install/App/Action/Plugin/DirTest.php b/dev/tests/unit/testsuite/Magento/Install/App/Action/Plugin/DirTest.php new file mode 100644 index 0000000000000000000000000000000000000000..f3f7285afec70ec0490084208dc59d3eff19a912 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Install/App/Action/Plugin/DirTest.php @@ -0,0 +1,69 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +namespace Magento\Install\App\Action\Plugin; + +class DirTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\Install\App\Action\Plugin\Dir + */ + protected $_plugin; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_appStateMock; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_dirMock; + + protected function setUp() + { + $this->_appStateMock = $this->getMock('Magento\App\State', array(), array(), '', false); + $this->_dirMock = $this->getMock('Magento\App\Dir', array(), array(), '', false); + $this->_plugin = new \Magento\Install\App\Action\Plugin\Dir( + $this->_appStateMock, + $this->_dirMock + ); + } + + public function testBeforeDispatchWhenAppIsInstalled() + { + $this->_appStateMock->expects($this->once())->method('isInstalled')->will($this->returnValue(false)); + $this->_dirMock + ->expects($this->once()) + ->method('getDir') + ->with(\Magento\App\Dir::VAR_DIR)->will($this->returnValue('dir_name')); + $this->assertEquals(array(), $this->_plugin->beforeDispatch(array())); + } + + public function testBeforeDispatchWhenAppIsNotInstalled() + { + $this->_appStateMock->expects($this->once())->method('isInstalled')->will($this->returnValue(true)); + $this->_dirMock->expects($this->never())->method('getDir'); + $this->assertEquals(array(), $this->_plugin->beforeDispatch(array())); + } +} \ No newline at end of file diff --git a/dev/tests/unit/testsuite/Magento/Install/Block/BeginTest.php b/dev/tests/unit/testsuite/Magento/Install/Block/BeginTest.php index 8bc7fb9c0a77e229f5d1c696c69cffd6cc52d90b..cac7d3dce9a6cb9e6566f0108098f7a80cacb0a5 100644 --- a/dev/tests/unit/testsuite/Magento/Install/Block/BeginTest.php +++ b/dev/tests/unit/testsuite/Magento/Install/Block/BeginTest.php @@ -33,22 +33,13 @@ namespace Magento\Install\Block; class BeginTest extends \PHPUnit_Framework_TestCase { /** - * Get block model - * - * @param \PHPUnit_Framework_MockObject_MockObject|\Magento\Filesystem $contextFileSystem - * @param string|null $fileName - * @return \Magento\Install\Block\Begin + * @var \Magento\TestFramework\Helper\ObjectManager */ - protected function _getBlockModel($contextFileSystem, $fileName = null) + protected $_objectManager; + + protected function setUp() { - $helper = $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false); - $context = $this->getMock('Magento\Core\Block\Template\Context', array(), array(), '', false); - $context->expects($this->once())->method('getFileSystem')->will($this->returnValue($contextFileSystem)); - $installer = $this->getMock('Magento\Install\Model\Installer', array(), array(), '', false); - $wizard = $this->getMock('Magento\Install\Model\Wizard', array(), array(), '', false); - $session = $this->getMock('Magento\Core\Model\Session\Generic', array(), array(), '', false); - $block = new \Magento\Install\Block\Begin($helper, $context, $installer, $wizard, $session, $fileName, array()); - return $block; + $this->_objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); } /** @@ -65,7 +56,9 @@ class BeginTest extends \PHPUnit_Framework_TestCase ->with($this->equalTo(BP . DS . $fileName)) ->will($this->returnValue($expectedTxt)); - $block = $this->_getBlockModel($fileSystem, $fileName); + $block = $this->_objectManager->getObject('Magento\Install\Block\Begin', + array('filesystem' => $fileSystem, 'eulaFile' => $fileName)); + $this->assertEquals($expectedTxt, $block->getLicenseHtml()); } @@ -81,7 +74,8 @@ class BeginTest extends \PHPUnit_Framework_TestCase $fileSystem = $this->getMock('Magento\Filesystem', array(), array(), '', false); $fileSystem->expects($this->never())->method('read'); - $block = $this->_getBlockModel($fileSystem, $fileName); + $block = $this->_objectManager->getObject('Magento\Install\Block\Begin', + array('filesystem' => $fileSystem, 'eulaFile' => $fileName)); $this->assertEquals('', $block->getLicenseHtml()); } diff --git a/dev/tests/unit/testsuite/Magento/Integration/Controller/Adminhtml/IntegrationTest.php b/dev/tests/unit/testsuite/Magento/Integration/Controller/Adminhtml/IntegrationTest.php index 90d60d8513598c9757012038374e7f2e2304598e..d3bf14aa12165f3ebb462c97409edd7a1835bb2b 100644 --- a/dev/tests/unit/testsuite/Magento/Integration/Controller/Adminhtml/IntegrationTest.php +++ b/dev/tests/unit/testsuite/Magento/Integration/Controller/Adminhtml/IntegrationTest.php @@ -269,9 +269,8 @@ class IntegrationTest extends \PHPUnit_Framework_TestCase protected function _createIntegrationController() { // Mock Layout passed into constructor - $layoutMock = $this->getMockBuilder('Magento\Core\Model\Layout') - ->disableOriginalConstructor() - ->getMock(); + $viewMock = $this->getMock('Magento\App\ViewInterface'); + $layoutMock = $this->getMock('Magento\View\LayoutInterface'); $layoutMergeMock = $this->getMockBuilder('Magento\Core\Model\Layout\Merge') ->disableOriginalConstructor() ->getMock(); @@ -279,6 +278,7 @@ class IntegrationTest extends \PHPUnit_Framework_TestCase $testElement = new \Magento\Simplexml\Element('<test>test</test>'); $layoutMock->expects($this->any())->method('getNode')->will($this->returnValue($testElement)); // for _setActiveMenu + $viewMock->expects($this->any())->method('getLayout')->will($this->returnValue($layoutMock)); $blockMock = $this->getMockBuilder('Magento\Backend\Block\Menu') ->disableOriginalConstructor() ->getMock(); @@ -290,7 +290,7 @@ class IntegrationTest extends \PHPUnit_Framework_TestCase $layoutMock->expects($this->any())->method('getMessagesBlock')->will($this->returnValue($blockMock)); $layoutMock->expects($this->any())->method('getBlock')->will($this->returnValue($blockMock)); $contextParameters = array( - 'layout' => $layoutMock, + 'view' => $viewMock, 'objectManager' => $this->_mockObjectManager, 'session' => $this->_mockBackendModSess, 'translator' => $this->_mockTranslateModel, @@ -300,7 +300,7 @@ class IntegrationTest extends \PHPUnit_Framework_TestCase $this->_mockBackendCntCtxt = $this->_objectManagerHelper ->getObject( - 'Magento\Backend\Controller\Context', + 'Magento\Backend\App\Action\Context', $contextParameters ); $subControllerParams = array( diff --git a/dev/tests/unit/testsuite/Magento/Integration/Model/Config/Api/ConverterTest.php b/dev/tests/unit/testsuite/Magento/Integration/Model/Config/Api/ConverterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..8e25700a6ee9f5e78c11c3cb20ab894e885cc05a --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Integration/Model/Config/Api/ConverterTest.php @@ -0,0 +1,50 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +namespace Magento\Integration\Model\Config\Api; + +use \Magento\Integration\Model\Config\Api\Converter; + +/** + * Test for conversion of integration API XML config into array representation. + */ +class ConverterTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var Converter + */ + protected $_model; + + public function setUp() + { + $this->_model = new Converter(); + } + + public function testConvert() + { + $inputData = new \DOMDocument(); + $inputData->load(__DIR__ . '/_files/api.xml'); + $expectedResult = require __DIR__ . '/_files/api.php'; + $this->assertEquals($expectedResult, $this->_model->convert($inputData)); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Integration/Model/Config/Api/XsdTest.php b/dev/tests/unit/testsuite/Magento/Integration/Model/Config/Api/XsdTest.php new file mode 100644 index 0000000000000000000000000000000000000000..2540117b0842b004ccb4d868ccfe022df8f9beac --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Integration/Model/Config/Api/XsdTest.php @@ -0,0 +1,291 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +namespace Magento\Integration\Model\Config\Api; + +/** + * Test for validation rules implemented by XSD schema for API integration configuration. + */ +class XsdTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var string + */ + protected $_schemaFile; + + protected function setUp() + { + $this->_schemaFile = BP . '/app/code/Magento/Integration/etc/integration/api.xsd'; + } + + /** + * @param string $fixtureXml + * @param array $expectedErrors + * @dataProvider exemplarXmlDataProvider + */ + public function testExemplarXml($fixtureXml, array $expectedErrors) + { + $messageFormat = '%message%'; + $dom = new \Magento\Config\Dom($fixtureXml, array(), null, $messageFormat); + $actualResult = $dom->validate($this->_schemaFile, $actualErrors); + $this->assertEquals(empty($expectedErrors), $actualResult, "Validation result is invalid."); + $this->assertEquals($expectedErrors, $actualErrors, "Validation errors does not match."); + } + + /** + * @return array + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ + public function exemplarXmlDataProvider() + { + return array( + /** Valid configurations */ + 'valid' => array( + '<integrations> + <integration id="TestIntegration1"> + <resources> + <resource name="Magento_Customer::manage" /> + <resource name="Magento_Customer::online" /> + </resources> + </integration> + </integrations>', + array() + ), + 'valid with several entities' => array( + '<integrations> + <integration id="TestIntegration1"> + <resources> + <resource name="Magento_Customer::manage" /> + <resource name="Magento_Customer::online" /> + </resources> + </integration> + <integration id="TestIntegration2"> + <resources> + <resource name="Magento_Catalog::product_read" /> + </resources> + </integration> + </integrations>', + array() + ), + + /** Missing required nodes */ + 'empty root node' => array( + '<integrations/>', + array("Element 'integrations': Missing child element(s). Expected is ( integration ).") + ), + 'empty integration' => array( + '<integrations> + <integration id="TestIntegration" /> + </integrations>', + array("Element 'integration': Missing child element(s). Expected is ( resources ).") + ), + 'empty resources' => array( + '<integrations> + <integration id="TestIntegration1"> + <resources> + </resources> + </integration> + </integrations>', + array("Element 'resources': Missing child element(s). Expected is ( resource ).") + ), + 'irrelevant root node' => array( + '<integration name="TestIntegration"/>', + array("Element 'integration': No matching global declaration available for the validation root.") + ), + + /** Excessive nodes */ + 'irrelevant node in root' => array( + '<integrations> + <integration id="TestIntegration1"> + <resources> + <resource name="Magento_Customer::manage" /> + <resource name="Magento_Customer::online" /> + </resources> + </integration> + <invalid/> + </integrations>', + array("Element 'invalid': This element is not expected. Expected is ( integration ).") + ), + 'irrelevant node in integration' => array( + '<integrations> + <integration id="TestIntegration1"> + <resources> + <resource name="Magento_Customer::manage" /> + <resource name="Magento_Customer::online" /> + </resources> + <invalid/> + </integration> + </integrations>', + array("Element 'invalid': This element is not expected.") + ), + 'irrelevant node in resources' => array( + '<integrations> + <integration id="TestIntegration1"> + <resources> + <resource name="Magento_Customer::manage" /> + <resource name="Magento_Customer::online" /> + <invalid/> + </resources> + </integration> + </integrations>', + array("Element 'invalid': This element is not expected. Expected is ( resource ).") + ), + 'irrelevant node in resource' => array( + '<integrations> + <integration id="TestIntegration1"> + <resources> + <resource name="Magento_Customer::manage" /> + <resource name="Magento_Customer::online"> + <invalid/> + </resource> + </resources> + </integration> + </integrations>', + array( + "Element 'resource': Element content is not allowed, " + . "because the content type is a simple type definition." + ) + ), + + /** Excessive attributes */ + 'invalid attribute in root' => array( + '<integrations invalid="invalid"> + <integration id="TestIntegration1"> + <resources> + <resource name="Magento_Customer::manage" /> + <resource name="Magento_Customer::online" /> + </resources> + </integration> + </integrations>', + array("Element 'integrations', attribute 'invalid': The attribute 'invalid' is not allowed.") + ), + 'invalid attribute in integration' => array( + '<integrations> + <integration id="TestIntegration1" invalid="invalid"> + <resources> + <resource name="Magento_Customer::manage" /> + <resource name="Magento_Customer::online" /> + </resources> + </integration> + </integrations>', + array("Element 'integration', attribute 'invalid': The attribute 'invalid' is not allowed.") + ), + 'invalid attribute in resources' => array( + '<integrations> + <integration id="TestIntegration1"> + <resources invalid="invalid"> + <resource name="Magento_Customer::manage" /> + <resource name="Magento_Customer::online" /> + </resources> + </integration> + </integrations>', + array("Element 'resources', attribute 'invalid': The attribute 'invalid' is not allowed.") + ), + 'invalid attribute in resource' => array( + '<integrations> + <integration id="TestIntegration1"> + <resources> + <resource name="Magento_Customer::manage" invalid="invalid" /> + <resource name="Magento_Customer::online" /> + </resources> + </integration> + </integrations>', + array("Element 'resource', attribute 'invalid': The attribute 'invalid' is not allowed.") + ), + + /** Missing or empty required attributes */ + 'integration without id' => array( + '<integrations> + <integration> + <resources> + <resource name="Magento_Customer::manage" /> + <resource name="Magento_Customer::online" /> + </resources> + </integration> + </integrations>', + array("Element 'integration': The attribute 'id' is required but missing.") + ), + 'integration with empty id' => array( + '<integrations> + <integration id=""> + <resources> + <resource name="Magento_Customer::manage" /> + <resource name="Magento_Customer::online" /> + </resources> + </integration> + </integrations>', + array + ( + "Element 'integration', attribute 'id': [facet 'minLength'] The value '' has a length of '0'; " + . "this underruns the allowed minimum length of '2'.", + "Element 'integration', attribute 'id': " + . "'' is not a valid value of the atomic type 'integrationIdType'." + ) + ), + 'resource without name' => array( + '<integrations> + <integration id="TestIntegration1"> + <resources> + <resource name="Magento_Customer::manage" /> + <resource /> + </resources> + </integration> + </integrations>', + array("Element 'resource': The attribute 'name' is required but missing.") + ), + 'resource with empty name' => array( + '<integrations> + <integration id="TestIntegration1"> + <resources> + <resource name="Magento_Customer::manage" /> + <resource name="" /> + </resources> + </integration> + </integrations>', + array( + "Element 'resource', attribute 'name': [facet 'pattern'] " + . "The value '' is not accepted by the pattern '.+_.+::.+'.", + "Element 'resource', attribute 'name': '' " + . "is not a valid value of the atomic type 'resourceNameType'." + ) + ), + + /** Invalid values */ + 'resource with invalid name' => array( + '<integrations> + <integration id="TestIntegration1"> + <resources> + <resource name="Magento_Customer::online" /> + <resource name="customer_manage" /> + </resources> + </integration> + </integrations>', + array( + "Element 'resource', attribute 'name': [facet 'pattern'] " + . "The value 'customer_manage' is not accepted by the pattern '.+_.+::.+'.", + "Element 'resource', attribute 'name': 'customer_manage' " + . "is not a valid value of the atomic type 'resourceNameType'." + ) ), + ); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Integration/Model/Config/Api/_files/api.php b/dev/tests/unit/testsuite/Magento/Integration/Model/Config/Api/_files/api.php new file mode 100644 index 0000000000000000000000000000000000000000..4f82ce8be295cfff4bfbbfdacd42e7e912477fc1 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Integration/Model/Config/Api/_files/api.php @@ -0,0 +1,38 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +return array( + 'TestIntegration1' => array( + 'resources' => array( + 'Magento_Customer::manage', + 'Magento_Customer::online', + 'Magento_Customer::order_statuses_read', + 'Magento_SalesHistory::history' + ) + ), + 'TestIntegration2' => array( + 'resources' => array( + 'Magento_Catalog::product_read', + ) + ), +); diff --git a/dev/tests/unit/testsuite/Magento/Integration/Model/Config/Api/_files/api.xml b/dev/tests/unit/testsuite/Magento/Integration/Model/Config/Api/_files/api.xml new file mode 100644 index 0000000000000000000000000000000000000000..bd3b83e6a4d0b40f05cf92304ab8762abde61b97 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Integration/Model/Config/Api/_files/api.xml @@ -0,0 +1,42 @@ +<?xml version="1.0"?> +<!-- +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<integrations> + <integration id="TestIntegration1"> + <!-- List of API resources required by the integration. These are resource ids defined + in etc/acl.xml of modules and subsequently mapped to web APIs in webapi.xml. --> + <resources> + <resource name="Magento_Customer::manage" /> + <resource name="Magento_Customer::online" /> + <resource name="Magento_Customer::order_statuses_read" /> + <resource name="Magento_SalesHistory::history" /> + </resources> + </integration> + <integration id="TestIntegration2"> + <resources> + <resource name="Magento_Catalog::product_read" /> + </resources> + </integration> +</integrations> diff --git a/dev/tests/unit/testsuite/Magento/Integration/Model/Config/ConverterTest.php b/dev/tests/unit/testsuite/Magento/Integration/Model/Config/ConverterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e67763ef77392e54752505a5c27f465bbdfbb3a0 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Integration/Model/Config/ConverterTest.php @@ -0,0 +1,50 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +namespace Magento\Integration\Model\Config; + +use Magento\Integration\Model\Config\Converter; + +/** + * Test for conversion of integration XML config into array representation. + */ +class ConverterTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var Converter + */ + protected $_model; + + public function setUp() + { + $this->_model = new Converter(); + } + + public function testConvert() + { + $inputData = new \DOMDocument(); + $inputData->load(__DIR__ . '/_files/integration.xml'); + $expectedResult = require __DIR__ . '/_files/integration.php'; + $this->assertEquals($expectedResult, $this->_model->convert($inputData)); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Integration/Model/Config/XsdTest.php b/dev/tests/unit/testsuite/Magento/Integration/Model/Config/XsdTest.php new file mode 100644 index 0000000000000000000000000000000000000000..54997c2963ee209ef3dced02c0e86f08f8dd1a1f --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Integration/Model/Config/XsdTest.php @@ -0,0 +1,395 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +namespace Magento\Integration\Model\Config; + +/** + * Test for validation rules implemented by XSD schema for integration configuration. + */ +class XsdTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var string + */ + protected $_schemaFile; + + protected function setUp() + { + $this->_schemaFile = BP . '/app/code/Magento/Integration/etc/integration/config.xsd'; + } + + /** + * @param string $fixtureXml + * @param array $expectedErrors + * @dataProvider exemplarXmlDataProvider + */ + public function testExemplarXml($fixtureXml, array $expectedErrors) + { + $messageFormat = '%message%'; + $dom = new \Magento\Config\Dom($fixtureXml, array(), null, $messageFormat); + $actualResult = $dom->validate($this->_schemaFile, $actualErrors); + $this->assertEquals(empty($expectedErrors), $actualResult, "Validation result is invalid."); + $this->assertEquals($expectedErrors, $actualErrors, "Validation errors does not match."); + } + + /** + * @return array + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ + public function exemplarXmlDataProvider() + { + return array( + /** Valid configurations */ + 'valid' => array( + '<integrations> + <integration id="TestIntegration"> + <name>Test Integration</name> + <email>test-integration@magento.com</email> + <authentication type="oauth"> + <endpoint_url>https://endpoint.url</endpoint_url> + </authentication> + </integration> + </integrations>', + array() + ), + 'valid with several entities' => array( + '<integrations> + <integration id="TestIntegration1"> + <name>Test Integration 1</name> + <email>test-integration1@magento.com</email> + <authentication type="oauth"> + <endpoint_url>http://endpoint.url</endpoint_url> + </authentication> + </integration> + <integration id="TestIntegration2"> + <name>Test Integration 2</name> + <email>test-integration2@magento.com</email> + <authentication type="manual"/> + </integration> + </integrations>', + array() + ), + + /** Missing required elements */ + 'empty root node' => array( + '<integrations/>', + array("Element 'integrations': Missing child element(s). Expected is ( integration ).") + ), + 'empty integration' => array( + '<integrations> + <integration id="TestIntegration" /> + </integrations>', + array("Element 'integration': Missing child element(s). Expected is ( name ).") + ), + 'integration without name' => array( + '<integrations> + <integration id="TestIntegration1"> + <email>test-integration1@magento.com</email> + <authentication type="oauth"> + <endpoint_url>http://endpoint.url</endpoint_url> + </authentication> + </integration> + </integrations>', + array("Element 'email': This element is not expected. Expected is ( name ).") + ), + 'integration without email' => array( + '<integrations> + <integration id="TestIntegration1"> + <name>Test Integration 1</name> + <authentication type="oauth"> + <endpoint_url>http://endpoint.url</endpoint_url> + </authentication> + </integration> + </integrations>', + array("Element 'authentication': This element is not expected. Expected is ( email ).") + ), + 'integration without authentication' => array( + '<integrations> + <integration id="TestIntegration1"> + <name>Test Integration 1</name> + <email>test-integration1@magento.com</email> + </integration> + </integrations>', + array("Element 'integration': Missing child element(s). Expected is ( authentication ).") + ), + + /** Empty nodes */ + 'empty name' => array( + '<integrations> + <integration id="TestIntegration1"> + <name></name> + <email>test-integration1@magento.com</email> + <authentication type="oauth"> + <endpoint_url>http://endpoint.url</endpoint_url> + </authentication> + </integration> + </integrations>', + array( + "Element 'name': [facet 'minLength'] The value has a length of '0';" + . " this underruns the allowed minimum length of '2'.", + "Element 'name': '' is not a valid value of the atomic type 'integrationNameType'." + ) + ), + 'empty email' => array( + '<integrations> + <integration id="TestIntegration1"> + <name>Test Integration 1</name> + <email></email> + <authentication type="oauth"> + <endpoint_url>http://endpoint.url</endpoint_url> + </authentication> + </integration> + </integrations>', + array( + "Element 'email': [facet 'pattern'] The value '' is not " + . "accepted by the pattern '[^@]+@[^\.]+\..+'.", + "Element 'email': '' is not a valid value of the atomic type 'emailType'." + ) + ), + 'authentication is empty' => array( + '<integrations> + <integration id="TestIntegration1"> + <name>Test Integration 1</name> + <email>test-integration1@magento.com</email> + <authentication type="manual"/> + </integration> + </integrations>', + array() + ), + 'endpoint_url is empty' => array( + '<integrations> + <integration id="TestIntegration1"> + <name>Test Integration 1</name> + <email>test-integration1@magento.com</email> + <authentication type="oauth"> + <endpoint_url></endpoint_url> + </authentication> + </integration> + </integrations>', + array( + "Element 'endpoint_url': [facet 'minLength'] The value has a length of '0'; this underruns" + . " the allowed minimum length of '4'.", + "Element 'endpoint_url': '' is not a valid value of the atomic type 'urlType'." + ) + ), + + /** Invalid structure */ + 'irrelevant root node' => array( + '<integration name="TestIntegration"/>', + array("Element 'integration': No matching global declaration available for the validation root.") + ), + 'irrelevant node in root' => array( + '<integrations> + <integration id="TestIntegration1"> + <name>Test Integration 1</name> + <email>test-integration1@magento.com</email> + <authentication type="oauth"> + <endpoint_url>http://endpoint.url</endpoint_url> + </authentication> + </integration> + <invalid/> + </integrations>', + array("Element 'invalid': This element is not expected. Expected is ( integration ).") + ), + 'irrelevant node in integration' => array( + '<integrations> + <integration id="TestIntegration1"> + <name>Test Integration 1</name> + <email>test-integration1@magento.com</email> + <authentication type="oauth"> + <endpoint_url>http://endpoint.url</endpoint_url> + </authentication> + <invalid/> + </integration> + </integrations>', + array("Element 'invalid': This element is not expected.") + ), + 'irrelevant node in authentication' => array( + '<integrations> + <integration id="TestIntegration1"> + <name>Test Integration 1</name> + <email>test-integration1@magento.com</email> + <authentication type="oauth"> + <endpoint_url>http://endpoint.url</endpoint_url> + <invalid/> + </authentication> + </integration> + </integrations>', + array("Element 'invalid': This element is not expected.") + ), + + /** Excessive attributes */ + 'invalid attribute in root' => array( + '<integrations invalid="invalid"> + <integration id="TestIntegration1"> + <name>Test Integration 1</name> + <email>test-integration1@magento.com</email> + <authentication type="oauth"> + <endpoint_url>http://endpoint.url</endpoint_url> + </authentication> + </integration> + </integrations>', + array("Element 'integrations', attribute 'invalid': The attribute 'invalid' is not allowed.") + ), + 'invalid attribute in integration' => array( + '<integrations> + <integration id="TestIntegration1" invalid="invalid"> + <name>Test Integration 1</name> + <email>test-integration1@magento.com</email> + <authentication type="oauth"> + <endpoint_url>http://endpoint.url</endpoint_url> + </authentication> + </integration> + </integrations>', + array("Element 'integration', attribute 'invalid': The attribute 'invalid' is not allowed.") + ), + 'invalid attribute in name' => array( + '<integrations> + <integration id="TestIntegration1"> + <name invalid="invalid">Test Integration 1</name> + <email>test-integration1@magento.com</email> + <authentication type="oauth"> + <endpoint_url>http://endpoint.url</endpoint_url> + </authentication> + </integration> + </integrations>', + array("Element 'name', attribute 'invalid': The attribute 'invalid' is not allowed.") + ), + 'invalid attribute in email' => array( + '<integrations> + <integration id="TestIntegration1"> + <name>Test Integration 1</name> + <email invalid="invalid">test-integration1@magento.com</email> + <authentication type="oauth"> + <endpoint_url>http://endpoint.url</endpoint_url> + </authentication> + </integration> + </integrations>', + array("Element 'email', attribute 'invalid': The attribute 'invalid' is not allowed.") + ), + 'invalid attribute in authentication' => array( + '<integrations> + <integration id="TestIntegration1"> + <name>Test Integration 1</name> + <email>test-integration1@magento.com</email> + <authentication type="oauth" invalid="invalid"> + <endpoint_url>http://endpoint.url</endpoint_url> + </authentication> + </integration> + </integrations>', + array("Element 'authentication', attribute 'invalid': The attribute 'invalid' is not allowed.") + ), + 'invalid attribute in endpoint_url' => array( + '<integrations> + <integration id="TestIntegration1"> + <name>Test Integration 1</name> + <email>test-integration1@magento.com</email> + <authentication type="oauth"> + <endpoint_url invalid="invalid">http://endpoint.url</endpoint_url> + </authentication> + </integration> + </integrations>', + array("Element 'endpoint_url', attribute 'invalid': The attribute 'invalid' is not allowed.") + ), + + /** Missing or empty required attributes */ + 'integration without id' => array( + '<integrations> + <integration> + <name>Test Integration 1</name> + <email>test-integration1@magento.com</email> + <authentication type="oauth"> + <endpoint_url>http://endpoint.url</endpoint_url> + </authentication> + </integration> + </integrations>', + array("Element 'integration': The attribute 'id' is required but missing.") + ), + 'integration with empty id' => array( + '<integrations> + <integration id=""> + <name>Test Integration 1</name> + <email>test-integration1@magento.com</email> + <authentication type="oauth"> + <endpoint_url>http://endpoint.url</endpoint_url> + </authentication> + </integration> + </integrations>', + array + ( + "Element 'integration', attribute 'id': [facet 'minLength'] The value '' has a length of '0'; " + . "this underruns the allowed minimum length of '2'.", + "Element 'integration', attribute 'id': " + . "'' is not a valid value of the atomic type 'integrationIdType'." + ) + ), + 'no authentication type' => array( + '<integrations> + <integration id="TestIntegration1"> + <name>Test Integration 1</name> + <email>test-integration1@magento.com</email> + <authentication> + <endpoint_url>http://endpoint.url</endpoint_url> + </authentication> + </integration> + </integrations>', + array("Element 'authentication': The attribute 'type' is required but missing.") + ), + + /** Invalid values */ + 'invalid authentication type' => array( + '<integrations> + <integration id="TestIntegration1"> + <name>Test Integration 1</name> + <email>test-integration1@magento.com</email> + <authentication type="invalid"> + <endpoint_url>http://endpoint.url</endpoint_url> + </authentication> + </integration> + </integrations>', + array + ( + "Element 'authentication', attribute 'type': [facet 'enumeration'] The value 'invalid' is not " + . "an element of the set {'oauth', 'manual'}.", + "Element 'authentication', attribute 'type': 'invalid' " + . "is not a valid value of the atomic type 'authenticationTypeType'." + ) + ), + 'invalid email' => array( + '<integrations> + <integration id="TestIntegration1"> + <name>Test Integration 1</name> + <email>invalid</email> + <authentication type="oauth"> + <endpoint_url>http://endpoint.url</endpoint_url> + </authentication> + </integration> + </integrations>', + array("Element 'email': [facet 'pattern'] The value 'invalid' " + . "is not accepted by the pattern '[^@]+@[^\.]+\..+'.", + "Element 'email': 'invalid' is not a valid value of the atomic type 'emailType'." + ) + ), + ); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Integration/Model/Config/_files/integration.php b/dev/tests/unit/testsuite/Magento/Integration/Model/Config/_files/integration.php new file mode 100644 index 0000000000000000000000000000000000000000..88b4dfa40a9f0913669ebabc564d0c311264b063 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Integration/Model/Config/_files/integration.php @@ -0,0 +1,40 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +return array( + 'TestIntegration1' => array( + 'name' => 'Test Integration 1', + 'email' => 'test-integration1@magento.com', + 'authentication' => array( + 'type' => 'oauth', + 'endpoint_url' => 'http://endpoint.com' + ) + ), + 'TestIntegration2' => array( + 'name' => 'Test Integration 2', + 'email' => 'test-integration2@magento.com', + 'authentication' => array( + 'type' => 'manual' + ) + ), +); diff --git a/dev/tests/unit/testsuite/Magento/Integration/Model/Config/_files/integration.xml b/dev/tests/unit/testsuite/Magento/Integration/Model/Config/_files/integration.xml new file mode 100644 index 0000000000000000000000000000000000000000..b88d4f43c4e9b31a7f4e6330fbb833e9642934e6 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Integration/Model/Config/_files/integration.xml @@ -0,0 +1,39 @@ +<?xml version="1.0"?> +<!-- +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<integrations> + <integration id="TestIntegration1"> + <name>Test Integration 1</name> + <email>test-integration1@magento.com</email> + <authentication type="oauth"> + <endpoint_url>http://endpoint.com</endpoint_url> + </authentication> + </integration> + <integration id="TestIntegration2"> + <name>Test Integration 2</name> + <email>test-integration2@magento.com</email> + <authentication type="manual"/> + </integration> +</integrations> diff --git a/dev/tests/unit/testsuite/Magento/Interception/Config/ConfigTest.php b/dev/tests/unit/testsuite/Magento/Interception/Config/ConfigTest.php index 96bcf0dca81a6526320e39c746662cbb42780043..86c468739fddccae390ac826dc01c40e91fb8df2 100644 --- a/dev/tests/unit/testsuite/Magento/Interception/Config/ConfigTest.php +++ b/dev/tests/unit/testsuite/Magento/Interception/Config/ConfigTest.php @@ -67,7 +67,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase new \Magento\ObjectManager\Config\SchemaLocator(), $validationStateMock ); - $this->_configScopeMock = $this->getMock('Magento\Config\ScopeInterface'); + $this->_configScopeMock = $this->getMock('Magento\Config\ScopeListInterface'); $this->_configScopeMock->expects($this->any()) ->method('getAllScopes') ->will($this->returnValue(array('global', 'backend', 'frontend'))); diff --git a/dev/tests/unit/testsuite/Magento/Interception/PluginList/PluginListTest.php b/dev/tests/unit/testsuite/Magento/Interception/PluginList/PluginListTest.php index 33db981311ebd851b58a40d2f5d893afbf3ebb6b..204ad6cd46fd2ff9de5d08557492f0d4719798ec 100644 --- a/dev/tests/unit/testsuite/Magento/Interception/PluginList/PluginListTest.php +++ b/dev/tests/unit/testsuite/Magento/Interception/PluginList/PluginListTest.php @@ -67,10 +67,7 @@ class PluginListTest extends \PHPUnit_Framework_TestCase new \Magento\ObjectManager\Config\SchemaLocator(), $validationStateMock ); - $this->_configScopeMock = $this->getMock('Magento\Config\ScopeInterface'); - $this->_configScopeMock->expects($this->any()) - ->method('getAllScopes') - ->will($this->returnValue(array('global', 'backend', 'frontend'))); + $this->_configScopeMock = $this->getMock('\Magento\Config\ScopeInterface'); $cacheMock = $this->getMock('Magento\Config\CacheInterface'); // turn cache off $cacheMock->expects($this->any()) diff --git a/dev/tests/unit/testsuite/Magento/Log/LoggerTest.php b/dev/tests/unit/testsuite/Magento/Log/LoggerTest.php index a75703c0fdfb93d8d7bd3c7830c81bfc2231c34f..0e661d98e1493d916d0ac2cb0ea45ff387167a95 100644 --- a/dev/tests/unit/testsuite/Magento/Log/LoggerTest.php +++ b/dev/tests/unit/testsuite/Magento/Log/LoggerTest.php @@ -97,7 +97,7 @@ class LoggerTest extends \PHPUnit_Framework_TestCase } /** - * @covers \Magento\Core\Model\Logger::hasLog + * @covers \Magento\Logger::hasLog */ public function testAddLogWithSpecificKey() { diff --git a/dev/tests/unit/testsuite/Magento/Module/UpdaterTest.php b/dev/tests/unit/testsuite/Magento/Module/UpdaterTest.php index c02d213931cb9f3cfe709e75531b9578fab070ce..e91565eaf84c72685220e66a3b2ccd83f79c5ba9 100644 --- a/dev/tests/unit/testsuite/Magento/Module/UpdaterTest.php +++ b/dev/tests/unit/testsuite/Magento/Module/UpdaterTest.php @@ -89,7 +89,7 @@ class UpdaterTest extends \PHPUnit_Framework_TestCase } /** - * @covers \Magento\App\Updater::updateScheme + * @covers \Magento\Module\Updater::updateScheme */ public function testUpdateSchemeWithUpdateSkip() { @@ -104,7 +104,7 @@ class UpdaterTest extends \PHPUnit_Framework_TestCase } /** - * @covers \Magento\App\Updater::updateScheme + * @covers \Magento\Module\Updater::updateScheme */ public function testUpdateScheme() { @@ -132,7 +132,7 @@ class UpdaterTest extends \PHPUnit_Framework_TestCase } /** - * @covers \Magento\App\Updater::updateData + * @covers \Magento\Module\Updater::updateData */ public function testUpdateData() { diff --git a/dev/tests/unit/testsuite/Magento/Page/Block/Html/HeaderTest.php b/dev/tests/unit/testsuite/Magento/Page/Block/Html/HeaderTest.php index 6e910bb119e2a3becb396b07e86458b707127875..8dbcd39381d97d36fabdc4f3d79ca9e4e1efffa0 100644 --- a/dev/tests/unit/testsuite/Magento/Page/Block/Html/HeaderTest.php +++ b/dev/tests/unit/testsuite/Magento/Page/Block/Html/HeaderTest.php @@ -51,7 +51,7 @@ class HeaderTest extends \PHPUnit_Framework_TestCase ->method('checkDbUsage') ->will($this->returnValue(false)); - $helperFactory = $this->getMock('Magento\Core\Model\Factory\Helper', array('get'), array(), '', false); + $helperFactory = $this->getMock('Magento\App\Helper\HelperFactory', array('get'), array(), '', false); $helperFactory->expects($this->once()) ->method('get') ->will($this->returnValue($helper)); diff --git a/dev/tests/unit/testsuite/Magento/Page/Block/Link/CurrentTest.php b/dev/tests/unit/testsuite/Magento/Page/Block/Link/CurrentTest.php index 8a6e52d57315b55f8f0839f0a2077707893ceccb..3c65c60a9acd2bbc2a14700058ecbb60fcb1a3d9 100644 --- a/dev/tests/unit/testsuite/Magento/Page/Block/Link/CurrentTest.php +++ b/dev/tests/unit/testsuite/Magento/Page/Block/Link/CurrentTest.php @@ -25,11 +25,6 @@ namespace Magento\Page\Block\Link; class CurrentTest extends \PHPUnit_Framework_TestCase { - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $_contextMock; - /** * @var \PHPUnit_Framework_MockObject_MockObject */ @@ -43,26 +38,19 @@ class CurrentTest extends \PHPUnit_Framework_TestCase /** * @var \PHPUnit_Framework_MockObject_MockObject */ - protected $_coreHelperMock; + protected $_defaultPathMock; /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @var \Magento\TestFramework\Helper\ObjectManager */ - protected $_defaultPathMock; + protected $_objectManager; protected function setUp() { + $this->_objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); $this->_urlBuilderMock = $this->getMock('\Magento\UrlInterface'); $this->_requestMock = $this->getMock('Magento\App\Request\Http', array(), array(), '', false); - $this->_coreHelperMock = $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false); - $this->_contextMock = $this->getMock('Magento\Core\Block\Template\Context', array(), array(), '', false); $this->_defaultPathMock = $this->getMock('\Magento\App\DefaultPathInterface'); - $this->_contextMock->expects($this->any()) - ->method('getUrlBuilder') - ->will($this->returnValue($this->_urlBuilderMock)); - $this->_contextMock->expects($this->any()) - ->method('getRequest') - ->will($this->returnValue($this->_requestMock)); } public function testGetUrl() @@ -75,10 +63,10 @@ class CurrentTest extends \PHPUnit_Framework_TestCase ->with($path) ->will($this->returnValue($url)); - $link = new \Magento\Page\Block\Link\Current( - $this->_coreHelperMock, - $this->_contextMock, - $this->_defaultPathMock + /** @var \Magento\Page\Block\Link\Current $link */ + $link = $this->_objectManager->getObject( + '\Magento\Page\Block\Link\Current', + array('urlBuilder' => $this->_urlBuilderMock) ); $link->setPath($path); @@ -88,11 +76,8 @@ class CurrentTest extends \PHPUnit_Framework_TestCase public function testIsCurrentIfIsset() { - $link = new \Magento\Page\Block\Link\Current( - $this->_coreHelperMock, - $this->_contextMock, - $this->_defaultPathMock - ); + /** @var \Magento\Page\Block\Link\Current $link */ + $link = $this->_objectManager->getObject('\Magento\Page\Block\Link\Current'); $link->setCurrent(true); $this->assertTrue($link->IsCurrent()); } @@ -115,11 +100,14 @@ class CurrentTest extends \PHPUnit_Framework_TestCase ->with('a/b') ->will($this->returnValue($url)); - $link = new \Magento\Page\Block\Link\Current( - $this->_coreHelperMock, - $this->_contextMock, - $this->_defaultPathMock - ); + $this->_requestMock->expects($this->once())->method('getControllerName')->will($this->returnValue('b')); + /** @var \Magento\Page\Block\Link\Current $link */ + $link = $this->_objectManager->getObject('\Magento\Page\Block\Link\Current', + array( + 'urlBuilder' => $this->_urlBuilderMock, + 'request' => $this->_requestMock, + 'defaultPath' => $this->_defaultPathMock + )); $link->setPath($path); $this->assertTrue($link->isCurrent()); } @@ -129,11 +117,13 @@ class CurrentTest extends \PHPUnit_Framework_TestCase $this->_urlBuilderMock->expects($this->at(0))->method('getUrl')->will($this->returnValue('1')); $this->_urlBuilderMock->expects($this->at(1))->method('getUrl')->will($this->returnValue('2')); - $link = new \Magento\Page\Block\Link\Current( - $this->_coreHelperMock, - $this->_contextMock, - $this->_defaultPathMock - ); + + /** @var \Magento\Page\Block\Link\Current $link */ + $link = $this->_objectManager->getObject('\Magento\Page\Block\Link\Current', + array( + 'urlBuilder' => $this->_urlBuilderMock, + 'request' => $this->_requestMock + )); $this->assertFalse($link->isCurrent()); } } diff --git a/dev/tests/unit/testsuite/Magento/Page/Block/LinksTest.php b/dev/tests/unit/testsuite/Magento/Page/Block/LinksTest.php index 61f13ff66890aedb238a29edb74bbf66ac818cb6..dc1a9e5d45cc2c2dde0ff3ed453dea2b6a3b2b61 100644 --- a/dev/tests/unit/testsuite/Magento/Page/Block/LinksTest.php +++ b/dev/tests/unit/testsuite/Magento/Page/Block/LinksTest.php @@ -33,15 +33,15 @@ class LinksTest extends \PHPUnit_Framework_TestCase /** @var \Magento\Page\Block\Links */ protected $_block; - /** @var \Magento\Core\Block\Template\Context */ + /** @var \Magento\View\Block\Template\Context */ protected $_context; protected function setUp() { $this->_objectManagerHelper = new \Magento\TestFramework\Helper\ObjectManager($this); - /** @var \Magento\Core\Block\Template\Context $context */ - $this->_context = $this->_objectManagerHelper->getObject('Magento\Core\Block\Template\Context'); + /** @var \Magento\View\Block\Template\Context $context */ + $this->_context = $this->_objectManagerHelper->getObject('Magento\View\Block\Template\Context'); /** @var \Magento\Page\Block\Links $block */ $this->_block = $this->_objectManagerHelper->getObject( @@ -72,8 +72,8 @@ class LinksTest extends \PHPUnit_Framework_TestCase $this->_context->getLayout()->expects($this->once())->method('renderElement')->with($name) ->will($this->returnValue($blockHtml)); - /** @var \Magento\Core\Block\AbstractBlock $link */ - $link = $this->getMockBuilder('Magento\Core\Block\AbstractBlock')->disableOriginalConstructor()->getMock(); + /** @var \Magento\View\Block\AbstractBlock $link */ + $link = $this->getMockBuilder('Magento\View\Block\AbstractBlock')->disableOriginalConstructor()->getMock(); $link->expects($this->once()) ->method('getNameInLayout') ->will($this->returnValue($name)); diff --git a/dev/tests/unit/testsuite/Magento/Page/Block/SwitchTest.php b/dev/tests/unit/testsuite/Magento/Page/Block/SwitchTest.php index 49b89c97a3b8fd23d20a573efa5bf37f0d8b2761..eddacc7c28c93a37306cc0b89fe3e8954d991636 100644 --- a/dev/tests/unit/testsuite/Magento/Page/Block/SwitchTest.php +++ b/dev/tests/unit/testsuite/Magento/Page/Block/SwitchTest.php @@ -39,16 +39,6 @@ class SwitchTest extends \PHPUnit_Framework_TestCase */ protected $_storeManagerMock; - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $_coreHelperMock; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $_contextMock; - /** * @var \PHPUnit_Framework_MockObject_MockObject */ @@ -57,18 +47,10 @@ class SwitchTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->_storeManagerMock = $this->getMock('\Magento\Core\Model\StoreManagerInterface'); - $this->_coreHelperMock = $this->getMock('\Magento\Core\Helper\Data', array(), array(), '', false); - $this->_contextMock = $this->getMock('\Magento\Core\Block\Template\Context', array(), array(), '', false); - $this->_appMock = $this->getMock('\Magento\Core\Model\App', array(), array(), '', false); - - $this->_contextMock->expects($this->any()) - ->method('getApp') - ->will($this->returnValue($this->_appMock)); - $this->_block = new \Magento\Page\Block\Switcher( - $this->_storeManagerMock, - $this->_coreHelperMock, - $this->_contextMock + $helper = new \Magento\TestFramework\Helper\ObjectManager($this); + $this->_block = $helper->getObject( + 'Magento\Page\Block\Switcher', array('storeManager' => $this->_storeManagerMock) ); } @@ -78,13 +60,10 @@ class SwitchTest extends \PHPUnit_Framework_TestCase public function testIsStoreInUrl($isUseStoreInUrl) { $storeMock = $this->getMock('Magento\Core\Model\Store', array(), array(), '', false); + $storeMock->expects($this->once())->method('isUseStoreInUrl')->will($this->returnValue($isUseStoreInUrl)); - $this->_storeManagerMock = $this->getMock('Magento\Core\Model\StoreManagerInterface'); $this->_storeManagerMock->expects($this->any())->method('getStore')->will($this->returnValue($storeMock)); - - $this->_appMock->expects($this->any())->method('getStore')->will($this->returnValue($storeMock)); - $this->assertEquals($this->_block->isStoreInUrl(), $isUseStoreInUrl); // check value is cached $this->assertEquals($this->_block->isStoreInUrl(), $isUseStoreInUrl); diff --git a/dev/tests/unit/testsuite/Magento/Payment/Block/Form/ContainerTest.php b/dev/tests/unit/testsuite/Magento/Payment/Block/Form/ContainerTest.php index a87b9bd12b2ffd180c029fa03d318a3b270f4623..b712704096f59df782fc38bc24886d4a92942018 100644 --- a/dev/tests/unit/testsuite/Magento/Payment/Block/Form/ContainerTest.php +++ b/dev/tests/unit/testsuite/Magento/Payment/Block/Form/ContainerTest.php @@ -38,8 +38,8 @@ class ContainerTest extends \PHPUnit_Framework_TestCase public function testSetMethodFormTemplate() { $objectManagerHelper = new \Magento\TestFramework\Helper\ObjectManager($this); - $childBlockA = $objectManagerHelper->getObject('Magento\Core\Block\Template'); - $childBlockB = $objectManagerHelper->getObject('Magento\Core\Block\Template'); + $childBlockA = $objectManagerHelper->getObject('Magento\View\Block\Template'); + $childBlockB = $objectManagerHelper->getObject('Magento\View\Block\Template'); $func = function ($blockName) use ($childBlockA, $childBlockB) { switch ($blockName) { diff --git a/dev/tests/unit/testsuite/Magento/Payment/Block/Info/ContainerAbstractTest.php b/dev/tests/unit/testsuite/Magento/Payment/Block/Info/ContainerAbstractTest.php index 39aae72d2a80f9952c92d38b405961536dd356bd..e4b5f3c8204ddd1239922bd3a12548953dafb753 100644 --- a/dev/tests/unit/testsuite/Magento/Payment/Block/Info/ContainerAbstractTest.php +++ b/dev/tests/unit/testsuite/Magento/Payment/Block/Info/ContainerAbstractTest.php @@ -48,7 +48,7 @@ class ContainerAbstractTest extends \PHPUnit_Framework_TestCase ->method('getPaymentInfo') ->will($this->returnValue($paymentInfo)); - $childBlock = $objectManagerHelper->getObject('Magento\Core\Block\Template'); + $childBlock = $objectManagerHelper->getObject('Magento\View\Block\Template'); $block->expects($this->atLeastOnce()) ->method('getChildBlock') ->with('payment.info.checkmo') diff --git a/dev/tests/unit/testsuite/Magento/Review/Helper/Action/PagerTest.php b/dev/tests/unit/testsuite/Magento/Review/Helper/Action/PagerTest.php index 33ca2da23cd00d4cd7c484f15af258eb751dac67..2f13b9467e2130f0f402f7a82d6a347154dd81a2 100644 --- a/dev/tests/unit/testsuite/Magento/Review/Helper/Action/PagerTest.php +++ b/dev/tests/unit/testsuite/Magento/Review/Helper/Action/PagerTest.php @@ -50,7 +50,7 @@ class PagerTest extends \PHPUnit_Framework_TestCase ->will($this->returnValue(array(3,2,6,5))); $contextMock = $this->getMock( - 'Magento\Core\Helper\Context', array('getTranslator', 'getModuleManager', 'getRequest'), array(), '', false + 'Magento\App\Helper\Context', array('getTranslator', 'getModuleManager', 'getRequest'), array(), '', false ); $this->_helper = new \Magento\Review\Helper\Action\Pager($sessionMock, $contextMock); $this->_helper->setStorageId('reviews'); diff --git a/dev/tests/unit/testsuite/Magento/Sales/Block/Adminhtml/Items/AbstractItemsTest.php b/dev/tests/unit/testsuite/Magento/Sales/Block/Adminhtml/Items/AbstractItemsTest.php index 41138a22f0a1ef7970afe87066c2b9c75493954b..7801ad18b4d735ba3e78907d524cd88bada3170a 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Block/Adminhtml/Items/AbstractItemsTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Block/Adminhtml/Items/AbstractItemsTest.php @@ -39,25 +39,19 @@ class AbstractItemsTest extends \PHPUnit_Framework_TestCase ->with(null, 'column') ->will($this->returnValue(array('column_block-name'))); - $context = $this->getMock('Magento\Backend\Block\Template\Context', array('getLayout'), array(), '', false); - $context->expects($this->any()) - ->method('getLayout') - ->will($this->returnValue($layout)); - - $product = $this->getMock('\Magento\Catalog\Model\ProductFactory', array(), array(), '', false); - $coreData = $this->getMock('\Magento\Core\Helper\Data', array(), array(), '', false); - $registry = $this->getMock('\Magento\Core\Model\Registry', array(), array(), '', false); - - $renderer = new \Magento\Sales\Block\Adminhtml\Order\View\Items\Renderer\DefaultRenderer( - $product, $coreData, $context, $registry - ); + $helper = new \Magento\TestFramework\Helper\ObjectManager($this); + /** @var \Magento\Sales\Block\Adminhtml\Order\View\Items\Renderer\DefaultRenderer $renderer */ + $renderer = $helper->getObject('Magento\Sales\Block\Adminhtml\Order\View\Items\Renderer\DefaultRenderer'); + $renderer->setLayout($layout); $layout->expects($this->any()) ->method('getBlock') ->with('column_block-name') ->will($this->returnValue($renderer)); - $block = new \Magento\Sales\Block\Adminhtml\Items\AbstractItems($product, $coreData, $context, $registry); + /** @var \Magento\Sales\Block\Adminhtml\Items\AbstractItems $block */ + $block = $helper->getObject('Magento\Sales\Block\Adminhtml\Items\AbstractItems'); + $block->setLayout($layout); $this->assertSame($renderer, $block->getItemRenderer('some-type')); $this->assertSame($renderer, $renderer->getColumnRenderer('block-name')); diff --git a/dev/tests/unit/testsuite/Magento/Sales/Block/Adminhtml/Items/AbstractTest.php b/dev/tests/unit/testsuite/Magento/Sales/Block/Adminhtml/Items/AbstractTest.php index 904541d250ca31442e85721254b2da44e1eb3306..7338fc89d52b14b9581bce74b95d8790215ae6e3 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Block/Adminhtml/Items/AbstractTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Block/Adminhtml/Items/AbstractTest.php @@ -35,7 +35,7 @@ class AbstractTest extends \PHPUnit_Framework_TestCase public function testGetItemRenderer() { - $renderer = $this->getMock('Magento\Core\Block\AbstractBlock', array(), array(), '', false); + $renderer = $this->getMock('Magento\View\Block\AbstractBlock', array(), array(), '', false); $layout = $this->getMock('Magento\Core\Model\Layout', array( 'getChildName', 'getBlock', 'getGroupChildNames' ), array(), '', false); diff --git a/dev/tests/unit/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Items/GridTest.php b/dev/tests/unit/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Items/GridTest.php index e1ac1d24ec12a4fea2e37b1d515411463172678c..8cf7e95d063e3d36c255b35c97781e2ff868fcf3 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Items/GridTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Items/GridTest.php @@ -37,16 +37,6 @@ class GridTest extends \PHPUnit_Framework_TestCase protected function setUp() { $orderCreateMock = $this->getMock('Magento\Sales\Model\AdminOrder\Create', array(), array(), '', false); - $helperFactory = $this->getMockBuilder('Magento\Core\Model\Factory\Helper') - ->disableOriginalConstructor() - ->setMethods(array('get')) - ->getMock(); - - $contextMock = $this->getMockBuilder('Magento\Backend\Block\Template\Context') - ->disableOriginalConstructor() - ->setMethods(array('getHelperFactory')) - ->getMock(); - $contextMock->expects($this->any())->method('getHelperFactory')->will($this->returnValue($helperFactory)); $taxData = $this->getMockBuilder('Magento\Tax\Helper\Data') ->disableOriginalConstructor() @@ -85,17 +75,18 @@ class GridTest extends \PHPUnit_Framework_TestCase $taxConfig = $this->getMockBuilder('Magento\Tax\Model\Config')->disableOriginalConstructor()->getMock(); - $this->_block = $this->getMockBuilder('Magento\Sales\Block\Adminhtml\Order\Create\Items\Grid') - ->setConstructorArgs( - array( - $wishlistFactoryMock, $giftMessageSave, $taxConfig, $taxData, - $sessionMock, $orderCreateMock, $coreData, $contextMock - ) + $helper = new \Magento\TestFramework\Helper\ObjectManager($this); + $this->_block = $helper->getObject('Magento\Sales\Block\Adminhtml\Order\Create\Items\Grid', + array( + 'wishlistFactory' => $wishlistFactoryMock, + 'giftMessageSave' => $giftMessageSave, + 'taxConfig' => $taxConfig, + 'taxData' => $taxData, + 'sessionQuote' => $sessionMock, + 'orderCreate' => $orderCreateMock, + 'coreData' => $coreData ) - ->setMethods(array('_getSession')) - ->getMock(); - - $this->_block->expects($this->any())->method('_getSession')->will($this->returnValue($sessionMock)); + ); } /** @@ -162,10 +153,8 @@ class GridTest extends \PHPUnit_Framework_TestCase $product->expects($this->once()) ->method('getTierPrice') ->will($this->returnValue($tierPrices)); - $item = $this->getMockBuilder('Magento\Sales\Model\Quote\Item') - ->disableOriginalConstructor() - ->setMethods(array('getProduct', 'getProductType')) - ->getMock(); + $item = $this->getMock('Magento\Sales\Model\Quote\Item', + array(), array('getProduct', 'getProductType'), '', false); $item->expects($this->once()) ->method('getProduct') ->will($this->returnValue($product)); diff --git a/dev/tests/unit/testsuite/Magento/Sales/Block/Guest/LinkTest.php b/dev/tests/unit/testsuite/Magento/Sales/Block/Guest/LinkTest.php index 61852763b51eb26c1dbd2fcbac46416c240bbc39..5988517e3a5bc3b5314e5e4d7495341694b4cb6d 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Block/Guest/LinkTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Block/Guest/LinkTest.php @@ -35,7 +35,7 @@ class LinkTest extends \PHPUnit_Framework_TestCase { $objectManagerHelper = new \Magento\TestFramework\Helper\ObjectManager($this); - $context = $objectManagerHelper->getObject('Magento\Core\Block\Template\Context'); + $context = $objectManagerHelper->getObject('Magento\View\Block\Template\Context'); $session = $this->getMockBuilder('Magento\Customer\Model\Session') ->disableOriginalConstructor() ->setMethods(array('isLoggedIn')) diff --git a/dev/tests/unit/testsuite/Magento/Sales/Block/Items/AbstractTest.php b/dev/tests/unit/testsuite/Magento/Sales/Block/Items/AbstractTest.php index 31a64fe72696dca8f614e8da69866fc4b1f3a829..d3b8d4a688501b34b61fe8acfbb3d789e27b07f2 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Block/Items/AbstractTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Block/Items/AbstractTest.php @@ -35,7 +35,7 @@ class AbstractTest extends \PHPUnit_Framework_TestCase public function testGetItemRenderer() { - $renderer = $this->getMock('Magento\Core\Block\AbstractBlock', array('setRenderedBlock'), array(), '', false); + $renderer = $this->getMock('Magento\View\Block\AbstractBlock', array('setRenderedBlock'), array(), '', false); $layout = $this->getMock('Magento\Core\Model\Layout', array( 'getChildName', 'getBlock' ), array(), '', false); diff --git a/dev/tests/unit/testsuite/Magento/Sales/Block/Recurring/Profile/GridTest.php b/dev/tests/unit/testsuite/Magento/Sales/Block/Recurring/Profile/GridTest.php index deee526c326d98d8c8d9bfd44ddee858dea70c70..ba8e503405ff222645b9c4261516b5d183549326 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Block/Recurring/Profile/GridTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Block/Recurring/Profile/GridTest.php @@ -48,7 +48,6 @@ class GridTest extends \PHPUnit_Framework_TestCase ->setMethods(array('getId')) ->getMock(); $customer->expects($this->once())->method('getId')->will($this->returnValue(1)); - $registry = $this->getMockBuilder('Magento\Core\Model\Registry') ->disableOriginalConstructor() ->setMethods(array('registry')) @@ -57,11 +56,9 @@ class GridTest extends \PHPUnit_Framework_TestCase ->method('registry') ->with('current_customer') ->will($this->returnValue($customer)); - $store = $this->getMockBuilder('Magento\Core\Model\Store') ->disableOriginalConstructor() ->getMock(); - $collectionElement = $this->getMockBuilder('Magento\Sales\Model\Recurring\Profile') ->disableOriginalConstructor() ->setMethods(array('setStore', 'setLocale', 'renderData', 'getReferenceId')) @@ -73,7 +70,6 @@ class GridTest extends \PHPUnit_Framework_TestCase ->will($this->returnValue(1)); $collectionElement->expects($this->atLeastOnce())->method('renderData') ->will($this->returnValue(2)); - $collection = $this->getMockBuilder('Magento\Sales\Model\Resource\Recurring\Profile\Collection') ->disableOriginalConstructor() ->setMethods(array('addFieldToFilter', 'addFieldToSelect', 'setOrder')) @@ -100,18 +96,21 @@ class GridTest extends \PHPUnit_Framework_TestCase $storeManager->expects($this->once())->method('getStore') ->will($this->returnValue($store)); - $context = $this->_getContext(); - + $locale = $this->getMockBuilder('\Magento\Core\Model\LocaleInterface') + ->disableOriginalConstructor() + ->setMethods(array('formatDate')) + ->getMockForAbstractClass(); + $locale->expects($this->once())->method('formatDate') + ->will($this->returnValue('11-11-1999')); $block = $this->_objectManagerHelper->getObject( 'Magento\Sales\Block\Recurring\Profile\Grid', array( - 'context' => $context, 'profile' => $profile, 'registry' => $registry, 'storeManager' => $storeManager, + 'locale' => $locale ) ); - $pagerBlock = $this->getMockBuilder('Magento\Page\Block\Html\Pager') ->disableOriginalConstructor() ->setMethods(array('setCollection')) @@ -152,26 +151,4 @@ class GridTest extends \PHPUnit_Framework_TestCase return $layout; } - - /** - * Get context object - * - * @return \Magento\Core\Block\Template\Context - */ - protected function _getContext() - { - $locale = $this->getMockBuilder('\Magento\Core\Model\LocaleInterface') - ->disableOriginalConstructor() - ->setMethods(array('formatDate')) - ->getMockForAbstractClass(); - $locale->expects($this->once())->method('formatDate') - ->will($this->returnValue('11-11-1999')); - - /** @var \Magento\Core\Block\Template\Context $context */ - $context = $this->_objectManagerHelper->getObject( - 'Magento\Core\Block\Template\Context', - array('locale' => $locale) - ); - return $context; - } } diff --git a/dev/tests/unit/testsuite/Magento/Sales/Block/Recurring/Profile/Related/Orders/GridTest.php b/dev/tests/unit/testsuite/Magento/Sales/Block/Recurring/Profile/Related/Orders/GridTest.php index 2a78005ba632164bc62e3a00f398192e176d13c7..cac8ad08258ea1dce265921861af2e461380cb47 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Block/Recurring/Profile/Related/Orders/GridTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Block/Recurring/Profile/Related/Orders/GridTest.php @@ -43,28 +43,16 @@ class GridTest extends \PHPUnit_Framework_TestCase public function testPrepareLayout() { - $customer = $this->getMockBuilder('Magento\Customer\Model\Customer') - ->disableOriginalConstructor() - ->setMethods(array('getId')) - ->getMock(); + $customer = $this->getMock('Magento\Customer\Model\Customer', array(), array(), '', false); $customer->expects($this->once())->method('getId')->will($this->returnValue(1)); - - $store = $this->getMockBuilder('Magento\Core\Model\Store') - ->disableOriginalConstructor() - ->getMock(); - - $collectionElement = $this->getMockBuilder('Magento\Sales\Model\Recurring\Profile') - ->disableOriginalConstructor() - ->setMethods(array('setLocale', 'getIncrementId')) - ->getMock(); + $store = $this->getMock('Magento\Core\Model\Store', array(), array(), '', false); + $args = array( + 'getIncrementId', 'getCreatedAt', 'getCustomerName', 'getBaseGrandTotal', 'getStatusLabel', 'getId' + ); + $collectionElement = $this->getMock('Magento\Sales\Model\Recurring\Profile', $args, array(), '', false); $collectionElement->expects($this->once())->method('getIncrementId') ->will($this->returnValue(1)); - - $collection = $this->getMockBuilder('Magento\Sales\Model\Resource\Order\Collection') - ->disableOriginalConstructor() - ->setMethods(array('addFieldToFilter', 'addFieldToSelect', 'setOrder', 'addRecurringProfilesFilter', - 'getIterator')) - ->getMock(); + $collection = $this->getMock('Magento\Sales\Model\Resource\Order\Collection', array(), array(), '', false); $collection->expects($this->any())->method('addFieldToFilter') ->will($this->returnValue($collection)); $collection->expects($this->once())->method('addFieldToSelect') @@ -75,16 +63,8 @@ class GridTest extends \PHPUnit_Framework_TestCase ->will($this->returnValue($collection)); $collection->expects($this->once())->method('getIterator') ->will($this->returnValue(new \ArrayIterator(array($collectionElement)))); - - $profile = $this->getMockBuilder('Magento\Sales\Model\Recurring\Profile') - ->disableOriginalConstructor() - ->setMethods(array('getFieldLabel')) - ->getMock(); - - $registry = $this->getMockBuilder('Magento\Core\Model\Registry') - ->disableOriginalConstructor() - ->setMethods(array('registry')) - ->getMock(); + $profile = $this->getMock('Magento\Sales\Model\Recurring\Profile', array(), array(), '', false); + $registry = $this->getMock('Magento\Core\Model\Registry', array(), array(), '', false); $registry->expects($this->at(0)) ->method('registry') ->with('current_recurring_profile') @@ -93,27 +73,29 @@ class GridTest extends \PHPUnit_Framework_TestCase ->method('registry') ->with('current_customer') ->will($this->returnValue($customer)); - - $storeManager = $this->getMockBuilder('Magento\Core\Model\StoreManager') - ->disableOriginalConstructor() - ->setMethods(array('getStore')) - ->getMock(); + $profile->expects($this->once())->method('setStore')->with($store)->will($this->returnValue($profile)); + $profile->expects($this->once())->method('setLocale')->will($this->returnValue($profile)); + $storeManager = $this->getMock('Magento\Core\Model\StoreManagerInterface'); $storeManager->expects($this->once())->method('getStore') ->will($this->returnValue($store)); - - $context = $this->_getContext(); - + $locale = $this->getMock('\Magento\Core\Model\LocaleInterface'); + $locale->expects($this->once())->method('formatDate') + ->will($this->returnValue('11-11-1999')); + $helperFactory = $this->getMock('Magento\App\Helper\HelperFactory', array(), array(), '', false); + $helper = $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false); + $helperFactory->expects($this->any())->method('get')->will($this->returnValue($helper)); + $helper->expects($this->once())->method('formatCurrency') + ->will($this->returnValue('10 USD')); $block = $this->_objectManagerHelper->getObject( 'Magento\Sales\Block\Recurring\Profile\Related\Orders\Grid', array( - 'profile' => $profile, 'registry' => $registry, 'storeManager' => $storeManager, 'collection' => $collection, - 'context' => $context + 'locale' => $locale, + 'helperFactory' => $helperFactory ) ); - $pagerBlock = $this->getMockBuilder('Magento\Page\Block\Html\Pager') ->disableOriginalConstructor() ->setMethods(array('setCollection')) @@ -121,12 +103,14 @@ class GridTest extends \PHPUnit_Framework_TestCase $pagerBlock->expects($this->once())->method('setCollection') ->with($collection) ->will($this->returnValue($pagerBlock)); - $layout = $this->_getMockLayout(); + $layout = $this->getMock('Magento\View\LayoutInterface'); $layout->expects($this->once())->method('createBlock') ->will($this->returnValue($pagerBlock)); - $block->setLayout($layout); + /** + * @var \Magento\Sales\Block\Recurring\Profile\Related\Orders\Grid + */ $this->assertNotEmpty($block->getGridColumns()); $expectedResult = array(new \Magento\Object(array( 'increment_id' => 1, @@ -138,56 +122,4 @@ class GridTest extends \PHPUnit_Framework_TestCase ))); $this->assertEquals($expectedResult, $block->getGridElements()); } - - /** - * Get layout mock - * - * @return \Magento\View\LayoutInterface - */ - protected function _getMockLayout() - { - $layout = $this->getMockBuilder('Magento\View\LayoutInterface') - ->disableOriginalConstructor() - ->setMethods(array('createBlock', 'getChildName', 'setChild')) - ->getMockForAbstractClass(); - return $layout; - } - - /** - * Get context object - * - * @return \Magento\Core\Block\Template\Context - */ - protected function _getContext() - { - $locale = $this->getMockBuilder('\Magento\Core\Model\LocaleInterface') - ->disableOriginalConstructor() - ->setMethods(array('formatDate')) - ->getMockForAbstractClass(); - $locale->expects($this->once())->method('formatDate') - ->will($this->returnValue('11-11-1999')); - - $helper = $this->getMockBuilder('Magento\Customer\Helper\Data') - ->disableOriginalConstructor() - ->setMethods(array('formatCurrency')) - ->getMock(); - $helper->expects($this->once())->method('formatCurrency') - ->will($this->returnValue('10 USD')); - - $helperFactory = $this->getMockBuilder('Magento\Core\Model\Factory\Helper') - ->disableOriginalConstructor() - ->setMethods(array('get')) - ->getMock(); - $helperFactory->expects($this->any())->method('get')->will($this->returnValue($helper)); - - /** @var \Magento\Core\Block\Template\Context $context */ - $context = $this->_objectManagerHelper->getObject( - 'Magento\Core\Block\Template\Context', - array( - 'helperFactory' => $helperFactory, - 'locale' => $locale - ) - ); - return $context; - } } diff --git a/dev/tests/unit/testsuite/Magento/Sales/Block/Recurring/Profile/View/AddressTest.php b/dev/tests/unit/testsuite/Magento/Sales/Block/Recurring/Profile/View/AddressTest.php index e05fed63c0d4f1a12d365c7718267dd0b45b5221..03393dc30a823f836317aedd63e6311fd1eeb214 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Block/Recurring/Profile/View/AddressTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Block/Recurring/Profile/View/AddressTest.php @@ -97,7 +97,7 @@ class AddressTest extends \PHPUnit_Framework_TestCase $this->_profile->expects($this->once())->method('getInfoValue')->will($this->returnValue('1')); $this->_block->setAddressType('shipping'); - $parentBlock = $this->getMockBuilder('Magento\Core\Block\Template') + $parentBlock = $this->getMockBuilder('Magento\View\Block\Template') ->disableOriginalConstructor() ->setMethods(array('unsetChild')) ->getMock(); diff --git a/dev/tests/unit/testsuite/Magento/Sales/Controller/Adminhtml/Order/CreditmemoTest.php b/dev/tests/unit/testsuite/Magento/Sales/Controller/Adminhtml/Order/CreditmemoTest.php index 5f184065b13d76f8ff4e1232ef1ba796572decf5..6df67c45521b911a29b9fa630f22f37c267f8d7d 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Controller/Adminhtml/Order/CreditmemoTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Controller/Adminhtml/Order/CreditmemoTest.php @@ -75,7 +75,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase 'objectManager' => $this->_objectManager, ); - $context = $helper->getObject('Magento\Backend\Controller\Context', $arguments); + $context = $helper->getObject('Magento\Backend\App\Action\Context', $arguments); $this->_controller = $helper->getObject('Magento\Sales\Controller\Adminhtml\Order\Creditmemo', array('context' => $context)); diff --git a/dev/tests/unit/testsuite/Magento/Sales/Model/Order/Invoice/Total/ShippingTest.php b/dev/tests/unit/testsuite/Magento/Sales/Model/Order/Invoice/Total/ShippingTest.php index cedb6667f8cfdad8c46e0f12049953d7a03807a8..4362ee2283ea8db484fd7163484ab5708105f781 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Model/Order/Invoice/Total/ShippingTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Model/Order/Invoice/Total/ShippingTest.php @@ -62,10 +62,10 @@ class ShippingTest extends \PHPUnit_Framework_TestCase 'Magento\Sales\Model\Resource\Order\Invoice\Comment\CollectionFactory', array(), array(), '', false ), 'templateMailerFactory' => $this->getMock( - 'Magento\Core\Model\Email\Template\MailerFactory', array(), array(), '', false + 'Magento\Email\Model\Template\MailerFactory', array(), array(), '', false ), 'emailInfoFactory' => $this->getMock( - 'Magento\Core\Model\Email\InfoFactory', array(), array(), '', false + 'Magento\Email\Model\InfoFactory', array(), array(), '', false ), ); foreach ($invoicesData as $oneInvoiceData) { @@ -93,10 +93,10 @@ class ShippingTest extends \PHPUnit_Framework_TestCase 'Magento\Catalog\Model\ProductFactory', array(), array(), '', false ), 'templateMailerFactory' => $this->getMock( - 'Magento\Core\Model\Email\Template\MailerFactory', array(), array(), '', false + 'Magento\Email\Model\Template\MailerFactory', array(), array(), '', false ), 'emailInfoFactory' => $this->getMock( - 'Magento\Core\Model\Email\InfoFactory', array(), array(), '', false + 'Magento\Email\Model\InfoFactory', array(), array(), '', false ), 'orderItemCollFactory' => $this->getMock( 'Magento\Sales\Model\Resource\Order\Item\CollectionFactory', array(), array(), '', false diff --git a/dev/tests/unit/testsuite/Magento/Sales/Model/Order/InvoiceTest.php b/dev/tests/unit/testsuite/Magento/Sales/Model/Order/InvoiceTest.php index 4773f9efc9d129d1cba214cedf3165b06729bab3..9c2fa133eedb2709201ffbe827ddf131bf740f14 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Model/Order/InvoiceTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Model/Order/InvoiceTest.php @@ -76,10 +76,10 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase 'Magento\Sales\Model\Resource\Order\Invoice\Comment\CollectionFactory', array(), array(), '', false ), 'templateMailerFactory' => $this->getMock( - 'Magento\Core\Model\Email\Template\MailerFactory', array(), array(), '', false + 'Magento\Email\Model\Template\MailerFactory', array(), array(), '', false ), 'emailInfoFactory' => $this->getMock( - 'Magento\Core\Model\Email\InfoFactory', array(), array(), '', false + 'Magento\Email\Model\InfoFactory', array(), array(), '', false ), ); $this->_model = $helperManager->getObject('Magento\Sales\Model\Order\Invoice', $arguments); diff --git a/dev/tests/unit/testsuite/Magento/Stdlib/StringTest.php b/dev/tests/unit/testsuite/Magento/Stdlib/StringTest.php index 72ccbd682bb351b0f0db0d4953cb853c6622e697..942e3b3a8d2053dc79ace7a52a746a680f3faf1b 100644 --- a/dev/tests/unit/testsuite/Magento/Stdlib/StringTest.php +++ b/dev/tests/unit/testsuite/Magento/Stdlib/StringTest.php @@ -40,7 +40,6 @@ class StringTest extends \PHPUnit_Framework_TestCase } /** - * @covers \Magento\Stdlib\String::__construct * @covers \Magento\Stdlib\String::split */ public function testStrSplit() @@ -54,7 +53,6 @@ class StringTest extends \PHPUnit_Framework_TestCase } /** - * @covers \Magento\Stdlib\String::__construct * @covers \Magento\Stdlib\String::splitInjection */ public function testSplitInjection() diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/Di/Code/Scanner/XmlInterceptorScannerTest.php b/dev/tests/unit/testsuite/Magento/Test/Tools/Di/Code/Scanner/XmlInterceptorScannerTest.php index 7b08ff4f30252687a37ea6130546f3cdc49cfa0c..b5fd0cecbf6db8f2c7f30292af81d56a739ae794 100644 --- a/dev/tests/unit/testsuite/Magento/Test/Tools/Di/Code/Scanner/XmlInterceptorScannerTest.php +++ b/dev/tests/unit/testsuite/Magento/Test/Tools/Di/Code/Scanner/XmlInterceptorScannerTest.php @@ -56,7 +56,7 @@ class XmlInterceptorScannerTest extends \PHPUnit_Framework_TestCase $actual = $this->_model->collectEntities($this->_testFiles); $expected = array( 'Magento\App\Cache\Interceptor', - 'Magento\Core\Controller\Varien\Action\Context\Interceptor', + 'Magento\App\Action\Context\Interceptor', ); $this->assertEquals($expected, $actual); } diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/Di/_files/app/etc/config.xml b/dev/tests/unit/testsuite/Magento/Test/Tools/Di/_files/app/etc/config.xml index bf3a181b3d51fcc3c0607e281dc9e4d1fea13761..6b6d4712548e8eee9f79bf6f1976b584c44a2a75 100644 --- a/dev/tests/unit/testsuite/Magento/Test/Tools/Di/_files/app/etc/config.xml +++ b/dev/tests/unit/testsuite/Magento/Test/Tools/Di/_files/app/etc/config.xml @@ -33,7 +33,7 @@ </storeManager> </parameters> </Node1> - <Node2 type ="Magento\Core\Controller\Varien\Action\Context"> + <Node2 type ="Magento\App\Action\Context"> <plugins> <first><instance>Magento\Core\Model\Action\Plugin</instance></first> <second><instance>Custom_PageCache_Model_Action_Plugin</instance></second> diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/Di/_files/app/etc/di/config.xml b/dev/tests/unit/testsuite/Magento/Test/Tools/Di/_files/app/etc/di/config.xml index 5f5c0af9d11844b99b01def1c98af3bf2f47c21b..d843411d66b5042b60cbdc84ccdf2ec83ea9f7c4 100644 --- a/dev/tests/unit/testsuite/Magento/Test/Tools/Di/_files/app/etc/di/config.xml +++ b/dev/tests/unit/testsuite/Magento/Test/Tools/Di/_files/app/etc/di/config.xml @@ -27,7 +27,7 @@ <type name="Magento\App\Cache"> <param name="storeManager"><instance type="customStoreManagerProxy" /></param> </type> - <type name="Magento\Core\Controller\Varien\Action\Context"> + <type name="Magento\App\Action\Context"> <param name="layoutFactory"><instance type="customLayoutFactory" /></param> <plugin name="first" type="Magento\Core\Model\Action\Plugin" /> <plugin name="second" type="Custom_PageCache_Model_Action_Plugin" /> diff --git a/dev/tests/unit/testsuite/Magento/Theme/Block/Adminhtml/System/Design/Theme/TabAbstractTest.php b/dev/tests/unit/testsuite/Magento/Theme/Block/Adminhtml/System/Design/Theme/TabAbstractTest.php index 26bd23fb78c567f2fe225dce4c212174dbf7b4ab..16776965251a4e296211a6e5859a6a0ba7217461 100644 --- a/dev/tests/unit/testsuite/Magento/Theme/Block/Adminhtml/System/Design/Theme/TabAbstractTest.php +++ b/dev/tests/unit/testsuite/Magento/Theme/Block/Adminhtml/System/Design/Theme/TabAbstractTest.php @@ -39,10 +39,10 @@ class TabAbstractTest extends \PHPUnit_Framework_TestCase $this->_model = $this->getMockForAbstractClass( 'Magento\Theme\Block\Adminhtml\System\Design\Theme\Edit\AbstractTab', array( - $this->getMock('Magento\Data\FormFactory', array(), array(), '', false), - $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false), $this->getMock('Magento\Backend\Block\Template\Context', array(), array(), '', false), + $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false), $this->getMock('Magento\Core\Model\Registry', array(), array(), '', false), + $this->getMock('Magento\Data\FormFactory', array(), array(), '', false), $this->getMock('Magento\ObjectManager', array(), array(), '', false) ), '', diff --git a/dev/tests/unit/testsuite/Magento/Theme/Controller/Adminhtml/System/Design/ThemeTest.php b/dev/tests/unit/testsuite/Magento/Theme/Controller/Adminhtml/System/Design/ThemeTest.php index b25c05790e7bde63b98b2a0f2411c833c299aeb6..ff39622f61f66b5f0b09eeab54c6b820c4330beb 100644 --- a/dev/tests/unit/testsuite/Magento/Theme/Controller/Adminhtml/System/Design/ThemeTest.php +++ b/dev/tests/unit/testsuite/Magento/Theme/Controller/Adminhtml/System/Design/ThemeTest.php @@ -54,21 +54,13 @@ class ThemeTest extends \PHPUnit_Framework_TestCase $this->_request = $this->getMock('Magento\App\Request\Http', array(), array(), '', false); $helper = new \Magento\TestFramework\Helper\ObjectManager($this); - $arguments = array( - 'request' => $this->_request, - 'objectManager' => $this->_objectManagerMock, - - ); - $context = $helper->getObject('Magento\Backend\Controller\Context', $arguments); - $coreRegistry = $this->getMock('Magento\Core\Model\Registry', array(), array(), '', false); - - $this->_model = $this->getMock('Magento\Theme\Controller\Adminhtml\System\Design\Theme', - array('_forward', '_title', 'loadLayout', 'renderLayout', '_redirect'), - array($context, $coreRegistry, null) + $this->_model = $helper->getObject('Magento\Theme\Controller\Adminhtml\System\Design\Theme', + array( + 'request' => $this->_request, + 'objectManager' => $this->_objectManagerMock, + 'response' => $this->getMock('Magento\App\Response\Http', array(), array(), '', false) + ) ); - $this->_model->expects($this->any())->method('_title')->will($this->returnValue($this->_model)); - $this->_model->expects($this->any())->method('loadLayout'); - $this->_model->expects($this->any())->method('renderLayout'); } /** diff --git a/dev/tests/unit/testsuite/Magento/User/Model/UserTest.php b/dev/tests/unit/testsuite/Magento/User/Model/UserTest.php index 970a78b920624de4e458c909be019d99ca0c7d62..da659159619a01adec521e23cb42a2a78c5058dd 100644 --- a/dev/tests/unit/testsuite/Magento/User/Model/UserTest.php +++ b/dev/tests/unit/testsuite/Magento/User/Model/UserTest.php @@ -40,7 +40,7 @@ class UserTest extends \PHPUnit_Framework_TestCase /** @var \Magento\Core\Helper\Data */ protected $_coreData; - /** @var \Magento\Core\Model\Sender|PHPUnit_Framework_MockObject_MockObject */ + /** @var \Magento\Email\Model\Sender|PHPUnit_Framework_MockObject_MockObject */ protected $_senderMock; /** @var \Magento\Core\Model\Context|PHPUnit_Framework_MockObject_MockObject */ @@ -65,7 +65,7 @@ class UserTest extends \PHPUnit_Framework_TestCase ->disableOriginalConstructor() ->setMethods(array()) ->getMock(); - $this->_senderMock = $this->getMockBuilder('Magento\Core\Model\Sender') + $this->_senderMock = $this->getMockBuilder('Magento\Email\Model\Sender') ->disableOriginalConstructor() ->setMethods(array('send')) ->getMock(); @@ -88,9 +88,9 @@ class UserTest extends \PHPUnit_Framework_TestCase array(), '', false); $roleFactoryMock = $this->getMock('Magento\User\Model\RoleFactory', array('create'), array(), '', false); - $emailFactoryMock = $this->getMock('Magento\Core\Model\Email\InfoFactory', array('create'), + $emailFactoryMock = $this->getMock('Magento\Email\Model\InfoFactory', array('create'), array(), '', false); - $mailerFactoryMock = $this->getMock('Magento\Core\Model\Email\Template\MailerFactory', array('create'), + $mailerFactoryMock = $this->getMock('Magento\Email\Model\Template\MailerFactory', array('create'), array(), '', false); $helper = new \Magento\TestFramework\Helper\ObjectManager($this); diff --git a/dev/tests/unit/testsuite/Magento/Validator/Composite/VarienObjectTest.php b/dev/tests/unit/testsuite/Magento/Validator/Composite/VarienObjectTest.php index bff69d06db1c850a8bcd55d3171e01ac9f1f8208..50514941d84b36aca9cb946891df28f206d6c8a0 100644 --- a/dev/tests/unit/testsuite/Magento/Validator/Composite/VarienObjectTest.php +++ b/dev/tests/unit/testsuite/Magento/Validator/Composite/VarienObjectTest.php @@ -99,7 +99,7 @@ class VarienObjectTest extends \PHPUnit_Framework_TestCase count($expectedErrors), $actualMessages, 'Number of messages does not meet expectations.' ); foreach ($expectedErrors as $errorIndex => $expectedErrorMessage) { - /** @var $actualMessage \Magento\Core\Model\Message\AbstractMessage */ + /** @var $actualMessage \Magento\Message\AbstractMessage */ $actualMessage = $actualMessages[$errorIndex]; $this->assertEquals($expectedErrorMessage, $actualMessage); } diff --git a/dev/tests/unit/testsuite/Magento/Core/Block/AbstractBlockTest.php b/dev/tests/unit/testsuite/Magento/View/Block/AbstractBlockTest.php similarity index 91% rename from dev/tests/unit/testsuite/Magento/Core/Block/AbstractBlockTest.php rename to dev/tests/unit/testsuite/Magento/View/Block/AbstractBlockTest.php index 88c043bec558d57dafb20a3fbf7740bc24c39621..91bf9816c488310df32de9233489de6bfd27d290 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Block/AbstractBlockTest.php +++ b/dev/tests/unit/testsuite/Magento/View/Block/AbstractBlockTest.php @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Core\Block; +namespace Magento\View\Block; class AbstractBlockTest extends \PHPUnit_Framework_TestCase { @@ -37,8 +37,8 @@ class AbstractBlockTest extends \PHPUnit_Framework_TestCase */ public function testGetUiId($expectedResult, $nameInLayout, $methodArguments) { - /** @var $block \Magento\Core\Block\AbstractBlock|PHPUnit_Framework_MockObject_MockObject */ - $block = $this->getMockForAbstractClass('Magento\Core\Block\AbstractBlock', array(), '', false); + /** @var $block \Magento\View\Block\AbstractBlock|PHPUnit_Framework_MockObject_MockObject */ + $block = $this->getMockForAbstractClass('Magento\View\Block\AbstractBlock', array(), '', false); $block->setNameInLayout($nameInLayout); $this->assertEquals( @@ -86,13 +86,13 @@ class AbstractBlockTest extends \PHPUnit_Framework_TestCase $configManager = $this->getMock('Magento\View\ConfigInterface', array(), array(), '', false); $configManager->expects($this->exactly(2))->method('getViewConfig')->will($this->returnValue($config)); - /** @var $block \Magento\Core\Block\AbstractBlock|PHPUnit_Framework_MockObject_MockObject */ + /** @var $block \Magento\View\Block\AbstractBlock|PHPUnit_Framework_MockObject_MockObject */ $params = array( 'viewConfig' => $configManager, ); $helper = new \Magento\TestFramework\Helper\ObjectManager($this); - $block = $this->getMockForAbstractClass('Magento\Core\Block\AbstractBlock', - $helper->getConstructArguments('Magento\Core\Block\AbstractBlock', $params), + $block = $this->getMockForAbstractClass('Magento\View\Block\AbstractBlock', + $helper->getConstructArguments('Magento\View\Block\AbstractBlock', $params), uniqid('Magento\\Core\\Block\\AbstractBlock\\') ); diff --git a/dev/tests/unit/testsuite/Magento/Core/Block/TemplateTest.php b/dev/tests/unit/testsuite/Magento/View/Block/TemplateTest.php similarity index 74% rename from dev/tests/unit/testsuite/Magento/Core/Block/TemplateTest.php rename to dev/tests/unit/testsuite/Magento/View/Block/TemplateTest.php index 9fb63811033e0a763cd0aa2f518f4f630bd056c4..3c7f25bdf37182b1ccd10abbf9b4558550b4fde4 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Block/TemplateTest.php +++ b/dev/tests/unit/testsuite/Magento/View/Block/TemplateTest.php @@ -25,12 +25,12 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Core\Block; +namespace Magento\View\Block; class TemplateTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Core\Block\Template + * @var \Magento\View\Block\Template */ protected $_block; @@ -62,28 +62,24 @@ class TemplateTest extends \PHPUnit_Framework_TestCase $this->_filesystem = $this->getMock('\Magento\Filesystem', array(), array(), '', false); - $this->_templateEngine = $this->getMock('\Magento\View\TemplateEngineInterface'); + $this->_templateEngine = + $this->getMock('Magento\View\TemplateEnginePool', array('render', 'get'), array(), '', false); - $enginePool = $this->getMock('Magento\View\TemplateEngineFactory', array(), array(), '', false); - $enginePool->expects($this->any()) + $this->_templateEngine->expects($this->any()) ->method('get') - ->with('phtml') ->will($this->returnValue($this->_templateEngine)); $appState = $this->getMock('Magento\App\State', array('getAreaCode'), array(), '', false); $appState->expects($this->any())->method('getAreaCode')->will($this->returnValue('frontend')); - - $context = $this->getMock('Magento\Core\Block\Template\Context', array(), array(), '', false); - $context->expects($this->any())->method('getEngineFactory')->will($this->returnValue($enginePool)); - $context->expects($this->any())->method('getDirs')->will($this->returnValue($dirs)); - $context->expects($this->any())->method('getFilesystem')->will($this->returnValue($this->_filesystem)); - $context->expects($this->any())->method('getViewFileSystem')->will($this->returnValue($this->_viewFileSystem)); - $context->expects($this->any())->method('getAppState')->will($this->returnValue($appState)); - - $this->_block = new \Magento\Core\Block\Template( - $this->getMock('\Magento\Core\Helper\Data', array(), array(), '', false), - $context, - array('template' => 'template.phtml', 'module_name' => 'Fixture_Module') + $helper = new \Magento\TestFramework\Helper\ObjectManager($this); + $this->_block = $helper->getObject('Magento\View\Block\Template', array( + 'filesystem' => $this->_filesystem, + 'enginePool' => $this->_templateEngine, + 'viewFileSystem' => $this->_viewFileSystem, + 'appState' => $appState, + 'dirs' => $dirs, + 'data' => array('template' => 'template.phtml', 'module_name' => 'Fixture_Module') + ) ); } diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Theme/Domain/FactoryTest.php b/dev/tests/unit/testsuite/Magento/View/Design/Theme/Domain/FactoryTest.php similarity index 90% rename from dev/tests/unit/testsuite/Magento/Core/Model/Theme/Domain/FactoryTest.php rename to dev/tests/unit/testsuite/Magento/View/Design/Theme/Domain/FactoryTest.php index b457e3307b731300fc3bf685d300d3fa92100d42..aa728ddbe8542f2edb4fab6c76723de3d9b969bf 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/Theme/Domain/FactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/View/Design/Theme/Domain/FactoryTest.php @@ -28,12 +28,12 @@ /** * Test theme domain model */ -namespace Magento\Core\Model\Theme\Domain; +namespace Magento\View\Design\Theme\Domain; class FactoryTest extends \PHPUnit_Framework_TestCase { /** - * @covers \Magento\Core\Model\Theme\Domain\Factory::create + * @covers \Magento\View\Design\Theme\Domain\Factory::create */ public function testCreate() { @@ -47,7 +47,7 @@ class FactoryTest extends \PHPUnit_Framework_TestCase $objectManager = $this->getMock('Magento\ObjectManager', array(), array('create'), '', false); $objectManager->expects($this->once()) ->method('create') - ->with('Magento\Core\Model\Theme\Domain\Virtual', array('theme' => $themeMock)) + ->with('Magento\View\Design\Theme\Domain\VirtualInterface', array('theme' => $themeMock)) ->will($this->returnValue($newThemeMock)); $themeDomainFactory = new \Magento\View\Design\Theme\Domain\Factory($objectManager); @@ -55,7 +55,7 @@ class FactoryTest extends \PHPUnit_Framework_TestCase } /** - * @covers \Magento\Core\Model\Theme\Domain\Factory::create + * @covers \Magento\View\Design\Theme\Domain\Factory::create */ public function testCreateWithWrongThemeType() { diff --git a/dev/tests/unit/testsuite/Magento/View/Design/Theme/FlyweightFactoryTest.php b/dev/tests/unit/testsuite/Magento/View/Design/Theme/FlyweightFactoryTest.php index b1af1fc37f42d9bab0218cdf36e073ebaa48d4d0..71f70fa788ab51136c1f7680111a348e64cc87b9 100644 --- a/dev/tests/unit/testsuite/Magento/View/Design/Theme/FlyweightFactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/View/Design/Theme/FlyweightFactoryTest.php @@ -42,7 +42,7 @@ class FlyweightFactoryTest extends \PHPUnit_Framework_TestCase } /** - * @covers \Magento\View\Design\Theme\FlyweightFactory::createById + * @covers \Magento\View\Design\Theme\FlyweightFactory::create */ public function testCreateById() { @@ -65,7 +65,7 @@ class FlyweightFactoryTest extends \PHPUnit_Framework_TestCase } /** - * @covers \Magento\View\Design\Theme\FlyweightFactory::createByPath + * @covers \Magento\View\Design\Theme\FlyweightFactory::create */ public function testCreateByPath() { diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Theme/Image/UploaderTest.php b/dev/tests/unit/testsuite/Magento/View/Design/Theme/Image/UploaderTest.php similarity index 97% rename from dev/tests/unit/testsuite/Magento/Core/Model/Theme/Image/UploaderTest.php rename to dev/tests/unit/testsuite/Magento/View/Design/Theme/Image/UploaderTest.php index 79b6bf623fc81dd20a67864a6b38caf8b5c1dba7..9c44f5764604f0a437f7e87c1fe8d6990d9c941a 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/Theme/Image/UploaderTest.php +++ b/dev/tests/unit/testsuite/Magento/View/Design/Theme/Image/UploaderTest.php @@ -28,7 +28,7 @@ /** * Test for theme image uploader */ -namespace Magento\Core\Model\Theme\Image; +namespace Magento\View\Design\Theme\Image; class UploaderTest extends \PHPUnit_Framework_TestCase { @@ -136,7 +136,7 @@ class UploaderTest extends \PHPUnit_Framework_TestCase /** * @dataProvider uploadDataProvider - * @covers \Magento\Core\Model\Theme\Image\Uploader::uploadPreviewImage + * @covers \Magento\View\Design\Theme\Image\Uploader::uploadPreviewImage */ public function testUploadPreviewImage($isUploaded, $isValid, $checkExtension, $save, $result, $exception) { diff --git a/dev/tests/unit/testsuite/Magento/View/TemplateEngine/PhpTest.php b/dev/tests/unit/testsuite/Magento/View/TemplateEngine/PhpTest.php index bccaf460e36cb2dbd1fcb3c31bb5851bdea8f6ba..6a2811489f8c15d53cfa8b33ab2d75afdec560eb 100644 --- a/dev/tests/unit/testsuite/Magento/View/TemplateEngine/PhpTest.php +++ b/dev/tests/unit/testsuite/Magento/View/TemplateEngine/PhpTest.php @@ -46,7 +46,7 @@ class PhpTest extends \PHPUnit_Framework_TestCase */ public function testRender() { - $blockMock = $this->getMockBuilder('Magento\Core\Block\Template') + $blockMock = $this->getMockBuilder('Magento\View\Block\Template') ->setMethods(array('testMethod')) ->disableOriginalConstructor()->getMock(); @@ -75,7 +75,7 @@ class PhpTest extends \PHPUnit_Framework_TestCase */ public function testRenderException() { - $blockMock = $this->getMockBuilder('Magento\Core\Block\Template') + $blockMock = $this->getMockBuilder('Magento\View\Block\Template') ->setMethods(array('testMethod')) ->disableOriginalConstructor()->getMock(); diff --git a/dev/tests/unit/testsuite/Magento/View/TemplateEngineFactoryTest.php b/dev/tests/unit/testsuite/Magento/View/TemplateEngineFactoryTest.php index 089bc4eb9eeda0c3c3d9c7006da219f04530801e..635c14539bde69df29144294992e82dbb0762814 100644 --- a/dev/tests/unit/testsuite/Magento/View/TemplateEngineFactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/View/TemplateEngineFactoryTest.php @@ -38,7 +38,9 @@ class TemplateEngineFactoryTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->_objectManagerMock = $this->getMock('Magento\ObjectManager'); - $this->_factory = new TemplateEngineFactory($this->_objectManagerMock); + $this->_factory = new TemplateEngineFactory($this->_objectManagerMock, array( + 'test' => 'Fixture\Module\Model\TemplateEngine', + )); } public function testCreateKnownEngine() @@ -46,20 +48,35 @@ class TemplateEngineFactoryTest extends \PHPUnit_Framework_TestCase $engine = $this->getMock('Magento\View\TemplateEngineInterface'); $this->_objectManagerMock ->expects($this->once()) - ->method('get') - ->with('Magento\View\TemplateEngine\Php') + ->method('create') + ->with('Fixture\Module\Model\TemplateEngine') ->will($this->returnValue($engine)) ; - $this->assertSame($engine, $this->_factory->get('phtml')); + $this->assertSame($engine, $this->_factory->create('test')); } /** * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Unknown template engine type: non_existing + * @expectedExceptionMessage Unknown template engine type: 'non_existing' */ public function testCreateUnknownEngine() { - $this->_objectManagerMock->expects($this->never())->method('get'); - $this->_factory->get('non_existing'); + $this->_objectManagerMock->expects($this->never())->method('create'); + $this->_factory->create('non_existing'); + } + + /** + * @expectedException \UnexpectedValueException + * @expectedExceptionMessage Fixture\Module\Model\TemplateEngine has to implement the template engine interface + */ + public function testCreateInvalidEngine() + { + $this->_objectManagerMock + ->expects($this->once()) + ->method('create') + ->with('Fixture\Module\Model\TemplateEngine') + ->will($this->returnValue(new \stdClass())) + ; + $this->_factory->create('test'); } } diff --git a/dev/tests/unit/testsuite/Magento/View/TemplateEnginePoolTest.php b/dev/tests/unit/testsuite/Magento/View/TemplateEnginePoolTest.php new file mode 100644 index 0000000000000000000000000000000000000000..135052248c77845d1a9c5989b7c1a4c7da620ad8 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/View/TemplateEnginePoolTest.php @@ -0,0 +1,58 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\View; + +class TemplateEnginePoolTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var TemplateEnginePool + */ + protected $_model; + + /** + * @var\PHPUnit_Framework_MockObject_MockObject + */ + protected $_factory; + + protected function setUp() + { + $this->_factory = $this->getMock('Magento\View\TemplateEngineFactory', array(), array(), '', false); + $this->_model = new TemplateEnginePool($this->_factory); + } + + public function testGet() + { + $engine = $this->getMock('Magento\View\TemplateEngineInterface'); + $this->_factory + ->expects($this->once()) + ->method('create') + ->with('test') + ->will($this->returnValue($engine)) + ; + $this->assertSame($engine, $this->_model->get('test')); + // Make sure factory is invoked only once and the same instance is returned afterwards + $this->assertSame($engine, $this->_model->get('test')); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Block/Adminhtml/Role/Edit/TabsTest.php b/dev/tests/unit/testsuite/Magento/Webapi/Block/Adminhtml/Role/Edit/TabsTest.php index 456b1dfc7551741005c60d6861e21e42e4faf8f8..b033f1f1057ad0bda81fe3333c40ee217f6d211f 100644 --- a/dev/tests/unit/testsuite/Magento/Webapi/Block/Adminhtml/Role/Edit/TabsTest.php +++ b/dev/tests/unit/testsuite/Magento/Webapi/Block/Adminhtml/Role/Edit/TabsTest.php @@ -92,9 +92,9 @@ class TabsTest extends \PHPUnit_Framework_TestCase { $this->_block->setApiRole($apiRole); - $mainBlock = $this->_helper->getObject('Magento\Core\Block\Text'); - $resourceBlock = $this->_helper->getObject('Magento\Core\Block\Text'); - $userBlock = $this->_helper->getObject('Magento\Core\Block\Text'); + $mainBlock = $this->_helper->getObject('Magento\View\Block\Text'); + $resourceBlock = $this->_helper->getObject('Magento\View\Block\Text'); + $userBlock = $this->_helper->getObject('Magento\View\Block\Text'); $this->_layout->expects($this->any()) ->method('getBlock') diff --git a/dev/tests/unit/testsuite/Magento/Webhook/Block/Adminhtml/Registration/ActivateTest.php b/dev/tests/unit/testsuite/Magento/Webhook/Block/Adminhtml/Registration/ActivateTest.php index bb1c636824df9782a96f8ca43f5ce0708d3a6e92..039b7243163de3fc05b9c52d498f080feedcacdc 100644 --- a/dev/tests/unit/testsuite/Magento/Webhook/Block/Adminhtml/Registration/ActivateTest.php +++ b/dev/tests/unit/testsuite/Magento/Webhook/Block/Adminhtml/Registration/ActivateTest.php @@ -44,23 +44,25 @@ class ActivateTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_urlBuilder = $this->getMock('Magento\Core\Model\Url', array('getUrl'), array(), '', false); + $this->_urlBuilder = $this->getMock('Magento\UrlInterface'); /** @var $coreData \Magento\Core\Helper\Data */ $coreData = $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false); - /** @var \Magento\Core\Block\Template\Context $context */ - $context = $this->getMock('Magento\Backend\Block\Template\Context', array('getUrlBuilder'), array(), '', false); - $context->expects($this->once()) - ->method('getUrlBuilder') - ->will($this->returnValue($this->_urlBuilder)); - $registry = $this->getMock('Magento\Core\Model\Registry', array('registry'), array(), '', false); $registry->expects($this->once()) ->method('registry') ->with('current_subscription') ->will($this->returnValue($this->_subscription)); - $this->_block = new \Magento\Webhook\Block\Adminhtml\Registration\Activate($coreData, $context, $registry); + + $helper = new \Magento\TestFramework\Helper\ObjectManager($this); + $this->_block = $helper->getObject('\Magento\Webhook\Block\Adminhtml\Registration\Activate', + array( + 'coreData' => $coreData, + 'registry' => $registry, + 'urlBuilder' => $this->_urlBuilder + ) + ); } public function testGetAcceptUrl() diff --git a/dev/tests/unit/testsuite/Magento/Webhook/Block/Adminhtml/Registration/Create/Form/ContainerTest.php b/dev/tests/unit/testsuite/Magento/Webhook/Block/Adminhtml/Registration/Create/Form/ContainerTest.php index a1cfc0db90bea4e2894e86e3458bd73f64da2947..43ef524f09a7eb15c958d94567c40e645d952b04 100644 --- a/dev/tests/unit/testsuite/Magento/Webhook/Block/Adminhtml/Registration/Create/Form/ContainerTest.php +++ b/dev/tests/unit/testsuite/Magento/Webhook/Block/Adminhtml/Registration/Create/Form/ContainerTest.php @@ -44,24 +44,25 @@ class ContainerTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_urlBuilder = $this->getMock('Magento\Core\Model\Url', array('getUrl'), array(), '', false); + $this->_urlBuilder = $this->getMock('Magento\UrlInterface'); /** @var $coreData \Magento\Core\Helper\Data */ $coreData = $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false); - /** @var \Magento\Core\Block\Template\Context $context */ - $context = $this->getMock('Magento\Backend\Block\Template\Context', array('getUrlBuilder'), array(), '', false); - $context->expects($this->once()) - ->method('getUrlBuilder') - ->will($this->returnValue($this->_urlBuilder)); - $registry = $this->getMock('Magento\Core\Model\Registry', array('registry'), array(), '', false); $registry->expects($this->once()) ->method('registry') ->with('current_subscription') ->will($this->returnValue($this->_subscription)); - $this->_block = new \Magento\Webhook\Block\Adminhtml\Registration\Create\Form\Container( - $coreData, $context, $registry); + + $helper = new \Magento\TestFramework\Helper\ObjectManager($this); + $this->_block = $helper->getObject('\Magento\Webhook\Block\Adminhtml\Registration\Create\Form\Container', + array( + 'coreData' => $coreData, + 'registry' => $registry, + 'urlBuilder' => $this->_urlBuilder + ) + ); } public function testGetAcceptUrl() diff --git a/dev/tests/unit/testsuite/Magento/Webhook/Block/Adminhtml/Registration/Create/FormTest.php b/dev/tests/unit/testsuite/Magento/Webhook/Block/Adminhtml/Registration/Create/FormTest.php index 58835ea62e9a47b675372ba4b5e536f16c42770c..43e6f92d7e8ed3cf4464611a71fc93f7822efca7 100644 --- a/dev/tests/unit/testsuite/Magento/Webhook/Block/Adminhtml/Registration/Create/FormTest.php +++ b/dev/tests/unit/testsuite/Magento/Webhook/Block/Adminhtml/Registration/Create/FormTest.php @@ -63,10 +63,10 @@ class FormTest extends \Magento\Test\Block\Adminhtml $this->_setStub($collectionMock, 'getSelect', $selectMock); $arguments = array( + $this->_context, + $this->_coreData, $this->_registry, $this->_formFactoryMock, - $this->_coreData, - $this->_context, ); $methods = array( diff --git a/dev/tests/unit/testsuite/Magento/Webhook/Block/Adminhtml/Registration/FailedTest.php b/dev/tests/unit/testsuite/Magento/Webhook/Block/Adminhtml/Registration/FailedTest.php index 9bb3522f6a481e8fa991397cbee1093be0e6f36c..e5c0a7471121c053fd3760a04becbb9ad47b9c92 100644 --- a/dev/tests/unit/testsuite/Magento/Webhook/Block/Adminhtml/Registration/FailedTest.php +++ b/dev/tests/unit/testsuite/Magento/Webhook/Block/Adminhtml/Registration/FailedTest.php @@ -37,22 +37,14 @@ class FailedTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $urlBuilder = $this->getMock('Magento\Core\Model\Url', array('getUrl'), array(), '', false); /** @var $coreData \Magento\Core\Helper\Data */ $coreData = $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false); - $context = $this->getMockBuilder('Magento\Backend\Block\Template\Context') + $this->_lastMessage = $this->getMockBuilder('Magento\Message\AbstractMessage') ->disableOriginalConstructor() ->getMock(); - $context->expects($this->once()) - ->method('getUrlBuilder') - ->will($this->returnValue($urlBuilder)); - - $this->_lastMessage = $this->getMockBuilder('Magento\Core\Model\Message\AbstractMessage') - ->disableOriginalConstructor() - ->getMock(); - $messages = $this->getMockBuilder('Magento\Core\Model\Message\Collection') + $messages = $this->getMockBuilder('Magento\Message\Collection') ->disableOriginalConstructor() ->getMock(); $messages->expects($this->any()) @@ -64,7 +56,13 @@ class FailedTest extends \PHPUnit_Framework_TestCase $session->expects($this->once()) ->method('getMessages') ->will($this->returnValue($messages)); - $this->_block = new \Magento\Webhook\Block\Adminhtml\Registration\Failed($coreData, $session, $context); + $helper = new \Magento\TestFramework\Helper\ObjectManager($this); + $this->_block = $helper->getObject('\Magento\Webhook\Block\Adminhtml\Registration\Failed', + array( + 'coreData' => $coreData, + 'backendSession' => $session + ) + ); } public function testGetSessionError() @@ -76,5 +74,4 @@ class FailedTest extends \PHPUnit_Framework_TestCase $this->assertEquals($errorMessage, $this->_block->getSessionError()); } - } diff --git a/dev/tests/unit/testsuite/Magento/Webhook/Block/Adminhtml/Subscription/Edit/FormTest.php b/dev/tests/unit/testsuite/Magento/Webhook/Block/Adminhtml/Subscription/Edit/FormTest.php index 31b3dea7b7b14087a85076456a490f1cf0cac8d6..e6215d2369a9f30143029677e4a569b66505d133 100644 --- a/dev/tests/unit/testsuite/Magento/Webhook/Block/Adminhtml/Subscription/Edit/FormTest.php +++ b/dev/tests/unit/testsuite/Magento/Webhook/Block/Adminhtml/Subscription/Edit/FormTest.php @@ -84,13 +84,13 @@ class FormTest extends \Magento\Test\Block\Adminhtml // Arguments passed to UUT's constructor $arguments = array( + $this->_context, + $this->_coreData, + $this->_registry, + $this->_formFactoryMock, $this->_formatMock, $this->_authenticationMock, $this->_hookMock, - $this->_registry, - $this->_formFactoryMock, - $this->_coreData, - $this->_context, array($collectionMock) ); diff --git a/dev/tests/unit/testsuite/Magento/Webhook/Block/Adminhtml/Subscription/EditTest.php b/dev/tests/unit/testsuite/Magento/Webhook/Block/Adminhtml/Subscription/EditTest.php index dc446e866b39f94eee00b2d182452c426288060a..7e464d6bcda539bc41cf05cd5c8dab93521dd91b 100644 --- a/dev/tests/unit/testsuite/Magento/Webhook/Block/Adminhtml/Subscription/EditTest.php +++ b/dev/tests/unit/testsuite/Magento/Webhook/Block/Adminhtml/Subscription/EditTest.php @@ -55,8 +55,8 @@ class EditTest extends \Magento\Test\Block\Adminhtml \Magento\Webhook\Block\Adminhtml\Subscription\Edit::REGISTRY_KEY_CURRENT_SUBSCRIPTION, $subscriptionData); $this->_block = new \Magento\Webhook\Block\Adminhtml\Subscription\Edit( - $this->_coreData, $this->_context, + $this->_coreData, $this->_registry ); $this->assertEquals('Edit Subscription', $this->_block->getHeaderText()); @@ -70,8 +70,8 @@ class EditTest extends \Magento\Test\Block\Adminhtml { $this->_registry = new \Magento\Core\Model\Registry(); $this->_block = new \Magento\Webhook\Block\Adminhtml\Subscription\Edit( - $this->_coreData, $this->_context, + $this->_coreData, $this->_registry ); diff --git a/dev/tests/unit/testsuite/Magento/Webhook/Block/Adminhtml/SubscriptionTest.php b/dev/tests/unit/testsuite/Magento/Webhook/Block/Adminhtml/SubscriptionTest.php index a7d0d86d0871f5dc7b4ceaa310679371c60e6be5..d6c5cb6b813a58a84f4ef4aa9f6164aa0890cf1b 100644 --- a/dev/tests/unit/testsuite/Magento/Webhook/Block/Adminhtml/SubscriptionTest.php +++ b/dev/tests/unit/testsuite/Magento/Webhook/Block/Adminhtml/SubscriptionTest.php @@ -29,12 +29,18 @@ namespace Magento\Webhook\Block\Adminhtml; class SubscriptionTest extends \Magento\Test\Block\Adminhtml { + /** + * @var \Magento\TestFramework\Helper\ObjectManager + */ + protected $_objectManagerHelper; + public function testConstruct() { - $block = new \Magento\Webhook\Block\Adminhtml\Subscription( - $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false), - $this->_context - ); + $this->_objectManagerHelper = new \Magento\TestFramework\Helper\ObjectManager($this); + $block = $this->_objectManagerHelper->getObject( + '\Magento\Webhook\Block\Adminhtml\Subscription', array()); + + $this->assertEquals('Subscriptions', $block->getHeaderText()); $this->assertEquals('Add Subscription', $block->getAddButtonLabel()); } diff --git a/dev/tests/unit/testsuite/Magento/Webhook/Controller/Adminhtml/Webhook/RegistrationTest.php b/dev/tests/unit/testsuite/Magento/Webhook/Controller/Adminhtml/Webhook/RegistrationTest.php index dfc83f0f4771f17a999fe38c7c08fc7241a0537d..b776a6536f74da7484048f5edd76c918e2e79d27 100644 --- a/dev/tests/unit/testsuite/Magento/Webhook/Controller/Adminhtml/Webhook/RegistrationTest.php +++ b/dev/tests/unit/testsuite/Magento/Webhook/Controller/Adminhtml/Webhook/RegistrationTest.php @@ -271,9 +271,6 @@ class RegistrationTest extends \PHPUnit_Framework_TestCase array( 'name' => 'nameTest' ) )); - // Use real translate model - $this->_mockTranslateModel = null; - // verify success message $this->_mockBackendModSess->expects($this->once())->method('addSuccess') ->with($this->equalTo('The subscription \'nameTest\' has been activated.')); @@ -326,8 +323,8 @@ class RegistrationTest extends \PHPUnit_Framework_TestCase ->getMock(); $layoutMock->expects($this->any())->method('getUpdate')->will($this->returnValue($layoutMergeMock)); $testElement = new \Magento\Simplexml\Element('<test>test</test>'); - $layoutMock->expects($this->any())->method('getNode')->will($this->returnValue($testElement)); - $blockMock = $this->getMockBuilder('Magento\Core\Block\AbstractBlock') + $layoutMock->expects($this->never())->method('getNode')->will($this->returnValue($testElement)); + $blockMock = $this->getMockBuilder('Magento\View\Block\AbstractBlock') ->disableOriginalConstructor() ->getMock(); $layoutMock->expects($this->any())->method('getMessagesBlock')->will($this->returnValue($blockMock)); @@ -343,8 +340,7 @@ class RegistrationTest extends \PHPUnit_Framework_TestCase ); $this->_mockBackendCntCtxt = $this->_objectManagerHelper - ->getObject('Magento\Backend\Controller\Context', - $contextParameters); + ->getObject('Magento\Backend\App\Action\Context', $contextParameters); $regControllerParams = array( 'context' => $this->_mockBackendCntCtxt, @@ -369,7 +365,6 @@ class RegistrationTest extends \PHPUnit_Framework_TestCase array('Magento\Core\Model\Config', $this->_mockConfig), array('Magento\Core\Model\Layout\Filter\Acl', $this->_mockLayoutFilter), array('Magento\Backend\Model\Session', $this->_mockBackendModSess), - array('Magento\Core\Model\Translate', $this->_mockTranslateModel), array('Magento\Config\ScopeInterface', $this->_mockConfigScope), ); $this->_mockObjectManager->expects($this->any()) diff --git a/dev/tests/unit/testsuite/Magento/Webhook/Controller/Adminhtml/Webhook/SubscriptionTest.php b/dev/tests/unit/testsuite/Magento/Webhook/Controller/Adminhtml/Webhook/SubscriptionTest.php index 7330729fef11a3a5bf206f5ffbc173ed18b46ef1..cdc4b1b2d6af4ad55b49b31682f5ce5054df0a5f 100644 --- a/dev/tests/unit/testsuite/Magento/Webhook/Controller/Adminhtml/Webhook/SubscriptionTest.php +++ b/dev/tests/unit/testsuite/Magento/Webhook/Controller/Adminhtml/Webhook/SubscriptionTest.php @@ -166,9 +166,8 @@ class SubscriptionTest extends \PHPUnit_Framework_TestCase { $exceptionMessage = 'An exception happened'; // have load layout throw an exception - $this->_mockObjectManager->expects($this->at(0)) - ->method('get') - ->with('Magento\Config\ScopeInterface') + $this->_mockRegistry->expects($this->any()) + ->method('registry') ->will($this->throwException(new \Magento\Core\Exception($exceptionMessage))); // verify the error @@ -545,9 +544,8 @@ class SubscriptionTest extends \PHPUnit_Framework_TestCase protected function _createSubscriptionController() { // Mock Layout passed into constructor - $layoutMock = $this->getMockBuilder('Magento\Core\Model\Layout') - ->disableOriginalConstructor() - ->getMock(); + $viewMock = $this->getMock('Magento\App\ViewInterface'); + $layoutMock = $this->getMock('Magento\View\LayoutInterface'); $layoutMergeMock = $this->getMockBuilder('Magento\Core\Model\Layout\Merge') ->disableOriginalConstructor() ->getMock(); @@ -556,6 +554,7 @@ class SubscriptionTest extends \PHPUnit_Framework_TestCase $layoutMock->expects($this->any())->method('getNode')->will($this->returnValue($testElement)); // for _setActiveMenu + $viewMock->expects($this->any())->method('getLayout')->will($this->returnValue($layoutMock)); $blockMock = $this->getMockBuilder('Magento\Backend\Block\Menu') ->disableOriginalConstructor() ->getMock(); @@ -568,18 +567,20 @@ class SubscriptionTest extends \PHPUnit_Framework_TestCase $layoutMock->expects($this->any())->method('getMessagesBlock')->will($this->returnValue($blockMock)); $layoutMock->expects($this->any())->method('getBlock')->will($this->returnValue($blockMock)); + $title = $this->getMock('Magento\App\Action\Title', array(), array(), '', false); + $title->expects($this->any())->method('add')->will($this->returnValue($title)); $contextParameters = array( - 'layout' => $layoutMock, + 'view' => $viewMock, 'objectManager' => $this->_mockObjectManager, 'session' => $this->_mockBackendModSess, 'translator' => $this->_mockTranslateModel, 'request' => $this->_mockRequest, 'response' => $this->_mockResponse, + 'title' => $title ); $this->_mockBackendCntCtxt = $this->_objectManagerHelper - ->getObject('Magento\Backend\Controller\Context', - $contextParameters); + ->getObject('Magento\Backend\App\Action\Context', $contextParameters); $subControllerParams = array( 'context' => $this->_mockBackendCntCtxt, diff --git a/dev/tests/unit/testsuite/Magento/Wishlist/Block/Item/ConfigureTest.php b/dev/tests/unit/testsuite/Magento/Wishlist/Block/Item/ConfigureTest.php index 7e726ff22c070c9a8cc2432a6e2c1c67c7779b39..25cbb1029f26d83e81fa74e2caf859607815dde7 100644 --- a/dev/tests/unit/testsuite/Magento/Wishlist/Block/Item/ConfigureTest.php +++ b/dev/tests/unit/testsuite/Magento/Wishlist/Block/Item/ConfigureTest.php @@ -63,16 +63,17 @@ class ConfigureTest extends \PHPUnit_Framework_TestCase $this->_mockCoreData = $this->getMockBuilder('Magento\Core\Helper\Data') ->disableOriginalConstructor() ->getMock(); - $this->_mockContext = $this->getMockBuilder('Magento\Core\Block\Template\Context') + $this->_mockContext = $this->getMockBuilder('Magento\View\Block\Template\Context') ->disableOriginalConstructor() ->getMock(); $this->_mockRegistry = $this->getMockBuilder('Magento\Core\Model\Registry') ->disableOriginalConstructor() ->getMock(); - $this->_model = new \Magento\Wishlist\Block\Item\Configure($this->_mockWishlistData, - $this->_mockCoreData, + $this->_model = new \Magento\Wishlist\Block\Item\Configure( $this->_mockContext, + $this->_mockCoreData, + $this->_mockWishlistData, $this->_mockRegistry); } diff --git a/dev/tools/Magento/Tools/Di/Code/Scanner/InheritanceInterceptorScanner.php b/dev/tools/Magento/Tools/Di/Code/Scanner/InheritanceInterceptorScanner.php new file mode 100644 index 0000000000000000000000000000000000000000..5abb8d34a2b52e29d2bf0306f21d65ae993564ff --- /dev/null +++ b/dev/tools/Magento/Tools/Di/Code/Scanner/InheritanceInterceptorScanner.php @@ -0,0 +1,54 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Tools\Di\Code\Scanner; + +class InheritanceInterceptorScanner implements ScannerInterface +{ + /** + * Get intercepted class names + * + * @param array $classes + * @param array $interceptedEntities + * @return array + */ + public function collectEntities(array $classes, array $interceptedEntities = array()) + { + $output = array(); + foreach ($classes as $class) { + foreach ($interceptedEntities as $interceptorClass) { + $interceptedEntity = substr($interceptorClass, 0, -12); + if (is_subclass_of($class, $interceptedEntity)) { + $reflectionClass = new \ReflectionClass($class); + if (!$reflectionClass->isAbstract() && !$reflectionClass->isFinal()) { + $output[] = $class . '\\Interceptor'; + } + } + } + } + $output = array_merge($interceptedEntities, $output); + $output = array_unique($output); + return $output; + } +} diff --git a/dev/tools/Magento/Tools/Di/Compiler/Directory.php b/dev/tools/Magento/Tools/Di/Compiler/Directory.php index d97d3485c2f229e2cb94625e502a5d017dc62bf5..099b31e51f1255e5ebc84589744d092e6e5f9afe 100644 --- a/dev/tools/Magento/Tools/Di/Compiler/Directory.php +++ b/dev/tools/Magento/Tools/Di/Compiler/Directory.php @@ -52,12 +52,19 @@ class Directory */ protected $_relations; + /** + * @var \Magento\Code\Validator + */ + protected $_validator; + /** * @param Log $log + * @param \Magento\Code\Validator $validator */ - public function __construct(Log $log) + public function __construct(Log $log, \Magento\Code\Validator $validator) { $this->_log = $log; + $this->_validator = $validator; set_error_handler(array($this, 'errorHandler'), E_STRICT); } @@ -77,7 +84,6 @@ class Directory */ public function compile($path) { - $validator = new \Magento\Code\Validator\ConstructorIntegrity(); $rdi = new \RecursiveDirectoryIterator(realpath($path)); $recursiveIterator = new \RecursiveIteratorIterator($rdi, 1); /** @var $item \SplFileInfo */ @@ -91,7 +97,7 @@ class Directory require_once $item->getRealPath(); } try { - $validator->validate($className); + $this->_validator->validate($className); $signatureReader = new \Magento\Code\Reader\ClassReader(); $this->_definitions[$className] = $signatureReader->getConstructor($className); $this->_relations[$className] = $signatureReader->getParents($className); diff --git a/dev/tools/Magento/Tools/Di/Compiler/Log/Writer/Console.php b/dev/tools/Magento/Tools/Di/Compiler/Log/Writer/Console.php index 3e3afc068303fdec2e7360f007be87b976910beb..3c37565c673d4eda54859415b4f5e3b2bde7e9dc 100644 --- a/dev/tools/Magento/Tools/Di/Compiler/Log/Writer/Console.php +++ b/dev/tools/Magento/Tools/Di/Compiler/Log/Writer/Console.php @@ -44,6 +44,7 @@ class Console implements WriterInterface */ public function write(array $data) { + $errorsCount = 0; foreach ($data as $type => $classes) { if (!count($classes)) { continue; @@ -55,10 +56,17 @@ class Console implements WriterInterface foreach ($messages as $message) { if ($message) { echo "\t\t - " . $message . "\n"; + if ($type != Log::GENERATION_SUCCESS) { + $errorsCount++; + } } } } } } + + if ($errorsCount) { + echo 'Total Errors Count: ' . $errorsCount . "\n"; + } } } diff --git a/dev/tools/Magento/Tools/Di/compiler.php b/dev/tools/Magento/Tools/Di/compiler.php index 10b90276adab1858bdc9f64208f1c9b242796726..a2d5a6d8a9f949ea48a5659d28b3a8ac5763582d 100644 --- a/dev/tools/Magento/Tools/Di/compiler.php +++ b/dev/tools/Magento/Tools/Di/compiler.php @@ -70,6 +70,10 @@ try { $log = new Log($logWriter, $errorWriter); $serializer = ($opt->getOption('serializer') == 'binary') ? new Serializer\Igbinary() : new Serializer\Standard(); + $validator = new \Magento\Code\Validator(); + $validator->add(new \Magento\Code\Validator\ConstructorIntegrity()); + $validator->add(new \Magento\Code\Validator\ContextAggregation()); + // 1 Code generation // 1.1 Code scan $directoryScanner = new Scanner\DirectoryScanner(); @@ -84,12 +88,13 @@ try { $entities = $scanner->collectEntities($files); $interceptorScanner = new Scanner\XmlInterceptorScanner(); - $entities['di'] = array_merge($entities['di'], $interceptorScanner->collectEntities($files['di'])); + $entities['interceptors'] = $interceptorScanner->collectEntities($files['di']); // 1.2 Generation of Factory and Additional Classes $generatorIo = new \Magento\Code\Generator\Io(null, null, $generationDir); $generator = new \Magento\Code\Generator(null, null, $generatorIo); foreach (array('php', 'additional') as $type) { + sort($entities[$type]); foreach ($entities[$type] as $entityName) { switch ($generator->generateClass($entityName)) { case \Magento\Code\Generator::GENERATION_SUCCESS: @@ -110,31 +115,37 @@ try { // 2. Compilation // 2.1 Code scan - $directoryCompiler = new Directory($log); + $directoryCompiler = new Directory($log, $validator); foreach ($compilationDirs as $path) { if (is_readable($path)) { $directoryCompiler->compile($path); } } + $inheritanceScanner = new Scanner\InheritanceInterceptorScanner(); + $entities['interceptors'] = $inheritanceScanner->collectEntities(get_declared_classes(), $entities['interceptors']); + // 2.1.1 Generation of Proxy and Interceptor Classes - foreach ($entities['di'] as $entityName) { - switch ($generator->generateClass($entityName)) { - case \Magento\Code\Generator::GENERATION_SUCCESS: - $log->add(Log::GENERATION_SUCCESS, $entityName); - break; - - case \Magento\Code\Generator::GENERATION_ERROR: - $log->add(Log::GENERATION_ERROR, $entityName); - break; - - case \Magento\Code\Generator::GENERATION_SKIP: - default: - //no log - break; + foreach (array('interceptors', 'di') as $type) { + foreach ($entities[$type] as $entityName) { + switch ($generator->generateClass($entityName)) { + case \Magento\Code\Generator::GENERATION_SUCCESS: + $log->add(Log::GENERATION_SUCCESS, $entityName); + break; + + case \Magento\Code\Generator::GENERATION_ERROR: + $log->add(Log::GENERATION_ERROR, $entityName); + break; + + case \Magento\Code\Generator::GENERATION_SKIP: + default: + //no log + break; + } } } + //2.1.2 Compile definitions for Proxy/Interceptor classes $directoryCompiler->compile($generationDir); diff --git a/dev/tools/Magento/Tools/Migration/Acl/log/AclXPathToAclId.log b/dev/tools/Magento/Tools/Migration/Acl/log/AclXPathToAclId.log index 0e63dbfbe530e1d0859a829e3041bec9fa79cf7d..563cc95a6b80ba6a4136c54933861d1a003a424c 100644 --- a/dev/tools/Magento/Tools/Migration/Acl/log/AclXPathToAclId.log +++ b/dev/tools/Magento/Tools/Migration/Acl/log/AclXPathToAclId.log @@ -1 +1 @@ -{"config\/acl\/resources\/admin\/cms\/magento_banner":"Magento_Banner::magento_banner","config\/acl\/resources\/admin\/catalog\/events":"Magento_CatalogEvent::events","config\/acl\/resources\/admin\/system\/config\/magento_catalogpermissions":"Magento_CatalogPermissions::magento_catalogpermissions","config\/acl\/resources\/admin\/catalog\/magento_catalogpermissions":"Magento_CatalogPermissions::catalog_magento_catalogpermissions","config\/acl\/resources\/admin\/sales\/magento_advancedcheckout":"Magento_AdvancedCheckout::magento_advancedcheckout","config\/acl\/resources\/admin\/sales\/magento_advancedcheckout\/view":"Magento_AdvancedCheckout::view","config\/acl\/resources\/admin\/sales\/magento_advancedcheckout\/update":"Magento_AdvancedCheckout::update","config\/acl\/resources\/admin\/cms\/page\/save_revision":"Magento_VersionsCms::save_revision","config\/acl\/resources\/admin\/cms\/page\/delete_revision":"Magento_VersionsCms::delete_revision","config\/acl\/resources\/admin\/cms\/page\/publish_revision":"Magento_VersionsCms::publish_revision","config\/acl\/resources\/admin\/cms\/hierarchy":"Magento_VersionsCms::hierarchy","config\/acl\/resources\/admin\/customer\/customersegment":"Magento_CustomerSegment::customersegment","config\/acl\/resources\/admin\/report\/customers\/segment":"Magento_CustomerSegment::segment","config\/acl\/resources\/admin\/customer\/attributes":"Magento_CustomerCustomAttributes::attributes","config\/acl\/resources\/admin\/customer\/attributes\/customer_attributes":"Magento_CustomerCustomAttributes::customer_attributes","config\/acl\/resources\/admin\/customer\/attributes\/customer_address_attributes":"Magento_CustomerCustomAttributes::customer_address_attributes","config\/acl\/resources\/admin\/system\/config\/giftcardaccount":"Magento_GiftCardAccount::giftcardaccount","config\/acl\/resources\/admin\/customer\/giftcardaccount":"Magento_GiftCardAccount::customer_giftcardaccount","config\/acl\/resources\/admin\/system\/config\/giftcard":"Magento_GiftCard::giftcard","config\/acl\/resources\/admin\/system\/config\/magento_giftregistry":"Magento_GiftRegistry::magento_giftregistry","config\/acl\/resources\/admin\/customer\/magento_giftregistry":"Magento_GiftRegistry::customer_magento_giftregistry","config\/acl\/resources\/admin\/sales\/magento_giftwrapping":"Magento_GiftWrapping::magento_giftwrapping","config\/acl\/resources\/admin\/system\/convert\/enterprise_scheduled_operation":"Magento_ScheduledImportExport::enterprise_scheduled_operation","config\/acl\/resources\/admin\/customer\/magento_invitation":"Magento_Invitation::magento_invitation","config\/acl\/resources\/admin\/report\/magento_invitation":"Magento_Invitation::report_magento_invitation","config\/acl\/resources\/admin\/report\/magento_invitation\/general":"Magento_Invitation::general","config\/acl\/resources\/admin\/report\/magento_invitation\/customer":"Magento_Invitation::magento_invitation_customer","config\/acl\/resources\/admin\/report\/magento_invitation\/order":"Magento_Invitation::order","config\/acl\/resources\/admin\/system\/config\/magento_invitation":"Magento_Invitation::config_magento_invitation","config\/acl\/resources\/admin\/system\/config\/logging":"Magento_Logging::logging","config\/acl\/resources\/admin\/system\/magento_logging":"Magento_Logging::magento_logging","config\/acl\/resources\/admin\/system\/magento_logging\/events":"Magento_Logging::magento_logging_events","config\/acl\/resources\/admin\/system\/magento_logging\/backups":"Magento_Logging::backups","config\/acl\/resources\/admin\/system\/crypt_key":"Magento_Pci::crypt_key","config\/acl\/resources\/admin\/system\/acl\/locks":"Magento_Pci::locks","config\/acl\/resources\/admin\/catalog\/products\/read_product_price":"Magento_PricePermissions::read_product_price","config\/acl\/resources\/admin\/catalog\/products\/read_product_price\/edit_product_price":"Magento_PricePermissions::edit_product_price","config\/acl\/resources\/admin\/catalog\/products\/edit_product_status":"Magento_PricePermissions::edit_product_status","config\/acl\/resources\/admin\/promo\/catalog\/edit":"Magento_PromotionPermissions::edit","config\/acl\/resources\/admin\/promo\/quote\/edit":"Magento_PromotionPermissions::quote_edit","config\/acl\/resources\/admin\/promo\/magento_reminder\/edit":"Magento_PromotionPermissions::magento_reminder_edit","config\/acl\/resources\/admin\/promo\/magento_reminder":"Magento_Reminder::magento_reminder","config\/acl\/resources\/admin\/system\/config\/promo":"Magento_SalesRule::config_promo","config\/acl\/resources\/admin\/customer\/manage\/reward_balance":"Magento_Reward::reward_balance","config\/acl\/resources\/admin\/sales\/order\/actions\/create\/reward_spend":"Magento_Reward::reward_spend","config\/acl\/resources\/admin\/customer\/rates":"Magento_Reward::rates","config\/acl\/resources\/admin\/system\/config\/magento_reward":"Magento_Reward::magento_reward","config\/acl\/resources\/admin\/sales\/magento_rma":"Magento_Rma::magento_rma","config\/acl\/resources\/admin\/sales\/magento_rma\/rma_manage":"Magento_Rma::rma_manage","config\/acl\/resources\/admin\/sales\/magento_rma\/rma_attribute":"Magento_Rma::rma_attribute","config\/acl\/resources\/admin\/sales\/archive":"Magento_SalesArchive::archive","config\/acl\/resources\/admin\/sales\/archive\/orders":"Magento_SalesArchive::orders","config\/acl\/resources\/admin\/sales\/archive\/orders\/add":"Magento_SalesArchive::add","config\/acl\/resources\/admin\/sales\/archive\/orders\/remove":"Magento_SalesArchive::remove","config\/acl\/resources\/admin\/sales\/archive\/invoices":"Magento_SalesArchive::invoices","config\/acl\/resources\/admin\/sales\/archive\/shipments":"Magento_SalesArchive::shipments","config\/acl\/resources\/admin\/sales\/archive\/creditmemos":"Magento_SalesArchive::creditmemos","config\/acl\/resources\/admin\/catalog\/targetrule":"Magento_TargetRule::targetrule","config\/acl\/resources\/admin\/report\/customers\/wishlist":"Magento_MultipleWishlist::wishlist","config\/acl\/resources\/admin\/system\/adminnotification":"Magento_AdminNotification::adminnotification","config\/acl\/resources\/admin\/system\/adminnotification\/show_toolbar":"Magento_AdminNotification::show_toolbar","config\/acl\/resources\/admin\/system\/adminnotification\/show_list":"Magento_AdminNotification::show_list","config\/acl\/resources\/admin\/system\/adminnotification\/mark_as_read":"Magento_AdminNotification::mark_as_read","config\/acl\/resources\/admin\/system\/adminnotification\/remove":"Magento_AdminNotification::adminnotification_remove","config\/acl\/resources\/all":"Magento_Adminhtml::all","config\/acl\/resources\/admin":"Magento_Adminhtml::admin","config\/acl\/resources\/admin\/dashboard":"Magento_Adminhtml::dashboard","config\/acl\/resources\/admin\/system":"Magento_Adminhtml::system","config\/acl\/resources\/admin\/system\/store":"Magento_Adminhtml::store","config\/acl\/resources\/admin\/system\/design":"Magento_Adminhtml::design","config\/acl\/resources\/admin\/system\/design\/schedule":"Magento_Adminhtml::schedule","config\/acl\/resources\/admin\/system\/config":"Magento_Adminhtml::config","config\/acl\/resources\/admin\/system\/config\/general":"Magento_Adminhtml::config_general","config\/acl\/resources\/admin\/system\/config\/web":"Magento_Adminhtml::web","config\/acl\/resources\/admin\/system\/config\/design":"Magento_Adminhtml::config_design","config\/acl\/resources\/admin\/system\/config\/system":"Magento_Adminhtml::config_system","config\/acl\/resources\/admin\/system\/config\/advanced":"Magento_Adminhtml::advanced","config\/acl\/resources\/admin\/system\/config\/trans_email":"Magento_Adminhtml::trans_email","config\/acl\/resources\/admin\/system\/config\/dev":"Magento_Adminhtml::dev","config\/acl\/resources\/admin\/system\/config\/currency":"Magento_Adminhtml::currency","config\/acl\/resources\/admin\/system\/config\/sendfriend":"Magento_Adminhtml::sendfriend","config\/acl\/resources\/admin\/system\/config\/admin":"Magento_Adminhtml::config_admin","config\/acl\/resources\/admin\/system\/currency":"Magento_CurrencySymbol::system_currency","config\/acl\/resources\/admin\/system\/email_template":"Magento_Adminhtml::email_template","config\/acl\/resources\/admin\/system\/variable":"Magento_Adminhtml::variable","config\/acl\/resources\/admin\/system\/myaccount":"Magento_Adminhtml::myaccount","config\/acl\/resources\/admin\/system\/tools":"Magento_Adminhtml::tools","config\/acl\/resources\/admin\/system\/convert":"Magento_Adminhtml::convert","config\/acl\/resources\/admin\/system\/cache":"Magento_Adminhtml::cache","config\/acl\/resources\/admin\/system\/extensions":"Magento_Adminhtml::extensions","config\/acl\/resources\/admin\/system\/extensions\/local":"Magento_Adminhtml::local","config\/acl\/resources\/admin\/system\/extensions\/custom":"Magento_Adminhtml::custom","config\/acl\/resources\/admin\/global_search":"Magento_Adminhtml::global_search","config\/acl\/resources\/admin\/system\/tools\/backup":"Magento_Backup::backup","config\/acl\/resources\/admin\/system\/tools\/backup\/rollback":"Magento_Backup::rollback","config\/acl\/resources\/admin\/system\/config\/cataloginventory":"Magento_CatalogInventory::cataloginventory","config\/acl\/resources\/admin\/promo":"Magento_CatalogRule::promo","config\/acl\/resources\/admin\/promo\/catalog":"Magento_CatalogRule::promo_catalog","config\/acl\/resources\/admin\/catalog\/search":"Magento_CatalogSearch::search","config\/acl\/resources\/admin\/system\/config\/catalog":"Magento_Catalog::config_catalog","config\/acl\/resources\/admin\/catalog":"Magento_Catalog::catalog","config\/acl\/resources\/admin\/catalog\/attributes":"Magento_Catalog::catalog_attributes","config\/acl\/resources\/admin\/catalog\/attributes\/attributes":"Magento_Catalog::attributes_attributes","config\/acl\/resources\/admin\/catalog\/attributes\/sets":"Magento_Catalog::sets","config\/acl\/resources\/admin\/catalog\/categories":"Magento_Catalog::categories","config\/acl\/resources\/admin\/catalog\/products":"Magento_Catalog::products","config\/acl\/resources\/admin\/catalog\/update_attributes":"Magento_Catalog::update_attributes","config\/acl\/resources\/admin\/catalog\/urlrewrite":"Magento_Catalog::urlrewrite","config\/acl\/resources\/admin\/sales\/checkoutagreement":"Magento_Checkout::checkoutagreement","config\/acl\/resources\/admin\/system\/config\/checkout":"Magento_Checkout::checkout","config\/acl\/resources\/admin\/cms":"Magento_Cms::cms","config\/acl\/resources\/admin\/cms\/block":"Magento_Cms::block","config\/acl\/resources\/admin\/cms\/page":"Magento_Cms::page","config\/acl\/resources\/admin\/cms\/page\/save":"Magento_Cms::save","config\/acl\/resources\/admin\/cms\/page\/delete":"Magento_Cms::page_delete","config\/acl\/resources\/admin\/cms\/media_gallery":"Magento_Cms::media_gallery","config\/acl\/resources\/admin\/system\/config\/cms":"Magento_Cms::config_cms","config\/acl\/resources\/admin\/system\/config\/contacts":"Magento_Contacts::contacts","config\/acl\/resources\/admin\/system\/currency\/rates":"Magento_CurrencySymbol::currency_rates","config\/acl\/resources\/admin\/system\/currency\/symbols":"Magento_CurrencySymbol::symbols","config\/acl\/resources\/admin\/customer":"Magento_Customer::customer","config\/acl\/resources\/admin\/customer\/group":"Magento_Customer::group","config\/acl\/resources\/admin\/customer\/manage":"Magento_Customer::manage","config\/acl\/resources\/admin\/customer\/online":"Magento_Customer::online","config\/acl\/resources\/admin\/system\/config\/customer":"Magento_Customer::config_customer","config\/acl\/resources\/admin\/system\/design\/editor":"Magento_DesignEditor::editor","config\/acl\/resources\/admin\/system\/config\/downloadable":"Magento_Downloadable::downloadable","config\/acl\/resources\/admin\/system\/config\/google":"Magento_GoogleCheckout::google","config\/acl\/resources\/admin\/catalog\/googleshopping":"Magento_GoogleShopping::googleshopping","config\/acl\/resources\/admin\/catalog\/googleshopping\/types":"Magento_GoogleShopping::types","config\/acl\/resources\/admin\/catalog\/googleshopping\/items":"Magento_GoogleShopping::items","config\/acl\/resources\/admin\/system\/convert\/import":"Magento_ImportExport::import","config\/acl\/resources\/admin\/system\/convert\/export":"Magento_ImportExport::export","config\/acl\/resources\/admin\/system\/index":"Magento_Index::index","config\/acl\/resources\/admin\/system\/config\/newsletter":"Magento_Newsletter::newsletter","config\/acl\/resources\/admin\/newsletter":"Magento_Newsletter::admin_newsletter","config\/acl\/resources\/admin\/newsletter\/problem":"Magento_Newsletter::problem","config\/acl\/resources\/admin\/newsletter\/queue":"Magento_Newsletter::queue","config\/acl\/resources\/admin\/newsletter\/subscriber":"Magento_Newsletter::subscriber","config\/acl\/resources\/admin\/newsletter\/template":"Magento_Newsletter::template","config\/acl\/resources\/admin\/page_cache":"Magento_PageCache::page_cache","config\/acl\/resources\/admin\/system\/config\/payment":"Magento_Payment::payment","config\/acl\/resources\/admin\/system\/config\/payment_services":"Magento_Payment::payment_services","config\/acl\/resources\/admin\/system\/config\/paypal":"Magento_Paypal::paypal","config\/acl\/resources\/admin\/report\/salesroot\/paypal_settlement_reports":"Magento_Paypal::paypal_settlement_reports","config\/acl\/resources\/admin\/report\/salesroot\/paypal_settlement_reports\/view":"Magento_Paypal::paypal_settlement_reports_view","config\/acl\/resources\/admin\/report\/salesroot\/paypal_settlement_reports\/fetch":"Magento_Paypal::fetch","config\/acl\/resources\/admin\/system\/config\/persistent":"Magento_Persistent::persistent","config\/acl\/resources\/admin\/cms\/poll":"Magento_Poll::poll","config\/acl\/resources\/admin\/catalog\/reviews_ratings\/ratings":"Magento_Rating::ratings","config\/acl\/resources\/admin\/report":"Magento_Reports::report","config\/acl\/resources\/admin\/report\/salesroot":"Magento_Reports::salesroot","config\/acl\/resources\/admin\/report\/salesroot\/sales":"Magento_Reports::salesroot_sales","config\/acl\/resources\/admin\/report\/salesroot\/tax":"Magento_Reports::tax","config\/acl\/resources\/admin\/report\/salesroot\/shipping":"Magento_Reports::shipping","config\/acl\/resources\/admin\/report\/salesroot\/invoiced":"Magento_Reports::invoiced","config\/acl\/resources\/admin\/report\/salesroot\/refunded":"Magento_Reports::refunded","config\/acl\/resources\/admin\/report\/salesroot\/coupons":"Magento_Reports::coupons","config\/acl\/resources\/admin\/report\/shopcart":"Magento_Reports::shopcart","config\/acl\/resources\/admin\/report\/shopcart\/product":"Magento_Reports::product","config\/acl\/resources\/admin\/report\/shopcart\/abandoned":"Magento_Reports::abandoned","config\/acl\/resources\/admin\/report\/products":"Magento_Reports::report_products","config\/acl\/resources\/admin\/report\/products\/bestsellers":"Magento_Reports::bestsellers","config\/acl\/resources\/admin\/report\/products\/sold":"Magento_Reports::sold","config\/acl\/resources\/admin\/report\/products\/viewed":"Magento_Reports::viewed","config\/acl\/resources\/admin\/report\/products\/lowstock":"Magento_Reports::lowstock","config\/acl\/resources\/admin\/report\/products\/downloads":"Magento_Reports::downloads","config\/acl\/resources\/admin\/report\/customers":"Magento_Reports::customers","config\/acl\/resources\/admin\/report\/customers\/accounts":"Magento_Reports::accounts","config\/acl\/resources\/admin\/report\/customers\/totals":"Magento_Reports::totals","config\/acl\/resources\/admin\/report\/customers\/orders":"Magento_Reports::customers_orders","config\/acl\/resources\/admin\/report\/review":"Magento_Reports::review","config\/acl\/resources\/admin\/report\/review\/customer":"Magento_Reports::review_customer","config\/acl\/resources\/admin\/report\/review\/product":"Magento_Reports::review_product","config\/acl\/resources\/admin\/report\/tags":"Magento_Reports::tags","config\/acl\/resources\/admin\/report\/tags\/customer":"Magento_Reports::tags_customer","config\/acl\/resources\/admin\/report\/tags\/popular":"Magento_Reports::popular","config\/acl\/resources\/admin\/report\/tags\/product":"Magento_Reports::tags_product","config\/acl\/resources\/admin\/report\/search":"Magento_Reports::report_search","config\/acl\/resources\/admin\/report\/statistics":"Magento_Reports::statistics","config\/acl\/resources\/admin\/system\/config\/reports":"Magento_Reports::reports","config\/acl\/resources\/admin\/catalog\/reviews_ratings":"Magento_Review::reviews_ratings","config\/acl\/resources\/admin\/catalog\/reviews_ratings\/reviews":"Magento_Review::reviews","config\/acl\/resources\/admin\/catalog\/reviews_ratings\/reviews\/all":"Magento_Review::reviews_all","config\/acl\/resources\/admin\/catalog\/reviews_ratings\/reviews\/pending":"Magento_Review::pending","config\/acl\/resources\/admin\/system\/config\/rss":"Magento_Rss::rss","config\/acl\/resources\/admin\/promo\/quote":"Magento_SalesRule::quote","config\/acl\/resources\/admin\/sales":"Magento_Sales::sales","config\/acl\/resources\/admin\/sales\/order":"Magento_Sales::sales_order","config\/acl\/resources\/admin\/sales\/order\/actions":"Magento_Sales::actions","config\/acl\/resources\/admin\/sales\/order\/actions\/create":"Magento_Sales::create","config\/acl\/resources\/admin\/sales\/order\/actions\/view":"Magento_Sales::actions_view","config\/acl\/resources\/admin\/sales\/order\/actions\/email":"Magento_Sales::email","config\/acl\/resources\/admin\/sales\/order\/actions\/reorder":"Magento_Sales::reorder","config\/acl\/resources\/admin\/sales\/order\/actions\/edit":"Magento_Sales::actions_edit","config\/acl\/resources\/admin\/sales\/order\/actions\/cancel":"Magento_Sales::cancel","config\/acl\/resources\/admin\/sales\/order\/actions\/review_payment":"Magento_Sales::review_payment","config\/acl\/resources\/admin\/sales\/order\/actions\/capture":"Magento_Sales::capture","config\/acl\/resources\/admin\/sales\/order\/actions\/invoice":"Magento_Sales::invoice","config\/acl\/resources\/admin\/sales\/order\/actions\/creditmemo":"Magento_Sales::creditmemo","config\/acl\/resources\/admin\/sales\/order\/actions\/hold":"Magento_Sales::hold","config\/acl\/resources\/admin\/sales\/order\/actions\/unhold":"Magento_Sales::unhold","config\/acl\/resources\/admin\/sales\/order\/actions\/ship":"Magento_Sales::ship","config\/acl\/resources\/admin\/sales\/order\/actions\/comment":"Magento_Sales::comment","config\/acl\/resources\/admin\/sales\/order\/actions\/emails":"Magento_Sales::emails","config\/acl\/resources\/admin\/sales\/invoice":"Magento_Sales::sales_invoice","config\/acl\/resources\/admin\/sales\/shipment":"Magento_Sales::shipment","config\/acl\/resources\/admin\/sales\/creditmemo":"Magento_Sales::sales_creditmemo","config\/acl\/resources\/admin\/sales\/transactions":"Magento_Sales::transactions","config\/acl\/resources\/admin\/sales\/transactions\/fetch":"Magento_Sales::transactions_fetch","config\/acl\/resources\/admin\/sales\/recurring_profile":"Magento_Sales::recurring_profile","config\/acl\/resources\/admin\/sales\/billing_agreement":"Magento_Sales::billing_agreement","config\/acl\/resources\/admin\/sales\/billing_agreement\/actions":"Magento_Sales::billing_agreement_actions","config\/acl\/resources\/admin\/sales\/billing_agreement\/actions\/view":"Magento_Sales::billing_agreement_actions_view","config\/acl\/resources\/admin\/sales\/billing_agreement\/actions\/manage":"Magento_Sales::actions_manage","config\/acl\/resources\/admin\/sales\/billing_agreement\/actions\/use":"Magento_Sales::use","config\/acl\/resources\/admin\/system\/order_statuses":"Magento_Sales::order_statuses","config\/acl\/resources\/admin\/system\/config\/sales":"Magento_Sales::config_sales","config\/acl\/resources\/admin\/system\/config\/sales_email":"Magento_Sales::sales_email","config\/acl\/resources\/admin\/system\/config\/sales_pdf":"Magento_Sales::sales_pdf","config\/acl\/resources\/admin\/system\/config\/shipping":"Magento_Shipping::config_shipping","config\/acl\/resources\/admin\/system\/config\/carriers":"Magento_Shipping::carriers","config\/acl\/resources\/admin\/catalog\/sitemap":"Magento_Sitemap::sitemap","config\/acl\/resources\/admin\/system\/config\/sitemap":"Magento_Sitemap::config_sitemap","config\/acl\/resources\/admin\/sales\/tax":"Magento_Tax::sales_tax","config\/acl\/resources\/admin\/sales\/tax\/classes_customer":"Magento_Tax::classes_customer","config\/acl\/resources\/admin\/sales\/tax\/classes_product":"Magento_Tax::classes_product","config\/acl\/resources\/admin\/sales\/tax\/import_export":"Magento_Tax::import_export","config\/acl\/resources\/admin\/sales\/tax\/rates":"Magento_Tax::tax_rates","config\/acl\/resources\/admin\/sales\/tax\/rules":"Magento_Tax::rules","config\/acl\/resources\/admin\/system\/config\/tax":"Magento_Tax::config_tax","config\/acl\/resources\/admin\/system\/acl":"Magento_User::acl","config\/acl\/resources\/admin\/system\/acl\/roles":"Magento_User::acl_roles","config\/acl\/resources\/admin\/system\/acl\/users":"Magento_User::acl_users","config\/acl\/resources\/admin\/cms\/widget_instance":"Magento_Widget::widget_instance","config\/acl\/resources\/admin\/system\/config\/wishlist":"Magento_Wishlist::config_wishlist"} +{"config\/acl\/resources\/admin\/cms\/magento_banner":"Magento_Banner::magento_banner","config\/acl\/resources\/admin\/catalog\/events":"Magento_CatalogEvent::events","config\/acl\/resources\/admin\/system\/config\/magento_catalogpermissions":"Magento_CatalogPermissions::magento_catalogpermissions","config\/acl\/resources\/admin\/catalog\/magento_catalogpermissions":"Magento_CatalogPermissions::catalog_magento_catalogpermissions","config\/acl\/resources\/admin\/sales\/magento_advancedcheckout":"Magento_AdvancedCheckout::magento_advancedcheckout","config\/acl\/resources\/admin\/sales\/magento_advancedcheckout\/view":"Magento_AdvancedCheckout::view","config\/acl\/resources\/admin\/sales\/magento_advancedcheckout\/update":"Magento_AdvancedCheckout::update","config\/acl\/resources\/admin\/cms\/page\/save_revision":"Magento_VersionsCms::save_revision","config\/acl\/resources\/admin\/cms\/page\/delete_revision":"Magento_VersionsCms::delete_revision","config\/acl\/resources\/admin\/cms\/page\/publish_revision":"Magento_VersionsCms::publish_revision","config\/acl\/resources\/admin\/cms\/hierarchy":"Magento_VersionsCms::hierarchy","config\/acl\/resources\/admin\/customer\/customersegment":"Magento_CustomerSegment::customersegment","config\/acl\/resources\/admin\/report\/customers\/segment":"Magento_CustomerSegment::segment","config\/acl\/resources\/admin\/customer\/attributes":"Magento_CustomerCustomAttributes::attributes","config\/acl\/resources\/admin\/customer\/attributes\/customer_attributes":"Magento_CustomerCustomAttributes::customer_attributes","config\/acl\/resources\/admin\/customer\/attributes\/customer_address_attributes":"Magento_CustomerCustomAttributes::customer_address_attributes","config\/acl\/resources\/admin\/system\/config\/giftcardaccount":"Magento_GiftCardAccount::giftcardaccount","config\/acl\/resources\/admin\/customer\/giftcardaccount":"Magento_GiftCardAccount::customer_giftcardaccount","config\/acl\/resources\/admin\/system\/config\/giftcard":"Magento_GiftCard::giftcard","config\/acl\/resources\/admin\/system\/config\/magento_giftregistry":"Magento_GiftRegistry::magento_giftregistry","config\/acl\/resources\/admin\/customer\/magento_giftregistry":"Magento_GiftRegistry::customer_magento_giftregistry","config\/acl\/resources\/admin\/sales\/magento_giftwrapping":"Magento_GiftWrapping::magento_giftwrapping","config\/acl\/resources\/admin\/system\/convert\/enterprise_scheduled_operation":"Magento_ScheduledImportExport::enterprise_scheduled_operation","config\/acl\/resources\/admin\/customer\/magento_invitation":"Magento_Invitation::magento_invitation","config\/acl\/resources\/admin\/report\/magento_invitation":"Magento_Invitation::report_magento_invitation","config\/acl\/resources\/admin\/report\/magento_invitation\/general":"Magento_Invitation::general","config\/acl\/resources\/admin\/report\/magento_invitation\/customer":"Magento_Invitation::magento_invitation_customer","config\/acl\/resources\/admin\/report\/magento_invitation\/order":"Magento_Invitation::order","config\/acl\/resources\/admin\/system\/config\/magento_invitation":"Magento_Invitation::config_magento_invitation","config\/acl\/resources\/admin\/system\/config\/logging":"Magento_Logging::logging","config\/acl\/resources\/admin\/system\/magento_logging":"Magento_Logging::magento_logging","config\/acl\/resources\/admin\/system\/magento_logging\/events":"Magento_Logging::magento_logging_events","config\/acl\/resources\/admin\/system\/magento_logging\/backups":"Magento_Logging::backups","config\/acl\/resources\/admin\/system\/crypt_key":"Magento_Pci::crypt_key","config\/acl\/resources\/admin\/system\/acl\/locks":"Magento_Pci::locks","config\/acl\/resources\/admin\/catalog\/products\/read_product_price":"Magento_PricePermissions::read_product_price","config\/acl\/resources\/admin\/catalog\/products\/read_product_price\/edit_product_price":"Magento_PricePermissions::edit_product_price","config\/acl\/resources\/admin\/catalog\/products\/edit_product_status":"Magento_PricePermissions::edit_product_status","config\/acl\/resources\/admin\/promo\/catalog\/edit":"Magento_PromotionPermissions::edit","config\/acl\/resources\/admin\/promo\/quote\/edit":"Magento_PromotionPermissions::quote_edit","config\/acl\/resources\/admin\/promo\/magento_reminder\/edit":"Magento_PromotionPermissions::magento_reminder_edit","config\/acl\/resources\/admin\/promo\/magento_reminder":"Magento_Reminder::magento_reminder","config\/acl\/resources\/admin\/system\/config\/promo":"Magento_SalesRule::config_promo","config\/acl\/resources\/admin\/customer\/manage\/reward_balance":"Magento_Reward::reward_balance","config\/acl\/resources\/admin\/sales\/order\/actions\/create\/reward_spend":"Magento_Reward::reward_spend","config\/acl\/resources\/admin\/customer\/rates":"Magento_Reward::rates","config\/acl\/resources\/admin\/system\/config\/magento_reward":"Magento_Reward::magento_reward","config\/acl\/resources\/admin\/sales\/magento_rma":"Magento_Rma::magento_rma","config\/acl\/resources\/admin\/sales\/magento_rma\/rma_manage":"Magento_Rma::rma_manage","config\/acl\/resources\/admin\/sales\/magento_rma\/rma_attribute":"Magento_Rma::rma_attribute","config\/acl\/resources\/admin\/sales\/archive":"Magento_SalesArchive::archive","config\/acl\/resources\/admin\/sales\/archive\/orders":"Magento_SalesArchive::orders","config\/acl\/resources\/admin\/sales\/archive\/orders\/add":"Magento_SalesArchive::add","config\/acl\/resources\/admin\/sales\/archive\/orders\/remove":"Magento_SalesArchive::remove","config\/acl\/resources\/admin\/sales\/archive\/invoices":"Magento_SalesArchive::invoices","config\/acl\/resources\/admin\/sales\/archive\/shipments":"Magento_SalesArchive::shipments","config\/acl\/resources\/admin\/sales\/archive\/creditmemos":"Magento_SalesArchive::creditmemos","config\/acl\/resources\/admin\/catalog\/targetrule":"Magento_TargetRule::targetrule","config\/acl\/resources\/admin\/report\/customers\/wishlist":"Magento_MultipleWishlist::wishlist","config\/acl\/resources\/admin\/system\/adminnotification":"Magento_AdminNotification::adminnotification","config\/acl\/resources\/admin\/system\/adminnotification\/show_toolbar":"Magento_AdminNotification::show_toolbar","config\/acl\/resources\/admin\/system\/adminnotification\/show_list":"Magento_AdminNotification::show_list","config\/acl\/resources\/admin\/system\/adminnotification\/mark_as_read":"Magento_AdminNotification::mark_as_read","config\/acl\/resources\/admin\/system\/adminnotification\/remove":"Magento_AdminNotification::adminnotification_remove","config\/acl\/resources\/all":"Magento_Adminhtml::all","config\/acl\/resources\/admin":"Magento_Adminhtml::admin","config\/acl\/resources\/admin\/dashboard":"Magento_Adminhtml::dashboard","config\/acl\/resources\/admin\/system":"Magento_Adminhtml::system","config\/acl\/resources\/admin\/system\/store":"Magento_Adminhtml::store","config\/acl\/resources\/admin\/system\/design":"Magento_Adminhtml::design","config\/acl\/resources\/admin\/system\/design\/schedule":"Magento_Adminhtml::schedule","config\/acl\/resources\/admin\/system\/config":"Magento_Adminhtml::config","config\/acl\/resources\/admin\/system\/config\/general":"Magento_Adminhtml::config_general","config\/acl\/resources\/admin\/system\/config\/web":"Magento_Adminhtml::web","config\/acl\/resources\/admin\/system\/config\/design":"Magento_Adminhtml::config_design","config\/acl\/resources\/admin\/system\/config\/system":"Magento_Adminhtml::config_system","config\/acl\/resources\/admin\/system\/config\/advanced":"Magento_Adminhtml::advanced","config\/acl\/resources\/admin\/system\/config\/trans_email":"Magento_Adminhtml::trans_email","config\/acl\/resources\/admin\/system\/config\/dev":"Magento_Adminhtml::dev","config\/acl\/resources\/admin\/system\/config\/currency":"Magento_Adminhtml::currency","config\/acl\/resources\/admin\/system\/config\/sendfriend":"Magento_Adminhtml::sendfriend","config\/acl\/resources\/admin\/system\/config\/admin":"Magento_Adminhtml::config_admin","config\/acl\/resources\/admin\/system\/currency":"Magento_CurrencySymbol::system_currency","config\/acl\/resources\/admin\/system\/email_template":"Magento_Email::template","config\/acl\/resources\/admin\/system\/variable":"Magento_Adminhtml::variable","config\/acl\/resources\/admin\/system\/myaccount":"Magento_Adminhtml::myaccount","config\/acl\/resources\/admin\/system\/tools":"Magento_Adminhtml::tools","config\/acl\/resources\/admin\/system\/convert":"Magento_Adminhtml::convert","config\/acl\/resources\/admin\/system\/cache":"Magento_Adminhtml::cache","config\/acl\/resources\/admin\/system\/extensions":"Magento_Adminhtml::extensions","config\/acl\/resources\/admin\/system\/extensions\/local":"Magento_Adminhtml::local","config\/acl\/resources\/admin\/system\/extensions\/custom":"Magento_Adminhtml::custom","config\/acl\/resources\/admin\/global_search":"Magento_Adminhtml::global_search","config\/acl\/resources\/admin\/system\/tools\/backup":"Magento_Backup::backup","config\/acl\/resources\/admin\/system\/tools\/backup\/rollback":"Magento_Backup::rollback","config\/acl\/resources\/admin\/system\/config\/cataloginventory":"Magento_CatalogInventory::cataloginventory","config\/acl\/resources\/admin\/promo":"Magento_CatalogRule::promo","config\/acl\/resources\/admin\/promo\/catalog":"Magento_CatalogRule::promo_catalog","config\/acl\/resources\/admin\/catalog\/search":"Magento_CatalogSearch::search","config\/acl\/resources\/admin\/system\/config\/catalog":"Magento_Catalog::config_catalog","config\/acl\/resources\/admin\/catalog":"Magento_Catalog::catalog","config\/acl\/resources\/admin\/catalog\/attributes":"Magento_Catalog::catalog_attributes","config\/acl\/resources\/admin\/catalog\/attributes\/attributes":"Magento_Catalog::attributes_attributes","config\/acl\/resources\/admin\/catalog\/attributes\/sets":"Magento_Catalog::sets","config\/acl\/resources\/admin\/catalog\/categories":"Magento_Catalog::categories","config\/acl\/resources\/admin\/catalog\/products":"Magento_Catalog::products","config\/acl\/resources\/admin\/catalog\/update_attributes":"Magento_Catalog::update_attributes","config\/acl\/resources\/admin\/catalog\/urlrewrite":"Magento_Catalog::urlrewrite","config\/acl\/resources\/admin\/sales\/checkoutagreement":"Magento_Checkout::checkoutagreement","config\/acl\/resources\/admin\/system\/config\/checkout":"Magento_Checkout::checkout","config\/acl\/resources\/admin\/cms":"Magento_Cms::cms","config\/acl\/resources\/admin\/cms\/block":"Magento_Cms::block","config\/acl\/resources\/admin\/cms\/page":"Magento_Cms::page","config\/acl\/resources\/admin\/cms\/page\/save":"Magento_Cms::save","config\/acl\/resources\/admin\/cms\/page\/delete":"Magento_Cms::page_delete","config\/acl\/resources\/admin\/cms\/media_gallery":"Magento_Cms::media_gallery","config\/acl\/resources\/admin\/system\/config\/cms":"Magento_Cms::config_cms","config\/acl\/resources\/admin\/system\/config\/contacts":"Magento_Contacts::contacts","config\/acl\/resources\/admin\/system\/currency\/rates":"Magento_CurrencySymbol::currency_rates","config\/acl\/resources\/admin\/system\/currency\/symbols":"Magento_CurrencySymbol::symbols","config\/acl\/resources\/admin\/customer":"Magento_Customer::customer","config\/acl\/resources\/admin\/customer\/group":"Magento_Customer::group","config\/acl\/resources\/admin\/customer\/manage":"Magento_Customer::manage","config\/acl\/resources\/admin\/customer\/online":"Magento_Customer::online","config\/acl\/resources\/admin\/system\/config\/customer":"Magento_Customer::config_customer","config\/acl\/resources\/admin\/system\/design\/editor":"Magento_DesignEditor::editor","config\/acl\/resources\/admin\/system\/config\/downloadable":"Magento_Downloadable::downloadable","config\/acl\/resources\/admin\/system\/config\/google":"Magento_GoogleCheckout::google","config\/acl\/resources\/admin\/catalog\/googleshopping":"Magento_GoogleShopping::googleshopping","config\/acl\/resources\/admin\/catalog\/googleshopping\/types":"Magento_GoogleShopping::types","config\/acl\/resources\/admin\/catalog\/googleshopping\/items":"Magento_GoogleShopping::items","config\/acl\/resources\/admin\/system\/convert\/import":"Magento_ImportExport::import","config\/acl\/resources\/admin\/system\/convert\/export":"Magento_ImportExport::export","config\/acl\/resources\/admin\/system\/index":"Magento_Index::index","config\/acl\/resources\/admin\/system\/config\/newsletter":"Magento_Newsletter::newsletter","config\/acl\/resources\/admin\/newsletter":"Magento_Newsletter::admin_newsletter","config\/acl\/resources\/admin\/newsletter\/problem":"Magento_Newsletter::problem","config\/acl\/resources\/admin\/newsletter\/queue":"Magento_Newsletter::queue","config\/acl\/resources\/admin\/newsletter\/subscriber":"Magento_Newsletter::subscriber","config\/acl\/resources\/admin\/newsletter\/template":"Magento_Newsletter::template","config\/acl\/resources\/admin\/system\/config\/oauth":"Magento_Oauth::oauth","config\/acl\/resources\/admin\/page_cache":"Magento_PageCache::page_cache","config\/acl\/resources\/admin\/system\/config\/payment":"Magento_Payment::payment","config\/acl\/resources\/admin\/system\/config\/payment_services":"Magento_Payment::payment_services","config\/acl\/resources\/admin\/system\/config\/paypal":"Magento_Paypal::paypal","config\/acl\/resources\/admin\/report\/salesroot\/paypal_settlement_reports":"Magento_Paypal::paypal_settlement_reports","config\/acl\/resources\/admin\/report\/salesroot\/paypal_settlement_reports\/view":"Magento_Paypal::paypal_settlement_reports_view","config\/acl\/resources\/admin\/report\/salesroot\/paypal_settlement_reports\/fetch":"Magento_Paypal::fetch","config\/acl\/resources\/admin\/system\/config\/persistent":"Magento_Persistent::persistent","config\/acl\/resources\/admin\/cms\/poll":"Magento_Poll::poll","config\/acl\/resources\/admin\/catalog\/reviews_ratings\/ratings":"Magento_Rating::ratings","config\/acl\/resources\/admin\/report":"Magento_Reports::report","config\/acl\/resources\/admin\/report\/salesroot":"Magento_Reports::salesroot","config\/acl\/resources\/admin\/report\/salesroot\/sales":"Magento_Reports::salesroot_sales","config\/acl\/resources\/admin\/report\/salesroot\/tax":"Magento_Reports::tax","config\/acl\/resources\/admin\/report\/salesroot\/shipping":"Magento_Reports::shipping","config\/acl\/resources\/admin\/report\/salesroot\/invoiced":"Magento_Reports::invoiced","config\/acl\/resources\/admin\/report\/salesroot\/refunded":"Magento_Reports::refunded","config\/acl\/resources\/admin\/report\/salesroot\/coupons":"Magento_Reports::coupons","config\/acl\/resources\/admin\/report\/shopcart":"Magento_Reports::shopcart","config\/acl\/resources\/admin\/report\/shopcart\/product":"Magento_Reports::product","config\/acl\/resources\/admin\/report\/shopcart\/abandoned":"Magento_Reports::abandoned","config\/acl\/resources\/admin\/report\/products":"Magento_Reports::report_products","config\/acl\/resources\/admin\/report\/products\/bestsellers":"Magento_Reports::bestsellers","config\/acl\/resources\/admin\/report\/products\/sold":"Magento_Reports::sold","config\/acl\/resources\/admin\/report\/products\/viewed":"Magento_Reports::viewed","config\/acl\/resources\/admin\/report\/products\/lowstock":"Magento_Reports::lowstock","config\/acl\/resources\/admin\/report\/products\/downloads":"Magento_Reports::downloads","config\/acl\/resources\/admin\/report\/customers":"Magento_Reports::customers","config\/acl\/resources\/admin\/report\/customers\/accounts":"Magento_Reports::accounts","config\/acl\/resources\/admin\/report\/customers\/totals":"Magento_Reports::totals","config\/acl\/resources\/admin\/report\/customers\/orders":"Magento_Reports::customers_orders","config\/acl\/resources\/admin\/report\/review":"Magento_Reports::review","config\/acl\/resources\/admin\/report\/review\/customer":"Magento_Reports::review_customer","config\/acl\/resources\/admin\/report\/review\/product":"Magento_Reports::review_product","config\/acl\/resources\/admin\/report\/tags":"Magento_Reports::tags","config\/acl\/resources\/admin\/report\/tags\/customer":"Magento_Reports::tags_customer","config\/acl\/resources\/admin\/report\/tags\/popular":"Magento_Reports::popular","config\/acl\/resources\/admin\/report\/tags\/product":"Magento_Reports::tags_product","config\/acl\/resources\/admin\/report\/search":"Magento_Reports::report_search","config\/acl\/resources\/admin\/report\/statistics":"Magento_Reports::statistics","config\/acl\/resources\/admin\/system\/config\/reports":"Magento_Reports::reports","config\/acl\/resources\/admin\/catalog\/reviews_ratings":"Magento_Review::reviews_ratings","config\/acl\/resources\/admin\/catalog\/reviews_ratings\/reviews":"Magento_Review::reviews","config\/acl\/resources\/admin\/catalog\/reviews_ratings\/reviews\/all":"Magento_Review::reviews_all","config\/acl\/resources\/admin\/catalog\/reviews_ratings\/reviews\/pending":"Magento_Review::pending","config\/acl\/resources\/admin\/system\/config\/rss":"Magento_Rss::rss","config\/acl\/resources\/admin\/promo\/quote":"Magento_SalesRule::quote","config\/acl\/resources\/admin\/sales":"Magento_Sales::sales","config\/acl\/resources\/admin\/sales\/order":"Magento_Sales::sales_order","config\/acl\/resources\/admin\/sales\/order\/actions":"Magento_Sales::actions","config\/acl\/resources\/admin\/sales\/order\/actions\/create":"Magento_Sales::create","config\/acl\/resources\/admin\/sales\/order\/actions\/view":"Magento_Sales::actions_view","config\/acl\/resources\/admin\/sales\/order\/actions\/email":"Magento_Sales::email","config\/acl\/resources\/admin\/sales\/order\/actions\/reorder":"Magento_Sales::reorder","config\/acl\/resources\/admin\/sales\/order\/actions\/edit":"Magento_Sales::actions_edit","config\/acl\/resources\/admin\/sales\/order\/actions\/cancel":"Magento_Sales::cancel","config\/acl\/resources\/admin\/sales\/order\/actions\/review_payment":"Magento_Sales::review_payment","config\/acl\/resources\/admin\/sales\/order\/actions\/capture":"Magento_Sales::capture","config\/acl\/resources\/admin\/sales\/order\/actions\/invoice":"Magento_Sales::invoice","config\/acl\/resources\/admin\/sales\/order\/actions\/creditmemo":"Magento_Sales::creditmemo","config\/acl\/resources\/admin\/sales\/order\/actions\/hold":"Magento_Sales::hold","config\/acl\/resources\/admin\/sales\/order\/actions\/unhold":"Magento_Sales::unhold","config\/acl\/resources\/admin\/sales\/order\/actions\/ship":"Magento_Sales::ship","config\/acl\/resources\/admin\/sales\/order\/actions\/comment":"Magento_Sales::comment","config\/acl\/resources\/admin\/sales\/order\/actions\/emails":"Magento_Sales::emails","config\/acl\/resources\/admin\/sales\/invoice":"Magento_Sales::sales_invoice","config\/acl\/resources\/admin\/sales\/shipment":"Magento_Sales::shipment","config\/acl\/resources\/admin\/sales\/creditmemo":"Magento_Sales::sales_creditmemo","config\/acl\/resources\/admin\/sales\/transactions":"Magento_Sales::transactions","config\/acl\/resources\/admin\/sales\/transactions\/fetch":"Magento_Sales::transactions_fetch","config\/acl\/resources\/admin\/sales\/recurring_profile":"Magento_Sales::recurring_profile","config\/acl\/resources\/admin\/sales\/billing_agreement":"Magento_Sales::billing_agreement","config\/acl\/resources\/admin\/sales\/billing_agreement\/actions":"Magento_Sales::billing_agreement_actions","config\/acl\/resources\/admin\/sales\/billing_agreement\/actions\/view":"Magento_Sales::billing_agreement_actions_view","config\/acl\/resources\/admin\/sales\/billing_agreement\/actions\/manage":"Magento_Sales::actions_manage","config\/acl\/resources\/admin\/sales\/billing_agreement\/actions\/use":"Magento_Sales::use","config\/acl\/resources\/admin\/system\/order_statuses":"Magento_Sales::order_statuses","config\/acl\/resources\/admin\/system\/config\/sales":"Magento_Sales::config_sales","config\/acl\/resources\/admin\/system\/config\/sales_email":"Magento_Sales::sales_email","config\/acl\/resources\/admin\/system\/config\/sales_pdf":"Magento_Sales::sales_pdf","config\/acl\/resources\/admin\/system\/config\/shipping":"Magento_Shipping::config_shipping","config\/acl\/resources\/admin\/system\/config\/carriers":"Magento_Shipping::carriers","config\/acl\/resources\/admin\/catalog\/sitemap":"Magento_Sitemap::sitemap","config\/acl\/resources\/admin\/system\/config\/sitemap":"Magento_Sitemap::config_sitemap","config\/acl\/resources\/admin\/sales\/tax":"Magento_Tax::sales_tax","config\/acl\/resources\/admin\/sales\/tax\/classes_customer":"Magento_Tax::classes_customer","config\/acl\/resources\/admin\/sales\/tax\/classes_product":"Magento_Tax::classes_product","config\/acl\/resources\/admin\/sales\/tax\/import_export":"Magento_Tax::import_export","config\/acl\/resources\/admin\/sales\/tax\/rates":"Magento_Tax::tax_rates","config\/acl\/resources\/admin\/sales\/tax\/rules":"Magento_Tax::rules","config\/acl\/resources\/admin\/system\/config\/tax":"Magento_Tax::config_tax","config\/acl\/resources\/admin\/system\/acl":"Magento_User::acl","config\/acl\/resources\/admin\/system\/acl\/roles":"Magento_User::acl_roles","config\/acl\/resources\/admin\/system\/acl\/users":"Magento_User::acl_users","config\/acl\/resources\/admin\/cms\/widget_instance":"Magento_Widget::widget_instance","config\/acl\/resources\/admin\/system\/config\/wishlist":"Magento_Wishlist::config_wishlist"} diff --git a/dev/tools/Magento/Tools/Migration/Acl/log/MenuIdToAclId.log b/dev/tools/Magento/Tools/Migration/Acl/log/MenuIdToAclId.log index eae707e3a7624cb99687ad2d3cf93d0ed8342a09..fa5d0b606e17477755d71867c0a21199b841f4b3 100644 --- a/dev/tools/Magento/Tools/Migration/Acl/log/MenuIdToAclId.log +++ b/dev/tools/Magento/Tools/Migration/Acl/log/MenuIdToAclId.log @@ -1 +1 @@ -{"Magento_Banner::cms_magento_banner":"Magento_Banner::magento_banner","Magento_CatalogEvent::catalog_magento_catalogevent":"Magento_Catalog::categories","Magento_CatalogEvent::catalog_magento_catalogevent_events":"Magento_CatalogEvent::events","Magento_VersionsCms::cms_enterprise_page":"Magento_Cms::page","Magento_VersionsCms::cms_enterprise_page_page":"Magento_Cms::page","Magento_VersionsCms::cms_enterprise_page_hierarchy":"Magento_VersionsCms::hierarchy","Magento_CustomerSegment::customer_customersegment":"Magento_CustomerSegment::customersegment","Magento_CustomerSegment::report_customers_segment":"Magento_CustomerSegment::segment","Magento_CustomerCustomAttributes::customer_attributes":"Magento_CustomerCustomAttributes::attributes","Magento_CustomerCustomAttributes::customer_attributes_customer_attributes":"Magento_CustomerCustomAttributes::customer_attributes","Magento_CustomerCustomAttributes::customer_attributes_customer_address_attributes":"Magento_CustomerCustomAttributes::customer_address_attributes","Magento_GiftCardAccount::customer_giftcardaccount":"Magento_GiftCardAccount::customer_giftcardaccount","Magento_GiftRegistry::customer_magento_giftregistry":"Magento_GiftRegistry::customer_magento_giftregistry","Magento_GiftWrapping::sales_magento_giftwrapping":"Magento_GiftWrapping::magento_giftwrapping","Magento_ScheduledImportExport::system_convert_enterprise_scheduled_operation":"Magento_ScheduledImportExport::enterprise_scheduled_operation","Magento_Invitation::customer_magento_invitation":"Magento_Invitation::magento_invitation","Magento_Invitation::report_magento_invitation":"Magento_Invitation::report_magento_invitation","Magento_Invitation::report_magento_invitation_general":"Magento_Invitation::report_magento_invitation","Magento_Invitation::report_magento_invitation_customer":"Magento_Invitation::report_magento_invitation","Magento_Invitation::report_magento_invitation_order":"Magento_Invitation::report_magento_invitation","Magento_Logging::system_magento_logging":"Magento_Logging::magento_logging","Magento_Logging::system_magento_logging_events":"Magento_Logging::magento_logging_events","Magento_Logging::system_magento_logging_backups":"Magento_Logging::backups","Magento_Pci::system_crypt_key":"Magento_Pci::crypt_key","Magento_Pci::system_acl_locks":"Magento_Pci::locks","Magento_Reminder::promo_reminder":"Magento_Reminder::magento_reminder","Magento_Reward::customer_reward":"Magento_Reward::rates","Magento_Rma::sales_magento_rma":"Magento_Rma::magento_rma","Magento_Rma::sales_magento_rma_rma":"Magento_Rma::magento_rma","Magento_Rma::sales_magento_rma_rma_item_attribute":"Magento_Rma::magento_rma","Magento_SalesArchive::sales_archive":"Magento_SalesArchive::archive","Magento_SalesArchive::sales_archive_orders":"Magento_SalesArchive::orders","Magento_SalesArchive::sales_archive_invoices":"Magento_SalesArchive::invoices","Magento_SalesArchive::sales_archive_shipments":"Magento_SalesArchive::shipments","Magento_SalesArchive::sales_archive_creditmemos":"Magento_SalesArchive::creditmemos","Magento_TargetRule::catalog_targetrule":"Magento_TargetRule::targetrule","Magento_MultipleWishlist::report_customers_wishlist":"Magento_MultipleWishlist::wishlist","Magento_AdminNotification::system_adminnotification":"Magento_AdminNotification::adminnotification","Magento_Adminhtml::dashboard":"Magento_Adminhtml::dashboard","Magento_Adminhtml::system":"Magento_Adminhtml::system","Magento_Adminhtml::system_myaccount":"Magento_Adminhtml::myaccount","Magento_Adminhtml::system_tools":"Magento_Adminhtml::tools","Magento_Adminhtml::system_design":"Magento_Adminhtml::design","Magento_Adminhtml::system_design_schedule":"Magento_Adminhtml::schedule","Magento_Adminhtml::system_currency":"Magento_CurrencySymbol::system_currency","Magento_Adminhtml::system_email_template":"Magento_Adminhtml::email_template","Magento_Adminhtml::system_variable":"Magento_Adminhtml::variable","Magento_Adminhtml::system_cache":"Magento_Adminhtml::cache","Magento_Adminhtml::system_store":"Magento_Adminhtml::store","Magento_Adminhtml::system_config":"Magento_Adminhtml::config","Magento_Backup::system_tools_backup":"Magento_Backup::backup","Magento_CatalogRule::promo":"Magento_CatalogRule::promo","Magento_CatalogRule::promo_catalog":"Magento_CatalogRule::promo_catalog","Magento_CatalogSearch::catalog_search":"Magento_CatalogSearch::search","Magento_Catalog::catalog":"Magento_Catalog::catalog","Magento_Catalog::catalog_products":"Magento_Catalog::products","Magento_Catalog::catalog_categories":"Magento_Catalog::categories","Magento_Catalog::catalog_attributes":"Magento_Catalog::catalog_attributes","Magento_Catalog::catalog_attributes_attributes":"Magento_Catalog::attributes_attributes","Magento_Catalog::catalog_attributes_sets":"Magento_Catalog::sets","Magento_Catalog::catalog_urlrewrite":"Magento_Catalog::urlrewrite","Magento_Checkout::sales_checkoutagreement":"Magento_Checkout::checkoutagreement","Magento_Cms::cms":"Magento_Cms::cms","Magento_Cms::cms_page":"Magento_Cms::page","Magento_Cms::cms_block":"Magento_Cms::block","Magento_Connect::system_extensions":"Magento_Adminhtml::extensions","Magento_Connect::system_extensions_local":"Magento_Adminhtml::local","Magento_Connect::system_extensions_custom":"Magento_Adminhtml::custom","Magento_CurrencySymbol::system_currency_rates":"Magento_CurrencySymbol::currency_rates","Magento_CurrencySymbol::system_currency_symbols":"Magento_CurrencySymbol::symbols","Magento_Customer::customer":"Magento_Customer::customer","Magento_Customer::customer_manage":"Magento_Customer::manage","Magento_Customer::customer_group":"Magento_Customer::group","Magento_Customer::customer_online":"Magento_Customer::online","Magento_DesignEditor::system_design_editor":"Magento_DesignEditor::editor","Magento_Downloadable::report_products_downloads":"Magento_Reports::downloads","Magento_GoogleShopping::catalog_googleshopping":"Magento_GoogleShopping::googleshopping","Magento_GoogleShopping::catalog_googleshopping_types":"Magento_GoogleShopping::types","Magento_GoogleShopping::catalog_googleshopping_items":"Magento_GoogleShopping::items","Magento_ImportExport::system_convert_import":"Magento_ImportExport::import","Magento_ImportExport::system_convert_export":"Magento_ImportExport::export","Magento_Index::system_index":"Magento_Index::index","Magento_Newsletter::newsletter":"Magento_Newsletter::admin_newsletter","Magento_Newsletter::newsletter_template":"Magento_Newsletter::template","Magento_Newsletter::newsletter_queue":"Magento_Newsletter::queue","Magento_Newsletter::newsletter_subscriber":"Magento_Newsletter::subscriber","Magento_Newsletter::newsletter_problem":"Magento_Newsletter::problem","Magento_Paypal::report_salesroot_paypal_settlement_reports":"Magento_Paypal::paypal_settlement_reports","Magento_Poll::cms_poll":"Magento_Poll::poll","Magento_Reports::report":"Magento_Reports::report","Magento_Reports::report_salesroot":"Magento_Reports::salesroot","Magento_Reports::report_salesroot_sales":"Magento_Reports::salesroot_sales","Magento_Reports::report_salesroot_tax":"Magento_Reports::tax","Magento_Reports::report_salesroot_invoiced":"Magento_Reports::invoiced","Magento_Reports::report_salesroot_shipping":"Magento_Reports::shipping","Magento_Reports::report_salesroot_refunded":"Magento_Reports::refunded","Magento_Reports::report_salesroot_coupons":"Magento_Reports::coupons","Magento_Reports::report_shopcart":"Magento_Reports::shopcart","Magento_Reports::report_shopcart_product":"Magento_Reports::product","Magento_Reports::report_shopcart_abandoned":"Magento_Reports::abandoned","Magento_Reports::report_products":"Magento_Reports::report_products","Magento_Reports::report_products_bestsellers":"Magento_Reports::bestsellers","Magento_Reports::report_products_sold":"Magento_Reports::sold","Magento_Reports::report_products_viewed":"Magento_Reports::viewed","Magento_Reports::report_products_lowstock":"Magento_Reports::lowstock","Magento_Reports::report_customers":"Magento_Reports::customers","Magento_Reports::report_customers_accounts":"Magento_Reports::accounts","Magento_Reports::report_customers_totals":"Magento_Reports::totals","Magento_Reports::report_customers_orders":"Magento_Reports::customers_orders","Magento_Reports::report_search":"Magento_Reports::report_search","Magento_Reports::report_statistics":"Magento_Reports::statistics","Magento_Review::catalog_reviews_ratings":"Magento_Review::reviews_ratings","Magento_Review::catalog_reviews_ratings_reviews":"Magento_Review::reviews","Magento_Review::catalog_reviews_ratings_ratings":"Magento_Rating::ratings","Magento_Review::catalog_reviews_ratings_reviews_pending":"Magento_Review::pending","Magento_Review::catalog_reviews_ratings_reviews_all":"Magento_Review::reviews_all","Magento_Review::report_review":"Magento_Reports::review","Magento_Review::report_review_customer":"Magento_Reports::review_customer","Magento_Review::report_review_product":"Magento_Reports::review_product","Magento_SalesRule::promo_quote":"Magento_SalesRule::quote","Magento_Sales::sales":"Magento_Sales::sales","Magento_Sales::sales_order":"Magento_Sales::sales_order","Magento_Sales::sales_invoice":"Magento_Sales::sales_invoice","Magento_Sales::sales_shipment":"Magento_Sales::shipment","Magento_Sales::sales_creditmemo":"Magento_Sales::sales_creditmemo","Magento_Sales::sales_transactions":"Magento_Sales::transactions","Magento_Sales::sales_recurring_profile":"Magento_Sales::recurring_profile","Magento_Sales::sales_billing_agreement":"Magento_Sales::billing_agreement","Magento_Sales::system_order_statuses":"Magento_Sales::order_statuses","Magento_Sitemap::catalog_sitemap":"Magento_Sitemap::sitemap","Magento_Tax::sales_tax":"Magento_Tax::sales_tax","Magento_Tax::sales_tax_rules":"Magento_Tax::rules","Magento_Tax::sales_tax_rates":"Magento_Tax::tax_rates","Magento_Tax::sales_tax_import_export":"Magento_Tax::import_export","Magento_Tax::sales_tax_classes_customer":"Magento_Tax::classes_customer","Magento_Tax::sales_tax_classes_product":"Magento_Tax::classes_product","Magento_User::system_acl":"Magento_User::acl","Magento_User::system_acl_users":"Magento_User::acl_users","Magento_User::system_acl_roles":"Magento_User::acl_roles","Magento_Widget::cms_widget_instance":"Magento_Widget::widget_instance"} +{"Magento_Banner::cms_magento_banner":"Magento_Banner::magento_banner","Magento_CatalogEvent::catalog_magento_catalogevent":"Magento_Catalog::categories","Magento_CatalogEvent::catalog_magento_catalogevent_events":"Magento_CatalogEvent::events","Magento_VersionsCms::cms_enterprise_page":"Magento_Cms::page","Magento_VersionsCms::cms_enterprise_page_page":"Magento_Cms::page","Magento_VersionsCms::cms_enterprise_page_hierarchy":"Magento_VersionsCms::hierarchy","Magento_CustomerSegment::customer_customersegment":"Magento_CustomerSegment::customersegment","Magento_CustomerSegment::report_customers_segment":"Magento_CustomerSegment::segment","Magento_CustomerCustomAttributes::customer_attributes":"Magento_CustomerCustomAttributes::attributes","Magento_CustomerCustomAttributes::customer_attributes_customer_attributes":"Magento_CustomerCustomAttributes::customer_attributes","Magento_CustomerCustomAttributes::customer_attributes_customer_address_attributes":"Magento_CustomerCustomAttributes::customer_address_attributes","Magento_GiftCardAccount::customer_giftcardaccount":"Magento_GiftCardAccount::customer_giftcardaccount","Magento_GiftRegistry::customer_magento_giftregistry":"Magento_GiftRegistry::customer_magento_giftregistry","Magento_GiftWrapping::sales_magento_giftwrapping":"Magento_GiftWrapping::magento_giftwrapping","Magento_ScheduledImportExport::system_convert_enterprise_scheduled_operation":"Magento_ScheduledImportExport::enterprise_scheduled_operation","Magento_Invitation::customer_magento_invitation":"Magento_Invitation::magento_invitation","Magento_Invitation::report_magento_invitation":"Magento_Invitation::report_magento_invitation","Magento_Invitation::report_magento_invitation_general":"Magento_Invitation::report_magento_invitation","Magento_Invitation::report_magento_invitation_customer":"Magento_Invitation::report_magento_invitation","Magento_Invitation::report_magento_invitation_order":"Magento_Invitation::report_magento_invitation","Magento_Logging::system_magento_logging":"Magento_Logging::magento_logging","Magento_Logging::system_magento_logging_events":"Magento_Logging::magento_logging_events","Magento_Logging::system_magento_logging_backups":"Magento_Logging::backups","Magento_Pci::system_crypt_key":"Magento_Pci::crypt_key","Magento_Pci::system_acl_locks":"Magento_Pci::locks","Magento_Reminder::promo_reminder":"Magento_Reminder::magento_reminder","Magento_Reward::customer_reward":"Magento_Reward::rates","Magento_Rma::sales_magento_rma":"Magento_Rma::magento_rma","Magento_Rma::sales_magento_rma_rma":"Magento_Rma::magento_rma","Magento_Rma::sales_magento_rma_rma_item_attribute":"Magento_Rma::magento_rma","Magento_SalesArchive::sales_archive":"Magento_SalesArchive::archive","Magento_SalesArchive::sales_archive_orders":"Magento_SalesArchive::orders","Magento_SalesArchive::sales_archive_invoices":"Magento_SalesArchive::invoices","Magento_SalesArchive::sales_archive_shipments":"Magento_SalesArchive::shipments","Magento_SalesArchive::sales_archive_creditmemos":"Magento_SalesArchive::creditmemos","Magento_TargetRule::catalog_targetrule":"Magento_TargetRule::targetrule","Magento_MultipleWishlist::report_customers_wishlist":"Magento_MultipleWishlist::wishlist","Magento_AdminNotification::system_adminnotification":"Magento_AdminNotification::adminnotification","Magento_Adminhtml::dashboard":"Magento_Adminhtml::dashboard","Magento_Adminhtml::system":"Magento_Adminhtml::system","Magento_Adminhtml::system_myaccount":"Magento_Adminhtml::myaccount","Magento_Adminhtml::system_tools":"Magento_Adminhtml::tools","Magento_Adminhtml::system_design":"Magento_Adminhtml::design","Magento_Adminhtml::system_design_schedule":"Magento_Adminhtml::schedule","Magento_Adminhtml::system_currency":"Magento_CurrencySymbol::system_currency","Magento_Adminhtml::system_email_template":"Magento_Email::template","Magento_Adminhtml::system_variable":"Magento_Adminhtml::variable","Magento_Adminhtml::system_cache":"Magento_Adminhtml::cache","Magento_Adminhtml::system_store":"Magento_Adminhtml::store","Magento_Adminhtml::system_config":"Magento_Adminhtml::config","Magento_Backup::system_tools_backup":"Magento_Backup::backup","Magento_CatalogRule::promo":"Magento_CatalogRule::promo","Magento_CatalogRule::promo_catalog":"Magento_CatalogRule::promo_catalog","Magento_CatalogSearch::catalog_search":"Magento_CatalogSearch::search","Magento_Catalog::catalog":"Magento_Catalog::catalog","Magento_Catalog::catalog_products":"Magento_Catalog::products","Magento_Catalog::catalog_categories":"Magento_Catalog::categories","Magento_Catalog::catalog_attributes":"Magento_Catalog::catalog_attributes","Magento_Catalog::catalog_attributes_attributes":"Magento_Catalog::attributes_attributes","Magento_Catalog::catalog_attributes_sets":"Magento_Catalog::sets","Magento_Catalog::catalog_urlrewrite":"Magento_Catalog::urlrewrite","Magento_Checkout::sales_checkoutagreement":"Magento_Checkout::checkoutagreement","Magento_Cms::cms":"Magento_Cms::cms","Magento_Cms::cms_page":"Magento_Cms::page","Magento_Cms::cms_block":"Magento_Cms::block","Magento_Connect::system_extensions":"Magento_Adminhtml::extensions","Magento_Connect::system_extensions_local":"Magento_Adminhtml::local","Magento_Connect::system_extensions_custom":"Magento_Adminhtml::custom","Magento_CurrencySymbol::system_currency_rates":"Magento_CurrencySymbol::currency_rates","Magento_CurrencySymbol::system_currency_symbols":"Magento_CurrencySymbol::symbols","Magento_Customer::customer":"Magento_Customer::customer","Magento_Customer::customer_manage":"Magento_Customer::manage","Magento_Customer::customer_group":"Magento_Customer::group","Magento_Customer::customer_online":"Magento_Customer::online","Magento_DesignEditor::system_design_editor":"Magento_DesignEditor::editor","Magento_Downloadable::report_products_downloads":"Magento_Reports::downloads","Magento_GoogleShopping::catalog_googleshopping":"Magento_GoogleShopping::googleshopping","Magento_GoogleShopping::catalog_googleshopping_types":"Magento_GoogleShopping::types","Magento_GoogleShopping::catalog_googleshopping_items":"Magento_GoogleShopping::items","Magento_ImportExport::system_convert_import":"Magento_ImportExport::import","Magento_ImportExport::system_convert_export":"Magento_ImportExport::export","Magento_Index::system_index":"Magento_Index::index","Magento_Newsletter::newsletter":"Magento_Newsletter::admin_newsletter","Magento_Newsletter::newsletter_template":"Magento_Newsletter::template","Magento_Newsletter::newsletter_queue":"Magento_Newsletter::queue","Magento_Newsletter::newsletter_subscriber":"Magento_Newsletter::subscriber","Magento_Newsletter::newsletter_problem":"Magento_Newsletter::problem","Magento_Paypal::report_salesroot_paypal_settlement_reports":"Magento_Paypal::paypal_settlement_reports","Magento_Poll::cms_poll":"Magento_Poll::poll","Magento_Reports::report":"Magento_Reports::report","Magento_Reports::report_salesroot":"Magento_Reports::salesroot","Magento_Reports::report_salesroot_sales":"Magento_Reports::salesroot_sales","Magento_Reports::report_salesroot_tax":"Magento_Reports::tax","Magento_Reports::report_salesroot_invoiced":"Magento_Reports::invoiced","Magento_Reports::report_salesroot_shipping":"Magento_Reports::shipping","Magento_Reports::report_salesroot_refunded":"Magento_Reports::refunded","Magento_Reports::report_salesroot_coupons":"Magento_Reports::coupons","Magento_Reports::report_shopcart":"Magento_Reports::shopcart","Magento_Reports::report_shopcart_product":"Magento_Reports::product","Magento_Reports::report_shopcart_abandoned":"Magento_Reports::abandoned","Magento_Reports::report_products":"Magento_Reports::report_products","Magento_Reports::report_products_bestsellers":"Magento_Reports::bestsellers","Magento_Reports::report_products_sold":"Magento_Reports::sold","Magento_Reports::report_products_viewed":"Magento_Reports::viewed","Magento_Reports::report_products_lowstock":"Magento_Reports::lowstock","Magento_Reports::report_customers":"Magento_Reports::customers","Magento_Reports::report_customers_accounts":"Magento_Reports::accounts","Magento_Reports::report_customers_totals":"Magento_Reports::totals","Magento_Reports::report_customers_orders":"Magento_Reports::customers_orders","Magento_Reports::report_search":"Magento_Reports::report_search","Magento_Reports::report_statistics":"Magento_Reports::statistics","Magento_Review::catalog_reviews_ratings":"Magento_Review::reviews_ratings","Magento_Review::catalog_reviews_ratings_reviews":"Magento_Review::reviews","Magento_Review::catalog_reviews_ratings_ratings":"Magento_Rating::ratings","Magento_Review::catalog_reviews_ratings_reviews_pending":"Magento_Review::pending","Magento_Review::catalog_reviews_ratings_reviews_all":"Magento_Review::reviews_all","Magento_Review::report_review":"Magento_Reports::review","Magento_Review::report_review_customer":"Magento_Reports::review_customer","Magento_Review::report_review_product":"Magento_Reports::review_product","Magento_SalesRule::promo_quote":"Magento_SalesRule::quote","Magento_Sales::sales":"Magento_Sales::sales","Magento_Sales::sales_order":"Magento_Sales::sales_order","Magento_Sales::sales_invoice":"Magento_Sales::sales_invoice","Magento_Sales::sales_shipment":"Magento_Sales::shipment","Magento_Sales::sales_creditmemo":"Magento_Sales::sales_creditmemo","Magento_Sales::sales_transactions":"Magento_Sales::transactions","Magento_Sales::sales_recurring_profile":"Magento_Sales::recurring_profile","Magento_Sales::sales_billing_agreement":"Magento_Sales::billing_agreement","Magento_Sales::system_order_statuses":"Magento_Sales::order_statuses","Magento_Sitemap::catalog_sitemap":"Magento_Sitemap::sitemap","Magento_Tax::sales_tax":"Magento_Tax::sales_tax","Magento_Tax::sales_tax_rules":"Magento_Tax::rules","Magento_Tax::sales_tax_rates":"Magento_Tax::tax_rates","Magento_Tax::sales_tax_import_export":"Magento_Tax::import_export","Magento_Tax::sales_tax_classes_customer":"Magento_Tax::classes_customer","Magento_Tax::sales_tax_classes_product":"Magento_Tax::classes_product","Magento_User::system_acl":"Magento_User::acl","Magento_User::system_acl_users":"Magento_User::acl_users","Magento_User::system_acl_roles":"Magento_User::acl_roles","Magento_Widget::cms_widget_instance":"Magento_Widget::widget_instance"} diff --git a/lib/Magento/App/Action/AbstractAction.php b/lib/Magento/App/Action/AbstractAction.php index 001ce4812acafd7f094fce1af8dfbc97f616b6ef..1c031251cc35c7d066a1b6ec2e45f9bc3e11d415 100644 --- a/lib/Magento/App/Action/AbstractAction.php +++ b/lib/Magento/App/Action/AbstractAction.php @@ -66,23 +66,6 @@ abstract class AbstractAction implements \Magento\App\ActionInterface */ public function getResponse() { - if (!$this->_response->getHeader('X-Frame-Options')) { - $this->_response->setHeader('X-Frame-Options', 'SAMEORIGIN'); - } return $this->_response; } - - /** - * Retrieve full bane of current action current controller and - * current module - * - * @param string $delimiter - * @return string - */ - public function getFullActionName($delimiter = '_') - { - return $this->getRequest()->getRequestedRouteName() . $delimiter . - $this->getRequest()->getRequestedControllerName() . $delimiter . - $this->getRequest()->getRequestedActionName(); - } } diff --git a/lib/Magento/App/Action/Action.php b/lib/Magento/App/Action/Action.php new file mode 100644 index 0000000000000000000000000000000000000000..223d3aed31f3748695eb899317cb32ab09cc98e8 --- /dev/null +++ b/lib/Magento/App/Action/Action.php @@ -0,0 +1,173 @@ +<?php +/** + * Default implementation of application action controller + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +namespace Magento\App\Action; + +use Magento\App\RequestInterface; + +class Action extends \Magento\App\Action\AbstractAction +{ + const FLAG_NO_DISPATCH = 'no-dispatch'; + const FLAG_NO_POST_DISPATCH = 'no-postDispatch'; + const FLAG_NO_DISPATCH_BLOCK_EVENT = 'no-beforeGenerateLayoutBlocksDispatch'; + + const PARAM_NAME_BASE64_URL = 'r64'; + const PARAM_NAME_URL_ENCODED = 'uenc'; + + /** + * @var \Magento\ObjectManager + */ + protected $_objectManager; + + /** + * Namespace for session. + * Should be defined for proper working session. + * + * @var string + */ + protected $_sessionNamespace; + + /** + * @var \Magento\Event\ManagerInterface + */ + protected $_eventManager; + + /** + * @var \Magento\App\ActionFlag + */ + protected $_actionFlag; + + /** + * @var \Magento\App\Response\RedirectInterface + */ + protected $_redirect; + + /** + * @var \Magento\App\ViewInterface + */ + protected $_view; + + /** + * @var \Magento\UrlInterface + */ + protected $_url; + + /** + * @param Context $context + */ + public function __construct(\Magento\App\Action\Context $context) + { + parent::__construct($context->getRequest(), $context->getResponse()); + $this->_objectManager = $context->getObjectManager(); + $this->_eventManager = $context->getEventManager(); + $this->_url = $context->getUrl(); + $this->_actionFlag = $context->getActionFlag(); + $this->_redirect = $context->getRedirect(); + $this->_view = $context->getView(); + } + + /** + * @param RequestInterface $request + * @return mixed + * @throws NotFoundException + */ + public function dispatch(RequestInterface $request) + { + $this->_request = $request; + $profilerKey = 'CONTROLLER_ACTION:' . $request->getFullActionName(); + $eventParameters = array('controller_action' => $this, 'request' => $request); + $this->_eventManager->dispatch('controller_action_predispatch', $eventParameters); + $this->_eventManager->dispatch('controller_action_predispatch_' . $request->getRouteName(), $eventParameters); + $this->_eventManager->dispatch( + 'controller_action_predispatch_' . $request->getFullActionName(), + $eventParameters + ); + \Magento\Profiler::start($profilerKey); + + if ($request->isDispatched() && !$this->_actionFlag->get('', self::FLAG_NO_DISPATCH)) { + \Magento\Profiler::start('action_body'); + $actionMethodName = $request->getActionName() . 'Action'; + $this->$actionMethodName(); + \Magento\Profiler::start('postdispatch'); + if (!$this->_actionFlag->get('', \Magento\App\Action\Action::FLAG_NO_POST_DISPATCH)) { + $this->_eventManager->dispatch( + 'controller_action_postdispatch_' . $request->getFullActionName(), + $eventParameters + ); + $this->_eventManager->dispatch( + 'controller_action_postdispatch_' . $request->getRouteName(), $eventParameters + ); + $this->_eventManager->dispatch('controller_action_postdispatch', $eventParameters); + } + \Magento\Profiler::stop('postdispatch'); + \Magento\Profiler::stop('action_body'); + } + \Magento\Profiler::stop($profilerKey); + } + + /** + * Throw control to different action (control and module if was specified). + * + * @param string $action + * @param string|null $controller + * @param string|null $module + * @param array|null $params + */ + protected function _forward($action, $controller = null, $module = null, array $params = null) + { + $request = $this->getRequest(); + + $request->initForward(); + + if (isset($params)) { + $request->setParams($params); + } + + if (isset($controller)) { + $request->setControllerName($controller); + + // Module should only be reset if controller has been specified + if (isset($module)) { + $request->setModuleName($module); + } + } + + $request->setActionName($action); + $request->setDispatched(false); + } + + /** + * Set redirect into response + * + * @param string $path + * @param array $arguments + * @return \Magento\App\ActionInterface + */ + protected function _redirect($path, $arguments = array()) + { + $this->_redirect->redirect($this->getResponse(), $path, $arguments); + return $this; + } +} diff --git a/app/code/Magento/Core/Controller/Varien/Action/Context.php b/lib/Magento/App/Action/Context.php similarity index 61% rename from app/code/Magento/Core/Controller/Varien/Action/Context.php rename to lib/Magento/App/Action/Context.php index 3243698fbf75de1c3f8eb6c2bbeae19ef4025983..4a5e065d01540d0767706d3a5472325d35c95167 100644 --- a/app/code/Magento/Core/Controller/Varien/Action/Context.php +++ b/lib/Magento/App/Action/Context.php @@ -18,12 +18,10 @@ * 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_Core * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Core\Controller\Varien\Action; +namespace Magento\App\Action; class Context implements \Magento\ObjectManager\ContextInterface { @@ -43,121 +41,121 @@ class Context implements \Magento\ObjectManager\ContextInterface protected $_objectManager; /** - * @var \Magento\App\FrontController + * @var \Magento\Event\ManagerInterface */ - protected $_frontController = null; + protected $_eventManager; /** - * @var \Magento\View\LayoutInterface + * @var \Magento\UrlInterface */ - protected $_layout; + protected $_url; /** - * @var \Magento\Event\ManagerInterface + * @var \Magento\App\Response\RedirectInterface */ - protected $_eventManager; + protected $_redirect; /** - * @var \Magento\Logger + * @var \Magento\App\ActionFlag */ - protected $_logger; + protected $_actionFlag; /** - * @var \Magento\HTTP\Authentication + * @var \Magento\App\ViewInterface */ - protected $authentication; + protected $_view; /** - * @param \Magento\Logger $logger * @param \Magento\App\RequestInterface $request * @param \Magento\App\ResponseInterface $response * @param \Magento\ObjectManager $objectManager - * @param \Magento\App\FrontController $frontController - * @param \Magento\View\LayoutInterface $layout * @param \Magento\Event\ManagerInterface $eventManager - * @param \Magento\HTTP\Authentication $authentication + * @param \Magento\UrlInterface $url + * @param \Magento\App\Response\RedirectInterface $redirect + * @param \Magento\App\ActionFlag $actionFlag + * @param \Magento\App\ViewInterface $view */ public function __construct( - \Magento\Logger $logger, \Magento\App\RequestInterface $request, \Magento\App\ResponseInterface $response, \Magento\ObjectManager $objectManager, - \Magento\App\FrontController $frontController, - \Magento\View\LayoutInterface $layout, \Magento\Event\ManagerInterface $eventManager, - \Magento\HTTP\Authentication $authentication + \Magento\UrlInterface $url, + \Magento\App\Response\RedirectInterface $redirect, + \Magento\App\ActionFlag $actionFlag, + \Magento\App\ViewInterface $view ) { - $this->_request = $request; - $this->_response = $response; - $this->_objectManager = $objectManager; - $this->_frontController = $frontController; - $this->_layout = $layout; - $this->_eventManager = $eventManager; - $this->_logger = $logger; - $this->authentication = $authentication; + $this->_request = $request; + $this->_response = $response; + $this->_objectManager = $objectManager; + $this->_eventManager = $eventManager; + $this->_url = $url; + $this->_redirect = $redirect; + $this->_actionFlag = $actionFlag; + $this->_view = $view; } /** - * @return \Magento\App\FrontController + * @return \Magento\App\ActionFlag */ - public function getFrontController() + public function getActionFlag() { - return $this->_frontController; + return $this->_actionFlag; } /** - * @return \Magento\View\LayoutInterface + * @return \Magento\Event\ManagerInterface */ - public function getLayout() + public function getEventManager() { - return $this->_layout; + return $this->_eventManager; } /** - * @return \Magento\ObjectManager + * @return \Magento\App\ViewInterface */ - public function getObjectManager() + public function getView() { - return $this->_objectManager; + return $this->_view; } /** - * @return \Magento\App\RequestInterface + * @return \Magento\ObjectManager */ - public function getRequest() + public function getObjectManager() { - return $this->_request; + return $this->_objectManager; } /** - * @return \Magento\App\ResponseInterface + * @return \Magento\App\Response\RedirectInterface */ - public function getResponse() + public function getRedirect() { - return $this->_response; + return $this->_redirect; } /** - * @return \Magento\Event\ManagerInterface + * @return \Magento\App\RequestInterface */ - public function getEventManager() + public function getRequest() { - return $this->_eventManager; + return $this->_request; } /** - * @return \Magento\Logger + * @return \Magento\App\ResponseInterface */ - public function getLogger() + public function getResponse() { - return $this->_logger; + return $this->_response; } /** - * @return \Magento\HTTP\Authentication + * @return \Magento\UrlInterface */ - public function getAuthentication() + public function getUrl() { - return $this->authentication; + return $this->_url; } } diff --git a/lib/Magento/App/Action/Exception.php b/lib/Magento/App/Action/Exception.php index d555c7b9126393f7eb3f16296a96512b24b54ac3..7e2a90d49fce3e0028e4f8a267ebfb8fe04620e6 100644 --- a/lib/Magento/App/Action/Exception.php +++ b/lib/Magento/App/Action/Exception.php @@ -1,6 +1,6 @@ <?php /** - * Controller exception that can fork different actions, cause forward or redirect + * Generic application action exception * * Magento * @@ -25,88 +25,6 @@ */ namespace Magento\App\Action; -/** - * @SuppressWarnings(PHPMD.LongVariable) - */ class Exception extends \Exception { - const RESULT_FORWARD = '_forward'; - const RESULT_REDIRECT = '_redirect'; - - protected $_resultCallback = null; - protected $_resultCallbackParams = array(); - protected $_defaultActionName = 'noroute'; - protected $_flags = array(); - - /** - * Prepare data for forwarding action - * - * @param string $actionName - * @param string $controllerName - * @param string $moduleName - * @param array $params - * @return \Magento\App\Action\Exception - */ - public function prepareForward( - $actionName = null, $controllerName = null, $moduleName = null, array $params = array() - ) { - $this->_resultCallback = self::RESULT_FORWARD; - if (null === $actionName) { - $actionName = $this->_defaultActionName; - } - $this->_resultCallbackParams = array($actionName, $controllerName, $moduleName, $params); - return $this; - } - - /** - * Prepare data for running a custom action - * - * @param string $actionName - * @return \Magento\App\Action\Exception - */ - public function prepareFork($actionName = null) - { - if (null === $actionName) { - $actionName = $this->_defaultActionName; - } - $this->_resultCallback = $actionName; - return $this; - } - - /** - * Prepare a flag data - * - * @param string $action - * @param string $flag - * @param bool $value - * @return \Magento\App\Action\Exception - */ - public function prepareFlag($action, $flag, $value) - { - $this->_flags[] = array($action, $flag, $value); - return $this; - } - - /** - * Return all set flags - * - * @return array - */ - public function getResultFlags() - { - return $this->_flags; - } - - /** - * Return results as callback for a controller - * - * @return array - */ - public function getResultCallback() - { - if (null === $this->_resultCallback) { - $this->prepareFork(); - } - return array($this->_resultCallback, $this->_resultCallbackParams); - } } diff --git a/lib/Magento/App/Action/Forward.php b/lib/Magento/App/Action/Forward.php index c4b871427645c94e6c5f5b958335013687f981fb..84e9961dedba350a38e7f7472bfabacc744b343a 100644 --- a/lib/Magento/App/Action/Forward.php +++ b/lib/Magento/App/Action/Forward.php @@ -25,16 +25,17 @@ */ namespace Magento\App\Action; +use Magento\App\RequestInterface; + class Forward extends AbstractAction { /** - * Dispatch controller action - * - * @param string $action action name + * @param RequestInterface $request + * @return mixed|void * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function dispatch($action) + public function dispatch(RequestInterface $request) { - $this->_request->setDispatched(false); + $request->setDispatched(false); } } diff --git a/lib/Magento/App/Action/NotFoundException.php b/lib/Magento/App/Action/NotFoundException.php new file mode 100644 index 0000000000000000000000000000000000000000..ba2cd8f001dce9e512889766518f5d35e0e94846 --- /dev/null +++ b/lib/Magento/App/Action/NotFoundException.php @@ -0,0 +1,32 @@ +<?php +/** + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\App\Action; + + +class NotFoundException extends \Exception +{ + +} \ No newline at end of file diff --git a/lib/Magento/App/Action/Redirect.php b/lib/Magento/App/Action/Redirect.php index 635b9e38f98716e941bb004e16536d1c413d2661..c62b2df69b3be1bc19755da706c6dffa637963ee 100644 --- a/lib/Magento/App/Action/Redirect.php +++ b/lib/Magento/App/Action/Redirect.php @@ -25,15 +25,16 @@ */ namespace Magento\App\Action; +use \Magento\App\RequestInterface; + class Redirect extends AbstractAction { /** - * Dispatch controller action - * - * @param string $action action name + * @param RequestInterface $request + * @return mixed|void * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function dispatch($action) + public function dispatch(RequestInterface $request) { } } diff --git a/dev/tests/integration/testsuite/Magento/Adminhtml/Controller/IndexTest.php b/lib/Magento/App/Action/Title.php similarity index 60% rename from dev/tests/integration/testsuite/Magento/Adminhtml/Controller/IndexTest.php rename to lib/Magento/App/Action/Title.php index b4896cd9466e399f648ebac511b42703ac3250ef..eeeee22ea274264860c67a8d790ca919965c7bcd 100644 --- a/dev/tests/integration/testsuite/Magento/Adminhtml/Controller/IndexTest.php +++ b/lib/Magento/App/Action/Title.php @@ -1,5 +1,6 @@ <?php /** + * * Magento * * NOTICE OF LICENSE @@ -18,30 +19,42 @@ * 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_Adminhtml - * @subpackage integration_tests * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\App\Action; -namespace Magento\Adminhtml\Controller; - -/** - * @magentoAppArea adminhtml - */ -class IndexTest extends \Magento\Backend\Utility\Controller +class Title { /** - * @covers \Magento\Adminhtml\Controller\Index::globalSearchAction + * Title parts to be rendered in the page head title + * + * @var array */ - public function testGlobalSearchAction() + protected $_titles = array(); + + /** + * @param string $text + * @param bool $prepend + * @return Title + */ + public function add($text, $prepend = false) { - $this->getRequest()->setParam('isAjax', 'true'); - $this->getRequest()->setPost('query', 'dummy'); - $this->dispatch('backend/admin/index/globalSearch'); + if ($prepend) { + array_unshift($this->_titles, $text); + } else { + $this->_titles[] = $text; + } + return $this; + } - $actual = $this->getResponse()->getBody(); - $this->assertEquals(array(), json_decode($actual)); + /** + * Get titles + * + * @return array + */ + public function get() + { + return $this->_titles; } } diff --git a/lib/Magento/App/ActionFactory.php b/lib/Magento/App/ActionFactory.php index ef56443fbe9c161291b8a4543547857bd7ba11ff..e13241421a7a7b98c16ddf06bdd447dd173f8dd5 100644 --- a/lib/Magento/App/ActionFactory.php +++ b/lib/Magento/App/ActionFactory.php @@ -47,7 +47,7 @@ class ActionFactory */ public function createController($controllerName, array $arguments = array()) { - $context = $this->_objectManager->create('Magento\Core\Controller\Varien\Action\Context', $arguments); + $context = $this->_objectManager->create('Magento\App\Action\Context', $arguments); $arguments['context'] = $context; return $this->_objectManager->create($controllerName, $arguments); } diff --git a/lib/Magento/App/ActionFlag.php b/lib/Magento/App/ActionFlag.php new file mode 100644 index 0000000000000000000000000000000000000000..3e10cb16fc27d8e83635009212e576ada82ae2b6 --- /dev/null +++ b/lib/Magento/App/ActionFlag.php @@ -0,0 +1,96 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\App; + +class ActionFlag +{ + /** + * @var RequestInterface + */ + protected $_request; + + /** + * @var array + */ + protected $_flags = array(); + + /** + * @param RequestInterface $request + */ + public function __construct(\Magento\App\RequestInterface $request) + { + $this->_request = $request; + } + + /** + * Setting flag value + * + * @param string $action + * @param string $flag + * @param string $value + */ + public function set($action, $flag, $value) + { + if ('' === $action) { + $action = $this->_request->getActionName(); + } + $this->_flags[$this->_getControllerKey()][$action][$flag] = $value; + } + + /** + * Retrieve flag value + * + * @param string $action + * @param string $flag + * @return bool + * + * @SuppressWarnings(PHPMD.BooleanGetMethodName) + */ + public function get($action, $flag = '') + { + if ('' === $action) { + $action = $this->_request->getActionName(); + } + if ('' === $flag) { + return isset($this->_flags[$this->_getControllerKey()]) + ? $this->_flags[$this->_getControllerKey()] + : array(); + } elseif (isset($this->_flags[$this->_getControllerKey()][$action][$flag])) { + return $this->_flags[$this->_getControllerKey()][$action][$flag]; + } else { + return false; + } + } + + /** + * Get controller key + * + * @return string + */ + protected function _getControllerKey() + { + return $this->_request->getRequestedRouteName() . '_' . $this->_request->getRequestedControllerName(); + } +} \ No newline at end of file diff --git a/lib/Magento/App/ActionInterface.php b/lib/Magento/App/ActionInterface.php index 2c3205128d426a2b34e1987fe4790f15e5c52793..f4d9356728277f6fdb9e7ec73730597e7ccbf2cf 100644 --- a/lib/Magento/App/ActionInterface.php +++ b/lib/Magento/App/ActionInterface.php @@ -28,11 +28,8 @@ namespace Magento\App; interface ActionInterface { /** - * Dispatch controller action - * - * @abstract - * @param string $action action name - * @return void + * @param RequestInterface $request + * @return mixed */ - public function dispatch($action); + public function dispatch(RequestInterface $request); } diff --git a/lib/Magento/App/EntryPoint/EntryPoint.php b/lib/Magento/App/EntryPoint/EntryPoint.php index 163829840eeeb9fa972d4ad8d6aafed24d9d2efa..9ad442fc72a2c7ca8ea5d641c6fb587d5b0f3dda 100644 --- a/lib/Magento/App/EntryPoint/EntryPoint.php +++ b/lib/Magento/App/EntryPoint/EntryPoint.php @@ -92,7 +92,7 @@ class EntryPoint implements EntryPointInterface if (!$this->_locator) { throw new \DomainException(); } - $this->_locator->get('Magento\Core\Model\Logger')->logException($exception); + $this->_locator->get('Magento\Logger')->logException($exception); } catch (\Exception $e) { $message .= "Could not write error message to log. Please use developer mode to see the message.\n"; } diff --git a/lib/Magento/App/FrontController.php b/lib/Magento/App/FrontController.php index bd2847d5f23febf3ba2dc808d98048c771eeb851..d2ad0effdafdbec4b8129e4c89cc694aec0bc27f 100644 --- a/lib/Magento/App/FrontController.php +++ b/lib/Magento/App/FrontController.php @@ -27,99 +27,50 @@ namespace Magento\App; class FrontController implements FrontControllerInterface { - /** - * @var array - */ - protected $_defaults = array(); - /** * @var \Magento\App\RouterInterface[] */ protected $_routerList; - /** - * @var \Magento\App\RequestInterface - */ - protected $_request; - /** * @var \Magento\App\ResponseInterface */ protected $_response; - /** - * @var ActionInterface - */ - protected $_action; - /** * @param \Magento\App\ResponseInterface $response * @param RouterList $routerList - * @param array $data - * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function __construct( - \Magento\App\ResponseInterface $response, - RouterList $routerList, - array $data = array() - ) { + public function __construct(ResponseInterface $response, RouterList $routerList) + { $this->_routerList = $routerList; $this->_response = $response; } /** - * Retrieve request object - * - * @return \Magento\App\RequestInterface - */ - public function getRequest() - { - return $this->_request; - } - - /** - * Retrieve response object - * - * @return \Magento\App\ResponseInterface - */ - public function getResponse() - { - return $this->_response; - } - - /** - * Seta application action + * Perform action and generate response * - * @param ActionInterface $action - */ - public function setAction(ActionInterface $action) - { - $this->_action = $action; - } - - /** - * @return ActionInterface - */ - public function getAction() - { - return $this->_action; - } - - /** * @param RequestInterface $request * @return ResponseInterface * @throws \LogicException */ public function dispatch(RequestInterface $request) { - $this->_request = $request; \Magento\Profiler::start('routers_match'); $routingCycleCounter = 0; while (!$request->isDispatched() && $routingCycleCounter++ < 100) { foreach ($this->_routerList as $router) { - $controllerInstance = $router->match($this->getRequest()); - if ($controllerInstance) { - $controllerInstance->dispatch($request->getActionName()); + try { + $actionInstance = $router->match($request); + if ($actionInstance) { + $request->setDispatched(true); + $actionInstance->dispatch($request); + break; + } + } catch (Action\NotFoundException $e) { + $request->initForward(); + $request->setActionName('noroute'); + $request->setDispatched(false); break; } } @@ -128,6 +79,6 @@ class FrontController implements FrontControllerInterface if ($routingCycleCounter > 100) { throw new \LogicException('Front controller reached 100 router match iterations'); } - return $this->getResponse(); + return $this->_response; } } diff --git a/lib/Magento/App/FrontController/Plugin/Clickjacking.php b/lib/Magento/App/FrontController/Plugin/Clickjacking.php new file mode 100644 index 0000000000000000000000000000000000000000..e429e5bc25f90f63f23d0c723cd73303faddb7f6 --- /dev/null +++ b/lib/Magento/App/FrontController/Plugin/Clickjacking.php @@ -0,0 +1,43 @@ +<?php +/** + * Clickjacking protection plugin + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +namespace Magento\App\FrontController\Plugin; + +class Clickjacking +{ + /** + * Process response + * + * @param \Magento\App\ResponseInterface $response + * @return \Magento\App\ResponseInterface + */ + public function afterDispatch(\Magento\App\ResponseInterface $response) + { + if (!$response->getHeader('X-Frame-Options')) { + $response->setHeader('X-Frame-Options', 'SAMEORIGIN'); + } + return $response; + } +} diff --git a/app/code/Magento/Core/Helper/AbstractHelper.php b/lib/Magento/App/Helper/AbstractHelper.php similarity index 79% rename from app/code/Magento/Core/Helper/AbstractHelper.php rename to lib/Magento/App/Helper/AbstractHelper.php index d4bf3321ff0aae73af1f74dce54fa68d6d69fe5e..bb85ac61301e5ecda077c5fe8edfdd9051f1662d 100644 --- a/app/code/Magento/Core/Helper/AbstractHelper.php +++ b/lib/Magento/App/Helper/AbstractHelper.php @@ -24,7 +24,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Core\Helper; +namespace Magento\App\Helper; /** * Abstract helper @@ -50,7 +50,7 @@ abstract class AbstractHelper /** * Translator model * - * @var \Magento\Core\Model\Translate + * @var \Magento\TranslateInterface */ protected $_translator; @@ -80,9 +80,21 @@ abstract class AbstractHelper protected $_httpHeader; /** - * @param \Magento\Core\Helper\Context $context + * Event manager + * + * @var \Magento\Event\ManagerInterface + */ + protected $_eventManager; + + /** + * @var \Magento\HTTP\PhpEnvironment\RemoteAddress */ - public function __construct(\Magento\Core\Helper\Context $context) + protected $_remoteAddress; + + /** + * @param \Magento\App\Helper\Context $context + */ + public function __construct(\Magento\App\Helper\Context $context) { $this->_translator = $context->getTranslator(); $this->_moduleManager = $context->getModuleManager(); @@ -91,6 +103,9 @@ abstract class AbstractHelper $this->_app = $context->getApp(); $this->_urlBuilder = $context->getUrlBuilder(); $this->_httpHeader = $context->getHttpHeader(); + $this->_eventManager = $context->getEventManager(); + $this->_remoteAddress = $context->getRemoteAddress(); + $this->_cacheConfig = $context->getCacheConfig(); } /** @@ -103,56 +118,6 @@ abstract class AbstractHelper return $this->_request; } - /** - * Loading cache data - * - * @param string $cacheId - * @return mixed - */ - protected function _loadCache($cacheId) - { - return $this->_app->loadCache($cacheId); - } - - /** - * Saving cache - * - * @param mixed $data - * @param string $cacheId - * @param array $tags - * @param bool $lifeTime - * @return \Magento\Core\Helper\AbstractHelper - */ - protected function _saveCache($data, $cacheId, $tags = array(), $lifeTime = false) - { - $this->_app->saveCache($data, $cacheId, $tags, $lifeTime); - return $this; - } - - /** - * Removing cache - * - * @param string $cacheId - * @return \Magento\Core\Helper\AbstractHelper - */ - protected function _removeCache($cacheId) - { - $this->_app->removeCache($cacheId); - return $this; - } - - /** - * Cleaning cache - * - * @param array $tags - * @return \Magento\Core\Helper\AbstractHelper - */ - protected function _cleanCache($tags=array()) - { - $this->_app->cleanCache($tags); - return $this; - } - /** * Retrieve helper module name * diff --git a/app/code/Magento/Core/Helper/Context.php b/lib/Magento/App/Helper/Context.php similarity index 94% rename from app/code/Magento/Core/Helper/Context.php rename to lib/Magento/App/Helper/Context.php index 2bf8893976392dac27c48ec6fa197c3cd13a2527..06d758c91ff8fb1f46aa625f7168b346f9a9f7e2 100644 --- a/app/code/Magento/Core/Helper/Context.php +++ b/lib/Magento/App/Helper/Context.php @@ -23,12 +23,12 @@ * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Core\Helper; +namespace Magento\App\Helper; class Context implements \Magento\ObjectManager\ContextInterface { /** - * @var \Magento\Core\Model\Translate + * @var \Magento\TranslateInterface */ protected $_translator; @@ -79,7 +79,7 @@ class Context implements \Magento\ObjectManager\ContextInterface /** * @param \Magento\Logger $logger - * @param \Magento\Core\Model\Translate $translator + * @param \Magento\TranslateInterface $translator * @param \Magento\Module\Manager $moduleManager * @param \Magento\App\RequestInterface $httpRequest * @param \Magento\Cache\ConfigInterface $cacheConfig @@ -88,10 +88,12 @@ class Context implements \Magento\ObjectManager\ContextInterface * @param \Magento\UrlInterface $urlBuilder * @param \Magento\HTTP\Header $httpHeader * @param \Magento\HTTP\PhpEnvironment\RemoteAddress $remoteAddress + * + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Logger $logger, - \Magento\Core\Model\Translate $translator, + \Magento\TranslateInterface $translator, \Magento\Module\Manager $moduleManager, \Magento\App\RequestInterface $httpRequest, \Magento\Cache\ConfigInterface $cacheConfig, @@ -114,7 +116,7 @@ class Context implements \Magento\ObjectManager\ContextInterface } /** - * @return \Magento\Core\Model\Translate + * @return \Magento\TranslateInterface */ public function getTranslator() { diff --git a/app/code/Magento/Core/Model/Factory/Helper.php b/lib/Magento/App/Helper/HelperFactory.php similarity index 88% rename from app/code/Magento/Core/Model/Factory/Helper.php rename to lib/Magento/App/Helper/HelperFactory.php index d8d98b7af590a650f968d8f62ca005bc0ac7a4b5..c78e8cd452c2381b46d844deb89baa6f80c5f135 100644 --- a/app/code/Magento/Core/Model/Factory/Helper.php +++ b/lib/Magento/App/Helper/HelperFactory.php @@ -18,8 +18,6 @@ * 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_Core * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -27,9 +25,9 @@ /** * Helper factory model. Used to get helper objects */ -namespace Magento\Core\Model\Factory; +namespace Magento\App\Helper; -class Helper +class HelperFactory { /** * @var \Magento\ObjectManager @@ -49,7 +47,7 @@ class Helper * * @param string $className * @param array $arguments - * @return \Magento\Core\Helper\AbstractHelper + * @return \Magento\App\Helper\AbstractHelper * @throws \LogicException */ public function get($className, array $arguments = array()) @@ -62,9 +60,9 @@ class Helper $helper = $this->_objectManager->get($className, $arguments); - if (false === ($helper instanceof \Magento\Core\Helper\AbstractHelper)) { + if (false === ($helper instanceof \Magento\App\Helper\AbstractHelper)) { throw new \LogicException( - $className . ' doesn\'t extends Magento\App\Helper' + $className . ' doesn\'t extends Magento\App\Helper\AbstractHelper' ); } diff --git a/lib/Magento/App/Http.php b/lib/Magento/App/Http.php index 14c3ec801ae284deb3fe6a01e29d18195f2550ae..62574c60d201c4c8aeddc281c86721331ccaa9f5 100644 --- a/lib/Magento/App/Http.php +++ b/lib/Magento/App/Http.php @@ -142,7 +142,8 @@ class Http implements \Magento\AppInterface require_once ($this->_dir->getDir(Dir::PUB) . DS . 'errors' . DS . 'report.php'); } } catch (\Exception $exception) { - header($_SERVER['SERVER_PROTOCOL'] . ' 500 Internal Server Error', true, 500); + $protocol = isset($_SERVER['SERVER_PROTOCOL']) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP 1.1'; + header($protocol . ' 500 Internal Server Error', true, 500); print "Unknown error happened."; } return -1; diff --git a/lib/Magento/App/ObjectManagerFactory.php b/lib/Magento/App/ObjectManagerFactory.php index 8ac370c8441bf38774dc9dbe7047e3119b54f560..f8173c767d5e55bdd525c5e76206df8665621bc2 100644 --- a/lib/Magento/App/ObjectManagerFactory.php +++ b/lib/Magento/App/ObjectManagerFactory.php @@ -134,14 +134,8 @@ class ObjectManagerFactory : null, )); - $pluginList = $locator->create('Magento\Interception\PluginList\PluginList', array( - 'relations' => $relations, - 'definitions' => $definitionFactory->createPluginDefinition(), - 'omConfig' => $diConfig, - 'classDefinitions' => $definitions instanceof \Magento\ObjectManager\Definition\Compiled - ? $definitions - : null, - )); + $pluginList = $this->_createPluginList($locator, $relations, $definitionFactory, $diConfig, $definitions); + $factory = $locator->create('Magento\Interception\FactoryDecorator', array( 'factory' => $factory, 'config' => $interceptionConfig, @@ -170,4 +164,31 @@ class ObjectManagerFactory } return $configData; } + + /** + * Crete plugin list object + * + * @param \Magento\ObjectManager $locator + * @param \Magento\ObjectManager\Relations $relations + * @param \Magento\ObjectManager\DefinitionFactory $definitionFactory + * @param \Magento\ObjectManager\Config\Config $diConfig + * @param \Magento\ObjectManager\Definition $definitions + * @return \Magento\Interception\PluginList\PluginList + */ + protected function _createPluginList( + \Magento\ObjectManager $locator, + \Magento\ObjectManager\Relations $relations, + \Magento\ObjectManager\DefinitionFactory $definitionFactory, + \Magento\ObjectManager\Config\Config $diConfig, + \Magento\ObjectManager\Definition $definitions + ) { + return $locator->create('Magento\Interception\PluginList\PluginList', array( + 'relations' => $relations, + 'definitions' => $definitionFactory->createPluginDefinition(), + 'omConfig' => $diConfig, + 'classDefinitions' => $definitions instanceof \Magento\ObjectManager\Definition\Compiled + ? $definitions + : null, + )); + } } \ No newline at end of file diff --git a/lib/Magento/App/Request/Http.php b/lib/Magento/App/Request/Http.php index 819b1bc4b2188a70e0ec91d5dac69ec97dd4eb42..59d99a944d7d7cdadd1a8f9a7f0fc8e5f258e789 100644 --- a/lib/Magento/App/Request/Http.php +++ b/lib/Magento/App/Request/Http.php @@ -78,15 +78,15 @@ class Http extends \Zend_Controller_Request_Http implements \Magento\App\Request /** * @param \Magento\App\Route\ConfigInterface $routeConfig + * @param \Magento\App\Request\PathInfoProcessorInterface $pathInfoProcessor * @param string $uri * @param array $directFrontNames - * @param PathInfoProcessorInterface $pathInfoProcessor */ public function __construct( \Magento\App\Route\ConfigInterface $routeConfig, + \Magento\App\Request\PathInfoProcessorInterface $pathInfoProcessor, $uri = null, - $directFrontNames = array(), - \Magento\App\Request\PathInfoProcessorInterface $pathInfoProcessor = null + $directFrontNames = array() ) { $this->_routeConfig = $routeConfig; $this->_directFrontNames = $directFrontNames; @@ -138,9 +138,7 @@ class Http extends \Zend_Controller_Request_Http implements \Magento\App\Request $pathInfo = $requestUri; } - if ($this->_pathInfoProcessor) { - $pathInfo = $this->_pathInfoProcessor->process($this, $pathInfo); - } + $pathInfo = $this->_pathInfoProcessor->process($this, $pathInfo); $this->_originalPathInfo = (string)$pathInfo; @@ -548,4 +546,17 @@ class Http extends \Zend_Controller_Request_Http implements \Magento\App\Request } return 'http://localhost/'; } + + /** + * Retrieve full action name + * + * @param string $delimiter + * @return mixed|string + */ + public function getFullActionName($delimiter = '_') + { + return $this->getRequestedRouteName() . $delimiter . + $this->getRequestedControllerName() . $delimiter . + $this->getRequestedActionName(); + } } diff --git a/lib/Magento/App/Response/Http/FileFactory.php b/lib/Magento/App/Response/Http/FileFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..a565e3c78c06dc8b7f3e4bcac517219198381a89 --- /dev/null +++ b/lib/Magento/App/Response/Http/FileFactory.php @@ -0,0 +1,116 @@ +<?php +/** + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\App\Response\Http; + +class FileFactory +{ + /** + * @var \Magento\App\ResponseFactory + */ + protected $_responseFactory; + + /** + * @var \Magento\Filesystem + */ + protected $_filesystem; + + /** + * @param \Magento\App\ResponseFactory $responseFactory + * @param \Magento\Filesystem $filesystem + */ + public function __construct(\Magento\App\ResponseFactory $responseFactory, \Magento\Filesystem $filesystem) + { + $this->_responseFactory = $responseFactory; + $this->_filesystem = $filesystem; + } + + /** + * Declare headers and content file in response for file download + * + * @param string $fileName + * @param string|array $content set to null to avoid starting output, $contentLength should be set explicitly in + * that case + * @param string $contentType + * @param int $contentLength explicit content length, if strlen($content) isn't applicable + * @throws \Exception + * @throws \InvalidArgumentException + * @return \Magento\App\ActionInterface + * + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExitExpression) + */ + public function create($fileName, $content, $contentType = 'application/octet-stream', $contentLength = null) + { + $filesystem = $this->_filesystem; + $isFile = false; + $file = null; + if (is_array($content)) { + if (!isset($content['type']) || !isset($content['value'])) { + throw new \InvalidArgumentException("Invalid arguments. Keys 'type' and 'value' are required."); + } + if ($content['type'] == 'filename') { + $isFile = true; + $file = $content['value']; + $contentLength = $filesystem->getFileSize($file); + } + } + + $response = $this->_responseFactory->create(); + $response->setHttpResponseCode(200) + ->setHeader('Pragma', 'public', true) + ->setHeader('Cache-Control', 'must-revalidate, post-check=0, pre-check=0', true) + ->setHeader('Content-type', $contentType, true) + ->setHeader('Content-Length', is_null($contentLength) ? strlen($content) : $contentLength, true) + ->setHeader('Content-Disposition', 'attachment; filename="'.$fileName.'"', true) + ->setHeader('Last-Modified', date('r'), true); + + if (!is_null($content)) { + if ($isFile) { + $response->clearBody(); + $response->sendHeaders(); + + if (!$filesystem->isFile($file)) { + throw new \Exception(__('File not found')); + } + $stream = $filesystem->createAndOpenStream($file, 'r'); + while ($buffer = $stream->read(1024)) { + print $buffer; + } + flush(); + $stream->close(); + if (!empty($content['rm'])) { + $filesystem->delete($file); + } + + exit(0); + } else { + $response->setBody($content); + } + } + return $response; + } +} \ No newline at end of file diff --git a/lib/Magento/App/Response/RedirectInterface.php b/lib/Magento/App/Response/RedirectInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..54313698079e489ae3c577777380a1eccce03177 --- /dev/null +++ b/lib/Magento/App/Response/RedirectInterface.php @@ -0,0 +1,73 @@ +<?php +/** + * Response redirect interface + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +namespace Magento\App\Response; + +interface RedirectInterface +{ + const PARAM_NAME_REFERER_URL = 'referer_url'; + const PARAM_NAME_ERROR_URL = 'error_url'; + const PARAM_NAME_SUCCESS_URL = 'success_url'; + + /** + * Identify referer url via all accepted methods (HTTP_REFERER, regular or base64-encoded request param) + * + * @return string + */ + public function getRefererUrl(); + + /** + * Set referer url for redirect in response + * + * @param string $defaultUrl + * @return string + */ + public function getRedirectUrl($defaultUrl = null); + + /** + * Redirect to error page + * + * @param string $defaultUrl + * @return string + */ + public function error($defaultUrl); + + /** + * Redirect to success page + * + * @param string $defaultUrl + * @return string + */ + public function success($defaultUrl); + + /** + * Set redirect into response + * + * @param \Magento\App\ResponseInterface $response + * @param string $path + * @param array $arguments + */ + public function redirect(\Magento\App\ResponseInterface $response, $path, $arguments = array()); +} diff --git a/lib/Magento/App/View.php b/lib/Magento/App/View.php new file mode 100644 index 0000000000000000000000000000000000000000..ee34303f2ea129e12381ea7206472d223370681a --- /dev/null +++ b/lib/Magento/App/View.php @@ -0,0 +1,302 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\App; + +class View implements ViewInterface +{ + /** + * @var \Magento\View\LayoutInterface + */ + protected $_layout; + + /** + * @var \Magento\Config\ScopeInterface + */ + protected $_configScope; + + /** + * @var \Magento\Event\ManagerInterface + */ + protected $_eventManager; + + /** + * @var \Magento\TranslateInterface + */ + protected $_translator; + + /** + * @var \Magento\App\ActionFlag + */ + protected $_actionFlag; + + /** + * @var \Magento\App\ResponseInterface + */ + protected $_response; + + /** + * @var \Magento\App\RequestInterface + */ + protected $_request; + + /** + * @var bool + */ + protected $_isLayoutLoaded = false; + + /** + * @param \Magento\View\LayoutInterface $layout + * @param \Magento\App\RequestInterface $request + * @param \Magento\App\ResponseInterface $response + * @param \Magento\Config\ScopeInterface $configScope + * @param \Magento\Event\ManagerInterface $eventManager + * @param \Magento\TranslateInterface $translator + * @param \Magento\App\ActionFlag $actionFlag + */ + public function __construct( + \Magento\View\LayoutInterface $layout, + \Magento\App\RequestInterface $request, + \Magento\App\ResponseInterface $response, + \Magento\Config\ScopeInterface $configScope, + \Magento\Event\ManagerInterface $eventManager, + \Magento\TranslateInterface $translator, + \Magento\App\ActionFlag $actionFlag + ) { + $this->_layout = $layout; + $this->_request = $request; + $this->_response = $response; + $this->_configScope = $configScope; + $this->_eventManager = $eventManager; + $this->_translator = $translator; + $this->_actionFlag = $actionFlag; + } + + /** + * Retrieve current layout object + * + * @return \Magento\View\LayoutInterface + */ + public function getLayout() + { + $this->_layout->setArea($this->_configScope->getCurrentScope()); + return $this->_layout; + } + + /** + * Load layout by handles(s) + * + * @param string|null|bool $handles + * @param bool $generateBlocks + * @param bool $generateXml + * @return $this + * @throws \RuntimeException + */ + public function loadLayout($handles = null, $generateBlocks = true, $generateXml = true) + { + if ($this->_isLayoutLoaded) { + throw new \RuntimeException('Layout must be loaded only once.'); + } + // if handles were specified in arguments load them first + if (false !== $handles && '' !== $handles) { + $this->getLayout()->getUpdate()->addHandle($handles ? $handles : 'default'); + } + + // add default layout handles for this action + $this->addActionLayoutHandles(); + + $this->loadLayoutUpdates(); + + if (!$generateXml) { + return $this; + } + $this->generateLayoutXml(); + + if (!$generateBlocks) { + return $this; + } + $this->generateLayoutBlocks(); + $this->_isLayoutLoaded = true; + + return $this; + } + + /** + * Retrieve the default layout handle name for the current action + * + * @return string + */ + public function getDefaultLayoutHandle() + { + return strtolower($this->_request->getFullActionName()); + } + + /** + * Add layout handle by full controller action name + * + * @return \Magento\App\ActionInterface + */ + public function addActionLayoutHandles() + { + if (!$this->addPageLayoutHandles()) { + $this->getLayout()->getUpdate()->addHandle($this->getDefaultLayoutHandle()); + } + return $this; + } + + /** + * Add layout updates handles associated with the action page + * + * @param array $parameters page parameters + * @return bool + */ + public function addPageLayoutHandles(array $parameters = array()) + { + $handle = $this->getDefaultLayoutHandle(); + $pageHandles = array($handle); + foreach ($parameters as $key => $value) { + $pageHandles[] = $handle . '_' . $key . '_' . $value; + } + // Do not sort array going into add page handles. Ensure default layout handle is added first. + return $this->getLayout()->getUpdate()->addPageHandles($pageHandles); + } + + /** + * Load layout updates + * + * @return \Magento\App\View + */ + public function loadLayoutUpdates() + { + \Magento\Profiler::start('LAYOUT'); + + // dispatch event for adding handles to layout update + $this->_eventManager->dispatch( + 'controller_action_layout_load_before', + array('full_action_name' => $this->_request->getFullActionName(), 'layout' => $this->getLayout()) + ); + + // load layout updates by specified handles + \Magento\Profiler::start('layout_load'); + $this->getLayout()->getUpdate()->load(); + \Magento\Profiler::stop('layout_load'); + + \Magento\Profiler::stop('LAYOUT'); + return $this; + } + + /** + * Generate layout xml + * + * @return \Magento\App\View + */ + public function generateLayoutXml() + { + \Magento\Profiler::start('LAYOUT'); + // generate xml from collected text updates + \Magento\Profiler::start('layout_generate_xml'); + $this->getLayout()->generateXml(); + \Magento\Profiler::stop('layout_generate_xml'); + + \Magento\Profiler::stop('LAYOUT'); + return $this; + } + + /** + * Generate layout blocks + * + * @return \Magento\App\View + */ + public function generateLayoutBlocks() + { + \Magento\Profiler::start('LAYOUT'); + + // dispatch event for adding xml layout elements + if (!$this->_actionFlag->get('', \Magento\App\Action\Action::FLAG_NO_DISPATCH_BLOCK_EVENT)) { + $this->_eventManager->dispatch( + 'controller_action_layout_generate_blocks_before', + array('full_action_name' => $this->_request->getFullActionName(), 'layout' => $this->getLayout()) + ); + } + + // generate blocks from xml layout + \Magento\Profiler::start('layout_generate_blocks'); + $this->getLayout()->generateElements(); + \Magento\Profiler::stop('layout_generate_blocks'); + + if (!$this->_actionFlag->get('', \Magento\App\Action\Action::FLAG_NO_DISPATCH_BLOCK_EVENT)) { + $this->_eventManager->dispatch( + 'controller_action_layout_generate_blocks_after', + array('full_action_name' => $this->_request->getFullActionName(), 'layout' => $this->getLayout()) + ); + } + + \Magento\Profiler::stop('LAYOUT'); + return $this; + } + + /** + * Rendering layout + * + * @param string $output + * @return \Magento\App\View + */ + public function renderLayout($output = '') + { + if ($this->_actionFlag->get('', 'no-renderLayout')) { + return $this; + } + + \Magento\Profiler::start('LAYOUT'); + + \Magento\Profiler::start('layout_render'); + + if ('' !== $output) { + $this->getLayout()->addOutputElement($output); + } + + $this->_eventManager->dispatch('controller_action_layout_render_before'); + $this->_eventManager->dispatch( + 'controller_action_layout_render_before_' . $this->_request->getFullActionName() + ); + + $output = $this->getLayout()->getOutput(); + $this->_translator->processResponseBody($output); + $this->_response->appendBody($output); + \Magento\Profiler::stop('layout_render'); + + \Magento\Profiler::stop('LAYOUT'); + return $this; + } + + /** + * Set isLayoutLoaded flag + * + * @param bool $value + */ + public function setIsLayoutLoaded($value) + { + $this->_isLayoutLoaded = $value; + } +} diff --git a/lib/Magento/App/ViewInterface.php b/lib/Magento/App/ViewInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..13e34c61c6292928f0a2ad837df402ac9f7dfe70 --- /dev/null +++ b/lib/Magento/App/ViewInterface.php @@ -0,0 +1,104 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +namespace Magento\App; + +interface ViewInterface +{ + /** + * Load layout updates + * + * @return ViewInterface + */ + public function loadLayoutUpdates(); + + /** + * Rendering layout + * + * @param string $output + * @return ViewInterface + */ + public function renderLayout($output = ''); + + /** + * Retrieve the default layout handle name for the current action + * + * @return string + */ + public function getDefaultLayoutHandle(); + + /** + * Load layout by handles(s) + * + * @param string|null|bool $handles + * @param bool $generateBlocks + * @param bool $generateXml + * @return ViewInterface + * @throws \RuntimeException + */ + public function loadLayout($handles = null, $generateBlocks = true, $generateXml = true); + + /** + * Generate layout xml + * + * @return ViewInterface + */ + public function generateLayoutXml(); + + /** + * Add layout updates handles associated with the action page + * + * @param array $parameters page parameters + * @return bool + */ + public function addPageLayoutHandles(array $parameters = array()); + + /** + * Generate layout blocks + * + * @return ViewInterface + */ + public function generateLayoutBlocks(); + + /** + * Retrieve current layout object + * + * @return \Magento\View\LayoutInterface + */ + public function getLayout(); + + /** + * Add layout handle by full controller action name + * + * @return ViewInterface + */ + public function addActionLayoutHandles(); + + /** + * Set isLayoutLoaded flag + * + * @param bool $value + */ + public function setIsLayoutLoaded($value); + +} \ No newline at end of file diff --git a/lib/Magento/Code/Reader/ArgumentsReader.php b/lib/Magento/Code/Reader/ArgumentsReader.php new file mode 100644 index 0000000000000000000000000000000000000000..751ddd2eeb98d278cda1dc474d1aaa52077d7a02 --- /dev/null +++ b/lib/Magento/Code/Reader/ArgumentsReader.php @@ -0,0 +1,185 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Code\Reader; + +class ArgumentsReader +{ + const NO_DEFAULT_VALUE = 'NO-DEFAULT'; + + /** + * Get class constructor + * + * @param \ReflectionClass $class + * @param bool $groupByPosition + * @param bool $inherited + * @return array + */ + public function getConstructorArguments(\ReflectionClass $class, $groupByPosition = false, $inherited = false) + { + $output = array(); + /** + * Skip native PHP types, classes without constructor + */ + if (!$class->getFileName() || false == $class->hasMethod('__construct') + || (!$inherited && $class->getConstructor()->class != $class->getName()) + ) { + return $output; + } + + foreach ($class->getConstructor()->getParameters() as $parameter) { + $name = $parameter->getName(); + $position = $parameter->getPosition(); + $parameterClass = $parameter->getClass(); + $type = $parameterClass ? '\\' . $parameterClass->getName() : ($parameter->isArray() ? 'array' : null); + $index = $groupByPosition ? $position : $name; + $default = null; + if ($parameter->isOptional()) { + if ($parameter->isDefaultValueAvailable()) { + $value = $parameter->getDefaultValue(); + if ($parameter->isDefaultValueConstant()) { + $const = $parameter->getDefaultValueConstantName(); + $default = strpos($const, 'self::') === 0 ? $const : '\\' . $const; + } elseif (true == is_array($value)) { + $default = $this->_varExportMin($value); + } elseif (true == is_int($value)) { + $default = $value; + } else { + $default = is_null($parameter->getDefaultValue()) + ? 'null' + : "'" . $parameter->getDefaultValue() . "'"; + } + } elseif ($parameter->allowsNull()) { + $default = 'null'; + } + } + + + $output[$index] = array( + 'name' => $name, + 'position' => $position, + 'type' => $type, + 'isOptional' => $parameter->isOptional(), + 'default' => $default, + ); + } + return $output; + } + + /** + * Get arguments of parent __construct call + * + * @param \ReflectionClass $class + * @param array $classArguments + * @return array|null + */ + public function getParentCall(\ReflectionClass $class, array $classArguments) + { + $trimFunction = function (&$value) { + $value = trim($value, PHP_EOL . ' $'); + }; + + $method = $class->getMethod('__construct'); + $start = $method->getStartLine(); + $end = $method->getEndLine(); + $length = $end - $start; + + $source = file($class->getFileName()); + $content = implode('', array_slice($source, $start, $length)); + $pattern = '/parent::__construct\(([a-zA-Z0-9_$, ' . PHP_EOL . ']*)\);/'; + + if (!preg_match($pattern, $content, $matches)) { + return null; + } + + $arguments = $matches[1]; + if (!trim($arguments)) { + return null; + } + + $arguments = explode(',', $arguments); + array_walk($arguments, $trimFunction); + + $output = array(); + foreach ($arguments as $argumentPosition => $argumentName) { + $type = isset($classArguments[$argumentName]) ? $classArguments[$argumentName]['type'] : null; + $output[$argumentPosition] = array( + 'name' => $argumentName, + 'position' => $argumentPosition, + 'type' => $type, + ); + } + return $output; + } + + /** + * Check argument type compatibility + * + * @param string $requiredType + * @param string $actualType + * @return bool + */ + public function isCompatibleType($requiredType, $actualType) + { + /** Types are compatible if type names are equal */ + if ($requiredType === $actualType) { + return true; + } + + /** Types are 'semi-compatible' if one of them are undefined */ + if ($requiredType === null || $actualType === null) { + return true; + } + + /** + * Special case for scalar arguments + * Array type is compatible with array or null type. Both of these types are checked above + */ + if ($requiredType === 'array' || $actualType === 'array') { + return false; + } + + return is_subclass_of($actualType, $requiredType); + } + + /** + * Export variable value + * + * @param mixed $var + * @return mixed|string + */ + protected function _varExportMin($var) + { + if (is_array($var)) { + $toImplode = array(); + foreach ($var as $key => $value) { + $toImplode[] = var_export($key, true) . ' => ' . $this->_varExportMin($value); + } + $code = 'array('.implode(', ', $toImplode).')'; + return $code; + } else { + return var_export($var, true); + } + } +} \ No newline at end of file diff --git a/lib/Magento/Code/Validator.php b/lib/Magento/Code/Validator.php new file mode 100644 index 0000000000000000000000000000000000000000..d1614b6f9682d66c4d487a3972a76b8c512c8969 --- /dev/null +++ b/lib/Magento/Code/Validator.php @@ -0,0 +1,57 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Code; + +class Validator implements ValidatorInterface +{ + /** + * @var ValidatorInterface[] + */ + protected $_validators = array(); + + /** + * Add validator + * + * @param ValidatorInterface $validator + */ + public function add(ValidatorInterface $validator) + { + $this->_validators[] = $validator; + } + + /** + * Validate class + * + * @param string $className + * @return bool + * @throws \Magento\Code\ValidationException + */ + public function validate($className) + { + foreach ($this->_validators as $validator) { + $validator->validate($className); + } + } +} \ No newline at end of file diff --git a/lib/Magento/Code/Validator/ArgumentSequence.php b/lib/Magento/Code/Validator/ArgumentSequence.php new file mode 100644 index 0000000000000000000000000000000000000000..a572b5e4146536e1c4c98114efd07a85c224a2cd --- /dev/null +++ b/lib/Magento/Code/Validator/ArgumentSequence.php @@ -0,0 +1,382 @@ +<?php +/** + * Class constructor validator. Validates arguments sequence + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Code\Validator; +use Magento\Code\ValidatorInterface; +use Magento\Code\ValidationException; + +class ArgumentSequence implements ValidatorInterface +{ + const TYPE_OBJECT = 'object'; + const TYPE_SCALAR = 'scalar'; + + const REQUIRED = 'required'; + const OPTIONAL = 'optional'; + + /** + * @var \Magento\Code\Reader\ArgumentsReader + */ + protected $_argumentsReader; + + /** + * List of allowed type to validate + * @var array + */ + protected $_allowedTypes = array('\Magento\App\Action\Action', '\Magento\View\Element\BlockInterface'); + + /** + * @var array + */ + protected $_cache; + + /** + * @param \Magento\Code\Reader\ArgumentsReader $argumentsReader + */ + public function __construct(\Magento\Code\Reader\ArgumentsReader $argumentsReader = null) + { + $this->_argumentsReader = $argumentsReader ?: new \Magento\Code\Reader\ArgumentsReader(); + } + + /** + * Validate class + * + * @param string $className + * @return bool + * @throws ValidationException + */ + public function validate($className) + { + /** Temporary solution. Need to be removed since all AC of MAGETWO-14343 will be covered */ + if (!$this->_isAllowedType($className)) { + return true; + } + + $class = new \ReflectionClass($className); + $classArguments = $this->_argumentsReader->getConstructorArguments($class); + + if ($this->_isContextOnly($classArguments)) { + return true; + } + + $parent = $class->getParentClass(); + $parentArguments = array(); + if ($parent) { + $parentClass = $parent->getName(); + if (0 !== strpos($parentClass, '\\')) { + $parentClass = '\\' . $parentClass; + } + + if (isset($this->_cache[$parentClass])) { + $parentArguments = $this->_cache[$parentClass]; + } else { + $parentArguments = $this->_argumentsReader->getConstructorArguments($parent, false, true); + } + } + + $requiredSequence = $this->_buildsSequence($classArguments, $parentArguments); + $this->_cache[$className] = $requiredSequence; + + if (false == $this->_checkArgumentSequence($classArguments, $requiredSequence)) { + throw new ValidationException( + 'Incorrect argument sequence in class ' . $className . ' in ' . $class->getFileName() . PHP_EOL + . 'Required: $' . implode(', $', array_keys($requiredSequence)) . PHP_EOL + . 'Actual : $' . implode(', $', array_keys($classArguments)) . PHP_EOL + ); + } + + return true; + } + + /** + * Check whether type can be validated + * + * @param string $className + * @return bool + */ + protected function _isAllowedType($className) + { + foreach ($this->_allowedTypes as $type) { + if (is_subclass_of($className, $type)) { + return true; + } + } + + return false; + } + + /** + * Check argument sequence + * + * @param array $actualSequence + * @param array $requiredSequence + * @return bool + */ + protected function _checkArgumentSequence(array $actualSequence, array $requiredSequence) + { + $actual = array_keys($actualSequence); + $required = array_keys($requiredSequence); + return $actual === $required; + } + + /** + * Build argument required sequence + * + * @param array $classArguments + * @param array $parentArguments + * @return array + */ + protected function _buildsSequence(array $classArguments, array $parentArguments = array()) + { + if (empty($classArguments)) { + return $classArguments; + } + + $classArgumentList = $this->_sortArguments($classArguments); + $parentArgumentList = $this->_sortArguments($parentArguments); + + $requiredToOptionalObject = array(); + $requiredToOptionalScalar = array(); + $output = array(); + + /** + * Argument Sequence Matrix + * 1 2 3 + * 1. P.R.O C.O.O C.R.O + * 2. P.R.S C.O.S C.R.S + * 3. P.O.O C.R.O C.O.O + * 4. P.O.S C.R.S C.O.S + * + * where code X.Y.Z + * X - parent (P) / child (C) + * Y - required (R) / optional (O) + * Z - object (O) / scalar (S) + */ + + // 1. Parent Required Object Arguments + foreach ($parentArgumentList[self::REQUIRED][self::TYPE_OBJECT] as $name => $argument) { + if (isset($classArgumentList[self::OPTIONAL][self::TYPE_OBJECT][$name])) { + // 1.2 + $requiredToOptionalObject[$name] = $classArgumentList[self::OPTIONAL][self::TYPE_OBJECT][$name]; + } elseif (isset($classArgumentList[self::REQUIRED][self::TYPE_OBJECT][$name])) { + // 1.3 + $output[$name] = $classArgumentList[self::REQUIRED][self::TYPE_OBJECT][$name]; + } else { + // 1.1 + $output[$name] = $argument; + } + } + + // 2. Parent Required Scalar Arguments + foreach ($parentArgumentList[self::REQUIRED][self::TYPE_SCALAR] as $name => $argument) { + if (isset($classArgumentList[self::OPTIONAL][self::TYPE_SCALAR][$name])) { + // 2.2 + $requiredToOptionalScalar[$name] = $classArgumentList[self::OPTIONAL][self::TYPE_SCALAR][$name]; + } elseif (isset($classArgumentList[self::REQUIRED][self::TYPE_SCALAR][$name])) { + // 2.3 + $output[$name] = $classArgumentList[self::REQUIRED][self::TYPE_SCALAR][$name]; + } else { + // 2.1 + $output[$name] = $argument; + } + } + + // 1.3 Child Required Object Arguments + foreach ($classArgumentList[self::REQUIRED][self::TYPE_OBJECT] as $name => $argument) { + if (!isset($output[$name])) { + $output[$name] = $argument; + } + } + + // 2.3 Child Required Scalar Arguments + foreach ($classArgumentList[self::REQUIRED][self::TYPE_SCALAR] as $name => $argument) { + if (!isset($output[$name])) { + $output[$name] = $argument; + } + } + + // 1.2 Optional Object. Parent Required Object Arguments that become Optional in Child Class + foreach ($requiredToOptionalObject as $name => $argument) { + $output[$name] = $argument; + } + + // 2.2 Optional Scalar. Parent Required Scalar Arguments that become Optional in Child Class + foreach ($requiredToOptionalScalar as $name => $argument) { + $output[$name] = $argument; + } + + // 3. Parent Optional Object Arguments + foreach ($parentArgumentList[self::OPTIONAL][self::TYPE_OBJECT] as $name => $argument) { + if (isset($classArgumentList[self::OPTIONAL][self::TYPE_OBJECT][$name])) { + // 3.3 Use Child Optional Object + $output[$name] = $classArgumentList[self::OPTIONAL][self::TYPE_OBJECT][$name]; + } elseif (!isset($output[$name])) { + // 3.2 Check whether this argument wasn't processed in Step 1.2 or 1.3 + $output[$name] = $argument; + } else { + // 3.1 Use Parent Optional Object Argument + $output[$name] = $argument; + } + } + + // 4. Parent Optional Scalar Arguments + foreach ($parentArgumentList[self::OPTIONAL][self::TYPE_SCALAR] as $name => $argument) { + if (isset($classArgumentList[self::OPTIONAL][self::TYPE_SCALAR][$name])) { + // 4.3 Use Child Optional Scalar + $output[$name] = $classArgumentList[self::OPTIONAL][self::TYPE_SCALAR][$name]; + } elseif (!isset($output[$name])) { + // 4.2 Check whether this argument wasn't processed in Step 2.2 or 2.3 + $output[$name] = $argument; + } else { + // 4.1 Use Parent Optional Scalar Argument + $output[$name] = $argument; + } + } + + // 3.3 Child Optional Object Arguments + foreach ($classArgumentList[self::OPTIONAL][self::TYPE_OBJECT] as $name => $argument) { + if (!isset($output[$name])) { + $output[$name] = $argument; + } + } + + // 4.3 Child Optional Scalar Arguments + foreach ($classArgumentList[self::OPTIONAL][self::TYPE_SCALAR] as $name => $argument) { + if (!isset($output[$name])) { + $output[$name] = $argument; + } + } + + return $output; + } + + /** + * Sort arguments + * + * @param array $arguments + * @return array + */ + protected function _sortArguments($arguments) + { + $requiredObject = array(); + $requiredScalar = array(); + $optionalObject = array(); + $optionalScalar = array(); + + foreach ($arguments as $argument) { + if ($argument['type'] && $argument['type'] != 'array') { + if ($argument['isOptional']) { + $optionalObject[$argument['name']] = $argument; + } else { + $requiredObject[$argument['name']] = $argument; + } + } else { + if ($argument['isOptional']) { + $optionalScalar[$argument['name']] = $argument; + } else { + $requiredScalar[$argument['name']] = $argument; + } + } + } + + $requiredObject = $this->_sortObjectType($requiredObject); + $optionalScalar = $this->_sortScalarType($optionalScalar); + + return array( + self::REQUIRED => array( + self::TYPE_OBJECT => $requiredObject, + self::TYPE_SCALAR => $requiredScalar + ), + self::OPTIONAL => array( + self::TYPE_OBJECT => $optionalObject, + self::TYPE_SCALAR => $optionalScalar + ), + ); + } + + /** + * Sort arguments by context object + * + * @param array $argumentList + * @return array + */ + protected function _sortObjectType(array $argumentList) + { + $context = array(); + foreach ($argumentList as $name => $argument) { + if ($this->_isContextType($argument['type'])) { + $context[$name] = $argument; + unset($argumentList[$name]); + break; + } + } + return array_merge($context, $argumentList); + } + + /** + * Sort arguments by arguments name + * + * @param array $argumentList + * @return array + */ + protected function _sortScalarType(array $argumentList) + { + $data = array(); + foreach ($argumentList as $name => $argument) { + if ($argument['name'] == 'data') { + $data[$name] = $argument; + unset($argumentList[$name]); + break; + } + } + return array_merge($data, $argumentList); + } + + /** + * Check whether arguments list contains an only context argument + * + * @param array $arguments + * @return bool + */ + protected function _isContextOnly(array $arguments) + { + if (count($arguments) !== 1) { + return false; + } + $argument = current($arguments); + return $argument['type'] && $this->_isContextType($argument['type']); + } + + /** + * Check whether type is context object + * + * @param string $type + * @return bool + */ + protected function _isContextType($type) + { + return is_subclass_of($type, '\Magento\ObjectManager\ContextInterface'); + } +} diff --git a/lib/Magento/Code/Validator/ConstructorIntegrity.php b/lib/Magento/Code/Validator/ConstructorIntegrity.php index 4fb80e59f24fe2e14e283a2d160666ab6206c13d..b75e6d20cdeab13a53ab9cb7637880d263e314e0 100644 --- a/lib/Magento/Code/Validator/ConstructorIntegrity.php +++ b/lib/Magento/Code/Validator/ConstructorIntegrity.php @@ -26,12 +26,27 @@ namespace Magento\Code\Validator; -class ConstructorIntegrity +use Magento\Code\ValidatorInterface; + +class ConstructorIntegrity implements ValidatorInterface { + /** + * @var \Magento\Code\Reader\ArgumentsReader + */ + protected $_argumentsReader; + + /** + * @param \Magento\Code\Reader\ArgumentsReader $argumentsReader + */ + public function __construct(\Magento\Code\Reader\ArgumentsReader $argumentsReader = null) + { + $this->_argumentsReader = $argumentsReader ?: new \Magento\Code\Reader\ArgumentsReader(); + } + /** * Validate class * - * @param $className + * @param string $className * @return bool * @throws \Magento\Code\ValidationException */ @@ -41,24 +56,30 @@ class ConstructorIntegrity $parent = $class->getParentClass(); /** Check whether parent class exists and has __construct method */ - if (!$parent || !$parent->hasMethod('__construct')) { + if (!$parent) { + return true; + } + + /** Get parent class __construct arguments */ + $parentArguments = $this->_argumentsReader->getConstructorArguments($parent, true, true); + if (empty($parentArguments)) { return true; } /** Check whether class has __construct */ - $classArguments = $this->_getConstructorArguments($class); + $classArguments = $this->_argumentsReader->getConstructorArguments($class); if (null === $classArguments) { return true; } /** Check whether class has parent::__construct call */ - $callArguments = $this->_getParentCall($class, $classArguments); + $callArguments = $this->_argumentsReader->getParentCall($class, $classArguments); if (null === $callArguments) { return true; } /** Get parent class __construct arguments */ - $parentArguments = $this->_getConstructorArguments($parent, true); + $parentArguments = $this->_argumentsReader->getConstructorArguments($parent, true, true); foreach ($parentArguments as $index => $requiredArgument) { if (isset($callArguments[$index])) { @@ -73,10 +94,14 @@ class ConstructorIntegrity ); } - if (false == $this->_isCompatibleType($requiredArgument['type'], $actualArgument['type'])) { + $isCompatibleTypes = $this->_argumentsReader->isCompatibleType( + $requiredArgument['type'], + $actualArgument['type'] + ); + if (false == $isCompatibleTypes) { throw new \Magento\Code\ValidationException('Incompatible argument type: Required type: ' . $requiredArgument['type'] . '. Actual type: ' . $actualArgument['type'] - . '; File: ' . $class->getFileName() + . '; File: ' . PHP_EOL .$class->getFileName() . PHP_EOL ); } } @@ -101,109 +126,4 @@ class ConstructorIntegrity return true; } - /** - * Check argument type compatibility - * - * @param string $requiredType - * @param string $actualType - * @return bool - */ - protected function _isCompatibleType($requiredType, $actualType) - { - /** Types are compatible if type names are equal */ - if ($requiredType === $actualType) { - return true; - } - - /** Types are 'semi-compatible' if one of them are undefined */ - if ($requiredType === null || $actualType === null) { - return true; - } - - /** - * Special case for scalar arguments - * Array type is compatible with array or null type. Both of these types are checked above - */ - if ($requiredType === 'array' || $actualType === 'array') { - return false; - } - - return is_subclass_of($actualType, $requiredType); - } - - /** - * Get arguments of parent __construct call - * - * @param \ReflectionClass $class - * @param array $classArguments - * @return array|null - */ - protected function _getParentCall(\ReflectionClass $class, array $classArguments) - { - $trimFunction = function (&$value) { - $value = trim($value, PHP_EOL . ' $'); - }; - - $method = $class->getMethod('__construct'); - $start = $method->getStartLine(); - $end = $method->getEndLine(); - $length = $end - $start; - - $source = file($class->getFileName()); - $content = implode('', array_slice($source, $start, $length)); - $pattern = '/parent::__construct\(([a-zA-Z0-9_$, \n]*)\);/'; - - if (!preg_match($pattern, $content, $matches)) { - return null; - } - - $arguments = $matches[1]; - if (!trim($arguments)) { - return null; - } - - $arguments = explode(',', $arguments); - array_walk($arguments, $trimFunction); - - $output = array(); - foreach ($arguments as $argumentPosition => $argumentName) { - $type = isset($classArguments[$argumentName]) ? $classArguments[$argumentName]['type'] : null; - $output[$argumentPosition] = array( - 'name' => $argumentName, - 'position' => $argumentPosition, - 'type' => $type, - ); - } - return $output; - } - - /** - * Get class constructor - * - * @param \ReflectionClass $class - * @param bool $groupByPosition - * @return array|null - */ - protected function _getConstructorArguments(\ReflectionClass $class, $groupByPosition = false) - { - if (false == $class->hasMethod('__construct')) { - return null; - } - - $output = array(); - foreach ($class->getConstructor()->getParameters() as $parameter) { - $name = $parameter->getName(); - $position = $parameter->getPosition(); - $parameterClass = $parameter->getClass(); - $type = $parameterClass ? $parameterClass->getName() : ($parameter->isArray() ? 'array' : null); - $index = $groupByPosition ? $position : $name; - $output[$index] = array( - 'name' => $name, - 'position' => $position, - 'type' => $type, - 'isOptional' => $parameter->isOptional() - ); - } - return $output; - } -} +} diff --git a/lib/Magento/Code/Validator/ContextAggregation.php b/lib/Magento/Code/Validator/ContextAggregation.php new file mode 100644 index 0000000000000000000000000000000000000000..bb2a6924a58b68885f71202dd4bda8d833ee50a1 --- /dev/null +++ b/lib/Magento/Code/Validator/ContextAggregation.php @@ -0,0 +1,112 @@ +<?php +/** + * Class constructor validator + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Code\Validator; + +use Magento\Code\ValidatorInterface; +use Magento\Code\ValidationException; + +class ContextAggregation implements ValidatorInterface +{ + /** + * @var \Magento\Code\Reader\ArgumentsReader + */ + protected $_argumentsReader; + + /** + * @param \Magento\Code\Reader\ArgumentsReader $argumentsReader + */ + public function __construct(\Magento\Code\Reader\ArgumentsReader $argumentsReader = null) + { + $this->_argumentsReader = $argumentsReader ?: new \Magento\Code\Reader\ArgumentsReader(); + } + + /** + * Validate class. Check declaration of dependencies that already declared in context object + * + * @param string $className + * @return bool + * @throws ValidationException + */ + public function validate($className) + { + $class = new \ReflectionClass($className); + $classArguments = $this->_argumentsReader->getConstructorArguments($class); + + $errors = array(); + $contextDependencies = array(); + + $actualDependencies = $this->_getObjectArguments($classArguments); + + foreach ($actualDependencies as $type) { + /** Check if argument is context object */ + if (is_subclass_of($type, '\Magento\ObjectManager\ContextInterface')) { + $contextDependencies = array_merge( + $contextDependencies, + $this->_argumentsReader->getConstructorArguments(new \ReflectionClass($type), false, true) + ); + } + } + + $contextDependencyTypes = $this->_getObjectArguments($contextDependencies); + + foreach ($actualDependencies as $type) { + if (in_array($type, $contextDependencyTypes)) { + $errors[] = $type . ' already exists in context object'; + } + } + + if (false == empty($errors)) { + throw new ValidationException( + 'Incorrect dependency in class ' . $className . ' in ' . $class->getFileName() . PHP_EOL + . implode(PHP_EOL, $errors) + ); + } + return true; + } + + + /** + * Get arguments with object types + * + * @param array $arguments + * @return array + */ + protected function _getObjectArguments(array $arguments) + { + $output = array(); + foreach ($arguments as $argument) { + $type = $argument['type']; + if (!$type || $type == 'array') { + continue; + } + $output[] = $type; + } + + return $output; + } + +} diff --git a/lib/Magento/Code/ValidatorInterface.php b/lib/Magento/Code/ValidatorInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..58923db457726737e06ec3cd418001be46824299 --- /dev/null +++ b/lib/Magento/Code/ValidatorInterface.php @@ -0,0 +1,37 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Code; + +interface ValidatorInterface +{ + /** + * Validate class + * + * @param string $className + * @return bool + * @throws \Magento\Code\ValidationException + */ + public function validate($className); +} \ No newline at end of file diff --git a/lib/Magento/Config/Scope.php b/lib/Magento/Config/Scope.php index c1c9447013b78012e8b0e7b6e52bd7ad422916d4..56ed481d99c2adee5ac9d9fa60135997b88a439e 100644 --- a/lib/Magento/Config/Scope.php +++ b/lib/Magento/Config/Scope.php @@ -23,7 +23,7 @@ */ namespace Magento\Config; -class Scope implements \Magento\Config\ScopeInterface +class Scope implements \Magento\Config\ScopeInterface, \Magento\Config\ScopeListInterface { /** * Default application scope diff --git a/lib/Magento/Config/ScopeInterface.php b/lib/Magento/Config/ScopeInterface.php index 327358d0e6d7cb86ec53ff72d5ec048b85e44253..80dce9514f3103e8f7b04237c67dad62540b8b53 100644 --- a/lib/Magento/Config/ScopeInterface.php +++ b/lib/Magento/Config/ScopeInterface.php @@ -32,13 +32,6 @@ interface ScopeInterface */ public function getCurrentScope(); - /** - * Retrieve list of all scopes - * - * @return array - */ - public function getAllScopes(); - /** * Set current configuration scope * diff --git a/lib/Magento/Config/ScopeListInterface.php b/lib/Magento/Config/ScopeListInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..28744e772b0ba3adf7c17518af25c6eb4a47ee79 --- /dev/null +++ b/lib/Magento/Config/ScopeListInterface.php @@ -0,0 +1,35 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Config; + +interface ScopeListInterface +{ + /** + * Retrieve list of all scopes + * + * @return array + */ + public function getAllScopes(); +} diff --git a/lib/Magento/Connect/Frontend.php b/lib/Magento/Connect/Frontend.php index 99745e9267ebf86234fbd6c3f837500e3544f5de..e4eff62f0f857d3eac02b50fb0d3066c1d2f96b5 100644 --- a/lib/Magento/Connect/Frontend.php +++ b/lib/Magento/Connect/Frontend.php @@ -122,7 +122,7 @@ class Frontend */ public function pushCapture() { - array_push($this->_captureSaved, $this->_capture); + $this->_captureSaved[] = $this->_capture; return $this; } @@ -206,7 +206,7 @@ class Frontend */ public function pushSilent() { - array_push($this->_silentSaved, $this->_silent); + $this->_silentSaved[] = $this->_silent; return $this; } diff --git a/lib/Magento/Data/Collection/Db.php b/lib/Magento/Data/Collection/Db.php index 39a65dca0b17147c7e79c789bf0323bf629d7bd3..a5bfd5a985af7e9461c599d60d5b428aabdf42c3 100644 --- a/lib/Magento/Data/Collection/Db.php +++ b/lib/Magento/Data/Collection/Db.php @@ -602,6 +602,37 @@ class Db extends \Magento\Data\Collection return false; } + /** + * Overridden to use _idFieldName by default. + * + * @param null $valueField + * @param string $labelField + * @param array $additional + * @return array + */ + protected function _toOptionArray($valueField = null, $labelField = 'name', $additional = array()) + { + if ($valueField === null) { + $valueField = $this->getIdFieldName(); + } + return parent::_toOptionArray($valueField, $labelField, $additional); + } + + /** + * Overridden to use _idFieldName by default. + * + * @param string $valueField + * @param string $labelField + * @return array + */ + protected function _toOptionHash($valueField = null, $labelField = 'name') + { + if ($valueField === null) { + $valueField = $this->getIdFieldName(); + } + return parent::_toOptionHash($valueField, $labelField); + } + /** * Convert items array to hash for select options * using fetchItem method @@ -617,8 +648,11 @@ class Db extends \Magento\Data\Collection * @param string $labelField * @return array */ - protected function _toOptionHashOptimized($valueField='id', $labelField='name') + protected function _toOptionHashOptimized($valueField = null, $labelField = 'name') { + if ($valueField === null) { + $valueField = $this->getIdFieldName(); + } $result = array(); while ($item = $this->fetchItem()) { $result[$item->getData($valueField)] = $item->getData($labelField); diff --git a/lib/Magento/Data/Form/Element/AbstractElement.php b/lib/Magento/Data/Form/Element/AbstractElement.php index 9928b00c9298553b2f4edd4a158d8c66a11dbdc1..e9367941c186c7b4e44add6a5a95db31f4222cfe 100644 --- a/lib/Magento/Data/Form/Element/AbstractElement.php +++ b/lib/Magento/Data/Form/Element/AbstractElement.php @@ -226,7 +226,7 @@ abstract class AbstractElement extends \Magento\Data\Form\AbstractForm protected function _getUiId($suffix = null) { - if ($this->_renderer instanceof \Magento\Core\Block\AbstractBlock) { + if ($this->_renderer instanceof \Magento\View\Block\AbstractBlock) { return $this->_renderer->getUiId($this->getType(), $this->getName(), $suffix); } else { return ' data-ui-id="form-element-' . $this->getName() . ($suffix ? : '') . '"'; diff --git a/lib/Magento/Data/Tree/Node.php b/lib/Magento/Data/Tree/Node.php index 3c2d8a7c6cdccd0321440ba2d8d1fa6825c28fcd..d08e2bd3053316c696a2945500d4afa5e4ba6d63 100644 --- a/lib/Magento/Data/Tree/Node.php +++ b/lib/Magento/Data/Tree/Node.php @@ -258,7 +258,7 @@ class Node extends \Magento\Object public function getPath(&$prevNodes = array()) { if ($this->_parent) { - array_push($prevNodes, $this); + $prevNodes[] = $this; $this->_parent->getPath($prevNodes); } return $prevNodes; diff --git a/lib/Magento/Encryption/UrlCoder.php b/lib/Magento/Encryption/UrlCoder.php new file mode 100644 index 0000000000000000000000000000000000000000..2b2651d8df9a5a07810ac1330206298ecef205e3 --- /dev/null +++ b/lib/Magento/Encryption/UrlCoder.php @@ -0,0 +1,63 @@ +<?php +/** + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +namespace Magento\Encryption; + +class UrlCoder +{ + /** + * @var \Magento\UrlInterface + */ + protected $_url; + + /** + * @param \Magento\UrlInterface $url + */ + public function __construct(\Magento\UrlInterface $url) + { + $this->_url = $url; + } + + /** + * base64_encode() for URLs encoding + * + * @param string $url + * @return string + */ + public function encode($url) + { + return strtr(base64_encode($url), '+/=', '-_,'); + } + + /** + * base64_decode() for URLs decoding + * + * @param string $url + * @return string + */ + public function decode($url) + { + return $this->_url->sessionUrlVar(base64_decode(strtr($url, '-_,', '+/='))); + } +} \ No newline at end of file diff --git a/lib/Magento/Escaper.php b/lib/Magento/Escaper.php index 3390ed98abcba8888a3093891013cf7206620d95..64dfa96c1d45604750487183519ae139d6f15cbd 100644 --- a/lib/Magento/Escaper.php +++ b/lib/Magento/Escaper.php @@ -67,7 +67,7 @@ class Escaper */ public function escapeUrl($data) { - return htmlspecialchars($data); + return htmlspecialchars($data, ENT_COMPAT, 'UTF-8', false); } /** diff --git a/lib/Magento/Interception/Config/Config.php b/lib/Magento/Interception/Config/Config.php index 3a7de01deac800d01eaabfa02f78b3649569c382..ac5885b5674c708b88b48cb0b9e3093a8177f525 100644 --- a/lib/Magento/Interception/Config/Config.php +++ b/lib/Magento/Interception/Config/Config.php @@ -76,13 +76,6 @@ class Config implements \Magento\Interception\Config */ protected $_reader; - /** - * Configuration scope resolver - * - * @var \Magento\Config\ScopeInterface - */ - protected $_configScope; - /** * Inherited list of intercepted types * @@ -92,7 +85,7 @@ class Config implements \Magento\Interception\Config /** * @param \Magento\Config\ReaderInterface $reader - * @param \Magento\Config\ScopeInterface $configScope + * @param \Magento\Config\ScopeListInterface $scopeList * @param \Magento\Cache\FrontendInterface $cache * @param \Magento\ObjectManager\Relations $relations * @param \Magento\ObjectManager\Config $omConfig @@ -102,7 +95,7 @@ class Config implements \Magento\Interception\Config */ public function __construct( \Magento\Config\ReaderInterface $reader, - \Magento\Config\ScopeInterface $configScope, + \Magento\Config\ScopeListInterface $scopeList, \Magento\Cache\FrontendInterface $cache, \Magento\ObjectManager\Relations $relations, \Magento\ObjectManager\Config $omConfig, @@ -117,14 +110,13 @@ class Config implements \Magento\Interception\Config $this->_cache = $cache; $this->_cacheId = $cacheId; $this->_reader = $reader; - $this->_configScope = $configScope; $intercepted = $this->_cache->load($this->_cacheId); if ($intercepted !== false) { $this->_intercepted = unserialize($intercepted); } else { $config = array(); - foreach ($this->_configScope->getAllScopes() as $scope) { + foreach ($scopeList->getAllScopes() as $scope) { $config = array_replace_recursive($config, $this->_reader->read($scope)); } foreach ($config as $typeName => $typeConfig) { diff --git a/lib/Magento/Interception/PluginList/PluginList.php b/lib/Magento/Interception/PluginList/PluginList.php index bf9037d4e367d01cdcb9e09ebff08e087df2a42b..245d15062b4acd5eae81df5b7ad8944d00031510 100644 --- a/lib/Magento/Interception/PluginList/PluginList.php +++ b/lib/Magento/Interception/PluginList/PluginList.php @@ -101,6 +101,7 @@ class PluginList * * @param string $type * @return array + * @throws \Zend\Soap\Exception\InvalidArgumentException * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _inheritPlugins($type) diff --git a/lib/Magento/Io/AbstractIo.php b/lib/Magento/Io/AbstractIo.php index 35a04c65dda349e23c7e2829ef88cbe324aa1da3..8c3d167218b4e92ca73c73ce18ff03f1e3e0adbe 100644 --- a/lib/Magento/Io/AbstractIo.php +++ b/lib/Magento/Io/AbstractIo.php @@ -107,7 +107,7 @@ abstract class AbstractIo implements \Magento\Io\IoInterface } } - array_push($realPathParts, $pathParts[$i]); + $realPathParts[] = $pathParts[$i]; } return $pathTokR . implode('/', $realPathParts); diff --git a/app/code/Magento/Core/Model/Message/AbstractMessage.php b/lib/Magento/Message/AbstractMessage.php similarity index 60% rename from app/code/Magento/Core/Model/Message/AbstractMessage.php rename to lib/Magento/Message/AbstractMessage.php index 68e985319b9df0465b5d262d3f1d75560e1877f2..6665116d7a47b7eda16dc2e3b88a6a3b5e7b94e7 100644 --- a/app/code/Magento/Core/Model/Message/AbstractMessage.php +++ b/lib/Magento/Message/AbstractMessage.php @@ -18,110 +18,147 @@ * 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_Core * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\Message; + /** * Abstract message model - * - * @category Magento - * @package Magento_Core - * @author Magento Core Team <core@magentocommerce.com> */ -namespace Magento\Core\Model\Message; - abstract class AbstractMessage { /** * @var string */ - protected $_type; + protected $type; /** * @var string */ - protected $_code; + protected $code; + + /** + * @var mixed + */ + protected $class; + + /** + * @var mixed + */ + protected $method; + + /** + * @var mixed + */ + protected $identifier; - protected $_class; - protected $_method; - protected $_identifier; - protected $_isSticky = false; + /** + * @var bool + */ + protected $isSticky = false; /** - * @param string $type * @param string $code */ - public function __construct($type, $code = '') + public function __construct($code = '') { - $this->_type = $type; - $this->_code = $code; + $this->code = $code; } + /** + * Get message code + * + * @return string + */ public function getCode() { - return $this->_code; + return $this->code; } + /** + * Get message text + * + * @return string + */ public function getText() { return $this->getCode(); } + /** + * Get message type + * + * @return string + */ public function getType() { - return $this->_type; + return $this->type; } + /** + * Get message class + * + * @param $class + */ public function setClass($class) { - $this->_class = $class; + $this->class = $class; } + /** + * Get message method + * + * @param $method + */ public function setMethod($method) { - $this->_method = $method; + $this->method = $method; } + /** + * Convert message to string + * + * @return string + */ public function toString() { - $out = $this->getType().': '.$this->getText(); + $out = $this->getType() . ': ' . $this->getText(); return $out; } /** * Set message identifier * - * @param string $id - * @return \Magento\Core\Model\Message\AbstractMessage + * @param string $identifier + * @return AbstractMessage */ - public function setIdentifier($id) + public function setIdentifier($identifier) { - $this->_identifier = $id; + $this->identifier = $identifier; return $this; } /** * Get message identifier * - * @return string + * @return string */ public function getIdentifier() { - return $this->_identifier; + return $this->identifier; } /** * Set message sticky status * * @param bool $isSticky - * @return \Magento\Core\Model\Message\AbstractMessage + * @return AbstractMessage */ public function setIsSticky($isSticky = true) { - $this->_isSticky = $isSticky; + $this->isSticky = $isSticky; return $this; } @@ -132,18 +169,18 @@ abstract class AbstractMessage */ public function getIsSticky() { - return $this->_isSticky; + return $this->isSticky; } /** * Set code * * @param string $code - * @return \Magento\Core\Model\Message\AbstractMessage + * @return AbstractMessage */ public function setCode($code) { - $this->_code = $code; + $this->code = $code; return $this; } } diff --git a/app/code/Magento/Core/Model/Message/Collection.php b/lib/Magento/Message/Collection.php similarity index 62% rename from app/code/Magento/Core/Model/Message/Collection.php rename to lib/Magento/Message/Collection.php index ac05ab2847f731082fec8b5031cc688d24140a40..20f96d8e48ec0c9a269e15b8dfd0f34e5cdca9a1 100644 --- a/app/code/Magento/Core/Model/Message/Collection.php +++ b/lib/Magento/Message/Collection.php @@ -18,17 +18,15 @@ * 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_Core * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\Message; + /** * Messages collection */ -namespace Magento\Core\Model\Message; - class Collection { /** @@ -36,20 +34,20 @@ class Collection * * @var array */ - protected $_messages = array(); + protected $messages = array(); /** * @var string */ - protected $_lastAddedMessage; + protected $lastAddedMessage; /** * Adding new message to collection * - * @param \Magento\Core\Model\Message\AbstractMessage $message - * @return \Magento\Core\Model\Message\Collection + * @param AbstractMessage $message + * @return Collection */ - public function add(\Magento\Core\Model\Message\AbstractMessage $message) + public function add(AbstractMessage $message) { return $this->addMessage($message); } @@ -57,34 +55,35 @@ class Collection /** * Adding new message to collection * - * @param \Magento\Core\Model\Message\AbstractMessage $message - * @return \Magento\Core\Model\Message\Collection + * @param AbstractMessage $message + * @return Collection */ - public function addMessage(\Magento\Core\Model\Message\AbstractMessage $message) + public function addMessage(AbstractMessage $message) { - if (!isset($this->_messages[$message->getType()])) { - $this->_messages[$message->getType()] = array(); + if (!isset($this->messages[$message->getType()])) { + $this->messages[$message->getType()] = array(); } - $this->_messages[$message->getType()][] = $message; - $this->_lastAddedMessage = $message; + $this->messages[$message->getType()][] = $message; + $this->lastAddedMessage = $message; return $this; } /** * Clear all messages except sticky * - * @return \Magento\Core\Model\Message\Collection + * @return Collection */ public function clear() { - foreach ($this->_messages as $type => $messages) { + foreach ($this->messages as $type => $messages) { foreach ($messages as $id => $message) { + /** @var $message AbstractMessage */ if (!$message->getIsSticky()) { - unset($this->_messages[$type][$id]); + unset($this->messages[$type][$id]); } } - if (empty($this->_messages[$type])) { - unset($this->_messages[$type]); + if (empty($this->messages[$type])) { + unset($this->messages[$type]); } } return $this; @@ -93,23 +92,24 @@ class Collection /** * Get last added message if any * - * @return \Magento\Core\Model\Message\AbstractMessage|null + * @return AbstractMessage|null */ public function getLastAddedMessage() { - return $this->_lastAddedMessage; + return $this->lastAddedMessage; } /** * Get first even message by identifier * * @param string $identifier - * @return \Magento\Core\Model\Message\AbstractMessage|null + * @return AbstractMessage|null */ public function getMessageByIdentifier($identifier) { - foreach ($this->_messages as $messages) { + foreach ($this->messages as $messages) { foreach ($messages as $message) { + /** @var $message AbstractMessage */ if ($identifier === $message->getIdentifier()) { return $message; } @@ -124,13 +124,14 @@ class Collection */ public function deleteMessageByIdentifier($identifier) { - foreach ($this->_messages as $type => $messages) { + foreach ($this->messages as $type => $messages) { foreach ($messages as $id => $message) { + /** @var $message AbstractMessage */ if ($identifier === $message->getIdentifier()) { - unset($this->_messages[$type][$id]); + unset($this->messages[$type][$id]); } - if (empty($this->_messages[$type])) { - unset($this->_messages[$type]); + if (empty($this->messages[$type])) { + unset($this->messages[$type]); } } } @@ -139,17 +140,17 @@ class Collection /** * Retrieve messages collection items * - * @param string $type - * @return array + * @param string $type + * @return array */ public function getItems($type = null) { if ($type) { - return isset($this->_messages[$type]) ? $this->_messages[$type] : array(); + return isset($this->messages[$type]) ? $this->messages[$type] : array(); } $arrRes = array(); - foreach ($this->_messages as $messages) { + foreach ($this->messages as $messages) { $arrRes = array_merge($arrRes, $messages); } @@ -159,12 +160,12 @@ class Collection /** * Retrieve all messages by type * - * @param string $type - * @return array + * @param string $type + * @return array */ public function getItemsByType($type) { - return isset($this->_messages[$type]) ? $this->_messages[$type] : array(); + return isset($this->messages[$type]) ? $this->messages[$type] : array(); } /** @@ -174,7 +175,7 @@ class Collection */ public function getErrors() { - return $this->getItemsByType(\Magento\Core\Model\Message::ERROR); + return $this->getItemsByType(Factory::ERROR); } /** @@ -200,11 +201,11 @@ class Collection public function count($type = null) { if ($type) { - if (isset($this->_messages[$type])) { - return count($this->_messages[$type]); + if (isset($this->messages[$type])) { + return count($this->messages[$type]); } return 0; } - return count($this->_messages); + return count($this->messages); } } diff --git a/lib/Magento/Message/CollectionFactory.php b/lib/Magento/Message/CollectionFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..9ce6ce150f750d3c72d179d3827daee6a5dece9a --- /dev/null +++ b/lib/Magento/Message/CollectionFactory.php @@ -0,0 +1,57 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Message; + +/** + * Message collection factory + */ +class CollectionFactory +{ + /** + * Object Manager instance + * + * @var \Magento\ObjectManager + */ + protected $objectManager; + + /** + * @param \Magento\ObjectManager $objectManager + */ + public function __construct(\Magento\ObjectManager $objectManager) + { + $this->objectManager = $objectManager; + } + + /** + * Create class instance with specified parameters + * + * @param array $data + * @return Collection + */ + public function create(array $data = array()) + { + return $this->objectManager->create('Magento\Message\Collection', $data); + } +} diff --git a/app/code/Magento/Core/Model/Message/Error.php b/lib/Magento/Message/Error.php similarity index 75% rename from app/code/Magento/Core/Model/Message/Error.php rename to lib/Magento/Message/Error.php index 627bef407d5bf00106cbd237d7c7dfce66c89ad1..59f694976f5e00d183e869aa16f681e3810ac288 100644 --- a/app/code/Magento/Core/Model/Message/Error.php +++ b/lib/Magento/Message/Error.php @@ -18,22 +18,19 @@ * 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_Core * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\Message; -namespace Magento\Core\Model\Message; - -class Error extends \Magento\Core\Model\Message\AbstractMessage +/** + * Error message model + */ +class Error extends AbstractMessage { /** - * @param string $code + * @var string */ - public function __construct($code) - { - parent::__construct(\Magento\Core\Model\Message::ERROR, $code); - } + protected $type = Factory::ERROR; } diff --git a/lib/Magento/Message/Factory.php b/lib/Magento/Message/Factory.php new file mode 100644 index 0000000000000000000000000000000000000000..27de2b825a1b834dd14b4254ef8e6b1212f5fb80 --- /dev/null +++ b/lib/Magento/Message/Factory.php @@ -0,0 +1,160 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Message; + +/** + * Message model factory + */ +class Factory +{ + /** + * Error type + */ + const ERROR = 'error'; + + /** + * Warning type + */ + const WARNING = 'warning'; + + /** + * Notice type + */ + const NOTICE = 'notice'; + + /** + * Success type + */ + const SUCCESS = 'success'; + + /** + * Allowed message types + * + * @var array + */ + protected $types = array( + self::ERROR, + self::WARNING, + self::NOTICE, + self::SUCCESS, + ); + + /** + * Object Manager instance + * + * @var \Magento\ObjectManager + */ + protected $objectManager; + + /** + * Factory constructor + * + * @param \Magento\ObjectManager $objectManager + */ + public function __construct(\Magento\ObjectManager $objectManager) + { + $this->objectManager = $objectManager; + } + + /** + * Create message instance with specified parameters + * + * @param $type + * @param string $code + * @param string $class + * @param string $method + * @throws \InvalidArgumentException + * @return AbstractMessage + */ + public function create($type, $code = '', $class = '', $method = '') + { + if (!in_array($type, $this->types)) { + throw new \InvalidArgumentException('Wrong message type'); + } + + $className = 'Magento\Message\\' . ucfirst($type); + $message = $this->objectManager->create($className, array('code' => $code)); + if (!($message instanceof AbstractMessage)) { + throw new \InvalidArgumentException($className . ' doesn\'t extends \Magento\Message\AbstractMessage'); + } + + $message->setClass($class); + $message->setMethod($method); + + return $message; + } + + /** + * Create error message + * + * @param $code + * @param string $class + * @param string $method + * @return Error + */ + public function error($code, $class='', $method='') + { + return $this->create(self::ERROR, $code, $class, $method); + } + + /** + * Create warning message + * + * @param $code + * @param string $class + * @param string $method + * @return Warning + */ + public function warning($code, $class='', $method='') + { + return $this->create(self::WARNING, $code, $class, $method); + } + + /** + * Create notice message + * + * @param $code + * @param string $class + * @param string $method + * @return Notice + */ + public function notice($code, $class='', $method='') + { + return $this->create(self::NOTICE, $code, $class, $method); + } + + /** + * Create success message + * + * @param $code + * @param string $class + * @param string $method + * @return Success + */ + public function success($code, $class='', $method='') + { + return $this->create(self::SUCCESS, $code, $class, $method); + } +} diff --git a/app/code/Magento/Core/Model/Message/Notice.php b/lib/Magento/Message/Notice.php similarity index 75% rename from app/code/Magento/Core/Model/Message/Notice.php rename to lib/Magento/Message/Notice.php index 71fb94e3d61caab46b0c22cd8bea9ad0182ce550..003b9a19aa23711f391a0e1d8b36f0be718a5889 100644 --- a/app/code/Magento/Core/Model/Message/Notice.php +++ b/lib/Magento/Message/Notice.php @@ -18,22 +18,19 @@ * 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_Core * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\Message; -namespace Magento\Core\Model\Message; - -class Notice extends \Magento\Core\Model\Message\AbstractMessage +/** + * Notice message model + */ +class Notice extends AbstractMessage { /** - * @param string $code + * @var string */ - public function __construct($code) - { - parent::__construct(\Magento\Core\Model\Message::NOTICE, $code); - } + protected $type = Factory::NOTICE; } diff --git a/app/code/Magento/Core/Model/Message/Success.php b/lib/Magento/Message/Success.php similarity index 75% rename from app/code/Magento/Core/Model/Message/Success.php rename to lib/Magento/Message/Success.php index 0ae1402de70adc3ef5d6954a286246f704c2a8a2..036f64bab7c2a89277816812b89d341757d5c94f 100644 --- a/app/code/Magento/Core/Model/Message/Success.php +++ b/lib/Magento/Message/Success.php @@ -18,22 +18,19 @@ * 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_Core * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\Message; -namespace Magento\Core\Model\Message; - -class Success extends \Magento\Core\Model\Message\AbstractMessage +/** + * Success message model + */ +class Success extends AbstractMessage { /** - * @param string $code + * @var string */ - public function __construct($code) - { - parent::__construct(\Magento\Core\Model\Message::SUCCESS, $code); - } + protected $type = Factory::SUCCESS; } diff --git a/app/code/Magento/Core/Model/Message/Warning.php b/lib/Magento/Message/Warning.php similarity index 75% rename from app/code/Magento/Core/Model/Message/Warning.php rename to lib/Magento/Message/Warning.php index e298bf7e78f0dae7d9b81d47701b82f700d49b62..fd0a874a08dffda94edf838c11843ebc8a2b3655 100644 --- a/app/code/Magento/Core/Model/Message/Warning.php +++ b/lib/Magento/Message/Warning.php @@ -18,22 +18,19 @@ * 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_Core * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\Message; -namespace Magento\Core\Model\Message; - -class Warning extends \Magento\Core\Model\Message\AbstractMessage +/** + * Warning message model + */ +class Warning extends AbstractMessage { /** - * @param string $code + * @var string */ - public function __construct($code) - { - parent::__construct(\Magento\Core\Model\Message::WARNING, $code); - } + protected $type = Factory::WARNING; } diff --git a/lib/Magento/ObjectManager/Factory/Factory.php b/lib/Magento/ObjectManager/Factory/Factory.php index b43943c92d893e937c3126f9f9ca7f02e750673d..efc146c1635f4297541e1468cea222c4659d75f4 100644 --- a/lib/Magento/ObjectManager/Factory/Factory.php +++ b/lib/Magento/ObjectManager/Factory/Factory.php @@ -166,10 +166,6 @@ class Factory implements \Magento\ObjectManager\Factory { $type = $this->_config->getInstanceType($requestedType); $parameters = $this->_definitions->getParameters($type); - if (!isset($this->_instances[$type])) { - $this->_instances[$type] = 0; - } - $this->_instances[$type]++; if ($parameters == null) { return new $type(); } diff --git a/lib/Magento/Phrase/Renderer/Composite.php b/lib/Magento/Phrase/Renderer/Composite.php index 432eb3590a95b53c54c76f7adda18ae545696dea..511081a56cb55365228fa12db85df9206c35b2d8 100644 --- a/lib/Magento/Phrase/Renderer/Composite.php +++ b/lib/Magento/Phrase/Renderer/Composite.php @@ -65,7 +65,7 @@ class Composite implements \Magento\Phrase\RendererInterface */ protected function _append($render) { - array_push($this->_renderers, $this->_rendererFactory->create($render)); + $this->_renderers[] = $this->_rendererFactory->create($render); } /** diff --git a/lib/Magento/TranslateInterface.php b/lib/Magento/TranslateInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..9a26798cafaff98830b1d420b2633096a981f103 --- /dev/null +++ b/lib/Magento/TranslateInterface.php @@ -0,0 +1,63 @@ +<?php +/** + * Translator interface + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +namespace Magento; + +/** + * @todo change this interface when i18n-related logic is moved to library + */ +interface TranslateInterface +{ + /** + * Translate + * + * @param array $args + * @return string + */ + public function translate($args); + + /** + * Parse and save edited translate + * + * @param array $translate + */ + public function processAjaxPost($translate); + + /** + * Replace translation templates with HTML fragments + * + * @param array|string $body + * @param bool $isJson + */ + public function processResponseBody(&$body, $isJson = false); + + /** + * Set Translate inline mode + * + * @param bool $flag + * @return \Magento\TranslateInterface + */ + public function setTranslateInline($flag); +} diff --git a/app/code/Magento/Core/Block/AbstractBlock.php b/lib/Magento/View/Block/AbstractBlock.php similarity index 92% rename from app/code/Magento/Core/Block/AbstractBlock.php rename to lib/Magento/View/Block/AbstractBlock.php index cf7e77b9350ed34a586040b75fc362e58c0b1a5d..0de570a0db55fb97a7ecf5c1a4de1315674103e1 100644 --- a/app/code/Magento/Core/Block/AbstractBlock.php +++ b/lib/Magento/View/Block/AbstractBlock.php @@ -18,13 +18,11 @@ * 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_Core * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Core\Block; +namespace Magento\View\Block; use Magento\View\Element\BlockInterface; @@ -52,7 +50,7 @@ abstract class AbstractBlock extends \Magento\Object implements BlockInterface protected $_session; /** - * @var \Magento\Core\Model\Translate + * @var \Magento\TranslateInterface */ protected $_translator; @@ -82,18 +80,20 @@ abstract class AbstractBlock extends \Magento\Object implements BlockInterface /** * Messages block instance * - * @var \Magento\Core\Block\Messages + * @var \Magento\View\Block\Messages */ - protected $_messagesBlock = null; + protected $_messagesBlock; /** * Block html frame open tag + * * @var string */ protected $_frameOpenTag; /** * Block html frame close tag + * * @var string */ protected $_frameCloseTag; @@ -121,7 +121,7 @@ abstract class AbstractBlock extends \Magento\Object implements BlockInterface protected $_frontController; /** - * @var \Magento\Core\Model\Factory\Helper + * @var \Magento\App\Helper\HelperFactory */ protected $_helperFactory; @@ -165,13 +165,13 @@ abstract class AbstractBlock extends \Magento\Object implements BlockInterface /** * @var \Magento\Core\Model\LocaleInterface */ - protected $locale; + protected $_locale; /** - * @param \Magento\Core\Block\Context $context + * @param \Magento\View\Block\Context $context * @param array $data */ - public function __construct(\Magento\Core\Block\Context $context, array $data = array()) + public function __construct(\Magento\View\Block\Context $context, array $data = array()) { $this->_request = $context->getRequest(); $this->_layout = $context->getLayout(); @@ -191,7 +191,7 @@ abstract class AbstractBlock extends \Magento\Object implements BlockInterface $this->_app = $context->getApp(); $this->_escaper = $context->getEscaper(); $this->filterManager = $context->getFilterManager(); - $this->locale = $context->getLocale(); + $this->_locale = $context->getLocale(); parent::__construct($data); $this->_construct(); } @@ -208,7 +208,6 @@ abstract class AbstractBlock extends \Magento\Object implements BlockInterface * Internal constructor, that is called from real constructor * * Please override this one instead of overriding real __construct constructor - * */ protected function _construct() { @@ -220,7 +219,7 @@ abstract class AbstractBlock extends \Magento\Object implements BlockInterface /** * Retrieve parent block * - * @return \Magento\Core\Block\AbstractBlock|bool + * @return \Magento\View\Block\AbstractBlock|bool */ public function getParentBlock() { @@ -239,7 +238,7 @@ abstract class AbstractBlock extends \Magento\Object implements BlockInterface * Set layout object * * @param \Magento\View\LayoutInterface $layout - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ public function setLayout(\Magento\View\LayoutInterface $layout) { @@ -255,7 +254,7 @@ abstract class AbstractBlock extends \Magento\Object implements BlockInterface * * You can redefine this method in child classes for changing layout * - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ protected function _prepareLayout() { @@ -276,7 +275,7 @@ abstract class AbstractBlock extends \Magento\Object implements BlockInterface * Sets/changes name of a block in layout * * @param string $name - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ public function setNameInLayout($name) { @@ -312,7 +311,7 @@ abstract class AbstractBlock extends \Magento\Object implements BlockInterface * * @param string $name * @param mixed $value - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ public function setAttribute($name, $value = null) { @@ -323,8 +322,8 @@ abstract class AbstractBlock extends \Magento\Object implements BlockInterface * Set child block * * @param string $alias - * @param \Magento\Core\Block\AbstractBlock|string $block - * @return \Magento\Core\Block\AbstractBlock + * @param \Magento\View\Block\AbstractBlock|string $block + * @return \Magento\View\Block\AbstractBlock */ public function setChild($alias, $block) { @@ -351,7 +350,7 @@ abstract class AbstractBlock extends \Magento\Object implements BlockInterface * @param string $alias * @param string $block * @param array $data - * @return \Magento\Core\Block\AbstractBlock new block + * @return \Magento\View\Block\AbstractBlock new block */ public function addChild($alias, $block, $data = array()) { @@ -366,7 +365,7 @@ abstract class AbstractBlock extends \Magento\Object implements BlockInterface * Unset child block * * @param string $alias - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ public function unsetChild($alias) { @@ -395,7 +394,7 @@ abstract class AbstractBlock extends \Magento\Object implements BlockInterface * @param string $callback * @param mixed $result * @param array $params - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ public function unsetCallChild($alias, $callback, $result, $params) { @@ -419,7 +418,7 @@ abstract class AbstractBlock extends \Magento\Object implements BlockInterface /** * Unset all children blocks * - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ public function unsetChildren() { @@ -439,7 +438,7 @@ abstract class AbstractBlock extends \Magento\Object implements BlockInterface * Retrieve child block by name * * @param string $alias - * @return \Magento\Core\Block\AbstractBlock|bool + * @return \Magento\View\Block\AbstractBlock|bool */ public function getChildBlock($alias) { @@ -533,11 +532,11 @@ abstract class AbstractBlock extends \Magento\Object implements BlockInterface * * By default inserts as first element into children list * - * @param \Magento\Core\Block\AbstractBlock|string $element + * @param \Magento\View\Block\AbstractBlock|string $element * @param string|int|null $siblingName * @param bool $after * @param string $alias - * @return \Magento\Core\Block\AbstractBlock|bool + * @return \Magento\View\Block\AbstractBlock|bool */ public function insert($element, $siblingName = 0, $after = true, $alias = '') { @@ -545,7 +544,7 @@ abstract class AbstractBlock extends \Magento\Object implements BlockInterface if (!$layout) { return false; } - if ($element instanceof \Magento\Core\Block\AbstractBlock) { + if ($element instanceof \Magento\View\Block\AbstractBlock) { $elementName = $element->getNameInLayout(); } else { $elementName = $element; @@ -558,9 +557,9 @@ abstract class AbstractBlock extends \Magento\Object implements BlockInterface /** * Append element to the end of children list * - * @param \Magento\Core\Block\AbstractBlock|string $element + * @param \Magento\View\Block\AbstractBlock|string $element * @param string $alias - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ public function append($element, $alias = '') { @@ -601,7 +600,7 @@ abstract class AbstractBlock extends \Magento\Object implements BlockInterface /** * Before rendering html, but after trying to load cache * - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ protected function _beforeToHtml() { @@ -613,7 +612,7 @@ abstract class AbstractBlock extends \Magento\Object implements BlockInterface * * @param $openTag * @param $closeTag - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ public function setFrameTags($openTag, $closeTag = null) { @@ -687,8 +686,11 @@ abstract class AbstractBlock extends \Magento\Object implements BlockInterface } /** - * Retrieve data-ui-id attribute which will distinguish link/input/container/anything else in template among others - * Function takes an arbitrary amount of parameters + * Retrieve data-ui-id attribute + * + * Retrieve data-ui-id attribute which will distinguish + * link/input/container/anything else in template among others. + * Function takes an arbitrary amount of parameters. * * @return string */ @@ -699,6 +701,7 @@ abstract class AbstractBlock extends \Magento\Object implements BlockInterface /** * Generate id for using in JavaScript UI + * * Function takes an arbitrary amount of parameters * * @return string @@ -779,7 +782,7 @@ abstract class AbstractBlock extends \Magento\Object implements BlockInterface /** * Retrieve messages block * - * @return \Magento\Core\Block\Messages + * @return \Magento\View\Block\Messages */ public function getMessagesBlock() { @@ -792,10 +795,10 @@ abstract class AbstractBlock extends \Magento\Object implements BlockInterface /** * Set messages block * - * @param \Magento\Core\Block\Messages $block - * @return \Magento\Core\Block\AbstractBlock + * @param \Magento\View\Block\Messages $block + * @return \Magento\View\Block\AbstractBlock */ - public function setMessagesBlock(\Magento\Core\Block\Messages $block) + public function setMessagesBlock(\Magento\View\Block\Messages $block) { $this->_messagesBlock = $block; return $this; @@ -805,7 +808,7 @@ abstract class AbstractBlock extends \Magento\Object implements BlockInterface * Return helper object * * @param string $name - * @return \Magento\Core\Helper\AbstractHelper + * @return \Magento\App\Helper\AbstractHelper */ public function helper($name) { @@ -823,7 +826,7 @@ abstract class AbstractBlock extends \Magento\Object implements BlockInterface public function formatDate( $date = null, $format = \Magento\Core\Model\LocaleInterface::FORMAT_TYPE_SHORT, $showTime = false ) { - return $this->locale->formatDate($date, $format, $showTime); + return $this->_locale->formatDate($date, $format, $showTime); } /** @@ -837,7 +840,7 @@ abstract class AbstractBlock extends \Magento\Object implements BlockInterface public function formatTime( $time = null, $format = \Magento\Core\Model\LocaleInterface::FORMAT_TYPE_SHORT, $showDate = false ) { - return $this->locale->formatTime($time, $format, $showDate); + return $this->_locale->formatTime($time, $format, $showDate); } /** @@ -906,6 +909,7 @@ abstract class AbstractBlock extends \Magento\Object implements BlockInterface /** * Escape quotes inside html attributes + * * Use $addSlashes = false for escaping js that inside html attribute (onClick, onSubmit etc) * * @param string $data @@ -942,12 +946,12 @@ abstract class AbstractBlock extends \Magento\Object implements BlockInterface /** * Prepare url for save to cache * - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ protected function _beforeCacheUrl() { if ($this->_cacheState->isEnabled(self::CACHE_GROUP)) { - $this->_storeManager->setUseSessionVar(true); + $this->_app->setUseSessionVar(true); } return $this; } @@ -961,7 +965,7 @@ abstract class AbstractBlock extends \Magento\Object implements BlockInterface protected function _afterCacheUrl($html) { if ($this->_cacheState->isEnabled(self::CACHE_GROUP)) { - $this->_storeManager->setUseSessionVar(false); + $this->_app->setUseSessionVar(false); \Magento\Profiler::start('CACHE_URL'); $html = $this->_urlBuilder->sessionUrlVar($html); \Magento\Profiler::stop('CACHE_URL'); @@ -971,6 +975,7 @@ abstract class AbstractBlock extends \Magento\Object implements BlockInterface /** * Get cache key informative items + * * Provide string array key to share specific info item with FPC placeholder * * @return array @@ -1059,7 +1064,7 @@ abstract class AbstractBlock extends \Magento\Object implements BlockInterface * Save block content to cache storage * * @param string $data - * @return \Magento\Core\Block\AbstractBlock + * @return \Magento\View\Block\AbstractBlock */ protected function _saveCache($data) { diff --git a/app/code/Magento/Core/Block/Context.php b/lib/Magento/View/Block/Context.php similarity index 91% rename from app/code/Magento/Core/Block/Context.php rename to lib/Magento/View/Block/Context.php index 3784bf13b727f88f397d92592c564ba59f676016..f2a88da0db780161b2999532655b4da562e79ae8 100644 --- a/app/code/Magento/Core/Block/Context.php +++ b/lib/Magento/View/Block/Context.php @@ -1,8 +1,5 @@ <?php /** - * Abstract block context object. Will be used as block constructor modification point after release. - * Important: Should not be modified by extension developers. - * * Magento * * NOTICE OF LICENSE @@ -24,8 +21,18 @@ * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Core\Block; +namespace Magento\View\Block; + +/** + * Abstract block context object + * + * Will be used as block constructor modification point after release. + * Important: Should not be modified by extension developers. + * + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Context implements \Magento\ObjectManager\ContextInterface { /** @@ -49,7 +56,7 @@ class Context implements \Magento\ObjectManager\ContextInterface protected $_urlBuilder; /** - * @var \Magento\Core\Model\Translate + * @var \Magento\TranslateInterface */ protected $_translator; @@ -79,7 +86,7 @@ class Context implements \Magento\ObjectManager\ContextInterface protected $_frontController; /** - * @var \Magento\Core\Model\Factory\Helper + * @var \Magento\App\Helper\HelperFactory */ protected $_helperFactory; @@ -130,13 +137,13 @@ class Context implements \Magento\ObjectManager\ContextInterface * @param \Magento\View\LayoutInterface $layout * @param \Magento\Event\ManagerInterface $eventManager * @param \Magento\UrlInterface $urlBuilder - * @param \Magento\Core\Model\Translate $translator + * @param \Magento\TranslateInterface $translator * @param \Magento\App\CacheInterface $cache * @param \Magento\View\DesignInterface $design * @param \Magento\Core\Model\Session\AbstractSession $session * @param \Magento\Core\Model\Store\Config $storeConfig * @param \Magento\App\FrontController $frontController - * @param \Magento\Core\Model\Factory\Helper $helperFactory + * @param \Magento\App\Helper\HelperFactory $helperFactory * @param \Magento\View\Url $viewUrl * @param \Magento\View\ConfigInterface $viewConfig * @param \Magento\App\Cache\StateInterface $cacheState @@ -146,19 +153,22 @@ class Context implements \Magento\ObjectManager\ContextInterface * @param \Magento\Filter\FilterManager $filterManager * @param \Magento\Core\Model\LocaleInterface $locale * @param array $data + * + * @SuppressWarnings(PHPMD.ExcessiveParameterList) + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function __construct( \Magento\App\RequestInterface $request, \Magento\View\LayoutInterface $layout, \Magento\Event\ManagerInterface $eventManager, \Magento\UrlInterface $urlBuilder, - \Magento\Core\Model\Translate $translator, + \Magento\TranslateInterface $translator, \Magento\App\CacheInterface $cache, \Magento\View\DesignInterface $design, \Magento\Core\Model\Session\AbstractSession $session, \Magento\Core\Model\Store\Config $storeConfig, \Magento\App\FrontController $frontController, - \Magento\Core\Model\Factory\Helper $helperFactory, + \Magento\App\Helper\HelperFactory $helperFactory, \Magento\View\Url $viewUrl, \Magento\View\ConfigInterface $viewConfig, \Magento\App\Cache\StateInterface $cacheState, @@ -223,7 +233,7 @@ class Context implements \Magento\ObjectManager\ContextInterface } /** - * @return \Magento\Core\Model\Factory\Helper + * @return \Magento\App\Helper\HelperFactory */ public function getHelperFactory() { @@ -263,7 +273,7 @@ class Context implements \Magento\ObjectManager\ContextInterface } /** - * @return \Magento\Core\Model\Translate + * @return \Magento\TranslateInterface */ public function getTranslator() { diff --git a/app/code/Magento/Core/Block/Html/Calendar.php b/lib/Magento/View/Block/Html/Calendar.php similarity index 82% rename from app/code/Magento/Core/Block/Html/Calendar.php rename to lib/Magento/View/Block/Html/Calendar.php index f295accc21bfbe857e0e725fd090356aa45ce9b6..12aaaa9f833a8889835a01555217c93b6a532e4d 100644 --- a/app/code/Magento/Core/Block/Html/Calendar.php +++ b/lib/Magento/View/Block/Html/Calendar.php @@ -18,23 +18,18 @@ * 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_Core * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\View\Block\Html; + /** * Calendar block for page header - * Prepares localization data for calendar * - * @category Magento - * @package Magento_Core - * @author Magento Core Team <core@magentocommerce.com> + * Prepares localization data for calendar */ -namespace Magento\Core\Block\Html; - -class Calendar extends \Magento\Core\Block\Template +class Calendar extends \Magento\View\Block\Template { /** * Date model @@ -44,31 +39,26 @@ class Calendar extends \Magento\Core\Block\Template protected $_date; /** - * Core locale - * - * @var \Magento\Core\Model\LocaleInterface - */ - protected $_locale; - - /** - * @param \Magento\Core\Model\LocaleInterface $locale - * @param \Magento\Core\Model\Date $date + * @param \Magento\View\Block\Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context + * @param \Magento\Core\Model\Date $date * @param array $data */ public function __construct( - \Magento\Core\Model\LocaleInterface $locale, - \Magento\Core\Model\Date $date, + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, + \Magento\Core\Model\Date $date, array $data = array() ) { - $this->_locale = $locale; $this->_date = $date; - parent::__construct($coreData, $context, $data); + parent::__construct($context, $coreData, $data); } + /** + * Render block HTML + * + * @return string + */ protected function _toHtml() { $localeCode = $this->_locale->getLocaleCode(); @@ -97,8 +87,10 @@ class Calendar extends \Magento\Core\Block\Template $this->assign('pm', $helper->jsonEncode(\Zend_Locale_Data::getContent($localeCode, 'pm'))); // get first day of week and weekend days - $this->assign('firstDay', (int)$this->_storeConfig->getConfig('general/locale/firstday')); - $this->assign('weekendDays', $helper->jsonEncode((string)$this->_storeConfig->getConfig('general/locale/weekend'))); + $this->assign('firstDay', (int)$this->_storeConfig->getConfig('general/locale/firstday')); + $this->assign('weekendDays', $helper->jsonEncode( + (string)$this->_storeConfig->getConfig('general/locale/weekend') + )); // define default format and tooltip format $this->assign( diff --git a/app/code/Magento/Core/Block/Html/Date.php b/lib/Magento/View/Block/Html/Date.php similarity index 79% rename from app/code/Magento/Core/Block/Html/Date.php rename to lib/Magento/View/Block/Html/Date.php index 25051bdc5aa6a440d584a9d85f8bedde80c394c2..85030c9738d71471331a039555eb10bd9d726491 100644 --- a/app/code/Magento/Core/Block/Html/Date.php +++ b/lib/Magento/View/Block/Html/Date.php @@ -18,28 +18,27 @@ * 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_Core * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\View\Block\Html; /** - * HTML select element block - * - * @category Magento - * @package Magento_Core - * @author Magento Core Team <core@magentocommerce.com> + * Date element block */ -namespace Magento\Core\Block\Html; - -class Date extends \Magento\Core\Block\Template +class Date extends \Magento\View\Block\Template { + /** + * Render block HTML + * + * @return string + */ protected function _toHtml() { $html = '<input type="text" name="' . $this->getName() . '" id="' . $this->getId() . '" '; - $html .= 'value="' . $this->escapeHtml($this->getValue()) . '" class="' . $this->getClass() . '" ' . $this->getExtraParams() . '/> '; + $html .= 'value="' . $this->escapeHtml($this->getValue()) . '" '; + $html .= 'class="' . $this->getClass() . '" ' . $this->getExtraParams() . '/> '; $calendarYearsRange = $this->getYearsRange(); $html .= '<script type="text/javascript"> @@ -62,15 +61,26 @@ class Date extends \Magento\Core\Block\Template return $html; } - public function getEscapedValue($index=null) { - - if($this->getFormat() && $this->getValue()) { + /** + * Convert special characters to HTML entities + * + * @return string + */ + public function getEscapedValue() + { + if ($this->getFormat() && $this->getValue()) { return strftime($this->getFormat(), strtotime($this->getValue())); } - return htmlspecialchars($this->getValue()); } + /** + * Produce and return block's html output + * + * {@inheritdoc} + * + * @return string + */ public function getHtml() { return $this->toHtml(); diff --git a/app/code/Magento/Core/Block/Html/Link.php b/lib/Magento/View/Block/Html/Link.php similarity index 80% rename from app/code/Magento/Core/Block/Html/Link.php rename to lib/Magento/View/Block/Html/Link.php index 1cb52100a05b66163594ee052fb7bf5986cdacce..9b1be038cf4ce28e10b3e8a635bb8193eda6d26d 100644 --- a/app/code/Magento/Core/Block/Html/Link.php +++ b/lib/Magento/View/Block/Html/Link.php @@ -18,29 +18,19 @@ * 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_Core * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\View\Block\Html; /** * HTML anchor element block - * - * @category Magento - * @package Magento_Core - * @author Magento Core Team <core@magentocommerce.com> */ -namespace Magento\Core\Block\Html; - -class Link extends \Magento\Core\Block\Template +class Link extends \Magento\View\Block\Template { - - protected $_template = 'Magento_Core::link.phtml'; - /** - * Prepare link attributes as serialized and formated string + * Prepare link attributes as serialized and formatted string * * @return string */ @@ -66,6 +56,7 @@ class Link extends \Magento\Core\Block\Template if (!empty($attributes)) { return $this->serialize($attributes); } + return ''; } @@ -78,15 +69,27 @@ class Link extends \Magento\Core\Block\Template * @param string $quote * @return string */ - public function serialize($attributes = array(), $valueSeparator='=', $fieldSeparator=' ', $quote='"') + public function serialize($attributes = array(), $valueSeparator = '=', $fieldSeparator = ' ', $quote = '"') { - $res = ''; $data = array(); - foreach ($attributes as $key => $value) { $data[] = $key . $valueSeparator . $quote . $value . $quote; } - $res = implode($fieldSeparator, $data); - return $res; + + return implode($fieldSeparator, $data); + } + + /** + * Render block HTML + * + * @return string + */ + protected function _toHtml() + { + if (false != $this->getTemplate()) { + return parent::_toHtml(); + } + + return '<a ' . $this->getLinkAttributes() . ' >' . $this->escapeHtml($this->getAnchorText()) . '</a>'; } } diff --git a/app/code/Magento/Core/Block/Html/Select.php b/lib/Magento/View/Block/Html/Select.php similarity index 86% rename from app/code/Magento/Core/Block/Html/Select.php rename to lib/Magento/View/Block/Html/Select.php index 78abf03958caaea02bcf29f66fcd6da9e6820c9a..719f687a56a3f6826d66f71204cfd97d468ebb92 100644 --- a/app/code/Magento/Core/Block/Html/Select.php +++ b/lib/Magento/View/Block/Html/Select.php @@ -18,25 +18,20 @@ * 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_Core * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\View\Block\Html; /** * HTML select element block - * - * @category Magento - * @package Magento_Core - * @author Magento Core Team <core@magentocommerce.com> */ -namespace Magento\Core\Block\Html; - -class Select extends \Magento\Core\Block\AbstractBlock +class Select extends \Magento\View\Block\AbstractBlock { - + /** + * @var array + */ protected $_options = array(); /** @@ -53,7 +48,7 @@ class Select extends \Magento\Core\Block\AbstractBlock * Set options for the HTML select * * @param array $options - * @return \Magento\Core\Block\Html\Select + * @return Select */ public function setOptions($options) { @@ -67,9 +62,9 @@ class Select extends \Magento\Core\Block\AbstractBlock * @param string $value HTML value * @param string $label HTML label * @param array $params HTML attributes - * @return \Magento\Core\Block\Html\Select + * @return Select */ - public function addOption($value, $label, $params=array()) + public function addOption($value, $label, $params = array()) { $this->_options[] = array('value' => $value, 'label' => $label, 'params' => $params); return $this; @@ -78,12 +73,12 @@ class Select extends \Magento\Core\Block\AbstractBlock /** * Set element's HTML ID * - * @param string $id ID - * @return \Magento\Core\Block\Html\Select + * @param string $elementId ID + * @return Select */ - public function setId($id) + public function setId($elementId) { - $this->setData('id', $id); + $this->setData('id', $elementId); return $this; } @@ -91,7 +86,7 @@ class Select extends \Magento\Core\Block\AbstractBlock * Set element's CSS class * * @param string $class Class - * @return \Magento\Core\Block\Html\Select + * @return Select */ public function setClass($class) { @@ -103,7 +98,7 @@ class Select extends \Magento\Core\Block\AbstractBlock * Set element's HTML title * * @param string $title Title - * @return \Magento\Core\Block\Html\Select + * @return Select */ public function setTitle($title) { @@ -145,6 +140,8 @@ class Select extends \Magento\Core\Block\AbstractBlock * Render HTML * * @return string + * + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _toHtml() { @@ -154,14 +151,10 @@ class Select extends \Magento\Core\Block\AbstractBlock $html = '<select name="' . $this->getName() . '" id="' . $this->getId() . '" class="' . $this->getClass() . '" title="' . $this->getTitle() . '" ' . $this->getExtraParams() . '>'; - $values = $this->getValue(); - if (!is_array($values)){ - if (!is_null($values)) { - $values = array($values); - } else { - $values = array(); - } + $values = $this->getValue(); + if (!is_array($values)) { + $values = (array)$values; } $isArrayOption = true; @@ -234,11 +227,13 @@ class Select extends \Magento\Core\Block\AbstractBlock } } - return sprintf('<option value="%s"%s %s>%s</option>', + return sprintf( + '<option value="%s"%s %s>%s</option>', $this->escapeHtml($option['value']), $selectedHtml, $params, - $this->escapeHtml($option['label'])); + $this->escapeHtml($option['label']) + ); } /** diff --git a/app/code/Magento/Core/Block/Messages.php b/lib/Magento/View/Block/Messages.php similarity index 55% rename from app/code/Magento/Core/Block/Messages.php rename to lib/Magento/View/Block/Messages.php index 100f6675ea09597cb5acb3153fcfd0d6bdf71e85..8315db985c1158850ee89f0beca9875899d3992d 100644 --- a/app/code/Magento/Core/Block/Messages.php +++ b/lib/Magento/View/Block/Messages.php @@ -18,114 +18,108 @@ * 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_Core * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\View\Block; + /** - * Messages block - * - * @category Magento - * @package Magento_Core - * @author Magento Core Team <core@magentocommerce.com> + * Class Messages */ -namespace Magento\Core\Block; - -class Messages extends \Magento\Core\Block\Template +class Messages extends \Magento\View\Block\Template { /** * Messages collection * - * @var \Magento\Core\Model\Message\Collection + * @var \Magento\Message\Collection */ - protected $_messages; + protected $messages; /** * Store first level html tag name for messages html output * * @var string */ - protected $_messagesFirstLevelTagName = 'ul'; + protected $firstLevelTagName = 'ul'; /** * Store second level html tag name for messages html output * * @var string */ - protected $_messagesSecondLevelTagName = 'li'; + protected $secondLevelTagName = 'li'; /** * Store content wrapper html tag name for messages html output * * @var string */ - protected $_messagesContentWrapperTagName = 'span'; + protected $contentWrapTagName = 'span'; /** * Flag which require message text escape * * @var bool */ - protected $_escapeMessageFlag = false; + protected $escapeMessageFlag = false; /** * Storage for used types of message storages * * @var array */ - protected $_usedStorageTypes = array(); + protected $usedStorageTypes = array(); /** * Grouped message types * * @var array */ - protected $_messageTypes = array( - \Magento\Core\Model\Message::ERROR, - \Magento\Core\Model\Message::WARNING, - \Magento\Core\Model\Message::NOTICE, - \Magento\Core\Model\Message::SUCCESS + protected $messageTypes = array( + \Magento\Message\Factory::ERROR, + \Magento\Message\Factory::WARNING, + \Magento\Message\Factory::NOTICE, + \Magento\Message\Factory::SUCCESS ); /** * Message singleton * - * @var \Magento\Core\Model\Message + * @var \Magento\Message\Factory */ - protected $_message; + protected $messageFactory; /** * Message model factory * - * @var \Magento\Core\Model\MessageFactory + * @var \Magento\Message\CollectionFactory */ - protected $_messageFactory; + protected $collectionFactory; /** + * @param Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context - * @param \Magento\Core\Model\Message $message - * @param \Magento\Core\Model\Message\CollectionFactory $messageFactory + * @param \Magento\Message\Factory $messageFactory + * @param \Magento\Message\CollectionFactory $collectionFactory * @param array $data */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, - \Magento\Core\Model\Message $message, - \Magento\Core\Model\Message\CollectionFactory $messageFactory, + \Magento\Message\Factory $messageFactory, + \Magento\Message\CollectionFactory $collectionFactory, array $data = array() ) { - $this->_message = $message; - $this->_messageFactory = $messageFactory; - parent::__construct($coreData, $context, $data); + $this->messageFactory = $messageFactory; + $this->collectionFactory = $collectionFactory; + parent::__construct($context, $coreData, $data); } /** * Preparing global layout * - * @return \Magento\Core\Block\Messages + * @return \Magento\View\Block\Messages */ protected function _prepareLayout() { @@ -139,33 +133,33 @@ class Messages extends \Magento\Core\Block\Template * Set message escape flag * * @param bool $flag - * @return \Magento\Core\Block\Messages + * @return \Magento\View\Block\Messages */ public function setEscapeMessageFlag($flag) { - $this->_escapeMessageFlag = $flag; + $this->escapeMessageFlag = $flag; return $this; } /** * Set messages collection * - * @param \Magento\Core\Model\Message\Collection $messages - * @return \Magento\Core\Block\Messages + * @param \Magento\Message\Collection $messages + * @return \Magento\View\Block\Messages */ - public function setMessages(\Magento\Core\Model\Message\Collection $messages) + public function setMessages(\Magento\Message\Collection $messages) { - $this->_messages = $messages; + $this->messages = $messages; return $this; } /** * Add messages to display * - * @param \Magento\Core\Model\Message\Collection $messages - * @return \Magento\Core\Block\Messages + * @param \Magento\Message\Collection $messages + * @return \Magento\View\Block\Messages */ - public function addMessages(\Magento\Core\Model\Message\Collection $messages) + public function addMessages(\Magento\Message\Collection $messages) { foreach ($messages->getItems() as $message) { $this->getMessageCollection()->add($message); @@ -176,23 +170,23 @@ class Messages extends \Magento\Core\Block\Template /** * Retrieve messages collection * - * @return \Magento\Core\Model\Message\Collection + * @return \Magento\Message\Collection */ public function getMessageCollection() { - if (!($this->_messages instanceof \Magento\Core\Model\Message\Collection)) { - $this->_messages = $this->_messageFactory->create(); + if (!($this->messages instanceof \Magento\Message\Collection)) { + $this->messages = $this->collectionFactory->create(); } - return $this->_messages; + return $this->messages; } /** * Adding new message to message collection * - * @param \Magento\Core\Model\Message\AbstractMessage $message - * @return \Magento\Core\Block\Messages + * @param \Magento\Message\AbstractMessage $message + * @return \Magento\View\Block\Messages */ - public function addMessage(\Magento\Core\Model\Message\AbstractMessage $message) + public function addMessage(\Magento\Message\AbstractMessage $message) { $this->getMessageCollection()->add($message); return $this; @@ -202,11 +196,11 @@ class Messages extends \Magento\Core\Block\Template * Adding new error message * * @param string $message - * @return \Magento\Core\Block\Messages + * @return \Magento\View\Block\Messages */ public function addError($message) { - $this->addMessage($this->_message->error($message)); + $this->addMessage($this->messageFactory->error($message)); return $this; } @@ -214,11 +208,11 @@ class Messages extends \Magento\Core\Block\Template * Adding new warning message * * @param string $message - * @return \Magento\Core\Block\Messages + * @return \Magento\View\Block\Messages */ public function addWarning($message) { - $this->addMessage($this->_message->warning($message)); + $this->addMessage($this->messageFactory->warning($message)); return $this; } @@ -226,11 +220,11 @@ class Messages extends \Magento\Core\Block\Template * Adding new notice message * * @param string $message - * @return \Magento\Core\Block\Messages + * @return \Magento\View\Block\Messages */ public function addNotice($message) { - $this->addMessage($this->_message->notice($message)); + $this->addMessage($this->messageFactory->notice($message)); return $this; } @@ -238,11 +232,11 @@ class Messages extends \Magento\Core\Block\Template * Adding new success message * * @param string $message - * @return \Magento\Core\Block\Messages + * @return \Magento\View\Block\Messages */ public function addSuccess($message) { - $this->addMessage($this->_message->success($message)); + $this->addMessage($this->messageFactory->success($message)); return $this; } @@ -257,25 +251,6 @@ class Messages extends \Magento\Core\Block\Template return $this->getMessageCollection()->getItems($type); } - /** - * Retrieve messages in HTML format - * - * @param string $type - * @return string - */ - public function getHtml($type = null) - { - $html = '<' . $this->_messagesFirstLevelTagName . ' id="admin_messages">'; - foreach ($this->getMessages($type) as $message) { - $html .= '<' . $this->_messagesSecondLevelTagName . ' class="' . $message->getType() . '-msg" ' - . $this->getUiId('message') . '>' - . $this->_escapeMessageFlag ? $this->escapeHtml($message->getText()) : $message->getText() - . '</' . $this->_messagesSecondLevelTagName . '>'; - } - $html .= '</' . $this->_messagesFirstLevelTagName . '>'; - return $html; - } - /** * Return grouped message types * @@ -283,7 +258,7 @@ class Messages extends \Magento\Core\Block\Template */ public function getMessageTypes() { - return $this->_messageTypes; + return $this->messageTypes; } /** @@ -326,24 +301,24 @@ class Messages extends \Magento\Core\Block\Template foreach ($this->getMessageTypes() as $type) { if ($messages = $this->getMessages($type)) { if (!$html) { - $html .= '<' . $this->_messagesFirstLevelTagName . ' class="messages">'; + $html .= '<' . $this->firstLevelTagName . ' class="messages">'; } - $html .= '<' . $this->_messagesSecondLevelTagName . ' class="' . $type . '-msg">'; - $html .= '<' . $this->_messagesFirstLevelTagName . '>'; + $html .= '<' . $this->secondLevelTagName . ' class="' . $type . '-msg">'; + $html .= '<' . $this->firstLevelTagName . '>'; foreach ($messages as $message) { - $html.= '<' . $this->_messagesSecondLevelTagName . '>'; - $html.= '<' . $this->_messagesContentWrapperTagName . $this->getUiId('message', $type) . '>'; - $html.= ($this->_escapeMessageFlag) ? $this->escapeHtml($message->getText()) : $message->getText(); - $html.= '</' . $this->_messagesContentWrapperTagName . '>'; - $html.= '</' . $this->_messagesSecondLevelTagName . '>'; + $html.= '<' . $this->secondLevelTagName . '>'; + $html.= '<' . $this->contentWrapTagName . $this->getUiId('message', $type) . '>'; + $html.= ($this->escapeMessageFlag) ? $this->escapeHtml($message->getText()) : $message->getText(); + $html.= '</' . $this->contentWrapTagName . '>'; + $html.= '</' . $this->secondLevelTagName . '>'; } - $html .= '</' . $this->_messagesFirstLevelTagName . '>'; - $html .= '</' . $this->_messagesSecondLevelTagName . '>'; + $html .= '</' . $this->firstLevelTagName . '>'; + $html .= '</' . $this->secondLevelTagName . '>'; } } if ($html) { - $html .= '</' . $this->_messagesFirstLevelTagName . '>'; + $html .= '</' . $this->firstLevelTagName . '>'; } return $html; } @@ -368,9 +343,9 @@ class Messages extends \Magento\Core\Block\Template * * @param string $tagName */ - public function setMessagesFirstLevelTagName($tagName) + public function setFirstLevelTagName($tagName) { - $this->_messagesFirstLevelTagName = $tagName; + $this->firstLevelTagName = $tagName; } /** @@ -378,9 +353,9 @@ class Messages extends \Magento\Core\Block\Template * * @param string $tagName */ - public function setMessagesSecondLevelTagName($tagName) + public function setSecondLevelTagName($tagName) { - $this->_messagesSecondLevelTagName = $tagName; + $this->secondLevelTagName = $tagName; } /** @@ -391,7 +366,7 @@ class Messages extends \Magento\Core\Block\Template public function getCacheKeyInfo() { return array( - 'storage_types' => serialize($this->_usedStorageTypes) + 'storage_types' => serialize($this->usedStorageTypes) ); } @@ -402,7 +377,7 @@ class Messages extends \Magento\Core\Block\Template */ public function addStorageType($type) { - $this->_usedStorageTypes[] = $type; + $this->usedStorageTypes[] = $type; } /** @@ -412,6 +387,6 @@ class Messages extends \Magento\Core\Block\Template */ public function shouldEscapeMessage() { - return $this->_escapeMessageFlag; + return $this->escapeMessageFlag; } } diff --git a/app/code/Magento/Core/Block/Template.php b/lib/Magento/View/Block/Template.php similarity index 86% rename from app/code/Magento/Core/Block/Template.php rename to lib/Magento/View/Block/Template.php index 16894e9908fd6631b26efe6ecda9a94c00b11803..eab884d1be9c3781b36ccf17947ada404f4b598d 100644 --- a/app/code/Magento/Core/Block/Template.php +++ b/lib/Magento/View/Block/Template.php @@ -18,20 +18,21 @@ * 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_Core * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Core\Block; +namespace Magento\View\Block; /** * Base html block */ -class Template extends \Magento\Core\Block\AbstractBlock +class Template extends AbstractBlock { - const XML_PATH_TEMPLATE_ALLOW_SYMLINK = 'dev/template/allow_symlink'; + /** + * Config path to 'Allow Symlinks' template settings + */ + const XML_PATH_TEMPLATE_ALLOW_SYMLINK = 'dev/template/allow_symlink'; /** * Assigned variables for view @@ -55,7 +56,7 @@ class Template extends \Magento\Core\Block\AbstractBlock * * @var bool */ - protected $_allowSymlinks = null; + protected $_allowSymlinks; /** * @var \Magento\App\Dir @@ -80,9 +81,9 @@ class Template extends \Magento\Core\Block\AbstractBlock protected $_template; /** - * @var \Magento\View\TemplateEngineFactory + * @var \Magento\View\TemplateEnginePool */ - protected $_templateEngineFactory; + protected $templateEnginePool; /** * Core data @@ -92,7 +93,7 @@ class Template extends \Magento\Core\Block\AbstractBlock protected $_coreData; /** - * @var \Magento\Core\Model\App + * @var \Magento\Core\Model\StoreManagerInterface */ protected $_storeManager; @@ -102,22 +103,23 @@ class Template extends \Magento\Core\Block\AbstractBlock protected $_appState; /** + * @param Template\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Block\Template\Context $context * @param array $data + * * @todo Remove injection of the core helper from this class and its descendants, because it's no longer used */ public function __construct( + \Magento\View\Block\Template\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Core\Block\Template\Context $context, array $data = array() ) { $this->_coreData = $coreData; $this->_dirs = $context->getDirs(); $this->_filesystem = $context->getFilesystem(); $this->_viewFileSystem = $context->getViewFileSystem(); - $this->_templateEngineFactory = $context->getEngineFactory(); - $this->_storeManager = $context->getApp(); + $this->templateEnginePool = $context->getEnginePool(); + $this->_storeManager = $context->getStoreManager(); $this->_appState = $context->getAppState(); parent::__construct($context, $data); } @@ -133,7 +135,7 @@ class Template extends \Magento\Core\Block\AbstractBlock * In case template was passed through constructor * we assign it to block's property _template * Mainly for those cases when block created - * not via \Magento\Core\Model\Layout::addBlock() + * not via \Magento\View\LayoutInterface::addBlock() */ if ($this->hasData('template')) { $this->setTemplate($this->getData('template')); @@ -154,7 +156,7 @@ class Template extends \Magento\Core\Block\AbstractBlock * Set path to template used for generating block's output. * * @param string $template - * @return \Magento\Core\Block\Template + * @return \Magento\View\Block\Template */ public function setTemplate($template) { @@ -194,7 +196,7 @@ class Template extends \Magento\Core\Block\AbstractBlock * * @param string|array $key * @param mixed $value - * @return \Magento\Core\Block\Template + * @return \Magento\View\Block\Template */ public function assign($key, $value=null) { @@ -221,10 +223,10 @@ class Template extends \Magento\Core\Block\AbstractBlock if (($this->_filesystem->isPathInDirectory($fileName, $this->_dirs->getDir(\Magento\App\Dir::APP)) || $this->_filesystem->isPathInDirectory($fileName, $this->_dirs->getDir(\Magento\App\Dir::THEMES)) - || $this->_getAllowSymlinks()) && $this->_filesystem->isFile($fileName) + || $this->isAllowSymlinks()) && $this->_filesystem->isFile($fileName) ) { $extension = pathinfo($fileName, PATHINFO_EXTENSION); - $templateEngine = $this->_templateEngineFactory->get($extension); + $templateEngine = $this->templateEnginePool->get($extension); $html = $templateEngine->render($this, $fileName, $this->_viewVars); } else { $html = ''; @@ -289,11 +291,11 @@ class Template extends \Magento\Core\Block\AbstractBlock } /** - * Get is allowed symliks flag + * Get is allowed symlinks flag * * @return bool */ - protected function _getAllowSymlinks() + protected function isAllowSymlinks() { if (is_null($this->_allowSymlinks)) { $this->_allowSymlinks = $this->_storeConfig->getConfigFlag(self::XML_PATH_TEMPLATE_ALLOW_SYMLINK); diff --git a/app/code/Magento/Core/Block/Template/Context.php b/lib/Magento/View/Block/Template/Context.php similarity index 76% rename from app/code/Magento/Core/Block/Template/Context.php rename to lib/Magento/View/Block/Template/Context.php index 4df26e902500822cb15a08e2d3247e9425a6257c..ff98e22640a15fcb2d1e22bc3ba8fd3fc9b8d627 100644 --- a/app/code/Magento/Core/Block/Template/Context.php +++ b/lib/Magento/View/Block/Template/Context.php @@ -1,15 +1,21 @@ <?php /** - * Magento block context object. Contains all block dependencies. Should not be used by any other class - * * {licence_notice} * * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Core\Block\Template; -class Context extends \Magento\Core\Block\Context +namespace Magento\View\Block\Template; + +/** + * Magento block context object + * + * Contains all block dependencies. Should not be used by any other class + * + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ +class Context extends \Magento\View\Block\Context { /** * Dirs instance @@ -38,27 +44,32 @@ class Context extends \Magento\Core\Block\Context protected $_viewFileSystem; /** - * @var \Magento\View\TemplateEngineFactory + * @var \Magento\View\TemplateEnginePool */ - protected $_engineFactory; + protected $enginePool; /** * @var \Magento\App\State */ protected $_appState; + /** + * @var \Magento\Core\Model\StoreManagerInterface + */ + protected $_storeManager; + /** * @param \Magento\App\RequestInterface $request * @param \Magento\View\LayoutInterface $layout * @param \Magento\Event\ManagerInterface $eventManager * @param \Magento\UrlInterface $urlBuilder - * @param \Magento\Core\Model\Translate $translator + * @param \Magento\TranslateInterface $translator * @param \Magento\App\CacheInterface $cache * @param \Magento\View\DesignInterface $design * @param \Magento\Core\Model\Session $session * @param \Magento\Core\Model\Store\Config $storeConfig * @param \Magento\App\FrontController $frontController - * @param \Magento\Core\Model\Factory\Helper $helperFactory + * @param \Magento\App\Helper\HelperFactory $helperFactory * @param \Magento\View\Url $viewUrl * @param \Magento\View\ConfigInterface $viewConfig * @param \Magento\App\Cache\StateInterface $cacheState @@ -66,26 +77,29 @@ class Context extends \Magento\Core\Block\Context * @param \Magento\Logger $logger * @param \Magento\Filesystem $filesystem * @param \Magento\View\FileSystem $viewFileSystem - * @param \Magento\View\TemplateEngineFactory $engineFactory + * @param \Magento\View\TemplateEnginePool $enginePool * @param \Magento\Core\Model\App $app * @param \Magento\App\State $appState * @param \Magento\Escaper $escaper * @param \Magento\Filter\FilterManager $filterManager * @param \Magento\Core\Model\LocaleInterface $locale + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param array $data + * + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\App\RequestInterface $request, \Magento\View\LayoutInterface $layout, \Magento\Event\ManagerInterface $eventManager, \Magento\UrlInterface $urlBuilder, - \Magento\Core\Model\Translate $translator, + \Magento\TranslateInterface $translator, \Magento\App\CacheInterface $cache, \Magento\View\DesignInterface $design, \Magento\Core\Model\Session $session, \Magento\Core\Model\Store\Config $storeConfig, \Magento\App\FrontController $frontController, - \Magento\Core\Model\Factory\Helper $helperFactory, + \Magento\App\Helper\HelperFactory $helperFactory, \Magento\View\Url $viewUrl, \Magento\View\ConfigInterface $viewConfig, \Magento\App\Cache\StateInterface $cacheState, @@ -93,12 +107,13 @@ class Context extends \Magento\Core\Block\Context \Magento\Logger $logger, \Magento\Filesystem $filesystem, \Magento\View\FileSystem $viewFileSystem, - \Magento\View\TemplateEngineFactory $engineFactory, + \Magento\View\TemplateEnginePool $enginePool, \Magento\Core\Model\App $app, \Magento\App\State $appState, \Magento\Escaper $escaper, \Magento\Filter\FilterManager $filterManager, \Magento\Core\Model\LocaleInterface $locale, + \Magento\Core\Model\StoreManagerInterface $storeManager, array $data = array() ) { parent::__construct( @@ -124,16 +139,18 @@ class Context extends \Magento\Core\Block\Context $data ); + $this->_storeManager = $storeManager; $this->_appState = $appState; $this->_dirs = $dirs; $this->_logger = $logger; $this->_filesystem = $filesystem; $this->_viewFileSystem = $viewFileSystem; - $this->_engineFactory = $engineFactory; + $this->enginePool = $enginePool; } /** * Get dirs instance + * * @return \Magento\App\Dir */ public function getDirs() @@ -174,11 +191,11 @@ class Context extends \Magento\Core\Block\Context /** * Get the template engine pool instance * - * @return \Magento\View\TemplateEngineFactory + * @return \Magento\View\TemplateEnginePool */ - public function getEngineFactory() + public function getEnginePool() { - return $this->_engineFactory; + return $this->enginePool; } /** @@ -190,4 +207,14 @@ class Context extends \Magento\Core\Block\Context { return $this->_appState; } + + /** + * Get store manager + * + * @return \Magento\Core\Model\StoreManagerInterface + */ + public function getStoreManager() + { + return $this->_storeManager; + } } diff --git a/app/code/Magento/Core/Block/Text.php b/lib/Magento/View/Block/Text.php similarity index 68% rename from app/code/Magento/Core/Block/Text.php rename to lib/Magento/View/Block/Text.php index 371f9b222216f87539a2f69f8f43f75413fffac5..d6bb0361c92886443a253ee373fa0cc0716a2eaf 100644 --- a/app/code/Magento/Core/Block/Text.php +++ b/lib/Magento/View/Block/Text.php @@ -18,50 +18,64 @@ * 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_Core * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\View\Block; /** - * Base html block - * - * @author Magento Core Team <core@magentocommerce.com> + * Class Text */ -namespace Magento\Core\Block; - -class Text extends \Magento\Core\Block\AbstractBlock +class Text extends \Magento\View\Block\AbstractBlock { - + /** + * Set text data + * + * @param string $text + * @return $this + */ public function setText($text) { $this->setData('text', $text); return $this; } + /** + * Retrieve text data + * + * @return string + */ public function getText() { return $this->getData('text'); } - public function addText($text, $before=false) + /** + * Append text before|after existing text data + * + * @param string $text + * @param bool $before + */ + public function addText($text, $before = false) { if ($before) { - $this->setText($text.$this->getText()); + $this->setText($text . $this->getText()); } else { - $this->setText($this->getText().$text); + $this->setText($this->getText() . $text); } } + /** + * Render html output + * + * @return string + */ protected function _toHtml() { if (!$this->_beforeToHtml()) { return ''; } - return $this->getText(); } - } diff --git a/app/code/Magento/Core/Block/Text/ListText.php b/lib/Magento/View/Block/Text/ListText.php similarity index 84% rename from app/code/Magento/Core/Block/Text/ListText.php rename to lib/Magento/View/Block/Text/ListText.php index ee8db506ff4dd7c4b11721c5301669e57542b0ee..540c4cc1f2cd38b890423e793d7ba344df50c9ad 100644 --- a/app/code/Magento/Core/Block/Text/ListText.php +++ b/lib/Magento/View/Block/Text/ListText.php @@ -18,29 +18,33 @@ * 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_Core * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** - * Base html block - * - * @author Magento Core Team <core@magentocommerce.com> - */ +namespace Magento\View\Block\Text; -namespace Magento\Core\Block\Text; +use Magento\View\Block\Text; -class ListText extends \Magento\Core\Block\Text +/** + * Class ListText + */ +class ListText extends \Magento\View\Block\Text { + /** + * Render html output + * + * @return string + */ protected function _toHtml() { $this->setText(''); + $layout = $this->getLayout(); foreach ($this->getChildNames() as $child) { $this->addText($layout->renderElement($child)); } + return parent::_toHtml(); } } diff --git a/app/code/Magento/Core/Block/Text/TextList/Item.php b/lib/Magento/View/Block/Text/TextList/Item.php similarity index 71% rename from app/code/Magento/Core/Block/Text/TextList/Item.php rename to lib/Magento/View/Block/Text/TextList/Item.php index e8786d33d88ea57e33b4cb7bce23057ef543efcf..8f1277e220404eb9796ebaf52ba6ea37638df0b0 100644 --- a/app/code/Magento/Core/Block/Text/TextList/Item.php +++ b/lib/Magento/View/Block/Text/TextList/Item.php @@ -18,23 +18,25 @@ * 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_Core * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\View\Block\Text\TextList; + +use Magento\View\Block\Text; /** - * List item block - * - * @author Magento Core Team <core@magentocommerce.com> + * Class Item */ -namespace Magento\Core\Block\Text\TextList; - -class Item extends \Magento\Core\Block\Text +class Item extends \Magento\View\Block\Text { - function setLink($liParams, $innerText) + /** + * @param array|string $liParams + * @param string $innerText + * @return $this + */ + public function setLink($liParams, $innerText) { $this->setLiParams($liParams); $this->setInnerText($innerText); @@ -42,20 +44,26 @@ class Item extends \Magento\Core\Block\Text return $this; } + /** + * Render html output + * + * @return string + */ protected function _toHtml() { $this->setText('<li'); + $params = $this->getLiParams(); if (!empty($params) && is_array($params)) { foreach ($params as $key=>$value) { - $this->addText(' '.$key.'="'.addslashes($value).'"'); + $this->addText(' ' . $key . '="' . addslashes($value) . '"'); } } elseif (is_string($params)) { - $this->addText(' '.$params); + $this->addText(' ' . $params); } - $this->addText('>'.$this->getInnerText().'</li>'."\r\n"); + + $this->addText('>' . $this->getInnerText() . '</li>' . "\r\n"); return parent::_toHtml(); } - } diff --git a/app/code/Magento/Core/Block/Text/TextList/Link.php b/lib/Magento/View/Block/Text/TextList/Link.php similarity index 67% rename from app/code/Magento/Core/Block/Text/TextList/Link.php rename to lib/Magento/View/Block/Text/TextList/Link.php index 1733c4aa29ebd709b4e96402d7be8e86401dda35..4ba7c1fb8d9367e68ffe1f1d81dcecc0722ff1ce 100644 --- a/app/code/Magento/Core/Block/Text/TextList/Link.php +++ b/lib/Magento/View/Block/Text/TextList/Link.php @@ -18,23 +18,27 @@ * 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_Core * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\View\Block\Text\TextList; + +use Magento\View\Block\Text; /** - * Base html block - * - * @author Magento Core Team <core@magentocommerce.com> + * Class Link */ -namespace Magento\Core\Block\Text\TextList; - -class Link extends \Magento\Core\Block\Text +class Link extends \Magento\View\Block\Text { - function setLink($liParams, $aParams, $innerText, $afterText='') + /** + * @param array|string $liParams + * @param array|string $aParams + * @param string $innerText + * @param string $afterText + * @return $this + */ + public function setLink($liParams, $aParams, $innerText, $afterText = '') { $this->setLiParams($liParams); $this->setAParams($aParams); @@ -44,31 +48,37 @@ class Link extends \Magento\Core\Block\Text return $this; } + /** + * Render html output + * + * @return string + */ protected function _toHtml() { $this->setText('<li'); + $params = $this->getLiParams(); if (!empty($params) && is_array($params)) { foreach ($params as $key=>$value) { - $this->addText(' '.$key.'="'.addslashes($value).'"'); + $this->addText(' ' . $key . '="' . addslashes($value) . '"'); } } elseif (is_string($params)) { - $this->addText(' '.$params); + $this->addText(' ' . $params); } + $this->addText('><a'); $params = $this->getAParams(); if (!empty($params) && is_array($params)) { foreach ($params as $key=>$value) { - $this->addText(' '.$key.'="'.addslashes($value).'"'); + $this->addText(' ' . $key . '="' . addslashes($value) . '"'); } } elseif (is_string($params)) { - $this->addText(' '.$params); + $this->addText(' ' . $params); } - $this->addText('>'.$this->getInnerText().'</a>'.$this->getAfterText().'</li>'."\r\n"); + $this->addText('>' . $this->getInnerText() . '</a>' . $this->getAfterText() . '</li>' . "\r\n"); return parent::_toHtml(); } - } diff --git a/lib/Magento/View/BlockPool.php b/lib/Magento/View/BlockPool.php index 0e0378f6930a88656313f204a11a11806387e9ac..a6dcc557442ab900d4ffe624a2c3449b8d741d82 100644 --- a/lib/Magento/View/BlockPool.php +++ b/lib/Magento/View/BlockPool.php @@ -29,6 +29,9 @@ use Magento\View\Element\BlockInterface; use Magento\View\Element\BlockFactory; use Magento\ObjectManager; +/** + * Class BlockPool + */ class BlockPool { /** diff --git a/lib/Magento/View/Config.php b/lib/Magento/View/Config.php index ad425b53fab8d6499ce5fec3d730518e20ced335..4a7d47d5f18417056cd2304fbd456586e8597be9 100644 --- a/lib/Magento/View/Config.php +++ b/lib/Magento/View/Config.php @@ -18,17 +18,15 @@ * 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_Core * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\View; + /** * Handles theme view.xml files */ -namespace Magento\View; - class Config implements \Magento\View\ConfigInterface { /** @@ -68,8 +66,6 @@ class Config implements \Magento\View\ConfigInterface protected $filename; /** - * View config model - * * @param \Magento\Module\Dir\Reader $moduleReader * @param \Magento\Filesystem $filesystem * @param Service $viewService diff --git a/lib/Magento/View/ConfigInterface.php b/lib/Magento/View/ConfigInterface.php index a542b120fbc2029e4cb7a208f6d4a736d6318974..af786ea1b3ae89ea4c4cc86084af2deafdae1008 100644 --- a/lib/Magento/View/ConfigInterface.php +++ b/lib/Magento/View/ConfigInterface.php @@ -26,8 +26,6 @@ namespace Magento\View; /** * Config Interface - * - * @package Magento\View */ interface ConfigInterface { diff --git a/lib/Magento/View/Context.php b/lib/Magento/View/Context.php index 45b4e32cef609b8a65d5893cd81a371aed99c660..f9c923cc77f0c19952d5c1e96e4a8df38f9d75dc 100644 --- a/lib/Magento/View/Context.php +++ b/lib/Magento/View/Context.php @@ -1,7 +1,5 @@ <?php /** - * Application Runtime Context - * * Magento * * NOTICE OF LICENSE @@ -29,9 +27,9 @@ namespace Magento\View; use Magento\App\Request\Http as Request; use Magento\App\FrontControllerInterface; -use Magento\Core\Model\Translate; +use Magento\TranslateInterface; use Magento\Core\Model\Store\Config as StoreConfig; -use Magento\Core\Model\Factory\Helper as FactoryHelper; +use Magento\App\Helper\HelperFactory as FactoryHelper; use Magento\View\Url as ViewUrl; use Magento\View\ConfigInterface as ViewConfig; use Magento\Logger; @@ -45,6 +43,8 @@ use Magento\UrlInterface; use Magento\Event\ManagerInterface; /** + * Application Runtime Context + * * @todo Reduce fields number * @todo Reduce class dependencies * @@ -69,7 +69,7 @@ class Context protected $urlBuilder; /** - * @var \Magento\Core\Model\Translate + * @var \Magento\TranslateInterface */ protected $translator; @@ -79,7 +79,7 @@ class Context protected $cache; /** - * @var \Magento\Core\Model\View\Design + * @var \Magento\View\DesignInterface */ protected $design; @@ -99,7 +99,7 @@ class Context protected $frontController; /** - * @var \Magento\Core\Model\Factory\Helper + * @var \Magento\App\Helper\HelperFactory */ protected $helperFactory; @@ -144,7 +144,7 @@ class Context * @param Request $request * @param ManagerInterface $eventManager * @param UrlInterface $urlBuilder - * @param Translate $translator + * @param TranslateInterface $translator * @param Cache $cache * @param DesignInterface $design * @param AbstractSession $session @@ -157,6 +157,7 @@ class Context * @param Logger $logger * @param App $app * @param AppState $appState + * * @todo reduce parameter number * * @SuppressWarnings(PHPMD.ExcessiveParameterList) @@ -165,7 +166,7 @@ class Context Request $request, ManagerInterface $eventManager, UrlInterface $urlBuilder, - Translate $translator, + TranslateInterface $translator, Cache $cache, DesignInterface $design, AbstractSession $session, @@ -206,7 +207,7 @@ class Context } /** - * @return \Magento\Core\Model\View\Design + * @return \Magento\View\DesignInterface */ public function getDesignPackage() { @@ -230,7 +231,7 @@ class Context } /** - * @return \Magento\Core\Model\Factory\Helper + * @return \Magento\App\Helper\HelperFactory */ public function getHelperFactory() { @@ -270,7 +271,7 @@ class Context } /** - * @return \Magento\Core\Model\Translate + * @return \Magento\TranslateInterface */ public function getTranslator() { @@ -349,6 +350,7 @@ class Context * Retrieve the module name * * @return string + * * @todo alias of getModuleName */ public function getFrontName() diff --git a/lib/Magento/View/DataSourcePool.php b/lib/Magento/View/DataSourcePool.php index 3fe679235f9fe1dc6c478fcca501ced66d8bebcd..d29282a9084cb22f6c6458744948c0dae47e6e27 100644 --- a/lib/Magento/View/DataSourcePool.php +++ b/lib/Magento/View/DataSourcePool.php @@ -26,6 +26,9 @@ namespace Magento\View; use Magento\View\Element\BlockFactory; +/** + * Class DataSourcePool + */ class DataSourcePool { /** diff --git a/lib/Magento/View/DeployedFilesManager.php b/lib/Magento/View/DeployedFilesManager.php index 8ab5be9172a7aea6f2cf335df5fbaf1e24a1dbe8..1af08c909ac5dbee67609cddcfd2be3d18ed177e 100644 --- a/lib/Magento/View/DeployedFilesManager.php +++ b/lib/Magento/View/DeployedFilesManager.php @@ -22,12 +22,11 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\View; /** * Builds path for files deployed into public directory in advance */ -namespace Magento\View; - class DeployedFilesManager implements \Magento\View\PublicFilesManagerInterface { /** @@ -36,8 +35,6 @@ class DeployedFilesManager implements \Magento\View\PublicFilesManagerInterface protected $_viewService; /** - * Deployed view files manager - * * @param \Magento\View\Service $viewService */ public function __construct(\Magento\View\Service $viewService) @@ -46,7 +43,11 @@ class DeployedFilesManager implements \Magento\View\PublicFilesManagerInterface } /** - * {@inheritdoc} + * Get deployed file path + * + * @param string $filePath + * @param array $params + * @return string */ public function getPublicFilePath($filePath, $params) { diff --git a/lib/Magento/View/Design/Fallback/Factory.php b/lib/Magento/View/Design/Fallback/Factory.php index 7732fdff2fd349a10bd49c2ef7c8b5035a7a01d2..cfc6eccfbc27563b78e53b6097a71c353f1f4eae 100644 --- a/lib/Magento/View/Design/Fallback/Factory.php +++ b/lib/Magento/View/Design/Fallback/Factory.php @@ -22,9 +22,6 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** - * Factory that produces all sorts of fallback rules - */ namespace Magento\View\Design\Fallback; use Magento\App\Dir; @@ -37,7 +34,7 @@ use Magento\View\Design\Fallback\Rule\Theme; /** * Fallback Factory * - * @package Magento\View + * Factory that produces all sorts of fallback rules */ class Factory { @@ -47,8 +44,6 @@ class Factory protected $dirs; /** - * Constructor - * * @param Dir $dirs */ public function __construct(Dir $dirs) diff --git a/lib/Magento/View/Design/Fallback/Rule/Composite.php b/lib/Magento/View/Design/Fallback/Rule/Composite.php index 3a5ef30cc8a93d1ceb8c6251cc4707522b15cb95..45332102136086e46f1ce7b6f48e7b8009ffa752 100644 --- a/lib/Magento/View/Design/Fallback/Rule/Composite.php +++ b/lib/Magento/View/Design/Fallback/Rule/Composite.php @@ -22,15 +22,12 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** - * Composite rule that represents sequence of child fallback rules - */ namespace Magento\View\Design\Fallback\Rule; /** * Composite Rules * - * @package Magento\View + * Composite rule that represents sequence of child fallback rules */ class Composite implements RuleInterface { @@ -40,8 +37,6 @@ class Composite implements RuleInterface protected $rules = array(); /** - * Constructor - * * @param RuleInterface[] $rules * @throws \InvalidArgumentException */ @@ -58,7 +53,8 @@ class Composite implements RuleInterface /** * Retrieve sequentially combined directory patterns from child fallback rules * - * {@inheritdoc} + * @param array $params + * @return array */ public function getPatternDirs(array $params) { diff --git a/lib/Magento/View/Design/Fallback/Rule/ModularSwitch.php b/lib/Magento/View/Design/Fallback/Rule/ModularSwitch.php index 0159715e83e4e2773d5352f8871b387309f9636e..254fef8cd1e3dd3043d493bf8b12b22e11d03180 100644 --- a/lib/Magento/View/Design/Fallback/Rule/ModularSwitch.php +++ b/lib/Magento/View/Design/Fallback/Rule/ModularSwitch.php @@ -22,15 +22,12 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** - * Fallback rule that delegates execution to either modular or non-modular sub-rule depending on input parameters - */ namespace Magento\View\Design\Fallback\Rule; /** * Modular Switch * - * @package Magento\View + * Fallback rule that delegates execution to either modular or non-modular sub-rule depending on input parameters. */ class ModularSwitch implements RuleInterface { @@ -45,8 +42,6 @@ class ModularSwitch implements RuleInterface protected $ruleModular; /** - * Constructor - * * @param RuleInterface $ruleNonModular * @param RuleInterface $ruleModular */ @@ -61,7 +56,8 @@ class ModularSwitch implements RuleInterface /** * Delegate execution to either modular or non-modular sub-rule depending on input parameters * - * {@inheritdoc} + * @param array $params + * @return array * @throws \InvalidArgumentException */ public function getPatternDirs(array $params) diff --git a/lib/Magento/View/Design/Fallback/Rule/RuleInterface.php b/lib/Magento/View/Design/Fallback/Rule/RuleInterface.php index 5d0d1d1279106854fec3fac097d10b531bf995f1..81b447010ccdf04f279709bd6537ea39a7f801df 100644 --- a/lib/Magento/View/Design/Fallback/Rule/RuleInterface.php +++ b/lib/Magento/View/Design/Fallback/Rule/RuleInterface.php @@ -22,15 +22,12 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** - * Interface for search path resolution during fallback process - */ namespace Magento\View\Design\Fallback\Rule; /** * Rule Interface * - * @package Magento\View + * Interface for search path resolution during fallback process */ interface RuleInterface { diff --git a/lib/Magento/View/Design/Fallback/Rule/Simple.php b/lib/Magento/View/Design/Fallback/Rule/Simple.php index 486cda2fd967cda2f1d55a567bc600fdfa8c95f7..7d687fa341dd912ac312984d600b153ac514dd4a 100644 --- a/lib/Magento/View/Design/Fallback/Rule/Simple.php +++ b/lib/Magento/View/Design/Fallback/Rule/Simple.php @@ -22,11 +22,11 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\View\Design\Fallback\Rule; + /** * Class with simple substitution parameters to values */ -namespace Magento\View\Design\Fallback\Rule; - class Simple implements RuleInterface { /** @@ -44,8 +44,6 @@ class Simple implements RuleInterface protected $pattern; /** - * Constructor - * * @param string $pattern * @param array $optionalParams */ diff --git a/lib/Magento/View/Design/Fallback/Rule/Theme.php b/lib/Magento/View/Design/Fallback/Rule/Theme.php index 639e3686575e60fc3191f84229aa339793ae238c..94cb83148ca6bd37e179093017cc16a053788b0d 100644 --- a/lib/Magento/View/Design/Fallback/Rule/Theme.php +++ b/lib/Magento/View/Design/Fallback/Rule/Theme.php @@ -22,17 +22,14 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** - * An aggregate of a fallback rule that propagates it to every theme according to a hierarchy - */ namespace Magento\View\Design\Fallback\Rule; use Magento\View\Design\ThemeInterface; /** - * Theme + * Fallback Rule Theme * - * @package Magento\View + * An aggregate of a fallback rule that propagates it to every theme according to a hierarchy */ class Theme implements RuleInterface { @@ -42,8 +39,6 @@ class Theme implements RuleInterface protected $rule; /** - * Constructor - * * @param RuleInterface $rule */ public function __construct(RuleInterface $rule) @@ -54,7 +49,8 @@ class Theme implements RuleInterface /** * Propagate an underlying fallback rule to every theme in a hierarchy: parent, grandparent, etc. * - * {@inheritdoc} + * @param array $params + * @return array * @throws \InvalidArgumentException */ public function getPatternDirs(array $params) diff --git a/lib/Magento/View/Design/FileResolution/Strategy/Fallback.php b/lib/Magento/View/Design/FileResolution/Strategy/Fallback.php index 0aa4eb3066ecba050491590fac2d9fc0a9304688..54d746fc0471320971031b63cb04e30da5eaf176 100644 --- a/lib/Magento/View/Design/FileResolution/Strategy/Fallback.php +++ b/lib/Magento/View/Design/FileResolution/Strategy/Fallback.php @@ -18,15 +18,10 @@ * 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_Core * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** - * Resolver, which performs full search of files, according to fallback rules - */ namespace Magento\View\Design\FileResolution\Strategy; use Magento\Filesystem; @@ -35,9 +30,9 @@ use Magento\View\Design\Fallback\Rule\RuleInterface; use Magento\View\Design\ThemeInterface; /** - * Fallback + * Class Fallback * - * @package Magento\View + * Resolver, which performs full search of files, according to fallback rules */ class Fallback implements FileInterface, LocaleInterface, ViewInterface { diff --git a/lib/Magento/View/Design/FileResolution/Strategy/Fallback/CachingProxy.php b/lib/Magento/View/Design/FileResolution/Strategy/Fallback/CachingProxy.php index c79884a2cef0a747b20f3e1717fcca42ec589de8..912ac9056878f9bfd051126e13aebeafa772d322 100644 --- a/lib/Magento/View/Design/FileResolution/Strategy/Fallback/CachingProxy.php +++ b/lib/Magento/View/Design/FileResolution/Strategy/Fallback/CachingProxy.php @@ -18,16 +18,10 @@ * 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_Core * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** - * A proxy for the Fallback resolver. This proxy processes fallback resolution calls by either using map of cached - * paths, or passing resolution to the Fallback resolver. - */ namespace Magento\View\Design\FileResolution\Strategy\Fallback; use Magento\Filesystem; @@ -41,7 +35,8 @@ use Magento\View\Design\ThemeInterface; /** * Caching Proxy * - * @package Magento\View + * A proxy for the Fallback resolver. This proxy processes fallback resolution calls by either using map of cached + * paths, or passing resolution to the Fallback resolver. */ class CachingProxy implements FileInterface, LocaleInterface, ViewInterface, NotifiableInterface { diff --git a/lib/Magento/View/Design/FileResolution/Strategy/FileInterface.php b/lib/Magento/View/Design/FileResolution/Strategy/FileInterface.php index 94e2627fede3f6cbc606a908ff3c7ad34fd17f84..b60932a3576c50e0623e383b1b1e52365c3e99b4 100644 --- a/lib/Magento/View/Design/FileResolution/Strategy/FileInterface.php +++ b/lib/Magento/View/Design/FileResolution/Strategy/FileInterface.php @@ -18,15 +18,10 @@ * 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_Core * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** - * Interface for 'file' file resolution strategy - */ namespace Magento\View\Design\FileResolution\Strategy; use Magento\View\Design\ThemeInterface; @@ -34,7 +29,7 @@ use Magento\View\Design\ThemeInterface; /** * File Interface * - * @package Magento\View + * Interface for 'file' file resolution strategy */ interface FileInterface { diff --git a/lib/Magento/View/Design/FileResolution/Strategy/LocaleInterface.php b/lib/Magento/View/Design/FileResolution/Strategy/LocaleInterface.php index 0529778c964e4bfa0ce4cb367728c827bbe864e1..7a29957df05c911061522e25d98ca99598748784 100644 --- a/lib/Magento/View/Design/FileResolution/Strategy/LocaleInterface.php +++ b/lib/Magento/View/Design/FileResolution/Strategy/LocaleInterface.php @@ -18,15 +18,10 @@ * 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_Core * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** - * Interface for 'locale' file resolution strategy - */ namespace Magento\View\Design\FileResolution\Strategy; use Magento\View\Design\ThemeInterface; @@ -34,7 +29,7 @@ use Magento\View\Design\ThemeInterface; /** * Locale Interface * - * @package Magento\View + * Interface for 'locale' file resolution strategy */ interface LocaleInterface { diff --git a/lib/Magento/View/Design/FileResolution/Strategy/View/NotifiableInterface.php b/lib/Magento/View/Design/FileResolution/Strategy/View/NotifiableInterface.php index b1d8f4d485c74eb7bea112a045576ca0d8b13e9e..95295ad468abe2375d5167f3e8c77e365b00cbf0 100644 --- a/lib/Magento/View/Design/FileResolution/Strategy/View/NotifiableInterface.php +++ b/lib/Magento/View/Design/FileResolution/Strategy/View/NotifiableInterface.php @@ -18,15 +18,10 @@ * 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_Core * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** - * Interface for a view strategy to be notifiable, that file location has changed - */ namespace Magento\View\Design\FileResolution\Strategy\View; use Magento\View\Design\FileResolution\Strategy\Fallback\CachingProxy; @@ -35,11 +30,13 @@ use Magento\View\Design\ThemeInterface; /** * Notifiable Interface * - * @package Magento\View + * Interface for a view strategy to be notifiable, that file location has changed */ interface NotifiableInterface { /** + * Set view file path to map + * * Notify the strategy, that file has changed its location, and next time should be resolved to this * new location. * diff --git a/lib/Magento/View/Design/FileResolution/Strategy/ViewInterface.php b/lib/Magento/View/Design/FileResolution/Strategy/ViewInterface.php index d82bb7657bb66cade8a182313f0aa6752e667663..09ae9699af9aff1d7b552739bd391e44491633f8 100644 --- a/lib/Magento/View/Design/FileResolution/Strategy/ViewInterface.php +++ b/lib/Magento/View/Design/FileResolution/Strategy/ViewInterface.php @@ -18,15 +18,10 @@ * 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_Core * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** - * Interface for 'view' file resolution strategy - */ namespace Magento\View\Design\FileResolution\Strategy; use Magento\View\Design\ThemeInterface; @@ -34,7 +29,7 @@ use Magento\View\Design\ThemeInterface; /** * View Interface * - * @package Magento\View + * Interface for 'view' file resolution strategy */ interface ViewInterface { diff --git a/lib/Magento/View/Design/FileResolution/StrategyPool.php b/lib/Magento/View/Design/FileResolution/StrategyPool.php index 5853140dc144e082913ca6cd1024216f878bb882..7b6930e41ccaf6b09b760571d180a5792d73905c 100644 --- a/lib/Magento/View/Design/FileResolution/StrategyPool.php +++ b/lib/Magento/View/Design/FileResolution/StrategyPool.php @@ -18,15 +18,10 @@ * 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_Core * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** - * Class for choosing the strategy for file resolution - */ namespace Magento\View\Design\FileResolution; use Magento\Exception; @@ -38,7 +33,7 @@ use Magento\ObjectManager; /** * Strategy Pool * - * @package Magento\View + * Class for choosing the strategy for file resolution */ class StrategyPool { diff --git a/lib/Magento/View/Design/Theme/Customization.php b/lib/Magento/View/Design/Theme/Customization.php index 69a50b6684d309c65825564ff4af04b96d003e0f..79cffb60569cd583460650626dca0737a3cd9a1e 100644 --- a/lib/Magento/View/Design/Theme/Customization.php +++ b/lib/Magento/View/Design/Theme/Customization.php @@ -18,17 +18,15 @@ * 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_Core * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\View\Design\Theme; + /** * Theme customizations manager */ -namespace Magento\View\Design\Theme; - class Customization implements CustomizationInterface { /** @@ -47,12 +45,12 @@ class Customization implements CustomizationInterface protected $theme; /** - * @var \Magento\Core\Model\Resource\Theme\File\Collection + * @var \Magento\View\Design\Theme\FileInterface[] */ protected $themeFiles; /** - * @var \Magento\Core\Model\Resource\Theme\File\Collection[] + * @var \Magento\View\Design\Theme\FileInterface[] */ protected $themeFilesByType = array(); @@ -119,7 +117,9 @@ class Customization implements CustomizationInterface } /** - * {@inheritdoc} + * Returns customization absolute path + * + * @return null|string */ public function getCustomizationPath() { @@ -127,7 +127,9 @@ class Customization implements CustomizationInterface } /** - * {@inheritdoc} + * Get directory where themes files are stored + * + * @return null|string */ public function getThemeFilesPath() { @@ -137,7 +139,9 @@ class Customization implements CustomizationInterface } /** - * {@inheritdoc} + * Get path to custom view configuration file + * + * @return null|string */ public function getCustomViewConfigPath() { @@ -145,7 +149,9 @@ class Customization implements CustomizationInterface } /** - * {@inheritdoc} + * @param string $type + * @param array $sequence + * @return $this|CustomizationInterface */ public function reorder($type, array $sequence) { diff --git a/lib/Magento/View/Design/Theme/Customization/AbstractFile.php b/lib/Magento/View/Design/Theme/Customization/AbstractFile.php index 352d99e3ba0c1950757c864a05e52e1910bb9f7a..a49ecb60ee0d7e5c413d3fd328eccfab51218a40 100644 --- a/lib/Magento/View/Design/Theme/Customization/AbstractFile.php +++ b/lib/Magento/View/Design/Theme/Customization/AbstractFile.php @@ -18,17 +18,15 @@ * 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_Core * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\View\Design\Theme\Customization; + /** * Theme file service abstract class */ -namespace Magento\View\Design\Theme\Customization; - abstract class AbstractFile implements \Magento\View\Design\Theme\Customization\FileInterface, \Magento\View\Design\Theme\Customization\FileAssetInterface @@ -64,7 +62,9 @@ abstract class AbstractFile } /** - * {@inheritdoc} + * Create class instance with specified parameters + * + * @return \Magento\View\Design\Theme\FileInterface */ public function create() { @@ -74,7 +74,10 @@ abstract class AbstractFile } /** - * {@inheritdoc} + * Returns customization full path + * + * @param \Magento\View\Design\Theme\FileInterface $file + * @return string */ public function getFullPath(\Magento\View\Design\Theme\FileInterface $file) { @@ -83,7 +86,8 @@ abstract class AbstractFile } /** - * {@inheritdoc} + * @param \Magento\View\Design\Theme\FileInterface $file + * @return $this */ public function prepareFile(\Magento\View\Design\Theme\FileInterface $file) { @@ -97,7 +101,10 @@ abstract class AbstractFile } /** - * {@inheritdoc} + * Creates or updates file of customization in filesystem + * + * @param \Magento\View\Design\Theme\FileInterface $file + * @return $this */ public function save(\Magento\View\Design\Theme\FileInterface $file) { @@ -106,7 +113,10 @@ abstract class AbstractFile } /** - * {@inheritdoc} + * Deletes file of customization in filesystem + * + * @param \Magento\View\Design\Theme\FileInterface $file + * @return $this */ public function delete(\Magento\View\Design\Theme\FileInterface $file) { diff --git a/lib/Magento/View/Design/Theme/Customization/ConfigInterface.php b/lib/Magento/View/Design/Theme/Customization/ConfigInterface.php index 48ff3b3b8de11baceb6a0b2bdc39047b5ec7980e..645a4fc35f806cdd5af3f8fcf5c1f5cef0aa4731 100644 --- a/lib/Magento/View/Design/Theme/Customization/ConfigInterface.php +++ b/lib/Magento/View/Design/Theme/Customization/ConfigInterface.php @@ -22,11 +22,11 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\View\Design\Theme\Customization; + /** * Theme customization configuration interface */ -namespace Magento\View\Design\Theme\Customization; - interface ConfigInterface { /** diff --git a/lib/Magento/View/Design/Theme/Customization/File/Css.php b/lib/Magento/View/Design/Theme/Customization/File/Css.php index e68cfc8e670bf2f0e75a257dfb9455b8f4819296..7782434309f88c0d2af30480f19d834ae34692d3 100644 --- a/lib/Magento/View/Design/Theme/Customization/File/Css.php +++ b/lib/Magento/View/Design/Theme/Customization/File/Css.php @@ -18,17 +18,15 @@ * 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_Core * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** - * Theme css file service class - */ namespace Magento\View\Design\Theme\Customization\File; +/** + * Theme CSS file service class + */ class Css extends \Magento\View\Design\Theme\Customization\AbstractFile { /**#@+ @@ -39,7 +37,7 @@ class Css extends \Magento\View\Design\Theme\Customization\AbstractFile /**#@-*/ /** - * {@inheritdoc} + * @return string */ public function getType() { @@ -47,7 +45,7 @@ class Css extends \Magento\View\Design\Theme\Customization\AbstractFile } /** - * {@inheritdoc} + * @return string */ public function getContentType() { diff --git a/lib/Magento/View/Design/Theme/Customization/File/Js.php b/lib/Magento/View/Design/Theme/Customization/File/Js.php index 418ae907a54822c48036cac11c1284f8697abf09..6d23eff7532e060e59ab2065ec4eb141b31f32fb 100644 --- a/lib/Magento/View/Design/Theme/Customization/File/Js.php +++ b/lib/Magento/View/Design/Theme/Customization/File/Js.php @@ -18,17 +18,15 @@ * 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_Core * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** - * Theme js file service class - */ namespace Magento\View\Design\Theme\Customization\File; +/** + * Theme JS file service class + */ class Js extends \Magento\View\Design\Theme\Customization\AbstractFile { /**#@+ @@ -39,7 +37,7 @@ class Js extends \Magento\View\Design\Theme\Customization\AbstractFile /**#@-*/ /** - * {@inheritdoc} + * @return string */ public function getType() { @@ -47,7 +45,7 @@ class Js extends \Magento\View\Design\Theme\Customization\AbstractFile } /** - * {@inheritdoc} + * @return string */ public function getContentType() { diff --git a/lib/Magento/View/Design/Theme/Customization/FileAssetInterface.php b/lib/Magento/View/Design/Theme/Customization/FileAssetInterface.php index 87b6fdfe5fa5db6d06005c600a2b1099859e085e..427a6b881a50615d96a62140ce17d7b8655ecbc8 100644 --- a/lib/Magento/View/Design/Theme/Customization/FileAssetInterface.php +++ b/lib/Magento/View/Design/Theme/Customization/FileAssetInterface.php @@ -18,17 +18,15 @@ * 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_Core * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\View\Design\Theme\Customization; + /** * Theme asset file interface */ -namespace Magento\View\Design\Theme\Customization; - interface FileAssetInterface { /** diff --git a/lib/Magento/View/Design/Theme/Customization/FileInterface.php b/lib/Magento/View/Design/Theme/Customization/FileInterface.php index 8205720d01cb38f306675d6280ecd9fb2ceb95bf..93795d644617c66d9be12c1dc516c3f55df48763 100644 --- a/lib/Magento/View/Design/Theme/Customization/FileInterface.php +++ b/lib/Magento/View/Design/Theme/Customization/FileInterface.php @@ -18,17 +18,15 @@ * 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_Core * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\View\Design\Theme\Customization; + /** * Theme service file interface */ -namespace Magento\View\Design\Theme\Customization; - interface FileInterface { /** diff --git a/lib/Magento/View/Design/Theme/Customization/FileServiceFactory.php b/lib/Magento/View/Design/Theme/Customization/FileServiceFactory.php index a2ae236779f81bd8a9f3d0a944d8564370fd4033..ab9d7f0255ec1ffea37cd5a6bcc8f665d133fe9b 100644 --- a/lib/Magento/View/Design/Theme/Customization/FileServiceFactory.php +++ b/lib/Magento/View/Design/Theme/Customization/FileServiceFactory.php @@ -18,17 +18,15 @@ * 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_Core * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\View\Design\Theme\Customization; + /** * Theme customization files factory */ -namespace Magento\View\Design\Theme\Customization; - class FileServiceFactory { /** diff --git a/lib/Magento/View/Design/Theme/Customization/Path.php b/lib/Magento/View/Design/Theme/Customization/Path.php index d7367ea2ceea977091383d2126a13dffc77697cf..14988b37b1cc9f02b57b1c35b5b25fe350bba148 100644 --- a/lib/Magento/View/Design/Theme/Customization/Path.php +++ b/lib/Magento/View/Design/Theme/Customization/Path.php @@ -18,8 +18,6 @@ * 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_Core * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -29,6 +27,9 @@ */ namespace Magento\View\Design\Theme\Customization; +/** + * Theme Customization Path + */ class Path { /** @@ -47,8 +48,6 @@ class Path protected $filename; /** - * Initialize dependencies - * * @param \Magento\App\Dir $dir * @param $filename */ diff --git a/lib/Magento/View/Design/Theme/CustomizationInterface.php b/lib/Magento/View/Design/Theme/CustomizationInterface.php index 63412d743a80eb4cb2f0a4e917a5f3006c22d7c1..68c8d42566772f99a30b07c952c31bd92f09681d 100644 --- a/lib/Magento/View/Design/Theme/CustomizationInterface.php +++ b/lib/Magento/View/Design/Theme/CustomizationInterface.php @@ -18,17 +18,15 @@ * 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_Core * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\View\Design\Theme; + /** * Theme customization interface */ -namespace Magento\View\Design\Theme; - interface CustomizationInterface { /** diff --git a/lib/Magento/View/Design/Theme/Domain/Factory.php b/lib/Magento/View/Design/Theme/Domain/Factory.php index 5f01ba2ed8514cb2d6381ebcc7e1b4446d629113..cdee49acb79e58271f395b1e17e878c9ea2dde3c 100644 --- a/lib/Magento/View/Design/Theme/Domain/Factory.php +++ b/lib/Magento/View/Design/Theme/Domain/Factory.php @@ -18,19 +18,17 @@ * 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_DesignEditor * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** - * Theme domain model class - */ namespace Magento\View\Design\Theme\Domain; use \Magento\View\Design\ThemeInterface; +/** + * Theme domain model class factory + */ class Factory { /** @@ -42,9 +40,9 @@ class Factory * @var array */ protected $_types = array( - ThemeInterface::TYPE_PHYSICAL => 'Magento\Core\Model\Theme\Domain\Physical', - ThemeInterface::TYPE_VIRTUAL => 'Magento\Core\Model\Theme\Domain\Virtual', - ThemeInterface::TYPE_STAGING => 'Magento\Core\Model\Theme\Domain\Staging', + ThemeInterface::TYPE_PHYSICAL => 'Magento\View\Design\Theme\Domain\PhysicalInterface', + ThemeInterface::TYPE_VIRTUAL => 'Magento\View\Design\Theme\Domain\VirtualInterface', + ThemeInterface::TYPE_STAGING => 'Magento\View\Design\Theme\Domain\StagingInterface', ); /** @@ -58,8 +56,8 @@ class Factory /** * Create new config object * - * @param \Magento\View\Design\ThemeInterface $theme - * @return \Magento\Core\Model\Theme\Domain\Virtual|\Magento\Core\Model\Theme\Domain\Staging + * @param ThemeInterface $theme + * @return mixed * @throws \Magento\Exception */ public function create(ThemeInterface $theme) diff --git a/lib/Magento/View/Design/Theme/Domain/PhysicalInterface.php b/lib/Magento/View/Design/Theme/Domain/PhysicalInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..5577ff65ce2ff5504815c034deb8248be86a7e2b --- /dev/null +++ b/lib/Magento/View/Design/Theme/Domain/PhysicalInterface.php @@ -0,0 +1,39 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\View\Design\Theme\Domain; + +/** + * Interface PhysicalInterface + */ +interface PhysicalInterface +{ + /** + * Create theme customization + * + * @param \Magento\View\Design\ThemeInterface $theme + * @return \Magento\View\Design\ThemeInterface + */ + public function createVirtualTheme($theme); +} \ No newline at end of file diff --git a/lib/Magento/View/Design/Theme/Domain/StagingInterface.php b/lib/Magento/View/Design/Theme/Domain/StagingInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..a1e2ee4e82d1c461b22d1a74c9bdc1d652ae4e90 --- /dev/null +++ b/lib/Magento/View/Design/Theme/Domain/StagingInterface.php @@ -0,0 +1,38 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\View\Design\Theme\Domain; + +/** + * Interface StagingInterface + */ +interface StagingInterface +{ + /** + * Copy changes from 'staging' theme + * + * @return \Magento\View\Design\Theme\Domain\StagingInterface + */ + public function updateFromStagingTheme(); +} \ No newline at end of file diff --git a/lib/Magento/View/Design/Theme/Domain/VirtualInterface.php b/lib/Magento/View/Design/Theme/Domain/VirtualInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..fb874fa4a95e9332b13aafe513dcc6f3e8c852c4 --- /dev/null +++ b/lib/Magento/View/Design/Theme/Domain/VirtualInterface.php @@ -0,0 +1,45 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\View\Design\Theme\Domain; + +/** + * Interface VirtualInterface + */ +interface VirtualInterface +{ + /** + * Get 'staging' theme + * + * @return \Magento\View\Design\ThemeInterface + */ + public function getStagingTheme(); + + /** + * Get 'physical' theme + * + * @return \Magento\View\Design\ThemeInterface + */ + public function getPhysicalTheme(); +} \ No newline at end of file diff --git a/lib/Magento/View/Design/Theme/File/CollectionInterface.php b/lib/Magento/View/Design/Theme/File/CollectionInterface.php index 135f817cfd217796232a7a6edf10aa3cc0618479..bcef86cb699b388f5b106380da6f94a664411faa 100644 --- a/lib/Magento/View/Design/Theme/File/CollectionInterface.php +++ b/lib/Magento/View/Design/Theme/File/CollectionInterface.php @@ -23,6 +23,9 @@ */ namespace Magento\View\Design\Theme\File; +/** + * Design Theme File collection interface + */ interface CollectionInterface { /** diff --git a/lib/Magento/View/Design/Theme/FileFactory.php b/lib/Magento/View/Design/Theme/FileFactory.php index b44af3dae2576818eeb4c6a95adbd3d23c34238c..0ba03b19ec356afc5b13688c0da53cc9e48de17c 100644 --- a/lib/Magento/View/Design/Theme/FileFactory.php +++ b/lib/Magento/View/Design/Theme/FileFactory.php @@ -18,17 +18,15 @@ * 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_Core * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** - * Factory for \Magento\Core\Model\Theme\File - */ namespace Magento\View\Design\Theme; +/** + * Theme File Factory + */ class FileFactory { /** @@ -39,8 +37,6 @@ class FileFactory protected $_objectManager; /** - * Factory constructor - * * @param \Magento\ObjectManager $objectManager */ public function __construct(\Magento\ObjectManager $objectManager) @@ -52,7 +48,7 @@ class FileFactory * Create class instance with specified parameters * * @param array $data - * @return \Magento\Core\Model\Theme\File + * @return \Magento\View\Design\Theme\FileInterface */ public function create(array $data = array()) { diff --git a/lib/Magento/View/Design/Theme/FileInterface.php b/lib/Magento/View/Design/Theme/FileInterface.php index 7609976454c83fa6990d6ba4215cac1fc1c225e8..2daca6989d76200279675edb199b09e0e91841b6 100644 --- a/lib/Magento/View/Design/Theme/FileInterface.php +++ b/lib/Magento/View/Design/Theme/FileInterface.php @@ -18,17 +18,15 @@ * 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_Core * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\View\Design\Theme; + /** * Theme file interface */ -namespace Magento\View\Design\Theme; - interface FileInterface { /** @@ -57,7 +55,7 @@ interface FileInterface /** * Get theme model * - * @return \Magento\Core\Model\Theme + * @return \Magento\View\Design\ThemeInterface */ public function getTheme(); diff --git a/lib/Magento/View/Design/Theme/FileProviderInterface.php b/lib/Magento/View/Design/Theme/FileProviderInterface.php index a72132590d7ae30202ce27c269a9be6aa2ac8d6b..d47050259923b8df8827d057354a58e2428e0dd6 100644 --- a/lib/Magento/View/Design/Theme/FileProviderInterface.php +++ b/lib/Magento/View/Design/Theme/FileProviderInterface.php @@ -23,6 +23,9 @@ */ namespace Magento\View\Design\Theme; +/** + * Interface FileProviderInterface + */ interface FileProviderInterface { /** diff --git a/lib/Magento/View/Design/Theme/FlyweightFactory.php b/lib/Magento/View/Design/Theme/FlyweightFactory.php index b249995e746ed3df2649235924430eb76e55ef8c..9ffcba94f34643bb9cee21fd46a38d33e3d07e7d 100644 --- a/lib/Magento/View/Design/Theme/FlyweightFactory.php +++ b/lib/Magento/View/Design/Theme/FlyweightFactory.php @@ -18,17 +18,15 @@ * 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_Core * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\View\Design\Theme; + /** * Theme factory */ -namespace Magento\View\Design\Theme; - class FlyweightFactory { /** diff --git a/lib/Magento/View/Design/Theme/Image.php b/lib/Magento/View/Design/Theme/Image.php index cef4e546e64561f005995f234f3f1e767dcc5b3e..0b9726c40573e9eadc011d1454e370be3bb2be4b 100644 --- a/lib/Magento/View/Design/Theme/Image.php +++ b/lib/Magento/View/Design/Theme/Image.php @@ -22,11 +22,11 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\View\Design\Theme; + /** * Theme Image model class */ -namespace Magento\View\Design\Theme; - class Image { /** @@ -70,8 +70,6 @@ class Image protected $_theme; /** - * Initialize dependencies - * * @param \Magento\Filesystem $filesystem * @param \Magento\Image\Factory $imageFactory * @param Image\Uploader $uploader diff --git a/lib/Magento/View/Design/Theme/Image/PathInterface.php b/lib/Magento/View/Design/Theme/Image/PathInterface.php index a0e725a356ca464cad51eca42f35ab4e28bd169e..d13cb9e5fb4976758f654e38a882a659fbb84717 100644 --- a/lib/Magento/View/Design/Theme/Image/PathInterface.php +++ b/lib/Magento/View/Design/Theme/Image/PathInterface.php @@ -22,11 +22,11 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** - * Theme Image Path - */ namespace Magento\View\Design\Theme\Image; +/** + * Theme Image Path interface + */ interface PathInterface { /** diff --git a/lib/Magento/View/Design/Theme/Image/Uploader.php b/lib/Magento/View/Design/Theme/Image/Uploader.php index 492983b84d93fccc3bc966d12dcebd09f3b7e020..6d239f8446a79fde0a365b548f0026de6399dcd4 100644 --- a/lib/Magento/View/Design/Theme/Image/Uploader.php +++ b/lib/Magento/View/Design/Theme/Image/Uploader.php @@ -22,11 +22,11 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\View\Design\Theme\Image; + /** * Theme Image Uploader */ -namespace Magento\View\Design\Theme\Image; - class Uploader { /** @@ -51,7 +51,6 @@ class Uploader */ protected $_uploaderFactory; - /** * @param \Magento\Filesystem $filesystem * @param \Magento\HTTP\Adapter\FileTransferFactory $adapterFactory diff --git a/lib/Magento/View/Design/Theme/ImageFactory.php b/lib/Magento/View/Design/Theme/ImageFactory.php index b336ce60d6179988ee9b8d6edcda512b9eb80b10..ec19e2173eb28e4e8df1c06141f34294f81a7950 100644 --- a/lib/Magento/View/Design/Theme/ImageFactory.php +++ b/lib/Magento/View/Design/Theme/ImageFactory.php @@ -21,6 +21,7 @@ * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ + namespace Magento\View\Design\Theme; /** @@ -33,18 +34,16 @@ class ImageFactory * * @var \Magento\ObjectManager */ - protected $_objectManager = null; + protected $_objectManager; /** * Instance name to create * * @var string */ - protected $_instanceName = null; + protected $_instanceName; /** - * Factory constructor - * * @param \Magento\ObjectManager $objectManager * @param string $instanceName */ diff --git a/lib/Magento/View/Design/Theme/ThemeProviderInterface.php b/lib/Magento/View/Design/Theme/ThemeProviderInterface.php index 810f81d57d5899459f554c2eca37dd776d7674a2..005286910015e5905371eee9fdb5f30266a7359e 100644 --- a/lib/Magento/View/Design/Theme/ThemeProviderInterface.php +++ b/lib/Magento/View/Design/Theme/ThemeProviderInterface.php @@ -23,6 +23,9 @@ */ namespace Magento\View\Design\Theme; +/** + * Interface ThemeProviderInterface + */ interface ThemeProviderInterface { /** diff --git a/lib/Magento/View/Design/Theme/Validator.php b/lib/Magento/View/Design/Theme/Validator.php index ca2b6c1b18b4a631b499534940164a2b8083a8dd..a731c9ace95997bddca033e0078b31cec23963c6 100644 --- a/lib/Magento/View/Design/Theme/Validator.php +++ b/lib/Magento/View/Design/Theme/Validator.php @@ -18,13 +18,14 @@ * 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_Core * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ namespace Magento\View\Design\Theme; +/** + * Class Validator + */ class Validator { /** diff --git a/lib/Magento/View/Design/ThemeFactory.php b/lib/Magento/View/Design/ThemeFactory.php index 0dd7769edc5a04134166c3e1024f7ad2369859b7..90a57df75447f21922e0a19c4eec25450348a395 100644 --- a/lib/Magento/View/Design/ThemeFactory.php +++ b/lib/Magento/View/Design/ThemeFactory.php @@ -1,7 +1,5 @@ <?php /** - * Minimal required interface a theme has to implement - * * Magento * * NOTICE OF LICENSE @@ -28,6 +26,11 @@ namespace Magento\View\Design; use Magento\ObjectManager; +/** + * Class ThemeFactory + * + * Minimal required interface a theme has to implement + */ class ThemeFactory { /** @@ -44,7 +47,7 @@ class ThemeFactory } /** - * @param $themeId + * @param int $themeId * @return \Magento\View\Design\ThemeInterface * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ diff --git a/lib/Magento/View/Design/ThemeInterface.php b/lib/Magento/View/Design/ThemeInterface.php index 5dd1112c82b2670876cfc34479fb666ee238f3c2..ade1e3cf0449024b434955739cb3d9534f12a925 100644 --- a/lib/Magento/View/Design/ThemeInterface.php +++ b/lib/Magento/View/Design/ThemeInterface.php @@ -25,9 +25,7 @@ namespace Magento\View\Design; /** - * Theme Interface - * - * @package Magento\View\Design + * Interface ThemeInterface */ interface ThemeInterface { diff --git a/lib/Magento/View/DesignInterface.php b/lib/Magento/View/DesignInterface.php index ed1d090b6f6946733b26d78bd26510efa27193ab..d5cb26b8c1180779e517eecaca1be7f0cf9842f6 100644 --- a/lib/Magento/View/DesignInterface.php +++ b/lib/Magento/View/DesignInterface.php @@ -26,8 +26,6 @@ namespace Magento\View; /** * Design Interface - * - * @package Magento\View */ interface DesignInterface { diff --git a/lib/Magento/View/Element/BlockFactory.php b/lib/Magento/View/Element/BlockFactory.php index 208994af1a43e90435b563e9b03b5ac69deff9af..6656effa9e1ae976dc7ea37863dfd40398873ada 100644 --- a/lib/Magento/View/Element/BlockFactory.php +++ b/lib/Magento/View/Element/BlockFactory.php @@ -18,8 +18,6 @@ * 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_Core * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -28,6 +26,9 @@ namespace Magento\View\Element; use Magento\ObjectManager; +/** + * Class BlockFactory + */ class BlockFactory { /** @@ -44,7 +45,7 @@ class BlockFactory } /** - * @param $blockName + * @param string $blockName * @param array $arguments * @return mixed * @throws \LogicException diff --git a/lib/Magento/View/Element/BlockInterface.php b/lib/Magento/View/Element/BlockInterface.php index 94de53510da474e921c01cff91922832c8eb6efb..77f1e3b1c78acde1a09ea964aaf4ca47f546ca87 100644 --- a/lib/Magento/View/Element/BlockInterface.php +++ b/lib/Magento/View/Element/BlockInterface.php @@ -1,7 +1,5 @@ <?php /** - * Magento Block. Used to present information to user - * * Magento * * NOTICE OF LICENSE @@ -23,10 +21,13 @@ * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ + namespace Magento\View\Element; /** - * @package Magento\View + * Magento Block + * + * Used to present information to user */ interface BlockInterface { diff --git a/lib/Magento/View/Element/RendererInterface.php b/lib/Magento/View/Element/RendererInterface.php index 674930b7594f62ec590dc2c64d83b14005e4572c..c62334f15a30274367c5b86524c531c54fb43d0d 100644 --- a/lib/Magento/View/Element/RendererInterface.php +++ b/lib/Magento/View/Element/RendererInterface.php @@ -22,13 +22,10 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** - * Magento Block interface - */ namespace Magento\View\Element; /** - * @package Magento\View + * Magento Block interface */ interface RendererInterface { diff --git a/lib/Magento/View/FileSystem.php b/lib/Magento/View/FileSystem.php index cc412a56f0ba558d7e0c955f9032719a6a5d3c60..091e4ddb22e335a29c10eea2a4137551bfa73085 100644 --- a/lib/Magento/View/FileSystem.php +++ b/lib/Magento/View/FileSystem.php @@ -22,11 +22,11 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\View; + /** * Model that finds file paths by their fileId */ -namespace Magento\View; - class FileSystem { /** @@ -34,7 +34,7 @@ class FileSystem * * @var \Magento\View\Design\FileResolution\StrategyPool */ - protected $_resolutionPool = null; + protected $_resolutionPool; /** * @var \Magento\View\Service @@ -42,8 +42,6 @@ class FileSystem protected $_viewService; /** - * View files system model - * * @param \Magento\View\Design\FileResolution\StrategyPool $resolutionPool * @param \Magento\View\Service $viewService */ diff --git a/lib/Magento/View/Layout/Element.php b/lib/Magento/View/Layout/Element.php index d2f6624bdc12c0343e003fea55aeb3b1ee4de30b..57c398ca482460ac3cfccee726cb52bc5db6fcb3 100644 --- a/lib/Magento/View/Layout/Element.php +++ b/lib/Magento/View/Layout/Element.php @@ -25,7 +25,7 @@ namespace Magento\View\Layout; /** - * @package Magento\View + * Class Element */ class Element extends \Magento\Simplexml\Element { diff --git a/lib/Magento/View/Layout/File.php b/lib/Magento/View/Layout/File.php index 74fa444f484d8a2834129b32e14c58a9c22e28c2..d7aab0a83902ce0b7f345b5c6301cedde05460b6 100644 --- a/lib/Magento/View/Layout/File.php +++ b/lib/Magento/View/Layout/File.php @@ -1,7 +1,5 @@ <?php /** - * Layout file in the file system with context of its identity - * * Magento * * NOTICE OF LICENSE @@ -29,7 +27,7 @@ namespace Magento\View\Layout; use Magento\View\Design\ThemeInterface; /** - * @package Magento\View + * Layout file in the file system with context of its identity */ class File { diff --git a/lib/Magento/View/Layout/File/Factory.php b/lib/Magento/View/Layout/File/Factory.php index 2740e30c043155d5c73809b97986099887d271eb..9bc0d90606fe2f3aae334a3e2871adc3b6f9aadf 100644 --- a/lib/Magento/View/Layout/File/Factory.php +++ b/lib/Magento/View/Layout/File/Factory.php @@ -1,7 +1,5 @@ <?php /** - * Factory that produces layout file instances - * * Magento * * NOTICE OF LICENSE @@ -29,6 +27,9 @@ namespace Magento\View\Layout\File; use Magento\ObjectManager; use Magento\View\Design\ThemeInterface; +/** + * Factory that produces layout file instances + */ class Factory { /** diff --git a/lib/Magento/View/Layout/File/FileList.php b/lib/Magento/View/Layout/File/FileList.php index 50f7079b3e1f2aa7bee2463a59ee50328734415c..5674d28fe4c0d14ca5267a7aed9e3a20d820ea94 100644 --- a/lib/Magento/View/Layout/File/FileList.php +++ b/lib/Magento/View/Layout/File/FileList.php @@ -1,7 +1,5 @@ <?php /** - * Unordered list of layout file instances with awareness of layout file identity - * * Magento * * NOTICE OF LICENSE @@ -28,6 +26,9 @@ namespace Magento\View\Layout\File; use Magento\View\Layout\File; +/** + * Unordered list of layout file instances with awareness of layout file identity + */ class FileList { /** diff --git a/lib/Magento/View/Layout/File/FileList/Factory.php b/lib/Magento/View/Layout/File/FileList/Factory.php index b8873456cb28080a62a51f16852edd3de5a7a95a..bf7aae0e08ce8cdb493240e68e29289b790cee62 100644 --- a/lib/Magento/View/Layout/File/FileList/Factory.php +++ b/lib/Magento/View/Layout/File/FileList/Factory.php @@ -1,7 +1,5 @@ <?php /** - * Factory that produces layout file list instances - * * Magento * * NOTICE OF LICENSE @@ -28,6 +26,9 @@ namespace Magento\View\Layout\File\FileList; use Magento\ObjectManager; +/** + * Factory that produces layout file list instances + */ class Factory { /** diff --git a/lib/Magento/View/Layout/File/Source/Aggregated.php b/lib/Magento/View/Layout/File/Source/Aggregated.php index c9796ced27bf917c9dee34c14422b6117cb79d48..36f4968d11885e5b400f3f3978b962a785c949c0 100644 --- a/lib/Magento/View/Layout/File/Source/Aggregated.php +++ b/lib/Magento/View/Layout/File/Source/Aggregated.php @@ -1,7 +1,5 @@ <?php /** - * Source of layout files aggregated from a theme and its parents according to merging and overriding conventions - * * Magento * * NOTICE OF LICENSE @@ -30,6 +28,9 @@ use Magento\View\Layout\File\SourceInterface; use Magento\View\Design\ThemeInterface; use Magento\View\Layout\File\FileList\Factory; +/** + * Source of layout files aggregated from a theme and its parents according to merging and overriding conventions + */ class Aggregated implements SourceInterface { /** @@ -79,9 +80,13 @@ class Aggregated implements SourceInterface } /** + * Retrieve files + * * Aggregate layout files from modules and a theme and its ancestors * - * {@inheritdoc} + * @param ThemeInterface $theme + * @param string $filePath + * @return \Magento\View\Layout\File[] */ public function getFiles(ThemeInterface $theme, $filePath = '*') { diff --git a/lib/Magento/View/Layout/File/Source/Base.php b/lib/Magento/View/Layout/File/Source/Base.php index ecb8c243dbb13c6b261990337cf2069bc624b77f..0a6c7b10b90c76d92cdc0a01ec0848341717514d 100644 --- a/lib/Magento/View/Layout/File/Source/Base.php +++ b/lib/Magento/View/Layout/File/Source/Base.php @@ -1,7 +1,5 @@ <?php /** - * Source of base layout files introduced by modules - * * Magento * * NOTICE OF LICENSE @@ -32,6 +30,9 @@ use Magento\App\Dir; use Magento\Filesystem; use Magento\View\Layout\File\Factory; +/** + * Source of base layout files introduced by modules + */ class Base implements SourceInterface { /** @@ -65,7 +66,11 @@ class Base implements SourceInterface } /** - * {@inheritdoc} + * Retrieve files + * + * @param ThemeInterface $theme + * @param string $filePath + * @return array|\Magento\View\Layout\File[] */ public function getFiles(ThemeInterface $theme, $filePath = '*') { diff --git a/lib/Magento/View/Layout/File/Source/Decorator/ModuleDependency.php b/lib/Magento/View/Layout/File/Source/Decorator/ModuleDependency.php index 690938812001263e7590d94dfe8c61785aaf4b34..a350aaae637799e119ce4790255d4cf0e6870fad 100644 --- a/lib/Magento/View/Layout/File/Source/Decorator/ModuleDependency.php +++ b/lib/Magento/View/Layout/File/Source/Decorator/ModuleDependency.php @@ -1,7 +1,5 @@ <?php /** - * Decorator that sorts layout files according to dependencies between modules they belong to - * * Magento * * NOTICE OF LICENSE @@ -31,6 +29,9 @@ use Magento\View\Layout\File; use Magento\Module\ModuleListInterface; use Magento\View\Design\ThemeInterface; +/** + * Decorator that sorts layout files according to dependencies between modules they belong to + */ class ModuleDependency implements SourceInterface { /** @@ -65,7 +66,9 @@ class ModuleDependency implements SourceInterface /** * Retrieve layout files, sorted by the priority of modules they belong to * - * {@inheritdoc} + * @param ThemeInterface $theme + * @param string $filePath + * @return \Magento\View\Layout\File[] */ public function getFiles(ThemeInterface $theme, $filePath = '*') { diff --git a/lib/Magento/View/Layout/File/Source/Decorator/ModuleOutput.php b/lib/Magento/View/Layout/File/Source/Decorator/ModuleOutput.php index 7d42953c23e3a408067cdd95a53078ef51b649e2..e49847c798da86c5aa0f1b133686dd9f01cab5db 100644 --- a/lib/Magento/View/Layout/File/Source/Decorator/ModuleOutput.php +++ b/lib/Magento/View/Layout/File/Source/Decorator/ModuleOutput.php @@ -1,7 +1,5 @@ <?php /** - * Decorator that filters out layout files that belong to modules, output of which is prohibited - * * Magento * * NOTICE OF LICENSE @@ -31,6 +29,9 @@ use Magento\View\Layout\File; use Magento\Module\Manager; use Magento\View\Design\ThemeInterface; +/** + * Decorator that filters out layout files that belong to modules, output of which is prohibited + */ class ModuleOutput implements SourceInterface { /** @@ -56,9 +57,13 @@ class ModuleOutput implements SourceInterface } /** + * Retrieve files + * * Filter out theme files that belong to inactive modules or ones explicitly configured to not produce any output * - * {@inheritdoc} + * @param ThemeInterface $theme + * @param string $filePath + * @return array|\Magento\View\Layout\File[] */ public function getFiles(ThemeInterface $theme, $filePath = '*') { diff --git a/lib/Magento/View/Layout/File/Source/Override/Base.php b/lib/Magento/View/Layout/File/Source/Override/Base.php index 52b5639c56fba5d88daa4ff7598478a12686da73..a93abcf051496b73a2bb09a18691db8f1ec57b6a 100644 --- a/lib/Magento/View/Layout/File/Source/Override/Base.php +++ b/lib/Magento/View/Layout/File/Source/Override/Base.php @@ -1,7 +1,5 @@ <?php /** - * Source of layout files that explicitly override base files introduced by modules - * * Magento * * NOTICE OF LICENSE @@ -32,6 +30,9 @@ use Magento\App\Dir; use Magento\Filesystem; use Magento\View\Layout\File\Factory; +/** + * Source of layout files that explicitly override base files introduced by modules + */ class Base implements SourceInterface { /** @@ -65,7 +66,11 @@ class Base implements SourceInterface } /** - * {@inheritdoc} + * Retrieve files + * + * @param ThemeInterface $theme + * @param string $filePath + * @return array|\Magento\View\Layout\File[] */ public function getFiles(ThemeInterface $theme, $filePath = '*') { diff --git a/lib/Magento/View/Layout/File/Source/Override/Theme.php b/lib/Magento/View/Layout/File/Source/Override/Theme.php index a31bdb938575314c86e9f977fbb4f78e2dfe2a02..a949fe8acff1d324c2a34591b8db9b879506d5c6 100644 --- a/lib/Magento/View/Layout/File/Source/Override/Theme.php +++ b/lib/Magento/View/Layout/File/Source/Override/Theme.php @@ -1,7 +1,5 @@ <?php /** - * Source of layout files that explicitly override files of ancestor themes - * * Magento * * NOTICE OF LICENSE @@ -33,6 +31,9 @@ use Magento\Filesystem; use Magento\View\Layout\File\Factory; use Magento\Exception; +/** + * Source of layout files that explicitly override files of ancestor themes + */ class Theme implements SourceInterface { /** @@ -66,7 +67,12 @@ class Theme implements SourceInterface } /** - * {@inheritdoc} + * Retrieve files + * + * @param ThemeInterface $theme + * @param string $filePath + * @return array|\Magento\View\Layout\File[] + * @throws \Magento\Exception */ public function getFiles(ThemeInterface $theme, $filePath = '*') { diff --git a/lib/Magento/View/Layout/File/Source/Theme.php b/lib/Magento/View/Layout/File/Source/Theme.php index 0bad442387e0ed7325ca932a7137497584c11b13..1abcaec4f6d086dcd124dba940f152af6117b947 100644 --- a/lib/Magento/View/Layout/File/Source/Theme.php +++ b/lib/Magento/View/Layout/File/Source/Theme.php @@ -1,7 +1,5 @@ <?php /** - * Source of non-overriding layout files introduced by a theme - * * Magento * * NOTICE OF LICENSE @@ -32,6 +30,9 @@ use Magento\App\Dir; use Magento\Filesystem; use Magento\View\Layout\File\Factory; +/** + * Source of non-overriding layout files introduced by a theme + */ class Theme implements SourceInterface { /** @@ -65,7 +66,11 @@ class Theme implements SourceInterface } /** - * {@inheritdoc} + * Retrieve files + * + * @param ThemeInterface $theme + * @param string $filePath + * @return array|\Magento\View\Layout\File[] */ public function getFiles(ThemeInterface $theme, $filePath = '*') { diff --git a/lib/Magento/View/Layout/File/SourceInterface.php b/lib/Magento/View/Layout/File/SourceInterface.php index 57b9d7e9fcc0209a444f6669ef799ddc5bcf4e75..1ae7a62fcacbf08a128c419ba6947a49422f8b7e 100644 --- a/lib/Magento/View/Layout/File/SourceInterface.php +++ b/lib/Magento/View/Layout/File/SourceInterface.php @@ -1,7 +1,5 @@ <?php /** - * Interface of locating layout files in the file system - * * Magento * * NOTICE OF LICENSE @@ -28,6 +26,9 @@ namespace Magento\View\Layout\File; use Magento\View\Design\ThemeInterface; +/** + * Interface of locating layout files in the file system + */ interface SourceInterface { /** diff --git a/lib/Magento/View/Layout/ProcessorFactory.php b/lib/Magento/View/Layout/ProcessorFactory.php index 798ac0771050695d8c8f7babaadb8a900ef03f6a..a085b0eb69d8d9b5d1317ac30f078f5bc5078268 100644 --- a/lib/Magento/View/Layout/ProcessorFactory.php +++ b/lib/Magento/View/Layout/ProcessorFactory.php @@ -44,8 +44,6 @@ class ProcessorFactory protected $instanceName; /** - * Factory constructor - * * @param \Magento\ObjectManager $objectManager * @param string $instanceName */ diff --git a/lib/Magento/View/Layout/ProcessorInterface.php b/lib/Magento/View/Layout/ProcessorInterface.php index d8f903d060211f29e0555fb6a2798070079256bc..43bf8ea48c3bb87cd1320693468f93a2bb5c1ec4 100644 --- a/lib/Magento/View/Layout/ProcessorInterface.php +++ b/lib/Magento/View/Layout/ProcessorInterface.php @@ -25,7 +25,7 @@ namespace Magento\View\Layout; /** - * @package Magento\View + * Interface ProcessorInterface */ interface ProcessorInterface { @@ -75,6 +75,8 @@ interface ProcessorInterface public function getHandles(); /** + * Add page handles + * * Add the first existing (declared in layout updates) page handle along with all parents to the update. * Return whether any page handles have been added or not. * diff --git a/lib/Magento/View/LayoutFactory.php b/lib/Magento/View/LayoutFactory.php index f14846307426cbf10ea69853ec710629ec99c3dd..8c659aa3d83059b2b40743f033988948f6a27930 100644 --- a/lib/Magento/View/LayoutFactory.php +++ b/lib/Magento/View/LayoutFactory.php @@ -34,18 +34,16 @@ class LayoutFactory * * @var \Magento\ObjectManager */ - protected $_objectManager = null; + protected $_objectManager; /** * Instance name to create * * @var string */ - protected $_instanceName = null; + protected $_instanceName; /** - * Factory constructor - * * @param \Magento\ObjectManager $objectManager * @param string $instanceName */ diff --git a/lib/Magento/View/LayoutInterface.php b/lib/Magento/View/LayoutInterface.php index 8874fbe398be0ff8a75f9319740501ca492c8faf..2aad608141fb8df441adf84ef108b29560b729c9 100644 --- a/lib/Magento/View/LayoutInterface.php +++ b/lib/Magento/View/LayoutInterface.php @@ -24,6 +24,9 @@ namespace Magento\View; +/** + * Interface LayoutInterface + */ interface LayoutInterface { /** @@ -208,7 +211,7 @@ interface LayoutInterface /** * Add a block to registry, create new object if needed * - * @param string|\Magento\Core\Block\AbstractBlock $block + * @param string|\Magento\View\Block\AbstractBlock $block * @param string $name * @param string $parent * @param string $alias @@ -255,7 +258,7 @@ interface LayoutInterface /** * Retrieve messages block * - * @return \Magento\Core\Block\Messages + * @return \Magento\View\Block\Messages */ public function getMessagesBlock(); diff --git a/lib/Magento/View/PublicFilesManagerInterface.php b/lib/Magento/View/PublicFilesManagerInterface.php index 03e620bfb5d34c67db3cb5277368196d5bcd9ec9..4a3b598ee61e37c45f79ab6b528f8fb6f64dd4c8 100644 --- a/lib/Magento/View/PublicFilesManagerInterface.php +++ b/lib/Magento/View/PublicFilesManagerInterface.php @@ -22,11 +22,11 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\View; + /** * FileSystem Interface */ -namespace Magento\View; - interface PublicFilesManagerInterface { /** diff --git a/lib/Magento/View/Publisher.php b/lib/Magento/View/Publisher.php index f65244f90406c2d55ef64e93f020cf0e46b240e0..0fa4026af4b64cea360838f9a9d3c734a437c62c 100644 --- a/lib/Magento/View/Publisher.php +++ b/lib/Magento/View/Publisher.php @@ -22,11 +22,11 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\View; + /** * Handles file publication */ -namespace Magento\View; - class Publisher implements \Magento\View\PublicFilesManagerInterface { /**#@+ @@ -97,8 +97,6 @@ class Publisher implements \Magento\View\PublicFilesManagerInterface protected $_modulesReader; /** - * View files publisher model - * * @param \Magento\Logger $logger * @param \Magento\Filesystem $filesystem * @param \Magento\View\Url\CssResolver $cssUrlResolver @@ -129,7 +127,13 @@ class Publisher implements \Magento\View\PublicFilesManagerInterface } /** + * Get published file path + * * {@inheritdoc} + * + * @param string $filePath + * @param array $params + * @return string */ public function getPublicFilePath($filePath, $params) { @@ -241,7 +245,8 @@ class Publisher implements \Magento\View\PublicFilesManagerInterface } /** - * Determine whether a file needs to be published. + * Determine whether a file needs to be published + * * Js files are never processed. All other files must be processed either if they are not published already, * or if they are css-files and we're working in developer mode. * diff --git a/lib/Magento/View/Render/Html.php b/lib/Magento/View/Render/Html.php deleted file mode 100644 index 8bc49c98cebb1136c7b84efea0b57a259996cf63..0000000000000000000000000000000000000000 --- a/lib/Magento/View/Render/Html.php +++ /dev/null @@ -1,95 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - -namespace Magento\View\Render; - -use Magento\View\RenderInterface; -use Magento\View\TemplateEngineFactory; - -class Html implements RenderInterface -{ - /** - * Render type - */ - const TYPE_HTML = 'html'; - - /** - * @var TemplateEngineFactory - */ - protected $templateFactory; - - /** - * @param TemplateEngineFactory $templateFactory - */ - public function __construct( - TemplateEngineFactory $templateFactory - ) { - $this->templateFactory = $templateFactory; - } - - /** - * @param string $template - * @param array $data - * @return string - */ - public function renderTemplate($template, array $data) - { - // wrap block's result with ui data containers - return $this->fetchView($template, $data); - } - - /** - * @param string $content - * @param array $containerInfo - * @return string - */ - public function renderContainer($content, array $containerInfo = array()) - { - if (isset($containerInfo['tag'])) { - $htmlId = $htmlClass = ''; - if (isset($containerInfo['id'])) { - $htmlId = ' id="' . $containerInfo['id']. '"'; - } - if (isset($containerInfo['class'])) { - $htmlClass = ' class="'. $containerInfo['class'] . '"'; - } - $content = sprintf('<%1$s%2$s%3$s>%4$s</%1$s>', $containerInfo['tag'], $htmlId, $htmlClass, $content); - } - return $content; - } - - /** - * Retrieve rendered output - * - * @param string $template - * @param array $data - * @return string - */ - protected function fetchView($template, array $data = array()) - { - $extension = pathinfo($template, PATHINFO_EXTENSION); - $templateEngine = $this->templateFactory->get($extension); - return $templateEngine->render($template, $data); - } -} \ No newline at end of file diff --git a/lib/Magento/View/Render/RenderFactory.php b/lib/Magento/View/Render/RenderFactory.php index f7f3fe38f49efe9552fb616b2ca3552f23975bfb..bdb2e01af053c25731ab97ec36bf2ba744b77b87 100644 --- a/lib/Magento/View/Render/RenderFactory.php +++ b/lib/Magento/View/Render/RenderFactory.php @@ -27,6 +27,9 @@ namespace Magento\View\Render; use Magento\ObjectManager; use Magento\View\RenderInterface; +/** + * Class RenderFactory + */ class RenderFactory { /** diff --git a/lib/Magento/View/RenderInterface.php b/lib/Magento/View/RenderInterface.php index 447a511b3a28fb46a054beb08c3ea9dd4e08e7d4..96419baabf18c0ddbbca3e54aa43dc5b288088de 100644 --- a/lib/Magento/View/RenderInterface.php +++ b/lib/Magento/View/RenderInterface.php @@ -24,6 +24,9 @@ namespace Magento\View; +/** + * Interface RenderInterface + */ interface RenderInterface { /** diff --git a/lib/Magento/View/Service.php b/lib/Magento/View/Service.php index edfe2720cb0a1f06ec605ec89e4bec1109ba0216..448f09d9f594362691cd1d9fdca6fd0aecab9945 100644 --- a/lib/Magento/View/Service.php +++ b/lib/Magento/View/Service.php @@ -22,11 +22,11 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\View; + /** * Design service model */ -namespace Magento\View; - class Service { /** diff --git a/lib/Magento/View/TemplateEngine/Php.php b/lib/Magento/View/TemplateEngine/Php.php index 58382300fe99b63df6ac88a11bfea36cd6d4ca52..ce367b1807e34a42ff23367c2b3681487d0ddd32 100644 --- a/lib/Magento/View/TemplateEngine/Php.php +++ b/lib/Magento/View/TemplateEngine/Php.php @@ -1,7 +1,5 @@ <?php /** - * Template engine that enables PHP templates to be used for rendering - * * Magento * * NOTICE OF LICENSE @@ -29,6 +27,9 @@ namespace Magento\View\TemplateEngine; use Magento\View\TemplateEngineInterface; use Magento\View\Element\BlockInterface; +/** + * Template engine that enables PHP templates to be used for rendering + */ class Php implements TemplateEngineInterface { /** @@ -37,13 +38,14 @@ class Php implements TemplateEngineInterface protected $_currentBlock; /** + * Render output + * * Include the named PHTML template using the given block as the $this * reference, though only public methods will be accessible. * * @param BlockInterface $block * @param string $fileName * @param array $dictionary - * * @return string * @throws \Exception any exception that the template may throw */ @@ -66,13 +68,13 @@ class Php implements TemplateEngineInterface } /** - * Redirects methods calls to the current block. This is needed because - * the templates are included in the context of this engine rather than - * in the context of the block. + * Redirects methods calls to the current block + * + * This is needed because the templates are included in the context of this engine + * rather than in the context of the block. * * @param string $method * @param array $args - * * @return mixed */ public function __call($method, $args) @@ -81,12 +83,12 @@ class Php implements TemplateEngineInterface } /** - * Redirects isset calls to the current block. This is needed because - * the templates are included in the context of this engine rather than + * Redirects isset calls to the current block + * + * This is needed because the templates are included in the context of this engine rather than * in the context of the block. * * @param string $name - * * @return bool */ public function __isset($name) @@ -95,12 +97,12 @@ class Php implements TemplateEngineInterface } /** - * Allows read access to properties of the current block. This is needed - * because the templates are included in the context of this engine rather + * Allows read access to properties of the current block + * + * This is needed because the templates are included in the context of this engine rather * than in the context of the block. * * @param string $name - * * @return mixed */ public function __get($name) diff --git a/lib/Magento/View/TemplateEngineFactory.php b/lib/Magento/View/TemplateEngineFactory.php index 49d2f3d488c25901087dd30baba791a045773367..d321e94ae5f0df52aa1aec58e51f8ae34e2070bc 100644 --- a/lib/Magento/View/TemplateEngineFactory.php +++ b/lib/Magento/View/TemplateEngineFactory.php @@ -1,7 +1,5 @@ <?php /** - * Factory class for Template Engine - * * Magento * * NOTICE OF LICENSE @@ -28,6 +26,9 @@ namespace Magento\View; use Magento\ObjectManager; +/** + * Factory class for Template Engine + */ class TemplateEngineFactory { /** @@ -36,31 +37,40 @@ class TemplateEngineFactory protected $objectManager; /** - * Template engine type + * @var array */ - const ENGINE_PHTML = 'phtml'; + protected $engines; /** * @param ObjectManager $objectManager + * @param array $engines Format: array('<name>' => 'TemplateEngine\Class', ...) */ - public function __construct(ObjectManager $objectManager) - { + public function __construct( + ObjectManager $objectManager, + array $engines + ) { $this->objectManager = $objectManager; + $this->engines = $engines; } /** - * Gets the singleton instance of the appropriate template engine + * Retrieve a template engine instance by its unique name * - * @param string $name - * @return \Magento\View\TemplateEngineInterface - * @throws \InvalidArgumentException if template engine doesn't exist + * @param $name + * @return TemplateEngineInterface + * @throws \UnexpectedValueException If template engine doesn't implement the necessary interface + * @throws \InvalidArgumentException If template engine doesn't exist */ - public function get($name) + public function create($name) { - if (self::ENGINE_PHTML == $name) { - return $this->objectManager->get('Magento\\View\\TemplateEngine\\Php'); + if (!isset($this->engines[$name])) { + throw new \InvalidArgumentException("Unknown template engine type: '$name'."); + } + $engineClass = $this->engines[$name]; + $engineInstance = $this->objectManager->create($engineClass); + if (!($engineInstance instanceof \Magento\View\TemplateEngineInterface)) { + throw new \UnexpectedValueException("$engineClass has to implement the template engine interface."); } - // Unknown type, throw exception - throw new \InvalidArgumentException('Unknown template engine type: ' . $name); + return $engineInstance; } } diff --git a/lib/Magento/View/TemplateEngineInterface.php b/lib/Magento/View/TemplateEngineInterface.php index 48714d8bb1fb1d025929a228711e71ba445ddcf1..cf1c1b5feb6f030eb9d54f1d86d944f9ad65528b 100644 --- a/lib/Magento/View/TemplateEngineInterface.php +++ b/lib/Magento/View/TemplateEngineInterface.php @@ -1,7 +1,5 @@ <?php /** - * Interface for Template Engine - * * Magento * * NOTICE OF LICENSE @@ -26,9 +24,14 @@ namespace Magento\View; +/** + * Interface for Template Engine + */ interface TemplateEngineInterface { /** + * Render template + * * Render the named template in the context of a particular block and with * the data provided in $vars. * diff --git a/lib/Magento/View/TemplateEnginePool.php b/lib/Magento/View/TemplateEnginePool.php new file mode 100644 index 0000000000000000000000000000000000000000..6c7fc2a866c34f1fcf944d98b36e9e5ca537e40d --- /dev/null +++ b/lib/Magento/View/TemplateEnginePool.php @@ -0,0 +1,61 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +namespace Magento\View; + +use Magento\View\TemplateEngineFactory; + +class TemplateEnginePool +{ + /** + * @var TemplateEngineFactory + */ + protected $factory; + + /** + * @var \Magento\View\TemplateEngineInterface[] + */ + protected $engines = array(); + + /** + * @param TemplateEngineFactory $factory + */ + public function __construct(TemplateEngineFactory $factory) + { + $this->factory = $factory; + } + + /** + * Retrieve a template engine instance by its unique name + * + * @param string $name + * @return \Magento\View\TemplateEngineInterface + */ + public function get($name) + { + if (!isset($this->engines[$name])) { + $this->engines[$name] = $this->factory->create($name); + } + return $this->engines[$name]; + } +} diff --git a/lib/Magento/View/Url.php b/lib/Magento/View/Url.php index 6419f022d134ae26a183dc0c39062b13fdd968c8..be268bc5f85178a24b2b3f51c2418415853b788c 100644 --- a/lib/Magento/View/Url.php +++ b/lib/Magento/View/Url.php @@ -22,11 +22,11 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\View; + /** * Builds URLs for publicly accessible files */ -namespace Magento\View; - class Url { /** @@ -77,8 +77,6 @@ class Url protected $_fileUrlMap; /** - * View files URL model - * * @param \Magento\Filesystem $filesystem * @param \Magento\App\Dir $dirs * @param \Magento\UrlInterface $urlBuilder @@ -109,7 +107,9 @@ class Url } /** - * Get url to file base on theme file identifier. + * Retrieve view file URL + * + * Get URL to file base on theme file identifier. * Publishes file there, if needed. * * @param string $fileId diff --git a/lib/Magento/View/Url/ConfigInterface.php b/lib/Magento/View/Url/ConfigInterface.php index 31ffceac31270e25e2a38f1c474cf16d6dad4e11..c3e8dcd84c9a5d489a7c4283dfe76289069da4e9 100644 --- a/lib/Magento/View/Url/ConfigInterface.php +++ b/lib/Magento/View/Url/ConfigInterface.php @@ -22,11 +22,11 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\View\Url; + /** * Url Config Interface */ -namespace Magento\View\Url; - interface ConfigInterface { /** diff --git a/lib/Magento/View/Url/CssResolver.php b/lib/Magento/View/Url/CssResolver.php index 82689aaa934ea1c843fa0e3248be742253cc7fda..c0f02ba4e00911b5f7420984fe0ab99473e24d6b 100644 --- a/lib/Magento/View/Url/CssResolver.php +++ b/lib/Magento/View/Url/CssResolver.php @@ -1,7 +1,5 @@ <?php /** - * Helper to work with CSS files - * * Magento * * NOTICE OF LICENSE @@ -26,6 +24,9 @@ namespace Magento\View\Url; +/** + * Helper to work with CSS files + */ class CssResolver { /** @@ -57,6 +58,8 @@ class CssResolver } /** + * Replace relative URLs + * * Go through CSS content and modify relative urls, when content is read at $originalPath and then put to $newPath * * @param string $cssContent