diff --git a/CHANGELOG.md b/CHANGELOG.md
index d601a36f59067..974e9df22c295 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,25 @@
+2.0.0.0-dev53
+=============
+* Moved general action-related functionality to \Magento\App\Action\Action in the library. Removed Magento\Core\Controller\Varien\Action and related logic from the Magento_Core module
+* Moved view-related methods from action interface to \Magento\App\ViewInterface with corresponding implementation
+* Moved redirect creation logic from the action interface to \Magento\App\Response\RedirectInterface
+* Moved Magento\Core common blocks to the library
+* Added reading of etc/integration/config.xml and etc/integration/api.xml files for API Integrations
+* Various improvements:
+ * Email-related logic from the Core and Adminhtml modules consolidated in the new Email module
+* GitHub requests:
+ * [#238](https://github.com/magento/magento2/pull/238) -- Improve escaping HTML entities in URL
+ * [#199](https://github.com/magento/magento2/pull/199) -- Replaced function calls to array_push with adding the elements directly
+ * [#182](https://github.com/magento/magento2/pull/182) -- By default use collection _idFieldName for toOption* methods.
+ * [#233](https://github.com/magento/magento2/pull/233) -- Google Rich Snippet Code
+ * [#339](https://github.com/magento/magento2/pull/339) -- Correcting 'cahce' typo in documentation.
+ * [#232](https://github.com/magento/magento2/pull/232) -- Update app/code/core/Mage/Checkout/controllers/CartController.php (fix issue #27632)
+* Fixed bugs:
+ * Fixed JavaScript error when printing orders from the frontend
+ * Fixed Captcha problems on various forms when Captcha is enabled on the frontend
+ * Fixed "Page not found" on category page if setting "Add Store Code to Urls" to "Yes" in the backend config
+ * Fixed Fatal error when creating shipping label for returns
+
2.0.0.0-dev52
=============
* Better Navigation menu rendering due to improved Caching of Categories
@@ -53,7 +75,7 @@
* Moved the String Helper to the Magento\Filter, Magento\Stdlib\String, Magento\Stdlib\ArrayUtils libraries
* Moved the Data Helper to the Magento\Math, Magento\Filter, Magento\Convert, Magento\Encryption, Magento\Filesystem libraries and to Magento\Customer\Helper\Data libraries
* Moved the Http Magento Helper to the Magento\HTTP library
- * The Hint Magento Helper, Http Magento Helper helpers were removed from the Magento\Core module
+ * The Hint Magento Helper, Http Magento Helper helpers were removed from the Magento\Core module
* Implemented SOAP faults declaration in WSDL
* Web API config reader was refactored to use Magento\Config\Reader\Filesystem
* Created integrations module. Added 'Integrations Grid' and 'New/Edit' Integration pages in the admin
diff --git a/app/code/Magento/AdminNotification/Block/Grid/Renderer/Actions.php b/app/code/Magento/AdminNotification/Block/Grid/Renderer/Actions.php
index 29c4a227b7916..44e74e36cdeed 100644
--- a/app/code/Magento/AdminNotification/Block/Grid/Renderer/Actions.php
+++ b/app/code/Magento/AdminNotification/Block/Grid/Renderer/Actions.php
@@ -53,7 +53,7 @@ public function render(\Magento\Object $row)
$this->getUrl('*/*/remove/', array(
'_current'=>true,
'id' => $row->getId(),
- \Magento\Core\Controller\Front\Action::PARAM_NAME_URL_ENCODED => $encodedUrl)
+ \Magento\App\Action\Action::PARAM_NAME_URL_ENCODED => $encodedUrl)
),
__('Are you sure?'),
__('Remove')
diff --git a/app/code/Magento/AdminNotification/Block/System/Messages.php b/app/code/Magento/AdminNotification/Block/System/Messages.php
index af0ab84636270..ce984ccf27820 100644
--- a/app/code/Magento/AdminNotification/Block/System/Messages.php
+++ b/app/code/Magento/AdminNotification/Block/System/Messages.php
@@ -32,19 +32,19 @@ class Messages extends \Magento\Backend\Block\Template
*/
protected $_messages;
- /**
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Backend\Block\Template\Context $context
- * @param \Magento\AdminNotification\Model\Resource\System\Message\Collection\Synchronized $messages
- * @param array $data
+ /**
+ * @param \Magento\Backend\Block\Template\Context $context
+ * @param \Magento\Core\Helper\Data $coreData
+ * @param \Magento\AdminNotification\Model\Resource\System\Message\Collection\Synchronized $messages
+ * @param array $data
*/
- public function __construct(
- \Magento\Core\Helper\Data $coreData,
- \Magento\Backend\Block\Template\Context $context,
- \Magento\AdminNotification\Model\Resource\System\Message\Collection\Synchronized $messages,
- array $data = array()
- ) {
- parent::__construct($coreData, $context, $data);
+ public function __construct(
+ \Magento\Backend\Block\Template\Context $context,
+ \Magento\Core\Helper\Data $coreData,
+ \Magento\AdminNotification\Model\Resource\System\Message\Collection\Synchronized $messages,
+ array $data = array()
+ ) {
+ parent::__construct($context, $coreData, $data);
$this->_messages = $messages;
}
diff --git a/app/code/Magento/AdminNotification/Block/System/Messages/UnreadMessagePopup.php b/app/code/Magento/AdminNotification/Block/System/Messages/UnreadMessagePopup.php
index 2c509af6e2de5..95635f6103cdd 100644
--- a/app/code/Magento/AdminNotification/Block/System/Messages/UnreadMessagePopup.php
+++ b/app/code/Magento/AdminNotification/Block/System/Messages/UnreadMessagePopup.php
@@ -42,19 +42,19 @@ class UnreadMessagePopup extends \Magento\Backend\Block\Template
*/
protected $_messages;
- /**
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Backend\Block\Template\Context $context
- * @param \Magento\AdminNotification\Model\Resource\System\Message\Collection\Synchronized $messages
- * @param array $data
+ /**
+ * @param \Magento\Backend\Block\Template\Context $context
+ * @param \Magento\Core\Helper\Data $coreData
+ * @param \Magento\AdminNotification\Model\Resource\System\Message\Collection\Synchronized $messages
+ * @param array $data
*/
- public function __construct(
- \Magento\Core\Helper\Data $coreData,
- \Magento\Backend\Block\Template\Context $context,
- \Magento\AdminNotification\Model\Resource\System\Message\Collection\Synchronized $messages,
- array $data = array()
- ) {
- parent::__construct($coreData, $context, $data);
+ public function __construct(
+ \Magento\Backend\Block\Template\Context $context,
+ \Magento\Core\Helper\Data $coreData,
+ \Magento\AdminNotification\Model\Resource\System\Message\Collection\Synchronized $messages,
+ array $data = array()
+ ) {
+ parent::__construct($context, $coreData, $data);
$this->_messages = $messages;
}
diff --git a/app/code/Magento/AdminNotification/Block/ToolbarEntry.php b/app/code/Magento/AdminNotification/Block/ToolbarEntry.php
index 9df8fec4cc45a..3ad43a591176a 100644
--- a/app/code/Magento/AdminNotification/Block/ToolbarEntry.php
+++ b/app/code/Magento/AdminNotification/Block/ToolbarEntry.php
@@ -42,19 +42,19 @@ class ToolbarEntry extends \Magento\Backend\Block\Template
*/
protected $_notificationList;
- /**
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Backend\Block\Template\Context $context
- * @param \Magento\AdminNotification\Model\Resource\Inbox\Collection\Unread $notificationList
- * @param array $data
+ /**
+ * @param \Magento\Backend\Block\Template\Context $context
+ * @param \Magento\Core\Helper\Data $coreData
+ * @param \Magento\AdminNotification\Model\Resource\Inbox\Collection\Unread $notificationList
+ * @param array $data
*/
- public function __construct(
- \Magento\Core\Helper\Data $coreData,
- \Magento\Backend\Block\Template\Context $context,
- \Magento\AdminNotification\Model\Resource\Inbox\Collection\Unread $notificationList,
- array $data = array()
- ) {
- parent::__construct($coreData, $context, $data);
+ public function __construct(
+ \Magento\Backend\Block\Template\Context $context,
+ \Magento\Core\Helper\Data $coreData,
+ \Magento\AdminNotification\Model\Resource\Inbox\Collection\Unread $notificationList,
+ array $data = array()
+ ) {
+ parent::__construct($context, $coreData, $data);
$this->_notificationList = $notificationList;
}
diff --git a/app/code/Magento/AdminNotification/Block/Window.php b/app/code/Magento/AdminNotification/Block/Window.php
index 5f2ee757ddf42..a2116a9fb027f 100644
--- a/app/code/Magento/AdminNotification/Block/Window.php
+++ b/app/code/Magento/AdminNotification/Block/Window.php
@@ -60,21 +60,21 @@ class Window extends \Magento\Backend\Block\Template
*/
protected $_latestItem;
- /**
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Backend\Block\Template\Context $context
- * @param \Magento\Backend\Model\Auth\Session $authSession
- * @param \Magento\AdminNotification\Model\Resource\Inbox\Collection\Critical $criticalCollection
- * @param array $data
+ /**
+ * @param \Magento\Backend\Block\Template\Context $context
+ * @param \Magento\Core\Helper\Data $coreData
+ * @param \Magento\Backend\Model\Auth\Session $authSession
+ * @param \Magento\AdminNotification\Model\Resource\Inbox\Collection\Critical $criticalCollection
+ * @param array $data
*/
- public function __construct(
- \Magento\Core\Helper\Data $coreData,
- \Magento\Backend\Block\Template\Context $context,
- \Magento\Backend\Model\Auth\Session $authSession,
- \Magento\AdminNotification\Model\Resource\Inbox\Collection\Critical $criticalCollection,
- array $data = array()
- ) {
- parent::__construct($coreData, $context, $data);
+ public function __construct(
+ \Magento\Backend\Block\Template\Context $context,
+ \Magento\Core\Helper\Data $coreData,
+ \Magento\Backend\Model\Auth\Session $authSession,
+ \Magento\AdminNotification\Model\Resource\Inbox\Collection\Critical $criticalCollection,
+ array $data = array()
+ ) {
+ parent::__construct($context, $coreData, $data);
$this->_authSession = $authSession;
$this->_criticalCollection = $criticalCollection;
}
diff --git a/app/code/Magento/AdminNotification/Controller/Adminhtml/Notification.php b/app/code/Magento/AdminNotification/Controller/Adminhtml/Notification.php
index dc3c1078de4a2..e79c4a49bd58b 100644
--- a/app/code/Magento/AdminNotification/Controller/Adminhtml/Notification.php
+++ b/app/code/Magento/AdminNotification/Controller/Adminhtml/Notification.php
@@ -27,18 +27,19 @@
*/
namespace Magento\AdminNotification\Controller\Adminhtml;
-class Notification extends \Magento\Backend\Controller\AbstractAction
+class Notification extends \Magento\Backend\App\AbstractAction
{
public function indexAction()
{
- $this->_title(__('Notifications'));
+ $this->_title->add(__('Notifications'));
- $this->loadLayout()
- ->_setActiveMenu('Magento_AdminNotification::system_adminnotification')
+ $this->_view->loadLayout();
+ $this->_setActiveMenu('Magento_AdminNotification::system_adminnotification')
->_addBreadcrumb(
__('Messages Inbox'),
__('Messages Inbox')
- )->renderLayout();
+ );
+ $this->_view->renderLayout();
}
public function markAsReadAction()
@@ -59,7 +60,7 @@ public function markAsReadAction()
);
}
- $this->_redirectReferer();
+ $this->getResponse()->setRedirect($this->_redirect->getRedirectUrl($this->getUrl('*')));
return;
}
$this->_redirect('adminhtml/*/');
@@ -174,7 +175,7 @@ public function massRemoveAction()
__("We couldn't remove the messages because of an error."));
}
}
- $this->_redirectReferer();
+ $this->getResponse()->setRedirect($this->_redirect->getRedirectUrl($this->getUrl('*')));
}
protected function _isAllowed()
diff --git a/app/code/Magento/AdminNotification/Controller/Adminhtml/Survey.php b/app/code/Magento/AdminNotification/Controller/Adminhtml/Survey.php
index f8d688ac87370..d66c585ef138e 100644
--- a/app/code/Magento/AdminNotification/Controller/Adminhtml/Survey.php
+++ b/app/code/Magento/AdminNotification/Controller/Adminhtml/Survey.php
@@ -34,7 +34,7 @@
*/
namespace Magento\AdminNotification\Controller\Adminhtml;
-class Survey extends \Magento\Backend\Controller\Adminhtml\Action
+class Survey extends \Magento\Backend\App\Action
{
/**
* Index Action
diff --git a/app/code/Magento/AdminNotification/Controller/Adminhtml/System/Message.php b/app/code/Magento/AdminNotification/Controller/Adminhtml/System/Message.php
index 17e26203ef0ac..49532c93c820f 100644
--- a/app/code/Magento/AdminNotification/Controller/Adminhtml/System/Message.php
+++ b/app/code/Magento/AdminNotification/Controller/Adminhtml/System/Message.php
@@ -24,7 +24,7 @@
namespace Magento\AdminNotification\Controller\Adminhtml\System;
-class Message extends \Magento\Backend\Controller\AbstractAction
+class Message extends \Magento\Backend\App\AbstractAction
{
public function listAction()
{
diff --git a/app/code/Magento/AdminNotification/Helper/Data.php b/app/code/Magento/AdminNotification/Helper/Data.php
index 24b0512350b5c..f117a74a51258 100644
--- a/app/code/Magento/AdminNotification/Helper/Data.php
+++ b/app/code/Magento/AdminNotification/Helper/Data.php
@@ -34,7 +34,7 @@
*/
namespace Magento\AdminNotification\Helper;
-class Data extends \Magento\Core\Helper\AbstractHelper
+class Data extends \Magento\App\Helper\AbstractHelper
{
const XML_PATH_POPUP_URL = 'system/adminnotification/popup_url';
@@ -77,7 +77,7 @@ class Data extends \Magento\Core\Helper\AbstractHelper
protected $_inboxFactory;
public function __construct(
- \Magento\Core\Helper\Context $context,
+ \Magento\App\Helper\Context $context,
\Magento\Core\Model\Store\Config $coreStoreConfig,
\Magento\AdminNotification\Model\InboxFactory $inboxFactory
) {
diff --git a/app/code/Magento/AdminNotification/Model/Feed.php b/app/code/Magento/AdminNotification/Model/Feed.php
index a0f94bf5ec8d5..4477bb68e9db7 100644
--- a/app/code/Magento/AdminNotification/Model/Feed.php
+++ b/app/code/Magento/AdminNotification/Model/Feed.php
@@ -58,17 +58,11 @@ class Feed extends \Magento\Core\Model\AbstractModel
*/
protected $_inboxFactory;
- /**
- * @var \Magento\App\CacheInterface
- */
- protected $_cache;
-
/**
* @param \Magento\Core\Model\Context $context
* @param \Magento\Core\Model\Registry $registry
* @param \Magento\Core\Model\Store\Config $coreStoreConfig
* @param \Magento\AdminNotification\Model\InboxFactory $inboxFactory
- * @param \Magento\App\CacheInterface $cache
* @param \Magento\Core\Model\Resource\AbstractResource $resource
* @param \Magento\Data\Collection\Db $resourceCollection
* @param array $data
@@ -78,7 +72,6 @@ public function __construct(
\Magento\Core\Model\Registry $registry,
\Magento\Core\Model\Store\Config $coreStoreConfig,
\Magento\AdminNotification\Model\InboxFactory $inboxFactory,
- \Magento\App\CacheInterface $cache,
\Magento\Core\Model\Resource\AbstractResource $resource = null,
\Magento\Data\Collection\Db $resourceCollection = null,
array $data = array()
@@ -86,7 +79,6 @@ public function __construct(
parent::__construct($context, $registry, $resource, $resourceCollection, $data);
$this->_coreStoreConfig = $coreStoreConfig;
$this->_inboxFactory = $inboxFactory;
- $this->_cache = $cache;
}
/**
@@ -94,7 +86,9 @@ public function __construct(
*
*/
protected function _construct()
- {}
+ {
+
+ }
/**
* Retrieve feed url
@@ -174,7 +168,7 @@ public function getFrequency()
*/
public function getLastUpdate()
{
- return $this->_cache->load('admin_notifications_lastcheck');
+ return $this->_cacheManager->load('admin_notifications_lastcheck');
}
/**
@@ -184,7 +178,7 @@ public function getLastUpdate()
*/
public function setLastUpdate()
{
- $this->_cache->save(time(), 'admin_notifications_lastcheck');
+ $this->_cacheManager->save(time(), 'admin_notifications_lastcheck');
return $this;
}
diff --git a/app/code/Magento/Adminhtml/Block/Backup/Dialogs.php b/app/code/Magento/Adminhtml/Block/Backup/Dialogs.php
index 673f91627b6bb..fc3499afd7885 100644
--- a/app/code/Magento/Adminhtml/Block/Backup/Dialogs.php
+++ b/app/code/Magento/Adminhtml/Block/Backup/Dialogs.php
@@ -45,7 +45,7 @@ class Dialogs extends \Magento\Adminhtml\Block\Template
/**
* Include backup.js file in page before rendering
*
- * @see \Magento\Core\Block\AbstractBlock::_prepareLayout()
+ * @see \Magento\View\Block\AbstractBlock::_prepareLayout()
*/
protected function _prepareLayout()
{
diff --git a/app/code/Magento/Adminhtml/Block/Denied.php b/app/code/Magento/Adminhtml/Block/Denied.php
index d9c6b272f616a..96c0fa78b55a9 100644
--- a/app/code/Magento/Adminhtml/Block/Denied.php
+++ b/app/code/Magento/Adminhtml/Block/Denied.php
@@ -33,20 +33,20 @@ class Denied extends \Magento\Adminhtml\Block\Template
*/
protected $_authSession;
- /**
- * @param \Magento\Backend\Model\Auth\Session $authSession
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Backend\Block\Template\Context $context
- * @param array $data
+ /**
+ * @param \Magento\Backend\Block\Template\Context $context
+ * @param \Magento\Core\Helper\Data $coreData
+ * @param \Magento\Backend\Model\Auth\Session $authSession
+ * @param array $data
*/
- public function __construct(
- \Magento\Backend\Model\Auth\Session $authSession,
- \Magento\Core\Helper\Data $coreData,
- \Magento\Backend\Block\Template\Context $context,
- array $data = array()
- ) {
+ public function __construct(
+ \Magento\Backend\Block\Template\Context $context,
+ \Magento\Core\Helper\Data $coreData,
+ \Magento\Backend\Model\Auth\Session $authSession,
+ array $data = array()
+ ) {
$this->_authSession = $authSession;
- parent::__construct($coreData, $context, $data);
+ parent::__construct($context, $coreData, $data);
}
public function hasAvailableResources()
diff --git a/app/code/Magento/Adminhtml/Block/Html/Date.php b/app/code/Magento/Adminhtml/Block/Html/Date.php
index 3d67e24be1ec6..b66f44d120cbd 100644
--- a/app/code/Magento/Adminhtml/Block/Html/Date.php
+++ b/app/code/Magento/Adminhtml/Block/Html/Date.php
@@ -33,6 +33,6 @@
*/
namespace Magento\Adminhtml\Block\Html;
-class Date extends \Magento\Core\Block\Html\Date
+class Date extends \Magento\View\Block\Html\Date
{
}
diff --git a/app/code/Magento/Adminhtml/Block/Html/Select.php b/app/code/Magento/Adminhtml/Block/Html/Select.php
index d3387a83f1c28..ace827710884f 100644
--- a/app/code/Magento/Adminhtml/Block/Html/Select.php
+++ b/app/code/Magento/Adminhtml/Block/Html/Select.php
@@ -33,6 +33,6 @@
*/
namespace Magento\Adminhtml\Block\Html;
-class Select extends \Magento\Core\Block\Html\Select
+class Select extends \Magento\View\Block\Html\Select
{
}
diff --git a/app/code/Magento/Adminhtml/Block/Media/Uploader.php b/app/code/Magento/Adminhtml/Block/Media/Uploader.php
index e2b72f17e51fb..0cb0c9c6973d0 100644
--- a/app/code/Magento/Adminhtml/Block/Media/Uploader.php
+++ b/app/code/Magento/Adminhtml/Block/Media/Uploader.php
@@ -41,33 +41,25 @@ class Uploader extends \Magento\Adminhtml\Block\Widget
*/
protected $_template = 'Magento_Adminhtml::media/uploader.phtml';
- /**
- * @var \Magento\View\Url
- */
- protected $_viewUrl;
-
/**
* @var \Magento\File\Size
*/
protected $_fileSizeService;
- /**
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Backend\Block\Template\Context $context
- * @param \Magento\View\Url $viewUrl
- * @param \Magento\File\Size $fileSize
- * @param array $data
+ /**
+ * @param \Magento\Backend\Block\Template\Context $context
+ * @param \Magento\Core\Helper\Data $coreData
+ * @param \Magento\File\Size $fileSize
+ * @param array $data
*/
- public function __construct(
- \Magento\Core\Helper\Data $coreData,
- \Magento\Backend\Block\Template\Context $context,
- \Magento\View\Url $viewUrl,
- \Magento\File\Size $fileSize,
- array $data = array()
- ) {
- $this->_viewUrl = $viewUrl;
+ public function __construct(
+ \Magento\Backend\Block\Template\Context $context,
+ \Magento\Core\Helper\Data $coreData,
+ \Magento\File\Size $fileSize,
+ array $data = array()
+ ) {
$this->_fileSizeService = $fileSize;
- parent::__construct($coreData, $context, $data);
+ parent::__construct($context, $coreData, $data);
}
protected function _construct()
diff --git a/app/code/Magento/Adminhtml/Block/Messages.php b/app/code/Magento/Adminhtml/Block/Messages.php
index e17a7284a32ee..93896f840b8b7 100644
--- a/app/code/Magento/Adminhtml/Block/Messages.php
+++ b/app/code/Magento/Adminhtml/Block/Messages.php
@@ -34,6 +34,6 @@
*/
namespace Magento\Adminhtml\Block;
-class Messages extends \Magento\Core\Block\Messages
+class Messages extends \Magento\View\Block\Messages
{
}
diff --git a/app/code/Magento/Adminhtml/Block/Newsletter/Problem.php b/app/code/Magento/Adminhtml/Block/Newsletter/Problem.php
index c139adb9e5b50..7a9af30931af3 100644
--- a/app/code/Magento/Adminhtml/Block/Newsletter/Problem.php
+++ b/app/code/Magento/Adminhtml/Block/Newsletter/Problem.php
@@ -43,20 +43,20 @@ class Problem extends \Magento\Adminhtml\Block\Template
*/
protected $_problemCollection;
- /**
- * @param \Magento\Newsletter\Model\Resource\Problem\Collection $problemCollection
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Backend\Block\Template\Context $context
- * @param array $data
+ /**
+ * @param \Magento\Backend\Block\Template\Context $context
+ * @param \Magento\Core\Helper\Data $coreData
+ * @param \Magento\Newsletter\Model\Resource\Problem\Collection $problemCollection
+ * @param array $data
*/
- public function __construct(
- \Magento\Newsletter\Model\Resource\Problem\Collection $problemCollection,
- \Magento\Core\Helper\Data $coreData,
- \Magento\Backend\Block\Template\Context $context,
- array $data = array()
- ) {
+ public function __construct(
+ \Magento\Backend\Block\Template\Context $context,
+ \Magento\Core\Helper\Data $coreData,
+ \Magento\Newsletter\Model\Resource\Problem\Collection $problemCollection,
+ array $data = array()
+ ) {
$this->_problemCollection = $problemCollection;
- parent::__construct($coreData, $context, $data);
+ parent::__construct($context, $coreData, $data);
}
protected function _construct()
diff --git a/app/code/Magento/Adminhtml/Block/Newsletter/Queue/Edit.php b/app/code/Magento/Adminhtml/Block/Newsletter/Queue/Edit.php
index ffcd6e1866a8f..7dac9990abcdf 100644
--- a/app/code/Magento/Adminhtml/Block/Newsletter/Queue/Edit.php
+++ b/app/code/Magento/Adminhtml/Block/Newsletter/Queue/Edit.php
@@ -45,23 +45,23 @@ class Edit extends \Magento\Adminhtml\Block\Template
*/
protected $_wysiwygConfig;
- /**
- * @param \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Backend\Block\Template\Context $context
- * @param \Magento\Core\Model\Registry $registry
- * @param array $data
+ /**
+ * @param \Magento\Backend\Block\Template\Context $context
+ * @param \Magento\Core\Helper\Data $coreData
+ * @param \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig
+ * @param \Magento\Core\Model\Registry $registry
+ * @param array $data
*/
- public function __construct(
- \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig,
- \Magento\Core\Helper\Data $coreData,
- \Magento\Backend\Block\Template\Context $context,
- \Magento\Core\Model\Registry $registry,
- array $data = array()
- ) {
+ public function __construct(
+ \Magento\Backend\Block\Template\Context $context,
+ \Magento\Core\Helper\Data $coreData,
+ \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig,
+ \Magento\Core\Model\Registry $registry,
+ array $data = array()
+ ) {
$this->_coreRegistry = $registry;
$this->_wysiwygConfig = $wysiwygConfig;
- parent::__construct($coreData, $context, $data);
+ parent::__construct($context, $coreData, $data);
}
protected function _construct()
diff --git a/app/code/Magento/Adminhtml/Block/Newsletter/Queue/Edit/Form.php b/app/code/Magento/Adminhtml/Block/Newsletter/Queue/Edit/Form.php
index 40ce922592ad1..58a32c9340802 100644
--- a/app/code/Magento/Adminhtml/Block/Newsletter/Queue/Edit/Form.php
+++ b/app/code/Magento/Adminhtml/Block/Newsletter/Queue/Edit/Form.php
@@ -51,30 +51,30 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
*/
protected $_queueFactory;
- /**
- * @param \Magento\Newsletter\Model\QueueFactory $queueFactory
- * @param \Magento\Core\Model\System\Store $systemStore
- * @param \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig
- * @param \Magento\Core\Model\Registry $registry
- * @param \Magento\Data\FormFactory $formFactory
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Backend\Block\Template\Context $context
- * @param array $data
+ /**
+ * @param \Magento\Backend\Block\Template\Context $context
+ * @param \Magento\Core\Helper\Data $coreData
+ * @param \Magento\Core\Model\Registry $registry
+ * @param \Magento\Data\FormFactory $formFactory
+ * @param \Magento\Newsletter\Model\QueueFactory $queueFactory
+ * @param \Magento\Core\Model\System\Store $systemStore
+ * @param \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig
+ * @param array $data
*/
- public function __construct(
- \Magento\Newsletter\Model\QueueFactory $queueFactory,
- \Magento\Core\Model\System\Store $systemStore,
- \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig,
- \Magento\Core\Model\Registry $registry,
- \Magento\Data\FormFactory $formFactory,
- \Magento\Core\Helper\Data $coreData,
- \Magento\Backend\Block\Template\Context $context,
- array $data = array()
- ) {
+ public function __construct(
+ \Magento\Backend\Block\Template\Context $context,
+ \Magento\Core\Helper\Data $coreData,
+ \Magento\Core\Model\Registry $registry,
+ \Magento\Data\FormFactory $formFactory,
+ \Magento\Newsletter\Model\QueueFactory $queueFactory,
+ \Magento\Core\Model\System\Store $systemStore,
+ \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig,
+ array $data = array()
+ ) {
$this->_wysiwygConfig = $wysiwygConfig;
$this->_systemStore = $systemStore;
$this->_queueFactory = $queueFactory;
- parent::__construct($registry, $formFactory, $coreData, $context, $data);
+ parent::__construct($context, $coreData, $registry, $formFactory, $data);
}
/**
diff --git a/app/code/Magento/Adminhtml/Block/Newsletter/Queue/Preview.php b/app/code/Magento/Adminhtml/Block/Newsletter/Queue/Preview.php
index 406e1e218fd48..e42e83e22f2b0 100644
--- a/app/code/Magento/Adminhtml/Block/Newsletter/Queue/Preview.php
+++ b/app/code/Magento/Adminhtml/Block/Newsletter/Queue/Preview.php
@@ -50,26 +50,26 @@ class Preview extends \Magento\Adminhtml\Block\Widget
*/
protected $_subscriberFactory;
- /**
- * @param \Magento\Newsletter\Model\TemplateFactory $templateFactory
- * @param \Magento\Newsletter\Model\QueueFactory $queueFactory
- * @param \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Backend\Block\Template\Context $context
- * @param array $data
+ /**
+ * @param \Magento\Backend\Block\Template\Context $context
+ * @param \Magento\Core\Helper\Data $coreData
+ * @param \Magento\Newsletter\Model\TemplateFactory $templateFactory
+ * @param \Magento\Newsletter\Model\QueueFactory $queueFactory
+ * @param \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory
+ * @param array $data
*/
- public function __construct(
- \Magento\Newsletter\Model\TemplateFactory $templateFactory,
- \Magento\Newsletter\Model\QueueFactory $queueFactory,
- \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory,
- \Magento\Core\Helper\Data $coreData,
- \Magento\Backend\Block\Template\Context $context,
- array $data = array()
- ) {
+ public function __construct(
+ \Magento\Backend\Block\Template\Context $context,
+ \Magento\Core\Helper\Data $coreData,
+ \Magento\Newsletter\Model\TemplateFactory $templateFactory,
+ \Magento\Newsletter\Model\QueueFactory $queueFactory,
+ \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory,
+ array $data = array()
+ ) {
$this->_templateFactory = $templateFactory;
$this->_queueFactory = $queueFactory;
$this->_subscriberFactory = $subscriberFactory;
- parent::__construct($coreData, $context, $data);
+ parent::__construct($context, $coreData, $data);
}
protected function _toHtml()
diff --git a/app/code/Magento/Adminhtml/Block/Newsletter/Subscriber.php b/app/code/Magento/Adminhtml/Block/Newsletter/Subscriber.php
index f13d5c91f220a..77983dbce8d05 100644
--- a/app/code/Magento/Adminhtml/Block/Newsletter/Subscriber.php
+++ b/app/code/Magento/Adminhtml/Block/Newsletter/Subscriber.php
@@ -50,20 +50,20 @@ class Subscriber extends \Magento\Adminhtml\Block\Template
*/
protected $_collectionFactory;
- /**
- * @param \Magento\Newsletter\Model\Resource\Queue\CollectionFactory $collectionFactory
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Backend\Block\Template\Context $context
- * @param array $data
+ /**
+ * @param \Magento\Backend\Block\Template\Context $context
+ * @param \Magento\Core\Helper\Data $coreData
+ * @param \Magento\Newsletter\Model\Resource\Queue\CollectionFactory $collectionFactory
+ * @param array $data
*/
- public function __construct(
- \Magento\Newsletter\Model\Resource\Queue\CollectionFactory $collectionFactory,
- \Magento\Core\Helper\Data $coreData,
- \Magento\Backend\Block\Template\Context $context,
- array $data = array()
- ) {
+ public function __construct(
+ \Magento\Backend\Block\Template\Context $context,
+ \Magento\Core\Helper\Data $coreData,
+ \Magento\Newsletter\Model\Resource\Queue\CollectionFactory $collectionFactory,
+ array $data = array()
+ ) {
$this->_collectionFactory = $collectionFactory;
- parent::__construct($coreData, $context, $data);
+ parent::__construct($context, $coreData, $data);
}
/**
diff --git a/app/code/Magento/Adminhtml/Block/Newsletter/Subscriber/Grid.php b/app/code/Magento/Adminhtml/Block/Newsletter/Subscriber/Grid.php
index 196316360e444..58d5307b946a5 100644
--- a/app/code/Magento/Adminhtml/Block/Newsletter/Subscriber/Grid.php
+++ b/app/code/Magento/Adminhtml/Block/Newsletter/Subscriber/Grid.php
@@ -40,24 +40,22 @@ class Grid extends \Magento\Backend\Block\Widget\Grid
*/
protected $_queueFactory;
- /**
- * @param \Magento\Newsletter\Model\QueueFactory $queueFactory
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Backend\Block\Template\Context $context
- * @param \Magento\Core\Model\StoreManagerInterface $storeManager
- * @param \Magento\Core\Model\Url $urlModel
- * @param array $data
+ /**
+ * @param \Magento\Backend\Block\Template\Context $context
+ * @param \Magento\Core\Helper\Data $coreData
+ * @param \Magento\Core\Model\Url $urlModel
+ * @param \Magento\Newsletter\Model\QueueFactory $queueFactory
+ * @param array $data
*/
- public function __construct(
- \Magento\Newsletter\Model\QueueFactory $queueFactory,
- \Magento\Core\Helper\Data $coreData,
- \Magento\Backend\Block\Template\Context $context,
- \Magento\Core\Model\StoreManagerInterface $storeManager,
- \Magento\Core\Model\Url $urlModel,
- array $data = array()
- ) {
+ public function __construct(
+ \Magento\Backend\Block\Template\Context $context,
+ \Magento\Core\Helper\Data $coreData,
+ \Magento\Core\Model\Url $urlModel,
+ \Magento\Newsletter\Model\QueueFactory $queueFactory,
+ array $data = array()
+ ) {
$this->_queueFactory = $queueFactory;
- parent::__construct($coreData, $context, $storeManager, $urlModel, $data);
+ parent::__construct($context, $coreData, $urlModel, $data);
}
/**
diff --git a/app/code/Magento/Adminhtml/Block/Newsletter/Subscriber/Grid/Filter/Website.php b/app/code/Magento/Adminhtml/Block/Newsletter/Subscriber/Grid/Filter/Website.php
index 832de5c9ab655..69b889266f143 100644
--- a/app/code/Magento/Adminhtml/Block/Newsletter/Subscriber/Grid/Filter/Website.php
+++ b/app/code/Magento/Adminhtml/Block/Newsletter/Subscriber/Grid/Filter/Website.php
@@ -51,22 +51,22 @@ class Website
*/
protected $_websitesFactory;
- /**
- * @param \Magento\Core\Model\Resource\Website\CollectionFactory $websitesFactory
- * @param \Magento\Core\Model\StoreManagerInterface $storeManager
- * @param \Magento\Backend\Block\Context $context
- * @param \Magento\Core\Model\Resource\Helper $resourceHelper
- * @param \Magento\Core\Model\Registry $registry
- * @param array $data
+ /**
+ * @param \Magento\Backend\Block\Context $context
+ * @param \Magento\Core\Model\Resource\Helper $resourceHelper
+ * @param \Magento\Core\Model\Resource\Website\CollectionFactory $websitesFactory
+ * @param \Magento\Core\Model\StoreManagerInterface $storeManager
+ * @param \Magento\Core\Model\Registry $registry
+ * @param array $data
*/
- public function __construct(
- \Magento\Core\Model\Resource\Website\CollectionFactory $websitesFactory,
- \Magento\Core\Model\StoreManagerInterface $storeManager,
- \Magento\Backend\Block\Context $context,
- \Magento\Core\Model\Resource\Helper $resourceHelper,
- \Magento\Core\Model\Registry $registry,
- array $data = array()
- ) {
+ public function __construct(
+ \Magento\Backend\Block\Context $context,
+ \Magento\Core\Model\Resource\Helper $resourceHelper,
+ \Magento\Core\Model\Resource\Website\CollectionFactory $websitesFactory,
+ \Magento\Core\Model\StoreManagerInterface $storeManager,
+ \Magento\Core\Model\Registry $registry,
+ array $data = array()
+ ) {
$this->_coreRegistry = $registry;
$this->_storeManager = $storeManager;
$this->_websitesFactory = $websitesFactory;
diff --git a/app/code/Magento/Adminhtml/Block/Newsletter/Template/Edit.php b/app/code/Magento/Adminhtml/Block/Newsletter/Template/Edit.php
index 2c00dd1438285..e5e39f2044038 100644
--- a/app/code/Magento/Adminhtml/Block/Newsletter/Template/Edit.php
+++ b/app/code/Magento/Adminhtml/Block/Newsletter/Template/Edit.php
@@ -54,23 +54,23 @@ class Edit extends \Magento\Adminhtml\Block\Widget
*/
protected $_wysiwygConfig;
- /**
- * @param \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Backend\Block\Template\Context $context
- * @param \Magento\Core\Model\Registry $registry
- * @param array $data
+ /**
+ * @param \Magento\Backend\Block\Template\Context $context
+ * @param \Magento\Core\Helper\Data $coreData
+ * @param \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig
+ * @param \Magento\Core\Model\Registry $registry
+ * @param array $data
*/
- public function __construct(
- \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig,
- \Magento\Core\Helper\Data $coreData,
- \Magento\Backend\Block\Template\Context $context,
- \Magento\Core\Model\Registry $registry,
- array $data = array()
- ) {
+ public function __construct(
+ \Magento\Backend\Block\Template\Context $context,
+ \Magento\Core\Helper\Data $coreData,
+ \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig,
+ \Magento\Core\Model\Registry $registry,
+ array $data = array()
+ ) {
$this->_coreRegistry = $registry;
$this->_wysiwygConfig = $wysiwygConfig;
- parent::__construct($coreData, $context, $data);
+ parent::__construct($context, $coreData, $data);
}
/**
diff --git a/app/code/Magento/Adminhtml/Block/Newsletter/Template/Edit/Form.php b/app/code/Magento/Adminhtml/Block/Newsletter/Template/Edit/Form.php
index e4739860bab80..aca73a4d27877 100644
--- a/app/code/Magento/Adminhtml/Block/Newsletter/Template/Edit/Form.php
+++ b/app/code/Magento/Adminhtml/Block/Newsletter/Template/Edit/Form.php
@@ -41,24 +41,24 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
*/
protected $_wysiwygConfig;
- /**
- * @param \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig
- * @param \Magento\Core\Model\Registry $registry
- * @param \Magento\Data\FormFactory $formFactory
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Backend\Block\Template\Context $context
- * @param array $data
+ /**
+ * @param \Magento\Backend\Block\Template\Context $context
+ * @param \Magento\Core\Helper\Data $coreData
+ * @param \Magento\Core\Model\Registry $registry
+ * @param \Magento\Data\FormFactory $formFactory
+ * @param \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig
+ * @param array $data
*/
- public function __construct(
- \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig,
- \Magento\Core\Model\Registry $registry,
- \Magento\Data\FormFactory $formFactory,
- \Magento\Core\Helper\Data $coreData,
- \Magento\Backend\Block\Template\Context $context,
- array $data = array()
- ) {
+ public function __construct(
+ \Magento\Backend\Block\Template\Context $context,
+ \Magento\Core\Helper\Data $coreData,
+ \Magento\Core\Model\Registry $registry,
+ \Magento\Data\FormFactory $formFactory,
+ \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig,
+ array $data = array()
+ ) {
$this->_wysiwygConfig = $wysiwygConfig;
- parent::__construct($registry, $formFactory, $coreData, $context, $data);
+ parent::__construct($context, $coreData, $registry, $formFactory, $data);
}
/**
diff --git a/app/code/Magento/Adminhtml/Block/Newsletter/Template/Grid.php b/app/code/Magento/Adminhtml/Block/Newsletter/Template/Grid.php
index 9c2f5ef483e3b..e065b186a583f 100644
--- a/app/code/Magento/Adminhtml/Block/Newsletter/Template/Grid.php
+++ b/app/code/Magento/Adminhtml/Block/Newsletter/Template/Grid.php
@@ -40,24 +40,22 @@ class Grid extends \Magento\Backend\Block\Widget\Grid\Extended
*/
protected $_templateCollection;
- /**
- * @param \Magento\Newsletter\Model\Resource\Template\Collection $templateCollection
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Backend\Block\Template\Context $context
- * @param \Magento\Core\Model\StoreManagerInterface $storeManager
- * @param \Magento\Core\Model\Url $urlModel
- * @param array $data
+ /**
+ * @param \Magento\Backend\Block\Template\Context $context
+ * @param \Magento\Core\Helper\Data $coreData
+ * @param \Magento\Core\Model\Url $urlModel
+ * @param \Magento\Newsletter\Model\Resource\Template\Collection $templateCollection
+ * @param array $data
*/
- public function __construct(
- \Magento\Newsletter\Model\Resource\Template\Collection $templateCollection,
- \Magento\Core\Helper\Data $coreData,
- \Magento\Backend\Block\Template\Context $context,
- \Magento\Core\Model\StoreManagerInterface $storeManager,
- \Magento\Core\Model\Url $urlModel,
- array $data = array()
- ) {
+ public function __construct(
+ \Magento\Backend\Block\Template\Context $context,
+ \Magento\Core\Helper\Data $coreData,
+ \Magento\Core\Model\Url $urlModel,
+ \Magento\Newsletter\Model\Resource\Template\Collection $templateCollection,
+ array $data = array()
+ ) {
$this->_templateCollection = $templateCollection;
- parent::__construct($coreData, $context, $storeManager, $urlModel, $data);
+ parent::__construct($context, $coreData, $urlModel, $data);
$this->setEmptyText(__('No Templates Found'));
}
diff --git a/app/code/Magento/Adminhtml/Block/Newsletter/Template/Preview.php b/app/code/Magento/Adminhtml/Block/Newsletter/Template/Preview.php
index 304eca2cb6d83..f60823e8bcd46 100644
--- a/app/code/Magento/Adminhtml/Block/Newsletter/Template/Preview.php
+++ b/app/code/Magento/Adminhtml/Block/Newsletter/Template/Preview.php
@@ -45,23 +45,23 @@ class Preview extends \Magento\Adminhtml\Block\Widget
*/
protected $_subscriberFactory;
- /**
- * @param \Magento\Newsletter\Model\TemplateFactory $templateFactory
- * @param \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Backend\Block\Template\Context $context
- * @param array $data
+ /**
+ * @param \Magento\Backend\Block\Template\Context $context
+ * @param \Magento\Core\Helper\Data $coreData
+ * @param \Magento\Newsletter\Model\TemplateFactory $templateFactory
+ * @param \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory
+ * @param array $data
*/
- public function __construct(
- \Magento\Newsletter\Model\TemplateFactory $templateFactory,
- \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory,
- \Magento\Core\Helper\Data $coreData,
- \Magento\Backend\Block\Template\Context $context,
- array $data = array()
- ) {
+ public function __construct(
+ \Magento\Backend\Block\Template\Context $context,
+ \Magento\Core\Helper\Data $coreData,
+ \Magento\Newsletter\Model\TemplateFactory $templateFactory,
+ \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory,
+ array $data = array()
+ ) {
$this->_templateFactory = $templateFactory;
$this->_subscriberFactory = $subscriberFactory;
- parent::__construct($coreData, $context, $data);
+ parent::__construct($context, $coreData, $data);
}
protected function _toHtml()
diff --git a/app/code/Magento/Adminhtml/Block/Page.php b/app/code/Magento/Adminhtml/Block/Page.php
index a1622bac45b68..db5845b304fa1 100644
--- a/app/code/Magento/Adminhtml/Block/Page.php
+++ b/app/code/Magento/Adminhtml/Block/Page.php
@@ -35,30 +35,8 @@
class Page extends \Magento\Backend\Block\Template
{
-
protected $_template = 'admin/page.phtml';
- /**
- * @var \Magento\Core\Model\App
- */
- protected $_application;
-
- /**
- * @param \Magento\Core\Model\App $application
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Backend\Block\Template\Context $context
- * @param array $data
- */
- public function __construct(
- \Magento\Core\Model\App $application,
- \Magento\Core\Helper\Data $coreData,
- \Magento\Backend\Block\Template\Context $context,
- array $data = array()
- ) {
- $this->_application = $application;
- parent::__construct($coreData, $context, $data);
- }
-
/**
* Class constructor
*
@@ -67,10 +45,7 @@ protected function _construct()
{
parent::_construct();
- $action = $this->_application->getFrontController()->getAction();
- if ($action) {
- $this->addBodyClass($action->getFullActionName('-'));
- }
+ $this->addBodyClass($this->_request->getFullActionName('-'));
}
/**
diff --git a/app/code/Magento/Adminhtml/Block/Page/Head.php b/app/code/Magento/Adminhtml/Block/Page/Head.php
index f8b7a0a6d2ae8..f0c549d8ccb50 100644
--- a/app/code/Magento/Adminhtml/Block/Page/Head.php
+++ b/app/code/Magento/Adminhtml/Block/Page/Head.php
@@ -41,42 +41,42 @@ class Head extends \Magento\Page\Block\Html\Head
protected $_template = 'page/head.phtml';
/**
- * @var \Magento\Core\Model\Session
+ * @var \Magento\App\Action\Title
*/
- protected $_session;
+ protected $_titles;
/**
- * @param \Magento\Core\Model\Session $session
- * @param \Magento\Core\Model\LocaleInterface $locale
- * @param \Magento\App\Dir $dir
- * @param \Magento\Core\Model\StoreManagerInterface $storeManager
- * @param \Magento\Core\Helper\File\Storage\Database $fileStorageDatabase
+ * @param \Magento\View\Block\Template\Context $context
* @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Core\Block\Template\Context $context
+ * @param \Magento\Core\Helper\File\Storage\Database $fileStorageDatabase
* @param \Magento\ObjectManager $objectManager
* @param \Magento\Core\Model\Page $page
* @param \Magento\Core\Model\Page\Asset\MergeService $assetMergeService
* @param \Magento\Core\Model\Page\Asset\MinifyService $assetMinifyService
+ * @param \Magento\App\Action\Title $titles
* @param array $data
*/
public function __construct(
- \Magento\Core\Model\Session $session,
- \Magento\Core\Model\LocaleInterface $locale,
- \Magento\App\Dir $dir,
- \Magento\Core\Model\StoreManagerInterface $storeManager,
- \Magento\Core\Helper\File\Storage\Database $fileStorageDatabase,
+ \Magento\View\Block\Template\Context $context,
\Magento\Core\Helper\Data $coreData,
- \Magento\Core\Block\Template\Context $context,
+ \Magento\Core\Helper\File\Storage\Database $fileStorageDatabase,
\Magento\ObjectManager $objectManager,
\Magento\Core\Model\Page $page,
\Magento\Core\Model\Page\Asset\MergeService $assetMergeService,
\Magento\Core\Model\Page\Asset\MinifyService $assetMinifyService,
+ \Magento\App\Action\Title $titles,
array $data = array()
) {
- $this->_session = $session;
+ $this->_titles = $titles;
parent::__construct(
- $locale, $dir, $storeManager, $fileStorageDatabase, $coreData, $context, $objectManager, $page,
- $assetMergeService, $assetMinifyService, $data
+ $context,
+ $coreData,
+ $fileStorageDatabase,
+ $objectManager,
+ $page,
+ $assetMergeService,
+ $assetMinifyService,
+ $data
);
}
@@ -89,4 +89,22 @@ public function getFormKey()
{
return $this->_session->getFormKey();
}
+
+ /**
+ * @return array|string
+ */
+ public function getTitle()
+ {
+ /** Get default title */
+ $title = parent::getTitle();
+
+ /** Add default title */
+ $this->_titles->add($title, true);
+
+ /** Set title list */
+ $this->setTitle(array_reverse($this->_titles->get()));
+
+ /** Render titles */
+ return parent::getTitle();
+ }
}
diff --git a/app/code/Magento/Adminhtml/Block/Page/Header.php b/app/code/Magento/Adminhtml/Block/Page/Header.php
index 4c80e37bc1b85..88d99b1e169c6 100644
--- a/app/code/Magento/Adminhtml/Block/Page/Header.php
+++ b/app/code/Magento/Adminhtml/Block/Page/Header.php
@@ -49,23 +49,23 @@ class Header extends \Magento\Adminhtml\Block\Template
*/
protected $_authSession;
- /**
- * @param \Magento\Backend\Model\Auth\Session $authSession
- * @param \Magento\Backend\Helper\Data $backendData
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Backend\Block\Template\Context $context
- * @param array $data
+ /**
+ * @param \Magento\Backend\Block\Template\Context $context
+ * @param \Magento\Core\Helper\Data $coreData
+ * @param \Magento\Backend\Model\Auth\Session $authSession
+ * @param \Magento\Backend\Helper\Data $backendData
+ * @param array $data
*/
- public function __construct(
- \Magento\Backend\Model\Auth\Session $authSession,
- \Magento\Backend\Helper\Data $backendData,
- \Magento\Core\Helper\Data $coreData,
- \Magento\Backend\Block\Template\Context $context,
- array $data = array()
- ) {
+ public function __construct(
+ \Magento\Backend\Block\Template\Context $context,
+ \Magento\Core\Helper\Data $coreData,
+ \Magento\Backend\Model\Auth\Session $authSession,
+ \Magento\Backend\Helper\Data $backendData,
+ array $data = array()
+ ) {
$this->_backendData = $backendData;
$this->_authSession = $authSession;
- parent::__construct($coreData, $context, $data);
+ parent::__construct($context, $coreData, $data);
}
public function getHomeLink()
diff --git a/app/code/Magento/Adminhtml/Block/Page/System/Config/Robots/Reset.php b/app/code/Magento/Adminhtml/Block/Page/System/Config/Robots/Reset.php
index 9334fab0c6c0e..481945d922f4b 100644
--- a/app/code/Magento/Adminhtml/Block/Page/System/Config/Robots/Reset.php
+++ b/app/code/Magento/Adminhtml/Block/Page/System/Config/Robots/Reset.php
@@ -42,22 +42,20 @@ class Reset extends \Magento\Backend\Block\System\Config\Form\Field
*/
protected $_pageRobots = null;
- /**
- * @param \Magento\Page\Helper\Robots $pageRobots
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Backend\Block\Template\Context $context
- * @param \Magento\Core\Model\App $application
- * @param array $data
+ /**
+ * @param \Magento\Backend\Block\Template\Context $context
+ * @param \Magento\Core\Helper\Data $coreData
+ * @param \Magento\Page\Helper\Robots $pageRobots
+ * @param array $data
*/
- public function __construct(
- \Magento\Page\Helper\Robots $pageRobots,
- \Magento\Core\Helper\Data $coreData,
- \Magento\Backend\Block\Template\Context $context,
- \Magento\Core\Model\App $application,
- array $data = array()
- ) {
+ public function __construct(
+ \Magento\Backend\Block\Template\Context $context,
+ \Magento\Core\Helper\Data $coreData,
+ \Magento\Page\Helper\Robots $pageRobots,
+ array $data = array()
+ ) {
$this->_pageRobots = $pageRobots;
- parent::__construct($coreData, $context, $application, $data);
+ parent::__construct($context, $coreData, $data);
}
/*
diff --git a/app/code/Magento/Adminhtml/Block/Report/Config/Form/Field/YtdStart.php b/app/code/Magento/Adminhtml/Block/Report/Config/Form/Field/YtdStart.php
index fdf5086eb0c80..d5fdeb3b6d2f8 100644
--- a/app/code/Magento/Adminhtml/Block/Report/Config/Form/Field/YtdStart.php
+++ b/app/code/Magento/Adminhtml/Block/Report/Config/Form/Field/YtdStart.php
@@ -35,31 +35,6 @@
class YtdStart extends \Magento\Backend\Block\System\Config\Form\Field
{
- /**
- * Locale
- *
- * @var \Magento\Core\Model\LocaleInterface
- */
- protected $_locale;
-
- /**
- * @param \Magento\Core\Model\LocaleInterface $locale
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Backend\Block\Template\Context $context
- * @param \Magento\Core\Model\App $application
- * @param array $data
- */
- public function __construct(
- \Magento\Core\Model\LocaleInterface $locale,
- \Magento\Core\Helper\Data $coreData,
- \Magento\Backend\Block\Template\Context $context,
- \Magento\Core\Model\App $application,
- array $data = array()
- ) {
- $this->_locale = $locale;
- parent::__construct($coreData, $context, $application, $data);
- }
-
protected function _getElementHtml(\Magento\Data\Form\Element\AbstractElement $element)
{
$_months = array();
diff --git a/app/code/Magento/Adminhtml/Block/Report/Grid/AbstractGrid.php b/app/code/Magento/Adminhtml/Block/Report/Grid/AbstractGrid.php
index a91ef21a32b3e..2d729bcff5724 100644
--- a/app/code/Magento/Adminhtml/Block/Report/Grid/AbstractGrid.php
+++ b/app/code/Magento/Adminhtml/Block/Report/Grid/AbstractGrid.php
@@ -55,30 +55,28 @@ class AbstractGrid extends \Magento\Backend\Block\Widget\Grid\Extended
*/
protected $_resourceFactory;
- /**
- * @param \Magento\Reports\Model\Resource\Report\Collection\Factory $resourceFactory
- * @param \Magento\Reports\Model\Grouped\CollectionFactory $collectionFactory
- * @param \Magento\Reports\Helper\Data $reportsData
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Backend\Block\Template\Context $context
- * @param \Magento\Core\Model\StoreManagerInterface $storeManager
- * @param \Magento\Core\Model\Url $urlModel
- * @param array $data
+ /**
+ * @param \Magento\Backend\Block\Template\Context $context
+ * @param \Magento\Core\Helper\Data $coreData
+ * @param \Magento\Core\Model\Url $urlModel
+ * @param \Magento\Reports\Model\Resource\Report\Collection\Factory $resourceFactory
+ * @param \Magento\Reports\Model\Grouped\CollectionFactory $collectionFactory
+ * @param \Magento\Reports\Helper\Data $reportsData
+ * @param array $data
*/
- public function __construct(
- \Magento\Reports\Model\Resource\Report\Collection\Factory $resourceFactory,
- \Magento\Reports\Model\Grouped\CollectionFactory $collectionFactory,
- \Magento\Reports\Helper\Data $reportsData,
- \Magento\Core\Helper\Data $coreData,
- \Magento\Backend\Block\Template\Context $context,
- \Magento\Core\Model\StoreManagerInterface $storeManager,
- \Magento\Core\Model\Url $urlModel,
- array $data = array()
- ) {
+ public function __construct(
+ \Magento\Backend\Block\Template\Context $context,
+ \Magento\Core\Helper\Data $coreData,
+ \Magento\Core\Model\Url $urlModel,
+ \Magento\Reports\Model\Resource\Report\Collection\Factory $resourceFactory,
+ \Magento\Reports\Model\Grouped\CollectionFactory $collectionFactory,
+ \Magento\Reports\Helper\Data $reportsData,
+ array $data = array()
+ ) {
$this->_resourceFactory = $resourceFactory;
$this->_collectionFactory = $collectionFactory;
$this->_reportsData = $reportsData;
- parent::__construct($coreData, $context, $storeManager, $urlModel, $data);
+ parent::__construct($context, $coreData, $urlModel, $data);
}
protected function _construct()
diff --git a/app/code/Magento/Adminhtml/Block/Report/Product/Downloads/Grid.php b/app/code/Magento/Adminhtml/Block/Report/Product/Downloads/Grid.php
index 4cb3ae35647aa..92839062b4071 100644
--- a/app/code/Magento/Adminhtml/Block/Report/Product/Downloads/Grid.php
+++ b/app/code/Magento/Adminhtml/Block/Report/Product/Downloads/Grid.php
@@ -40,24 +40,22 @@ class Grid extends \Magento\Adminhtml\Block\Widget\Grid
*/
protected $_downloadsFactory;
- /**
- * @param \Magento\Reports\Model\Resource\Product\Downloads\CollectionFactory $downloadsFactory
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Backend\Block\Template\Context $context
- * @param \Magento\Core\Model\StoreManagerInterface $storeManager
- * @param \Magento\Core\Model\Url $urlModel
- * @param array $data
+ /**
+ * @param \Magento\Backend\Block\Template\Context $context
+ * @param \Magento\Core\Helper\Data $coreData
+ * @param \Magento\Core\Model\Url $urlModel
+ * @param \Magento\Reports\Model\Resource\Product\Downloads\CollectionFactory $downloadsFactory
+ * @param array $data
*/
- public function __construct(
- \Magento\Reports\Model\Resource\Product\Downloads\CollectionFactory $downloadsFactory,
- \Magento\Core\Helper\Data $coreData,
- \Magento\Backend\Block\Template\Context $context,
- \Magento\Core\Model\StoreManagerInterface $storeManager,
- \Magento\Core\Model\Url $urlModel,
- array $data = array()
- ) {
+ public function __construct(
+ \Magento\Backend\Block\Template\Context $context,
+ \Magento\Core\Helper\Data $coreData,
+ \Magento\Core\Model\Url $urlModel,
+ \Magento\Reports\Model\Resource\Product\Downloads\CollectionFactory $downloadsFactory,
+ array $data = array()
+ ) {
$this->_downloadsFactory = $downloadsFactory;
- parent::__construct($coreData, $context, $storeManager, $urlModel, $data);
+ parent::__construct($context, $coreData, $urlModel, $data);
}
protected function _construct()
diff --git a/app/code/Magento/Adminhtml/Block/Report/Product/Grid.php b/app/code/Magento/Adminhtml/Block/Report/Product/Grid.php
index e760cd4082e3c..e5b71fae7b322 100644
--- a/app/code/Magento/Adminhtml/Block/Report/Product/Grid.php
+++ b/app/code/Magento/Adminhtml/Block/Report/Product/Grid.php
@@ -40,24 +40,22 @@ class Grid extends \Magento\Backend\Block\Widget\Grid\Extended
*/
protected $_collectionFactory;
- /**
- * @param \Magento\Reports\Model\Resource\Product\CollectionFactory $collectionFactory
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Backend\Block\Template\Context $context
- * @param \Magento\Core\Model\StoreManagerInterface $storeManager
- * @param \Magento\Core\Model\Url $urlModel
- * @param array $data
+ /**
+ * @param \Magento\Backend\Block\Template\Context $context
+ * @param \Magento\Core\Helper\Data $coreData
+ * @param \Magento\Core\Model\Url $urlModel
+ * @param \Magento\Reports\Model\Resource\Product\CollectionFactory $collectionFactory
+ * @param array $data
*/
- public function __construct(
- \Magento\Reports\Model\Resource\Product\CollectionFactory $collectionFactory,
- \Magento\Core\Helper\Data $coreData,
- \Magento\Backend\Block\Template\Context $context,
- \Magento\Core\Model\StoreManagerInterface $storeManager,
- \Magento\Core\Model\Url $urlModel,
- array $data = array()
- ) {
+ public function __construct(
+ \Magento\Backend\Block\Template\Context $context,
+ \Magento\Core\Helper\Data $coreData,
+ \Magento\Core\Model\Url $urlModel,
+ \Magento\Reports\Model\Resource\Product\CollectionFactory $collectionFactory,
+ array $data = array()
+ ) {
$this->_collectionFactory = $collectionFactory;
- parent::__construct($coreData, $context, $storeManager, $urlModel, $data);
+ parent::__construct($context, $coreData, $urlModel, $data);
}
protected function _construct()
diff --git a/app/code/Magento/Adminhtml/Block/Report/Product/Lowstock/Grid.php b/app/code/Magento/Adminhtml/Block/Report/Product/Lowstock/Grid.php
index eb236302e84fd..5f415544878d0 100644
--- a/app/code/Magento/Adminhtml/Block/Report/Product/Lowstock/Grid.php
+++ b/app/code/Magento/Adminhtml/Block/Report/Product/Lowstock/Grid.php
@@ -40,24 +40,22 @@ class Grid extends \Magento\Backend\Block\Widget\Grid
*/
protected $_lowstocksFactory;
- /**
- * @param \Magento\Reports\Model\Resource\Product\Lowstock\CollectionFactory $lowstocksFactory
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Backend\Block\Template\Context $context
- * @param \Magento\Core\Model\StoreManagerInterface $storeManager
- * @param \Magento\Core\Model\Url $urlModel
- * @param array $data
+ /**
+ * @param \Magento\Backend\Block\Template\Context $context
+ * @param \Magento\Core\Helper\Data $coreData
+ * @param \Magento\Core\Model\Url $urlModel
+ * @param \Magento\Reports\Model\Resource\Product\Lowstock\CollectionFactory $lowstocksFactory
+ * @param array $data
*/
- public function __construct(
- \Magento\Reports\Model\Resource\Product\Lowstock\CollectionFactory $lowstocksFactory,
- \Magento\Core\Helper\Data $coreData,
- \Magento\Backend\Block\Template\Context $context,
- \Magento\Core\Model\StoreManagerInterface $storeManager,
- \Magento\Core\Model\Url $urlModel,
- array $data = array()
- ) {
+ public function __construct(
+ \Magento\Backend\Block\Template\Context $context,
+ \Magento\Core\Helper\Data $coreData,
+ \Magento\Core\Model\Url $urlModel,
+ \Magento\Reports\Model\Resource\Product\Lowstock\CollectionFactory $lowstocksFactory,
+ array $data = array()
+ ) {
$this->_lowstocksFactory = $lowstocksFactory;
- parent::__construct($coreData, $context, $storeManager, $urlModel, $data);
+ parent::__construct($context, $coreData, $urlModel, $data);
}
/**
diff --git a/app/code/Magento/Adminhtml/Block/Report/Review/Detail.php b/app/code/Magento/Adminhtml/Block/Report/Review/Detail.php
index 2164a5c577852..49fa91e3e2994 100644
--- a/app/code/Magento/Adminhtml/Block/Report/Review/Detail.php
+++ b/app/code/Magento/Adminhtml/Block/Report/Review/Detail.php
@@ -41,20 +41,20 @@ class Detail extends \Magento\Adminhtml\Block\Widget\Grid\Container
*/
protected $_productFactory;
- /**
- * @param \Magento\Catalog\Model\ProductFactory $productFactory
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Backend\Block\Template\Context $context
- * @param array $data
+ /**
+ * @param \Magento\Backend\Block\Template\Context $context
+ * @param \Magento\Core\Helper\Data $coreData
+ * @param \Magento\Catalog\Model\ProductFactory $productFactory
+ * @param array $data
*/
- public function __construct(
- \Magento\Catalog\Model\ProductFactory $productFactory,
- \Magento\Core\Helper\Data $coreData,
- \Magento\Backend\Block\Template\Context $context,
- array $data = array()
- ) {
+ public function __construct(
+ \Magento\Backend\Block\Template\Context $context,
+ \Magento\Core\Helper\Data $coreData,
+ \Magento\Catalog\Model\ProductFactory $productFactory,
+ array $data = array()
+ ) {
$this->_productFactory = $productFactory;
- parent::__construct($coreData, $context, $data);
+ parent::__construct($context, $coreData, $data);
}
protected function _construct()
diff --git a/app/code/Magento/Adminhtml/Block/Report/Review/Detail/Grid.php b/app/code/Magento/Adminhtml/Block/Report/Review/Detail/Grid.php
index 5ee344a390d3a..c8032a5ff018b 100644
--- a/app/code/Magento/Adminhtml/Block/Report/Review/Detail/Grid.php
+++ b/app/code/Magento/Adminhtml/Block/Report/Review/Detail/Grid.php
@@ -40,24 +40,22 @@ class Grid extends \Magento\Adminhtml\Block\Widget\Grid
*/
protected $_reviewsFactory;
- /**
- * @param \Magento\Reports\Model\Resource\Review\CollectionFactory $reviewsFactory
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Backend\Block\Template\Context $context
- * @param \Magento\Core\Model\StoreManagerInterface $storeManager
- * @param \Magento\Core\Model\Url $urlModel
- * @param array $data
+ /**
+ * @param \Magento\Backend\Block\Template\Context $context
+ * @param \Magento\Core\Helper\Data $coreData
+ * @param \Magento\Core\Model\Url $urlModel
+ * @param \Magento\Reports\Model\Resource\Review\CollectionFactory $reviewsFactory
+ * @param array $data
*/
- public function __construct(
- \Magento\Reports\Model\Resource\Review\CollectionFactory $reviewsFactory,
- \Magento\Core\Helper\Data $coreData,
- \Magento\Backend\Block\Template\Context $context,
- \Magento\Core\Model\StoreManagerInterface $storeManager,
- \Magento\Core\Model\Url $urlModel,
- array $data = array()
- ) {
+ public function __construct(
+ \Magento\Backend\Block\Template\Context $context,
+ \Magento\Core\Helper\Data $coreData,
+ \Magento\Core\Model\Url $urlModel,
+ \Magento\Reports\Model\Resource\Review\CollectionFactory $reviewsFactory,
+ array $data = array()
+ ) {
$this->_reviewsFactory = $reviewsFactory;
- parent::__construct($coreData, $context, $storeManager, $urlModel, $data);
+ parent::__construct($context, $coreData, $urlModel, $data);
}
protected function _construct()
diff --git a/app/code/Magento/Adminhtml/Block/Report/Sales/Tax/Grid.php b/app/code/Magento/Adminhtml/Block/Report/Sales/Tax/Grid.php
index c0fd6e58ff293..cb23cc1d3b2b9 100644
--- a/app/code/Magento/Adminhtml/Block/Report/Sales/Tax/Grid.php
+++ b/app/code/Magento/Adminhtml/Block/Report/Sales/Tax/Grid.php
@@ -42,32 +42,28 @@ class Grid extends \Magento\Adminhtml\Block\Report\Grid\AbstractGrid
*/
protected $_configFactory;
- /**
- * @param \Magento\Sales\Model\Order\ConfigFactory $configFactory
- * @param \Magento\Reports\Model\Resource\Report\Collection\Factory $resourceFactory
- * @param \Magento\Reports\Model\Grouped\CollectionFactory $collectionFactory
- * @param \Magento\Reports\Helper\Data $reportsData
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Backend\Block\Template\Context $context
- * @param \Magento\Core\Model\StoreManagerInterface $storeManager
- * @param \Magento\Core\Model\Url $urlModel
- * @param array $data
+ /**
+ * @param \Magento\Backend\Block\Template\Context $context
+ * @param \Magento\Core\Helper\Data $coreData
+ * @param \Magento\Core\Model\Url $urlModel
+ * @param \Magento\Reports\Model\Resource\Report\Collection\Factory $resourceFactory
+ * @param \Magento\Reports\Model\Grouped\CollectionFactory $collectionFactory
+ * @param \Magento\Reports\Helper\Data $reportsData
+ * @param \Magento\Sales\Model\Order\ConfigFactory $configFactory
+ * @param array $data
*/
- public function __construct(
- \Magento\Sales\Model\Order\ConfigFactory $configFactory,
- \Magento\Reports\Model\Resource\Report\Collection\Factory $resourceFactory,
- \Magento\Reports\Model\Grouped\CollectionFactory $collectionFactory,
- \Magento\Reports\Helper\Data $reportsData,
- \Magento\Core\Helper\Data $coreData,
- \Magento\Backend\Block\Template\Context $context,
- \Magento\Core\Model\StoreManagerInterface $storeManager,
- \Magento\Core\Model\Url $urlModel,
- array $data = array()
- ) {
+ public function __construct(
+ \Magento\Backend\Block\Template\Context $context,
+ \Magento\Core\Helper\Data $coreData,
+ \Magento\Core\Model\Url $urlModel,
+ \Magento\Reports\Model\Resource\Report\Collection\Factory $resourceFactory,
+ \Magento\Reports\Model\Grouped\CollectionFactory $collectionFactory,
+ \Magento\Reports\Helper\Data $reportsData,
+ \Magento\Sales\Model\Order\ConfigFactory $configFactory,
+ array $data = array()
+ ) {
$this->_configFactory = $configFactory;
- parent::__construct(
- $resourceFactory, $collectionFactory, $reportsData, $coreData, $context, $storeManager, $urlModel, $data
- );
+ parent::__construct($context, $coreData, $urlModel, $resourceFactory, $collectionFactory, $reportsData, $data);
}
protected function _construct()
diff --git a/app/code/Magento/Adminhtml/Block/Report/Shopcart/Abandoned/Grid.php b/app/code/Magento/Adminhtml/Block/Report/Shopcart/Abandoned/Grid.php
index 89335c849104a..cc77533f1d48e 100644
--- a/app/code/Magento/Adminhtml/Block/Report/Shopcart/Abandoned/Grid.php
+++ b/app/code/Magento/Adminhtml/Block/Report/Shopcart/Abandoned/Grid.php
@@ -40,24 +40,22 @@ class Grid extends \Magento\Adminhtml\Block\Report\Grid\Shopcart
*/
protected $_quotesFactory;
- /**
- * @param \Magento\Reports\Model\Resource\Quote\CollectionFactory $quotesFactory
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Backend\Block\Template\Context $context
- * @param \Magento\Core\Model\StoreManagerInterface $storeManager
- * @param \Magento\Core\Model\Url $urlModel
- * @param array $data
+ /**
+ * @param \Magento\Backend\Block\Template\Context $context
+ * @param \Magento\Core\Helper\Data $coreData
+ * @param \Magento\Core\Model\Url $urlModel
+ * @param \Magento\Reports\Model\Resource\Quote\CollectionFactory $quotesFactory
+ * @param array $data
*/
- public function __construct(
- \Magento\Reports\Model\Resource\Quote\CollectionFactory $quotesFactory,
- \Magento\Core\Helper\Data $coreData,
- \Magento\Backend\Block\Template\Context $context,
- \Magento\Core\Model\StoreManagerInterface $storeManager,
- \Magento\Core\Model\Url $urlModel,
- array $data = array()
- ) {
+ public function __construct(
+ \Magento\Backend\Block\Template\Context $context,
+ \Magento\Core\Helper\Data $coreData,
+ \Magento\Core\Model\Url $urlModel,
+ \Magento\Reports\Model\Resource\Quote\CollectionFactory $quotesFactory,
+ array $data = array()
+ ) {
$this->_quotesFactory = $quotesFactory;
- parent::__construct($coreData, $context, $storeManager, $urlModel, $data);
+ parent::__construct($context, $coreData, $urlModel, $data);
}
protected function _construct()
diff --git a/app/code/Magento/Adminhtml/Block/Report/Shopcart/Customer/Grid.php b/app/code/Magento/Adminhtml/Block/Report/Shopcart/Customer/Grid.php
index 19d583493b8d6..d167a0e66d989 100644
--- a/app/code/Magento/Adminhtml/Block/Report/Shopcart/Customer/Grid.php
+++ b/app/code/Magento/Adminhtml/Block/Report/Shopcart/Customer/Grid.php
@@ -40,24 +40,22 @@ class Grid extends \Magento\Adminhtml\Block\Report\Grid\Shopcart
*/
protected $_customersFactory;
- /**
- * @param \Magento\Reports\Model\Resource\Customer\CollectionFactory $customersFactory
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Backend\Block\Template\Context $context
- * @param \Magento\Core\Model\StoreManagerInterface $storeManager
- * @param \Magento\Core\Model\Url $urlModel
- * @param array $data
+ /**
+ * @param \Magento\Backend\Block\Template\Context $context
+ * @param \Magento\Core\Helper\Data $coreData
+ * @param \Magento\Core\Model\Url $urlModel
+ * @param \Magento\Reports\Model\Resource\Customer\CollectionFactory $customersFactory
+ * @param array $data
*/
- public function __construct(
- \Magento\Reports\Model\Resource\Customer\CollectionFactory $customersFactory,
- \Magento\Core\Helper\Data $coreData,
- \Magento\Backend\Block\Template\Context $context,
- \Magento\Core\Model\StoreManagerInterface $storeManager,
- \Magento\Core\Model\Url $urlModel,
- array $data = array()
- ) {
+ public function __construct(
+ \Magento\Backend\Block\Template\Context $context,
+ \Magento\Core\Helper\Data $coreData,
+ \Magento\Core\Model\Url $urlModel,
+ \Magento\Reports\Model\Resource\Customer\CollectionFactory $customersFactory,
+ array $data = array()
+ ) {
$this->_customersFactory = $customersFactory;
- parent::__construct($coreData, $context, $storeManager, $urlModel, $data);
+ parent::__construct($context, $coreData, $urlModel, $data);
}
protected function _construct()
diff --git a/app/code/Magento/Adminhtml/Block/Report/Shopcart/Product/Grid.php b/app/code/Magento/Adminhtml/Block/Report/Shopcart/Product/Grid.php
index b755b3e65c64b..fb98870a7e1ba 100644
--- a/app/code/Magento/Adminhtml/Block/Report/Shopcart/Product/Grid.php
+++ b/app/code/Magento/Adminhtml/Block/Report/Shopcart/Product/Grid.php
@@ -40,24 +40,22 @@ class Grid extends \Magento\Adminhtml\Block\Report\Grid\Shopcart
*/
protected $_quotesFactory;
- /**
- * @param \Magento\Reports\Model\Resource\Quote\CollectionFactory $quotesFactory
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Backend\Block\Template\Context $context
- * @param \Magento\Core\Model\StoreManagerInterface $storeManager
- * @param \Magento\Core\Model\Url $urlModel
- * @param array $data
+ /**
+ * @param \Magento\Backend\Block\Template\Context $context
+ * @param \Magento\Core\Helper\Data $coreData
+ * @param \Magento\Core\Model\Url $urlModel
+ * @param \Magento\Reports\Model\Resource\Quote\CollectionFactory $quotesFactory
+ * @param array $data
*/
- public function __construct(
- \Magento\Reports\Model\Resource\Quote\CollectionFactory $quotesFactory,
- \Magento\Core\Helper\Data $coreData,
- \Magento\Backend\Block\Template\Context $context,
- \Magento\Core\Model\StoreManagerInterface $storeManager,
- \Magento\Core\Model\Url $urlModel,
- array $data = array()
- ) {
+ public function __construct(
+ \Magento\Backend\Block\Template\Context $context,
+ \Magento\Core\Helper\Data $coreData,
+ \Magento\Core\Model\Url $urlModel,
+ \Magento\Reports\Model\Resource\Quote\CollectionFactory $quotesFactory,
+ array $data = array()
+ ) {
$this->_quotesFactory = $quotesFactory;
- parent::__construct($coreData, $context, $storeManager, $urlModel, $data);
+ parent::__construct($context, $coreData, $urlModel, $data);
}
protected function _construct()
diff --git a/app/code/Magento/Adminhtml/Block/Report/Wishlist.php b/app/code/Magento/Adminhtml/Block/Report/Wishlist.php
index a70d709edca0b..bb013103362c1 100644
--- a/app/code/Magento/Adminhtml/Block/Report/Wishlist.php
+++ b/app/code/Magento/Adminhtml/Block/Report/Wishlist.php
@@ -52,20 +52,20 @@ class Wishlist extends \Magento\Backend\Block\Template
*/
protected $_wishlistFactory;
- /**
- * @param \Magento\Reports\Model\Resource\Wishlist\CollectionFactory $wishlistFactory
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Backend\Block\Template\Context $context
- * @param array $data
+ /**
+ * @param \Magento\Backend\Block\Template\Context $context
+ * @param \Magento\Core\Helper\Data $coreData
+ * @param \Magento\Reports\Model\Resource\Wishlist\CollectionFactory $wishlistFactory
+ * @param array $data
*/
- public function __construct(
- \Magento\Reports\Model\Resource\Wishlist\CollectionFactory $wishlistFactory,
- \Magento\Core\Helper\Data $coreData,
- \Magento\Backend\Block\Template\Context $context,
- array $data = array()
- ) {
+ public function __construct(
+ \Magento\Backend\Block\Template\Context $context,
+ \Magento\Core\Helper\Data $coreData,
+ \Magento\Reports\Model\Resource\Wishlist\CollectionFactory $wishlistFactory,
+ array $data = array()
+ ) {
$this->_wishlistFactory = $wishlistFactory;
- parent::__construct($coreData, $context, $data);
+ parent::__construct($context, $coreData, $data);
}
public function _beforeToHtml()
diff --git a/app/code/Magento/Adminhtml/Block/Report/Wishlist/Grid.php b/app/code/Magento/Adminhtml/Block/Report/Wishlist/Grid.php
index 0267454e50b2d..d0a7e08aaa5f2 100644
--- a/app/code/Magento/Adminhtml/Block/Report/Wishlist/Grid.php
+++ b/app/code/Magento/Adminhtml/Block/Report/Wishlist/Grid.php
@@ -40,24 +40,22 @@ class Grid extends \Magento\Adminhtml\Block\Widget\Grid
*/
protected $_productsFactory;
- /**
- * @param \Magento\Reports\Model\Resource\Wishlist\Product\CollectionFactory $productsFactory
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Backend\Block\Template\Context $context
- * @param \Magento\Core\Model\StoreManagerInterface $storeManager
- * @param \Magento\Core\Model\Url $urlModel
- * @param array $data
+ /**
+ * @param \Magento\Backend\Block\Template\Context $context
+ * @param \Magento\Core\Helper\Data $coreData
+ * @param \Magento\Core\Model\Url $urlModel
+ * @param \Magento\Reports\Model\Resource\Wishlist\Product\CollectionFactory $productsFactory
+ * @param array $data
*/
- public function __construct(
- \Magento\Reports\Model\Resource\Wishlist\Product\CollectionFactory $productsFactory,
- \Magento\Core\Helper\Data $coreData,
- \Magento\Backend\Block\Template\Context $context,
- \Magento\Core\Model\StoreManagerInterface $storeManager,
- \Magento\Core\Model\Url $urlModel,
- array $data = array()
- ) {
+ public function __construct(
+ \Magento\Backend\Block\Template\Context $context,
+ \Magento\Core\Helper\Data $coreData,
+ \Magento\Core\Model\Url $urlModel,
+ \Magento\Reports\Model\Resource\Wishlist\Product\CollectionFactory $productsFactory,
+ array $data = array()
+ ) {
$this->_productsFactory = $productsFactory;
- parent::__construct($coreData, $context, $storeManager, $urlModel, $data);
+ parent::__construct($context, $coreData, $urlModel, $data);
}
protected function _construct()
diff --git a/app/code/Magento/Adminhtml/Block/Review/Add/Form.php b/app/code/Magento/Adminhtml/Block/Review/Add/Form.php
index 49843a68a0457..57ab6ced96f39 100644
--- a/app/code/Magento/Adminhtml/Block/Review/Add/Form.php
+++ b/app/code/Magento/Adminhtml/Block/Review/Add/Form.php
@@ -48,27 +48,27 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
*/
protected $_systemStore;
- /**
- * @param \Magento\Core\Model\System\Store $systemStore
- * @param \Magento\Review\Helper\Data $reviewData
- * @param \Magento\Core\Model\Registry $registry
- * @param \Magento\Data\FormFactory $formFactory
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Backend\Block\Template\Context $context
- * @param array $data
+ /**
+ * @param \Magento\Backend\Block\Template\Context $context
+ * @param \Magento\Core\Helper\Data $coreData
+ * @param \Magento\Core\Model\Registry $registry
+ * @param \Magento\Data\FormFactory $formFactory
+ * @param \Magento\Core\Model\System\Store $systemStore
+ * @param \Magento\Review\Helper\Data $reviewData
+ * @param array $data
*/
- public function __construct(
- \Magento\Core\Model\System\Store $systemStore,
- \Magento\Review\Helper\Data $reviewData,
- \Magento\Core\Model\Registry $registry,
- \Magento\Data\FormFactory $formFactory,
- \Magento\Core\Helper\Data $coreData,
- \Magento\Backend\Block\Template\Context $context,
- array $data = array()
- ) {
+ public function __construct(
+ \Magento\Backend\Block\Template\Context $context,
+ \Magento\Core\Helper\Data $coreData,
+ \Magento\Core\Model\Registry $registry,
+ \Magento\Data\FormFactory $formFactory,
+ \Magento\Core\Model\System\Store $systemStore,
+ \Magento\Review\Helper\Data $reviewData,
+ array $data = array()
+ ) {
$this->_reviewData = $reviewData;
$this->_systemStore = $systemStore;
- parent::__construct($registry, $formFactory, $coreData, $context, $data);
+ parent::__construct($context, $coreData, $registry, $formFactory, $data);
}
protected function _prepareForm()
diff --git a/app/code/Magento/Adminhtml/Block/Review/Edit.php b/app/code/Magento/Adminhtml/Block/Review/Edit.php
index 19aec3669700f..207148434d0c9 100644
--- a/app/code/Magento/Adminhtml/Block/Review/Edit.php
+++ b/app/code/Magento/Adminhtml/Block/Review/Edit.php
@@ -50,26 +50,26 @@ class Edit extends \Magento\Adminhtml\Block\Widget\Form\Container
*/
protected $_reviewFactory;
- /**
- * @param \Magento\Review\Model\ReviewFactory $reviewFactory
- * @param \Magento\Review\Helper\Action\Pager $reviewActionPager
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Backend\Block\Template\Context $context
- * @param \Magento\Core\Model\Registry $registry
- * @param array $data
+ /**
+ * @param \Magento\Backend\Block\Template\Context $context
+ * @param \Magento\Core\Helper\Data $coreData
+ * @param \Magento\Review\Model\ReviewFactory $reviewFactory
+ * @param \Magento\Review\Helper\Action\Pager $reviewActionPager
+ * @param \Magento\Core\Model\Registry $registry
+ * @param array $data
*/
- public function __construct(
- \Magento\Review\Model\ReviewFactory $reviewFactory,
- \Magento\Review\Helper\Action\Pager $reviewActionPager,
- \Magento\Core\Helper\Data $coreData,
- \Magento\Backend\Block\Template\Context $context,
- \Magento\Core\Model\Registry $registry,
- array $data = array()
- ) {
+ public function __construct(
+ \Magento\Backend\Block\Template\Context $context,
+ \Magento\Core\Helper\Data $coreData,
+ \Magento\Review\Model\ReviewFactory $reviewFactory,
+ \Magento\Review\Helper\Action\Pager $reviewActionPager,
+ \Magento\Core\Model\Registry $registry,
+ array $data = array()
+ ) {
$this->_coreRegistry = $registry;
$this->_reviewActionPager = $reviewActionPager;
$this->_reviewFactory = $reviewFactory;
- parent::__construct($coreData, $context, $data);
+ parent::__construct($context, $coreData, $data);
}
protected function _construct()
diff --git a/app/code/Magento/Adminhtml/Block/Review/Edit/Form.php b/app/code/Magento/Adminhtml/Block/Review/Edit/Form.php
index 41c5fac3f074c..7867f8a1923cf 100644
--- a/app/code/Magento/Adminhtml/Block/Review/Edit/Form.php
+++ b/app/code/Magento/Adminhtml/Block/Review/Edit/Form.php
@@ -53,33 +53,33 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
*/
protected $_systemStore;
- /**
- * @param \Magento\Core\Model\System\Store $systemStore
- * @param \Magento\Customer\Model\CustomerFactory $customerFactory
- * @param \Magento\Catalog\Model\ProductFactory $productFactory
- * @param \Magento\Review\Helper\Data $reviewData
- * @param \Magento\Core\Model\Registry $registry
- * @param \Magento\Data\FormFactory $formFactory
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Backend\Block\Template\Context $context
- * @param array $data
+ /**
+ * @param \Magento\Backend\Block\Template\Context $context
+ * @param \Magento\Core\Helper\Data $coreData
+ * @param \Magento\Core\Model\Registry $registry
+ * @param \Magento\Data\FormFactory $formFactory
+ * @param \Magento\Core\Model\System\Store $systemStore
+ * @param \Magento\Customer\Model\CustomerFactory $customerFactory
+ * @param \Magento\Catalog\Model\ProductFactory $productFactory
+ * @param \Magento\Review\Helper\Data $reviewData
+ * @param array $data
*/
- public function __construct(
- \Magento\Core\Model\System\Store $systemStore,
- \Magento\Customer\Model\CustomerFactory $customerFactory,
- \Magento\Catalog\Model\ProductFactory $productFactory,
- \Magento\Review\Helper\Data $reviewData,
- \Magento\Core\Model\Registry $registry,
- \Magento\Data\FormFactory $formFactory,
- \Magento\Core\Helper\Data $coreData,
- \Magento\Backend\Block\Template\Context $context,
- array $data = array()
- ) {
+ public function __construct(
+ \Magento\Backend\Block\Template\Context $context,
+ \Magento\Core\Helper\Data $coreData,
+ \Magento\Core\Model\Registry $registry,
+ \Magento\Data\FormFactory $formFactory,
+ \Magento\Core\Model\System\Store $systemStore,
+ \Magento\Customer\Model\CustomerFactory $customerFactory,
+ \Magento\Catalog\Model\ProductFactory $productFactory,
+ \Magento\Review\Helper\Data $reviewData,
+ array $data = array()
+ ) {
$this->_reviewData = $reviewData;
$this->_customerFactory = $customerFactory;
$this->_productFactory = $productFactory;
$this->_systemStore = $systemStore;
- parent::__construct($registry, $formFactory, $coreData, $context, $data);
+ parent::__construct($context, $coreData, $registry, $formFactory, $data);
}
protected function _prepareForm()
diff --git a/app/code/Magento/Adminhtml/Block/Review/Grid.php b/app/code/Magento/Adminhtml/Block/Review/Grid.php
index 54ed13592fd3d..34758723c83cf 100644
--- a/app/code/Magento/Adminhtml/Block/Review/Grid.php
+++ b/app/code/Magento/Adminhtml/Block/Review/Grid.php
@@ -72,36 +72,34 @@ class Grid extends \Magento\Backend\Block\Widget\Grid\Extended
*/
protected $_reviewFactory;
- /**
- * @param \Magento\Review\Model\ReviewFactory $reviewFactory
- * @param \Magento\Review\Model\Resource\Review\Product\CollectionFactory $productsFactory
- * @param \Magento\Review\Helper\Data $reviewData
- * @param \Magento\Review\Helper\Action\Pager $reviewActionPager
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Backend\Block\Template\Context $context
- * @param \Magento\Core\Model\StoreManagerInterface $storeManager
- * @param \Magento\Core\Model\Url $urlModel
- * @param \Magento\Core\Model\Registry $coreRegistry
- * @param array $data
+ /**
+ * @param \Magento\Backend\Block\Template\Context $context
+ * @param \Magento\Core\Helper\Data $coreData
+ * @param \Magento\Core\Model\Url $urlModel
+ * @param \Magento\Review\Model\ReviewFactory $reviewFactory
+ * @param \Magento\Review\Model\Resource\Review\Product\CollectionFactory $productsFactory
+ * @param \Magento\Review\Helper\Data $reviewData
+ * @param \Magento\Review\Helper\Action\Pager $reviewActionPager
+ * @param \Magento\Core\Model\Registry $coreRegistry
+ * @param array $data
*/
- public function __construct(
- \Magento\Review\Model\ReviewFactory $reviewFactory,
- \Magento\Review\Model\Resource\Review\Product\CollectionFactory $productsFactory,
- \Magento\Review\Helper\Data $reviewData,
- \Magento\Review\Helper\Action\Pager $reviewActionPager,
- \Magento\Core\Helper\Data $coreData,
- \Magento\Backend\Block\Template\Context $context,
- \Magento\Core\Model\StoreManagerInterface $storeManager,
- \Magento\Core\Model\Url $urlModel,
- \Magento\Core\Model\Registry $coreRegistry,
- array $data = array()
- ) {
+ public function __construct(
+ \Magento\Backend\Block\Template\Context $context,
+ \Magento\Core\Helper\Data $coreData,
+ \Magento\Core\Model\Url $urlModel,
+ \Magento\Review\Model\ReviewFactory $reviewFactory,
+ \Magento\Review\Model\Resource\Review\Product\CollectionFactory $productsFactory,
+ \Magento\Review\Helper\Data $reviewData,
+ \Magento\Review\Helper\Action\Pager $reviewActionPager,
+ \Magento\Core\Model\Registry $coreRegistry,
+ array $data = array()
+ ) {
$this->_productsFactory = $productsFactory;
$this->_coreRegistry = $coreRegistry;
$this->_reviewData = $reviewData;
$this->_reviewActionPager = $reviewActionPager;
$this->_reviewFactory = $reviewFactory;
- parent::__construct($coreData, $context, $storeManager, $urlModel, $data);
+ parent::__construct($context, $coreData, $urlModel, $data);
}
/**
diff --git a/app/code/Magento/Adminhtml/Block/Review/Main.php b/app/code/Magento/Adminhtml/Block/Review/Main.php
index e3be25f5e8e16..eac15d1f71317 100644
--- a/app/code/Magento/Adminhtml/Block/Review/Main.php
+++ b/app/code/Magento/Adminhtml/Block/Review/Main.php
@@ -48,26 +48,26 @@ class Main extends \Magento\Adminhtml\Block\Widget\Grid\Container
*/
protected $_productFactory;
- /**
- * @param \Magento\Customer\Model\CustomerFactory $customerFactory
- * @param \Magento\Catalog\Model\ProductFactory $productFactory
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Backend\Block\Template\Context $context
- * @param \Magento\Core\Model\Registry $registry
- * @param array $data
+ /**
+ * @param \Magento\Backend\Block\Template\Context $context
+ * @param \Magento\Core\Helper\Data $coreData
+ * @param \Magento\Customer\Model\CustomerFactory $customerFactory
+ * @param \Magento\Catalog\Model\ProductFactory $productFactory
+ * @param \Magento\Core\Model\Registry $registry
+ * @param array $data
*/
- public function __construct(
- \Magento\Customer\Model\CustomerFactory $customerFactory,
- \Magento\Catalog\Model\ProductFactory $productFactory,
- \Magento\Core\Helper\Data $coreData,
- \Magento\Backend\Block\Template\Context $context,
- \Magento\Core\Model\Registry $registry,
- array $data = array()
- ) {
+ public function __construct(
+ \Magento\Backend\Block\Template\Context $context,
+ \Magento\Core\Helper\Data $coreData,
+ \Magento\Customer\Model\CustomerFactory $customerFactory,
+ \Magento\Catalog\Model\ProductFactory $productFactory,
+ \Magento\Core\Model\Registry $registry,
+ array $data = array()
+ ) {
$this->_coreRegistry = $registry;
$this->_customerFactory = $customerFactory;
$this->_productFactory = $productFactory;
- parent::__construct($coreData, $context, $data);
+ parent::__construct($context, $coreData, $data);
}
protected function _construct()
diff --git a/app/code/Magento/Adminhtml/Block/Review/Product/Grid.php b/app/code/Magento/Adminhtml/Block/Review/Product/Grid.php
index 3210efe0633ee..38038e6d01046 100644
--- a/app/code/Magento/Adminhtml/Block/Review/Product/Grid.php
+++ b/app/code/Magento/Adminhtml/Block/Review/Product/Grid.php
@@ -41,7 +41,9 @@ class Grid extends \Magento\Catalog\Block\Adminhtml\Product\Grid
protected $_websitesFactory;
/**
- * @param \Magento\Core\Model\Resource\Website\CollectionFactory $websitesFactory
+ * @param \Magento\Backend\Block\Template\Context $context
+ * @param \Magento\Core\Helper\Data $coreData
+ * @param \Magento\Core\Model\Url $urlModel
* @param \Magento\Core\Model\WebsiteFactory $websiteFactory
* @param \Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory $setsFactory
* @param \Magento\Catalog\Model\ProductFactory $productFactory
@@ -49,16 +51,13 @@ class Grid extends \Magento\Catalog\Block\Adminhtml\Product\Grid
* @param \Magento\Catalog\Model\Product\Status $status
* @param \Magento\Catalog\Model\Product\Visibility $visibility
* @param \Magento\Catalog\Helper\Data $catalogData
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Backend\Block\Template\Context $context
- * @param \Magento\Core\Model\StoreManagerInterface $storeManager
- * @param \Magento\Core\Model\Url $urlModel
+ * @param \Magento\Core\Model\Resource\Website\CollectionFactory $websitesFactory
* @param array $data
- *
- * @SuppressWarnings(PHPMD.ExcessiveParameterList)
*/
public function __construct(
- \Magento\Core\Model\Resource\Website\CollectionFactory $websitesFactory,
+ \Magento\Backend\Block\Template\Context $context,
+ \Magento\Core\Helper\Data $coreData,
+ \Magento\Core\Model\Url $urlModel,
\Magento\Core\Model\WebsiteFactory $websiteFactory,
\Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory $setsFactory,
\Magento\Catalog\Model\ProductFactory $productFactory,
@@ -66,16 +65,22 @@ public function __construct(
\Magento\Catalog\Model\Product\Status $status,
\Magento\Catalog\Model\Product\Visibility $visibility,
\Magento\Catalog\Helper\Data $catalogData,
- \Magento\Core\Helper\Data $coreData,
- \Magento\Backend\Block\Template\Context $context,
- \Magento\Core\Model\StoreManagerInterface $storeManager,
- \Magento\Core\Model\Url $urlModel,
+ \Magento\Core\Model\Resource\Website\CollectionFactory $websitesFactory,
array $data = array()
) {
$this->_websitesFactory = $websitesFactory;
parent::__construct(
- $websiteFactory, $setsFactory, $productFactory, $type, $status, $visibility, $catalogData, $coreData,
- $context, $storeManager, $urlModel, $data
+ $context,
+ $coreData,
+ $urlModel,
+ $websiteFactory,
+ $setsFactory,
+ $productFactory,
+ $type,
+ $status,
+ $visibility,
+ $catalogData,
+ $data
);
}
diff --git a/app/code/Magento/Adminhtml/Block/Review/Rating/Detailed.php b/app/code/Magento/Adminhtml/Block/Review/Rating/Detailed.php
index 8c464d1a72476..aed4f848991f2 100644
--- a/app/code/Magento/Adminhtml/Block/Review/Rating/Detailed.php
+++ b/app/code/Magento/Adminhtml/Block/Review/Rating/Detailed.php
@@ -52,26 +52,26 @@ class Detailed extends \Magento\Adminhtml\Block\Template
*/
protected $_votesFactory;
- /**
- * @param \Magento\Rating\Model\Resource\Rating\CollectionFactory $ratingsFactory
- * @param \Magento\Rating\Model\Resource\Rating\Option\Vote\CollectionFactory $votesFactory
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Backend\Block\Template\Context $context
- * @param \Magento\Core\Model\Registry $registry
- * @param array $data
+ /**
+ * @param \Magento\Backend\Block\Template\Context $context
+ * @param \Magento\Core\Helper\Data $coreData
+ * @param \Magento\Rating\Model\Resource\Rating\CollectionFactory $ratingsFactory
+ * @param \Magento\Rating\Model\Resource\Rating\Option\Vote\CollectionFactory $votesFactory
+ * @param \Magento\Core\Model\Registry $registry
+ * @param array $data
*/
- public function __construct(
- \Magento\Rating\Model\Resource\Rating\CollectionFactory $ratingsFactory,
- \Magento\Rating\Model\Resource\Rating\Option\Vote\CollectionFactory $votesFactory,
- \Magento\Core\Helper\Data $coreData,
- \Magento\Backend\Block\Template\Context $context,
- \Magento\Core\Model\Registry $registry,
- array $data = array()
- ) {
+ public function __construct(
+ \Magento\Backend\Block\Template\Context $context,
+ \Magento\Core\Helper\Data $coreData,
+ \Magento\Rating\Model\Resource\Rating\CollectionFactory $ratingsFactory,
+ \Magento\Rating\Model\Resource\Rating\Option\Vote\CollectionFactory $votesFactory,
+ \Magento\Core\Model\Registry $registry,
+ array $data = array()
+ ) {
$this->_ratingsFactory = $ratingsFactory;
$this->_votesFactory = $votesFactory;
$this->_coreRegistry = $registry;
- parent::__construct($coreData, $context, $data);
+ parent::__construct($context, $coreData, $data);
}
protected function _construct()
diff --git a/app/code/Magento/Adminhtml/Block/Review/Rating/Summary.php b/app/code/Magento/Adminhtml/Block/Review/Rating/Summary.php
index b3d99b87b30a3..9cb9a4fd4713d 100644
--- a/app/code/Magento/Adminhtml/Block/Review/Rating/Summary.php
+++ b/app/code/Magento/Adminhtml/Block/Review/Rating/Summary.php
@@ -50,26 +50,26 @@ class Summary extends \Magento\Adminhtml\Block\Template
*/
protected $_ratingFactory;
- /**
- * @param \Magento\Rating\Model\Resource\Rating\Option\Vote\CollectionFactory $votesFactory
- * @param \Magento\Rating\Model\RatingFactory $ratingFactory
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Backend\Block\Template\Context $context
- * @param \Magento\Core\Model\Registry $registry
- * @param array $data
+ /**
+ * @param \Magento\Backend\Block\Template\Context $context
+ * @param \Magento\Core\Helper\Data $coreData
+ * @param \Magento\Rating\Model\Resource\Rating\Option\Vote\CollectionFactory $votesFactory
+ * @param \Magento\Rating\Model\RatingFactory $ratingFactory
+ * @param \Magento\Core\Model\Registry $registry
+ * @param array $data
*/
- public function __construct(
- \Magento\Rating\Model\Resource\Rating\Option\Vote\CollectionFactory $votesFactory,
- \Magento\Rating\Model\RatingFactory $ratingFactory,
- \Magento\Core\Helper\Data $coreData,
- \Magento\Backend\Block\Template\Context $context,
- \Magento\Core\Model\Registry $registry,
- array $data = array()
- ) {
+ public function __construct(
+ \Magento\Backend\Block\Template\Context $context,
+ \Magento\Core\Helper\Data $coreData,
+ \Magento\Rating\Model\Resource\Rating\Option\Vote\CollectionFactory $votesFactory,
+ \Magento\Rating\Model\RatingFactory $ratingFactory,
+ \Magento\Core\Model\Registry $registry,
+ array $data = array()
+ ) {
$this->_votesFactory = $votesFactory;
$this->_ratingFactory = $ratingFactory;
$this->_coreRegistry = $registry;
- parent::__construct($coreData, $context, $data);
+ parent::__construct($context, $coreData, $data);
}
protected function _construct()
diff --git a/app/code/Magento/Adminhtml/Block/Shipping/Carrier/Tablerate/Grid.php b/app/code/Magento/Adminhtml/Block/Shipping/Carrier/Tablerate/Grid.php
index 01fbb2b0dac0d..6798661931b8f 100644
--- a/app/code/Magento/Adminhtml/Block/Shipping/Carrier/Tablerate/Grid.php
+++ b/app/code/Magento/Adminhtml/Block/Shipping/Carrier/Tablerate/Grid.php
@@ -60,27 +60,25 @@ class Grid extends \Magento\Adminhtml\Block\Widget\Grid
*/
protected $_collectionFactory;
- /**
- * @param \Magento\Shipping\Model\Resource\Carrier\Tablerate\CollectionFactory $collectionFactory
- * @param \Magento\Shipping\Model\Carrier\Tablerate $tablerate
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Backend\Block\Template\Context $context
- * @param \Magento\Core\Model\StoreManagerInterface $storeManager
- * @param \Magento\Core\Model\Url $urlModel
- * @param array $data
+ /**
+ * @param \Magento\Backend\Block\Template\Context $context
+ * @param \Magento\Core\Helper\Data $coreData
+ * @param \Magento\Core\Model\Url $urlModel
+ * @param \Magento\Shipping\Model\Resource\Carrier\Tablerate\CollectionFactory $collectionFactory
+ * @param \Magento\Shipping\Model\Carrier\Tablerate $tablerate
+ * @param array $data
*/
- public function __construct(
- \Magento\Shipping\Model\Resource\Carrier\Tablerate\CollectionFactory $collectionFactory,
- \Magento\Shipping\Model\Carrier\Tablerate $tablerate,
- \Magento\Core\Helper\Data $coreData,
- \Magento\Backend\Block\Template\Context $context,
- \Magento\Core\Model\StoreManagerInterface $storeManager,
- \Magento\Core\Model\Url $urlModel,
- array $data = array()
- ) {
+ public function __construct(
+ \Magento\Backend\Block\Template\Context $context,
+ \Magento\Core\Helper\Data $coreData,
+ \Magento\Core\Model\Url $urlModel,
+ \Magento\Shipping\Model\Resource\Carrier\Tablerate\CollectionFactory $collectionFactory,
+ \Magento\Shipping\Model\Carrier\Tablerate $tablerate,
+ array $data = array()
+ ) {
$this->_collectionFactory = $collectionFactory;
$this->_tablerate = $tablerate;
- parent::__construct($coreData, $context, $storeManager, $urlModel, $data);
+ parent::__construct($context, $coreData, $urlModel, $data);
}
/**
diff --git a/app/code/Magento/Adminhtml/Block/Sitemap/Edit.php b/app/code/Magento/Adminhtml/Block/Sitemap/Edit.php
index 813fb82a0a7d5..c9d7920924779 100644
--- a/app/code/Magento/Adminhtml/Block/Sitemap/Edit.php
+++ b/app/code/Magento/Adminhtml/Block/Sitemap/Edit.php
@@ -42,20 +42,20 @@ class Edit extends \Magento\Adminhtml\Block\Widget\Form\Container
*/
protected $_coreRegistry = null;
- /**
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Backend\Block\Template\Context $context
- * @param \Magento\Core\Model\Registry $registry
- * @param array $data
+ /**
+ * @param \Magento\Backend\Block\Template\Context $context
+ * @param \Magento\Core\Helper\Data $coreData
+ * @param \Magento\Core\Model\Registry $registry
+ * @param array $data
*/
- public function __construct(
- \Magento\Core\Helper\Data $coreData,
- \Magento\Backend\Block\Template\Context $context,
- \Magento\Core\Model\Registry $registry,
- array $data = array()
- ) {
+ public function __construct(
+ \Magento\Backend\Block\Template\Context $context,
+ \Magento\Core\Helper\Data $coreData,
+ \Magento\Core\Model\Registry $registry,
+ array $data = array()
+ ) {
$this->_coreRegistry = $registry;
- parent::__construct($coreData, $context, $data);
+ parent::__construct($context, $coreData, $data);
}
/**
diff --git a/app/code/Magento/Adminhtml/Block/Sitemap/Edit/Form.php b/app/code/Magento/Adminhtml/Block/Sitemap/Edit/Form.php
index 35e38bb6a1ef8..5122754073dbe 100644
--- a/app/code/Magento/Adminhtml/Block/Sitemap/Edit/Form.php
+++ b/app/code/Magento/Adminhtml/Block/Sitemap/Edit/Form.php
@@ -40,24 +40,24 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
*/
protected $_systemStore;
- /**
- * @param \Magento\Core\Model\System\Store $systemStore
- * @param \Magento\Core\Model\Registry $registry
- * @param \Magento\Data\FormFactory $formFactory
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Backend\Block\Template\Context $context
- * @param array $data
+ /**
+ * @param \Magento\Backend\Block\Template\Context $context
+ * @param \Magento\Core\Helper\Data $coreData
+ * @param \Magento\Core\Model\Registry $registry
+ * @param \Magento\Data\FormFactory $formFactory
+ * @param \Magento\Core\Model\System\Store $systemStore
+ * @param array $data
*/
- public function __construct(
- \Magento\Core\Model\System\Store $systemStore,
- \Magento\Core\Model\Registry $registry,
- \Magento\Data\FormFactory $formFactory,
- \Magento\Core\Helper\Data $coreData,
- \Magento\Backend\Block\Template\Context $context,
- array $data = array()
- ) {
+ public function __construct(
+ \Magento\Backend\Block\Template\Context $context,
+ \Magento\Core\Helper\Data $coreData,
+ \Magento\Core\Model\Registry $registry,
+ \Magento\Data\FormFactory $formFactory,
+ \Magento\Core\Model\System\Store $systemStore,
+ array $data = array()
+ ) {
$this->_systemStore = $systemStore;
- parent::__construct($registry, $formFactory, $coreData, $context, $data);
+ parent::__construct($context, $coreData, $registry, $formFactory, $data);
}
/**
diff --git a/app/code/Magento/Adminhtml/Block/Sitemap/Grid/Renderer/Link.php b/app/code/Magento/Adminhtml/Block/Sitemap/Grid/Renderer/Link.php
index 4637739196f5a..3baf481abd691 100644
--- a/app/code/Magento/Adminhtml/Block/Sitemap/Grid/Renderer/Link.php
+++ b/app/code/Magento/Adminhtml/Block/Sitemap/Grid/Renderer/Link.php
@@ -44,18 +44,18 @@ class Link extends \Magento\Adminhtml\Block\Widget\Grid\Column\Renderer\Abstract
*/
protected $_sitemapFactory;
- /**
- * @param \Magento\Sitemap\Model\SitemapFactory $sitemapFactory
- * @param \Magento\Backend\Block\Context $context
- * @param \Magento\Filesystem $filesystem
- * @param array $data
+ /**
+ * @param \Magento\Backend\Block\Context $context
+ * @param \Magento\Sitemap\Model\SitemapFactory $sitemapFactory
+ * @param \Magento\Filesystem $filesystem
+ * @param array $data
*/
- public function __construct(
- \Magento\Sitemap\Model\SitemapFactory $sitemapFactory,
- \Magento\Backend\Block\Context $context,
- \Magento\Filesystem $filesystem,
- array $data = array()
- ) {
+ public function __construct(
+ \Magento\Backend\Block\Context $context,
+ \Magento\Sitemap\Model\SitemapFactory $sitemapFactory,
+ \Magento\Filesystem $filesystem,
+ array $data = array()
+ ) {
$this->_sitemapFactory = $sitemapFactory;
$this->_filesystem = $filesystem;
parent::__construct($context, $data);
diff --git a/app/code/Magento/Adminhtml/Block/Sitemap/Grid/Renderer/Time.php b/app/code/Magento/Adminhtml/Block/Sitemap/Grid/Renderer/Time.php
index b66d948eed256..414d0bc23c795 100644
--- a/app/code/Magento/Adminhtml/Block/Sitemap/Grid/Renderer/Time.php
+++ b/app/code/Magento/Adminhtml/Block/Sitemap/Grid/Renderer/Time.php
@@ -39,16 +39,16 @@ class Time extends \Magento\Adminhtml\Block\Widget\Grid\Column\Renderer\Abstract
*/
protected $_date;
- /**
- * @param \Magento\Core\Model\Date $date
- * @param \Magento\Backend\Block\Context $context
- * @param array $data
+ /**
+ * @param \Magento\Backend\Block\Context $context
+ * @param \Magento\Core\Model\Date $date
+ * @param array $data
*/
- public function __construct(
- \Magento\Core\Model\Date $date,
- \Magento\Backend\Block\Context $context,
- array $data = array()
- ) {
+ public function __construct(
+ \Magento\Backend\Block\Context $context,
+ \Magento\Core\Model\Date $date,
+ array $data = array()
+ ) {
$this->_date = $date;
parent::__construct($context, $data);
}
diff --git a/app/code/Magento/Adminhtml/Block/Text/ListText.php b/app/code/Magento/Adminhtml/Block/Text/ListText.php
index 5ae98bdcfe0a4..151cd4997b377 100644
--- a/app/code/Magento/Adminhtml/Block/Text/ListText.php
+++ b/app/code/Magento/Adminhtml/Block/Text/ListText.php
@@ -34,6 +34,6 @@
*/
namespace Magento\Adminhtml\Block\Text;
-class ListText extends \Magento\Core\Block\Text\ListText
+class ListText extends \Magento\View\Block\Text\ListText
{
}
diff --git a/app/code/Magento/Adminhtml/Block/Urlrewrite.php b/app/code/Magento/Adminhtml/Block/Urlrewrite.php
index 12c52c2fa0d6e..cc6745ab12946 100644
--- a/app/code/Magento/Adminhtml/Block/Urlrewrite.php
+++ b/app/code/Magento/Adminhtml/Block/Urlrewrite.php
@@ -50,20 +50,20 @@ class Urlrewrite extends \Magento\Adminhtml\Block\Widget\Grid\Container
*/
protected $_urlrewriteSelector;
- /**
- * @param \Magento\Adminhtml\Block\Urlrewrite\Selector $urlrewriteSelector
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Backend\Block\Template\Context $context
- * @param array $data
+ /**
+ * @param \Magento\Backend\Block\Template\Context $context
+ * @param \Magento\Core\Helper\Data $coreData
+ * @param \Magento\Adminhtml\Block\Urlrewrite\Selector $urlrewriteSelector
+ * @param array $data
*/
- public function __construct(
- \Magento\Adminhtml\Block\Urlrewrite\Selector $urlrewriteSelector,
- \Magento\Core\Helper\Data $coreData,
- \Magento\Backend\Block\Template\Context $context,
- array $data = array()
- ) {
+ public function __construct(
+ \Magento\Backend\Block\Template\Context $context,
+ \Magento\Core\Helper\Data $coreData,
+ \Magento\Adminhtml\Block\Urlrewrite\Selector $urlrewriteSelector,
+ array $data = array()
+ ) {
$this->_urlrewriteSelector = $urlrewriteSelector;
- parent::__construct($coreData, $context, $data);
+ parent::__construct($context, $coreData, $data);
}
/**
diff --git a/app/code/Magento/Adminhtml/Block/Urlrewrite/Catalog/Category/Edit.php b/app/code/Magento/Adminhtml/Block/Urlrewrite/Catalog/Category/Edit.php
index eb63830d34ae5..5d36e90c52d30 100644
--- a/app/code/Magento/Adminhtml/Block/Urlrewrite/Catalog/Category/Edit.php
+++ b/app/code/Magento/Adminhtml/Block/Urlrewrite/Catalog/Category/Edit.php
@@ -45,24 +45,24 @@ class Edit
*/
protected $_categoryFactory;
- /**
- * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory
- * @param \Magento\Core\Model\Url\RewriteFactory $rewriteFactory
- * @param \Magento\Backend\Helper\Data $adminhtmlData
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Backend\Block\Template\Context $context
- * @param array $data
+ /**
+ * @param \Magento\Backend\Block\Template\Context $context
+ * @param \Magento\Core\Helper\Data $coreData
+ * @param \Magento\Core\Model\Url\RewriteFactory $rewriteFactory
+ * @param \Magento\Backend\Helper\Data $adminhtmlData
+ * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory
+ * @param array $data
*/
- public function __construct(
- \Magento\Catalog\Model\CategoryFactory $categoryFactory,
- \Magento\Core\Model\Url\RewriteFactory $rewriteFactory,
- \Magento\Backend\Helper\Data $adminhtmlData,
- \Magento\Core\Helper\Data $coreData,
- \Magento\Backend\Block\Template\Context $context,
- array $data = array()
- ) {
+ public function __construct(
+ \Magento\Backend\Block\Template\Context $context,
+ \Magento\Core\Helper\Data $coreData,
+ \Magento\Core\Model\Url\RewriteFactory $rewriteFactory,
+ \Magento\Backend\Helper\Data $adminhtmlData,
+ \Magento\Catalog\Model\CategoryFactory $categoryFactory,
+ array $data = array()
+ ) {
$this->_categoryFactory = $categoryFactory;
- parent::__construct($rewriteFactory, $adminhtmlData, $coreData, $context, $data);
+ parent::__construct($context, $coreData, $rewriteFactory, $adminhtmlData, $data);
}
/**
diff --git a/app/code/Magento/Adminhtml/Block/Urlrewrite/Catalog/Category/Tree.php b/app/code/Magento/Adminhtml/Block/Urlrewrite/Catalog/Category/Tree.php
index 112b806b4f929..385ae7a4063d5 100644
--- a/app/code/Magento/Adminhtml/Block/Urlrewrite/Catalog/Category/Tree.php
+++ b/app/code/Magento/Adminhtml/Block/Urlrewrite/Catalog/Category/Tree.php
@@ -61,30 +61,30 @@ class Tree extends \Magento\Catalog\Block\Adminhtml\Category\AbstractCategory
*/
protected $_productFactory;
- /**
- * @param \Magento\Catalog\Model\ProductFactory $productFactory
- * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory
- * @param \Magento\Backend\Helper\Data $adminhtmlData
- * @param \Magento\Catalog\Model\Resource\Category\Tree $categoryTree
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Backend\Block\Template\Context $context
- * @param \Magento\Core\Model\Registry $registry
- * @param array $data
+ /**
+ * @param \Magento\Backend\Block\Template\Context $context
+ * @param \Magento\Core\Helper\Data $coreData
+ * @param \Magento\Catalog\Model\Resource\Category\Tree $categoryTree
+ * @param \Magento\Core\Model\Registry $registry
+ * @param \Magento\Catalog\Model\ProductFactory $productFactory
+ * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory
+ * @param \Magento\Backend\Helper\Data $adminhtmlData
+ * @param array $data
*/
- public function __construct(
- \Magento\Catalog\Model\ProductFactory $productFactory,
- \Magento\Catalog\Model\CategoryFactory $categoryFactory,
- \Magento\Backend\Helper\Data $adminhtmlData,
- \Magento\Catalog\Model\Resource\Category\Tree $categoryTree,
- \Magento\Core\Helper\Data $coreData,
- \Magento\Backend\Block\Template\Context $context,
- \Magento\Core\Model\Registry $registry,
- array $data = array()
- ) {
+ public function __construct(
+ \Magento\Backend\Block\Template\Context $context,
+ \Magento\Core\Helper\Data $coreData,
+ \Magento\Catalog\Model\Resource\Category\Tree $categoryTree,
+ \Magento\Core\Model\Registry $registry,
+ \Magento\Catalog\Model\ProductFactory $productFactory,
+ \Magento\Catalog\Model\CategoryFactory $categoryFactory,
+ \Magento\Backend\Helper\Data $adminhtmlData,
+ array $data = array()
+ ) {
$this->_categoryFactory = $categoryFactory;
$this->_productFactory = $productFactory;
$this->_adminhtmlData = $adminhtmlData;
- parent::__construct($categoryTree, $coreData, $context, $registry, $data);
+ parent::__construct($context, $coreData, $categoryTree, $registry, $data);
}
/**
diff --git a/app/code/Magento/Adminhtml/Block/Urlrewrite/Catalog/Edit/Form.php b/app/code/Magento/Adminhtml/Block/Urlrewrite/Catalog/Edit/Form.php
index 87e2bbf6f94ba..bfa806ad3afb2 100644
--- a/app/code/Magento/Adminhtml/Block/Urlrewrite/Catalog/Edit/Form.php
+++ b/app/code/Magento/Adminhtml/Block/Urlrewrite/Catalog/Edit/Form.php
@@ -61,45 +61,51 @@ class Form extends \Magento\Adminhtml\Block\Urlrewrite\Edit\Form
protected $_categoryFactory;
/**
- * @param \Magento\Catalog\Model\ProductFactory $productFactory
- * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory
- * @param \Magento\Catalog\Model\Url $catalogUrl
+ * @param \Magento\Backend\Block\Template\Context $context
+ * @param \Magento\Core\Helper\Data $coreData
+ * @param \Magento\Core\Model\Registry $registry
+ * @param \Magento\Data\FormFactory $formFactory
* @param \Magento\Core\Model\Source\Urlrewrite\TypesFactory $typesFactory
* @param \Magento\Core\Model\Source\Urlrewrite\OptionsFactory $optionFactory
* @param \Magento\Core\Model\Url\RewriteFactory $rewriteFactory
* @param \Magento\Core\Model\System\Store $systemStore
- * @param \Magento\Backend\Model\Session $backendSession
* @param \Magento\Backend\Helper\Data $adminhtmlData
- * @param \Magento\Core\Model\Registry $registry
- * @param \Magento\Data\FormFactory $formFactory
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Backend\Block\Template\Context $context
+ * @param \Magento\Catalog\Model\ProductFactory $productFactory
+ * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory
+ * @param \Magento\Catalog\Model\Url $catalogUrl
* @param array $data
*
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
*/
public function __construct(
- \Magento\Catalog\Model\ProductFactory $productFactory,
- \Magento\Catalog\Model\CategoryFactory $categoryFactory,
- \Magento\Catalog\Model\Url $catalogUrl,
+ \Magento\Backend\Block\Template\Context $context,
+ \Magento\Core\Helper\Data $coreData,
+ \Magento\Core\Model\Registry $registry,
+ \Magento\Data\FormFactory $formFactory,
\Magento\Core\Model\Source\Urlrewrite\TypesFactory $typesFactory,
\Magento\Core\Model\Source\Urlrewrite\OptionsFactory $optionFactory,
\Magento\Core\Model\Url\RewriteFactory $rewriteFactory,
\Magento\Core\Model\System\Store $systemStore,
- \Magento\Backend\Model\Session $backendSession,
\Magento\Backend\Helper\Data $adminhtmlData,
- \Magento\Core\Model\Registry $registry,
- \Magento\Data\FormFactory $formFactory,
- \Magento\Core\Helper\Data $coreData,
- \Magento\Backend\Block\Template\Context $context,
+ \Magento\Catalog\Model\ProductFactory $productFactory,
+ \Magento\Catalog\Model\CategoryFactory $categoryFactory,
+ \Magento\Catalog\Model\Url $catalogUrl,
array $data = array()
) {
$this->_productFactory = $productFactory;
$this->_categoryFactory = $categoryFactory;
$this->_catalogUrl = $catalogUrl;
parent::__construct(
- $typesFactory, $optionFactory, $rewriteFactory, $systemStore, $backendSession, $adminhtmlData, $registry,
- $formFactory, $coreData, $context, $data
+ $context,
+ $coreData,
+ $registry,
+ $formFactory,
+ $typesFactory,
+ $optionFactory,
+ $rewriteFactory,
+ $systemStore,
+ $adminhtmlData,
+ $data
);
}
diff --git a/app/code/Magento/Adminhtml/Block/Urlrewrite/Catalog/Product/Edit.php b/app/code/Magento/Adminhtml/Block/Urlrewrite/Catalog/Product/Edit.php
index 96799d5401edd..da37c7a96d35b 100644
--- a/app/code/Magento/Adminhtml/Block/Urlrewrite/Catalog/Product/Edit.php
+++ b/app/code/Magento/Adminhtml/Block/Urlrewrite/Catalog/Product/Edit.php
@@ -52,27 +52,27 @@ class Edit extends \Magento\Adminhtml\Block\Urlrewrite\Edit
*/
protected $_categoryFactory;
- /**
- * @param \Magento\Catalog\Model\ProductFactory $productFactory
- * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory
- * @param \Magento\Core\Model\Url\RewriteFactory $rewriteFactory
- * @param \Magento\Backend\Helper\Data $adminhtmlData
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Backend\Block\Template\Context $context
- * @param array $data
+ /**
+ * @param \Magento\Backend\Block\Template\Context $context
+ * @param \Magento\Core\Helper\Data $coreData
+ * @param \Magento\Core\Model\Url\RewriteFactory $rewriteFactory
+ * @param \Magento\Backend\Helper\Data $adminhtmlData
+ * @param \Magento\Catalog\Model\ProductFactory $productFactory
+ * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory
+ * @param array $data
*/
- public function __construct(
- \Magento\Catalog\Model\ProductFactory $productFactory,
- \Magento\Catalog\Model\CategoryFactory $categoryFactory,
- \Magento\Core\Model\Url\RewriteFactory $rewriteFactory,
- \Magento\Backend\Helper\Data $adminhtmlData,
- \Magento\Core\Helper\Data $coreData,
- \Magento\Backend\Block\Template\Context $context,
- array $data = array()
- ) {
+ public function __construct(
+ \Magento\Backend\Block\Template\Context $context,
+ \Magento\Core\Helper\Data $coreData,
+ \Magento\Core\Model\Url\RewriteFactory $rewriteFactory,
+ \Magento\Backend\Helper\Data $adminhtmlData,
+ \Magento\Catalog\Model\ProductFactory $productFactory,
+ \Magento\Catalog\Model\CategoryFactory $categoryFactory,
+ array $data = array()
+ ) {
$this->_categoryFactory = $categoryFactory;
$this->_productFactory = $productFactory;
- parent::__construct($rewriteFactory, $adminhtmlData, $coreData, $context, $data);
+ parent::__construct($context, $coreData, $rewriteFactory, $adminhtmlData, $data);
}
/**
diff --git a/app/code/Magento/Adminhtml/Block/Urlrewrite/Cms/Page/Edit.php b/app/code/Magento/Adminhtml/Block/Urlrewrite/Cms/Page/Edit.php
index 21b28ec5647ce..be91545f67ac0 100644
--- a/app/code/Magento/Adminhtml/Block/Urlrewrite/Cms/Page/Edit.php
+++ b/app/code/Magento/Adminhtml/Block/Urlrewrite/Cms/Page/Edit.php
@@ -43,24 +43,24 @@ class Edit extends \Magento\Adminhtml\Block\Urlrewrite\Edit
*/
protected $_pageFactory;
- /**
- * @param \Magento\Cms\Model\PageFactory $pageFactory
- * @param \Magento\Core\Model\Url\RewriteFactory $rewriteFactory
- * @param \Magento\Backend\Helper\Data $adminhtmlData
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Backend\Block\Template\Context $context
- * @param array $data
+ /**
+ * @param \Magento\Backend\Block\Template\Context $context
+ * @param \Magento\Core\Helper\Data $coreData
+ * @param \Magento\Core\Model\Url\RewriteFactory $rewriteFactory
+ * @param \Magento\Backend\Helper\Data $adminhtmlData
+ * @param \Magento\Cms\Model\PageFactory $pageFactory
+ * @param array $data
*/
- public function __construct(
- \Magento\Cms\Model\PageFactory $pageFactory,
- \Magento\Core\Model\Url\RewriteFactory $rewriteFactory,
- \Magento\Backend\Helper\Data $adminhtmlData,
- \Magento\Core\Helper\Data $coreData,
- \Magento\Backend\Block\Template\Context $context,
- array $data = array()
- ) {
+ public function __construct(
+ \Magento\Backend\Block\Template\Context $context,
+ \Magento\Core\Helper\Data $coreData,
+ \Magento\Core\Model\Url\RewriteFactory $rewriteFactory,
+ \Magento\Backend\Helper\Data $adminhtmlData,
+ \Magento\Cms\Model\PageFactory $pageFactory,
+ array $data = array()
+ ) {
$this->_pageFactory = $pageFactory;
- parent::__construct($rewriteFactory, $adminhtmlData, $coreData, $context, $data);
+ parent::__construct($context, $coreData, $rewriteFactory, $adminhtmlData, $data);
}
/**
diff --git a/app/code/Magento/Adminhtml/Block/Urlrewrite/Cms/Page/Edit/Form.php b/app/code/Magento/Adminhtml/Block/Urlrewrite/Cms/Page/Edit/Form.php
index f7a1a53addb90..b066a10057747 100644
--- a/app/code/Magento/Adminhtml/Block/Urlrewrite/Cms/Page/Edit/Form.php
+++ b/app/code/Magento/Adminhtml/Block/Urlrewrite/Cms/Page/Edit/Form.php
@@ -54,42 +54,48 @@ class Form extends \Magento\Adminhtml\Block\Urlrewrite\Edit\Form
protected $_urlRewriteFactory;
/**
- * @param \Magento\Cms\Model\Page\UrlrewriteFactory $urlRewriteFactory
- * @param \Magento\Cms\Model\PageFactory $pageFactory
+ * @param \Magento\Backend\Block\Template\Context $context
+ * @param \Magento\Core\Helper\Data $coreData
+ * @param \Magento\Core\Model\Registry $registry
+ * @param \Magento\Data\FormFactory $formFactory
* @param \Magento\Core\Model\Source\Urlrewrite\TypesFactory $typesFactory
* @param \Magento\Core\Model\Source\Urlrewrite\OptionsFactory $optionFactory
* @param \Magento\Core\Model\Url\RewriteFactory $rewriteFactory
* @param \Magento\Core\Model\System\Store $systemStore
- * @param \Magento\Backend\Model\Session $backendSession
* @param \Magento\Backend\Helper\Data $adminhtmlData
- * @param \Magento\Core\Model\Registry $registry
- * @param \Magento\Data\FormFactory $formFactory
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Backend\Block\Template\Context $context
+ * @param \Magento\Cms\Model\Page\UrlrewriteFactory $urlRewriteFactory
+ * @param \Magento\Cms\Model\PageFactory $pageFactory
* @param array $data
*
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
*/
public function __construct(
- \Magento\Cms\Model\Page\UrlrewriteFactory $urlRewriteFactory,
- \Magento\Cms\Model\PageFactory $pageFactory,
+ \Magento\Backend\Block\Template\Context $context,
+ \Magento\Core\Helper\Data $coreData,
+ \Magento\Core\Model\Registry $registry,
+ \Magento\Data\FormFactory $formFactory,
\Magento\Core\Model\Source\Urlrewrite\TypesFactory $typesFactory,
\Magento\Core\Model\Source\Urlrewrite\OptionsFactory $optionFactory,
\Magento\Core\Model\Url\RewriteFactory $rewriteFactory,
\Magento\Core\Model\System\Store $systemStore,
- \Magento\Backend\Model\Session $backendSession,
\Magento\Backend\Helper\Data $adminhtmlData,
- \Magento\Core\Model\Registry $registry,
- \Magento\Data\FormFactory $formFactory,
- \Magento\Core\Helper\Data $coreData,
- \Magento\Backend\Block\Template\Context $context,
+ \Magento\Cms\Model\Page\UrlrewriteFactory $urlRewriteFactory,
+ \Magento\Cms\Model\PageFactory $pageFactory,
array $data = array()
) {
$this->_urlRewriteFactory = $urlRewriteFactory;
$this->_pageFactory = $pageFactory;
parent::__construct(
- $typesFactory, $optionFactory, $rewriteFactory, $systemStore, $backendSession, $adminhtmlData, $registry,
- $formFactory, $coreData, $context, $data
+ $context,
+ $coreData,
+ $registry,
+ $formFactory,
+ $typesFactory,
+ $optionFactory,
+ $rewriteFactory,
+ $systemStore,
+ $adminhtmlData,
+ $data
);
}
diff --git a/app/code/Magento/Adminhtml/Block/Urlrewrite/Edit.php b/app/code/Magento/Adminhtml/Block/Urlrewrite/Edit.php
index 9027b3d0fc0fe..62f85dd7de96d 100644
--- a/app/code/Magento/Adminhtml/Block/Urlrewrite/Edit.php
+++ b/app/code/Magento/Adminhtml/Block/Urlrewrite/Edit.php
@@ -69,23 +69,23 @@ class Edit extends \Magento\Adminhtml\Block\Widget\Container
*/
protected $_rewriteFactory;
- /**
- * @param \Magento\Core\Model\Url\RewriteFactory $rewriteFactory
- * @param \Magento\Backend\Helper\Data $adminhtmlData
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Backend\Block\Template\Context $context
- * @param array $data
+ /**
+ * @param \Magento\Backend\Block\Template\Context $context
+ * @param \Magento\Core\Helper\Data $coreData
+ * @param \Magento\Core\Model\Url\RewriteFactory $rewriteFactory
+ * @param \Magento\Backend\Helper\Data $adminhtmlData
+ * @param array $data
*/
- public function __construct(
- \Magento\Core\Model\Url\RewriteFactory $rewriteFactory,
- \Magento\Backend\Helper\Data $adminhtmlData,
- \Magento\Core\Helper\Data $coreData,
- \Magento\Backend\Block\Template\Context $context,
- array $data = array()
- ) {
+ public function __construct(
+ \Magento\Backend\Block\Template\Context $context,
+ \Magento\Core\Helper\Data $coreData,
+ \Magento\Core\Model\Url\RewriteFactory $rewriteFactory,
+ \Magento\Backend\Helper\Data $adminhtmlData,
+ array $data = array()
+ ) {
$this->_rewriteFactory = $rewriteFactory;
$this->_adminhtmlData = $adminhtmlData;
- parent::__construct($coreData, $context, $data);
+ parent::__construct($context, $coreData, $data);
}
/**
diff --git a/app/code/Magento/Adminhtml/Block/Urlrewrite/Edit/Form.php b/app/code/Magento/Adminhtml/Block/Urlrewrite/Edit/Form.php
index 7c2b06f3fe90c..640a40be19d16 100644
--- a/app/code/Magento/Adminhtml/Block/Urlrewrite/Edit/Form.php
+++ b/app/code/Magento/Adminhtml/Block/Urlrewrite/Edit/Form.php
@@ -69,11 +69,6 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
*/
protected $_adminhtmlData = null;
- /**
- * @var \Magento\Backend\Model\Session
- */
- protected $_backendSession;
-
/**
* @var \Magento\Core\Model\System\Store
*/
@@ -95,40 +90,37 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
protected $_typesFactory;
/**
+ * @param \Magento\Backend\Block\Template\Context $context
+ * @param \Magento\Core\Helper\Data $coreData
+ * @param \Magento\Core\Model\Registry $registry
+ * @param \Magento\Data\FormFactory $formFactory
* @param \Magento\Core\Model\Source\Urlrewrite\TypesFactory $typesFactory
* @param \Magento\Core\Model\Source\Urlrewrite\OptionsFactory $optionFactory
* @param \Magento\Core\Model\Url\RewriteFactory $rewriteFactory
* @param \Magento\Core\Model\System\Store $systemStore
- * @param \Magento\Backend\Model\Session $backendSession
* @param \Magento\Backend\Helper\Data $adminhtmlData
- * @param \Magento\Core\Model\Registry $registry
- * @param \Magento\Data\FormFactory $formFactory
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Backend\Block\Template\Context $context
* @param array $data
*
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
*/
public function __construct(
+ \Magento\Backend\Block\Template\Context $context,
+ \Magento\Core\Helper\Data $coreData,
+ \Magento\Core\Model\Registry $registry,
+ \Magento\Data\FormFactory $formFactory,
\Magento\Core\Model\Source\Urlrewrite\TypesFactory $typesFactory,
\Magento\Core\Model\Source\Urlrewrite\OptionsFactory $optionFactory,
\Magento\Core\Model\Url\RewriteFactory $rewriteFactory,
\Magento\Core\Model\System\Store $systemStore,
- \Magento\Backend\Model\Session $backendSession,
\Magento\Backend\Helper\Data $adminhtmlData,
- \Magento\Core\Model\Registry $registry,
- \Magento\Data\FormFactory $formFactory,
- \Magento\Core\Helper\Data $coreData,
- \Magento\Backend\Block\Template\Context $context,
array $data = array()
) {
$this->_typesFactory = $typesFactory;
$this->_optionFactory = $optionFactory;
$this->_rewriteFactory = $rewriteFactory;
$this->_systemStore = $systemStore;
- $this->_backendSession = $backendSession;
$this->_adminhtmlData = $adminhtmlData;
- parent::__construct($registry, $formFactory, $coreData, $context, $data);
+ parent::__construct($context, $coreData, $registry, $formFactory, $data);
}
/**
diff --git a/app/code/Magento/Adminhtml/Block/Urlrewrite/Link.php b/app/code/Magento/Adminhtml/Block/Urlrewrite/Link.php
index 588f3dd61fd4b..b9e48dc84ac3e 100644
--- a/app/code/Magento/Adminhtml/Block/Urlrewrite/Link.php
+++ b/app/code/Magento/Adminhtml/Block/Urlrewrite/Link.php
@@ -37,7 +37,7 @@
*/
namespace Magento\Adminhtml\Block\Urlrewrite;
-class Link extends \Magento\Core\Block\AbstractBlock
+class Link extends \Magento\View\Block\AbstractBlock
{
/**
* Render output
diff --git a/app/code/Magento/Adminhtml/Block/Urlrewrite/Selector.php b/app/code/Magento/Adminhtml/Block/Urlrewrite/Selector.php
index 26cdac523bb3d..f9c3d2557674b 100644
--- a/app/code/Magento/Adminhtml/Block/Urlrewrite/Selector.php
+++ b/app/code/Magento/Adminhtml/Block/Urlrewrite/Selector.php
@@ -33,7 +33,7 @@
*/
namespace Magento\Adminhtml\Block\Urlrewrite;
-class Selector extends \Magento\Core\Block\Template
+class Selector extends \Magento\View\Block\Template
{
/**
* List of available modes from source model
diff --git a/app/code/Magento/Adminhtml/Controller/Newsletter/Problem.php b/app/code/Magento/Adminhtml/Controller/Newsletter/Problem.php
index 149d34db364f1..e8a921042102c 100644
--- a/app/code/Magento/Adminhtml/Controller/Newsletter/Problem.php
+++ b/app/code/Magento/Adminhtml/Controller/Newsletter/Problem.php
@@ -33,27 +33,27 @@
*/
namespace Magento\Adminhtml\Controller\Newsletter;
-class Problem extends \Magento\Backend\Controller\Adminhtml\Action
+class Problem extends \Magento\Backend\App\Action
{
public function indexAction()
{
- $this->_title(__('Newsletter Problems Report'));
+ $this->_title->add(__('Newsletter Problems Report'));
if ($this->getRequest()->getQuery('ajax')) {
$this->_forward('grid');
return;
}
- $this->getLayout()->getMessagesBlock()->setMessages(
+ $this->_view->getLayout()->getMessagesBlock()->setMessages(
$this->_objectManager->get('Magento\Adminhtml\Model\Session')->getMessages(true)
);
- $this->loadLayout();
+ $this->_view->loadLayout();
$this->_setActiveMenu('Magento_Newsletter::newsletter_problem');
$this->_addBreadcrumb(__('Newsletter Problem Reports'), __('Newsletter Problem Reports'));
- $this->renderLayout();
+ $this->_view->renderLayout();
}
public function gridAction()
@@ -89,10 +89,10 @@ public function gridAction()
$this->_objectManager->get('Magento\Adminhtml\Model\Session')
->addSuccess(__('The problems you identified have been deleted.'));
}
- $this->getLayout()->getMessagesBlock()->setMessages($this->_objectManager->get('Magento\Adminhtml\Model\Session')->getMessages(true));
+ $this->_view->getLayout()->getMessagesBlock()->setMessages($this->_objectManager->get('Magento\Adminhtml\Model\Session')->getMessages(true));
- $this->loadLayout(false);
- $this->renderLayout();
+ $this->_view->loadLayout(false);
+ $this->_view->renderLayout();
}
protected function _isAllowed()
diff --git a/app/code/Magento/Adminhtml/Controller/Newsletter/Queue.php b/app/code/Magento/Adminhtml/Controller/Newsletter/Queue.php
index 295f7f47b4f05..440e022e2ca8f 100644
--- a/app/code/Magento/Adminhtml/Controller/Newsletter/Queue.php
+++ b/app/code/Magento/Adminhtml/Controller/Newsletter/Queue.php
@@ -33,7 +33,7 @@
*/
namespace Magento\Adminhtml\Controller\Newsletter;
-class Queue extends \Magento\Backend\Controller\Adminhtml\Action
+class Queue extends \Magento\Backend\App\Action
{
/**
* Core registry
@@ -43,11 +43,11 @@ class Queue extends \Magento\Backend\Controller\Adminhtml\Action
protected $_coreRegistry = null;
/**
- * @param \Magento\Backend\Controller\Context $context
+ * @param \Magento\Backend\App\Action\Context $context
* @param \Magento\Core\Model\Registry $coreRegistry
*/
public function __construct(
- \Magento\Backend\Controller\Context $context,
+ \Magento\Backend\App\Action\Context $context,
\Magento\Core\Model\Registry $coreRegistry
) {
$this->_coreRegistry = $coreRegistry;
@@ -59,20 +59,20 @@ public function __construct(
*/
public function indexAction()
{
- $this->_title(__('Newsletter Queue'));
+ $this->_title->add(__('Newsletter Queue'));
if ($this->getRequest()->getQuery('ajax')) {
$this->_forward('grid');
return;
}
- $this->loadLayout();
+ $this->_view->loadLayout();
$this->_setActiveMenu('Magento_Newsletter::newsletter_queue');
$this->_addBreadcrumb(__('Newsletter Queue'), __('Newsletter Queue'));
- $this->renderLayout();
+ $this->_view->renderLayout();
}
@@ -81,8 +81,8 @@ public function indexAction()
*/
public function dropAction()
{
- $this->loadLayout('newsletter_queue_preview');
- $this->renderLayout();
+ $this->_view->loadLayout('newsletter_queue_preview');
+ $this->_view->renderLayout();
}
/**
@@ -90,10 +90,10 @@ public function dropAction()
*/
public function previewAction()
{
- $this->loadLayout();
+ $this->_view->loadLayout();
$data = $this->getRequest()->getParams();
if (empty($data) || !isset($data['id'])) {
- $this->_forward('noRoute');
+ $this->_forward('noroute');
return $this;
}
@@ -101,8 +101,8 @@ public function previewAction()
$data['preview_store_id'] = $this->_objectManager->get('Magento\Core\Model\StoreManager')
->getDefaultStoreView()->getId();
- $this->getLayout()->getBlock('preview_form')->setFormData($data);
- $this->renderLayout();
+ $this->_view->getLayout()->getBlock('preview_form')->setFormData($data);
+ $this->_view->renderLayout();
}
/**
@@ -110,8 +110,8 @@ public function previewAction()
*/
public function gridAction()
{
- $this->loadLayout(false);
- $this->renderLayout();
+ $this->_view->loadLayout(false);
+ $this->_view->renderLayout();
}
public function startAction()
@@ -202,7 +202,7 @@ public function sendingAction()
public function editAction()
{
- $this->_title(__('Newsletter Queue'));
+ $this->_title->add(__('Newsletter Queue'));
$this->_coreRegistry->register('current_queue', $this->_objectManager->get('Magento\Newsletter\Model\Queue'));
@@ -216,9 +216,9 @@ public function editAction()
$queue = $this->_coreRegistry->registry('current_queue')->setTemplateId($template->getId());
}
- $this->_title(__('Edit Queue'));
+ $this->_title->add(__('Edit Queue'));
- $this->loadLayout();
+ $this->_view->loadLayout();
$this->_setActiveMenu('Magento_Newsletter::newsletter_queue');
@@ -229,7 +229,7 @@ public function editAction()
);
$this->_addBreadcrumb(__('Edit Queue'), __('Edit Queue'));
- $this->renderLayout();
+ $this->_view->renderLayout();
}
public function saveAction()
@@ -289,7 +289,7 @@ public function saveAction()
if ($id) {
$this->_redirect('adminhtml/*/edit', array('id' => $id));
} else {
- $this->_redirectReferer();
+ $this->getResponse()->setRedirect($this->_redirect->getRedirectUrl($this->getUrl('*')));
}
}
}
diff --git a/app/code/Magento/Adminhtml/Controller/Newsletter/Subscriber.php b/app/code/Magento/Adminhtml/Controller/Newsletter/Subscriber.php
index a768e0bad6913..a91f652f1266f 100644
--- a/app/code/Magento/Adminhtml/Controller/Newsletter/Subscriber.php
+++ b/app/code/Magento/Adminhtml/Controller/Newsletter/Subscriber.php
@@ -33,32 +33,48 @@
*/
namespace Magento\Adminhtml\Controller\Newsletter;
-class Subscriber extends \Magento\Backend\Controller\Adminhtml\Action
+class Subscriber extends \Magento\Backend\App\Action
{
+ /**
+ * @var \Magento\App\Response\Http\FileFactory
+ */
+ protected $_fileFactory;
+
+ /**
+ * @param \Magento\Backend\App\Action\Context $context
+ * @param \Magento\App\Response\Http\FileFactory $fileFactory
+ */
+ public function __construct(
+ \Magento\Backend\App\Action\Context $context,
+ \Magento\App\Response\Http\FileFactory $fileFactory
+ ) {
+ $this->_fileFactory = $fileFactory;
+ parent::__construct($context);
+ }
public function indexAction()
{
- $this->_title(__('Newsletter Subscribers'));
+ $this->_title->add(__('Newsletter Subscribers'));
if ($this->getRequest()->getParam('ajax')) {
$this->_forward('grid');
return;
}
- $this->loadLayout();
+ $this->_view->loadLayout();
$this->_setActiveMenu('Magento_Newsletter::newsletter_subscriber');
$this->_addBreadcrumb(__('Newsletter'), __('Newsletter'));
$this->_addBreadcrumb(__('Subscribers'), __('Subscribers'));
- $this->renderLayout();
+ $this->_view->renderLayout();
}
public function gridAction()
{
- $this->loadLayout(false);
- $this->renderLayout();
+ $this->_view->loadLayout(false);
+ $this->_view->renderLayout();
}
/**
@@ -66,11 +82,11 @@ public function gridAction()
*/
public function exportCsvAction()
{
- $this->loadLayout();
+ $this->_view->loadLayout();
$fileName = 'subscribers.csv';
- $content = $this->getLayout()->getChildBlock('adminhtml.newslettrer.subscriber.grid', 'grid.export');
+ $content = $this->_view->getLayout()->getChildBlock('adminhtml.newslettrer.subscriber.grid', 'grid.export');
- $this->_prepareDownloadResponse($fileName, $content->getCsvFile($fileName));
+ return $this->_fileFactory->create($fileName, $content->getCsvFile($fileName));
}
/**
@@ -78,10 +94,10 @@ public function exportCsvAction()
*/
public function exportXmlAction()
{
- $this->loadLayout();
+ $this->_view->loadLayout();
$fileName = 'subscribers.xml';
- $content = $this->getLayout()->getChildBlock('adminhtml.newslettrer.subscriber.grid', 'grid.export');
- $this->_prepareDownloadResponse($fileName, $content->getExcelFile($fileName));
+ $content = $this->_view->getLayout()->getChildBlock('adminhtml.newslettrer.subscriber.grid', 'grid.export');
+ return $this->_fileFactory->create($fileName, $content->getExcelFile($fileName));
}
public function massUnsubscribeAction()
diff --git a/app/code/Magento/Adminhtml/Controller/Newsletter/Template.php b/app/code/Magento/Adminhtml/Controller/Newsletter/Template.php
index 9b17d8cf37ebf..53537fe7b0823 100644
--- a/app/code/Magento/Adminhtml/Controller/Newsletter/Template.php
+++ b/app/code/Magento/Adminhtml/Controller/Newsletter/Template.php
@@ -32,7 +32,7 @@
*/
namespace Magento\Adminhtml\Controller\Newsletter;
-class Template extends \Magento\Backend\Controller\Adminhtml\Action
+class Template extends \Magento\Backend\App\Action
{
/**
* Core registry
@@ -40,13 +40,12 @@ class Template extends \Magento\Backend\Controller\Adminhtml\Action
* @var \Magento\Core\Model\Registry
*/
protected $_coreRegistry = null;
-
/**
- * @param \Magento\Backend\Controller\Context $context
+ * @param \Magento\Backend\App\Action\Context $context
* @param \Magento\Core\Model\Registry $coreRegistry
*/
public function __construct(
- \Magento\Backend\Controller\Context $context,
+ \Magento\Backend\App\Action\Context $context,
\Magento\Core\Model\Registry $coreRegistry
) {
$this->_coreRegistry = $coreRegistry;
@@ -71,7 +70,7 @@ protected function _isAllowed()
*/
protected function _setTitle()
{
- return $this->_title(__('Newsletter Templates'));
+ return $this->_title->add(__('Newsletter Templates'));
}
/**
@@ -86,11 +85,11 @@ public function indexAction()
$this->_forward('grid');
return;
}
- $this->loadLayout();
+ $this->_view->loadLayout();
$this->_setActiveMenu('Magento_Newsletter::newsletter_template');
$this->_addBreadcrumb(__('Newsletter Templates'), __('Newsletter Templates'));
- $this->_addContent($this->getLayout()->createBlock('Magento\Adminhtml\Block\Newsletter\Template', 'template'));
- $this->renderLayout();
+ $this->_addContent($this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Newsletter\Template', 'template'));
+ $this->_view->renderLayout();
}
/**
@@ -99,8 +98,8 @@ public function indexAction()
*/
public function gridAction()
{
- $this->loadLayout();
- $grid = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Newsletter\Template\Grid')
+ $this->_view->loadLayout();
+ $grid = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Newsletter\Template\Grid')
->toHtml();
$this->getResponse()->setBody($grid);
}
@@ -130,7 +129,7 @@ public function editAction()
$this->_coreRegistry->register('_current_template', $model);
- $this->loadLayout();
+ $this->_view->loadLayout();
$this->_setActiveMenu('Magento_Newsletter::newsletter_template');
if ($model->getId()) {
@@ -141,7 +140,7 @@ public function editAction()
$breadcrumbLabel = __('Create Newsletter Template');
}
- $this->_title($model->getId() ? $model->getTemplateCode() : __('New Template'));
+ $this->_title->add($model->getId() ? $model->getTemplateCode() : __('New Template'));
$this->_addBreadcrumb($breadcrumbLabel, $breadcrumbTitle);
@@ -151,12 +150,12 @@ public function editAction()
$model->addData($values);
}
- $editBlock = $this->getLayout()->getBlock('template_edit');
+ $editBlock = $this->_view->getLayout()->getBlock('template_edit');
if ($editBlock) {
$editBlock->setEditMode($model->getId() > 0);
}
- $this->renderLayout();
+ $this->_view->renderLayout();
}
/**
@@ -165,8 +164,8 @@ public function editAction()
*/
public function dropAction()
{
- $this->loadLayout('newsletter_template_preview');
- $this->renderLayout();
+ $this->_view->loadLayout('newsletter_template_preview');
+ $this->_view->renderLayout();
}
/**
@@ -259,11 +258,11 @@ public function deleteAction()
public function previewAction()
{
$this->_setTitle();
- $this->loadLayout();
+ $this->_view->loadLayout();
$data = $this->getRequest()->getParams();
if (empty($data) || !isset($data['id'])) {
- $this->_forward('noRoute');
+ $this->_forward('noroute');
return $this;
}
@@ -271,7 +270,7 @@ public function previewAction()
$data['preview_store_id'] = $this->_objectManager->get('Magento\Core\Model\StoreManager')
->getDefaultStoreView()->getId();
- $this->getLayout()->getBlock('preview_form')->setFormData($data);
- $this->renderLayout();
+ $this->_view->getLayout()->getBlock('preview_form')->setFormData($data);
+ $this->_view->renderLayout();
}
}
diff --git a/app/code/Magento/Adminhtml/Controller/Report.php b/app/code/Magento/Adminhtml/Controller/Report.php
index c550488c9bf4f..45ed4c367ed34 100644
--- a/app/code/Magento/Adminhtml/Controller/Report.php
+++ b/app/code/Magento/Adminhtml/Controller/Report.php
@@ -33,26 +33,43 @@
*/
namespace Magento\Adminhtml\Controller;
-class Report extends \Magento\Backend\Controller\Adminhtml\Action
+class Report extends \Magento\Backend\App\Action
{
+ /**
+ * @var \Magento\App\Response\Http\FileFactory
+ */
+ protected $_fileFactory;
+
+ /**
+ * @param \Magento\Backend\App\Action\Context $context
+ * @param \Magento\App\Response\Http\FileFactory $fileFactory
+ */
+ public function __construct(
+ \Magento\Backend\App\Action\Context $context,
+ \Magento\App\Response\Http\FileFactory $fileFactory
+ ) {
+ $this->_fileFactory = $fileFactory;
+ parent::__construct($context);
+ }
+
public function _initAction()
{
- $this->loadLayout()
- ->_addBreadcrumb(__('Reports'), __('Reports'));
+ $this->_view->loadLayout();
+ $this->_addBreadcrumb(__('Reports'), __('Reports'));
return $this;
}
public function searchAction()
{
- $this->_title(__('Search Terms Report'));
+ $this->_title->add(__('Search Terms Report'));
$this->_eventManager->dispatch('on_view_report', array('report' => 'search'));
$this->_initAction()
->_setActiveMenu('Magento_Reports::report_search')
- ->_addBreadcrumb(__('Search Terms'), __('Search Terms'))
- ->renderLayout();
+ ->_addBreadcrumb(__('Search Terms'), __('Search Terms'));
+ $this->_view->renderLayout();
}
/**
@@ -60,9 +77,9 @@ public function searchAction()
*/
public function exportSearchCsvAction()
{
- $this->loadLayout(false);
- $content = $this->getLayout()->getChildBlock('adminhtml.report.search.grid', 'grid.export');
- $this->_prepareDownloadResponse('search.csv', $content->getCsvFile());
+ $this->_view->loadLayout(false);
+ $content = $this->_view->getLayout()->getChildBlock('adminhtml.report.search.grid', 'grid.export');
+ return $this->_fileFactory->create('search.csv', $content->getCsvFile());
}
/**
@@ -70,9 +87,9 @@ public function exportSearchCsvAction()
*/
public function exportSearchExcelAction()
{
- $this->loadLayout(false);
- $content = $this->getLayout()->getChildBlock('adminhtml.report.search.grid', 'grid.export');
- $this->_prepareDownloadResponse('search.xml', $content->getExcelFile());
+ $this->_view->loadLayout(false);
+ $content = $this->_view->getLayout()->getChildBlock('adminhtml.report.search.grid', 'grid.export');
+ return $this->_fileFactory->create('search.xml', $content->getExcelFile());
}
protected function _isAllowed()
diff --git a/app/code/Magento/Adminhtml/Controller/Report/AbstractReport.php b/app/code/Magento/Adminhtml/Controller/Report/AbstractReport.php
index 5d6a4d569e63e..21c7d398f839a 100644
--- a/app/code/Magento/Adminhtml/Controller/Report/AbstractReport.php
+++ b/app/code/Magento/Adminhtml/Controller/Report/AbstractReport.php
@@ -34,8 +34,33 @@
*/
namespace Magento\Adminhtml\Controller\Report;
-abstract class AbstractReport extends \Magento\Backend\Controller\Adminhtml\Action
+abstract class AbstractReport extends \Magento\Backend\App\Action
{
+ /**
+ * @var \Magento\App\Response\Http\FileFactory
+ */
+ protected $_fileFactory;
+
+ /**
+ * @var \Magento\Core\Filter\Date
+ */
+ protected $_dateFilter;
+
+ /**
+ * @param \Magento\Backend\App\Action\Context $context
+ * @param \Magento\App\Response\Http\FileFactory $fileFactory
+ * @param \Magento\Core\Filter\Date $dateFilter
+ */
+ public function __construct(
+ \Magento\Backend\App\Action\Context $context,
+ \Magento\App\Response\Http\FileFactory $fileFactory,
+ \Magento\Core\Filter\Date $dateFilter
+ ) {
+ parent::__construct($context);
+ $this->_fileFactory = $fileFactory;
+ $this->_dateFilter = $dateFilter;
+ }
+
/**
* Admin session model
*
@@ -63,8 +88,8 @@ protected function _getSession()
*/
public function _initAction()
{
- $this->loadLayout()
- ->_addBreadcrumb(__('Reports'), __('Reports'));
+ $this->_view->loadLayout();
+ $this->_addBreadcrumb(__('Reports'), __('Reports'));
return $this;
}
@@ -82,7 +107,9 @@ public function _initReportAction($blocks)
$requestData = $this->_objectManager->get('Magento\Adminhtml\Helper\Data')
->prepareFilterString($this->getRequest()->getParam('filter'));
- $requestData = $this->_filterDates($requestData, array('from', 'to'));
+ $inputFilter = new \Zend_Filter_Input(array('from' => $this->_dateFilter, 'to' => $this->_dateFilter),
+ array(), $requestData);
+ $requestData = $inputFilter->getUnescaped();
$requestData['store_ids'] = $this->getRequest()->getParam('store_ids');
$params = new \Magento\Object();
diff --git a/app/code/Magento/Adminhtml/Controller/Report/Customer.php b/app/code/Magento/Adminhtml/Controller/Report/Customer.php
index ad5fcdb9f808b..da40a61d283b6 100644
--- a/app/code/Magento/Adminhtml/Controller/Report/Customer.php
+++ b/app/code/Magento/Adminhtml/Controller/Report/Customer.php
@@ -34,8 +34,25 @@
*/
namespace Magento\Adminhtml\Controller\Report;
-class Customer extends \Magento\Backend\Controller\Adminhtml\Action
+class Customer extends \Magento\Backend\App\Action
{
+ /**
+ * @var \Magento\App\Response\Http\FileFactory
+ */
+ protected $_fileFactory;
+
+ /**
+ * @param \Magento\Backend\App\Action\Context $context
+ * @param \Magento\App\Response\Http\FileFactory $fileFactory
+ */
+ public function __construct(
+ \Magento\Backend\App\Action\Context $context,
+ \Magento\App\Response\Http\FileFactory $fileFactory
+ ) {
+ $this->_fileFactory = $fileFactory;
+ parent::__construct($context);
+ }
+
public function _initAction()
{
$act = $this->getRequest()->getActionName();
@@ -43,29 +60,29 @@ public function _initAction()
$act = 'default';
}
- $this->loadLayout()
- ->_addBreadcrumb(
- __('Reports'),
- __('Reports')
- )
- ->_addBreadcrumb(
- __('Customers'),
- __('Customers')
- );
+ $this->_view->loadLayout();
+ $this->_addBreadcrumb(
+ __('Reports'),
+ __('Reports')
+ );
+ $this->_addBreadcrumb(
+ __('Customers'),
+ __('Customers')
+ );
return $this;
}
public function accountsAction()
{
- $this->_title(__('New Accounts Report'));
+ $this->_title->add(__('New Accounts Report'));
$this->_initAction()
->_setActiveMenu('Magento_Reports::report_customers_accounts')
->_addBreadcrumb(
__('New Accounts'),
__('New Accounts')
- )
- ->renderLayout();
+ );
+ $this->_view->renderLayout();
}
/**
@@ -73,11 +90,11 @@ public function accountsAction()
*/
public function exportAccountsCsvAction()
{
- $this->loadLayout();
+ $this->_view->loadLayout();
$fileName = 'new_accounts.csv';
/** @var \Magento\Backend\Block\Widget\Grid\ExportInterface $exportBlock */
- $exportBlock = $this->getLayout()->getChildBlock('adminhtml.report.grid', 'grid.export');
- $this->_prepareDownloadResponse($fileName, $exportBlock->getCsvFile());
+ $exportBlock = $this->_view->getLayout()->getChildBlock('adminhtml.report.grid', 'grid.export');
+ return $this->_fileFactory->create($fileName, $exportBlock->getCsvFile());
}
/**
@@ -85,22 +102,22 @@ public function exportAccountsCsvAction()
*/
public function exportAccountsExcelAction()
{
- $this->loadLayout();
+ $this->_view->loadLayout();
$fileName = 'new_accounts.xml';
/** @var \Magento\Backend\Block\Widget\Grid\ExportInterface $exportBlock */
- $exportBlock = $this->getLayout()->getChildBlock('adminhtml.report.grid', 'grid.export');
- $this->_prepareDownloadResponse($fileName, $exportBlock->getExcelFile($fileName));
+ $exportBlock = $this->_view->getLayout()->getChildBlock('adminhtml.report.grid', 'grid.export');
+ return $this->_fileFactory->create($fileName, $exportBlock->getExcelFile($fileName));
}
public function ordersAction()
{
- $this->_title(__('Order Count Report'));
+ $this->_title->add(__('Order Count Report'));
$this->_initAction()
->_setActiveMenu('Magento_Reports::report_customers_orders')
->_addBreadcrumb(__('Customers by Number of Orders'),
- __('Customers by Number of Orders'))
- ->renderLayout();
+ __('Customers by Number of Orders'));
+ $this->_view->renderLayout();
}
/**
@@ -108,11 +125,11 @@ public function ordersAction()
*/
public function exportOrdersCsvAction()
{
- $this->loadLayout();
+ $this->_view->loadLayout();
$fileName = 'customers_orders.csv';
/** @var \Magento\Backend\Block\Widget\Grid\ExportInterface $exportBlock */
- $exportBlock = $this->getLayout()->getChildBlock('adminhtml.report.grid', 'grid.export');
- $this->_prepareDownloadResponse($fileName, $exportBlock->getCsvFile());
+ $exportBlock = $this->_view->getLayout()->getChildBlock('adminhtml.report.grid', 'grid.export');
+ return $this->_fileFactory->create($fileName, $exportBlock->getCsvFile());
}
/**
@@ -120,22 +137,22 @@ public function exportOrdersCsvAction()
*/
public function exportOrdersExcelAction()
{
- $this->loadLayout();
+ $this->_view->loadLayout();
$fileName = 'customers_orders.xml';
/** @var \Magento\Backend\Block\Widget\Grid\ExportInterface $exportBlock */
- $exportBlock = $this->getLayout()->getChildBlock('adminhtml.report.grid', 'grid.export');
- $this->_prepareDownloadResponse($fileName, $exportBlock->getExcelFile($fileName));
+ $exportBlock = $this->_view->getLayout()->getChildBlock('adminhtml.report.grid', 'grid.export');
+ return $this->_fileFactory->create($fileName, $exportBlock->getExcelFile($fileName));
}
public function totalsAction()
{
- $this->_title(__('Order Total Report'));
+ $this->_title->add(__('Order Total Report'));
$this->_initAction()
->_setActiveMenu('Magento_Reports::report_customers_totals')
->_addBreadcrumb(__('Customers by Orders Total'),
- __('Customers by Orders Total'))
- ->renderLayout();
+ __('Customers by Orders Total'));
+ $this->_view->renderLayout();
}
/**
@@ -143,11 +160,11 @@ public function totalsAction()
*/
public function exportTotalsCsvAction()
{
- $this->loadLayout();
+ $this->_view->loadLayout();
$fileName = 'customer_totals.csv';
/** @var \Magento\Backend\Block\Widget\Grid\ExportInterface $exportBlock */
- $exportBlock = $this->getLayout()->getChildBlock('adminhtml.report.grid', 'grid.export');
- $this->_prepareDownloadResponse($fileName, $exportBlock->getCsvFile());
+ $exportBlock = $this->_view->getLayout()->getChildBlock('adminhtml.report.grid', 'grid.export');
+ return $this->_fileFactory->create($fileName, $exportBlock->getCsvFile());
}
/**
@@ -155,11 +172,11 @@ public function exportTotalsCsvAction()
*/
public function exportTotalsExcelAction()
{
- $this->loadLayout();
+ $this->_view->loadLayout();
$fileName = 'customer_totals.xml';
/** @var \Magento\Backend\Block\Widget\Grid\ExportInterface $exportBlock */
- $exportBlock = $this->getLayout()->getChildBlock('adminhtml.report.grid', 'grid.export');
- $this->_prepareDownloadResponse($fileName, $exportBlock->getExcelFile($fileName));
+ $exportBlock = $this->_view->getLayout()->getChildBlock('adminhtml.report.grid', 'grid.export');
+ return $this->_fileFactory->create($fileName, $exportBlock->getExcelFile($fileName));
}
protected function _isAllowed()
diff --git a/app/code/Magento/Adminhtml/Controller/Report/Product.php b/app/code/Magento/Adminhtml/Controller/Report/Product.php
index 356c49ddbf85a..5365f1e4a9f9b 100644
--- a/app/code/Magento/Adminhtml/Controller/Report/Product.php
+++ b/app/code/Magento/Adminhtml/Controller/Report/Product.php
@@ -57,14 +57,14 @@ public function _initAction()
*/
public function soldAction()
{
- $this->_title(__('Ordered Products Report'));
+ $this->_title->add(__('Ordered Products Report'));
$this->_initAction()
->_setActiveMenu('Magento_Reports::report_products_sold')
->_addBreadcrumb(
__('Products Ordered'),
__('Products Ordered')
- )
- ->renderLayout();
+ );
+ $this->_view->renderLayout();
}
/**
@@ -73,11 +73,11 @@ public function soldAction()
*/
public function exportSoldCsvAction()
{
- $this->loadLayout();
+ $this->_view->loadLayout();
$fileName = 'products_ordered.csv';
/** @var \Magento\Backend\Block\Widget\Grid\ExportInterface $exportBlock */
- $exportBlock = $this->getLayout()->getChildBlock('adminhtml.report.grid', 'grid.export');
- $this->_prepareDownloadResponse($fileName, $exportBlock->getCsvFile());
+ $exportBlock = $this->_view->getLayout()->getChildBlock('adminhtml.report.grid', 'grid.export');
+ return $this->_fileFactory->create($fileName, $exportBlock->getCsvFile());
}
/**
@@ -86,11 +86,11 @@ public function exportSoldCsvAction()
*/
public function exportSoldExcelAction()
{
- $this->loadLayout();
+ $this->_view->loadLayout();
$fileName = 'products_ordered.xml';
/** @var \Magento\Backend\Block\Widget\Grid\ExportInterface $exportBlock */
- $exportBlock = $this->getLayout()->getChildBlock('adminhtml.report.grid', 'grid.export');
- $this->_prepareDownloadResponse($fileName, $exportBlock->getExcelFile($fileName));
+ $exportBlock = $this->_view->getLayout()->getChildBlock('adminhtml.report.grid', 'grid.export');
+ return $this->_fileFactory->create($fileName, $exportBlock->getExcelFile($fileName));
}
/**
@@ -99,7 +99,7 @@ public function exportSoldExcelAction()
*/
public function viewedAction()
{
- $this->_title(__('Product Views Report'));
+ $this->_title->add(__('Product Views Report'));
$this->_showLastExecutionTime(\Magento\Reports\Model\Flag::REPORT_PRODUCT_VIEWED_FLAG_CODE, 'viewed');
@@ -110,15 +110,15 @@ public function viewedAction()
__('Products Most Viewed Report')
);
- $gridBlock = $this->getLayout()->getBlock('report_product_viewed.grid');
- $filterFormBlock = $this->getLayout()->getBlock('grid.filter.form');
+ $gridBlock = $this->_view->getLayout()->getBlock('report_product_viewed.grid');
+ $filterFormBlock = $this->_view->getLayout()->getBlock('grid.filter.form');
$this->_initReportAction(array(
$gridBlock,
$filterFormBlock
));
- $this->renderLayout();
+ $this->_view->renderLayout();
}
/**
@@ -128,9 +128,9 @@ public function viewedAction()
public function exportViewedCsvAction()
{
$fileName = 'products_mostviewed.csv';
- $grid = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Product\Viewed\Grid');
+ $grid = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Product\Viewed\Grid');
$this->_initReportAction($grid);
- $this->_prepareDownloadResponse($fileName, $grid->getCsvFile());
+ return $this->_fileFactory->create($fileName, $grid->getCsvFile());
}
/**
@@ -140,9 +140,9 @@ public function exportViewedCsvAction()
public function exportViewedExcelAction()
{
$fileName = 'products_mostviewed.xml';
- $grid = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Product\Viewed\Grid');
+ $grid = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Product\Viewed\Grid');
$this->_initReportAction($grid);
- $this->_prepareDownloadResponse($fileName, $grid->getExcelFile($fileName));
+ return $this->_fileFactory->create($fileName, $grid->getExcelFile($fileName));
}
/**
@@ -151,7 +151,7 @@ public function exportViewedExcelAction()
*/
public function lowstockAction()
{
- $this->_title(__('Low Stock Report'));
+ $this->_title->add(__('Low Stock Report'));
$this->_initAction()
->_setActiveMenu('Magento_Reports::report_products_lowstock')
@@ -159,7 +159,7 @@ public function lowstockAction()
__('Low Stock'),
__('Low Stock')
);
- $this->renderLayout();
+ $this->_view->renderLayout();
}
/**
@@ -168,10 +168,11 @@ public function lowstockAction()
*/
public function exportLowstockCsvAction()
{
- $this->loadLayout(false);
+ $this->_view->loadLayout(false);
$fileName = 'products_lowstock.csv';
- $exportBlock = $this->getLayout()->getChildBlock('adminhtml.block.report.product.lowstock.grid', 'grid.export');
- $this->_prepareDownloadResponse($fileName, $exportBlock->getCsvFile());
+ $exportBlock = $this->_view->getLayout()
+ ->getChildBlock('adminhtml.block.report.product.lowstock.grid', 'grid.export');
+ return $this->_fileFactory->create($fileName, $exportBlock->getCsvFile());
}
/**
@@ -180,10 +181,11 @@ public function exportLowstockCsvAction()
*/
public function exportLowstockExcelAction()
{
- $this->loadLayout(false);
+ $this->_view->loadLayout(false);
$fileName = 'products_lowstock.xml';
- $exportBlock = $this->getLayout()->getChildBlock('adminhtml.block.report.product.lowstock.grid', 'grid.export');
- $this->_prepareDownloadResponse($fileName, $exportBlock->getExcelFile());
+ $exportBlock = $this->_view->getLayout()
+ ->getChildBlock('adminhtml.block.report.product.lowstock.grid', 'grid.export');
+ return $this->_fileFactory->create($fileName, $exportBlock->getExcelFile());
}
/**
@@ -192,7 +194,7 @@ public function exportLowstockExcelAction()
*/
public function downloadsAction()
{
- $this->_title(__('Downloads Report'));
+ $this->_title->add(__('Downloads Report'));
$this->_initAction()
->_setActiveMenu('Magento_Downloadable::report_products_downloads')
@@ -200,8 +202,10 @@ public function downloadsAction()
__('Downloads'),
__('Downloads')
)
- ->_addContent($this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Product\Downloads'))
- ->renderLayout();
+ ->_addContent(
+ $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Product\Downloads')
+ );
+ $this->_view->renderLayout();
}
/**
@@ -211,11 +215,11 @@ public function downloadsAction()
public function exportDownloadsCsvAction()
{
$fileName = 'products_downloads.csv';
- $content = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Product\Downloads\Grid')
+ $content = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Product\Downloads\Grid')
->setSaveParametersInSession(true)
->getCsv();
- $this->_prepareDownloadResponse($fileName, $content);
+ return $this->_fileFactory->create($fileName, $content);
}
/**
@@ -225,11 +229,11 @@ public function exportDownloadsCsvAction()
public function exportDownloadsExcelAction()
{
$fileName = 'products_downloads.xml';
- $content = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Product\Downloads\Grid')
+ $content = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Product\Downloads\Grid')
->setSaveParametersInSession(true)
->getExcel($fileName);
- $this->_prepareDownloadResponse($fileName, $content);
+ return $this->_fileFactory->create($fileName, $content);
}
/**
diff --git a/app/code/Magento/Adminhtml/Controller/Report/Review.php b/app/code/Magento/Adminhtml/Controller/Report/Review.php
index d6ad16dbd667f..8e4fe66345a5e 100644
--- a/app/code/Magento/Adminhtml/Controller/Report/Review.php
+++ b/app/code/Magento/Adminhtml/Controller/Report/Review.php
@@ -33,25 +33,42 @@
*/
namespace Magento\Adminhtml\Controller\Report;
-class Review extends \Magento\Backend\Controller\Adminhtml\Action
+class Review extends \Magento\Backend\App\Action
{
+ /**
+ * @var \Magento\App\Response\Http\FileFactory
+ */
+ protected $_fileFactory;
+
+ /**
+ * @param \Magento\Backend\App\Action\Context $context
+ * @param \Magento\App\Response\Http\FileFactory $fileFactory
+ */
+ public function __construct(
+ \Magento\Backend\App\Action\Context $context,
+ \Magento\App\Response\Http\FileFactory $fileFactory
+ ) {
+ $this->_fileFactory = $fileFactory;
+ parent::__construct($context);
+ }
+
public function _initAction()
{
- $this->loadLayout()
- ->_addBreadcrumb(
- __('Reports'),
- __('Reports')
- )
- ->_addBreadcrumb(
- __('Review'),
- __('Reviews')
- );
+ $this->_view->loadLayout();
+ $this->_addBreadcrumb(
+ __('Reports'),
+ __('Reports')
+ );
+ $this->_addBreadcrumb(
+ __('Review'),
+ __('Reviews')
+ );
return $this;
}
public function customerAction()
{
- $this->_title(__('Customer Reviews Report'));
+ $this->_title->add(__('Customer Reviews Report'));
$this->_initAction()
->_setActiveMenu('Magento_Review::report_review_customer')
@@ -59,7 +76,7 @@ public function customerAction()
__('Customers Report'),
__('Customers Report')
);
- $this->renderLayout();
+ $this->_view->renderLayout();
}
/**
@@ -67,10 +84,10 @@ public function customerAction()
*/
public function exportCustomerCsvAction()
{
- $this->loadLayout(false);
+ $this->_view->loadLayout(false);
$fileName = 'review_customer.csv';
- $exportBlock = $this->getLayout()->getChildBlock('adminhtml.block.report.review.customer.grid','grid.export');
- $this->_prepareDownloadResponse($fileName, $exportBlock->getCsvFile());
+ $exportBlock = $this->_view->getLayout()->getChildBlock('adminhtml.block.report.review.customer.grid','grid.export');
+ return $this->_fileFactory->create($fileName, $exportBlock->getCsvFile());
}
/**
@@ -78,16 +95,16 @@ public function exportCustomerCsvAction()
*/
public function exportCustomerExcelAction()
{
- $this->loadLayout(false);
+ $this->_view->loadLayout(false);
$fileName = 'review_customer.xml';
- $exportBlock = $this->getLayout()->getChildBlock('adminhtml.block.report.review.customer.grid','grid.export');
- $this->_prepareDownloadResponse($fileName, $exportBlock->getExcelFile());
+ $exportBlock = $this->_view->getLayout()->getChildBlock('adminhtml.block.report.review.customer.grid','grid.export');
+ return $this->_fileFactory->create($fileName, $exportBlock->getExcelFile());
}
public function productAction()
{
- $this->_title(__('Product Reviews Report'));
+ $this->_title->add(__('Product Reviews Report'));
$this->_initAction()
->_setActiveMenu('Magento_Review::report_review_product')
@@ -95,7 +112,7 @@ public function productAction()
__('Products Report'),
__('Products Report')
);
- $this->renderLayout();
+ $this->_view->renderLayout();
}
/**
@@ -103,10 +120,10 @@ public function productAction()
*/
public function exportProductCsvAction()
{
- $this->loadLayout(false);
+ $this->_view->loadLayout(false);
$fileName = 'review_product.csv';
- $exportBlock = $this->getLayout()->getChildBlock('adminhtml.block.report.review.product.grid','grid.export');
- $this->_prepareDownloadResponse($fileName, $exportBlock->getCsvFile());
+ $exportBlock = $this->_view->getLayout()->getChildBlock('adminhtml.block.report.review.product.grid','grid.export');
+ return $this->_fileFactory->create($fileName, $exportBlock->getCsvFile());
}
/**
@@ -114,22 +131,24 @@ public function exportProductCsvAction()
*/
public function exportProductExcelAction()
{
- $this->loadLayout(false);
+ $this->_view->loadLayout(false);
$fileName = 'review_product.xml';
- $exportBlock = $this->getLayout()->getChildBlock('adminhtml.block.report.review.product.grid','grid.export');
- $this->_prepareDownloadResponse($fileName, $exportBlock->getExcelFile());
+ $exportBlock = $this->_view->getLayout()->getChildBlock('adminhtml.block.report.review.product.grid','grid.export');
+ return $this->_fileFactory->create($fileName, $exportBlock->getExcelFile());
}
public function productDetailAction()
{
- $this->_title(__('Details'));
+ $this->_title->add(__('Details'));
$this->_initAction()
->_setActiveMenu('Magento_Review::report_review')
->_addBreadcrumb(__('Products Report'), __('Products Report'))
->_addBreadcrumb(__('Product Reviews'), __('Product Reviews'))
- ->_addContent($this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Review\Detail'))
- ->renderLayout();
+ ->_addContent(
+ $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Review\Detail')
+ );
+ $this->_view->renderLayout();
}
/**
@@ -138,10 +157,10 @@ public function productDetailAction()
public function exportProductDetailCsvAction()
{
$fileName = 'review_product_detail.csv';
- $content = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Review\Detail\Grid')
+ $content = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Review\Detail\Grid')
->getCsv();
- $this->_prepareDownloadResponse($fileName, $content);
+ return $this->_fileFactory->create($fileName, $content);
}
/**
@@ -150,10 +169,10 @@ public function exportProductDetailCsvAction()
public function exportProductDetailExcelAction()
{
$fileName = 'review_product_detail.xml';
- $content = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Review\Detail\Grid')
+ $content = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Review\Detail\Grid')
->getExcel($fileName);
- $this->_prepareDownloadResponse($fileName, $content);
+ return $this->_fileFactory->create($fileName, $content);
}
protected function _isAllowed()
diff --git a/app/code/Magento/Adminhtml/Controller/Report/Sales.php b/app/code/Magento/Adminhtml/Controller/Report/Sales.php
index e99b0c8cad37a..4a02b2853ea1b 100644
--- a/app/code/Magento/Adminhtml/Controller/Report/Sales.php
+++ b/app/code/Magento/Adminhtml/Controller/Report/Sales.php
@@ -49,7 +49,7 @@ public function _initAction()
public function salesAction()
{
- $this->_title(__('Sales Report'));
+ $this->_title->add(__('Sales Report'));
$this->_showLastExecutionTime(\Magento\Reports\Model\Flag::REPORT_ORDER_FLAG_CODE, 'sales');
@@ -57,20 +57,20 @@ public function salesAction()
->_setActiveMenu('Magento_Reports::report_salesroot_sales')
->_addBreadcrumb(__('Sales Report'), __('Sales Report'));
- $gridBlock = $this->getLayout()->getBlock('report_sales_sales.grid');
- $filterFormBlock = $this->getLayout()->getBlock('grid.filter.form');
+ $gridBlock = $this->_view->getLayout()->getBlock('report_sales_sales.grid');
+ $filterFormBlock = $this->_view->getLayout()->getBlock('grid.filter.form');
$this->_initReportAction(array(
$gridBlock,
$filterFormBlock
));
- $this->renderLayout();
+ $this->_view->renderLayout();
}
public function bestsellersAction()
{
- $this->_title(__('Best Sellers Report'));
+ $this->_title->add(__('Best Sellers Report'));
$this->_showLastExecutionTime(\Magento\Reports\Model\Flag::REPORT_BESTSELLERS_FLAG_CODE, 'bestsellers');
@@ -78,15 +78,15 @@ public function bestsellersAction()
->_setActiveMenu('Magento_Reports::report_products_bestsellers')
->_addBreadcrumb(__('Products Bestsellers Report'), __('Products Bestsellers Report'));
- $gridBlock = $this->getLayout()->getBlock('report_sales_bestsellers.grid');
- $filterFormBlock = $this->getLayout()->getBlock('grid.filter.form');
+ $gridBlock = $this->_view->getLayout()->getBlock('report_sales_bestsellers.grid');
+ $filterFormBlock = $this->_view->getLayout()->getBlock('grid.filter.form');
$this->_initReportAction(array(
$gridBlock,
$filterFormBlock
));
- $this->renderLayout();
+ $this->_view->renderLayout();
}
/**
@@ -95,9 +95,9 @@ public function bestsellersAction()
public function exportBestsellersCsvAction()
{
$fileName = 'bestsellers.csv';
- $grid = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Bestsellers\Grid');
+ $grid = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Bestsellers\Grid');
$this->_initReportAction($grid);
- $this->_prepareDownloadResponse($fileName, $grid->getCsvFile());
+ return $this->_fileFactory->create($fileName, $grid->getCsvFile());
}
/**
@@ -106,9 +106,9 @@ public function exportBestsellersCsvAction()
public function exportBestsellersExcelAction()
{
$fileName = 'bestsellers.xml';
- $grid = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Bestsellers\Grid');
+ $grid = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Bestsellers\Grid');
$this->_initReportAction($grid);
- $this->_prepareDownloadResponse($fileName, $grid->getExcelFile($fileName));
+ return $this->_fileFactory->create($fileName, $grid->getExcelFile($fileName));
}
/**
@@ -137,9 +137,9 @@ public function refreshLifetimeAction()
public function exportSalesCsvAction()
{
$fileName = 'sales.csv';
- $grid = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Sales\Grid');
+ $grid = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Sales\Grid');
$this->_initReportAction($grid);
- $this->_prepareDownloadResponse($fileName, $grid->getCsvFile());
+ return $this->_fileFactory->create($fileName, $grid->getCsvFile());
}
/**
@@ -148,14 +148,14 @@ public function exportSalesCsvAction()
public function exportSalesExcelAction()
{
$fileName = 'sales.xml';
- $grid = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Sales\Grid');
+ $grid = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Sales\Grid');
$this->_initReportAction($grid);
- $this->_prepareDownloadResponse($fileName, $grid->getExcelFile($fileName));
+ return $this->_fileFactory->create($fileName, $grid->getExcelFile($fileName));
}
public function taxAction()
{
- $this->_title(__('Tax Report'));
+ $this->_title->add(__('Tax Report'));
$this->_showLastExecutionTime(\Magento\Reports\Model\Flag::REPORT_TAX_FLAG_CODE, 'tax');
@@ -163,15 +163,15 @@ public function taxAction()
->_setActiveMenu('Magento_Reports::report_salesroot_tax')
->_addBreadcrumb(__('Tax'), __('Tax'));
- $gridBlock = $this->getLayout()->getBlock('report_sales_tax.grid');
- $filterFormBlock = $this->getLayout()->getBlock('grid.filter.form');
+ $gridBlock = $this->_view->getLayout()->getBlock('report_sales_tax.grid');
+ $filterFormBlock = $this->_view->getLayout()->getBlock('grid.filter.form');
$this->_initReportAction(array(
$gridBlock,
$filterFormBlock
));
- $this->renderLayout();
+ $this->_view->renderLayout();
}
/**
@@ -180,9 +180,9 @@ public function taxAction()
public function exportTaxCsvAction()
{
$fileName = 'tax.csv';
- $grid = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Tax\Grid');
+ $grid = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Tax\Grid');
$this->_initReportAction($grid);
- $this->_prepareDownloadResponse($fileName, $grid->getCsvFile());
+ return $this->_fileFactory->create($fileName, $grid->getCsvFile());
}
/**
@@ -191,14 +191,14 @@ public function exportTaxCsvAction()
public function exportTaxExcelAction()
{
$fileName = 'tax.xml';
- $grid = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Tax\Grid');
+ $grid = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Tax\Grid');
$this->_initReportAction($grid);
- $this->_prepareDownloadResponse($fileName, $grid->getExcelFile($fileName));
+ return $this->_fileFactory->create($fileName, $grid->getExcelFile($fileName));
}
public function shippingAction()
{
- $this->_title(__('Shipping Report'));
+ $this->_title->add(__('Shipping Report'));
$this->_showLastExecutionTime(\Magento\Reports\Model\Flag::REPORT_SHIPPING_FLAG_CODE, 'shipping');
@@ -206,15 +206,15 @@ public function shippingAction()
->_setActiveMenu('Magento_Reports::report_salesroot_shipping')
->_addBreadcrumb(__('Shipping'), __('Shipping'));
- $gridBlock = $this->getLayout()->getBlock('report_sales_shipping.grid');
- $filterFormBlock = $this->getLayout()->getBlock('grid.filter.form');
+ $gridBlock = $this->_view->getLayout()->getBlock('report_sales_shipping.grid');
+ $filterFormBlock = $this->_view->getLayout()->getBlock('grid.filter.form');
$this->_initReportAction(array(
$gridBlock,
$filterFormBlock
));
- $this->renderLayout();
+ $this->_view->renderLayout();
}
/**
@@ -223,9 +223,9 @@ public function shippingAction()
public function exportShippingCsvAction()
{
$fileName = 'shipping.csv';
- $grid = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Shipping\Grid');
+ $grid = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Shipping\Grid');
$this->_initReportAction($grid);
- $this->_prepareDownloadResponse($fileName, $grid->getCsvFile());
+ return $this->_fileFactory->create($fileName, $grid->getCsvFile());
}
/**
@@ -234,14 +234,14 @@ public function exportShippingCsvAction()
public function exportShippingExcelAction()
{
$fileName = 'shipping.xml';
- $grid = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Shipping\Grid');
+ $grid = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Shipping\Grid');
$this->_initReportAction($grid);
- $this->_prepareDownloadResponse($fileName, $grid->getExcelFile($fileName));
+ return $this->_fileFactory->create($fileName, $grid->getExcelFile($fileName));
}
public function invoicedAction()
{
- $this->_title(__('Invoice Report'));
+ $this->_title->add(__('Invoice Report'));
$this->_showLastExecutionTime(\Magento\Reports\Model\Flag::REPORT_INVOICE_FLAG_CODE, 'invoiced');
@@ -249,15 +249,15 @@ public function invoicedAction()
->_setActiveMenu('Magento_Reports::report_salesroot_invoiced')
->_addBreadcrumb(__('Total Invoiced'), __('Total Invoiced'));
- $gridBlock = $this->getLayout()->getBlock('report_sales_invoiced.grid');
- $filterFormBlock = $this->getLayout()->getBlock('grid.filter.form');
+ $gridBlock = $this->_view->getLayout()->getBlock('report_sales_invoiced.grid');
+ $filterFormBlock = $this->_view->getLayout()->getBlock('grid.filter.form');
$this->_initReportAction(array(
$gridBlock,
$filterFormBlock
));
- $this->renderLayout();
+ $this->_view->renderLayout();
}
/**
@@ -266,9 +266,9 @@ public function invoicedAction()
public function exportInvoicedCsvAction()
{
$fileName = 'invoiced.csv';
- $grid = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Invoiced\Grid');
+ $grid = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Invoiced\Grid');
$this->_initReportAction($grid);
- $this->_prepareDownloadResponse($fileName, $grid->getCsvFile());
+ return $this->_fileFactory->create($fileName, $grid->getCsvFile());
}
/**
@@ -277,14 +277,14 @@ public function exportInvoicedCsvAction()
public function exportInvoicedExcelAction()
{
$fileName = 'invoiced.xml';
- $grid = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Invoiced\Grid');
+ $grid = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Invoiced\Grid');
$this->_initReportAction($grid);
- $this->_prepareDownloadResponse($fileName, $grid->getExcelFile($fileName));
+ return $this->_fileFactory->create($fileName, $grid->getExcelFile($fileName));
}
public function refundedAction()
{
- $this->_title(__('Refunds Report'));
+ $this->_title->add(__('Refunds Report'));
$this->_showLastExecutionTime(\Magento\Reports\Model\Flag::REPORT_REFUNDED_FLAG_CODE, 'refunded');
@@ -292,15 +292,15 @@ public function refundedAction()
->_setActiveMenu('Magento_Reports::report_salesroot_refunded')
->_addBreadcrumb(__('Total Refunded'), __('Total Refunded'));
- $gridBlock = $this->getLayout()->getBlock('report_sales_refunded.grid');
- $filterFormBlock = $this->getLayout()->getBlock('grid.filter.form');
+ $gridBlock = $this->_view->getLayout()->getBlock('report_sales_refunded.grid');
+ $filterFormBlock = $this->_view->getLayout()->getBlock('grid.filter.form');
$this->_initReportAction(array(
$gridBlock,
$filterFormBlock
));
- $this->renderLayout();
+ $this->_view->renderLayout();
}
/**
@@ -309,9 +309,9 @@ public function refundedAction()
public function exportRefundedCsvAction()
{
$fileName = 'refunded.csv';
- $grid = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Refunded\Grid');
+ $grid = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Refunded\Grid');
$this->_initReportAction($grid);
- $this->_prepareDownloadResponse($fileName, $grid->getCsvFile());
+ return $this->_fileFactory->create($fileName, $grid->getCsvFile());
}
/**
@@ -320,14 +320,14 @@ public function exportRefundedCsvAction()
public function exportRefundedExcelAction()
{
$fileName = 'refunded.xml';
- $grid = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Refunded\Grid');
+ $grid = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Refunded\Grid');
$this->_initReportAction($grid);
- $this->_prepareDownloadResponse($fileName, $grid->getExcelFile($fileName));
+ return $this->_fileFactory->create($fileName, $grid->getExcelFile($fileName));
}
public function couponsAction()
{
- $this->_title(__('Coupons Report'));
+ $this->_title->add(__('Coupons Report'));
$this->_showLastExecutionTime(\Magento\Reports\Model\Flag::REPORT_COUPONS_FLAG_CODE, 'coupons');
@@ -335,15 +335,15 @@ public function couponsAction()
->_setActiveMenu('Magento_Reports::report_salesroot_coupons')
->_addBreadcrumb(__('Coupons'), __('Coupons'));
- $gridBlock = $this->getLayout()->getBlock('report_sales_coupons.grid');
- $filterFormBlock = $this->getLayout()->getBlock('grid.filter.form');
+ $gridBlock = $this->_view->getLayout()->getBlock('report_sales_coupons.grid');
+ $filterFormBlock = $this->_view->getLayout()->getBlock('grid.filter.form');
$this->_initReportAction(array(
$gridBlock,
$filterFormBlock
));
- $this->renderLayout();
+ $this->_view->renderLayout();
}
/**
@@ -352,9 +352,9 @@ public function couponsAction()
public function exportCouponsCsvAction()
{
$fileName = 'coupons.csv';
- $grid = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Coupons\Grid');
+ $grid = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Coupons\Grid');
$this->_initReportAction($grid);
- $this->_prepareDownloadResponse($fileName, $grid->getCsvFile());
+ return $this->_fileFactory->create($fileName, $grid->getCsvFile());
}
/**
@@ -363,9 +363,9 @@ public function exportCouponsCsvAction()
public function exportCouponsExcelAction()
{
$fileName = 'coupons.xml';
- $grid = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Coupons\Grid');
+ $grid = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Coupons\Grid');
$this->_initReportAction($grid);
- $this->_prepareDownloadResponse($fileName, $grid->getExcelFile($fileName));
+ return $this->_fileFactory->create($fileName, $grid->getExcelFile($fileName));
}
public function refreshStatisticsAction()
diff --git a/app/code/Magento/Adminhtml/Controller/Report/Shopcart.php b/app/code/Magento/Adminhtml/Controller/Report/Shopcart.php
index 0bdbb5155c849..965d125ad6198 100644
--- a/app/code/Magento/Adminhtml/Controller/Report/Shopcart.php
+++ b/app/code/Magento/Adminhtml/Controller/Report/Shopcart.php
@@ -33,26 +33,46 @@
*/
namespace Magento\Adminhtml\Controller\Report;
-class Shopcart extends \Magento\Backend\Controller\Adminhtml\Action
+class Shopcart extends \Magento\Backend\App\Action
{
+ /**
+ * @var \Magento\App\Response\Http\FileFactory
+ */
+ protected $_fileFactory;
+
+ /**
+ * @param \Magento\Backend\App\Action\Context $context
+ * @param \Magento\App\Response\Http\FileFactory $fileFactory
+ */
+ public function __construct(
+ \Magento\Backend\App\Action\Context $context,
+ \Magento\App\Response\Http\FileFactory $fileFactory
+ ) {
+ $this->_fileFactory = $fileFactory;
+ parent::__construct($context);
+ }
+
public function _initAction()
{
- $act = $this->getRequest()->getActionName();
- $this->loadLayout()
- ->_addBreadcrumb(__('Reports'), __('Reports'))
- ->_addBreadcrumb(__('Shopping Cart'), __('Shopping Cart'));
+ $this->_view->loadLayout();
+ $this->_addBreadcrumb(__('Reports'), __('Reports'));
+ $this->_addBreadcrumb(__('Shopping Cart'), __('Shopping Cart'));
return $this;
}
public function customerAction()
{
- $this->_title(__('Customer Shopping Carts'));
+ $this->_title->add(__('Customer Shopping Carts'));
$this->_initAction()
->_setActiveMenu('Magento_Reports::report_shopcart_customer')
->_addBreadcrumb(__('Customers Report'), __('Customers Report'))
- ->_addContent($this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Shopcart\Customer'))
- ->renderLayout();
+ ->_addContent(
+ $this->_view
+ ->getLayout()
+ ->createBlock('Magento\Adminhtml\Block\Report\Shopcart\Customer')
+ );
+ $this->_view->renderLayout();
}
/**
@@ -61,10 +81,10 @@ public function customerAction()
public function exportCustomerCsvAction()
{
$fileName = 'shopcart_customer.csv';
- $content = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Shopcart\Customer\Grid')
+ $content = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Shopcart\Customer\Grid')
->getCsvFile();
- $this->_prepareDownloadResponse($fileName, $content);
+ return $this->_fileFactory->create($fileName, $content);
}
/**
@@ -73,21 +93,23 @@ public function exportCustomerCsvAction()
public function exportCustomerExcelAction()
{
$fileName = 'shopcart_customer.xml';
- $content = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Shopcart\Customer\Grid')
+ $content = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Shopcart\Customer\Grid')
->getExcelFile($fileName);
- $this->_prepareDownloadResponse($fileName, $content);
+ return $this->_fileFactory->create($fileName, $content);
}
public function productAction()
{
- $this->_title(__('Products in Carts'));
+ $this->_title->add(__('Products in Carts'));
$this->_initAction()
->_setActiveMenu('Magento_Reports::report_shopcart_product')
->_addBreadcrumb(__('Products Report'), __('Products Report'))
- ->_addContent($this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Shopcart\Product'))
- ->renderLayout();
+ ->_addContent(
+ $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Shopcart\Product')
+ );
+ $this->_view->renderLayout();
}
/**
@@ -96,10 +118,10 @@ public function productAction()
public function exportProductCsvAction()
{
$fileName = 'shopcart_product.csv';
- $content = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Shopcart\Product\Grid')
+ $content = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Shopcart\Product\Grid')
->getCsvFile();
- $this->_prepareDownloadResponse($fileName, $content);
+ return $this->_fileFactory->create($fileName, $content);
}
/**
@@ -108,21 +130,23 @@ public function exportProductCsvAction()
public function exportProductExcelAction()
{
$fileName = 'shopcart_product.xml';
- $content = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Shopcart\Product\Grid')
+ $content = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Shopcart\Product\Grid')
->getExcelFile($fileName);
- $this->_prepareDownloadResponse($fileName, $content);
+ return $this->_fileFactory->create($fileName, $content);
}
public function abandonedAction()
{
- $this->_title(__('Abandoned Carts'));
+ $this->_title->add(__('Abandoned Carts'));
$this->_initAction()
->_setActiveMenu('Magento_Reports::report_shopcart_abandoned')
->_addBreadcrumb(__('Abandoned Carts'), __('Abandoned Carts'))
- ->_addContent($this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Shopcart\Abandoned'))
- ->renderLayout();
+ ->_addContent(
+ $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Shopcart\Abandoned')
+ );
+ $this->_view->renderLayout();
}
/**
@@ -131,10 +155,10 @@ public function abandonedAction()
public function exportAbandonedCsvAction()
{
$fileName = 'shopcart_abandoned.csv';
- $content = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Shopcart\Abandoned\Grid')
+ $content = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Shopcart\Abandoned\Grid')
->getCsvFile();
- $this->_prepareDownloadResponse($fileName, $content);
+ return $this->_fileFactory->create($fileName, $content);
}
/**
@@ -143,10 +167,10 @@ public function exportAbandonedCsvAction()
public function exportAbandonedExcelAction()
{
$fileName = 'shopcart_abandoned.xml';
- $content = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Shopcart\Abandoned\Grid')
+ $content = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Shopcart\Abandoned\Grid')
->getExcelFile($fileName);
- $this->_prepareDownloadResponse($fileName, $content);
+ return $this->_fileFactory->create($fileName, $content);
}
protected function _isAllowed()
diff --git a/app/code/Magento/Adminhtml/Controller/Report/Statistics.php b/app/code/Magento/Adminhtml/Controller/Report/Statistics.php
index 7671ef5b81480..50877faea2166 100644
--- a/app/code/Magento/Adminhtml/Controller/Report/Statistics.php
+++ b/app/code/Magento/Adminhtml/Controller/Report/Statistics.php
@@ -33,7 +33,7 @@
*/
namespace Magento\Adminhtml\Controller\Report;
-class Statistics extends \Magento\Backend\Controller\Adminhtml\Action
+class Statistics extends \Magento\Backend\App\Action
{
/**
* Admin session model
@@ -42,11 +42,26 @@ class Statistics extends \Magento\Backend\Controller\Adminhtml\Action
*/
protected $_adminSession = null;
+ /**
+ * @var \Magento\Core\Filter\Date
+ */
+ protected $_dateFilter;
+
+ /**
+ * @param \Magento\Backend\App\Action\Context $context
+ * @param \Magento\Core\Filter\Date $dateFilter
+ */
+ public function __construct(\Magento\Backend\App\Action\Context $context, \Magento\Core\Filter\Date $dateFilter)
+ {
+ $this->_dateFilter = $dateFilter;
+ parent::__construct($context);
+ }
+
public function _initAction()
{
- $this->loadLayout()
- ->_addBreadcrumb(__('Reports'), __('Reports'))
- ->_addBreadcrumb(__('Statistics'), __('Statistics'));
+ $this->_view->loadLayout();
+ $this->_addBreadcrumb(__('Reports'), __('Reports'));
+ $this->_addBreadcrumb(__('Statistics'), __('Statistics'));
return $this;
}
@@ -58,7 +73,9 @@ public function _initReportAction($blocks)
$requestData = $this->_objectManager->get('Magento\Adminhtml\Helper\Data')
->prepareFilterString($this->getRequest()->getParam('filter'));
- $requestData = $this->_filterDates($requestData, array('from', 'to'));
+ $inputFilter = new \Zend_Filter_Input(array('from' => $this->_dateFilter, 'to' => $this->_dateFilter),
+ array(), $requestData);
+ $requestData = $inputFilter->getUnescaped();
$requestData['store_ids'] = $this->getRequest()->getParam('store_ids');
$params = new \Magento\Object();
@@ -141,7 +158,7 @@ public function refreshRecentAction()
if($this->_getSession()->isFirstPageAfterLogin()) {
$this->_redirect('adminhtml/*');
} else {
- $this->_redirectReferer('*/*');
+ $this->getResponse()->setRedirect($this->_redirect->getRedirectUrl('*/*'));
}
return $this;
}
@@ -172,7 +189,7 @@ public function refreshLifetimeAction()
if($this->_getSession()->isFirstPageAfterLogin()) {
$this->_redirect('adminhtml/*');
} else {
- $this->_redirectReferer('*/*');
+ $this->getResponse()->setRedirect($this->_redirect->getRedirectUrl('*/*'));
}
return $this;
@@ -180,12 +197,12 @@ public function refreshLifetimeAction()
public function indexAction()
{
- $this->_title(__('Refresh Statistics'));
+ $this->_title->add(__('Refresh Statistics'));
$this->_initAction()
->_setActiveMenu('Magento_Reports::report_statistics_refresh')
- ->_addBreadcrumb(__('Refresh Statistics'), __('Refresh Statistics'))
- ->renderLayout();
+ ->_addBreadcrumb(__('Refresh Statistics'), __('Refresh Statistics'));
+ $this->_view->renderLayout();
}
protected function _isAllowed()
diff --git a/app/code/Magento/Adminhtml/Controller/Urlrewrite.php b/app/code/Magento/Adminhtml/Controller/Urlrewrite.php
index 5112c98e086c5..712e86affb549 100644
--- a/app/code/Magento/Adminhtml/Controller/Urlrewrite.php
+++ b/app/code/Magento/Adminhtml/Controller/Urlrewrite.php
@@ -33,7 +33,7 @@
*/
namespace Magento\Adminhtml\Controller;
-class Urlrewrite extends \Magento\Backend\Controller\Adminhtml\Action
+class Urlrewrite extends \Magento\Backend\App\Action
{
const ID_MODE = 'id';
const PRODUCT_MODE = 'product';
@@ -65,11 +65,11 @@ class Urlrewrite extends \Magento\Backend\Controller\Adminhtml\Action
*/
public function indexAction()
{
- $this->_title(__('URL Redirects'));
+ $this->_title->add(__('URL Redirects'));
- $this->loadLayout();
+ $this->_view->loadLayout();
$this->_setActiveMenu('Magento_Catalog::catalog_urlrewrite');
- $this->renderLayout();
+ $this->_view->renderLayout();
}
/**
@@ -77,17 +77,17 @@ public function indexAction()
*/
public function editAction()
{
- $this->_title(__('URL Redirects'))
- ->_title(__('[New/Edit] URL Redirect'));
+ $this->_title->add(__('URL Redirects'));
+ $this->_title->add(__('[New/Edit] URL Redirect'));
- $this->loadLayout();
+ $this->_view->loadLayout();
$this->_setActiveMenu('Magento_Catalog::catalog_urlrewrite');
$mode = $this->_getMode();
switch ($mode) {
case self::PRODUCT_MODE:
- $editBlock = $this->getLayout()
+ $editBlock = $this->_view->getLayout()
->createBlock('Magento\Adminhtml\Block\Urlrewrite\Catalog\Product\Edit', '', array('data' => array(
'category' => $this->_getCategory(),
'product' => $this->_getProduct(),
@@ -96,25 +96,28 @@ public function editAction()
)));
break;
case self::CATEGORY_MODE:
- $editBlock = $this->getLayout()
+ $editBlock = $this->_view->getLayout()
->createBlock('Magento\Adminhtml\Block\Urlrewrite\Catalog\Category\Edit', '', array('data' => array(
'category' => $this->_getCategory(),
'url_rewrite' => $this->_getUrlRewrite()
)));
break;
case self::CMS_PAGE_MODE:
- $editBlock = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Urlrewrite\Cms\Page\Edit', '',
- array(
- 'data' => array(
- 'cms_page' => $this->_getCmsPage(),
- 'url_rewrite' => $this->_getUrlRewrite(),
- ),
- )
+ $editBlock = $this->_view->getLayout()
+ ->createBlock(
+ 'Magento\Adminhtml\Block\Urlrewrite\Cms\Page\Edit', '',
+ array(
+ 'data' => array(
+ 'cms_page' => $this->_getCmsPage(),
+ 'url_rewrite' => $this->_getUrlRewrite(),
+ ),
+ )
);
break;
case self::ID_MODE:
default:
- $editBlock = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Urlrewrite\Edit', '', array(
+ $editBlock = $this->_view->getLayout()->createBlock(
+ 'Magento\Adminhtml\Block\Urlrewrite\Edit', '', array(
'data' => array('url_rewrite' => $this->_getUrlRewrite())
));
break;
@@ -122,9 +125,9 @@ public function editAction()
$this->_addContent($editBlock);
if (in_array($mode, array(self::PRODUCT_MODE, self::CATEGORY_MODE))) {
- $this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
+ $this->_view->getLayout()->getBlock('head')->setCanLoadExtJs(true);
}
- $this->renderLayout();
+ $this->_view->renderLayout();
}
/**
@@ -154,7 +157,7 @@ private function _getMode()
public function productGridAction()
{
$this->getResponse()->setBody(
- $this->getLayout()->createBlock('Magento\Adminhtml\Block\Urlrewrite\Catalog\Product\Grid')->toHtml()
+ $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Urlrewrite\Catalog\Product\Grid')->toHtml()
);
}
@@ -176,7 +179,7 @@ public function categoriesJsonAction()
public function cmsPageGridAction()
{
$this->getResponse()->setBody(
- $this->getLayout()->createBlock('Magento\Adminhtml\Block\Urlrewrite\Cms\Page\Grid')->toHtml()
+ $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Urlrewrite\Cms\Page\Grid')->toHtml()
);
}
@@ -230,7 +233,7 @@ public function saveAction()
->setUrlrewriteData($data);
}
}
- $this->_redirectReferer();
+ $this->getResponse()->setRedirect($this->_redirect->getRedirectUrl($this->getUrl('*')));
}
/**
diff --git a/app/code/Magento/Adminhtml/Helper/Addresses.php b/app/code/Magento/Adminhtml/Helper/Addresses.php
index a1501d721797b..ddbf8e4943ff0 100644
--- a/app/code/Magento/Adminhtml/Helper/Addresses.php
+++ b/app/code/Magento/Adminhtml/Helper/Addresses.php
@@ -33,7 +33,7 @@
*/
namespace Magento\Adminhtml\Helper;
-class Addresses extends \Magento\Core\Helper\AbstractHelper
+class Addresses extends \Magento\App\Helper\AbstractHelper
{
const DEFAULT_STREET_LINES_COUNT = 2;
diff --git a/app/code/Magento/Adminhtml/Model/Session/Quote.php b/app/code/Magento/Adminhtml/Model/Session/Quote.php
index c7759239aa3ff..dc13f7485e305 100644
--- a/app/code/Magento/Adminhtml/Model/Session/Quote.php
+++ b/app/code/Magento/Adminhtml/Model/Session/Quote.php
@@ -66,11 +66,6 @@ class Quote extends \Magento\Core\Model\Session\AbstractSession
*/
protected $_orderFactory;
- /**
- * @var \Magento\Core\Model\StoreManagerInterface
- */
- protected $_storeManager;
-
/**
* @var \Magento\Customer\Model\CustomerFactory
*/
@@ -85,7 +80,6 @@ class Quote extends \Magento\Core\Model\Session\AbstractSession
* @param \Magento\Core\Model\Session\Context $context
* @param \Magento\Sales\Model\QuoteFactory $quoteFactory
* @param \Magento\Customer\Model\CustomerFactory $customerFactory
- * @param \Magento\Core\Model\StoreManagerInterface $storeManager
* @param \Magento\Sales\Model\OrderFactory $orderFactory
* @param array $data
*/
@@ -93,13 +87,11 @@ public function __construct(
\Magento\Core\Model\Session\Context $context,
\Magento\Sales\Model\QuoteFactory $quoteFactory,
\Magento\Customer\Model\CustomerFactory $customerFactory,
- \Magento\Core\Model\StoreManagerInterface $storeManager,
\Magento\Sales\Model\OrderFactory $orderFactory,
array $data = array()
) {
$this->_quoteFactory = $quoteFactory;
$this->_customerFactory = $customerFactory;
- $this->_storeManager = $storeManager;
$this->_orderFactory = $orderFactory;
parent::__construct($context, $data);
$this->init('adminhtml_quote');
diff --git a/app/code/Magento/Adminhtml/etc/adminhtml/acl.xml b/app/code/Magento/Adminhtml/etc/adminhtml/acl.xml
index e160fdbc64239..bc6e642838fbb 100644
--- a/app/code/Magento/Adminhtml/etc/adminhtml/acl.xml
+++ b/app/code/Magento/Adminhtml/etc/adminhtml/acl.xml
@@ -34,9 +34,6 @@
-
-
-
diff --git a/app/code/Magento/Adminhtml/etc/config.xml b/app/code/Magento/Adminhtml/etc/config.xml
index 2142978ee0ca1..bcff89c470e2d 100644
--- a/app/code/Magento/Adminhtml/etc/config.xml
+++ b/app/code/Magento/Adminhtml/etc/config.xml
@@ -28,15 +28,6 @@
-
-
- email
-
-
-
- system_emails_forgot_email_template
- general
-
1
@@ -79,9 +70,9 @@
- admin/index/noRoute
+ admin/noroute/index
-
\ No newline at end of file
+
diff --git a/app/code/Magento/Adminhtml/etc/events.xml b/app/code/Magento/Adminhtml/etc/events.xml
index ecb34a534129f..166dcf93fadb0 100644
--- a/app/code/Magento/Adminhtml/etc/events.xml
+++ b/app/code/Magento/Adminhtml/etc/events.xml
@@ -24,9 +24,6 @@
*/
-->
-
-
-
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/admin/popup.phtml b/app/code/Magento/Adminhtml/view/adminhtml/admin/popup.phtml
index faf7a1d261157..81d21c9c0da93 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/admin/popup.phtml
+++ b/app/code/Magento/Adminhtml/view/adminhtml/admin/popup.phtml
@@ -26,13 +26,13 @@
?>
-
+
404 ErrorPage not found.
]]>
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/default.xml b/app/code/Magento/Adminhtml/view/adminhtml/layout/default.xml
index 3980c42ad63e2..8b77671e35619 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/default.xml
+++ b/app/code/Magento/Adminhtml/view/adminhtml/layout/default.xml
@@ -272,7 +272,7 @@
-
+