diff --git a/CHANGELOG.md b/CHANGELOG.md index 88806577cdcb0..7abbad3509e7a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,80 @@ +2.0.0.0-dev73 +============= +* Framework Improvements: + * Eliminated the StoreConfig class, and ability to work with Configuration through the Store object. Scope Config was introduced instead. + * Fixed performance degradation caused by DI argument processors + * Covered Magento library components with unit tests: + * Magento/App/Request + * Magento/App/Resource directory and Magento/App/Resource.php + * Magento/App/Response + * Magento/App/Route + * Magento/App/Router + * Magento/App/Http.php + * Magento/Translate.php + * Improved the Web API framework based on Customer Service + * Updated the API Service Exception Handling + * Changed the conventional notation of Vendor name in theme path: from `app/design//_` to `app/design///` + * Renamed the 3DSecure library to CardinalCommerce, and removed the unused flex library +* Themes update: + * Updated the look&feel of the Admin theme +* Modularity improvements: + * Introduced a new Store module. Moved all Store related logic from Magento_Core to Magento_Store + * Moved the library part of the Config component from the Magento_Core module to the library + * Moved the Session related logic from the Magento_Core module to the library + * Moved the abstract logic related to Magento "Module" from Magento_Core to the library + * Moved the form key related functionality to the library + * Introduced a new Magento_UrlRewrite module and moved related classes from Magento_Core to the new module + * Moved the resource model to Magento_Install module + * Eliminated the Core\Helper\Js class + * Moved the Email related logic from Magento_Core module to Magento_Email module + * Moved the Cache related logic from the Magento_Core module to the library + * Resolved issues which appeared when an order had been placed before the Magento_Payment module was disabled + * Eliminated Magento_Catalog dependency on Magento_Rating + * Removed the Magento_Rating module, its logic moved to Magento_Review + * Moved the View related components from Magento_Core to the Magento/View library +* Refactored the following modules to use Customer Service + * Magento_Multishipping + * Magento_Paypal + * Magento_Log + * Magento_RSS + * Magento_Review + * Magento_Wishlist + * Magento_Weee + * Magento_CatalogInventory + * Magento_CatalogRule + * Magento_SalesRule +* GitHub requests: + * [#520] (https://github.com/magento/magento2/issues/520) -- Fixed spelling in Magento\Payment\Model\Method\AbstractMethod + * [#481] (https://github.com/magento/magento2/issues/481) -- GD2 Adapter PHP memory_limit + * [#516] (https://github.com/magento/magento2/issues/516) -- Make Sure That save_before Event Is Dispatched + * [#465] (https://github.com/magento/magento2/issues/465) -- Absolute path is assembled incorrectly when merging js/css files + * [#504] (https://github.com/magento/magento2/issues/504) -- Renamed "contacts" module to "contact" + * [#529] (https://github.com/magento/magento2/issues/529) -- Fixed exception at admin dashboard + * [#535] (https://github.com/magento/magento2/issues/535) -- Fixed an issue during creating or editing product template + * [#535] (https://github.com/magento/magento2/issues/535) -- Fixed Typo in the module name + * [#538] (https://github.com/magento/magento2/issues/538) -- Fixed missing tax amount in the invoice + * [#518] (https://github.com/magento/magento2/issues/518) -- Change to Magento\Customer\Block\Widget\Dob new version +* Fixed bugs: + * Fixed implementation issues with Cron task group threading + * Fixed inability to place order during customer registration flow + * Fixed an issue where after JS minification errors appeared when loading pages which contained minified JS + * Fixed an issue where it was impossible for users with restricted permission to export certain entities + * Fixed an issue where checkout was blocked by the "Please enter the State/Province" pop-up for customers that had saved addresses + * Fixed an issue where a fatal error appeared when trying to check out the second time with OnePageCheckout + * Fixed an issue where a fatal error appeared when trying to create an online invoice for an order placed with PayPal Express Checkout (Payment Action = Order) + * Fixed an issue where the special price for a bundle product was calculated wrongly + * Fixed an issue where a fatal error appeared when trying to create a shipment for an order if Magento was installed without the USPS module + * Fixed an issue where the Lifetime Sales and Average Orders sections of the Admin Dashboard were missing + * Fixed an issue where the active tab changed after changing the attribute set + * Fixed an issue with incorrect order of product types in the Add Product menu in the backend + * Fixed an issue with saving the tier price attribute +* JavaScript improvements: + * Upgraded the frontend jQuery library to version 1.11 + * Upgraded the frontend jQuery UI library to version 1.10.4 + * Modified the loader widget to render content using handlebars + * Added the 'use strict' mode to the accordion widget + * Added the 'use strict' mode to the tab widget + 2.0.0.0-dev72 ============= * Framework Improvements: @@ -55,7 +132,7 @@ * Updated the whitelist filter with library code for integration tests code coverage calculation * GitHub requests: * [#512] (https://github.com/magento/magento2/issues/512) -- Theme Thumbnails not showing - * [#520] (https://github.com/magento/magento2/pull/502) -- Corrected Search Engine Optimization i18n + * [#520] (https://github.com/magento/magento2/pull/520) -- Corrected Search Engine Optimization i18n * [#519] (https://github.com/magento/magento2/issues/519) -- New Theme Activation * Customer Service usage: * Refactored the Log module to use Customer Service @@ -567,7 +644,7 @@ * Design loader moved to library * Theme label moved to library * Themes update: - * Reduced amount of templates and layouts in magento_plushe theme + * Reduced amount of templates and layouts in Magento/plushe theme * Responsive design improvements * Integrity improvements: * Covered all Magento classes with argument sequence validator diff --git a/app/code/Magento/AdminNotification/Block/Inbox.php b/app/code/Magento/AdminNotification/Block/Inbox.php index c87c86aaec5fb..637e3fdd8a279 100644 --- a/app/code/Magento/AdminNotification/Block/Inbox.php +++ b/app/code/Magento/AdminNotification/Block/Inbox.php @@ -38,15 +38,6 @@ protected function _construct() $this->_blockGroup = 'Magento_AdminNotification'; $this->_headerText = __('Messages Inbox'); parent::_construct(); - } - - /** - * @return $this - */ - protected function _prepareLayout() - { - parent::_prepareLayout(); $this->_removeButton('add'); - return $this; } } diff --git a/app/code/Magento/AdminNotification/Helper/Data.php b/app/code/Magento/AdminNotification/Helper/Data.php index ccf89de26aaa1..b49459a58bc28 100644 --- a/app/code/Magento/AdminNotification/Helper/Data.php +++ b/app/code/Magento/AdminNotification/Helper/Data.php @@ -65,9 +65,9 @@ class Data extends \Magento\App\Helper\AbstractHelper protected $_unreadNoticeCounts; /** - * @var \Magento\Core\Model\Store\Config + * @var \Magento\App\Config\ScopeConfigInterface */ - protected $_coreStoreConfig; + protected $_scopeConfig; /** * @var \Magento\AdminNotification\Model\InboxFactory @@ -76,16 +76,16 @@ class Data extends \Magento\App\Helper\AbstractHelper /** * @param \Magento\App\Helper\Context $context - * @param \Magento\Core\Model\Store\Config $coreStoreConfig + * @param \Magento\App\Config\ScopeConfigInterface $scopeConfig * @param \Magento\AdminNotification\Model\InboxFactory $inboxFactory */ public function __construct( \Magento\App\Helper\Context $context, - \Magento\Core\Model\Store\Config $coreStoreConfig, + \Magento\App\Config\ScopeConfigInterface $scopeConfig, \Magento\AdminNotification\Model\InboxFactory $inboxFactory ) { parent::__construct($context); - $this->_coreStoreConfig = $coreStoreConfig; + $this->_scopeConfig = $scopeConfig; $this->_inboxFactory = $inboxFactory; } diff --git a/app/code/Magento/AdminNotification/Model/System/Message/Baseurl.php b/app/code/Magento/AdminNotification/Model/System/Message/Baseurl.php index db68ab173b8cd..9e8974a816f4f 100644 --- a/app/code/Magento/AdminNotification/Model/System/Message/Baseurl.php +++ b/app/code/Magento/AdminNotification/Model/System/Message/Baseurl.php @@ -31,31 +31,31 @@ class Baseurl implements \Magento\AdminNotification\Model\System\MessageInterfac protected $_urlBuilder; /** - * @var \Magento\App\ConfigInterface + * @var \Magento\App\Config\ScopeConfigInterface */ protected $_config; /** - * @var \Magento\Core\Model\StoreManagerInterface + * @var \Magento\Store\Model\StoreManagerInterface */ protected $_storeManager; /** - * @var \Magento\Core\Model\Config\ValueFactory + * @var \Magento\App\Config\ValueFactory */ protected $_configValueFactory; /** - * @param \Magento\App\ConfigInterface $config - * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\App\Config\ScopeConfigInterface $config + * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param \Magento\UrlInterface $urlBuilder - * @param \Magento\Core\Model\Config\ValueFactory $configValueFactory + * @param \Magento\App\Config\ValueFactory $configValueFactory */ public function __construct( - \Magento\App\ConfigInterface $config, - \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\App\Config\ScopeConfigInterface $config, + \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\UrlInterface $urlBuilder, - \Magento\Core\Model\Config\ValueFactory $configValueFactory + \Magento\App\Config\ValueFactory $configValueFactory ) { $this->_urlBuilder = $urlBuilder; $this->_config = $config; @@ -71,18 +71,18 @@ public function __construct( protected function _getConfigUrl() { $output = ''; - $defaultUnsecure = $this->_config->getValue(\Magento\Core\Model\Store::XML_PATH_UNSECURE_BASE_URL, 'default'); + $defaultUnsecure = $this->_config->getValue(\Magento\Store\Model\Store::XML_PATH_UNSECURE_BASE_URL, 'default'); - $defaultSecure = $this->_config->getValue(\Magento\Core\Model\Store::XML_PATH_SECURE_BASE_URL, 'default'); + $defaultSecure = $this->_config->getValue(\Magento\Store\Model\Store::XML_PATH_SECURE_BASE_URL, 'default'); - if ($defaultSecure == \Magento\Core\Model\Store::BASE_URL_PLACEHOLDER || - $defaultUnsecure == \Magento\Core\Model\Store::BASE_URL_PLACEHOLDER + if ($defaultSecure == \Magento\Store\Model\Store::BASE_URL_PLACEHOLDER || + $defaultUnsecure == \Magento\Store\Model\Store::BASE_URL_PLACEHOLDER ) { $output = $this->_urlBuilder->getUrl('adminhtml/system_config/edit', array('section' => 'web')); } else { /** @var $dataCollection \Magento\Core\Model\Resource\Config\Data\Collection */ $dataCollection = $this->_configValueFactory->create()->getCollection(); - $dataCollection->addValueFilter(\Magento\Core\Model\Store::BASE_URL_PLACEHOLDER); + $dataCollection->addValueFilter(\Magento\Store\Model\Store::BASE_URL_PLACEHOLDER); /** @var $data \Magento\App\Config\ValueInterface */ foreach ($dataCollection as $data) { diff --git a/app/code/Magento/AdminNotification/Model/System/Message/Security.php b/app/code/Magento/AdminNotification/Model/System/Message/Security.php index d31b4237f1ac8..0b4b6861b3408 100644 --- a/app/code/Magento/AdminNotification/Model/System/Message/Security.php +++ b/app/code/Magento/AdminNotification/Model/System/Message/Security.php @@ -54,7 +54,7 @@ class Security implements \Magento\AdminNotification\Model\System\MessageInterfa protected $_backendConfig; /** - * @var \Magento\App\ConfigInterface + * @var \Magento\App\Config\ScopeConfigInterface */ protected $_config; @@ -66,13 +66,13 @@ class Security implements \Magento\AdminNotification\Model\System\MessageInterfa /** * @param \Magento\App\CacheInterface $cache * @param \Magento\Backend\App\ConfigInterface $backendConfig - * @param \Magento\App\ConfigInterface $config + * @param \Magento\App\Config\ScopeConfigInterface $config * @param \Magento\HTTP\Adapter\CurlFactory $curlFactory */ public function __construct( \Magento\App\CacheInterface $cache, \Magento\Backend\App\ConfigInterface $backendConfig, - \Magento\App\ConfigInterface $config, + \Magento\App\Config\ScopeConfigInterface $config, \Magento\HTTP\Adapter\CurlFactory $curlFactory ) { $this->_cache = $cache; @@ -108,7 +108,7 @@ private function _canShowNotification() */ private function _isFileAccessible() { - $unsecureBaseURL = $this->_config->getValue(\Magento\Core\Model\Store::XML_PATH_UNSECURE_BASE_URL, 'default'); + $unsecureBaseURL = $this->_config->getValue(\Magento\Store\Model\Store::XML_PATH_UNSECURE_BASE_URL, 'default'); /** @var $http \Magento\HTTP\Adapter\Curl */ $http = $this->_curlFactory->create(); diff --git a/app/code/Magento/AdminNotification/etc/adminhtml/di.xml b/app/code/Magento/AdminNotification/etc/adminhtml/di.xml index e99780fbc95b4..833f39912e931 100644 --- a/app/code/Magento/AdminNotification/etc/adminhtml/di.xml +++ b/app/code/Magento/AdminNotification/etc/adminhtml/di.xml @@ -36,4 +36,11 @@ + + + + Magento_AdminNotification + + + diff --git a/app/code/Magento/AdminNotification/etc/module.xml b/app/code/Magento/AdminNotification/etc/module.xml index ec72a95860892..f70d9dab760e9 100644 --- a/app/code/Magento/AdminNotification/etc/module.xml +++ b/app/code/Magento/AdminNotification/etc/module.xml @@ -27,8 +27,10 @@ + + diff --git a/app/code/Magento/AdminNotification/sql/adminnotification_setup/install-1.6.0.0.php b/app/code/Magento/AdminNotification/sql/adminnotification_setup/install-1.6.0.0.php index 65bd8bf53a593..076d14fb56326 100644 --- a/app/code/Magento/AdminNotification/sql/adminnotification_setup/install-1.6.0.0.php +++ b/app/code/Magento/AdminNotification/sql/adminnotification_setup/install-1.6.0.0.php @@ -32,7 +32,7 @@ * @author Magento Core Team */ $installer = $this; -/* @var $installer \Magento\Core\Model\Resource\Setup */ +/* @var $installer \Magento\Module\Setup */ $installer->startSetup(); /** diff --git a/app/code/Magento/AdminNotification/sql/adminnotification_setup/upgrade-1.6.0.0-2.0.0.0.php b/app/code/Magento/AdminNotification/sql/adminnotification_setup/upgrade-1.6.0.0-2.0.0.0.php index 1844643ec282e..08049ba1080bc 100644 --- a/app/code/Magento/AdminNotification/sql/adminnotification_setup/upgrade-1.6.0.0-2.0.0.0.php +++ b/app/code/Magento/AdminNotification/sql/adminnotification_setup/upgrade-1.6.0.0-2.0.0.0.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ $installer = $this; -/* @var $installer \Magento\Core\Model\Resource\Setup */ +/* @var $installer \Magento\Module\Setup */ $installer->startSetup(); /** diff --git a/app/code/Magento/AdminNotification/view/adminhtml/layout/default.xml b/app/code/Magento/AdminNotification/view/adminhtml/layout/default.xml index 124d63f3f1b82..7c7dbf54fa7b4 100644 --- a/app/code/Magento/AdminNotification/view/adminhtml/layout/default.xml +++ b/app/code/Magento/AdminNotification/view/adminhtml/layout/default.xml @@ -29,9 +29,9 @@ - - - + + + diff --git a/app/code/Magento/AdminNotification/view/adminhtml/toolbar_entry.js b/app/code/Magento/AdminNotification/view/adminhtml/toolbar_entry.js index a1327b2476c6c..a12271564c345 100644 --- a/app/code/Magento/AdminNotification/view/adminhtml/toolbar_entry.js +++ b/app/code/Magento/AdminNotification/view/adminhtml/toolbar_entry.js @@ -28,7 +28,7 @@ $(document).ready(function() { // Mark notification as read via AJAX call var markNotificationAsRead = function(notificationId) { - var requestUrl = $('.notifications .dropdown-menu').attr('data-mark-as-read-url'); + var requestUrl = $('.notifications-summary .dropdown-menu').attr('data-mark-as-read-url'); $.ajax({ url: requestUrl, type: 'POST', @@ -39,36 +39,36 @@ showLoader: false }); }; - var notificationCount = $('.notifications').attr('data-notification-count'); + var notificationCount = $('.notifications-summary').attr('data-notification-count'); // Remove notification from the list var removeNotificationFromList = function(notificationEntry) { notificationEntry.remove(); notificationCount--; - $('.notifications').attr('data-notification-count', notificationCount); + $('.notifications-summary').attr('data-notification-count', notificationCount); if (notificationCount == 0) { // Change appearance of the bubble and its behavior when the last notification is removed - $('.notifications .dropdown-menu').remove(); - var notificationIcon = $('.notifications .notifications-icon'); + $('.notifications-summary .dropdown-menu').remove(); + var notificationIcon = $('.notifications-summary .notifications-icon'); notificationIcon.removeAttr('data-toggle'); notificationIcon.off('click.dropdown'); - $('.notifications .notifications-icon .value').text(''); - $('.notifications .notifications-icon .value').hide(); + $('.notifications-action .counter').text(''); + $('.notifications-action .counter').hide(); } else { - $('.notifications .notifications-icon .value').text(notificationCount); + $('.notifications-action .counter').text(notificationCount); // Modify caption of the 'See All' link - var actionElement = $('.notifications .dropdown-menu .last .action-more'); + var actionElement = $('.notifications-summary .dropdown-menu .last .action-more'); actionElement.text(actionElement.text().replace(/\d+/, notificationCount)); } }; // Show popup with notification details var showNotificationDetails = function(notificationEntry) { - var popupElement = notificationEntry.find('.notification-dialog-content').clone(); + var popupElement = notificationEntry.find('.notifications-dialog-content').clone(); var notificationId = notificationEntry.attr('data-notification-id'); - var dialogClassSeverity = 'notification-entry-dialog'; + var dialogClassSeverity = 'notifications-entry-dialog'; if (notificationEntry.attr('data-notification-severity')) { - dialogClassSeverity = 'notification-entry-dialog notification-entry-dialog-critical'; + dialogClassSeverity = 'notifications-entry-dialog notifications-entry-dialog-critical'; } popupElement.dialog({ title: popupElement.attr('data-title'), @@ -99,16 +99,16 @@ }; // Show notification description when corresponding item is clicked - $('.notifications .dropdown-menu .notification-entry').on('click.showNotification', function(event) { + $('.notifications-summary .dropdown-menu .notifications-entry').on('click.showNotification', function(event) { // hide notification dropdown - $('.notifications .notifications-icon').trigger('click.dropdown'); + $('.notifications-summary .notifications-icon').trigger('click.dropdown'); showNotificationDetails($(this)); event.stopPropagation(); }); // Remove corresponding notification from the list and mark it as read - $('.notifications .dropdown-menu .notification-entry .action-close').on('click.removeNotification', function(event) { - var notificationEntry = $(this).closest('.notification-entry') + $('.notifications-close').on('click.removeNotification', function(event) { + var notificationEntry = $(this).closest('.notifications-entry') var notificationId = notificationEntry.attr('data-notification-id'); markNotificationAsRead(notificationId); removeNotificationFromList(notificationEntry); @@ -117,9 +117,9 @@ // Hide notifications bubble if (notificationCount == 0) { - $('.notifications .notifications-icon .value').hide(); + $('.notifications-action .counter').hide(); } else { - $('.notifications .notifications-icon .value').show(); + $('.notifications-action .counter').show(); } }); })(window.jQuery); diff --git a/app/code/Magento/AdminNotification/view/adminhtml/toolbar_entry.phtml b/app/code/Magento/AdminNotification/view/adminhtml/toolbar_entry.phtml index b94db072282b4..71f33e8913f46 100644 --- a/app/code/Magento/AdminNotification/view/adminhtml/toolbar_entry.phtml +++ b/app/code/Magento/AdminNotification/view/adminhtml/toolbar_entry.phtml @@ -26,38 +26,39 @@ ?> getUnreadNotificationCount(); ?> -
+
0) : ?> - - escapeHtml($notificationCount); ?> + + + escapeHtml($notificationCount); ?> -
diff --git a/app/code/Magento/Authorizenet/Helper/Backend.php b/app/code/Magento/Authorizenet/Helper/Backend.php index a35e66d6525c9..4909cc3243225 100644 --- a/app/code/Magento/Authorizenet/Helper/Backend.php +++ b/app/code/Magento/Authorizenet/Helper/Backend.php @@ -32,13 +32,13 @@ class Backend extends Data { /** * @param \Magento\App\Helper\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param \Magento\Sales\Model\OrderFactory $orderFactory * @param \Magento\Backend\Model\UrlInterface $backendUrl */ public function __construct( \Magento\App\Helper\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Sales\Model\OrderFactory $orderFactory, \Magento\Backend\Model\UrlInterface $backendUrl ) { diff --git a/app/code/Magento/Authorizenet/Helper/Data.php b/app/code/Magento/Authorizenet/Helper/Data.php index a96f459a35f26..9b7fb737ccd8f 100644 --- a/app/code/Magento/Authorizenet/Helper/Data.php +++ b/app/code/Magento/Authorizenet/Helper/Data.php @@ -31,7 +31,7 @@ class Data extends \Magento\App\Helper\AbstractHelper implements HelperInterface { /** - * @var \Magento\Core\Model\StoreManagerInterface + * @var \Magento\Store\Model\StoreManagerInterface */ protected $_storeManager; @@ -42,12 +42,12 @@ class Data extends \Magento\App\Helper\AbstractHelper implements HelperInterface /** * @param \Magento\App\Helper\Context $context - * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param \Magento\Sales\Model\OrderFactory $orderFactory */ public function __construct( \Magento\App\Helper\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Sales\Model\OrderFactory $orderFactory ) { parent::__construct($context); diff --git a/app/code/Magento/Authorizenet/Model/Authorizenet.php b/app/code/Magento/Authorizenet/Model/Authorizenet.php index 04ac998df3aaa..4dea7bf1e3040 100644 --- a/app/code/Magento/Authorizenet/Model/Authorizenet.php +++ b/app/code/Magento/Authorizenet/Model/Authorizenet.php @@ -314,7 +314,7 @@ class Authorizenet extends \Magento\Payment\Model\Method\Cc /** * @param \Magento\Event\ManagerInterface $eventManager * @param \Magento\Payment\Helper\Data $paymentData - * @param \Magento\Core\Model\Store\Config $coreStoreConfig + * @param \Magento\App\Config\ScopeConfigInterface $scopeConfig * @param \Magento\Logger\AdapterFactory $logAdapterFactory * @param \Magento\Logger $logger * @param \Magento\Module\ModuleListInterface $moduleList @@ -333,7 +333,7 @@ class Authorizenet extends \Magento\Payment\Model\Method\Cc public function __construct( \Magento\Event\ManagerInterface $eventManager, \Magento\Payment\Helper\Data $paymentData, - \Magento\Core\Model\Store\Config $coreStoreConfig, + \Magento\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Logger\AdapterFactory $logAdapterFactory, \Magento\Logger $logger, \Magento\Module\ModuleListInterface $moduleList, @@ -356,7 +356,7 @@ public function __construct( parent::__construct( $eventManager, $paymentData, - $coreStoreConfig, + $scopeConfig, $logAdapterFactory, $logger, $moduleList, diff --git a/app/code/Magento/Authorizenet/Model/Directpost.php b/app/code/Magento/Authorizenet/Model/Directpost.php index fb2ced68a254f..3b4c40502256f 100644 --- a/app/code/Magento/Authorizenet/Model/Directpost.php +++ b/app/code/Magento/Authorizenet/Model/Directpost.php @@ -71,7 +71,7 @@ class Directpost extends \Magento\Authorizenet\Model\Authorizenet /**#@-*/ /** - * @var \Magento\Core\Model\StoreManagerInterface + * @var \Magento\Store\Model\StoreManagerInterface */ protected $_storeManager; @@ -93,7 +93,7 @@ class Directpost extends \Magento\Authorizenet\Model\Authorizenet /** * @param \Magento\Event\ManagerInterface $eventManager * @param \Magento\Payment\Helper\Data $paymentData - * @param \Magento\Core\Model\Store\Config $coreStoreConfig + * @param \Magento\App\Config\ScopeConfigInterface $scopeConfig * @param \Magento\Logger\AdapterFactory $logAdapterFactory * @param \Magento\Logger $logger * @param \Magento\Module\ModuleListInterface $moduleList @@ -105,7 +105,7 @@ class Directpost extends \Magento\Authorizenet\Model\Authorizenet * @param \Magento\Sales\Model\OrderFactory $orderFactory * @param \Magento\Session\SessionManagerInterface $session * @param \Magento\Authorizenet\Helper\Data $authorizenetData - * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param \Magento\Sales\Model\QuoteFactory $quoteFactory * @param \Magento\Authorizenet\Model\Directpost\RequestFactory $directRequestFactory * @param \Magento\Authorizenet\Model\Directpost\Response $response @@ -117,7 +117,7 @@ class Directpost extends \Magento\Authorizenet\Model\Authorizenet public function __construct( \Magento\Event\ManagerInterface $eventManager, \Magento\Payment\Helper\Data $paymentData, - \Magento\Core\Model\Store\Config $coreStoreConfig, + \Magento\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Logger\AdapterFactory $logAdapterFactory, \Magento\Logger $logger, \Magento\Module\ModuleListInterface $moduleList, @@ -129,7 +129,7 @@ public function __construct( \Magento\Sales\Model\OrderFactory $orderFactory, \Magento\Session\SessionManagerInterface $session, \Magento\Authorizenet\Helper\Data $authorizenetData, - \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Sales\Model\QuoteFactory $quoteFactory, \Magento\Authorizenet\Model\Directpost\RequestFactory $directRequestFactory, \Magento\Authorizenet\Model\Directpost\Response $response, @@ -139,7 +139,7 @@ public function __construct( parent::__construct( $eventManager, $paymentData, - $coreStoreConfig, + $scopeConfig, $logAdapterFactory, $logger, $moduleList, diff --git a/app/code/Magento/Authorizenet/Model/Directpost/Observer.php b/app/code/Magento/Authorizenet/Model/Directpost/Observer.php index 0cf3d64840677..286c3c29981a4 100644 --- a/app/code/Magento/Authorizenet/Model/Directpost/Observer.php +++ b/app/code/Magento/Authorizenet/Model/Directpost/Observer.php @@ -64,7 +64,7 @@ class Observer protected $_session; /** - * @var \Magento\Core\Model\StoreManagerInterface + * @var \Magento\Store\Model\StoreManagerInterface */ protected $_storeManager; @@ -74,7 +74,7 @@ class Observer * @param \Magento\Registry $coreRegistry * @param \Magento\Authorizenet\Model\Directpost $payment * @param \Magento\Authorizenet\Model\Directpost\Session $session - * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\Store\Model\StoreManagerInterface $storeManager */ public function __construct( \Magento\Authorizenet\Helper\Data $authorizenetData, @@ -82,7 +82,7 @@ public function __construct( \Magento\Registry $coreRegistry, \Magento\Authorizenet\Model\Directpost $payment, \Magento\Authorizenet\Model\Directpost\Session $session, - \Magento\Core\Model\StoreManagerInterface $storeManager + \Magento\Store\Model\StoreManagerInterface $storeManager ) { $this->_coreRegistry = $coreRegistry; $this->_authorizenetData = $authorizenetData; diff --git a/app/code/Magento/Authorizenet/Model/Directpost/Session.php b/app/code/Magento/Authorizenet/Model/Directpost/Session.php index 659cab1f0dded..59d0884644c79 100644 --- a/app/code/Magento/Authorizenet/Model/Directpost/Session.php +++ b/app/code/Magento/Authorizenet/Model/Directpost/Session.php @@ -31,7 +31,7 @@ class Session extends \Magento\Session\SessionManager { /** - * @param \Magento\App\RequestInterface $request + * @param \Magento\App\Request\Http $request * @param \Magento\Session\SidResolverInterface $sidResolver * @param \Magento\Session\Config\ConfigInterface $sessionConfig * @param \Magento\Session\SaveHandlerInterface $saveHandler @@ -41,7 +41,7 @@ class Session extends \Magento\Session\SessionManager * @internal param array $data */ public function __construct( - \Magento\App\RequestInterface $request, + \Magento\App\Request\Http $request, \Magento\Session\SidResolverInterface $sidResolver, \Magento\Session\Config\ConfigInterface $sessionConfig, \Magento\Session\SaveHandlerInterface $saveHandler, diff --git a/app/code/Magento/Authorizenet/etc/module.xml b/app/code/Magento/Authorizenet/etc/module.xml index 30827b5f82e2c..2a1baabe9f32e 100644 --- a/app/code/Magento/Authorizenet/etc/module.xml +++ b/app/code/Magento/Authorizenet/etc/module.xml @@ -30,6 +30,7 @@ + diff --git a/app/code/Magento/Authz/Service/AuthorizationV1.php b/app/code/Magento/Authz/Service/AuthorizationV1.php index 85560afb42a0e..a2c4a65b594f0 100644 --- a/app/code/Magento/Authz/Service/AuthorizationV1.php +++ b/app/code/Magento/Authz/Service/AuthorizationV1.php @@ -27,8 +27,8 @@ use Magento\Acl; use Magento\Authz\Model\UserIdentifier; use Magento\Logger; -use Magento\Service\Exception as ServiceException; -use Magento\Service\ResourceNotFoundException; +use Magento\Webapi\ServiceException as ServiceException; +use Magento\Webapi\ServiceResourceNotFoundException; use Magento\User\Model\Resource\Role\CollectionFactory as RoleCollectionFactory; use Magento\User\Model\Resource\Rules\CollectionFactory as RulesCollectionFactory; use Magento\User\Model\Role; @@ -126,7 +126,7 @@ public function isAllowed($resources, UserIdentifier $userIdentifier = null) try { $role = $this->_getUserRole($userIdentifier); if (!$role) { - throw new ResourceNotFoundException( + throw new ServiceResourceNotFoundException( __( 'Role for user with ID "%1" and user type "%2" cannot be found.', $userIdentifier->getUserId(), diff --git a/app/code/Magento/Authz/Service/AuthorizationV1Interface.php b/app/code/Magento/Authz/Service/AuthorizationV1Interface.php index dba4b3e1ac766..22769fa794db3 100644 --- a/app/code/Magento/Authz/Service/AuthorizationV1Interface.php +++ b/app/code/Magento/Authz/Service/AuthorizationV1Interface.php @@ -24,7 +24,7 @@ namespace Magento\Authz\Service; use Magento\Authz\Model\UserIdentifier; -use Magento\Service\Exception as ServiceException; +use Magento\Webapi\ServiceException as ServiceException; /** * Authorization service interface. diff --git a/app/code/Magento/Authz/etc/module.xml b/app/code/Magento/Authz/etc/module.xml index 1e2d85488113d..9c997c43014d5 100644 --- a/app/code/Magento/Authz/etc/module.xml +++ b/app/code/Magento/Authz/etc/module.xml @@ -29,7 +29,7 @@ - + diff --git a/app/code/Magento/Backend/App/Config.php b/app/code/Magento/Backend/App/Config.php index 506195f5c987c..6594641064240 100644 --- a/app/code/Magento/Backend/App/Config.php +++ b/app/code/Magento/Backend/App/Config.php @@ -51,7 +51,7 @@ public function __construct(\Magento\App\Config\ScopePool $scopePool) */ public function getValue($path) { - return $this->_scopePool->getScope('default', null)->getValue($path); + return $this->_scopePool->getScope(\Magento\App\ScopeInterface::SCOPE_DEFAULT, null)->getValue($path); } /** @@ -63,17 +63,7 @@ public function getValue($path) */ public function setValue($path, $value) { - $this->_scopePool->getScope('default', null)->setValue($path, $value); - } - - /** - * Reinitialize configuration - * - * @return void - */ - public function reinit() - { - $this->_scopePool->clean(); + $this->_scopePool->getScope(\Magento\App\ScopeInterface::SCOPE_DEFAULT, null)->setValue($path, $value); } /** @@ -84,6 +74,6 @@ public function reinit() */ public function isSetFlag($path) { - return !!$this->_scopePool->getScope('default', null)->getValue($path); + return !!$this->_scopePool->getScope(\Magento\App\ScopeInterface::SCOPE_DEFAULT, null)->getValue($path); } } diff --git a/app/code/Magento/Backend/App/ConfigInterface.php b/app/code/Magento/Backend/App/ConfigInterface.php index 0b124e5a1fb80..fe642439a366d 100644 --- a/app/code/Magento/Backend/App/ConfigInterface.php +++ b/app/code/Magento/Backend/App/ConfigInterface.php @@ -47,13 +47,6 @@ public function getValue($path); */ public function setValue($path, $value); - /** - * Reinitialize config object - * - * @return void - */ - public function reinit(); - /** * Retrieve config flag * diff --git a/app/code/Magento/Backend/App/Request/PathInfoProcessor.php b/app/code/Magento/Backend/App/Request/PathInfoProcessor.php index 13745a7473dbc..27760b6527729 100644 --- a/app/code/Magento/Backend/App/Request/PathInfoProcessor.php +++ b/app/code/Magento/Backend/App/Request/PathInfoProcessor.php @@ -33,16 +33,16 @@ class PathInfoProcessor implements \Magento\App\Request\PathInfoProcessorInterfa private $_helper; /** - * @var \Magento\Core\App\Request\PathInfoProcessor + * @var \Magento\Store\App\Request\PathInfoProcessor */ private $_subject; /** - * @param \Magento\Core\App\Request\PathInfoProcessor $subject + * @param \Magento\Store\App\Request\PathInfoProcessor $subject * @param \Magento\Backend\Helper\Data $helper */ public function __construct( - \Magento\Core\App\Request\PathInfoProcessor $subject, + \Magento\Store\App\Request\PathInfoProcessor $subject, \Magento\Backend\Helper\Data $helper ) { $this->_helper = $helper; diff --git a/app/code/Magento/Backend/App/Router/DefaultRouter.php b/app/code/Magento/Backend/App/Router/DefaultRouter.php index 8c234f0454dea..ba6ca3306d7e3 100644 --- a/app/code/Magento/Backend/App/Router/DefaultRouter.php +++ b/app/code/Magento/Backend/App/Router/DefaultRouter.php @@ -39,7 +39,7 @@ class DefaultRouter extends \Magento\Core\App\Router\Base protected $_url; /** - * @var \Magento\App\ConfigInterface + * @var \Magento\App\Config\ScopeConfigInterface */ protected $_coreConfig; @@ -58,11 +58,11 @@ class DefaultRouter extends \Magento\Core\App\Router\Base * @param \Magento\App\Route\ConfigInterface $routeConfig * @param \Magento\App\State $appState * @param \Magento\UrlInterface $url - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Store\Config $storeConfig + * @param \Magento\Store\Model\StoreManagerInterface $storeManager + * @param \Magento\App\Config\ScopeConfigInterface $scopeConfig * @param \Magento\Url\SecurityInfoInterface $urlSecurityInfo * @param string $routerId - * @param \Magento\App\ConfigInterface $coreConfig + * @param \Magento\App\Config\ScopeConfigInterface $coreConfig * @param \Magento\Backend\App\ConfigInterface $backendConfig * @param \Magento\Code\NameBuilder $nameBuilder * @@ -75,12 +75,12 @@ public function __construct( \Magento\App\Route\ConfigInterface $routeConfig, \Magento\App\State $appState, \Magento\UrlInterface $url, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Store\Config $storeConfig, + \Magento\Store\Model\StoreManagerInterface $storeManager, + \Magento\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Url\SecurityInfoInterface $urlSecurityInfo, $routerId, \Magento\Code\NameBuilder $nameBuilder, - \Magento\App\ConfigInterface $coreConfig, + \Magento\App\Config\ScopeConfigInterface $coreConfig, \Magento\Backend\App\ConfigInterface $backendConfig ) { parent::__construct( @@ -91,7 +91,7 @@ public function __construct( $appState, $url, $storeManager, - $storeConfig, + $scopeConfig, $urlSecurityInfo, $routerId, $nameBuilder diff --git a/app/code/Magento/Backend/Block/Cache.php b/app/code/Magento/Backend/Block/Cache.php index da9c525623945..8b6c9cad6f81b 100644 --- a/app/code/Magento/Backend/Block/Cache.php +++ b/app/code/Magento/Backend/Block/Cache.php @@ -43,7 +43,7 @@ protected function _construct() array( 'label' => __('Flush Magento Cache'), 'onclick' => 'setLocation(\'' . $this->getFlushSystemUrl() . '\')', - 'class' => 'delete' + 'class' => 'primary flush-cache-magento' ) ); @@ -53,7 +53,7 @@ protected function _construct() array( 'label' => __('Flush Cache Storage'), 'onclick' => 'confirmSetLocation(\'' . $message . '\', \'' . $this->getFlushStorageUrl() . '\')', - 'class' => 'delete' + 'class' => 'flush-cache-storage' ) ); } diff --git a/app/code/Magento/Backend/Block/Context.php b/app/code/Magento/Backend/Block/Context.php index 235f2f10913c8..e2d11aae32e4c 100644 --- a/app/code/Magento/Backend/Block/Context.php +++ b/app/code/Magento/Backend/Block/Context.php @@ -47,7 +47,7 @@ class Context extends \Magento\View\Element\Context * @param \Magento\View\DesignInterface $design * @param \Magento\Session\SessionManagerInterface $session * @param \Magento\Session\SidResolverInterface $sidResolver - * @param \Magento\Core\Model\Store\Config $storeConfig + * @param \Magento\App\Config\ScopeConfigInterface $scopeConfig * @param \Magento\View\Url $viewUrl * @param \Magento\View\ConfigInterface $viewConfig * @param \Magento\App\Cache\StateInterface $cacheState @@ -70,7 +70,7 @@ public function __construct( \Magento\View\DesignInterface $design, \Magento\Session\SessionManagerInterface $session, \Magento\Session\SidResolverInterface $sidResolver, - \Magento\Core\Model\Store\Config $storeConfig, + \Magento\App\Config\ScopeConfigInterface $scopeConfig, \Magento\View\Url $viewUrl, \Magento\View\ConfigInterface $viewConfig, \Magento\App\Cache\StateInterface $cacheState, @@ -92,7 +92,7 @@ public function __construct( $design, $session, $sidResolver, - $storeConfig, + $scopeConfig, $viewUrl, $viewConfig, $cacheState, diff --git a/app/code/Magento/Backend/Block/Dashboard.php b/app/code/Magento/Backend/Block/Dashboard.php index 2340fd9280423..8140865b63af9 100644 --- a/app/code/Magento/Backend/Block/Dashboard.php +++ b/app/code/Magento/Backend/Block/Dashboard.php @@ -52,7 +52,7 @@ protected function _prepareLayout() $this->addChild('topSearches', 'Magento\Backend\Block\Dashboard\Searches\Top'); - if ($this->_storeConfig->getConfig(self::XML_PATH_ENABLE_CHARTS)) { + if ($this->_scopeConfig->getValue(self::XML_PATH_ENABLE_CHARTS, \Magento\Store\Model\ScopeInterface::SCOPE_STORE)) { $block = $this->getLayout()->createBlock('Magento\Backend\Block\Dashboard\Diagrams'); } else { $block = $this->getLayout()->createBlock( diff --git a/app/code/Magento/Backend/Block/Dashboard/Bar.php b/app/code/Magento/Backend/Block/Dashboard/Bar.php index 8ea931654504c..b1b67c956e4fd 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Bar.php +++ b/app/code/Magento/Backend/Block/Dashboard/Bar.php @@ -47,7 +47,7 @@ class Bar extends \Magento\Backend\Block\Dashboard\AbstractDashboard /** * @return array */ - protected function getTotals() + public function getTotals() { return $this->_totals; } diff --git a/app/code/Magento/Backend/Block/Dashboard/Graph.php b/app/code/Magento/Backend/Block/Dashboard/Graph.php index 634a0671d0983..3f79191b59bd9 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Graph.php +++ b/app/code/Magento/Backend/Block/Dashboard/Graph.php @@ -86,14 +86,14 @@ class Graph extends \Magento\Backend\Block\Dashboard\AbstractDashboard * * @var string */ - protected $_width = '587'; + protected $_width = '780'; /** * Chart height * * @var string */ - protected $_height = '300'; + protected $_height = '384'; /** * Google chart api data encoding @@ -213,9 +213,11 @@ public function getChartUrl($directUrl = true) { $params = array( 'cht' => 'lc', - 'chf' => 'bg,s,f4f4f4|c,lg,90,ffffff,0.1,ededed,0', - 'chm' => 'B,f4d4b2,0,0,0', - 'chco' => 'db4814' + 'chf' => 'bg,s,ffffff', + 'chco' => 'ef672f', + 'chls' => '7', + 'chxs' => '0,676056,15,0,l,676056|1,676056,15,0,l,676056', + 'chm' => 'h,f2ebde,0,0:1:.1,1,-1' ); $this->_allSeries = $this->getRowsData($this->_dataRows); @@ -224,7 +226,10 @@ public function getChartUrl($directUrl = true) $this->setAxisLabels($axis, $this->getRowsData($attr, true)); } - $timezoneLocal = $this->_storeConfig->getConfig($this->_localeDate->getDefaultTimezonePath()); + $timezoneLocal = $this->_scopeConfig->getValue( + $this->_localeDate->getDefaultTimezonePath(), + \Magento\Store\Model\ScopeInterface::SCOPE_STORE + ); list($dateStart, $dateEnd) = $this->_collectionFactory->create()->getDateRange( $this->getDataHelper()->getParam('period'), @@ -270,10 +275,12 @@ public function getChartUrl($directUrl = true) */ if (count($dates) > 8 && count($dates) < 15) { $c = 1; - } else if (count($dates) >= 15) { - $c = 2; } else { - $c = 0; + if (count($dates) >= 15) { + $c = 2; + } else { + $c = 0; + } } /** * skipping some x labels for good reading @@ -355,7 +362,6 @@ public function getChartUrl($directUrl = true) $chartdata[] = $dataMissing . $dataDelimiter; } } - // END SIMPLE ENCODING } else { // EXTENDED ENCODING for ($j = 0; $j < sizeof($thisdataarray); $j++) { @@ -382,7 +388,6 @@ public function getChartUrl($directUrl = true) $chartdata[] = $dataMissing . $dataDelimiter; } } - // ============= END EXTENDED ENCODING ============= } $chartdata[] = $dataSetdelimiter; } @@ -436,18 +441,6 @@ public function getChartUrl($directUrl = true) $tmpstring = implode('|', $this->_axisLabels[$idx]); $valueBuffer[] = $indexid . ":|" . $tmpstring; - if (sizeof($this->_axisLabels[$idx]) > 1) { - $deltaX = 100 / (sizeof($this->_axisLabels[$idx]) - 1); - } else { - $deltaX = 100; - } - } else if ($idx == 'y') { - $valueBuffer[] = $indexid . ":|" . implode('|', $yLabels); - if (sizeof($yLabels) - 1) { - $deltaY = 100 / (sizeof($yLabels) - 1); - } else { - $deltaY = 100; - } } $indexid++; } @@ -457,10 +450,6 @@ public function getChartUrl($directUrl = true) // chart size $params['chs'] = $this->getWidth() . 'x' . $this->getHeight(); - if (isset($deltaX) && isset($deltaY)) { - $params['chg'] = $deltaX . ',' . $deltaY . ',1,0'; - } - // return the encoded data if ($directUrl) { $p = array(); diff --git a/app/code/Magento/Backend/Block/Dashboard/Totals.php b/app/code/Magento/Backend/Block/Dashboard/Totals.php index ada8974753116..ade17ef66738d 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Totals.php +++ b/app/code/Magento/Backend/Block/Dashboard/Totals.php @@ -90,17 +90,21 @@ protected function _prepareLayout() if ($this->getRequest()->getParam('store')) { $collection->addFieldToFilter('store_id', $this->getRequest()->getParam('store')); - } else if ($this->getRequest()->getParam('website')) { - $storeIds = $this->_storeManager->getWebsite($this->getRequest()->getParam('website'))->getStoreIds(); - $collection->addFieldToFilter('store_id', array('in' => $storeIds)); - } else if ($this->getRequest()->getParam('group')) { - $storeIds = $this->_storeManager->getGroup($this->getRequest()->getParam('group'))->getStoreIds(); - $collection->addFieldToFilter('store_id', array('in' => $storeIds)); - } elseif (!$collection->isLive()) { - $collection->addFieldToFilter( - 'store_id', - array('eq' => $this->_storeManager->getStore(\Magento\Core\Model\Store::ADMIN_CODE)->getId()) - ); + } else { + if ($this->getRequest()->getParam('website')) { + $storeIds = $this->_storeManager->getWebsite($this->getRequest()->getParam('website'))->getStoreIds(); + $collection->addFieldToFilter('store_id', array('in' => $storeIds)); + } else { + if ($this->getRequest()->getParam('group')) { + $storeIds = $this->_storeManager->getGroup($this->getRequest()->getParam('group'))->getStoreIds(); + $collection->addFieldToFilter('store_id', array('in' => $storeIds)); + } elseif (!$collection->isLive()) { + $collection->addFieldToFilter( + 'store_id', + array('eq' => $this->_storeManager->getStore(\Magento\Store\Model\Store::ADMIN_CODE)->getId()) + ); + } + } } $collection->load(); diff --git a/app/code/Magento/Backend/Block/Page/Header.php b/app/code/Magento/Backend/Block/Page/Header.php index e5ecdc3ea589c..76a00fb64c600 100644 --- a/app/code/Magento/Backend/Block/Page/Header.php +++ b/app/code/Magento/Backend/Block/Page/Header.php @@ -99,6 +99,6 @@ public function getLogoutLink() */ public function displayNoscriptNotice() { - return $this->_storeConfig->getConfig('web/browser_capabilities/javascript'); + return $this->_scopeConfig->getValue('web/browser_capabilities/javascript', \Magento\Store\Model\ScopeInterface::SCOPE_STORE); } } diff --git a/app/code/Magento/Backend/Block/Page/Locale.php b/app/code/Magento/Backend/Block/Page/Locale.php new file mode 100644 index 0000000000000..41d5165c51b11 --- /dev/null +++ b/app/code/Magento/Backend/Block/Page/Locale.php @@ -0,0 +1,110 @@ +_localeLists = $localeLists; + $this->_localeResolver = $localeResolver; + $this->_urlHelper = $urlHelper; + parent::__construct($context, $data); + } + + /** + * Prepare URL for change locale + * + * @return string + */ + public function getChangeLocaleUrl() + { + return $this->getUrl('adminhtml/index/changeLocale'); + } + + /** + * Prepare current URL for referer + * + * @return string + */ + public function getUrlForReferer() + { + return \Magento\App\Action\Action::PARAM_NAME_URL_ENCODED . '/' . $this->_urlHelper->getEncodedUrl(); + } + + /** + * Retrieve locale select element + * + * @return string + */ + public function getLocaleSelect() + { + $html = $this->getLayout()->createBlock('Magento\View\Element\Html\Select') + ->setName('locale') + ->setId('interface_locale') + ->setTitle(__('Interface Language')) + ->setClass('select locale-switcher-select') + ->setValue($this->_localeResolver->getLocale()->__toString()) + ->setOptions($this->_localeLists->getTranslatedOptionLocales()) + ->getHtml(); + + return $html; + } +} diff --git a/app/code/Magento/Backend/Block/Page/Notices.php b/app/code/Magento/Backend/Block/Page/Notices.php index b67fade25eab4..9837ec92d33cd 100644 --- a/app/code/Magento/Backend/Block/Page/Notices.php +++ b/app/code/Magento/Backend/Block/Page/Notices.php @@ -42,7 +42,7 @@ class Notices extends \Magento\Backend\Block\Template */ public function displayNoscriptNotice() { - return $this->_storeConfig->getConfig('web/browser_capabilities/javascript'); + return $this->_scopeConfig->getValue('web/browser_capabilities/javascript', \Magento\Store\Model\ScopeInterface::SCOPE_STORE); } /** @@ -52,6 +52,6 @@ public function displayNoscriptNotice() */ public function displayDemoNotice() { - return $this->_storeConfig->getConfig('design/head/demonotice'); + return $this->_scopeConfig->getValue('design/head/demonotice', \Magento\Store\Model\ScopeInterface::SCOPE_STORE); } } diff --git a/app/code/Magento/Backend/Block/Page/System/Config/Robots/Reset.php b/app/code/Magento/Backend/Block/Page/System/Config/Robots/Reset.php index 046da13141199..3445493185517 100644 --- a/app/code/Magento/Backend/Block/Page/System/Config/Robots/Reset.php +++ b/app/code/Magento/Backend/Block/Page/System/Config/Robots/Reset.php @@ -39,24 +39,14 @@ class Reset extends \Magento\Backend\Block\System\Config\Form\Field */ const XML_PATH_ROBOTS_DEFAULT_CUSTOM_INSTRUCTIONS = 'design/search_engine_robots/default_custom_instructions'; - /** - * Page robots - * - * @var \Magento\Theme\Helper\Robots - */ - protected $coreConfig; - /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\App\ConfigInterface $coreConfig * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\App\ConfigInterface $coreConfig, array $data = array() ) { - $this->coreConfig = $coreConfig; parent::__construct($context, $data); } @@ -78,7 +68,9 @@ protected function _construct() */ public function getRobotsDefaultCustomInstructions() { - return trim((string)$this->coreConfig->getValue(self::XML_PATH_ROBOTS_DEFAULT_CUSTOM_INSTRUCTIONS, 'default')); + return trim((string)$this->_scopeConfig->getValue( + self::XML_PATH_ROBOTS_DEFAULT_CUSTOM_INSTRUCTIONS, \Magento\App\ScopeInterface::SCOPE_DEFAULT + )); } /** diff --git a/app/code/Magento/Backend/Block/Store/Switcher.php b/app/code/Magento/Backend/Block/Store/Switcher.php index 0b2a173451026..a79710eeaaccf 100644 --- a/app/code/Magento/Backend/Block/Store/Switcher.php +++ b/app/code/Magento/Backend/Block/Store/Switcher.php @@ -44,16 +44,30 @@ class Switcher extends \Magento\Backend\Block\Template const HINT_URL = 'http://www.magentocommerce.com/knowledge-base/entry/understanding-store-scopes'; /** - * @var array + * Name of website variable + * + * @var string */ - protected $_storeIds; + protected $_defaultWebsiteVarName = 'website'; + + /** + * Name of store group variable + * + * @var string + */ + protected $_defaultStoreGroupVarName = 'group'; /** * Name of store variable * * @var string */ - protected $_storeVarName = 'store'; + protected $_defaultStoreVarName = 'store'; + + /** + * @var array + */ + protected $_storeIds; /** * Url for store switcher hint @@ -77,36 +91,36 @@ class Switcher extends \Magento\Backend\Block\Template /** * Website factory * - * @var \Magento\Core\Model\Website\Factory + * @var \Magento\Store\Model\Website\Factory */ protected $_websiteFactory; /** * Store Group Factory * - * @var \Magento\Core\Model\Store\Group\Factory + * @var \Magento\Store\Model\Group\Factory */ protected $_storeGroupFactory; /** * Store Factory * - * @var \Magento\Core\Model\StoreFactory + * @var \Magento\Store\Model\StoreFactory */ protected $_storeFactory; /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\Website\Factory $websiteFactory - * @param \Magento\Core\Model\Store\Group\Factory $storeGroupFactory - * @param \Magento\Core\Model\StoreFactory $storeFactory + * @param \Magento\Store\Model\Website\Factory $websiteFactory + * @param \Magento\Store\Model\Group\Factory $storeGroupFactory + * @param \Magento\Store\Model\StoreFactory $storeFactory * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\Website\Factory $websiteFactory, - \Magento\Core\Model\Store\Group\Factory $storeGroupFactory, - \Magento\Core\Model\StoreFactory $storeFactory, + \Magento\Store\Model\Website\Factory $websiteFactory, + \Magento\Store\Model\Group\Factory $storeGroupFactory, + \Magento\Store\Model\StoreFactory $storeFactory, array $data = array() ) { parent::__construct($context, $data); @@ -124,11 +138,23 @@ protected function _construct() $this->setUseConfirm(true); $this->setUseAjax(true); - $this->setDefaultStoreName(__('All Store Views')); + + $this->setShowManageStoresLink(0); + + if (!$this->hasData('switch_websites')) { + $this->setSwitchWebsites(false); + } + if (!$this->hasData('switch_store_groups')) { + $this->setSwitchStoreGroups(false); + } + if (!$this->hasData('switch_store_views')) { + $this->setSwitchStoreViews(true); + } + $this->setDefaultSelectionName(__('All Store Views')); } /** - * @return \Magento\Core\Model\Resource\Website\Collection + * @return \Magento\Store\Model\Resource\Website\Collection */ public function getWebsiteCollection() { @@ -145,7 +171,7 @@ public function getWebsiteCollection() /** * Get websites * - * @return \Magento\Core\Model\Website[] + * @return \Magento\Store\Model\Website[] */ public function getWebsites() { @@ -161,12 +187,64 @@ public function getWebsites() } /** - * @param int|\Magento\Core\Model\Website $website - * @return \Magento\Core\Model\Resource\Store\Group\Collection + * Check if can switch to websites + * + * @return bool + */ + public function isWebsiteSwitchEnabled() + { + return (bool)$this->getData('switch_websites'); + } + + /** + * @param string $varName + * @return $this + */ + public function setWebsiteVarName($varName) + { + $this->setData('website_var_name', $varName); + return $this; + } + + /** + * @return string + */ + public function getWebsiteVarName() + { + if ($this->hasData('website_var_name')) { + return (string)$this->getData('website_var_name'); + } else { + return (string)$this->_defaultWebsiteVarName; + } + } + + /** + * @param \Magento\Store\Model\Website $website + * @return bool + */ + public function isWebsiteSelected(\Magento\Store\Model\Website $website) + { + return $this->getWebsiteId() === $website->getId() && $this->getStoreId() === null; + } + + /** + * @return int|null + */ + public function getWebsiteId() + { + if (!$this->hasData('website_id')) { + $this->setData('website_id', $this->getRequest()->getParam($this->getWebsiteVarName())); + } + return $this->getData('website_id'); + } + + /** + * @param int|\Magento\Store\Model\Website $website + * @return \Magento\Store\Model\Resource\Group\Collection */ public function getGroupCollection($website) { - if (!$website instanceof \Magento\Core\Model\Website) { + if (!$website instanceof \Magento\Store\Model\Website) { $website = $this->_websiteFactory->create()->load($website); } return $website->getGroupCollection(); @@ -175,24 +253,76 @@ public function getGroupCollection($website) /** * Get store groups for specified website * - * @param \Magento\Core\Model\Website|int $website + * @param \Magento\Store\Model\Website|int $website * @return array */ public function getStoreGroups($website) { - if (!$website instanceof \Magento\Core\Model\Website) { + if (!$website instanceof \Magento\Store\Model\Website) { $website = $this->_storeManager->getWebsite($website); } return $website->getGroups(); } /** - * @param \Magento\Core\Model\Store\Group|int $group - * @return \Magento\Core\Model\Resource\Store\Collection + * Check if can switch to store group + * + * @return bool + */ + public function isStoreGroupSwitchEnabled() + { + return (bool)$this->getData('switch_store_groups'); + } + + /** + * @param string $varName + * @return $this + */ + public function setStoreGroupVarName($varName) + { + $this->setData('store_group_var_name', $varName); + return $this; + } + + /** + * @return string + */ + public function getStoreGroupVarName() + { + if ($this->hasData('store_group_var_name')) { + return (string)$this->getData('store_group_var_name'); + } else { + return (string)$this->_defaultStoreGroupVarName; + } + } + + /** + * @param \Magento\Store\Model\Group $group + * @return bool + */ + public function isStoreGroupSelected(\Magento\Store\Model\Group $group) + { + return $this->getStoreGroupId() === $group->getId() && $this->getStoreGroupId() === null; + } + + /** + * @return int|null + */ + public function getStoreGroupId() + { + if (!$this->hasData('store_group_id')) { + $this->setData('store_group_id', $this->getRequest()->getParam($this->getStoreGroupVarName())); + } + return $this->getData('store_group_id'); + } + + /** + * @param \Magento\Store\Model\Group|int $group + * @return \Magento\Store\Model\Resource\Store\Collection */ public function getStoreCollection($group) { - if (!$group instanceof \Magento\Core\Model\Store\Group) { + if (!$group instanceof \Magento\Store\Model\Group) { $group = $this->_storeGroupFactory->create()->load($group); } $stores = $group->getStoreCollection(); @@ -206,12 +336,12 @@ public function getStoreCollection($group) /** * Get store views for specified store group * - * @param \Magento\Core\Model\Store\Group|int $group - * @return \Magento\Core\Model\Store[] + * @param \Magento\Store\Model\Group|int $group + * @return \Magento\Store\Model\Store[] */ public function getStores($group) { - if (!$group instanceof \Magento\Core\Model\Store\Group) { + if (!$group instanceof \Magento\Store\Model\Group) { $group = $this->_storeManager->getGroup($group); } $stores = $group->getStores(); @@ -226,14 +356,33 @@ public function getStores($group) } /** - * @return string + * @return int|null */ - public function getSwitchUrl() + public function getStoreId() { - if ($url = $this->getData('switch_url')) { - return $url; + if (!$this->hasData('store_id')) { + $this->setData('store_id', $this->getRequest()->getParam($this->getStoreVarName())); } - return $this->getUrl('*/*/*', array('_current' => true, $this->_storeVarName => null)); + return $this->getData('store_id'); + } + + /** + * @param \Magento\Store\Model\Store $store + * @return bool + */ + public function isStoreSelected(\Magento\Store\Model\Store $store) + { + return $this->getStoreId() !== null && (int)$this->getStoreId() === (int)$store->getId(); + } + + /** + * Check if can switch to store views + * + * @return bool + */ + public function isStoreSwitchEnabled() + { + return (bool)$this->getData('switch_store_views'); } /** @@ -242,32 +391,112 @@ public function getSwitchUrl() */ public function setStoreVarName($varName) { - $this->_storeVarName = $varName; + $this->setData('store_var_name', $varName); return $this; } /** - * Get current store + * @return mixed|string + */ + public function getStoreVarName() + { + if ($this->hasData('store_var_name')) { + return (string)$this->getData('store_var_name'); + } else { + return (string)$this->_defaultStoreVarName; + } + } + + /** + * @return string + */ + public function getSwitchUrl() + { + if ($url = $this->getData('switch_url')) { + return $url; + } + return $this->getUrl( + '*/*/*', + [ + '_current' => true, + $this->getStoreVarName() => null, + $this->getStoreGroupVarName() => null, + $this->getWebsiteVarName() => null, + ] + ); + } + + /** + * @return bool + */ + public function hasScopeSelected() + { + return $this->getStoreId() !== null || $this->getStoreGroupId() !== null || $this->getWebsiteId() !== null; + } + + /** + * Get current selection name * * @return string */ - public function getCurrentStoreName() + public function getCurrentSelectionName() { - $store = $this->_storeFactory->create(); - $store->load($this->getStoreId()); - if ($store->getId()) { - return $store->getName(); - } else { - return $this->getDefaultStoreName(); + if (!($name = $this->getCurrentStoreName())) { + if (!($name = $this->getCurrentStoreGroupName())) { + if (!($name = $this->getCurrentWebsiteName())) { + $name = $this->getDefaultSelectionName(); + } + } } + return $name; } /** - * @return int + * Get current website name + * + * @return string */ - public function getStoreId() + public function getCurrentWebsiteName() { - return $this->getRequest()->getParam($this->_storeVarName); + if ($this->getWebsiteId() !== null) { + $website = $this->_websiteFactory->create(); + $website->load($this->getWebsiteId()); + if ($website->getId()) { + return $website->getName(); + } + } + } + + /** + * Get current store group name + * + * @return string + */ + public function getCurrentStoreGroupName() + { + if ($this->getStoreGroupId() !== null) { + $group = $this->_storeGroupFactory->create(); + $group->load($this->getStoreGroupId()); + if ($group->getId()) { + return $group->getName(); + } + } + } + + /** + * Get current store view name + * + * @return string + */ + public function getCurrentStoreName() + { + if ($this->getStoreId() !== null) { + $store = $this->_storeFactory->create(); + $store->load($this->getStoreId()); + if ($store->getId()) { + return $store->getName(); + } + } } /** @@ -345,9 +574,9 @@ public function getHintHtml() $url ) . '"' . ' onclick="this.target=\'_blank\'"' . ' title="' . __( 'What is this?' - ) . '"' . ' class="link-store-scope">' . __( + ) . '"' . ' class="link-store-scope">' . __( 'What is this?' - ) . '' . '
'; + ) . '' . ' '; } return $html; } diff --git a/app/code/Magento/Backend/Block/System/Config/Dwstree.php b/app/code/Magento/Backend/Block/System/Config/Dwstree.php index 54791aa7ea1a5..ab13c3e2ecb40 100644 --- a/app/code/Magento/Backend/Block/System/Config/Dwstree.php +++ b/app/code/Magento/Backend/Block/System/Config/Dwstree.php @@ -60,7 +60,7 @@ public function initTabs() ) ); - /** @var $website \Magento\Core\Model\Website */ + /** @var $website \Magento\Store\Model\Website */ foreach ($this->_storeManager->getWebsites(true) as $website) { $wCode = $website->getCode(); $wName = $website->getName(); @@ -73,7 +73,7 @@ public function initTabs() $this->_addBreadcrumb($wName); } } - /** @var $store \Magento\Core\Model\Store */ + /** @var $store \Magento\Store\Model\Store */ foreach ($website->getStores() as $store) { $sCode = $store->getCode(); $sName = $store->getName(); diff --git a/app/code/Magento/Backend/Block/System/Config/Edit.php b/app/code/Magento/Backend/Block/System/Config/Edit.php index 5be60469ddf03..27023a62af53b 100644 --- a/app/code/Magento/Backend/Block/System/Config/Edit.php +++ b/app/code/Magento/Backend/Block/System/Config/Edit.php @@ -91,7 +91,7 @@ protected function _prepareLayout() $this->setTitle($section->getLabel()); $this->setHeaderCss($section->getHeaderCss()); - $this->addChild( + $this->getToolbar()->addChild( 'save_button', 'Magento\Backend\Block\Widget\Button', array( diff --git a/app/code/Magento/Backend/Block/System/Config/Form.php b/app/code/Magento/Backend/Block/System/Config/Form.php index 8f7fe731554cb..4635bc1f0e97b 100644 --- a/app/code/Magento/Backend/Block/System/Config/Form.php +++ b/app/code/Magento/Backend/Block/System/Config/Form.php @@ -116,13 +116,6 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic */ protected $_fieldFactory; - /** - * Form field factory - * - * @var \Magento\App\ConfigInterface - */ - protected $_config; - /** * @param \Magento\Backend\Block\Template\Context $context * @param \Magento\Registry $registry @@ -131,7 +124,6 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic * @param \Magento\Backend\Model\Config\Structure $configStructure * @param \Magento\Backend\Block\System\Config\Form\Fieldset\Factory $fieldsetFactory * @param \Magento\Backend\Block\System\Config\Form\Field\Factory $fieldFactory - * @param \Magento\App\ConfigInterface $coreConfig * @param array $data */ public function __construct( @@ -142,7 +134,6 @@ public function __construct( \Magento\Backend\Model\Config\Structure $configStructure, \Magento\Backend\Block\System\Config\Form\Fieldset\Factory $fieldsetFactory, \Magento\Backend\Block\System\Config\Form\Field\Factory $fieldFactory, - \Magento\App\ConfigInterface $coreConfig, array $data = array() ) { parent::__construct($context, $registry, $formFactory, $data); @@ -150,7 +141,6 @@ public function __construct( $this->_configStructure = $configStructure; $this->_fieldsetFactory = $fieldsetFactory; $this->_fieldFactory = $fieldFactory; - $this->_config = $coreConfig; $this->_scopeLabels = array( self::SCOPE_DEFAULT => __('[GLOBAL]'), @@ -477,7 +467,7 @@ protected function _generateElementId($path) */ public function getConfigValue($path) { - return $this->_config->getValue($path, $this->getScope(), $this->getScopeCode()); + return $this->_scopeConfig->getValue($path, $this->getScope(), $this->getScopeCode()); } /** diff --git a/app/code/Magento/Backend/Block/System/Config/Switcher.php b/app/code/Magento/Backend/Block/System/Config/Switcher.php index bafcd9194620c..274d0e885ab58 100644 --- a/app/code/Magento/Backend/Block/System/Config/Switcher.php +++ b/app/code/Magento/Backend/Block/System/Config/Switcher.php @@ -25,21 +25,26 @@ */ namespace Magento\Backend\Block\System\Config; +/** + * Class Switcher + * @package Magento\Backend\Block\System\Config + * @deprecated + */ class Switcher extends \Magento\Backend\Block\Template { /** - * @var \Magento\Core\Model\System\Store + * @var \Magento\Store\Model\System\Store */ protected $_systemStore; /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Model\System\Store $systemStore + * @param \Magento\Store\Model\System\Store $systemStore * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Model\System\Store $systemStore, + \Magento\Store\Model\System\Store $systemStore, array $data = array() ) { $this->_systemStore = $systemStore; @@ -91,8 +96,8 @@ public function getStoreSelectOptions() /** * Process website info * - * @param \Magento\Core\Model\System\Store $storeModel - * @param \Magento\Core\Model\Website $website + * @param \Magento\Store\Model\System\Store $storeModel + * @param \Magento\Store\Model\Website $website * @param string $section * @param string $curStore * @param string $curWebsite @@ -100,8 +105,8 @@ public function getStoreSelectOptions() * @return array */ protected function _processWebsite( - \Magento\Core\Model\System\Store $storeModel, - \Magento\Core\Model\Website $website, + \Magento\Store\Model\System\Store $storeModel, + \Magento\Store\Model\Website $website, $section, $curStore, $curWebsite, diff --git a/app/code/Magento/Backend/Block/System/Design.php b/app/code/Magento/Backend/Block/System/Design.php index dc3bbe0f1a6e5..00348970b4cac 100644 --- a/app/code/Magento/Backend/Block/System/Design.php +++ b/app/code/Magento/Backend/Block/System/Design.php @@ -34,13 +34,13 @@ protected function _prepareLayout() { $this->setTemplate('Magento_Backend::system/design/index.phtml'); - $this->addChild( + $this->getToolbar()->addChild( 'add_new_button', 'Magento\Backend\Block\Widget\Button', array( 'label' => __('Add Design Change'), 'onclick' => "setLocation('" . $this->getUrl('adminhtml/*/new') . "')", - 'class' => 'add' + 'class' => 'add primary add-design-change' ) ); diff --git a/app/code/Magento/Backend/Block/System/Design/Edit.php b/app/code/Magento/Backend/Block/System/Design/Edit.php index 8727b5dadf741..c5a476d5f3ccf 100644 --- a/app/code/Magento/Backend/Block/System/Design/Edit.php +++ b/app/code/Magento/Backend/Block/System/Design/Edit.php @@ -68,7 +68,7 @@ protected function _construct() */ protected function _prepareLayout() { - $this->addChild( + $this->getToolbar()->addChild( 'back_button', 'Magento\Backend\Block\Widget\Button', array( @@ -78,27 +78,32 @@ protected function _prepareLayout() ) ); - $this->addChild( + if ($this->getDesignChangeId()) { + $this->getToolbar()->addChild( + 'delete_button', + 'Magento\Backend\Block\Widget\Button', + array( + 'label' => __('Delete'), + 'onclick' => 'confirmSetLocation(\'' . __( + 'Are you sure?' + ) . '\', \'' . $this->getDeleteUrl() . '\')', + 'class' => 'delete' + ) + ); + } + + $this->getToolbar()->addChild( 'save_button', 'Magento\Backend\Block\Widget\Button', array( 'label' => __('Save'), - 'class' => 'save', + 'class' => 'save primary', 'data_attribute' => array( 'mage-init' => array('button' => array('event' => 'save', 'target' => '#design-edit-form')) ) ) ); - $this->addChild( - 'delete_button', - 'Magento\Backend\Block\Widget\Button', - array( - 'label' => __('Delete'), - 'onclick' => 'confirmSetLocation(\'' . __('Are you sure?') . '\', \'' . $this->getDeleteUrl() . '\')', - 'class' => 'delete' - ) - ); return parent::_prepareLayout(); } 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 5cbbdee0559ac..2582798da8f09 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 @@ -33,7 +33,7 @@ class General extends \Magento\Backend\Block\Widget\Form\Generic protected $_labelFactory; /** - * @var \Magento\Core\Model\System\Store + * @var \Magento\Store\Model\System\Store */ protected $_systemStore; @@ -42,7 +42,7 @@ class General extends \Magento\Backend\Block\Widget\Form\Generic * @param \Magento\Registry $registry * @param \Magento\Data\FormFactory $formFactory * @param \Magento\View\Design\Theme\LabelFactory $labelFactory - * @param \Magento\Core\Model\System\Store $systemStore + * @param \Magento\Store\Model\System\Store $systemStore * @param array $data */ public function __construct( @@ -50,7 +50,7 @@ public function __construct( \Magento\Registry $registry, \Magento\Data\FormFactory $formFactory, \Magento\View\Design\Theme\LabelFactory $labelFactory, - \Magento\Core\Model\System\Store $systemStore, + \Magento\Store\Model\System\Store $systemStore, array $data = array() ) { $this->_labelFactory = $labelFactory; 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 eb33604f39ef6..2573b7ee6c273 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 @@ -42,12 +42,12 @@ class Group extends \Magento\Backend\Block\System\Store\Edit\AbstractForm protected $_category; /** - * @var \Magento\Core\Model\StoreFactory + * @var \Magento\Store\Model\StoreFactory */ protected $_storeFactory; /** - * @var \Magento\Core\Model\Website\Factory + * @var \Magento\Store\Model\Website\Factory */ protected $_websiteFactory; @@ -56,8 +56,8 @@ class Group extends \Magento\Backend\Block\System\Store\Edit\AbstractForm * @param \Magento\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 \Magento\Store\Model\StoreFactory $storeFactory + * @param \Magento\Store\Model\Website\Factory $websiteFactory * @param array $data */ public function __construct( @@ -65,8 +65,8 @@ public function __construct( \Magento\Registry $registry, \Magento\Data\FormFactory $formFactory, \Magento\Catalog\Model\Config\Source\Category $category, - \Magento\Core\Model\StoreFactory $storeFactory, - \Magento\Core\Model\Website\Factory $websiteFactory, + \Magento\Store\Model\StoreFactory $storeFactory, + \Magento\Store\Model\Website\Factory $websiteFactory, array $data = array() ) { $this->_category = $category; 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 45a3e75b38c9d..cadd37eee18db 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 @@ -37,12 +37,12 @@ class Store extends \Magento\Backend\Block\System\Store\Edit\AbstractForm { /** - * @var \Magento\Core\Model\Website\Factory + * @var \Magento\Store\Model\Website\Factory */ protected $_websiteFactory; /** - * @var \Magento\Core\Model\Store\Group\Factory + * @var \Magento\Store\Model\Group\Factory */ protected $_groupFactory; @@ -50,16 +50,16 @@ class Store extends \Magento\Backend\Block\System\Store\Edit\AbstractForm * @param \Magento\Backend\Block\Template\Context $context * @param \Magento\Registry $registry * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Model\Store\Group\Factory $groupFactory - * @param \Magento\Core\Model\Website\Factory $websiteFactory + * @param \Magento\Store\Model\Group\Factory $groupFactory + * @param \Magento\Store\Model\Website\Factory $websiteFactory * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, \Magento\Registry $registry, \Magento\Data\FormFactory $formFactory, - \Magento\Core\Model\Store\Group\Factory $groupFactory, - \Magento\Core\Model\Website\Factory $websiteFactory, + \Magento\Store\Model\Group\Factory $groupFactory, + \Magento\Store\Model\Website\Factory $websiteFactory, array $data = array() ) { $this->_groupFactory = $groupFactory; 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 0f7bbd97ac738..dfe0e4f01d73c 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 @@ -37,7 +37,7 @@ class Website extends \Magento\Backend\Block\System\Store\Edit\AbstractForm { /** - * @var \Magento\Core\Model\Store\GroupFactory + * @var \Magento\Store\Model\GroupFactory */ protected $_groupFactory; @@ -45,14 +45,14 @@ class Website extends \Magento\Backend\Block\System\Store\Edit\AbstractForm * @param \Magento\Backend\Block\Template\Context $context * @param \Magento\Registry $registry * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Model\Store\GroupFactory $groupFactory + * @param \Magento\Store\Model\GroupFactory $groupFactory * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, \Magento\Registry $registry, \Magento\Data\FormFactory $formFactory, - \Magento\Core\Model\Store\GroupFactory $groupFactory, + \Magento\Store\Model\GroupFactory $groupFactory, array $data = array() ) { $this->_groupFactory = $groupFactory; diff --git a/app/code/Magento/Backend/Block/System/Store/Store.php b/app/code/Magento/Backend/Block/System/Store/Store.php index 4e5cae867ce9d..72d38eb32d8b9 100644 --- a/app/code/Magento/Backend/Block/System/Store/Store.php +++ b/app/code/Magento/Backend/Block/System/Store/Store.php @@ -65,8 +65,9 @@ protected function _prepareLayout() array( 'label' => __('Create Store'), 'onclick' => 'setLocation(\'' . $this->getUrl('adminhtml/*/newGroup') . '\')', - 'class' => 'add' - ) + 'class' => 'add add-store' + ), + 1 ); /* Add Store button */ @@ -75,7 +76,7 @@ protected function _prepareLayout() array( 'label' => __('Create Store View'), 'onclick' => 'setLocation(\'' . $this->getUrl('adminhtml/*/newStore') . '\')', - 'class' => 'add' + 'class' => 'add add-store-view' ) ); diff --git a/app/code/Magento/Backend/Block/System/Variable/Edit.php b/app/code/Magento/Backend/Block/System/Variable/Edit.php index ba222ed1ead9a..dfc9a310bd3b8 100644 --- a/app/code/Magento/Backend/Block/System/Variable/Edit.php +++ b/app/code/Magento/Backend/Block/System/Variable/Edit.php @@ -109,8 +109,7 @@ public function getFormHtml() { $formHtml = parent::getFormHtml(); if (!$this->_storeManager->isSingleStoreMode() && $this->getVariable()->getId()) { - $storeSwitcher = $this->getLayout()->createBlock('Magento\Backend\Block\Store\Switcher')->toHtml(); - $formHtml = $storeSwitcher . $formHtml; + $formHtml = $formHtml; } return $formHtml; } diff --git a/app/code/Magento/Backend/Block/Template.php b/app/code/Magento/Backend/Block/Template.php index 6e72d65ec20ee..879f149a19c02 100644 --- a/app/code/Magento/Backend/Block/Template.php +++ b/app/code/Magento/Backend/Block/Template.php @@ -96,7 +96,11 @@ public function isOutputEnabled($moduleName = null) if ($moduleName === null) { $moduleName = $this->getModuleName(); } - return !$this->_storeConfig->getConfigFlag('advanced/modules_disable_output/' . $moduleName); + + return !$this->_scopeConfig->isSetFlag( + 'advanced/modules_disable_output/' . $moduleName, + \Magento\Store\Model\ScopeInterface::SCOPE_STORE + ); } /** @@ -119,4 +123,14 @@ protected function _toHtml() $this->_eventManager->dispatch('adminhtml_block_html_before', array('block' => $this)); return parent::_toHtml(); } + + /** + * Return toolbar block instance + * + * @return bool|\Magento\View\Element\BlockInterface + */ + public function getToolbar() + { + return $this->getLayout()->getBlock('page.actions.toolbar'); + } } diff --git a/app/code/Magento/Backend/Block/Template/Context.php b/app/code/Magento/Backend/Block/Template/Context.php index 7939d9d275b3e..6d979e3b9cc7d 100644 --- a/app/code/Magento/Backend/Block/Template/Context.php +++ b/app/code/Magento/Backend/Block/Template/Context.php @@ -62,9 +62,9 @@ class Context extends \Magento\View\Element\Template\Context * @param \Magento\TranslateInterface $translator * @param \Magento\App\CacheInterface $cache * @param \Magento\View\DesignInterface $design - * @param \Magento\Core\Model\Session $session + * @param \Magento\Session\Generic $session * @param \Magento\Session\SidResolverInterface $sidResolver - * @param \Magento\Core\Model\Store\Config $storeConfig + * @param \Magento\App\Config\ScopeConfigInterface $scopeConfig * @param \Magento\View\Url $viewUrl * @param \Magento\View\ConfigInterface $viewConfig * @param \Magento\App\Cache\StateInterface $cacheState @@ -77,7 +77,7 @@ class Context extends \Magento\View\Element\Template\Context * @param \Magento\View\FileSystem $viewFileSystem * @param \Magento\View\TemplateEnginePool $enginePool * @param \Magento\App\State $appState - * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param \Magento\AuthorizationInterface $authorization * @param \Magento\Backend\Model\Session $backendSession * @param \Magento\Math\Random $mathRandom @@ -94,9 +94,9 @@ public function __construct( \Magento\TranslateInterface $translator, \Magento\App\CacheInterface $cache, \Magento\View\DesignInterface $design, - \Magento\Core\Model\Session $session, + \Magento\Session\Generic $session, \Magento\Session\SidResolverInterface $sidResolver, - \Magento\Core\Model\Store\Config $storeConfig, + \Magento\App\Config\ScopeConfigInterface $scopeConfig, \Magento\View\Url $viewUrl, \Magento\View\ConfigInterface $viewConfig, \Magento\App\Cache\StateInterface $cacheState, @@ -109,7 +109,7 @@ public function __construct( \Magento\View\FileSystem $viewFileSystem, \Magento\View\TemplateEnginePool $enginePool, \Magento\App\State $appState, - \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\AuthorizationInterface $authorization, \Magento\Backend\Model\Session $backendSession, \Magento\Math\Random $mathRandom, @@ -131,7 +131,7 @@ public function __construct( $design, $session, $sidResolver, - $storeConfig, + $scopeConfig, $viewUrl, $viewConfig, $cacheState, @@ -151,7 +151,7 @@ public function __construct( /** * Get store manager * - * @return \Magento\Core\Model\StoreManagerInterface + * @return \Magento\Store\Model\StoreManagerInterface */ public function getStoreManager() { diff --git a/app/code/Magento/Backend/Block/Urlrewrite/Catalog/Edit/Form.php b/app/code/Magento/Backend/Block/Urlrewrite/Catalog/Edit/Form.php index bad9decfd3949..3d62f8cf2896c 100644 --- a/app/code/Magento/Backend/Block/Urlrewrite/Catalog/Edit/Form.php +++ b/app/code/Magento/Backend/Block/Urlrewrite/Catalog/Edit/Form.php @@ -67,7 +67,7 @@ class Form extends \Magento\Backend\Block\Urlrewrite\Edit\Form * @param \Magento\UrlRewrite\Model\UrlRewrite\TypeProviderFactory $typesFactory * @param \Magento\UrlRewrite\Model\UrlRewrite\OptionProviderFactory $optionFactory * @param \Magento\UrlRewrite\Model\UrlRewriteFactory $rewriteFactory - * @param \Magento\Core\Model\System\Store $systemStore + * @param \Magento\Store\Model\System\Store $systemStore * @param \Magento\Backend\Helper\Data $adminhtmlData * @param \Magento\Catalog\Model\ProductFactory $productFactory * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory @@ -83,7 +83,7 @@ public function __construct( \Magento\UrlRewrite\Model\UrlRewrite\TypeProviderFactory $typesFactory, \Magento\UrlRewrite\Model\UrlRewrite\OptionProviderFactory $optionFactory, \Magento\UrlRewrite\Model\UrlRewriteFactory $rewriteFactory, - \Magento\Core\Model\System\Store $systemStore, + \Magento\Store\Model\System\Store $systemStore, \Magento\Backend\Helper\Data $adminhtmlData, \Magento\Catalog\Model\ProductFactory $productFactory, \Magento\Catalog\Model\CategoryFactory $categoryFactory, @@ -173,7 +173,7 @@ protected function _formPostInit($form) * Get catalog entity associated stores * * @return array - * @throws \Magento\Core\Model\Store\Exception + * @throws \Magento\Store\Model\Exception */ protected function _getEntityStores() { @@ -192,7 +192,7 @@ protected function _getEntityStores() } // @codingStandardsIgnoreStart if (!$entityStores) { - throw new \Magento\Core\Model\Store\Exception( + throw new \Magento\Store\Model\Exception( __( 'We can\'t set up a URL rewrite because the product you chose is not associated with a website.' ) @@ -202,7 +202,7 @@ protected function _getEntityStores() } elseif ($category->getId()) { $entityStores = (array)$category->getStoreIds(); if (!$entityStores) { - throw new \Magento\Core\Model\Store\Exception( + throw new \Magento\Store\Model\Exception( __( 'We can\'t set up a URL rewrite because the category your chose is not associated with a website.' ) diff --git a/app/code/Magento/Backend/Block/Urlrewrite/Cms/Page/Edit/Form.php b/app/code/Magento/Backend/Block/Urlrewrite/Cms/Page/Edit/Form.php index 657d747c53e81..f4ebd00ac8658 100644 --- a/app/code/Magento/Backend/Block/Urlrewrite/Cms/Page/Edit/Form.php +++ b/app/code/Magento/Backend/Block/Urlrewrite/Cms/Page/Edit/Form.php @@ -60,7 +60,7 @@ class Form extends \Magento\Backend\Block\Urlrewrite\Edit\Form * @param \Magento\UrlRewrite\Model\UrlRewrite\TypeProviderFactory $typesFactory * @param \Magento\UrlRewrite\Model\UrlRewrite\OptionProviderFactory $optionFactory * @param \Magento\UrlRewrite\Model\UrlRewriteFactory $rewriteFactory - * @param \Magento\Core\Model\System\Store $systemStore + * @param \Magento\Store\Model\System\Store $systemStore * @param \Magento\Backend\Helper\Data $adminhtmlData * @param \Magento\Cms\Model\Page\UrlrewriteFactory $urlRewriteFactory * @param \Magento\Cms\Model\PageFactory $pageFactory @@ -75,7 +75,7 @@ public function __construct( \Magento\UrlRewrite\Model\UrlRewrite\TypeProviderFactory $typesFactory, \Magento\UrlRewrite\Model\UrlRewrite\OptionProviderFactory $optionFactory, \Magento\UrlRewrite\Model\UrlRewriteFactory $rewriteFactory, - \Magento\Core\Model\System\Store $systemStore, + \Magento\Store\Model\System\Store $systemStore, \Magento\Backend\Helper\Data $adminhtmlData, \Magento\Cms\Model\Page\UrlrewriteFactory $urlRewriteFactory, \Magento\Cms\Model\PageFactory $pageFactory, @@ -148,7 +148,7 @@ protected function _formPostInit($form) * Get catalog entity associated stores * * @return array - * @throws \Magento\Core\Model\Store\Exception + * @throws \Magento\Store\Model\Exception */ protected function _getEntityStores() { @@ -161,7 +161,7 @@ protected function _getEntityStores() $this->_requireStoresFilter = !in_array(0, $entityStores); if (!$entityStores) { - throw new \Magento\Core\Model\Store\Exception( + throw new \Magento\Store\Model\Exception( __('Chosen cms page does not associated with any website.') ); } diff --git a/app/code/Magento/Backend/Block/Urlrewrite/Edit.php b/app/code/Magento/Backend/Block/Urlrewrite/Edit.php index dc397d549d860..b8b2474c26c67 100644 --- a/app/code/Magento/Backend/Block/Urlrewrite/Edit.php +++ b/app/code/Magento/Backend/Block/Urlrewrite/Edit.php @@ -218,7 +218,7 @@ protected function _addSaveButton() 'save', array( 'label' => __('Save'), - 'class' => 'save', + 'class' => 'save primary save-url-redirect', 'level' => -1, 'data_attribute' => array( 'mage-init' => array('button' => array('event' => 'save', 'target' => '#edit_form')) diff --git a/app/code/Magento/Backend/Block/Urlrewrite/Edit/Form.php b/app/code/Magento/Backend/Block/Urlrewrite/Edit/Form.php index 5c00e1e87b489..4c5887dd15a3b 100644 --- a/app/code/Magento/Backend/Block/Urlrewrite/Edit/Form.php +++ b/app/code/Magento/Backend/Block/Urlrewrite/Edit/Form.php @@ -68,7 +68,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic protected $_adminhtmlData = null; /** - * @var \Magento\Core\Model\System\Store + * @var \Magento\Store\Model\System\Store */ protected $_systemStore; @@ -94,7 +94,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic * @param \Magento\UrlRewrite\Model\UrlRewrite\TypeProviderFactory $typesFactory * @param \Magento\UrlRewrite\Model\UrlRewrite\OptionProviderFactory $optionFactory * @param \Magento\UrlRewrite\Model\UrlRewriteFactory $rewriteFactory - * @param \Magento\Core\Model\System\Store $systemStore + * @param \Magento\Store\Model\System\Store $systemStore * @param \Magento\Backend\Helper\Data $adminhtmlData * @param array $data * @@ -107,7 +107,7 @@ public function __construct( \Magento\UrlRewrite\Model\UrlRewrite\TypeProviderFactory $typesFactory, \Magento\UrlRewrite\Model\UrlRewrite\OptionProviderFactory $optionFactory, \Magento\UrlRewrite\Model\UrlRewriteFactory $rewriteFactory, - \Magento\Core\Model\System\Store $systemStore, + \Magento\Store\Model\System\Store $systemStore, \Magento\Backend\Helper\Data $adminhtmlData, array $data = array() ) { diff --git a/app/code/Magento/Backend/Block/Widget/Container.php b/app/code/Magento/Backend/Block/Widget/Container.php index d47d4336a6668..8dd542df3f992 100644 --- a/app/code/Magento/Backend/Block/Widget/Container.php +++ b/app/code/Magento/Backend/Block/Widget/Container.php @@ -87,10 +87,10 @@ protected function _construct() * @param array $data * @param integer $level * @param integer $sortOrder - * @param string|null $region That button should be displayed in ('header', 'footer', null) + * @param string|null $region That button should be displayed in ('toolbar', 'header', 'footer', null) * @return $this */ - protected function _addButton($buttonId, $data, $level = 0, $sortOrder = 0, $region = 'header') + protected function _addButton($buttonId, $data, $level = 0, $sortOrder = 0, $region = 'toolbar') { if (!isset($this->_buttons[$level])) { $this->_buttons[$level] = array(); @@ -118,10 +118,10 @@ protected function _addButton($buttonId, $data, $level = 0, $sortOrder = 0, $reg * @param array $data * @param integer $level * @param integer $sortOrder - * @param string|null $region That button should be displayed in ('header', 'footer', null) + * @param string|null $region That button should be displayed in ('toolbar', 'header', 'footer', null) * @return $this */ - public function addButton($buttonId, $data, $level = 0, $sortOrder = 0, $region = 'header') + public function addButton($buttonId, $data, $level = 0, $sortOrder = 0, $region = 'toolbar') { return $this->_addButton($buttonId, $data, $level, $sortOrder, $region); } @@ -208,7 +208,14 @@ protected function _prepareLayout() foreach ($buttons as $buttonId => $data) { $childId = $this->_prepareButtonBlockId($buttonId); $blockClassName = isset($data['class_name']) ? $data['class_name'] : null; - $this->_addButtonChildBlock($childId, $blockClassName); + $block = $this->_getButtonChildBlock($childId, $blockClassName); + if (isset($data['name'])) { + $data['element_name'] = $data['name']; + } + if ($block) { + $block->setData($data); + $this->_getButtonParentBlock($data['region'])->setChild($childId, $block); + } } } return parent::_prepareLayout(); @@ -225,6 +232,27 @@ protected function _prepareButtonBlockId($buttonId) return $buttonId . '_button'; } + /** + * Return button parent block. + * + * @param string $region + * @return \Magento\Backend\Block\Template + */ + protected function _getButtonParentBlock($region) + { + if (!$region || $region == 'header' || $region == 'footer') { + $parent = $this; + } elseif ($region == 'toolbar') { + $parent = $this->getLayout()->getBlock('page.actions.toolbar'); + } else { + $parent = $this->getLayout()->getBlock($region); + } + if ($parent) { + return $parent; + } + return $this; + } + /** * Adding child block with specified child's id. * @@ -232,14 +260,12 @@ protected function _prepareButtonBlockId($buttonId) * @param null|string $blockClassName * @return \Magento\Backend\Block\Widget */ - protected function _addButtonChildBlock($childId, $blockClassName = null) + protected function _getButtonChildBlock($childId, $blockClassName = null) { if (null === $blockClassName) { $blockClassName = 'Magento\Backend\Block\Widget\Button'; } - $block = $this->getLayout()->createBlock($blockClassName, $this->getNameInLayout() . '-' . $childId); - $this->setChild($childId, $block); - return $block; + return $this->getLayout()->createBlock($blockClassName, $this->getNameInLayout() . '-' . $childId); } /** @@ -254,23 +280,11 @@ public function getButtonsHtml($region = null) foreach ($this->_buttons as $buttons) { $_buttons = $this->_sortButtons($buttons); foreach ($_buttons as $button) { - $buttonId = $button['id']; $data = $button['data']; if ($region && isset($data['region']) && $region != $data['region']) { continue; } - $childId = $this->_prepareButtonBlockId($buttonId); - $child = $this->getChildBlock($childId); - - if (!$child) { - $blockClassName = isset($data['class_name']) ? $data['class_name'] : null; - $child = $this->_addButtonChildBlock($childId, $blockClassName); - } - if (isset($data['name'])) { - $data['element_name'] = $data['name']; - } - $child->setData($data); - + $childId = $this->_prepareButtonBlockId($button['id']); $out .= $this->getChildHtml($childId); } } diff --git a/app/code/Magento/Backend/Block/Widget/Form/Container.php b/app/code/Magento/Backend/Block/Widget/Form/Container.php index da887970fe2f4..85a223c88f0c1 100644 --- a/app/code/Magento/Backend/Block/Widget/Form/Container.php +++ b/app/code/Magento/Backend/Block/Widget/Form/Container.php @@ -82,7 +82,7 @@ protected function _construct() ); $this->_addButton( 'reset', - array('label' => __('Reset'), 'onclick' => 'setLocation(window.location.href)'), + array('label' => __('Reset'), 'onclick' => 'setLocation(window.location.href)', 'class' => 'reset'), -1 ); 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 b11bf3d249647..cc66b359a2134 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 @@ -228,7 +228,12 @@ protected function _convertDate($date, $locale) $dateObj = $this->_localeDate->date(null, null, $locale, false); //set default timezone for store (admin) - $dateObj->setTimezone($this->_storeConfig->getConfig($this->_localeDate->getDefaultTimezonePath())); + $dateObj->setTimezone( + $this->_scopeConfig->getValue( + $this->_localeDate->getDefaultTimezonePath(), + \Magento\Store\Model\ScopeInterface::SCOPE_STORE + ) + ); //set beginning of day $dateObj->setHour(00); diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Datetime.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Datetime.php index cf6b36c3459b5..1b90823bab02a 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Datetime.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Datetime.php @@ -60,7 +60,12 @@ public function getValue($index = null) $datetimeTo = $value['to']; //calculate end date considering timezone specification - $datetimeTo->setTimezone($this->_storeConfig->getConfig($this->_localeDate->getDefaultTimezonePath())); + $datetimeTo->setTimezone( + $this->_scopeConfig->getValue( + $this->_localeDate->getDefaultTimezonePath(), + \Magento\Store\Model\ScopeInterface::SCOPE_STORE + ) + ); $datetimeTo->addDay(1)->subSecond(1); $datetimeTo->setTimezone(\Magento\Stdlib\DateTime\TimezoneInterface::DEFAULT_TIMEZONE); } @@ -81,7 +86,12 @@ protected function _convertDate($date, $locale) $dateObj = $this->getLocaleDate()->date(null, null, $locale, false); //set default timezone for store (admin) - $dateObj->setTimezone($this->_storeConfig->getConfig($this->_localeDate->getDefaultTimezonePath())); + $dateObj->setTimezone( + $this->_scopeConfig->getValue( + $this->_localeDate->getDefaultTimezonePath(), + \Magento\Store\Model\ScopeInterface::SCOPE_STORE + ) + ); //set date with applying timezone of store $dateObj->set( @@ -120,32 +130,18 @@ public function getHtml() ); } - $html = '
' . - '
' . 'getUiId( 'filter', $this->_getHtmlName(), 'from' ) . '/>' . '
'; - $html .= '
' . - '' . ''; + $html .= ''; $html .= ' + - + diff --git a/app/code/Magento/Backend/view/adminhtml/admin/page.phtml b/app/code/Magento/Backend/view/adminhtml/admin/page.phtml index 58a927f5cd13b..5af0b981220ec 100644 --- a/app/code/Magento/Backend/view/adminhtml/admin/page.phtml +++ b/app/code/Magento/Backend/view/adminhtml/admin/page.phtml @@ -33,10 +33,12 @@ getBodyClass() ? ' class="' . $this->getBodyClass() . '"' : ''; ?> data-container="body" data-mage-init='{"loaderAjax":{},"loader":{}}'> -
+
getChildHtml('notification_window'); ?> getChildHtml('global_notices') ?> - getChildHtml('header') ?> + getChildHtml('menu') ?> getChildHtml('notifications'); ?> @@ -45,7 +47,7 @@
getLayout()->getMessagesBlock()->getGroupedHtml() ?>
- + getChildHtml('page_main_actions'); ?> getChildHtml('left')): ?>
@@ -64,11 +66,10 @@ getChildHtml('js') ?> +
- -
- -
getChildHtml('before_body_end') ?>