+
';
}
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') ?>
diff --git a/app/code/Magento/Backend/view/adminhtml/dashboard/graph.phtml b/app/code/Magento/Backend/view/adminhtml/dashboard/graph.phtml
index a0523a85a9998..729944c21de1b 100644
--- a/app/code/Magento/Backend/view/adminhtml/dashboard/graph.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/dashboard/graph.phtml
@@ -25,22 +25,22 @@
*/
?>
-
-
+
+
+
-getWidth()}px;height:{$this->getHeight()}px; margin:0 auto;";
-?>
getCount()): ?>
-
+
+
+
-
+
+
+
diff --git a/app/code/Magento/Backend/view/adminhtml/dashboard/grid.phtml b/app/code/Magento/Backend/view/adminhtml/dashboard/grid.phtml
index b5d69c0d547a2..06ffee92c2de7 100644
--- a/app/code/Magento/Backend/view/adminhtml/dashboard/grid.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/dashboard/grid.phtml
@@ -29,40 +29,40 @@
$numColumns = sizeof($this->getColumns());
?>
getCollection()): ?>
-
-
- tags from the code. */
- /* foreach ($this->getColumns() as $_column): ?>
- getHtmlProperty() ?> />
-
- getHeadersVisibility() || $this->getFilterVisibility()): ?>
-
- getHeadersVisibility()): ?>
-
- getColumns() as $_column): ?>
- getHeaderHtmlProperty() ?>>getHeaderHtml() ?> |
-
-
-
-
-
-
- getCollection()->getSize()>0) && (!$this->getIsCollapsed())): ?>
- getCollection() as $_index=>$_item): ?>
-
- getColumns() as $_column): ?>
- getRowField($_item)) != '' ? $_html : ' ') ?> |
+
+
+ tags from the code. */
+ /* foreach ($this->getColumns() as $_column): ?>
+ getHtmlProperty() ?> />
+
+ getHeadersVisibility() || $this->getFilterVisibility()): ?>
+
+ getHeadersVisibility()): ?>
+
+ getColumns() as $_column): ?>
+ getHeaderHtmlProperty() ?>>getHeaderHtml() ?> |
+
+
+
+
+
+
+ getCollection()->getSize()>0) && (!$this->getIsCollapsed())): ?>
+ getCollection() as $_index=>$_item): ?>
+
+ getColumns() as $_column): ?>
+ getRowField($_item)) != '' ? $_html : ' ') ?> |
+
+
-
-
- getEmptyText()): ?>
-
- getEmptyText() ?> |
-
-
-
-
+ getEmptyText()): ?>
+
+ getEmptyText() ?> |
+
+
+
+
canDisplayContainer()): ?>
-
-
-
-
- getChildHtml('store_switcher') ?>
-
+
+
+
+
getChildHtml('diagrams') ?>
getChildBlock('diagrams')->getTabsIds())) : ?>
-
+
- getChildHtml('totals') ?>
- getChildHtml('grids') ?>
-
+ getChildHtml('totals') ?>
+
+ getChildHtml('grids') ?>
+
+
-
+
getChildHtml('sales') ?>
-
-
-
+
+
+ getChildHtml('lastOrders'); ?>
-
-
-
+
+
+ getChildHtml('lastSearches'); ?>
-
-
-
+
+
+ getChildHtml('topSearches'); ?>
diff --git a/app/code/Magento/Backend/view/adminhtml/dashboard/salebar.phtml b/app/code/Magento/Backend/view/adminhtml/dashboard/salebar.phtml
index be2794e5c0422..009c2aa07e12b 100644
--- a/app/code/Magento/Backend/view/adminhtml/dashboard/salebar.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/dashboard/salebar.phtml
@@ -25,12 +25,15 @@
*/
?>
getTotals()) > 0 ): ?>
- getTotals() as $_total ): ?>
-
-
+ getTotals() as $_total ): ?>
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Backend/view/adminhtml/dashboard/totalbar.phtml b/app/code/Magento/Backend/view/adminhtml/dashboard/totalbar.phtml
index f4ebb07549d3c..093d4d13c4ca6 100644
--- a/app/code/Magento/Backend/view/adminhtml/dashboard/totalbar.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/dashboard/totalbar.phtml
@@ -25,18 +25,17 @@
*/
?>
getTotals()) > 0 ): ?>
-
-
-
-
- getTotals() as $_total ): ?>
-
-
-
- |
-
-
-
-
+
+
+ getTotals() as $_total ): ?>
+ -
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_dashboard_index.xml b/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_dashboard_index.xml
index da56a65d2d592..960ac53c977fc 100644
--- a/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_dashboard_index.xml
+++ b/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_dashboard_index.xml
@@ -24,13 +24,18 @@
*/
-->
-
-
-
-
- 0
-
-
+
+
+
+ 0
+
+
+
+
+
diff --git a/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_config_edit.xml b/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_config_edit.xml
index 39519b513f4b6..6996cf87c8ffe 100644
--- a/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_config_edit.xml
+++ b/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_config_edit.xml
@@ -35,9 +35,21 @@
+
+
+
+ 1
+ 0
+ 1
+ Default Config
+ 1
+
+
+
-
diff --git a/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_store_grid_block.xml b/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_store_grid_block.xml
index d5d0748d648bc..b005f130920b1 100644
--- a/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_store_grid_block.xml
+++ b/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_store_grid_block.xml
@@ -29,7 +29,7 @@
storeGrid
1
- Magento\Core\Model\Resource\Website\Grid\Collection
+ Magento\Store\Model\Resource\Website\Grid\Collection
diff --git a/app/code/Magento/Service/etc/module.xml b/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_variable_edit.xml
similarity index 74%
rename from app/code/Magento/Service/etc/module.xml
rename to app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_variable_edit.xml
index 38cd40bff9e57..9313f41dc301d 100644
--- a/app/code/Magento/Service/etc/module.xml
+++ b/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_variable_edit.xml
@@ -1,6 +1,6 @@
-
-
-
-
-
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright Copyright (c) 2014 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/layout/default.xml b/app/code/Magento/Backend/view/adminhtml/layout/default.xml
index b29d7f09056b1..3e7a64b531803 100644
--- a/app/code/Magento/Backend/view/adminhtml/layout/default.xml
+++ b/app/code/Magento/Backend/view/adminhtml/layout/default.xml
@@ -31,7 +31,7 @@
- jquery/jquery.js
+ jquery/jquery-1.8.2.js
@@ -41,7 +41,7 @@
- jquery/jquery-ui.js
+ jquery/jquery-ui-1.9.2.js
@@ -276,28 +276,47 @@
-
+
+
+
+
+
-
+
+
+
+
-
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Backend/view/adminhtml/page/copyright.phtml b/app/code/Magento/Backend/view/adminhtml/page/copyright.phtml
index 0ee85590dacd5..6d18ebbb382b1 100644
--- a/app/code/Magento/Backend/view/adminhtml/page/copyright.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/page/copyright.phtml
@@ -22,4 +22,6 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
*/
?>
-
+
+
+
diff --git a/app/code/Magento/Backend/view/adminhtml/page/footer.phtml b/app/code/Magento/Backend/view/adminhtml/page/footer.phtml
index 463dfe4454896..4d176481d18f6 100644
--- a/app/code/Magento/Backend/view/adminhtml/page/footer.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/page/footer.phtml
@@ -19,10 +19,11 @@
* needs please refer to http://www.magentocommerce.com for more information.
*
* @category design
- * @package default_default
* @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
*/
?>
-getChildHtml('copyright');?> /
-
+
+getBugreportUrl()): ?>
+
+
diff --git a/app/code/Magento/Backend/view/adminhtml/page/header.phtml b/app/code/Magento/Backend/view/adminhtml/page/header.phtml
index 61c7572b847b8..b6f6befb73528 100644
--- a/app/code/Magento/Backend/view/adminhtml/page/header.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/page/header.phtml
@@ -26,28 +26,30 @@
/** @var $this \Magento\Backend\Block\Page\Header */
?>
-