diff --git a/CHANGELOG.md b/CHANGELOG.md
index 974e9df22c295..c440cb6de5ba6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,43 @@
+2.0.0.0-dev54
+=============
+* Modularity improvements:
+ * Breakdown of the Adminhtml module:
+ * Moved Newsletter, Report logic to the respective modules
+ * Moved blocks, config, view, layout files of other components from Adminhtml folder to respective modules
+ * Removed application dependencies from the library
+* Move Magento\Core common blocks in the library
+* Application areas rework:
+ * Areas are independent from Store
+ * Removed deprecated annotation from the getArea methods
+* GitHub requests:
+ * [#245](https://github.com/magento/magento2/pull/245) -- Resolve design flaws in core URL helper
+ * [#247](https://github.com/magento/magento2/pull/247) -- Bug in Mage_Page_Block_Html_Header->getIsHomePage
+ * [#259](https://github.com/magento/magento2/pull/259) -- Turkish Lira (TRY) is supported for Turkish members.
+ * [#262](https://github.com/magento/magento2/pull/262) -- Update Rule.php
+ * [#373](https://github.com/magento/magento2/pull/373) -- [Magento/Sales] Fixed typos
+ * [#382](https://github.com/magento/magento2/pull/382) -- [Magento/Core] Fixed typos
+ * [#304](https://github.com/magento/magento2/pull/304) -- Removed Erroneous closing "
+ * [#323](https://github.com/magento/magento2/pull/323) -- InstanceController.php - made setBody protected
+ * [#349](https://github.com/magento/magento2/pull/349) -- Move Mage_Catalog menu declaration into Mage_Catalog module.
+ * [#265](https://github.com/magento/magento2/pull/265) -- Update Merge.php
+ * [#271](https://github.com/magento/magento2/pull/271) -- Check Data should validate gallery information
+ * [#305](https://github.com/magento/magento2/pull/305) -- Extra ", tidied up nested quotes
+ * [#352](https://github.com/magento/magento2/pull/352) -- Add Croatia Country as part of European Union since 1st July 2013 for default european local countries in configuration
+ * [#224](https://github.com/magento/magento2/pull/224) -- Tax formatting is locale aware and should not
+ * [#338](https://github.com/magento/magento2/pull/338) -- Correcting SQL for required_options column
+ * [#327](https://github.com/magento/magento2/pull/327) -- cart api bug fix & partial invoice credit memo divide by zero warning
+* Themes update:
+ * Old frontend (magento_demo) and backend (magento_basic) themes are removed
+ * Updated templates and layout updates in the Bundle, Catalog, CatalogInventory, CatalogSearch, Downloadable, ProductAlert, Reports, Sendfriend modules
+* Fixed bugs:
+ * Fixed the error when Magento cannot be reinstalled to the same database with table prefix
+ * Fixed report Products in Cart
+ * Fixed error on attempt to insert image to CMS pages under version control
+ * Fixed order status grid so that you can assign state, edit, and view custom order status
+ * Fixed Related Products Rule page so that category can be selected on conditions tab
+ * Fixed Magento_Paypal_Controller_ExpressTest integration test so it is re-enabled
+ * Fixed the bug with international DHL quotes
+
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
@@ -10,9 +50,9 @@
* 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.
+ * [#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.
+ * [#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
@@ -29,11 +69,10 @@
* Moved Magento\Core\Model\Theme to the Magento\View component
* Moved Magento\Core\Model\Design to the Magento\View component
* Consistent declaration of page-types
- * The Framework part of the Cache functionality moved out from modules
* Themes update:
* Updated templates and layout updates in the Captcha, Customer, Newsletter, Persistent, ProductAlert, Wishlist modules; old files moved to the "magento-backup" theme
* Refactored and removed duplicate Persistent module templates
- * Plushe theme made responsive
+ * Plushe theme is responsive now
* Fixed bugs:
* Fixed inability to print order, invoice, or creditmemo in the frontend
* Fixed fatal error caused by the Mage_Backend_Block_System_Config_FormTest integration test
diff --git a/app/code/Magento/AdminNotification/Model/Feed.php b/app/code/Magento/AdminNotification/Model/Feed.php
index 4477bb68e9db7..4eb3679fa7884 100644
--- a/app/code/Magento/AdminNotification/Model/Feed.php
+++ b/app/code/Magento/AdminNotification/Model/Feed.php
@@ -49,9 +49,9 @@ class Feed extends \Magento\Core\Model\AbstractModel
protected $_feedUrl;
/**
- * @var \Magento\Core\Model\Store\Config
+ * @var \Magento\Backend\App\ConfigInterface
*/
- protected $_coreStoreConfig;
+ protected $_backendConfig;
/**
* @var \Magento\AdminNotification\Model\InboxFactory
@@ -61,7 +61,7 @@ class Feed extends \Magento\Core\Model\AbstractModel
/**
* @param \Magento\Core\Model\Context $context
* @param \Magento\Core\Model\Registry $registry
- * @param \Magento\Core\Model\Store\Config $coreStoreConfig
+ * @param \Magento\Backend\App\ConfigInterface $backendConfig
* @param \Magento\AdminNotification\Model\InboxFactory $inboxFactory
* @param \Magento\Core\Model\Resource\AbstractResource $resource
* @param \Magento\Data\Collection\Db $resourceCollection
@@ -70,14 +70,14 @@ class Feed extends \Magento\Core\Model\AbstractModel
public function __construct(
\Magento\Core\Model\Context $context,
\Magento\Core\Model\Registry $registry,
- \Magento\Core\Model\Store\Config $coreStoreConfig,
+ \Magento\Backend\App\ConfigInterface $backendConfig,
\Magento\AdminNotification\Model\InboxFactory $inboxFactory,
\Magento\Core\Model\Resource\AbstractResource $resource = null,
\Magento\Data\Collection\Db $resourceCollection = null,
array $data = array()
) {
parent::__construct($context, $registry, $resource, $resourceCollection, $data);
- $this->_coreStoreConfig = $coreStoreConfig;
+ $this->_backendConfig = $backendConfig;
$this->_inboxFactory = $inboxFactory;
}
@@ -97,9 +97,9 @@ protected function _construct()
*/
public function getFeedUrl()
{
- $httpPath = $this->_coreStoreConfig->getConfigFlag(self::XML_USE_HTTPS_PATH) ? 'https://' : 'http://';
+ $httpPath = $this->_backendConfig->getFlag(self::XML_USE_HTTPS_PATH) ? 'https://' : 'http://';
if (is_null($this->_feedUrl)) {
- $this->_feedUrl = $httpPath . $this->_coreStoreConfig->getConfig(self::XML_FEED_URL_PATH);
+ $this->_feedUrl = $httpPath . $this->_backendConfig->getValue(self::XML_FEED_URL_PATH);
}
return $this->_feedUrl;
}
@@ -158,7 +158,7 @@ public function getDate($rssDate)
*/
public function getFrequency()
{
- return $this->_coreStoreConfig->getConfig(self::XML_FREQUENCY_PATH) * 3600;
+ return $this->_backendConfig->getValue(self::XML_FREQUENCY_PATH) * 3600;
}
/**
diff --git a/app/code/Magento/AdminNotification/Model/System/Message/Security.php b/app/code/Magento/AdminNotification/Model/System/Message/Security.php
index ed4045d5c38e1..e24551a102af9 100644
--- a/app/code/Magento/AdminNotification/Model/System/Message/Security.php
+++ b/app/code/Magento/AdminNotification/Model/System/Message/Security.php
@@ -50,9 +50,9 @@ class Security
protected $_cache;
/**
- * @var \Magento\Core\Model\Store\Config
+ * @var \Magento\Backend\App\ConfigInterface
*/
- protected $_storeConfig;
+ protected $_backendConfig;
/**
* @var \Magento\Core\Model\Config
@@ -66,18 +66,18 @@ class Security
/**
* @param \Magento\App\CacheInterface $cache
- * @param \Magento\Core\Model\Store\Config $storeConfig
+ * @param \Magento\Backend\App\ConfigInterface $backendConfig
* @param \Magento\Core\Model\Config $config
* @param \Magento\HTTP\Adapter\CurlFactory $curlFactory
*/
public function __construct(
\Magento\App\CacheInterface $cache,
- \Magento\Core\Model\Store\Config $storeConfig,
+ \Magento\Backend\App\ConfigInterface $backendConfig,
\Magento\Core\Model\Config $config,
\Magento\HTTP\Adapter\CurlFactory $curlFactory
) {
$this->_cache = $cache;
- $this->_storeConfig = $storeConfig;
+ $this->_backendConfig = $backendConfig;
$this->_config = $config;
$this->_curlFactory = $curlFactory;
}
@@ -97,7 +97,7 @@ private function _canShowNotification()
return true;
}
- $adminSessionLifetime = (int) $this->_storeConfig->getConfig('admin/security/session_lifetime');
+ $adminSessionLifetime = (int) $this->_backendConfig->getValue('admin/security/session_lifetime');
$this->_cache->save(true, self::VERIFICATION_RESULT_CACHE_KEY, array(), $adminSessionLifetime);
return false;
}
diff --git a/app/code/Magento/Adminhtml/Block/Backup.php b/app/code/Magento/Adminhtml/Block/Backup.php
deleted file mode 100644
index 87cec4f4a322e..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Backup.php
+++ /dev/null
@@ -1,106 +0,0 @@
-
- */
-namespace Magento\Adminhtml\Block;
-
-class Backup extends \Magento\Adminhtml\Block\Template
-{
- /**
- * Block's template
- *
- * @var string
- */
- protected $_template = 'backup/list.phtml';
-
- protected function _prepareLayout()
- {
- parent::_prepareLayout();
- $this->addChild('createButton', 'Magento\Adminhtml\Block\Widget\Button', array(
- 'label' => __('Database Backup'),
- 'onclick' => "return backup.backup('" . \Magento\Backup\Helper\Data::TYPE_DB . "')",
- 'class' => 'task'
- ));
- $this->addChild('createSnapshotButton', 'Magento\Adminhtml\Block\Widget\Button', array(
- 'label' => __('System Backup'),
- 'onclick' => "return backup.backup('" . \Magento\Backup\Helper\Data::TYPE_SYSTEM_SNAPSHOT . "')",
- 'class' => ''
- ));
- $this->addChild('createMediaBackupButton', 'Magento\Adminhtml\Block\Widget\Button', array(
- 'label' => __('Database and Media Backup'),
- 'onclick' => "return backup.backup('" . \Magento\Backup\Helper\Data::TYPE_MEDIA . "')",
- 'class' => ''
- ));
-
- $this->addChild('dialogs', 'Magento\Adminhtml\Block\Backup\Dialogs');
- }
-
- public function getCreateButtonHtml()
- {
- return $this->getChildHtml('createButton');
- }
-
- /**
- * Generate html code for "Create System Snapshot" button
- *
- * @return string
- */
- public function getCreateSnapshotButtonHtml()
- {
- return $this->getChildHtml('createSnapshotButton');
- }
-
- /**
- * Generate html code for "Create Media Backup" button
- *
- * @return string
- */
- public function getCreateMediaBackupButtonHtml()
- {
- return $this->getChildHtml('createMediaBackupButton');
- }
-
- public function getGridHtml()
- {
- return $this->getChildHtml('backupsGrid');
- }
-
- /**
- * Generate html code for pop-up messages that will appear when user click on "Rollback" link
- *
- * @return string
- */
- public function getDialogsHtml()
- {
- return $this->getChildHtml('dialogs');
- }
-}
diff --git a/app/code/Magento/Adminhtml/Block/Html/Date.php b/app/code/Magento/Adminhtml/Block/Html/Date.php
deleted file mode 100644
index b66f44d120cbd..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Html/Date.php
+++ /dev/null
@@ -1,38 +0,0 @@
-
- */
-namespace Magento\Adminhtml\Block\Html;
-
-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
deleted file mode 100644
index ace827710884f..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Html/Select.php
+++ /dev/null
@@ -1,38 +0,0 @@
-
- */
-namespace Magento\Adminhtml\Block\Html;
-
-class Select extends \Magento\View\Block\Html\Select
-{
-}
diff --git a/app/code/Magento/Adminhtml/Block/Messages.php b/app/code/Magento/Adminhtml/Block/Messages.php
deleted file mode 100644
index 93896f840b8b7..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Messages.php
+++ /dev/null
@@ -1,39 +0,0 @@
-
- */
-namespace Magento\Adminhtml\Block;
-
-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
deleted file mode 100644
index 7a9af30931af3..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Newsletter/Problem.php
+++ /dev/null
@@ -1,108 +0,0 @@
-
- */
-namespace Magento\Adminhtml\Block\Newsletter;
-
-class Problem extends \Magento\Adminhtml\Block\Template
-{
-
- protected $_template = 'newsletter/problem/list.phtml';
-
- /**
- * @var \Magento\Newsletter\Model\Resource\Problem\Collection
- */
- protected $_problemCollection;
-
- /**
- * @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\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($context, $coreData, $data);
- }
-
- protected function _construct()
- {
- parent::_construct();
-
- $collection = $this->_problemCollection->addSubscriberInfo()
- ->addQueueInfo();
- }
-
- protected function _prepareLayout()
- {
- $this->setChild('deleteButton',
- $this->getLayout()->createBlock('Magento\Adminhtml\Block\Widget\Button', 'del.button')
- ->setData(
- array(
- 'label' => __('Delete Selected Problems'),
- 'onclick' => 'problemController.deleteSelected();'
- )
- )
- );
-
- $this->setChild('unsubscribeButton',
- $this->getLayout()->createBlock('Magento\Adminhtml\Block\Widget\Button', 'unsubscribe.button')
- ->setData(
- array(
- 'label' => __('Unsubscribe Selected'),
- 'onclick' => 'problemController.unsubscribe();'
- )
- )
- );
- return parent::_prepareLayout();
- }
-
- public function getUnsubscribeButtonHtml()
- {
- return $this->getChildHtml('unsubscribeButton');
- }
-
- public function getDeleteButtonHtml()
- {
- return $this->getChildHtml('deleteButton');
- }
-
- public function getShowButtons()
- {
- return $this->_problemCollection->getSize() > 0;
- }
-}// Class \Magento\Adminhtml\Block\Newsletter\Problem END
diff --git a/app/code/Magento/Adminhtml/Block/Newsletter/Problem/Grid/Filter/Checkbox.php b/app/code/Magento/Adminhtml/Block/Newsletter/Problem/Grid/Filter/Checkbox.php
deleted file mode 100644
index 4f5e7cb99376e..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Newsletter/Problem/Grid/Filter/Checkbox.php
+++ /dev/null
@@ -1,48 +0,0 @@
-
- */
-
-namespace Magento\Adminhtml\Block\Newsletter\Problem\Grid\Filter;
-
-class Checkbox extends \Magento\Adminhtml\Block\Widget\Grid\Column\Filter\AbstractFilter
-{
- public function getCondition()
- {
- return array();
- }
-
- public function getHtml()
- {
- return '';
- }
-}// Class \Magento\Adminhtml\Block\Newsletter\Subscriber\Grid\Filter\Checkbox END
diff --git a/app/code/Magento/Adminhtml/Block/Newsletter/Problem/Grid/Renderer/Checkbox.php b/app/code/Magento/Adminhtml/Block/Newsletter/Problem/Grid/Renderer/Checkbox.php
deleted file mode 100644
index d91543403f11b..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Newsletter/Problem/Grid/Renderer/Checkbox.php
+++ /dev/null
@@ -1,49 +0,0 @@
-
- */
-
-namespace Magento\Adminhtml\Block\Newsletter\Problem\Grid\Renderer;
-
-class Checkbox extends \Magento\Adminhtml\Block\Widget\Grid\Column\Renderer\AbstractRenderer
-{
- /**
- * Renders grid column
- *
- * @param \Magento\Object $row
- * @return string
- */
- public function render(\Magento\Object $row)
- {
- return '';
- }
-}// Class \Magento\Adminhtml\Block\Newsletter\Subscriber\Grid\Renderer\Checkbox END
diff --git a/app/code/Magento/Adminhtml/Block/Newsletter/Queue/Edit.php b/app/code/Magento/Adminhtml/Block/Newsletter/Queue/Edit.php
deleted file mode 100644
index 7dac9990abcdf..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Newsletter/Queue/Edit.php
+++ /dev/null
@@ -1,284 +0,0 @@
-_coreRegistry = $registry;
- $this->_wysiwygConfig = $wysiwygConfig;
- parent::__construct($context, $coreData, $data);
- }
-
- protected function _construct()
- {
- parent::_construct();
- $templateId = $this->getRequest()->getParam('template_id');
- if ($templateId) {
- $this->setTemplateId($templateId);
- }
- }
-
- /**
- * Retrieve current Newsletter Queue Object
- *
- * @return \Magento\Newsletter\Model\Queue
- */
- public function getQueue()
- {
- return $this->_coreRegistry->registry('current_queue');
- }
-
- protected function _beforeToHtml()
- {
- $this->setChild('form',
- $this->getLayout()->createBlock('Magento\Adminhtml\Block\Newsletter\Queue\Edit\Form','form')
- );
- return parent::_beforeToHtml();
- }
-
- public function getSaveUrl()
- {
- if ($this->getTemplateId()) {
- $params = array('template_id' => $this->getTemplateId());
- } else {
- $params = array('id' => $this->getRequest()->getParam('id'));
- }
- return $this->getUrl('adminhtml/*/save', $params);
- }
-
- protected function _prepareLayout()
- {
- // Load Wysiwyg on demand and Prepare layout
- if ($this->_wysiwygConfig->isEnabled()) {
- $this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);
- }
-
- $this->addChild('preview_button', 'Magento\Adminhtml\Block\Widget\Button', array(
- 'label' => __('Preview Template'),
- 'onclick' => 'queueControl.preview();',
- 'class' => 'preview'
- ));
-
- $this->addChild('save_button', 'Magento\Adminhtml\Block\Widget\Button', array(
- 'label' => __('Save Newsletter'),
- 'class' => 'save primary',
- 'data_attribute' => array(
- 'mage-init' => array(
- 'button' => array('event' => 'save', 'target' => '#queue_edit_form'),
- ),
- ),
- ));
-
- $this->addChild('save_and_resume', 'Magento\Adminhtml\Block\Widget\Button', array(
- 'label' => __('Save and Resume'),
- 'class' => 'save',
- 'data_attribute' => array(
- 'mage-init' => array(
- 'button' => array(
- 'event' => 'save',
- 'target' => '#queue_edit_form',
- 'eventData' => array(
- 'action' => array(
- 'args' => array('_resume' => 1),
- ),
- ),
- ),
- ),
- ),
- ));
-
- $this->addChild('reset_button', 'Magento\Adminhtml\Block\Widget\Button', array(
- 'label' => __('Reset'),
- 'onclick' => 'window.location = window.location'
- ));
-
- $this->addChild('back_button','Magento\Adminhtml\Block\Widget\Button', array(
- 'label' => __('Back'),
- 'onclick' => "window.location.href = '" . $this->getUrl((
- $this->getTemplateId() ? '*/newsletter_template/' : '*/*')) . "'",
- 'class' => 'action-back'
- ));
-
- return parent::_prepareLayout();
- }
-
- /**
- * Return preview action url for form
- *
- * @return string
- */
- public function getPreviewUrl()
- {
- return $this->getUrl('adminhtml/*/preview');
- }
-
- /**
- * Retrieve Preview Button HTML
- *
- * @return string
- */
- public function getPreviewButtonHtml()
- {
- return $this->getChildHtml('preview_button');
- }
-
- /**
- * Retrieve Save Button HTML
- *
- * @return string
- */
- public function getSaveButtonHtml()
- {
- return $this->getChildHtml('save_button');
- }
-
- /**
- * Retrieve Reset Button HTML
- *
- * @return string
- */
- public function getResetButtonHtml()
- {
- return $this->getChildHtml('reset_button');
- }
-
- /**
- * Retrieve Back Button HTML
- *
- * @return string
- */
- public function getBackButtonHtml()
- {
- return $this->getChildHtml('back_button');
- }
-
- /**
- * Retrieve Resume Button HTML
- *
- * @return string
- */
- public function getResumeButtonHtml()
- {
- return $this->getChildHtml('save_and_resume');
- }
-
- /**
- * Getter for availability preview mode
- *
- * @return boolean
- */
- public function getIsPreview()
- {
- return !in_array($this->getQueue()->getQueueStatus(), array(
- \Magento\Newsletter\Model\Queue::STATUS_NEVER,
- \Magento\Newsletter\Model\Queue::STATUS_PAUSE
- ));
- }
-
- /**
- * Getter for single store mode check
- *
- * @return boolean
- */
- protected function isSingleStoreMode()
- {
- return $this->_storeManager->isSingleStoreMode();
- }
-
- /**
- * Getter for id of current store (the only one in single-store mode and current in multi-stores mode)
- *
- * @return boolean
- */
- protected function getStoreId()
- {
- return $this->_storeManager->getStore(true)->getId();
- }
-
- /**
- * Getter for check is this newsletter the plain text.
- *
- * @return boolean
- */
- public function getIsTextType()
- {
- return $this->getQueue()->isPlain();
- }
-
- /**
- * Getter for availability resume action
- *
- * @return boolean
- */
- public function getCanResume()
- {
- return in_array($this->getQueue()->getQueueStatus(), array(
- \Magento\Newsletter\Model\Queue::STATUS_PAUSE
- ));
- }
-
- /**
- * Getter for header text
- *
- * @return boolean
- */
- public function getHeaderText()
- {
- return ( $this->getIsPreview() ? __('View Newsletter') : __('Edit Newsletter'));
- }
-}
diff --git a/app/code/Magento/Adminhtml/Block/Newsletter/Queue/Edit/Form.php b/app/code/Magento/Adminhtml/Block/Newsletter/Queue/Edit/Form.php
deleted file mode 100644
index 58a32c9340802..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Newsletter/Queue/Edit/Form.php
+++ /dev/null
@@ -1,252 +0,0 @@
-
- */
-
-namespace Magento\Adminhtml\Block\Newsletter\Queue\Edit;
-
-class Form extends \Magento\Backend\Block\Widget\Form\Generic
-{
- /**
- * @var \Magento\Cms\Model\Wysiwyg\Config
- */
- protected $_wysiwygConfig;
-
- /**
- * @var \Magento\Core\Model\System\Store
- */
- protected $_systemStore;
-
- /**
- * @var \Magento\Newsletter\Model\QueueFactory
- */
- protected $_queueFactory;
-
- /**
- * @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\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($context, $coreData, $registry, $formFactory, $data);
- }
-
- /**
- * Prepare form for newsletter queue editing.
- * Form can be run from newsletter template grid by option "Queue newsletter"
- * or from newsletter queue grid by edit option.
- *
- * @param void
- * @return \Magento\Adminhtml\Block\Newsletter\Queue\Edit\Form
- */
- protected function _prepareForm()
- {
- /* @var $queue \Magento\Newsletter\Model\Queue */
- $queue = $this->_queueFactory->create();
-
- /** @var \Magento\Data\Form $form */
- $form = $this->_formFactory->create();
-
- $fieldset = $form->addFieldset('base_fieldset', array(
- 'legend' => __('Queue Information'),
- 'class' => 'fieldset-wide'
- ));
-
- $dateFormat = $this->_locale->getDateFormat(\Magento\Core\Model\LocaleInterface::FORMAT_TYPE_MEDIUM);
- $timeFormat = $this->_locale->getTimeFormat(\Magento\Core\Model\LocaleInterface::FORMAT_TYPE_MEDIUM);
-
- if ($queue->getQueueStatus() == \Magento\Newsletter\Model\Queue::STATUS_NEVER) {
- $fieldset->addField('date', 'date', array(
- 'name' => 'start_at',
- 'date_format' => $dateFormat,
- 'time_format' => $timeFormat,
- 'label' => __('Queue Date Start'),
- 'image' => $this->getViewFileUrl('images/grid-cal.gif')
- ));
-
- if (!$this->_storeManager->hasSingleStore()) {
- $fieldset->addField('stores', 'multiselect', array(
- 'name' => 'stores[]',
- 'label' => __('Subscribers From'),
- 'image' => $this->getViewFileUrl('images/grid-cal.gif'),
- 'values' => $this->_systemStore->getStoreValuesForForm(),
- 'value' => $queue->getStores()
- ));
- } else {
- $fieldset->addField('stores', 'hidden', array(
- 'name' => 'stores[]',
- 'value' => $this->_storeManager->getStore(true)->getId()
- ));
- }
- } else {
- $fieldset->addField('date', 'date', array(
- 'name' => 'start_at',
- 'disabled' => 'true',
- 'style' => 'width:38%;',
- 'date_format' => $dateFormat,
- 'time_format' => $timeFormat,
- 'label' => __('Queue Date Start'),
- 'image' => $this->getViewFileUrl('images/grid-cal.gif')
- ));
-
- if (!$this->_storeManager->hasSingleStore()) {
- $fieldset->addField('stores', 'multiselect', array(
- 'name' => 'stores[]',
- 'label' => __('Subscribers From'),
- 'image' => $this->getViewFileUrl('images/grid-cal.gif'),
- 'required' => true,
- 'values' => $this->_systemStore->getStoreValuesForForm(),
- 'value' => $queue->getStores()
- ));
- } else {
- $fieldset->addField('stores', 'hidden', array(
- 'name' => 'stores[]',
- 'value' => $this->_storeManager->getStore(true)->getId()
- ));
- }
- }
-
- if ($queue->getQueueStartAt()) {
- $form->getElement('date')->setValue(
- $this->_locale->date($queue->getQueueStartAt(), \Magento\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT)
- );
- }
-
- $fieldset->addField('subject', 'text', array(
- 'name' =>'subject',
- 'label' => __('Subject'),
- 'required' => true,
- 'value' => (
- $queue->isNew() ? $queue->getTemplate()->getTemplateSubject() : $queue->getNewsletterSubject()
- )
- ));
-
- $fieldset->addField('sender_name', 'text', array(
- 'name' =>'sender_name',
- 'label' => __('Sender Name'),
- 'title' => __('Sender Name'),
- 'required' => true,
- 'value' => (
- $queue->isNew() ? $queue->getTemplate()->getTemplateSenderName() : $queue->getNewsletterSenderName()
- )
- ));
-
- $fieldset->addField('sender_email', 'text', array(
- 'name' =>'sender_email',
- 'label' => __('Sender Email'),
- 'title' => __('Sender Email'),
- 'class' => 'validate-email',
- 'required' => true,
- 'value' => (
- $queue->isNew() ? $queue->getTemplate()->getTemplateSenderEmail() : $queue->getNewsletterSenderEmail()
- )
- ));
-
- $widgetFilters = array('is_email_compatible' => 1);
- $wysiwygConfig = $this->_wysiwygConfig->getConfig(array('widget_filters' => $widgetFilters));
-
- if ($queue->isNew()) {
- $fieldset->addField('text', 'editor', array(
- 'name' => 'text',
- 'label' => __('Message'),
- 'state' => 'html',
- 'required' => true,
- 'value' => $queue->getTemplate()->getTemplateText(),
- 'style' => 'height: 600px;',
- 'config' => $wysiwygConfig
- ));
-
- $fieldset->addField('styles', 'textarea', array(
- 'name' =>'styles',
- 'label' => __('Newsletter Styles'),
- 'container_id' => 'field_newsletter_styles',
- 'value' => $queue->getTemplate()->getTemplateStyles()
- ));
- } elseif (\Magento\Newsletter\Model\Queue::STATUS_NEVER != $queue->getQueueStatus()) {
- $fieldset->addField('text', 'textarea', array(
- 'name' => 'text',
- 'label' => __('Message'),
- 'value' => $queue->getNewsletterText(),
- ));
-
- $fieldset->addField('styles', 'textarea', array(
- 'name' =>'styles',
- 'label' => __('Newsletter Styles'),
- 'value' => $queue->getNewsletterStyles()
- ));
-
- $form->getElement('text')->setDisabled('true')->setRequired(false);
- $form->getElement('styles')->setDisabled('true')->setRequired(false);
- $form->getElement('subject')->setDisabled('true')->setRequired(false);
- $form->getElement('sender_name')->setDisabled('true')->setRequired(false);
- $form->getElement('sender_email')->setDisabled('true')->setRequired(false);
- $form->getElement('stores')->setDisabled('true');
- } else {
- $fieldset->addField('text', 'editor', array(
- 'name' => 'text',
- 'label' => __('Message'),
- 'state' => 'html',
- 'required' => true,
- 'value' => $queue->getNewsletterText(),
- 'style' => 'height: 600px;',
- 'config' => $wysiwygConfig
- ));
-
- $fieldset->addField('styles', 'textarea', array(
- 'name' =>'styles',
- 'label' => __('Newsletter Styles'),
- 'value' => $queue->getNewsletterStyles(),
- 'style' => 'height: 300px;',
- ));
- }
-
- $this->setForm($form);
- return $this;
- }
-}
diff --git a/app/code/Magento/Adminhtml/Block/Newsletter/Queue/Grid/Renderer/Action.php b/app/code/Magento/Adminhtml/Block/Newsletter/Queue/Grid/Renderer/Action.php
deleted file mode 100644
index b7e0c66d06426..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Newsletter/Queue/Grid/Renderer/Action.php
+++ /dev/null
@@ -1,81 +0,0 @@
-
- */
-
-namespace Magento\Adminhtml\Block\Newsletter\Queue\Grid\Renderer;
-
-class Action extends \Magento\Adminhtml\Block\Widget\Grid\Column\Renderer\Action
-{
- public function render(\Magento\Object $row)
- {
- $actions = array();
-
- if($row->getQueueStatus()==\Magento\Newsletter\Model\Queue::STATUS_NEVER) {
- if(!$row->getQueueStartAt() && $row->getSubscribersTotal()) {
- $actions[] = array(
- 'url' => $this->getUrl('adminhtml/*/start', array('id'=>$row->getId())),
- 'caption' => __('Start')
- );
- }
- } else if ($row->getQueueStatus()==\Magento\Newsletter\Model\Queue::STATUS_SENDING) {
- $actions[] = array(
- 'url' => $this->getUrl('adminhtml/*/pause', array('id'=>$row->getId())),
- 'caption' => __('Pause')
- );
-
- $actions[] = array(
- 'url' => $this->getUrl('adminhtml/*/cancel', array('id'=>$row->getId())),
- 'confirm' => __('Do you really want to cancel the queue?'),
- 'caption' => __('Cancel')
- );
-
-
- } else if ($row->getQueueStatus()==\Magento\Newsletter\Model\Queue::STATUS_PAUSE) {
-
- $actions[] = array(
- 'url' => $this->getUrl('adminhtml/*/resume', array('id'=>$row->getId())),
- 'caption' => __('Resume')
- );
-
- }
-
- $actions[] = array(
- 'url' => $this->getUrl('adminhtml/newsletter_queue/preview',array('id'=>$row->getId())),
- 'caption' => __('Preview'),
- 'popup' => true
- );
-
- $this->getColumn()->setActions($actions);
- return parent::render($row);
- }
-}
diff --git a/app/code/Magento/Adminhtml/Block/Newsletter/Queue/Preview.php b/app/code/Magento/Adminhtml/Block/Newsletter/Queue/Preview.php
deleted file mode 100644
index e42e83e22f2b0..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Newsletter/Queue/Preview.php
+++ /dev/null
@@ -1,113 +0,0 @@
-
- */
-namespace Magento\Adminhtml\Block\Newsletter\Queue;
-
-class Preview extends \Magento\Adminhtml\Block\Widget
-{
- /**
- * @var \Magento\Newsletter\Model\TemplateFactory
- */
- protected $_templateFactory;
-
- /**
- * @var \Magento\Newsletter\Model\QueueFactory
- */
- protected $_queueFactory;
-
- /**
- * @var \Magento\Newsletter\Model\SubscriberFactory
- */
- protected $_subscriberFactory;
-
- /**
- * @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\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($context, $coreData, $data);
- }
-
- protected function _toHtml()
- {
- /* @var $template \Magento\Newsletter\Model\Template */
- $template = $this->_templateFactory->create();
-
- if ($id = (int)$this->getRequest()->getParam('id')) {
- $queue = $this->_queueFactory->create()->load($id);
- $template->setTemplateType($queue->getNewsletterType());
- $template->setTemplateText($queue->getNewsletterText());
- $template->setTemplateStyles($queue->getNewsletterStyles());
- } else {
- $template->setTemplateType($this->getRequest()->getParam('type'));
- $template->setTemplateText($this->getRequest()->getParam('text'));
- $template->setTemplateStyles($this->getRequest()->getParam('styles'));
- }
-
- $storeId = (int)$this->getRequest()->getParam('store_id');
- if (!$storeId) {
- $storeId = $this->_storeManager->getDefaultStoreView()->getId();
- }
-
- \Magento\Profiler::start("newsletter_queue_proccessing");
- $vars = array();
-
- $vars['subscriber'] = $this->_subscriberFactory->create();
-
- $template->emulateDesign($storeId);
- $templateProcessed = $template->getProcessedTemplate($vars, true);
- $template->revertDesign();
-
- if ($template->isPlain()) {
- $templateProcessed = "
" . htmlspecialchars($templateProcessed) . "
";
- }
-
- \Magento\Profiler::stop("newsletter_queue_proccessing");
-
- return $templateProcessed;
- }
-}
diff --git a/app/code/Magento/Adminhtml/Block/Newsletter/Queue/Preview/Form.php b/app/code/Magento/Adminhtml/Block/Newsletter/Queue/Preview/Form.php
deleted file mode 100644
index 5f7d41b594359..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Newsletter/Queue/Preview/Form.php
+++ /dev/null
@@ -1,73 +0,0 @@
-
- */
-namespace Magento\Adminhtml\Block\Newsletter\Queue\Preview;
-
-class Form extends \Magento\Backend\Block\Widget\Form\Generic
-{
- /**
- * Preparing from for revision page
- *
- * @return \Magento\Adminhtml\Block\Widget\Form
- */
- protected function _prepareForm()
- {
- /** @var \Magento\Data\Form $form */
- $form = $this->_formFactory->create(array(
- 'attributes' => array(
- 'id' => 'preview_form',
- 'action' => $this->getUrl('adminhtml/*/drop', array('_current' => true)),
- 'method' => 'post',
- ))
- );
-
- if ($data = $this->getFormData()) {
-
- $mapper = array('preview_store_id' => 'store_id');
-
- foreach ($data as $key => $value) {
- if(array_key_exists($key, $mapper)) {
- $name = $mapper[$key];
- } else {
- $name = $key;
- }
- $form->addField($key, 'hidden', array('name' => $name));
- }
- $form->setValues($data);
- }
-
- $form->setUseContainer(true);
- $this->setForm($form);
- return parent::_prepareForm();
- }
-}
diff --git a/app/code/Magento/Adminhtml/Block/Newsletter/Subscriber.php b/app/code/Magento/Adminhtml/Block/Newsletter/Subscriber.php
deleted file mode 100644
index 77983dbce8d05..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Newsletter/Subscriber.php
+++ /dev/null
@@ -1,111 +0,0 @@
-
- */
-
-namespace Magento\Adminhtml\Block\Newsletter;
-
-class Subscriber extends \Magento\Adminhtml\Block\Template
-{
- /**
- * Queue collection
- *
- * @var \Magento\Newsletter\Model\Resource\Queue\Collection
- */
- protected $_queueCollection = null;
-
- protected $_template = 'newsletter/subscriber/list.phtml';
-
- /**
- * @var \Magento\Newsletter\Model\Resource\Queue\CollectionFactory
- */
- protected $_collectionFactory;
-
- /**
- * @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\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($context, $coreData, $data);
- }
-
- /**
- * Prepares block to render
- *
- * @return \Magento\Adminhtml\Block\Newsletter\Subscriber
- */
- protected function _beforeToHtml()
- {
- return parent::_beforeToHtml();
- }
-
- /**
- * Return queue collection with loaded neversent queues
- *
- * @return \Magento\Newsletter\Model\Resource\Queue\Collection
- */
- public function getQueueCollection()
- {
- if (is_null($this->_queueCollection)) {
- /** @var $this->_queueCollection \Magento\Newsletter\Model\Resource\Queue\Collection */
- $this->_queueCollection = $this->_collectionFactory->create()
- ->addTemplateInfo()
- ->addOnlyUnsentFilter()
- ->load();
- }
-
- return $this->_queueCollection;
- }
-
- public function getShowQueueAdd()
- {
- return $this->getChildBlock('grid')->getShowQueueAdd();
- }
-
- /**
- * Return list of neversent queues for select
- *
- * @return array
- */
- public function getQueueAsOptions()
- {
- return $this->getQueueCollection()->toOptionArray();
- }
-}
diff --git a/app/code/Magento/Adminhtml/Block/Newsletter/Subscriber/Grid.php b/app/code/Magento/Adminhtml/Block/Newsletter/Subscriber/Grid.php
deleted file mode 100644
index 58d5307b946a5..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Newsletter/Subscriber/Grid.php
+++ /dev/null
@@ -1,77 +0,0 @@
-
- */
-namespace Magento\Adminhtml\Block\Newsletter\Subscriber;
-
-class Grid extends \Magento\Backend\Block\Widget\Grid
-{
- /**
- * @var \Magento\Newsletter\Model\QueueFactory
- */
- protected $_queueFactory;
-
- /**
- * @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\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($context, $coreData, $urlModel, $data);
- }
-
- /**
- * Prepare collection for grid
- *
- * @return \Magento\Backend\Block\Widget\Grid
- */
- protected function _prepareCollection()
- {
-
- if ($this->getRequest()->getParam('queue', false)) {
- $this->getCollection()->useQueue($this->_queueFactory->create()
- ->load($this->getRequest()->getParam('queue'))
- );
- }
-
- return parent::_prepareCollection();
- }
-}
diff --git a/app/code/Magento/Adminhtml/Block/Newsletter/Subscriber/Grid/Filter/Checkbox.php b/app/code/Magento/Adminhtml/Block/Newsletter/Subscriber/Grid/Filter/Checkbox.php
deleted file mode 100644
index 34144d5d71057..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Newsletter/Subscriber/Grid/Filter/Checkbox.php
+++ /dev/null
@@ -1,48 +0,0 @@
-
- */
-
-namespace Magento\Adminhtml\Block\Newsletter\Subscriber\Grid\Filter;
-
-class Checkbox extends \Magento\Adminhtml\Block\Widget\Grid\Column\Filter\AbstractFilter
-{
- public function getCondition()
- {
- return array();
- }
-
- public function getHtml()
- {
- return '';
- }
-}// Class \Magento\Adminhtml\Block\Newsletter\Subscriber\Grid\Filter\Checkbox END
diff --git a/app/code/Magento/Adminhtml/Block/Newsletter/Subscriber/Grid/Renderer/Checkbox.php b/app/code/Magento/Adminhtml/Block/Newsletter/Subscriber/Grid/Renderer/Checkbox.php
deleted file mode 100644
index b611525e22472..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Newsletter/Subscriber/Grid/Renderer/Checkbox.php
+++ /dev/null
@@ -1,54 +0,0 @@
-
- */
-
-namespace Magento\Adminhtml\Block\Newsletter\Subscriber\Grid\Renderer;
-
-class Checkbox extends \Magento\Adminhtml\Block\Widget\Grid\Column\Renderer\AbstractRenderer
-{
- /**
- * Renders grid column
- *
- * @param \Magento\Object $row
- * @return string
- */
- public function render(\Magento\Object $row)
- {
- if($row->getSubscriberStatus()==\Magento\Newsletter\Model\Subscriber::STATUS_SUBSCRIBED) {
- return '';
- } else {
- return '';
- }
-
- }
-}// Class \Magento\Adminhtml\Block\Newsletter\Subscriber\Grid\Renderer\Checkbox END
diff --git a/app/code/Magento/Adminhtml/Block/Newsletter/Template.php b/app/code/Magento/Adminhtml/Block/Newsletter/Template.php
deleted file mode 100644
index 87842f7a1bfe4..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Newsletter/Template.php
+++ /dev/null
@@ -1,59 +0,0 @@
-
- */
-
-namespace Magento\Adminhtml\Block\Newsletter;
-
-class Template extends \Magento\Adminhtml\Block\Template
-{
- protected $_template = 'newsletter/template/list.phtml';
-
- protected function _prepareLayout()
- {
- $this->setChild(
- 'grid',
- $this->getLayout()->createBlock('Magento\Adminhtml\Block\Newsletter\Template\Grid', 'newsletter.template.grid')
- );
- return parent::_prepareLayout();
- }
-
- public function getCreateUrl()
- {
- return $this->getUrl('adminhtml/*/new');
- }
-
- public function getHeaderText()
- {
- return __('Newsletter Templates');
- }
-}
diff --git a/app/code/Magento/Adminhtml/Block/Newsletter/Template/Edit.php b/app/code/Magento/Adminhtml/Block/Newsletter/Template/Edit.php
deleted file mode 100644
index e5e39f2044038..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Newsletter/Template/Edit.php
+++ /dev/null
@@ -1,360 +0,0 @@
-
- */
-namespace Magento\Adminhtml\Block\Newsletter\Template;
-
-class Edit extends \Magento\Adminhtml\Block\Widget
-{
- /**
- * Edit Block model
- *
- * @var bool
- */
- protected $_editMode = false;
-
- /**
- * Core registry
- *
- * @var \Magento\Core\Model\Registry
- */
- protected $_coreRegistry = null;
-
- /**
- * @var \Magento\Cms\Model\Wysiwyg\Config
- */
- protected $_wysiwygConfig;
-
- /**
- * @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\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($context, $coreData, $data);
- }
-
- /**
- * Retrieve template object
- *
- * @return \Magento\Newsletter\Model\Template
- */
- public function getModel()
- {
- return $this->_coreRegistry->registry('_current_template');
- }
-
- /**
- * Preparing block layout
- *
- * @return \Magento\Adminhtml\Block\Newsletter\Template\Edit
- */
- protected function _prepareLayout()
- {
- // Load Wysiwyg on demand and Prepare layout
- $block = $this->getLayout()->getBlock('head');
- if ($this->_wysiwygConfig->isEnabled() && $block) {
- $block->setCanLoadTinyMce(true);
- }
-
- $this->addChild('back_button', 'Magento\Adminhtml\Block\Widget\Button', array(
- 'label' => __('Back'),
- 'onclick' => "window.location.href = '" . $this->getUrl('adminhtml/*') . "'",
- 'class' => 'action-back'
- ));
-
- $this->addChild('reset_button', 'Magento\Adminhtml\Block\Widget\Button', array(
- 'label' => __('Reset'),
- 'onclick' => 'window.location.href = window.location.href',
- 'class' => 'reset'
- ));
-
- $this->addChild('to_plain_button', 'Magento\Adminhtml\Block\Widget\Button', array(
- 'label' => __('Convert to Plain Text'),
- 'onclick' => 'templateControl.stripTags();',
- 'id' => 'convert_button',
- 'class' => 'convert'
- ));
-
- $this->addChild('to_html_button', 'Magento\Adminhtml\Block\Widget\Button', array(
- 'label' => __('Return HTML Version'),
- 'onclick' => 'templateControl.unStripTags();',
- 'id' => 'convert_button_back',
- 'style' => 'display:none',
- 'class' => 'return'
- ));
-
- $this->addChild('save_button', 'Magento\Adminhtml\Block\Widget\Button', array(
- 'label' => __('Save Template'),
- 'onclick' => 'templateControl.save();',
- 'class' => 'save primary'
- ));
-
- $this->addChild('save_as_button', 'Magento\Adminhtml\Block\Widget\Button', array(
- 'label' => __('Save As'),
- 'onclick' => 'templateControl.saveAs();',
- 'class' => 'save-as'
- ));
-
- $this->addChild('preview_button', 'Magento\Adminhtml\Block\Widget\Button', array(
- 'label' => __('Preview Template'),
- 'onclick' => 'templateControl.preview();',
- 'class' => 'preview'
- ));
-
- $this->addChild('delete_button', 'Magento\Adminhtml\Block\Widget\Button', array(
- 'label' => __('Delete Template'),
- 'onclick' => 'templateControl.deleteTemplate();',
- 'class' => 'delete'
- ));
-
- return parent::_prepareLayout();
- }
-
- /**
- * Retrieve Back Button HTML
- *
- * @return string
- */
- public function getBackButtonHtml()
- {
- return $this->getChildHtml('back_button');
- }
-
- /**
- * Retrieve Reset Button HTML
- *
- * @return string
- */
- public function getResetButtonHtml()
- {
- return $this->getChildHtml('reset_button');
- }
-
- /**
- * Retrieve Convert To Plain Button HTML
- *
- * @return string
- */
- public function getToPlainButtonHtml()
- {
- return $this->getChildHtml('to_plain_button');
- }
-
- /**
- * Retrieve Convert to HTML Button HTML
- *
- * @return string
- */
- public function getToHtmlButtonHtml()
- {
- return $this->getChildHtml('to_html_button');
- }
-
- /**
- * Retrieve Save Button HTML
- *
- * @return string
- */
- public function getSaveButtonHtml()
- {
- return $this->getChildHtml('save_button');
- }
-
- /**
- * Retrieve Preview Button HTML
- *
- * @return string
- */
- public function getPreviewButtonHtml()
- {
- return $this->getChildHtml('preview_button');
- }
-
- /**
- * Retrieve Delete Button HTML
- *
- * @return string
- */
- public function getDeleteButtonHtml()
- {
- return $this->getChildHtml('delete_button');
- }
-
- /**
- * Retrieve Save as Button HTML
- *
- * @return string
- */
- public function getSaveAsButtonHtml()
- {
- return $this->getChildHtml('save_as_button');
- }
-
- /**
- * Set edit flag for block
- *
- * @param boolean $value
- * @return \Magento\Adminhtml\Block\Newsletter\Template\Edit
- */
- public function setEditMode($value = true)
- {
- $this->_editMode = (bool)$value;
- return $this;
- }
-
- /**
- * Return edit flag for block
- *
- * @return boolean
- */
- public function getEditMode()
- {
- return $this->_editMode;
- }
-
- /**
- * Return header text for form
- *
- * @return string
- */
- public function getHeaderText()
- {
- if ($this->getEditMode()) {
- return __('Edit Newsletter Template');
- }
-
- return __('New Newsletter Template');
- }
-
- /**
- * Return form block HTML
- *
- * @return string
- */
- public function getForm()
- {
- return $this->getLayout()
- ->createBlock('Magento\Adminhtml\Block\Newsletter\Template\Edit\Form')
- ->toHtml();
- }
-
- /**
- * Return return template name for JS
- *
- * @return string
- */
- public function getJsTemplateName()
- {
- return addcslashes($this->getModel()->getTemplateCode(), "\"\r\n\\");
- }
-
- /**
- * Return action url for form
- *
- * @return string
- */
- public function getSaveUrl()
- {
- return $this->getUrl('adminhtml/*/save');
- }
-
- /**
- * Return preview action url for form
- *
- * @return string
- */
- public function getPreviewUrl()
- {
- return $this->getUrl('adminhtml/*/preview');
- }
-
- /**
- * Check Template Type is Plain Text
- *
- * @return bool
- */
- public function isTextType()
- {
- return $this->getModel()->isPlain();
- }
-
- /**
- * Return delete url for customer group
- *
- * @return string
- */
- public function getDeleteUrl()
- {
- return $this->getUrl('adminhtml/*/delete', array('id' => $this->getRequest()->getParam('id')));
- }
-
- /**
- * Retrieve Save As Flag
- *
- * @return int
- */
- public function getSaveAsFlag()
- {
- return $this->getRequest()->getParam('_save_as_flag') ? '1' : '';
- }
-
- /**
- * Getter for single store mode check
- *
- * @return boolean
- */
- protected function isSingleStoreMode()
- {
- return $this->_storeManager->isSingleStoreMode();
- }
-
- /**
- * Getter for id of current store (the only one in single-store mode and current in multi-stores mode)
- *
- * @return boolean
- */
- protected function getStoreId()
- {
- return $this->_storeManager->getStore(true)->getId();
- }
-}
diff --git a/app/code/Magento/Adminhtml/Block/Newsletter/Template/Edit/Form.php b/app/code/Magento/Adminhtml/Block/Newsletter/Template/Edit/Form.php
deleted file mode 100644
index aca73a4d27877..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Newsletter/Template/Edit/Form.php
+++ /dev/null
@@ -1,178 +0,0 @@
-
- */
-namespace Magento\Adminhtml\Block\Newsletter\Template\Edit;
-
-class Form extends \Magento\Backend\Block\Widget\Form\Generic
-{
- /**
- * @var \Magento\Cms\Model\Wysiwyg\Config
- */
- protected $_wysiwygConfig;
-
- /**
- * @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\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($context, $coreData, $registry, $formFactory, $data);
- }
-
- /**
- * Retrieve template object
- *
- * @return \Magento\Newsletter\Model\Template
- */
- public function getModel()
- {
- return $this->_coreRegistry->registry('_current_template');
- }
-
- /**
- * Prepare form before rendering HTML
- *
- * @return \Magento\Adminhtml\Block\Newsletter\Template\Edit\Form
- */
- protected function _prepareForm()
- {
- $model = $this->getModel();
- $identity = $this->_storeConfig->getConfig(
- \Magento\Newsletter\Model\Subscriber::XML_PATH_UNSUBSCRIBE_EMAIL_IDENTITY
- );
- $identityName = $this->_storeConfig->getConfig('trans_email/ident_'.$identity.'/name');
- $identityEmail = $this->_storeConfig->getConfig('trans_email/ident_'.$identity.'/email');
-
- /** @var \Magento\Data\Form $form */
- $form = $this->_formFactory->create(array(
- 'attributes' => array(
- 'id' => 'edit_form',
- 'action' => $this->getData('action'),
- 'method' => 'post',
- ))
- );
-
- $fieldset = $form->addFieldset('base_fieldset', array(
- 'legend' => __('Template Information'),
- 'class' => 'fieldset-wide'
- ));
-
- if ($model->getId()) {
- $fieldset->addField('id', 'hidden', array(
- 'name' => 'id',
- 'value' => $model->getId(),
- ));
- }
-
- $fieldset->addField('code', 'text', array(
- 'name' => 'code',
- 'label' => __('Template Name'),
- 'title' => __('Template Name'),
- 'required' => true,
- 'value' => $model->getTemplateCode(),
- ));
-
- $fieldset->addField('subject', 'text', array(
- 'name' => 'subject',
- 'label' => __('Template Subject'),
- 'title' => __('Template Subject'),
- 'required' => true,
- 'value' => $model->getTemplateSubject(),
- ));
-
- $fieldset->addField('sender_name', 'text', array(
- 'name' =>'sender_name',
- 'label' => __('Sender Name'),
- 'title' => __('Sender Name'),
- 'required' => true,
- 'value' => $model->getId() !== null
- ? $model->getTemplateSenderName()
- : $identityName,
- ));
-
- $fieldset->addField('sender_email', 'text', array(
- 'name' =>'sender_email',
- 'label' => __('Sender Email'),
- 'title' => __('Sender Email'),
- 'class' => 'validate-email',
- 'required' => true,
- 'value' => $model->getId() !== null
- ? $model->getTemplateSenderEmail()
- : $identityEmail
- ));
-
-
- $widgetFilters = array('is_email_compatible' => 1);
- $wysiwygConfig = $this->_wysiwygConfig->getConfig(array('widget_filters' => $widgetFilters));
- if ($model->isPlain()) {
- $wysiwygConfig->setEnabled(false);
- }
- $fieldset->addField('text', 'editor', array(
- 'name' => 'text',
- 'label' => __('Template Content'),
- 'title' => __('Template Content'),
- 'required' => true,
- 'state' => 'html',
- 'style' => 'height:36em;',
- 'value' => $model->getTemplateText(),
- 'config' => $wysiwygConfig
- ));
-
- if (!$model->isPlain()) {
- $fieldset->addField('template_styles', 'textarea', array(
- 'name' =>'styles',
- 'label' => __('Template Styles'),
- 'container_id' => 'field_template_styles',
- 'value' => $model->getTemplateStyles()
- ));
- }
-
- $form->setAction($this->getUrl('adminhtml/*/save'));
- $form->setUseContainer(true);
- $this->setForm($form);
-
- return parent::_prepareForm();
- }
-}
diff --git a/app/code/Magento/Adminhtml/Block/Newsletter/Template/Grid.php b/app/code/Magento/Adminhtml/Block/Newsletter/Template/Grid.php
deleted file mode 100644
index e065b186a583f..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Newsletter/Template/Grid.php
+++ /dev/null
@@ -1,156 +0,0 @@
-
- */
-namespace Magento\Adminhtml\Block\Newsletter\Template;
-
-class Grid extends \Magento\Backend\Block\Widget\Grid\Extended
-{
- /**
- * @var \Magento\Newsletter\Model\Resource\Template\Collection
- */
- protected $_templateCollection;
-
- /**
- * @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\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($context, $coreData, $urlModel, $data);
- $this->setEmptyText(__('No Templates Found'));
- }
-
- protected function _prepareCollection()
- {
- $this->setCollection($this->_templateCollection->useOnlyActual());
-
- return parent::_prepareCollection();
- }
-
- protected function _prepareColumns()
- {
- $this->addColumn('template_code',
- array(
- 'header' => __('ID'),
- 'index' => 'template_id',
- 'header_css_class' => 'col-id',
- 'column_css_class' => 'col-id'
- ));
- $this->addColumn('code',
- array(
- 'header' => __('Template'),
- 'index' => 'template_code',
- 'header_css_class' => 'col-template',
- 'column_css_class' => 'col-template'
- ));
-
- $this->addColumn('added_at',
- array(
- 'header' => __('Added'),
- 'index' => 'added_at',
- 'gmtoffset' => true,
- 'type' => 'datetime',
- 'header_css_class' => 'col-added',
- 'column_css_class' => 'col-added'
- ));
-
- $this->addColumn('modified_at',
- array(
- 'header' => __('Updated'),
- 'index' => 'modified_at',
- 'gmtoffset' => true,
- 'type' => 'datetime',
- 'header_css_class' => 'col-updated',
- 'column_css_class' => 'col-updated'
- ));
-
- $this->addColumn('subject',
- array(
- 'header' => __('Subject'),
- 'index' => 'template_subject',
- 'header_css_class' => 'col-subject',
- 'column_css_class' => 'col-subject'
- ));
-
- $this->addColumn('sender',
- array(
- 'header' => __('Sender'),
- 'index' => 'template_sender_email',
- 'renderer' => 'Magento\Adminhtml\Block\Newsletter\Template\Grid\Renderer\Sender',
- 'header_css_class' => 'col-sender',
- 'column_css_class' => 'col-sender'
- ));
-
- $this->addColumn('type',
- array(
- 'header' => __('Template Type'),
- 'index' => 'template_type',
- 'type' => 'options',
- 'options' => array(
- \Magento\Newsletter\Model\Template::TYPE_HTML => 'html',
- \Magento\Newsletter\Model\Template::TYPE_TEXT => 'text'
- ),
- 'header_css_class' => 'col-type',
- 'column_css_class' => 'col-type'
- ));
-
- $this->addColumn('action',
- array(
- 'header' => __('Action'),
- 'index' => 'template_id',
- 'sortable' => false,
- 'filter' => false,
- 'no_link' => true,
- 'renderer' => 'Magento\Adminhtml\Block\Newsletter\Template\Grid\Renderer\Action',
- 'header_css_class' => 'col-actions',
- 'column_css_class' => 'col-actions'
- ));
-
- return $this;
- }
-
- public function getRowUrl($row)
- {
- return $this->getUrl('adminhtml/*/edit', array('id'=>$row->getId()));
- }
-}
-
diff --git a/app/code/Magento/Adminhtml/Block/Newsletter/Template/Grid/Renderer/Action.php b/app/code/Magento/Adminhtml/Block/Newsletter/Template/Grid/Renderer/Action.php
deleted file mode 100644
index e30fbd8a666f7..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Newsletter/Template/Grid/Renderer/Action.php
+++ /dev/null
@@ -1,64 +0,0 @@
-
- */
-
-namespace Magento\Adminhtml\Block\Newsletter\Template\Grid\Renderer;
-
-class Action extends \Magento\Adminhtml\Block\Widget\Grid\Column\Renderer\Action
-{
- /**
- * Renderer for "Action" column in Newsletter templates grid
- *
- * @var \Magento\Newsletter\Model\Template $row
- * @return string
- */
- public function render(\Magento\Object $row)
- {
- if($row->isValidForSend()) {
- $actions[] = array(
- 'url' => $this->getUrl('adminhtml/newsletter_queue/edit', array('template_id' => $row->getId())),
- 'caption' => __('Queue Newsletter...')
- );
- }
-
- $actions[] = array(
- 'url' => $this->getUrl('adminhtml/*/preview', array('id'=>$row->getId())),
- 'popup' => true,
- 'caption' => __('Preview')
- );
-
- $this->getColumn()->setActions($actions);
-
- return parent::render($row);
- }
-}
diff --git a/app/code/Magento/Adminhtml/Block/Newsletter/Template/Preview.php b/app/code/Magento/Adminhtml/Block/Newsletter/Template/Preview.php
deleted file mode 100644
index f60823e8bcd46..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Newsletter/Template/Preview.php
+++ /dev/null
@@ -1,105 +0,0 @@
-
- */
-namespace Magento\Adminhtml\Block\Newsletter\Template;
-
-class Preview extends \Magento\Adminhtml\Block\Widget
-{
- /**
- * @var \Magento\Newsletter\Model\TemplateFactory
- */
- protected $_templateFactory;
-
- /**
- * @var \Magento\Newsletter\Model\SubscriberFactory
- */
- protected $_subscriberFactory;
-
- /**
- * @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\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($context, $coreData, $data);
- }
-
- protected function _toHtml()
- {
- /* @var $template \Magento\Newsletter\Model\Template */
- $template = $this->_templateFactory->create();
-
- if ($id = (int)$this->getRequest()->getParam('id')) {
- $template->load($id);
- } else {
- $template->setTemplateType($this->getRequest()->getParam('type'));
- $template->setTemplateText($this->getRequest()->getParam('text'));
- $template->setTemplateStyles($this->getRequest()->getParam('styles'));
- }
-
- $storeId = (int)$this->getRequest()->getParam('store_id');
- if (!$storeId) {
- $storeId = $this->_storeManager->getDefaultStoreView()->getId();
- }
-
- \Magento\Profiler::start("newsletter_template_proccessing");
- $vars = array();
-
- $vars['subscriber'] = $this->_subscriberFactory->create();
- if ($this->getRequest()->getParam('subscriber')) {
- $vars['subscriber']->load($this->getRequest()->getParam('subscriber'));
- }
-
- $template->emulateDesign($storeId);
- $templateProcessed = $template->getProcessedTemplate($vars, true);
- $template->revertDesign();
-
- if ($template->isPlain()) {
- $templateProcessed = "" . htmlspecialchars($templateProcessed) . "
";
- }
-
- \Magento\Profiler::stop("newsletter_template_proccessing");
-
- return $templateProcessed;
- }
-}
diff --git a/app/code/Magento/Adminhtml/Block/Newsletter/Template/Preview/Form.php b/app/code/Magento/Adminhtml/Block/Newsletter/Template/Preview/Form.php
deleted file mode 100644
index 77b03cd1cca24..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Newsletter/Template/Preview/Form.php
+++ /dev/null
@@ -1,73 +0,0 @@
-
- */
-namespace Magento\Adminhtml\Block\Newsletter\Template\Preview;
-
-class Form extends \Magento\Backend\Block\Widget\Form\Generic
-{
- /**
- * Preparing from for revision page
- *
- * @return \Magento\Adminhtml\Block\Widget\Form
- */
- protected function _prepareForm()
- {
- /** @var \Magento\Data\Form $form */
- $form = $this->_formFactory->create(array(
- 'attributes' => array(
- 'id' => 'preview_form',
- 'action' => $this->getUrl('adminhtml/*/drop', array('_current' => true)),
- 'method' => 'post',
- ))
- );
-
- if ($data = $this->getFormData()) {
-
- $mapper = array('preview_store_id' => 'store_id');
-
- foreach ($data as $key => $value) {
- if (array_key_exists($key, $mapper)) {
- $name = $mapper[$key];
- } else {
- $name = $key;
- }
- $form->addField($key, 'hidden', array('name' => $name));
- }
- $form->setValues($data);
- }
-
- $form->setUseContainer(true);
- $this->setForm($form);
- return parent::_prepareForm();
- }
-}
diff --git a/app/code/Magento/Adminhtml/Block/Report/Filter/Form.php b/app/code/Magento/Adminhtml/Block/Report/Filter/Form.php
deleted file mode 100644
index cd74153c9abd3..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Report/Filter/Form.php
+++ /dev/null
@@ -1,244 +0,0 @@
-
- */
-namespace Magento\Adminhtml\Block\Report\Filter;
-
-class Form extends \Magento\Backend\Block\Widget\Form\Generic
-{
- /**
- * Report type options
- */
- protected $_reportTypeOptions = array();
-
- /**
- * Report field visibility
- */
- protected $_fieldVisibility = array();
-
- /**
- * Report field opions
- */
- protected $_fieldOptions = array();
-
- /**
- * Set field visibility
- *
- * @param string Field id
- * @param bool Field visibility
- */
- public function setFieldVisibility($fieldId, $visibility)
- {
- $this->_fieldVisibility[$fieldId] = (bool)$visibility;
- }
-
- /**
- * Get field visibility
- *
- * @param string Field id
- * @param bool Default field visibility
- * @return bool
- */
- public function getFieldVisibility($fieldId, $defaultVisibility = true)
- {
- if (!array_key_exists($fieldId, $this->_fieldVisibility)) {
- return $defaultVisibility;
- }
- return $this->_fieldVisibility[$fieldId];
- }
-
- /**
- * Set field option(s)
- *
- * @param string $fieldId Field id
- * @param mixed $option Field option name
- * @param mixed $value Field option value
- */
- public function setFieldOption($fieldId, $option, $value = null)
- {
- if (is_array($option)) {
- $options = $option;
- } else {
- $options = array($option => $value);
- }
- if (!array_key_exists($fieldId, $this->_fieldOptions)) {
- $this->_fieldOptions[$fieldId] = array();
- }
- foreach ($options as $k => $v) {
- $this->_fieldOptions[$fieldId][$k] = $v;
- }
- }
-
- /**
- * Add report type option
- *
- * @param string $key
- * @param string $value
- * @return \Magento\Adminhtml\Block\Report\Filter\Form
- */
- public function addReportTypeOption($key, $value)
- {
- $this->_reportTypeOptions[$key] = __($value);
- return $this;
- }
-
- /**
- * Add fieldset with general report fields
- *
- * @return \Magento\Adminhtml\Block\Report\Filter\Form
- */
- protected function _prepareForm()
- {
- $actionUrl = $this->getUrl('adminhtml/*/sales');
-
- /** @var \Magento\Data\Form $form */
- $form = $this->_formFactory->create(array(
- 'attributes' => array(
- 'id' => 'filter_form',
- 'action' => $actionUrl,
- 'method' => 'get',
- ))
- );
-
- $htmlIdPrefix = 'sales_report_';
- $form->setHtmlIdPrefix($htmlIdPrefix);
- $fieldset = $form->addFieldset('base_fieldset', array('legend'=>__('Filter')));
-
- $dateFormat = $this->_locale->getDateFormat(\Magento\Core\Model\LocaleInterface::FORMAT_TYPE_SHORT);
-
- $fieldset->addField('store_ids', 'hidden', array(
- 'name' => 'store_ids'
- ));
-
- $fieldset->addField('report_type', 'select', array(
- 'name' => 'report_type',
- 'options' => $this->_reportTypeOptions,
- 'label' => __('Match Period To'),
- ));
-
- $fieldset->addField('period_type', 'select', array(
- 'name' => 'period_type',
- 'options' => array(
- 'day' => __('Day'),
- 'month' => __('Month'),
- 'year' => __('Year')
- ),
- 'label' => __('Period'),
- 'title' => __('Period')
- ));
-
- $fieldset->addField('from', 'date', array(
- 'name' => 'from',
- 'date_format' => $dateFormat,
- 'image' => $this->getViewFileUrl('images/grid-cal.gif'),
- 'label' => __('From'),
- 'title' => __('From'),
- 'required' => true
- ));
-
- $fieldset->addField('to', 'date', array(
- 'name' => 'to',
- 'date_format' => $dateFormat,
- 'image' => $this->getViewFileUrl('images/grid-cal.gif'),
- 'label' => __('To'),
- 'title' => __('To'),
- 'required' => true
- ));
-
- $fieldset->addField('show_empty_rows', 'select', array(
- 'name' => 'show_empty_rows',
- 'options' => array(
- '1' => __('Yes'),
- '0' => __('No')
- ),
- 'label' => __('Empty Rows'),
- 'title' => __('Empty Rows')
- ));
-
- $form->setUseContainer(true);
- $this->setForm($form);
-
- return parent::_prepareForm();
- }
-
- /**
- * Initialize form fileds values
- * Method will be called after prepareForm and can be used for field values initialization
- *
- * @return \Magento\Adminhtml\Block\Widget\Form
- */
- protected function _initFormValues()
- {
- $data = $this->getFilterData()->getData();
- foreach ($data as $key => $value) {
- if (is_array($value) && isset($value[0])) {
- $data[$key] = explode(',', $value[0]);
- }
- }
- $this->getForm()->addValues($data);
- return parent::_initFormValues();
- }
-
- /**
- * This method is called before rendering HTML
- *
- * @return \Magento\Adminhtml\Block\Widget\Form
- */
- protected function _beforeToHtml()
- {
- $result = parent::_beforeToHtml();
-
- /** @var \Magento\Data\Form\Element\Fieldset $fieldset */
- $fieldset = $this->getForm()->getElement('base_fieldset');
-
- if (is_object($fieldset) && $fieldset instanceof \Magento\Data\Form\Element\Fieldset) {
- // apply field visibility
- foreach ($fieldset->getElements() as $field) {
- if (!$this->getFieldVisibility($field->getId())) {
- $fieldset->removeField($field->getId());
- }
- }
- // apply field options
- foreach ($this->_fieldOptions as $fieldId => $fieldOptions) {
- $field = $fieldset->getElements()->searchById($fieldId);
- /** @var \Magento\Object $field */
- if ($field) {
- foreach ($fieldOptions as $k => $v) {
- $field->setDataUsingMethod($k, $v);
- }
- }
- }
- }
-
- return $result;
- }
-}
diff --git a/app/code/Magento/Adminhtml/Block/Report/Grid/Column/Renderer/Customer.php b/app/code/Magento/Adminhtml/Block/Report/Grid/Column/Renderer/Customer.php
deleted file mode 100644
index 89662e998c86c..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Report/Grid/Column/Renderer/Customer.php
+++ /dev/null
@@ -1,59 +0,0 @@
-
- */
-namespace Magento\Adminhtml\Block\Report\Grid\Column\Renderer;
-
-class Customer
- extends \Magento\Adminhtml\Block\Widget\Grid\Column\Renderer\AbstractRenderer
-{
- /**
- * Renders grid column
- *
- * @param \Magento\Object $row
- * @return string
- */
- public function render(\Magento\Object $row)
- {
- $id = $row->getCustomerId();
-
- if (!$id) {
- return __('Show Reviews');
- }
-
- return sprintf('%s',
- $this->getUrl('adminhtml/catalog_product_review', array('customerId' => $id)),
- __('Show Reviews')
- );
- }
-}
diff --git a/app/code/Magento/Adminhtml/Block/Report/Grid/Column/Renderer/Product.php b/app/code/Magento/Adminhtml/Block/Report/Grid/Column/Renderer/Product.php
deleted file mode 100644
index 7e2f7e3381bc0..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Report/Grid/Column/Renderer/Product.php
+++ /dev/null
@@ -1,55 +0,0 @@
-
- */
-namespace Magento\Adminhtml\Block\Report\Grid\Column\Renderer;
-
-class Product
- extends \Magento\Adminhtml\Block\Widget\Grid\Column\Renderer\AbstractRenderer
-{
- /**
- * Renders grid column
- *
- * @param \Magento\Object $row
- * @return string
- */
- public function render(\Magento\Object $row)
- {
- $id = $row->getId();
-
- return sprintf('%s',
- $this->getUrl('catalog/product_review/', array('productId' => $id)),
- __('Show Reviews')
- );
- }
-}
diff --git a/app/code/Magento/Adminhtml/Block/Report/Grid/Shopcart.php b/app/code/Magento/Adminhtml/Block/Report/Grid/Shopcart.php
deleted file mode 100644
index 51b4fbd42d487..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Report/Grid/Shopcart.php
+++ /dev/null
@@ -1,86 +0,0 @@
-
- */
-namespace Magento\Adminhtml\Block\Report\Grid;
-
-class Shopcart extends \Magento\Backend\Block\Widget\Grid\Extended
-{
- /**
- * stores current currency code
- */
- protected $_currentCurrencyCode = null;
-
- /**
- * ids of current stores
- */
- protected $_storeIds = array();
-
- /**
- * storeIds setter
- *
- * @param array $storeIds
- * @return \Magento\Adminhtml\Block\Report\Grid\Shopcart
- */
- public function setStoreIds($storeIds)
- {
- $this->_storeIds = $storeIds;
- return $this;
- }
-
- /**
- * Retrieve currency code based on selected store
- *
- * @return string
- */
- public function getCurrentCurrencyCode()
- {
- if (is_null($this->_currentCurrencyCode)) {
- reset($this->_storeIds);
- $this->_currentCurrencyCode = (count($this->_storeIds) > 0)
- ? $this->_storeManager->getStore(current($this->_storeIds))->getBaseCurrencyCode()
- : $this->_storeManager->getStore()->getBaseCurrencyCode();
- }
- return $this->_currentCurrencyCode;
- }
-
- /**
- * Get currency rate (base to given currency)
- *
- * @param string|\Magento\Directory\Model\Currency $currencyCode
- * @return double
- */
- public function getRate($toCurrency)
- {
- return $this->_storeManager->getStore()->getBaseCurrency()->getRate($toCurrency);
- }
-}
diff --git a/app/code/Magento/Adminhtml/Block/Report/Product.php b/app/code/Magento/Adminhtml/Block/Report/Product.php
deleted file mode 100644
index de2056200a261..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Report/Product.php
+++ /dev/null
@@ -1,47 +0,0 @@
-
- */
-namespace Magento\Adminhtml\Block\Report;
-
-class Product extends \Magento\Adminhtml\Block\Widget\Grid\Container
-{
-
- protected function _construct()
- {
- $this->_controller = 'report_product';
- $this->_headerText = __('Products Report');
- parent::_construct();
- $this->_removeButton('add');
- }
-
-}
diff --git a/app/code/Magento/Adminhtml/Block/Report/Product/Downloads/Grid.php b/app/code/Magento/Adminhtml/Block/Report/Product/Downloads/Grid.php
deleted file mode 100644
index 92839062b4071..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Report/Product/Downloads/Grid.php
+++ /dev/null
@@ -1,147 +0,0 @@
-
- */
-namespace Magento\Adminhtml\Block\Report\Product\Downloads;
-
-class Grid extends \Magento\Adminhtml\Block\Widget\Grid
-{
- /**
- * @var \Magento\Reports\Model\Resource\Product\Downloads\CollectionFactory
- */
- protected $_downloadsFactory;
-
- /**
- * @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\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($context, $coreData, $urlModel, $data);
- }
-
- protected function _construct()
- {
- parent::_construct();
- $this->setId('downloadsGrid');
- $this->setUseAjax(false);
- }
-
- protected function _prepareCollection()
- {
- if ($this->getRequest()->getParam('website')) {
- $storeIds = $this->_storeManager->getWebsite($this->getRequest()->getParam('website'))->getStoreIds();
- $storeId = array_pop($storeIds);
- } else if ($this->getRequest()->getParam('group')) {
- $storeIds = $this->_storeManager->getGroup($this->getRequest()->getParam('group'))->getStoreIds();
- $storeId = array_pop($storeIds);
- } else if ($this->getRequest()->getParam('store')) {
- $storeId = (int)$this->getRequest()->getParam('store');
- } else {
- $storeId = '';
- }
-
- $collection = $this->_downloadsFactory->create()
- ->addAttributeToSelect('*')
- ->setStoreId($storeId)
- ->addAttributeToFilter('type_id', array(\Magento\Downloadable\Model\Product\Type::TYPE_DOWNLOADABLE))
- ->addSummary();
-
- if ($storeId) {
- $collection->addStoreFilter($storeId);
- }
-
- $this->setCollection($collection);
- return parent::_prepareCollection();
- }
-
- protected function _prepareColumns()
- {
- $this->addColumn('name', array(
- 'header' => __('Product'),
- 'index' => 'name',
- 'header_css_class' => 'col-product',
- 'column_css_class' => 'col-product'
- ));
-
- $this->addColumn('link_title', array(
- 'header' => __('Link'),
- 'index' => 'link_title',
- 'header_css_class' => 'col-link',
- 'column_css_class' => 'col-link'
- ));
-
- $this->addColumn('sku', array(
- 'header' =>__('SKU'),
- 'index' =>'sku',
- 'header_css_class' => 'col-sku',
- 'column_css_class' => 'col-sku'
- ));
-
- $this->addColumn('purchases', array(
- 'header' => __('Purchases'),
- 'width' => '215px',
- 'align' => 'right',
- 'filter' => false,
- 'index' => 'purchases',
- 'type' => 'number',
- 'renderer' => 'Magento\Adminhtml\Block\Report\Product\Downloads\Renderer\Purchases',
- 'header_css_class' => 'col-purchases',
- 'column_css_class' => 'col-purchases'
- ));
-
- $this->addColumn('downloads', array(
- 'header' => __('Downloads'),
- 'width' => '215px',
- 'align' => 'right',
- 'filter' => false,
- 'index' => 'downloads',
- 'type' => 'number',
- 'header_css_class' => 'col-qty',
- 'column_css_class' => 'col-qty'
- ));
-
- $this->addExportType('*/*/exportDownloadsCsv', __('CSV'));
- $this->addExportType('*/*/exportDownloadsExcel', __('Excel XML'));
-
- return parent::_prepareColumns();
- }
-}
diff --git a/app/code/Magento/Adminhtml/Block/Report/Product/Grid.php b/app/code/Magento/Adminhtml/Block/Report/Product/Grid.php
deleted file mode 100644
index e5b71fae7b322..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Report/Product/Grid.php
+++ /dev/null
@@ -1,149 +0,0 @@
-
- */
-namespace Magento\Adminhtml\Block\Report\Product;
-
-class Grid extends \Magento\Backend\Block\Widget\Grid\Extended
-{
- /**
- * @var \Magento\Reports\Model\Resource\Product\CollectionFactory
- */
- protected $_collectionFactory;
-
- /**
- * @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\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($context, $coreData, $urlModel, $data);
- }
-
- protected function _construct()
- {
- parent::_construct();
- $this->setId('productsReportGrid');
- $this->setDefaultSort('entity_id');
- $this->setDefaultDir('desc');
- }
-
- protected function _prepareCollection()
- {
-
- $collection = $this->_collectionFactory->create();
- $collection->getEntity()->setStore(0);
-
- $this->setCollection($collection);
-
- return parent::_prepareCollection();
- }
-
- protected function _afterLoadCollection()
- {
- $totalObj = new \Magento\Reports\Model\Totals();
- $this->setTotals($totalObj->countTotals($this));
- }
-
- protected function _prepareColumns()
- {
- $this->addColumn('entity_id', array(
- 'header' =>__('ID'),
- 'width' =>'50px',
- 'index' =>'entity_id',
- 'total' =>'Total'
- ));
-
- $this->addColumn('name', array(
- 'header' =>__('Name'),
- 'index' =>'name'
- ));
-
- $this->addColumn('viewed', array(
- 'header' =>__('Viewed'),
- 'width' =>'50px',
- 'align' =>'right',
- 'index' =>'viewed',
- 'total' =>'sum'
- ));
-
- $this->addColumn('added', array(
- 'header' =>__('Added'),
- 'width' =>'50px',
- 'align' =>'right',
- 'index' =>'added',
- 'total' =>'sum'
- ));
-
- $this->addColumn('purchased', array(
- 'header' =>__('Purchased'),
- 'width' =>'50px',
- 'align' =>'right',
- 'index' =>'purchased',
- 'total' =>'sum'
- ));
-
- $this->addColumn('fulfilled', array(
- 'header' =>__('Fulfilled'),
- 'width' =>'50px',
- 'align' =>'right',
- 'index' =>'fulfilled',
- 'total' =>'sum'
- ));
-
- $this->addColumn('revenue', array(
- 'header' =>__('Revenue'),
- 'width' =>'50px',
- 'align' =>'right',
- 'index' =>'revenue',
- 'total' =>'sum'
- ));
-
- $this->setCountTotals(true);
-
- $this->addExportType('*/*/exportProductsCsv', __('CSV'));
- $this->addExportType('*/*/exportProductsExcel', __('Excel XML'));
-
- return parent::_prepareColumns();
- }
-
-}
-
diff --git a/app/code/Magento/Adminhtml/Block/Report/Product/Lowstock/Grid.php b/app/code/Magento/Adminhtml/Block/Report/Product/Lowstock/Grid.php
deleted file mode 100644
index 5f415544878d0..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Report/Product/Lowstock/Grid.php
+++ /dev/null
@@ -1,99 +0,0 @@
-
- */
-namespace Magento\Adminhtml\Block\Report\Product\Lowstock;
-
-class Grid extends \Magento\Backend\Block\Widget\Grid
-{
- /**
- * @var \Magento\Reports\Model\Resource\Product\Lowstock\CollectionFactory
- */
- protected $_lowstocksFactory;
-
- /**
- * @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\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($context, $coreData, $urlModel, $data);
- }
-
- /**
- * @return \Magento\Backend\Block\Widget\Grid
- */
- protected function _prepareCollection()
- {
- $website = $this->getRequest()->getParam('website');
- $group = $this->getRequest()->getParam('group');
- $store = $this->getRequest()->getParam('store');
-
- if ($website) {
- $storeIds = $this->_storeManager->getWebsite($website)->getStoreIds();
- $storeId = array_pop($storeIds);
- } else if ($group) {
- $storeIds = $this->_storeManager->getGroup($group)->getStoreIds();
- $storeId = array_pop($storeIds);
- } else if ($store) {
- $storeId = (int)$store;
- } else {
- $storeId = '';
- }
-
- /** @var $collection \Magento\Reports\Model\Resource\Product\Lowstock\Collection */
- $collection = $this->_lowstocksFactory->create()
- ->addAttributeToSelect('*')
- ->setStoreId($storeId)
- ->filterByIsQtyProductTypes()
- ->joinInventoryItem('qty')
- ->useManageStockFilter($storeId)
- ->useNotifyStockQtyFilter($storeId)
- ->setOrder('qty', \Magento\Data\Collection::SORT_ORDER_ASC);
-
- if ($storeId) {
- $collection->addStoreFilter($storeId);
- }
-
- $this->setCollection($collection);
- return parent::_prepareCollection();
- }
-}
diff --git a/app/code/Magento/Adminhtml/Block/Report/Product/Viewed/Grid.php b/app/code/Magento/Adminhtml/Block/Report/Product/Viewed/Grid.php
deleted file mode 100644
index d23166185dde2..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Report/Product/Viewed/Grid.php
+++ /dev/null
@@ -1,134 +0,0 @@
-
- */
-namespace Magento\Adminhtml\Block\Report\Product\Viewed;
-
-class Grid extends \Magento\Adminhtml\Block\Report\Grid\AbstractGrid
-{
- /**
- * Column for grid to be grouped by
- *
- * @var string
- */
- protected $_columnGroupBy = 'period';
-
- /**
- * Grid resource collection name
- *
- * @var string
- */
- protected $_resourceCollectionName = 'Magento\Reports\Model\Resource\Report\Product\Viewed\Collection';
-
- /**
- * Init grid parameters
- */
- protected function _construct()
- {
- parent::_construct();
- $this->setCountTotals(true);
- }
-
- /**
- * Custom columns preparation
- *
- * @return \Magento\Adminhtml\Block\Widget\Grid
- */
- protected function _prepareColumns()
- {
- $this->addColumn('period', array(
- 'header' => __('Interval'),
- 'index' => 'period',
- 'width' => 100,
- 'sortable' => false,
- 'period_type' => $this->getPeriodType(),
- 'renderer' => 'Magento\Adminhtml\Block\Report\Sales\Grid\Column\Renderer\Date',
- 'totals_label' => __('Total'),
- 'html_decorators' => array('nobr'),
- 'header_css_class' => 'col-period',
- 'column_css_class' => 'col-period'
- ));
-
- $this->addColumn('product_name', array(
- 'header' => __('Product'),
- 'index' => 'product_name',
- 'type' => 'string',
- 'sortable' => false,
- 'header_css_class' => 'col-name',
- 'column_css_class' => 'col-name'
- ));
-
- if ($this->getFilterData()->getStoreIds()) {
- $this->setStoreIds(explode(',', $this->getFilterData()->getStoreIds()));
- }
- $currencyCode = $this->getCurrentCurrencyCode();
-
- $this->addColumn('product_price', array(
- 'header' => __('Price'),
- 'type' => 'currency',
- 'currency_code' => $currencyCode,
- 'index' => 'product_price',
- 'sortable' => false,
- 'rate' => $this->getRate($currencyCode),
- 'header_css_class' => 'col-price',
- 'column_css_class' => 'col-price'
- ));
-
- $this->addColumn('views_num', array(
- 'header' => __('Views'),
- 'index' => 'views_num',
- 'type' => 'number',
- 'total' => 'sum',
- 'sortable' => false,
- 'header_css_class' => 'col-qty',
- 'column_css_class' => 'col-qty'
- ));
-
-
- $this->addExportType('*/*/exportViewedCsv', __('CSV'));
- $this->addExportType('*/*/exportViewedExcel', __('Excel XML'));
-
- return parent::_prepareColumns();
- }
-
- /**
- * Don't use orders in collection
- *
- * @param \Magento\Reports\Model\Resource\Report\Collection\AbstractCollection $collection
- * @param \Magento\Object $filterData
- * @return \Magento\Adminhtml\Block\Report\Grid\AbstractGrid
- */
- protected function _addOrderStatusFilter($collection, $filterData)
- {
- return $this;
- }
-}
diff --git a/app/code/Magento/Adminhtml/Block/Report/Review/Customer.php b/app/code/Magento/Adminhtml/Block/Report/Review/Customer.php
deleted file mode 100644
index c23a87c187360..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Report/Review/Customer.php
+++ /dev/null
@@ -1,48 +0,0 @@
-
- */
-
-namespace Magento\Adminhtml\Block\Report\Review;
-
-class Customer extends \Magento\Adminhtml\Block\Widget\Grid\Container
-{
-
- protected function _construct()
- {
- $this->_controller = 'report_review_customer';
- $this->_headerText = __('Customers Reviews');
- parent::_construct();
- $this->_removeButton('add');
- }
-
-}
diff --git a/app/code/Magento/Adminhtml/Block/Report/Review/Detail/Grid.php b/app/code/Magento/Adminhtml/Block/Report/Review/Detail/Grid.php
deleted file mode 100644
index c8032a5ff018b..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Report/Review/Detail/Grid.php
+++ /dev/null
@@ -1,115 +0,0 @@
-
- */
-namespace Magento\Adminhtml\Block\Report\Review\Detail;
-
-class Grid extends \Magento\Adminhtml\Block\Widget\Grid
-{
- /**
- * @var \Magento\Reports\Model\Resource\Review\CollectionFactory
- */
- protected $_reviewsFactory;
-
- /**
- * @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\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($context, $coreData, $urlModel, $data);
- }
-
- protected function _construct()
- {
- parent::_construct();
- $this->setId('reviews_grid');
- }
-
- protected function _prepareCollection()
- {
- $collection = $this->_reviewsFactory->create()
- ->addProductFilter((int)$this->getRequest()->getParam('id'));
-
- $this->setCollection($collection);
-
- parent::_prepareCollection();
-
- return $this;
- }
-
- protected function _prepareColumns()
- {
-
- $this->addColumn('nickname', array(
- 'header' =>__('Customer'),
- 'width' =>'100px',
- 'index' =>'nickname'
- ));
-
- $this->addColumn('title', array(
- 'header' =>__('Title'),
- 'width' =>'150px',
- 'index' =>'title'
- ));
-
- $this->addColumn('detail', array(
- 'header' =>__('Detail'),
- 'index' =>'detail'
- ));
-
- $this->addColumn('created_at', array(
- 'header' =>__('Created'),
- 'index' =>'created_at',
- 'width' =>'200px',
- 'type' =>'datetime'
- ));
-
- $this->setFilterVisibility(false);
-
- $this->addExportType('*/*/exportProductDetailCsv', __('CSV'));
- $this->addExportType('*/*/exportProductDetailExcel', __('Excel XML'));
-
- return parent::_prepareColumns();
- }
-
-}
-
diff --git a/app/code/Magento/Adminhtml/Block/Report/Review/Product.php b/app/code/Magento/Adminhtml/Block/Report/Review/Product.php
deleted file mode 100644
index 942cb137f5d77..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Report/Review/Product.php
+++ /dev/null
@@ -1,47 +0,0 @@
-
- */
-namespace Magento\Adminhtml\Block\Report\Review;
-
-class Product extends \Magento\Adminhtml\Block\Widget\Grid\Container
-{
-
- protected function _construct()
- {
- $this->_controller = 'report_review_product';
- $this->_headerText = __('Products Reviews');
- parent::_construct();
- $this->_removeButton('add');
- }
-
-}
diff --git a/app/code/Magento/Adminhtml/Block/Report/Sales/Bestsellers/Grid.php b/app/code/Magento/Adminhtml/Block/Report/Sales/Bestsellers/Grid.php
deleted file mode 100644
index a8e2d084aa72c..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Report/Sales/Bestsellers/Grid.php
+++ /dev/null
@@ -1,106 +0,0 @@
-
- */
-namespace Magento\Adminhtml\Block\Report\Sales\Bestsellers;
-
-class Grid extends \Magento\Adminhtml\Block\Report\Grid\AbstractGrid
-{
- protected $_columnGroupBy = 'period';
-
- protected function _construct()
- {
- parent::_construct();
- $this->setCountTotals(true);
- }
-
- public function getResourceCollectionName()
- {
- return 'Magento\Sales\Model\Resource\Report\Bestsellers\Collection';
- }
-
- protected function _prepareColumns()
- {
- $this->addColumn('period', array(
- 'header' => __('Interval'),
- 'index' => 'period',
- 'sortable' => false,
- 'period_type' => $this->getPeriodType(),
- 'renderer' => 'Magento\Adminhtml\Block\Report\Sales\Grid\Column\Renderer\Date',
- 'totals_label' => __('Total'),
- 'html_decorators' => array('nobr'),
- 'header_css_class' => 'col-period',
- 'column_css_class' => 'col-period'
- ));
-
- $this->addColumn('product_name', array(
- 'header' => __('Product'),
- 'index' => 'product_name',
- 'type' => 'string',
- 'sortable' => false,
- 'header_css_class' => 'col-product',
- 'column_css_class' => 'col-product'
- ));
-
- if ($this->getFilterData()->getStoreIds()) {
- $this->setStoreIds(explode(',', $this->getFilterData()->getStoreIds()));
- }
- $currencyCode = $this->getCurrentCurrencyCode();
-
- $this->addColumn('product_price', array(
- 'header' => __('Price'),
- 'type' => 'currency',
- 'currency_code' => $currencyCode,
- 'index' => 'product_price',
- 'sortable' => false,
- 'rate' => $this->getRate($currencyCode),
- 'header_css_class' => 'col-price',
- 'column_css_class' => 'col-price'
- ));
-
- $this->addColumn('qty_ordered', array(
- 'header' => __('Order Quantity'),
- 'index' => 'qty_ordered',
- 'type' => 'number',
- 'total' => 'sum',
- 'sortable' => false,
- 'header_css_class' => 'col-qty',
- 'column_css_class' => 'col-qty'
- ));
-
-
- $this->addExportType('*/*/exportBestsellersCsv', __('CSV'));
- $this->addExportType('*/*/exportBestsellersExcel', __('Excel XML'));
-
- return parent::_prepareColumns();
- }
-}
diff --git a/app/code/Magento/Adminhtml/Block/Report/Sales/Coupons/Grid.php b/app/code/Magento/Adminhtml/Block/Report/Sales/Coupons/Grid.php
deleted file mode 100644
index d3b003c3b7a87..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Report/Sales/Coupons/Grid.php
+++ /dev/null
@@ -1,200 +0,0 @@
-
- */
-namespace Magento\Adminhtml\Block\Report\Sales\Coupons;
-
-class Grid extends \Magento\Adminhtml\Block\Report\Grid\AbstractGrid
-{
- protected $_columnGroupBy = 'period';
-
- protected function _construct()
- {
- parent::_construct();
- $this->setCountTotals(true);
- $this->setCountSubTotals(true);
- }
-
- public function getResourceCollectionName()
- {
- if (($this->getFilterData()->getData('report_type') == 'updated_at_order')) {
- return 'Magento\SalesRule\Model\Resource\Report\Updatedat\Collection';
- } else {
- return 'Magento\SalesRule\Model\Resource\Report\Collection';
- }
- }
-
- protected function _prepareColumns()
- {
- $this->addColumn('period', array(
- 'header' => __('Interval'),
- 'index' => 'period',
- 'sortable' => false,
- 'period_type' => $this->getPeriodType(),
- 'renderer' => 'Magento\Adminhtml\Block\Report\Sales\Grid\Column\Renderer\Date',
- 'totals_label' => __('Total'),
- 'subtotals_label' => __('Subtotal'),
- 'html_decorators' => array('nobr'),
- 'header_css_class' => 'col-period',
- 'column_css_class' => 'col-period'
- ));
-
- $this->addColumn('coupon_code', array(
- 'header' => __('Coupon Code'),
- 'sortable' => false,
- 'index' => 'coupon_code',
- 'header_css_class' => 'col-code',
- 'column_css_class' => 'col-code'
- ));
-
- $this->addColumn('rule_name', array(
- 'header' => __('Price Rule'),
- 'sortable' => false,
- 'index' => 'rule_name',
- 'header_css_class' => 'col-rule',
- 'column_css_class' => 'col-rule'
- ));
-
- $this->addColumn('coupon_uses', array(
- 'header' => __('Uses'),
- 'sortable' => false,
- 'index' => 'coupon_uses',
- 'total' => 'sum',
- 'type' => 'number',
- 'header_css_class' => 'col-users',
- 'column_css_class' => 'col-users'
- ));
-
- if ($this->getFilterData()->getStoreIds()) {
- $this->setStoreIds(explode(',', $this->getFilterData()->getStoreIds()));
- }
- $currencyCode = $this->getCurrentCurrencyCode();
- $rate = $this->getRate($currencyCode);
-
- $this->addColumn('subtotal_amount', array(
- 'header' => __('Sales Subtotal'),
- 'sortable' => false,
- 'type' => 'currency',
- 'currency_code' => $currencyCode,
- 'total' => 'sum',
- 'index' => 'subtotal_amount',
- 'rate' => $rate,
- 'header_css_class' => 'col-sales',
- 'column_css_class' => 'col-sales'
- ));
-
- $this->addColumn('discount_amount', array(
- 'header' => __('Sales Discount'),
- 'sortable' => false,
- 'type' => 'currency',
- 'currency_code' => $currencyCode,
- 'total' => 'sum',
- 'index' => 'discount_amount',
- 'rate' => $rate,
- 'header_css_class' => 'col-sales-discount',
- 'column_css_class' => 'col-sales-discount'
- ));
-
- $this->addColumn('total_amount', array(
- 'header' => __('Sales Total'),
- 'sortable' => false,
- 'type' => 'currency',
- 'currency_code' => $currencyCode,
- 'total' => 'sum',
- 'index' => 'total_amount',
- 'rate' => $rate,
- 'header_css_class' => 'col-total-amount',
- 'column_css_class' => 'col-total-amount'
- ));
-
- $this->addColumn('subtotal_amount_actual', array(
- 'header' => __('Subtotal'),
- 'sortable' => false,
- 'type' => 'currency',
- 'currency_code' => $currencyCode,
- 'total' => 'sum',
- 'index' => 'subtotal_amount_actual',
- 'rate' => $rate,
- 'header_css_class' => 'col-subtotal',
- 'column_css_class' => 'col-subtotal'
- ));
-
- $this->addColumn('discount_amount_actual', array(
- 'header' => __('Discount'),
- 'sortable' => false,
- 'type' => 'currency',
- 'currency_code' => $currencyCode,
- 'total' => 'sum',
- 'index' => 'discount_amount_actual',
- 'rate' => $rate,
- 'header_css_class' => 'col-discount',
- 'column_css_class' => 'col-discount'
- ));
-
- $this->addColumn('total_amount_actual', array(
- 'header' => __('Total'),
- 'sortable' => false,
- 'type' => 'currency',
- 'currency_code' => $currencyCode,
- 'total' => 'sum',
- 'index' => 'total_amount_actual',
- 'rate' => $rate,
- 'header_css_class' => 'col-total',
- 'column_css_class' => 'col-total'
- ));
-
- $this->addExportType('*/*/exportCouponsCsv', __('CSV'));
- $this->addExportType('*/*/exportCouponsExcel', __('Excel XML'));
-
- return parent::_prepareColumns();
- }
-
- /**
- * Add price rule filter
- *
- * @param \Magento\Reports\Model\Resource\Report\Collection\AbstractCollection $collection
- * @param \Magento\Object $filterData
- * @return \Magento\Adminhtml\Block\Report\Grid\AbstractGrid
- */
- protected function _addCustomFilter($collection, $filterData)
- {
- if ($filterData->getPriceRuleType()) {
- $rulesList = $filterData->getData('rules_list');
- if (isset($rulesList[0])) {
- $rulesIds = explode(',', $rulesList[0]);
- $collection->addRuleFilter($rulesIds);
- }
- }
-
- return parent::_addCustomFilter($filterData, $collection);
- }
-}
diff --git a/app/code/Magento/Adminhtml/Block/Report/Sales/Grid/Column/Renderer/Date.php b/app/code/Magento/Adminhtml/Block/Report/Sales/Grid/Column/Renderer/Date.php
deleted file mode 100644
index a2099f27cd5db..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Report/Sales/Grid/Column/Renderer/Date.php
+++ /dev/null
@@ -1,109 +0,0 @@
-getColumn()->getFormat();
- if (!$format) {
- if (is_null(self::$_format)) {
- try {
- $localeCode = $this->_locale->getLocaleCode();
- $localeData = new \Zend_Locale_Data;
- switch ($this->getColumn()->getPeriodType()) {
- case 'month' :
- self::$_format = $localeData->getContent($localeCode, 'dateitem', 'yM');
- break;
-
- case 'year' :
- self::$_format = $localeData->getContent($localeCode, 'dateitem', 'y');
- break;
-
- default:
- self::$_format = $this->_locale->getDateFormat(
- \Magento\Core\Model\LocaleInterface::FORMAT_TYPE_MEDIUM
- );
- break;
- }
- }
- catch (\Exception $e) {
-
- }
- }
- $format = self::$_format;
- }
- return $format;
- }
-
- /**
- * Renders grid column
- *
- * @param \Magento\Object $row
- * @return string
- */
- public function render(\Magento\Object $row)
- {
- if ($data = $row->getData($this->getColumn()->getIndex())) {
- switch ($this->getColumn()->getPeriodType()) {
- case 'month' :
- $dateFormat = 'yyyy-MM';
- break;
- case 'year' :
- $dateFormat = 'yyyy';
- break;
- default:
- $dateFormat = \Magento\Stdlib\DateTime::DATE_INTERNAL_FORMAT;
- break;
- }
-
- $format = $this->_getFormat();
- try {
- $data = ($this->getColumn()->getGmtoffset())
- ? $this->_locale->date($data, $dateFormat)->toString($format)
- : $this->_locale->date($data, \Zend_Date::ISO_8601, null, false)->toString($format);
- }
- catch (\Exception $e) {
- $data = ($this->getColumn()->getTimezone())
- ? $this->_locale->date($data, $dateFormat)->toString($format)
- : $this->_locale->date($data, $dateFormat, null, false)->toString($format);
- }
- return $data;
- }
- return $this->getColumn()->getDefault();
- }
-}
diff --git a/app/code/Magento/Adminhtml/Block/Report/Sales/Invoiced/Grid.php b/app/code/Magento/Adminhtml/Block/Report/Sales/Invoiced/Grid.php
deleted file mode 100644
index e57fd51c9940a..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Report/Sales/Invoiced/Grid.php
+++ /dev/null
@@ -1,134 +0,0 @@
-
- */
-namespace Magento\Adminhtml\Block\Report\Sales\Invoiced;
-
-class Grid extends \Magento\Adminhtml\Block\Report\Grid\AbstractGrid
-{
- protected $_columnGroupBy = 'period';
-
- protected function _construct()
- {
- parent::_construct();
- $this->setCountTotals(true);
- }
-
- public function getResourceCollectionName()
- {
- return ($this->getFilterData()->getData('report_type') == 'created_at_invoice')
- ? 'Magento\Sales\Model\Resource\Report\Invoiced\Collection\Invoiced'
- : 'Magento\Sales\Model\Resource\Report\Invoiced\Collection\Order';
- }
-
- protected function _prepareColumns()
- {
- $this->addColumn('period', array(
- 'header' => __('Interval'),
- 'index' => 'period',
- 'sortable' => false,
- 'period_type' => $this->getPeriodType(),
- 'renderer' => 'Magento\Adminhtml\Block\Report\Sales\Grid\Column\Renderer\Date',
- 'totals_label' => __('Total'),
- 'html_decorators' => array('nobr'),
- 'header_css_class' => 'col-period',
- 'column_css_class' => 'col-period'
- ));
-
- $this->addColumn('orders_count', array(
- 'header' => __('Orders'),
- 'index' => 'orders_count',
- 'type' => 'number',
- 'total' => 'sum',
- 'sortable' => false,
- 'header_css_class' => 'col-qty',
- 'column_css_class' => 'col-qty'
- ));
-
- $this->addColumn('orders_invoiced', array(
- 'header' => __('Invoiced Orders'),
- 'index' => 'orders_invoiced',
- 'type' => 'number',
- 'total' => 'sum',
- 'sortable' => false,
- 'header_css_class' => 'col-invoiced',
- 'column_css_class' => 'col-invoiced'
- ));
-
- if ($this->getFilterData()->getStoreIds()) {
- $this->setStoreIds(explode(',', $this->getFilterData()->getStoreIds()));
- }
- $currencyCode = $this->getCurrentCurrencyCode();
- $rate = $this->getRate($currencyCode);
-
- $this->addColumn('invoiced', array(
- 'header' => __('Total Invoiced'),
- 'type' => 'currency',
- 'currency_code' => $currencyCode,
- 'index' => 'invoiced',
- 'total' => 'sum',
- 'sortable' => false,
- 'rate' => $rate,
- 'header_css_class' => 'col-total-invoiced',
- 'column_css_class' => 'col-total-invoiced'
- ));
-
- $this->addColumn('invoiced_captured', array(
- 'header' => __('Paid Invoices'),
- 'type' => 'currency',
- 'currency_code' => $currencyCode,
- 'index' => 'invoiced_captured',
- 'total' => 'sum',
- 'sortable' => false,
- 'rate' => $rate,
- 'header_css_class' => 'col-total-invoiced-paid',
- 'column_css_class' => 'col-total-invoiced-paid'
- ));
-
- $this->addColumn('invoiced_not_captured', array(
- 'header' => __('Unpaid Invoices'),
- 'type' => 'currency',
- 'currency_code' => $currencyCode,
- 'index' => 'invoiced_not_captured',
- 'total' => 'sum',
- 'sortable' => false,
- 'rate' => $rate,
- 'header_css_class' => 'col-total-invoiced-not-paid',
- 'column_css_class' => 'col-total-invoiced-not-paid'
- ));
-
- $this->addExportType('*/*/exportInvoicedCsv', __('CSV'));
- $this->addExportType('*/*/exportInvoicedExcel', __('Excel XML'));
-
- return parent::_prepareColumns();
- }
-}
diff --git a/app/code/Magento/Adminhtml/Block/Report/Sales/Refunded/Grid.php b/app/code/Magento/Adminhtml/Block/Report/Sales/Refunded/Grid.php
deleted file mode 100644
index 8e7d1d36bdcbf..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Report/Sales/Refunded/Grid.php
+++ /dev/null
@@ -1,124 +0,0 @@
-
- */
-namespace Magento\Adminhtml\Block\Report\Sales\Refunded;
-
-class Grid extends \Magento\Adminhtml\Block\Report\Grid\AbstractGrid
-{
- protected $_columnGroupBy = 'period';
-
- protected function _construct()
- {
- parent::_construct();
- $this->setCountTotals(true);
- }
-
- public function getResourceCollectionName()
- {
- return ($this->getFilterData()->getData('report_type') == 'created_at_refunded')
- ? 'Magento\Sales\Model\Resource\Report\Refunded\Collection\Refunded'
- : 'Magento\Sales\Model\Resource\Report\Refunded\Collection\Order';
- }
-
- protected function _prepareColumns()
- {
- $this->addColumn('period', array(
- 'header' => __('Interval'),
- 'index' => 'period',
- 'sortable' => false,
- 'period_type' => $this->getPeriodType(),
- 'renderer' => 'Magento\Adminhtml\Block\Report\Sales\Grid\Column\Renderer\Date',
- 'totals_label' => __('Total'),
- 'html_decorators' => array('nobr'),
- 'header_css_class' => 'col-period',
- 'column_css_class' => 'col-period'
- ));
-
- $this->addColumn('orders_count', array(
- 'header' => __('Refunded Orders'),
- 'index' => 'orders_count',
- 'type' => 'number',
- 'total' => 'sum',
- 'sortable' => false,
- 'header_css_class' => 'col-qty',
- 'column_css_class' => 'col-qty'
- ));
-
- if ($this->getFilterData()->getStoreIds()) {
- $this->setStoreIds(explode(',', $this->getFilterData()->getStoreIds()));
- }
- $currencyCode = $this->getCurrentCurrencyCode();
- $rate = $this->getRate($currencyCode);
-
- $this->addColumn('refunded', array(
- 'header' => __('Total Refunded'),
- 'type' => 'currency',
- 'currency_code' => $currencyCode,
- 'index' => 'refunded',
- 'total' => 'sum',
- 'sortable' => false,
- 'rate' => $rate,
- 'header_css_class' => 'col-ref-total',
- 'column_css_class' => 'col-ref-total'
- ));
-
- $this->addColumn('online_refunded', array(
- 'header' => __('Online Refunds'),
- 'type' => 'currency',
- 'currency_code' => $currencyCode,
- 'index' => 'online_refunded',
- 'total' => 'sum',
- 'sortable' => false,
- 'rate' => $rate,
- 'header_css_class' => 'col-ref-online',
- 'column_css_class' => 'col-ref-online'
- ));
-
- $this->addColumn('offline_refunded', array(
- 'header' => __('Offline Refunds'),
- 'type' => 'currency',
- 'currency_code' => $currencyCode,
- 'index' => 'offline_refunded',
- 'total' => 'sum',
- 'sortable' => false,
- 'rate' => $rate,
- 'header_css_class' => 'col-ref-offline',
- 'column_css_class' => 'col-ref-offline'
- ));
-
- $this->addExportType('*/*/exportRefundedCsv', __('CSV'));
- $this->addExportType('*/*/exportRefundedExcel', __('Excel XML'));
-
- return parent::_prepareColumns();
- }
-}
diff --git a/app/code/Magento/Adminhtml/Block/Report/Sales/Sales.php b/app/code/Magento/Adminhtml/Block/Report/Sales/Sales.php
deleted file mode 100644
index 28b260bc3c13c..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Report/Sales/Sales.php
+++ /dev/null
@@ -1,60 +0,0 @@
-
- */
-
-namespace Magento\Adminhtml\Block\Report\Sales;
-
-class Sales extends \Magento\Adminhtml\Block\Widget\Grid\Container
-{
- protected $_template = 'report/grid/container.phtml';
-
- protected function _construct()
- {
- $this->_controller = 'report_sales_sales';
- $this->_headerText = __('Total Ordered Report');
- parent::_construct();
-
- $this->_removeButton('add');
- $this->addButton('filter_form_submit', array(
- 'label' => __('Show Report'),
- 'onclick' => 'filterFormSubmit()',
- 'class' => 'primary'
- ));
- }
-
- public function getFilterUrl()
- {
- $this->getRequest()->setParam('filter', null);
- return $this->getUrl('adminhtml/*/sales', array('_current' => true));
- }
-}
diff --git a/app/code/Magento/Adminhtml/Block/Report/Sales/Sales/Grid.php b/app/code/Magento/Adminhtml/Block/Report/Sales/Sales/Grid.php
deleted file mode 100644
index 2c4828a09a456..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Report/Sales/Sales/Grid.php
+++ /dev/null
@@ -1,272 +0,0 @@
-
- */
-namespace Magento\Adminhtml\Block\Report\Sales\Sales;
-
-class Grid extends \Magento\Adminhtml\Block\Report\Grid\AbstractGrid
-{
- protected $_columnGroupBy = 'period';
-
- protected function _construct()
- {
- parent::_construct();
- $this->setCountTotals(true);
- }
-
- public function getResourceCollectionName()
- {
- return ($this->getFilterData()->getData('report_type') == 'updated_at_order')
- ? 'Magento\Sales\Model\Resource\Report\Order\Updatedat\Collection'
- : 'Magento\Sales\Model\Resource\Report\Order\Collection';
- }
-
- protected function _prepareColumns()
- {
- $this->addColumn('period', array(
- 'header' => __('Interval'),
- 'index' => 'period',
- 'sortable' => false,
- 'period_type' => $this->getPeriodType(),
- 'renderer' => 'Magento\Adminhtml\Block\Report\Sales\Grid\Column\Renderer\Date',
- 'totals_label' => __('Total'),
- 'html_decorators' => array('nobr'),
- 'header_css_class' => 'col-period',
- 'column_css_class' => 'col-period'
- ));
-
- $this->addColumn('orders_count', array(
- 'header' => __('Orders'),
- 'index' => 'orders_count',
- 'type' => 'number',
- 'total' => 'sum',
- 'sortable' => false,
- 'header_css_class' => 'col-orders',
- 'column_css_class' => 'col-orders'
- ));
-
- $this->addColumn('total_qty_ordered', array(
- 'header' => __('Sales Items'),
- 'index' => 'total_qty_ordered',
- 'type' => 'number',
- 'total' => 'sum',
- 'sortable' => false,
- 'header_css_class' => 'col-sales-items',
- 'column_css_class' => 'col-sales-items'
- ));
-
- $this->addColumn('total_qty_invoiced', array(
- 'header' => __('Items'),
- 'index' => 'total_qty_invoiced',
- 'type' => 'number',
- 'total' => 'sum',
- 'sortable' => false,
- 'visibility_filter' => array('show_actual_columns'),
- 'header_css_class' => 'col-items',
- 'column_css_class' => 'col-items'
- ));
-
- if ($this->getFilterData()->getStoreIds()) {
- $this->setStoreIds(explode(',', $this->getFilterData()->getStoreIds()));
- }
- $currencyCode = $this->getCurrentCurrencyCode();
- $rate = $this->getRate($currencyCode);
-
- $this->addColumn('total_income_amount', array(
- 'header' => __('Sales Total'),
- 'type' => 'currency',
- 'currency_code' => $currencyCode,
- 'index' => 'total_income_amount',
- 'total' => 'sum',
- 'sortable' => false,
- 'rate' => $rate,
- 'header_css_class' => 'col-sales-total',
- 'column_css_class' => 'col-sales-total'
- ));
-
- $this->addColumn('total_revenue_amount', array(
- 'header' => __('Revenue'),
- 'type' => 'currency',
- 'currency_code' => $currencyCode,
- 'index' => 'total_revenue_amount',
- 'total' => 'sum',
- 'sortable' => false,
- 'visibility_filter' => array('show_actual_columns'),
- 'rate' => $rate,
- 'header_css_class' => 'col-revenue',
- 'column_css_class' => 'col-revenue'
- ));
-
- $this->addColumn('total_profit_amount', array(
- 'header' => __('Profit'),
- 'type' => 'currency',
- 'currency_code' => $currencyCode,
- 'index' => 'total_profit_amount',
- 'total' => 'sum',
- 'sortable' => false,
- 'visibility_filter' => array('show_actual_columns'),
- 'rate' => $rate,
- 'header_css_class' => 'col-profit',
- 'column_css_class' => 'col-profit'
- ));
-
- $this->addColumn('total_invoiced_amount', array(
- 'header' => __('Invoiced'),
- 'type' => 'currency',
- 'currency_code' => $currencyCode,
- 'index' => 'total_invoiced_amount',
- 'total' => 'sum',
- 'sortable' => false,
- 'rate' => $rate,
- 'header_css_class' => 'col-invoiced',
- 'column_css_class' => 'col-invoiced'
- ));
-
- $this->addColumn('total_paid_amount', array(
- 'header' => __('Paid'),
- 'type' => 'currency',
- 'currency_code' => $currencyCode,
- 'index' => 'total_paid_amount',
- 'total' => 'sum',
- 'sortable' => false,
- 'visibility_filter' => array('show_actual_columns'),
- 'rate' => $rate,
- 'header_css_class' => 'col-paid',
- 'column_css_class' => 'col-paid'
- ));
-
- $this->addColumn('total_refunded_amount', array(
- 'header' => __('Refunded'),
- 'type' => 'currency',
- 'currency_code' => $currencyCode,
- 'index' => 'total_refunded_amount',
- 'total' => 'sum',
- 'sortable' => false,
- 'rate' => $rate,
- 'header_css_class' => 'col-refunded',
- 'column_css_class' => 'col-refunded'
- ));
-
- $this->addColumn('total_tax_amount', array(
- 'header' => __('Sales Tax'),
- 'type' => 'currency',
- 'currency_code' => $currencyCode,
- 'index' => 'total_tax_amount',
- 'total' => 'sum',
- 'sortable' => false,
- 'rate' => $rate,
- 'header_css_class' => 'col-sales-tax',
- 'column_css_class' => 'col-sales-tax'
- ));
-
- $this->addColumn('total_tax_amount_actual', array(
- 'header' => __('Tax'),
- 'type' => 'currency',
- 'currency_code' => $currencyCode,
- 'index' => 'total_tax_amount_actual',
- 'total' => 'sum',
- 'sortable' => false,
- 'visibility_filter' => array('show_actual_columns'),
- 'rate' => $rate,
- 'header_css_class' => 'col-tax',
- 'column_css_class' => 'col-tax'
- ));
-
- $this->addColumn('total_shipping_amount', array(
- 'header' => __('Sales Shipping'),
- 'type' => 'currency',
- 'currency_code' => $currencyCode,
- 'index' => 'total_shipping_amount',
- 'total' => 'sum',
- 'sortable' => false,
- 'rate' => $rate,
- 'header_css_class' => 'col-sales-shipping',
- 'column_css_class' => 'col-sales-shipping'
- ));
-
- $this->addColumn('total_shipping_amount_actual', array(
- 'header' => __('Shipping'),
- 'type' => 'currency',
- 'currency_code' => $currencyCode,
- 'index' => 'total_shipping_amount_actual',
- 'total' => 'sum',
- 'sortable' => false,
- 'visibility_filter' => array('show_actual_columns'),
- 'rate' => $rate,
- 'header_css_class' => 'col-shipping',
- 'column_css_class' => 'col-shipping'
- ));
-
- $this->addColumn('total_discount_amount', array(
- 'header' => __('Sales Discount'),
- 'type' => 'currency',
- 'currency_code' => $currencyCode,
- 'index' => 'total_discount_amount',
- 'total' => 'sum',
- 'sortable' => false,
- 'rate' => $rate,
- 'header_css_class' => 'col-sales-discount',
- 'column_css_class' => 'col-sales-discount'
- ));
-
- $this->addColumn('total_discount_amount_actual', array(
- 'header' => __('Discount'),
- 'type' => 'currency',
- 'currency_code' => $currencyCode,
- 'index' => 'total_discount_amount_actual',
- 'total' => 'sum',
- 'sortable' => false,
- 'visibility_filter' => array('show_actual_columns'),
- 'rate' => $rate,
- 'header_css_class' => 'col-discount',
- 'column_css_class' => 'col-discount'
- ));
-
- $this->addColumn('total_canceled_amount', array(
- 'header' => __('Canceled'),
- 'type' => 'currency',
- 'currency_code' => $currencyCode,
- 'index' => 'total_canceled_amount',
- 'total' => 'sum',
- 'sortable' => false,
- 'rate' => $rate,
- 'header_css_class' => 'col-canceled',
- 'column_css_class' => 'col-canceled'
- ));
-
-
- $this->addExportType('*/*/exportSalesCsv', __('CSV'));
- $this->addExportType('*/*/exportSalesExcel', __('Excel XML'));
-
- return parent::_prepareColumns();
- }
-}
diff --git a/app/code/Magento/Adminhtml/Block/Report/Sales/Shipping/Grid.php b/app/code/Magento/Adminhtml/Block/Report/Sales/Shipping/Grid.php
deleted file mode 100644
index 973449259f075..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Report/Sales/Shipping/Grid.php
+++ /dev/null
@@ -1,126 +0,0 @@
-
- */
-namespace Magento\Adminhtml\Block\Report\Sales\Shipping;
-
-class Grid extends \Magento\Adminhtml\Block\Report\Grid\AbstractGrid
-{
- protected $_columnGroupBy = 'period';
-
- protected function _construct()
- {
- parent::_construct();
- $this->setCountTotals(true);
- $this->setCountSubTotals(true);
- }
-
- public function getResourceCollectionName()
- {
- return ($this->getFilterData()->getData('report_type') == 'created_at_shipment')
- ? 'Magento\Sales\Model\Resource\Report\Shipping\Collection\Shipment'
- : 'Magento\Sales\Model\Resource\Report\Shipping\Collection\Order';
- }
-
- protected function _prepareColumns()
- {
- $this->addColumn('period', array(
- 'header' => __('Interval'),
- 'index' => 'period',
- 'sortable' => false,
- 'period_type' => $this->getPeriodType(),
- 'renderer' => 'Magento\Adminhtml\Block\Report\Sales\Grid\Column\Renderer\Date',
- 'totals_label' => __('Total'),
- 'subtotals_label' => __('Subtotal'),
- 'html_decorators' => array('nobr'),
- 'header_css_class' => 'col-period',
- 'column_css_class' => 'col-period'
- ));
-
- $this->addColumn('shipping_description', array(
- 'header' => __('Carrier/Method'),
- 'index' => 'shipping_description',
- 'sortable' => false,
- 'header_css_class' => 'col-method',
- 'column_css_class' => 'col-method'
- ));
-
- $this->addColumn('orders_count', array(
- 'header' => __('Orders'),
- 'index' => 'orders_count',
- 'total' => 'sum',
- 'type' => 'number',
- 'sortable' => false,
- 'header_css_class' => 'col-qty',
- 'column_css_class' => 'col-qty'
- ));
-
- if ($this->getFilterData()->getStoreIds()) {
- $this->setStoreIds(explode(',', $this->getFilterData()->getStoreIds()));
- }
-
- $currencyCode = $this->getCurrentCurrencyCode();
- $rate = $this->getRate($currencyCode);
-
- $this->addColumn('total_shipping', array(
- 'header' => __('Total Sales Shipping'),
- 'type' => 'currency',
- 'currency_code' => $currencyCode,
- 'index' => 'total_shipping',
- 'total' => 'sum',
- 'sortable' => false,
- 'rate' => $rate,
- 'header_css_class' => 'col-total-sales-shipping',
- 'column_css_class' => 'col-total-sales-shipping'
- ));
-
- $this->addColumn('total_shipping_actual', array(
- 'header' => __('Total Shipping'),
- 'type' => 'currency',
- 'currency_code' => $currencyCode,
- 'index' => 'total_shipping_actual',
- 'total' => 'sum',
- 'sortable' => false,
- 'rate' => $rate,
- 'header_css_class' => 'col-total-shipping',
- 'column_css_class' => 'col-total-shipping'
- ));
-
- $this->addExportType('*/*/exportShippingCsv', __('CSV'));
- $this->addExportType('*/*/exportShippingExcel', __('Excel XML'));
-
- return parent::_prepareColumns();
- }
-}
-
-
-
diff --git a/app/code/Magento/Adminhtml/Block/Report/Sales/Tax/Grid.php b/app/code/Magento/Adminhtml/Block/Report/Sales/Tax/Grid.php
deleted file mode 100644
index cb23cc1d3b2b9..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Report/Sales/Tax/Grid.php
+++ /dev/null
@@ -1,171 +0,0 @@
-
- */
-namespace Magento\Adminhtml\Block\Report\Sales\Tax;
-
-class Grid extends \Magento\Adminhtml\Block\Report\Grid\AbstractGrid
-{
- protected $_columnGroupBy = 'period';
-
- /**
- * @var \Magento\Sales\Model\Order\ConfigFactory
- */
- protected $_configFactory;
-
- /**
- * @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\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($context, $coreData, $urlModel, $resourceFactory, $collectionFactory, $reportsData, $data);
- }
-
- protected function _construct()
- {
- parent::_construct();
- $this->setCountTotals(true);
- $this->setCountSubTotals(true);
- }
-
- public function getResourceCollectionName()
- {
- return ($this->getFilterData()->getData('report_type') == 'updated_at_order')
- ? 'Magento\Tax\Model\Resource\Report\Updatedat\Collection'
- : 'Magento\Tax\Model\Resource\Report\Collection';
- }
-
- protected function _prepareColumns()
- {
- $this->addColumn('period', array(
- 'header' => __('Interval'),
- 'index' => 'period',
- 'sortable' => false,
- 'period_type' => $this->getPeriodType(),
- 'renderer' => 'Magento\Adminhtml\Block\Report\Sales\Grid\Column\Renderer\Date',
- 'totals_label' => __('Total'),
- 'subtotals_label' => __('Subtotal'),
- 'html_decorators' => array('nobr'),
- 'header_css_class' => 'col-period',
- 'column_css_class' => 'col-period'
- ));
-
- $this->addColumn('code', array(
- 'header' => __('Tax'),
- 'index' => 'code',
- 'type' => 'string',
- 'sortable' => false,
- 'header_css_class' => 'col-tax-name',
- 'column_css_class' => 'col-tax-name'
- ));
-
- $this->addColumn('percent', array(
- 'header' => __('Rate'),
- 'index' => 'percent',
- 'type' => 'number',
- 'sortable' => false,
- 'header_css_class' => 'col-rate',
- 'column_css_class' => 'col-rate'
- ));
-
- $this->addColumn('orders_count', array(
- 'header' => __('Orders'),
- 'index' => 'orders_count',
- 'total' => 'sum',
- 'type' => 'number',
- 'sortable' => false,
- 'header_css_class' => 'col-qty',
- 'column_css_class' => 'col-qty'
- ));
-
- if ($this->getFilterData()->getStoreIds()) {
- $this->setStoreIds(explode(',', $this->getFilterData()->getStoreIds()));
- }
- $currencyCode = $this->getCurrentCurrencyCode();
-
- $this->addColumn('tax_base_amount_sum', array(
- 'header' => __('Tax Amount'),
- 'type' => 'currency',
- 'currency_code' => $currencyCode,
- 'index' => 'tax_base_amount_sum',
- 'total' => 'sum',
- 'sortable' => false,
- 'rate' => $this->getRate($currencyCode),
- 'header_css_class' => 'col-tax-amount',
- 'column_css_class' => 'col-tax-amount'
- ));
-
- $this->addExportType('*/*/exportTaxCsv', __('CSV'));
- $this->addExportType('*/*/exportTaxExcel', __('Excel XML'));
-
- return parent::_prepareColumns();
- }
-
- /**
- * Preparing collection
- * Filter canceled statuses for orders in taxes
- *
- * @return \Magento\Adminhtml\Block\Report\Sales\Tax\Grid
- */
- protected function _prepareCollection()
- {
- $filterData = $this->getFilterData();
- if (!$filterData->hasData('order_statuses')) {
- $orderConfig = $this->_configFactory->create();
- $statusValues = array();
- $canceledStatuses = $orderConfig->getStateStatuses(\Magento\Sales\Model\Order::STATE_CANCELED);
- foreach ($orderConfig->getStatuses() as $code => $label) {
- if (!isset($canceledStatuses[$code])) {
- $statusValues[] = $code;
- }
- }
- $filterData->setOrderStatuses($statusValues);
- }
- return parent::_prepareCollection();
- }
-}
diff --git a/app/code/Magento/Adminhtml/Block/Report/Shopcart/Abandoned/Grid.php b/app/code/Magento/Adminhtml/Block/Report/Shopcart/Abandoned/Grid.php
deleted file mode 100644
index cc77533f1d48e..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Report/Shopcart/Abandoned/Grid.php
+++ /dev/null
@@ -1,207 +0,0 @@
-
- */
-namespace Magento\Adminhtml\Block\Report\Shopcart\Abandoned;
-
-class Grid extends \Magento\Adminhtml\Block\Report\Grid\Shopcart
-{
- /**
- * @var \Magento\Reports\Model\Resource\Quote\CollectionFactory
- */
- protected $_quotesFactory;
-
- /**
- * @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\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($context, $coreData, $urlModel, $data);
- }
-
- protected function _construct()
- {
- parent::_construct();
- $this->setId('gridAbandoned');
- }
-
- protected function _prepareCollection()
- {
- /** @var $collection \Magento\Reports\Model\Resource\Quote\Collection */
- $collection = $this->_quotesFactory->create();
-
- $filter = $this->getParam($this->getVarNameFilter(), array());
- if ($filter) {
- $filter = base64_decode($filter);
- parse_str(urldecode($filter), $data);
- }
-
- if (!empty($data)) {
- $collection->prepareForAbandonedReport($this->_storeIds, $data);
- } else {
- $collection->prepareForAbandonedReport($this->_storeIds);
- }
-
- $this->setCollection($collection);
- return parent::_prepareCollection();
- }
-
- protected function _addColumnFilterToCollection($column)
- {
- $field = ( $column->getFilterIndex() ) ? $column->getFilterIndex() : $column->getIndex();
- $skip = array('subtotal', 'customer_name', 'email'/*, 'created_at', 'updated_at'*/);
-
- if (in_array($field, $skip)) {
- return $this;
- }
-
- parent::_addColumnFilterToCollection($column);
- return $this;
- }
-
- protected function _prepareColumns()
- {
- $this->addColumn('customer_name', array(
- 'header' => __('Customer'),
- 'index' => 'customer_name',
- 'sortable' => false,
- 'header_css_class' => 'col-name',
- 'column_css_class' => 'col-name'
- ));
-
- $this->addColumn('email', array(
- 'header' => __('Email'),
- 'index' => 'email',
- 'sortable' => false,
- 'header_css_class' => 'col-email',
- 'column_css_class' => 'col-email'
- ));
-
- $this->addColumn('items_count', array(
- 'header' => __('Products'),
- 'index' => 'items_count',
- 'sortable' => false,
- 'type' => 'number',
- 'header_css_class' => 'col-number',
- 'column_css_class' => 'col-number'
- ));
-
- $this->addColumn('items_qty', array(
- 'header' => __('Quantity'),
- 'index' => 'items_qty',
- 'sortable' => false,
- 'type' => 'number',
- 'header_css_class' => 'col-qty',
- 'column_css_class' => 'col-qty'
- ));
-
- if ($this->getRequest()->getParam('website')) {
- $storeIds = $this->_storeManager->getWebsite($this->getRequest()->getParam('website'))->getStoreIds();
- } else if ($this->getRequest()->getParam('group')) {
- $storeIds = $this->_storeManager->getGroup($this->getRequest()->getParam('group'))->getStoreIds();
- } else if ($this->getRequest()->getParam('store')) {
- $storeIds = array((int)$this->getRequest()->getParam('store'));
- } else {
- $storeIds = array();
- }
- $this->setStoreIds($storeIds);
- $currencyCode = $this->getCurrentCurrencyCode();
-
- $this->addColumn('subtotal', array(
- 'header' => __('Subtotal'),
- 'type' => 'currency',
- 'currency_code' => $currencyCode,
- 'index' => 'subtotal',
- 'sortable' => false,
- 'renderer' => 'Magento\Adminhtml\Block\Report\Grid\Column\Renderer\Currency',
- 'rate' => $this->getRate($currencyCode),
- 'header_css_class' => 'col-subtotal',
- 'column_css_class' => 'col-subtotal'
- ));
-
- $this->addColumn('coupon_code', array(
- 'header' => __('Applied Coupon'),
- 'index' => 'coupon_code',
- 'sortable' => false,
- 'header_css_class' => 'col-coupon',
- 'column_css_class' => 'col-coupon'
- ));
-
- $this->addColumn('created_at', array(
- 'header' => __('Created'),
- 'type' => 'datetime',
- 'index' => 'created_at',
- 'filter_index'=> 'main_table.created_at',
- 'sortable' => false,
- 'header_css_class' => 'col-created',
- 'column_css_class' => 'col-created'
- ));
-
- $this->addColumn('updated_at', array(
- 'header' => __('Updated'),
- 'type' => 'datetime',
- 'index' => 'updated_at',
- 'filter_index'=> 'main_table.updated_at',
- 'sortable' => false,
- 'header_css_class' => 'col-updated',
- 'column_css_class' => 'col-updated'
- ));
-
- $this->addColumn('remote_ip', array(
- 'header' => __('IP Address'),
- 'index' => 'remote_ip',
- 'sortable' => false,
- 'header_css_class' => 'col-ip',
- 'column_css_class' => 'col-ip'
- ));
-
- $this->addExportType('*/*/exportAbandonedCsv', __('CSV'));
- $this->addExportType('*/*/exportAbandonedExcel', __('Excel XML'));
-
- return parent::_prepareColumns();
- }
-
- public function getRowUrl($row)
- {
- return $this->getUrl('customer/index/edit', array('id'=>$row->getCustomerId(), 'active_tab'=>'cart'));
- }
-}
diff --git a/app/code/Magento/Adminhtml/Block/Report/Shopcart/Customer.php b/app/code/Magento/Adminhtml/Block/Report/Shopcart/Customer.php
deleted file mode 100644
index 6693c7db4b2d9..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Report/Shopcart/Customer.php
+++ /dev/null
@@ -1,46 +0,0 @@
-
- */
-
-namespace Magento\Adminhtml\Block\Report\Shopcart;
-
-class Customer extends \Magento\Adminhtml\Block\Widget\Grid\Container
-{
- protected function _construct()
- {
- $this->_controller = 'report_shopcart_customer';
- $this->_headerText = __('Customers');
- parent::_construct();
- $this->_removeButton('add');
- }
-}
diff --git a/app/code/Magento/Adminhtml/Block/Report/Shopcart/Customer/Grid.php b/app/code/Magento/Adminhtml/Block/Report/Shopcart/Customer/Grid.php
deleted file mode 100644
index d167a0e66d989..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Report/Shopcart/Customer/Grid.php
+++ /dev/null
@@ -1,132 +0,0 @@
-
- */
-namespace Magento\Adminhtml\Block\Report\Shopcart\Customer;
-
-class Grid extends \Magento\Adminhtml\Block\Report\Grid\Shopcart
-{
- /**
- * @var \Magento\Reports\Model\Resource\Customer\CollectionFactory
- */
- protected $_customersFactory;
-
- /**
- * @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\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($context, $coreData, $urlModel, $data);
- }
-
- protected function _construct()
- {
- parent::_construct();
- $this->setId('grid');
- }
-
- protected function _prepareCollection()
- {
- //TODO: add full name logic
- $collection = $this->_customersFactory->create()
- ->addAttributeToSelect('firstname')
- ->addAttributeToSelect('lastname');
-
- $this->setCollection($collection);
- return parent::_prepareCollection();
- }
-
- protected function _afterLoadCollection()
- {
- $this->getCollection()->addCartInfo();
- }
-
- protected function _prepareColumns()
- {
- $this->addColumn('entity_id', array(
- 'header' =>__('ID'),
- 'width' =>'50px',
- 'align' =>'right',
- 'index' =>'entity_id'
- ));
-
- $this->addColumn('firstname', array(
- 'header' =>__('First Name'),
- 'index' =>'firstname'
- ));
-
- $this->addColumn('lastname', array(
- 'header' =>__('Last Name'),
- 'index' =>'lastname'
- ));
-
- $this->addColumn('items', array(
- 'header' =>__('Items in Cart'),
- 'width' =>'70px',
- 'sortable' =>false,
- 'align' =>'right',
- 'index' =>'items'
- ));
-
- $currencyCode = $this->getCurrentCurrencyCode();
-
- $this->addColumn('total', array(
- 'header' =>__('Total'),
- 'width' =>'70px',
- 'sortable' =>false,
- 'type' =>'currency',
- 'align' =>'right',
- 'currency_code' => $currencyCode,
- 'index' =>'total',
- 'renderer' =>'Magento\Adminhtml\Block\Report\Grid\Column\Renderer\Currency',
- 'rate' => $this->getRate($currencyCode),
- ));
-
- $this->setFilterVisibility(false);
-
- $this->addExportType('*/*/exportCustomerCsv', __('CSV'));
- $this->addExportType('*/*/exportCustomerExcel', __('Excel XML'));
-
- return parent::_prepareColumns();
- }
-
-}
diff --git a/app/code/Magento/Adminhtml/Block/Report/Shopcart/Product.php b/app/code/Magento/Adminhtml/Block/Report/Shopcart/Product.php
deleted file mode 100644
index a753f5f8d5f09..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Report/Shopcart/Product.php
+++ /dev/null
@@ -1,47 +0,0 @@
-
- */
-namespace Magento\Adminhtml\Block\Report\Shopcart;
-
-class Product extends \Magento\Adminhtml\Block\Widget\Grid\Container
-{
-
- protected function _construct()
- {
- $this->_controller = 'report_shopcart_product';
- $this->_headerText = __('Products in carts');
- parent::_construct();
- $this->_removeButton('add');
- }
-
-}
diff --git a/app/code/Magento/Adminhtml/Block/Report/Shopcart/Product/Grid.php b/app/code/Magento/Adminhtml/Block/Report/Shopcart/Product/Grid.php
deleted file mode 100644
index fb98870a7e1ba..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Report/Shopcart/Product/Grid.php
+++ /dev/null
@@ -1,136 +0,0 @@
-
- */
-namespace Magento\Adminhtml\Block\Report\Shopcart\Product;
-
-class Grid extends \Magento\Adminhtml\Block\Report\Grid\Shopcart
-{
- /**
- * @var \Magento\Reports\Model\Resource\Quote\CollectionFactory
- */
- protected $_quotesFactory;
-
- /**
- * @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\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($context, $coreData, $urlModel, $data);
- }
-
- protected function _construct()
- {
- parent::_construct();
- $this->setId('gridProducts');
- }
-
- protected function _prepareCollection()
- {
- /** @var $collection \Magento\Reports\Model\Resource\Quote\Collection */
- $collection = $this->_quotesFactory->create();
- $collection->prepareForProductsInCarts()
- ->setSelectCountSqlType(\Magento\Reports\Model\Resource\Quote\Collection::SELECT_COUNT_SQL_TYPE_CART);
- $this->setCollection($collection);
- return parent::_prepareCollection();
- }
-
- protected function _prepareColumns()
- {
- $this->addColumn('entity_id', array(
- 'header' =>__('ID'),
- 'align' =>'right',
- 'index' =>'entity_id',
- 'header_css_class' => 'col-id',
- 'column_css_class' => 'col-id'
- ));
-
- $this->addColumn('name', array(
- 'header' =>__('Product'),
- 'index' =>'name',
- 'header_css_class' => 'col-product',
- 'column_css_class' => 'col-product'
- ));
-
- $currencyCode = $this->getCurrentCurrencyCode();
-
- $this->addColumn('price', array(
- 'header' =>__('Price'),
- 'type' =>'currency',
- 'currency_code' => $currencyCode,
- 'index' =>'price',
- 'renderer' =>'Magento\Adminhtml\Block\Report\Grid\Column\Renderer\Currency',
- 'rate' => $this->getRate($currencyCode),
- 'header_css_class' => 'col-price',
- 'column_css_class' => 'col-price'
- ));
-
- $this->addColumn('carts', array(
- 'header' =>__('Carts'),
- 'align' =>'right',
- 'index' =>'carts',
- 'header_css_class' => 'col-carts',
- 'column_css_class' => 'col-carts'
- ));
-
- $this->addColumn('orders', array(
- 'header' =>__('Orders'),
- 'align' =>'right',
- 'index' =>'orders',
- 'header_css_class' => 'col-qty',
- 'column_css_class' => 'col-qty'
- ));
-
- $this->setFilterVisibility(false);
-
- $this->addExportType('*/*/exportProductCsv', __('CSV'));
- $this->addExportType('*/*/exportProductExcel', __('Excel XML'));
-
- return parent::_prepareColumns();
- }
-
- public function getRowUrl($row)
- {
- return $this->getUrl('catalog/product/edit', array('id'=>$row->getEntityId()));
- }
-}
-
diff --git a/app/code/Magento/Adminhtml/Block/Report/Wishlist/Grid.php b/app/code/Magento/Adminhtml/Block/Report/Wishlist/Grid.php
deleted file mode 100644
index d0a7e08aaa5f2..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Report/Wishlist/Grid.php
+++ /dev/null
@@ -1,137 +0,0 @@
-
- */
-namespace Magento\Adminhtml\Block\Report\Wishlist;
-
-class Grid extends \Magento\Adminhtml\Block\Widget\Grid
-{
- /**
- * @var \Magento\Reports\Model\Resource\Wishlist\Product\CollectionFactory
- */
- protected $_productsFactory;
-
- /**
- * @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\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($context, $coreData, $urlModel, $data);
- }
-
- protected function _construct()
- {
- parent::_construct();
- $this->setId('wishlistReportGrid');
- $this->setDefaultSort('entity_id');
- $this->setDefaultDir('desc');
- }
-
- protected function _prepareCollection()
- {
-
- $collection = $this->_productsFactory->create()
- ->addAttributeToSelect('entity_id')
- ->addAttributeToSelect('name')
- ->addWishlistCount();
-
- $this->setCollection($collection);
-
- parent::_prepareCollection();
-
- return $this;
- }
-
- protected function _prepareColumns()
- {
- $this->addColumn('entity_id', array(
- 'header' =>__('ID'),
- 'width' =>'50px',
- 'index' =>'entity_id'
- ));
-
- $this->addColumn('name', array(
- 'header' =>__('Name'),
- 'index' =>'name'
- ));
-
- $this->addColumn('wishlists', array(
- 'header' =>__('Wish Lists'),
- 'width' =>'50px',
- 'align' =>'right',
- 'index' =>'wishlists'
- ));
-
- $this->addColumn('bought_from_wishlists', array(
- 'header' =>__('Wishlist Purchase'),
- 'width' =>'50px',
- 'align' =>'right',
- 'sortable' =>false,
- 'index' =>'bought_from_wishlists'
- ));
-
- $this->addColumn('w_vs_order', array(
- 'header' =>__('Wish List vs. Regular Order'),
- 'width' =>'50px',
- 'align' =>'right',
- 'sortable' =>false,
- 'index' =>'w_vs_order'
- ));
-
- $this->addColumn('num_deleted', array(
- 'header' =>__('Times Deleted'),
- 'width' =>'50px',
- 'align' =>'right',
- 'sortable' =>false,
- 'index' =>'num_deleted'
- ));
-
- $this->addExportType('*/*/exportWishlistCsv', __('CSV'));
- $this->addExportType('*/*/exportWishlistExcel', __('Excel XML'));
-
- $this->setFilterVisibility(false);
-
- return parent::_prepareColumns();
- }
-
-}
-
diff --git a/app/code/Magento/Adminhtml/Block/Review/Add/Form.php b/app/code/Magento/Adminhtml/Block/Review/Add/Form.php
deleted file mode 100644
index 57ab6ced96f39..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Review/Add/Form.php
+++ /dev/null
@@ -1,156 +0,0 @@
-
- */
-
-namespace Magento\Adminhtml\Block\Review\Add;
-
-class Form extends \Magento\Backend\Block\Widget\Form\Generic
-{
- /**
- * Review data
- *
- * @var \Magento\Review\Helper\Data
- */
- protected $_reviewData = null;
-
- /**
- * @var \Magento\Core\Model\System\Store
- */
- protected $_systemStore;
-
- /**
- * @param \Magento\Backend\Block\Template\Context $context
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Core\Model\Registry $registry
- * @param \Magento\Data\FormFactory $formFactory
- * @param \Magento\Core\Model\System\Store $systemStore
- * @param \Magento\Review\Helper\Data $reviewData
- * @param array $data
- */
- public function __construct(
- \Magento\Backend\Block\Template\Context $context,
- \Magento\Core\Helper\Data $coreData,
- \Magento\Core\Model\Registry $registry,
- \Magento\Data\FormFactory $formFactory,
- \Magento\Core\Model\System\Store $systemStore,
- \Magento\Review\Helper\Data $reviewData,
- array $data = array()
- ) {
- $this->_reviewData = $reviewData;
- $this->_systemStore = $systemStore;
- parent::__construct($context, $coreData, $registry, $formFactory, $data);
- }
-
- protected function _prepareForm()
- {
- /** @var \Magento\Data\Form $form */
- $form = $this->_formFactory->create();
-
- $fieldset = $form->addFieldset('add_review_form', array('legend' => __('Review Details')));
-
- $fieldset->addField('product_name', 'note', array(
- 'label' => __('Product'),
- 'text' => 'product_name',
- ));
-
- $fieldset->addField('detailed_rating', 'note', array(
- 'label' => __('Product Rating'),
- 'required' => true,
- 'text' => ''
- . $this->getLayout()->createBlock('Magento\Adminhtml\Block\Review\Rating\Detailed')->toHtml()
- . '
',
- ));
-
- $fieldset->addField('status_id', 'select', array(
- 'label' => __('Status'),
- 'required' => true,
- 'name' => 'status_id',
- 'values' => $this->_reviewData->getReviewStatusesOptionArray(),
- ));
-
- /**
- * Check is single store mode
- */
- if (!$this->_storeManager->isSingleStoreMode()) {
- $field = $fieldset->addField('select_stores', 'multiselect', array(
- 'label' => __('Visible In'),
- 'required' => true,
- 'name' => 'select_stores[]',
- 'values' => $this->_systemStore->getStoreValuesForForm(),
- ));
- $renderer = $this->getLayout()
- ->createBlock('Magento\Backend\Block\Store\Switcher\Form\Renderer\Fieldset\Element');
- $field->setRenderer($renderer);
- }
-
- $fieldset->addField('nickname', 'text', array(
- 'name' => 'nickname',
- 'title' => __('Nickname'),
- 'label' => __('Nickname'),
- 'maxlength' => '50',
- 'required' => true,
- ));
-
- $fieldset->addField('title', 'text', array(
- 'name' => 'title',
- 'title' => __('Summary of Review'),
- 'label' => __('Summary of Review'),
- 'maxlength' => '255',
- 'required' => true,
- ));
-
- $fieldset->addField('detail', 'textarea', array(
- 'name' => 'detail',
- 'title' => __('Review'),
- 'label' => __('Review'),
- 'style' => 'height: 600px;',
- 'required' => true,
- ));
-
- $fieldset->addField('product_id', 'hidden', array(
- 'name' => 'product_id',
- ));
-
- /*$gridFieldset = $form->addFieldset('add_review_grid', array('legend' => __('Please select a product')));
- $gridFieldset->addField('products_grid', 'note', array(
- 'text' => $this->getLayout()->createBlock('Magento\Adminhtml\Block\Review\Product\Grid')->toHtml(),
- ));*/
-
- $form->setMethod('post');
- $form->setUseContainer(true);
- $form->setId('edit_form');
- $form->setAction($this->getUrl('catalog/*/post'));
-
- $this->setForm($form);
- }
-}
diff --git a/app/code/Magento/Adminhtml/Block/Review/Edit.php b/app/code/Magento/Adminhtml/Block/Review/Edit.php
deleted file mode 100644
index 207148434d0c9..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Review/Edit.php
+++ /dev/null
@@ -1,226 +0,0 @@
-_coreRegistry = $registry;
- $this->_reviewActionPager = $reviewActionPager;
- $this->_reviewFactory = $reviewFactory;
- parent::__construct($context, $coreData, $data);
- }
-
- protected function _construct()
- {
- parent::_construct();
-
- $this->_objectId = 'id';
- $this->_controller = 'review';
-
- /** @var $actionPager \Magento\Review\Helper\Action\Pager */
- $actionPager = $this->_reviewActionPager;
- $actionPager->setStorageId('reviews');
-
- $reviewId = $this->getRequest()->getParam('id');
- $prevId = $actionPager->getPreviousItemId($reviewId);
- $nextId = $actionPager->getNextItemId($reviewId);
- if ($prevId !== false) {
- $this->addButton('previous', array(
- 'label' => __('Previous'),
- 'onclick' => 'setLocation(\'' . $this->getUrl('adminhtml/*/*', array('id' => $prevId)) . '\')'
- ), 3, 10);
-
- $this->addButton('save_and_previous', array(
- 'label' => __('Save and Previous'),
- 'class' => 'save',
- 'data_attribute' => array(
- 'mage-init' => array(
- 'button' => array(
- 'event' => 'save',
- 'target' => '#edit_form',
- 'eventData' => array(
- 'action' => array(
- 'args' => array('next_item' => $prevId),
- ),
- ),
- ),
- ),
- ),
- ), 3, 11);
- }
- if ($nextId !== false) {
- $this->addButton('save_and_next', array(
- 'label' => __('Save and Next'),
- 'class' => 'save',
- 'data_attribute' => array(
- 'mage-init' => array(
- 'button' => array(
- 'event' => 'save',
- 'target' => '#edit_form',
- 'eventData' => array(
- 'action' => array(
- 'args' => array('next_item' => $nextId),
- ),
- ),
- ),
- ),
- ),
- ), 3, 100);
-
- $this->addButton('next', array(
- 'label' => __('Next'),
- 'onclick' => 'setLocation(\'' . $this->getUrl('adminhtml/*/*', array('id' => $nextId)) . '\')'
- ), 3, 105);
- }
- $this->_updateButton('save', 'label', __('Save Review'));
- $this->_updateButton('save', 'id', 'save_button');
- $this->_updateButton('delete', 'label', __('Delete Review'));
-
- if ($this->getRequest()->getParam('productId', false)) {
- $this->_updateButton(
- 'back',
- 'onclick',
- 'setLocation(\''
- . $this->getUrl(
- 'catalog/product/edit',
- array('id' => $this->getRequest()->getParam('productId', false))
- )
- .'\')'
- );
- }
-
- if ($this->getRequest()->getParam('customerId', false)) {
- $this->_updateButton(
- 'back',
- 'onclick',
- 'setLocation(\''
- . $this->getUrl(
- 'customer/index/edit',
- array('id' => $this->getRequest()->getParam('customerId', false))
- )
- .'\')'
- );
- }
-
- if ($this->getRequest()->getParam('ret', false) == 'pending') {
- $this->_updateButton('back', 'onclick', 'setLocation(\'' . $this->getUrl('adminhtml/*/pending') .'\')' );
- $this->_updateButton(
- 'delete',
- 'onclick',
- 'deleteConfirm('
- . '\'' . __('Are you sure you want to do this?').'\' '
- . '\'' . $this->getUrl(
- '*/*/delete',
- array(
- $this->_objectId => $this->getRequest()->getParam($this->_objectId),
- 'ret' => 'pending',
- )
- ) . '\''
- . ')'
- );
- $this->_coreRegistry->register('ret', 'pending');
- }
-
- if ($this->getRequest()->getParam($this->_objectId)) {
- $reviewData = $this->_reviewFactory->create()
- ->load($this->getRequest()->getParam($this->_objectId));
- $this->_coreRegistry->register('review_data', $reviewData);
- }
-
- $this->_formInitScripts[] = '
- var review = {
- updateRating: function() {
- elements = [
- $("select_stores"),
- $("rating_detail").getElementsBySelector("input[type=\'radio\']")
- ].flatten();
- $(\'save_button\').disabled = true;
- new Ajax.Updater(
- "rating_detail",
- "' . $this->getUrl('catalog/*/ratingItems', array('_current'=>true)).'",
- {
- parameters:Form.serializeElements(elements),
- evalScripts:true,
- onComplete:function(){ $(\'save_button\').disabled = false; }
- }
- );
- }
- }
- Event.observe(window, \'load\', function(){
- Event.observe($("select_stores"), \'change\', review.updateRating);
- });
- ';
- }
-
- public function getHeaderText()
- {
- $reviewData = $this->_coreRegistry->registry('review_data');
- if ($reviewData && $reviewData->getId()) {
- return __("Edit Review '%1'", $this->escapeHtml($reviewData->getTitle()));
- } else {
- return __('New Review');
- }
- }
-}
diff --git a/app/code/Magento/Adminhtml/Block/Review/Edit/Form.php b/app/code/Magento/Adminhtml/Block/Review/Edit/Form.php
deleted file mode 100644
index 7867f8a1923cf..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Review/Edit/Form.php
+++ /dev/null
@@ -1,199 +0,0 @@
-_reviewData = $reviewData;
- $this->_customerFactory = $customerFactory;
- $this->_productFactory = $productFactory;
- $this->_systemStore = $systemStore;
- parent::__construct($context, $coreData, $registry, $formFactory, $data);
- }
-
- protected function _prepareForm()
- {
- $review = $this->_coreRegistry->registry('review_data');
- $product = $this->_productFactory->create()->load($review->getEntityPkValue());
- $customer = $this->_customerFactory->create()->load($review->getCustomerId());
-
- /** @var \Magento\Data\Form $form */
- $form = $this->_formFactory->create(array(
- 'attributes' => array(
- 'id' => 'edit_form',
- 'action' => $this->getUrl('catalog/*/save', array(
- 'id' => $this->getRequest()->getParam('id'),
- 'ret' => $this->_coreRegistry->registry('ret')
- )),
- 'method' => 'post'
- ))
- );
-
- $fieldset = $form->addFieldset('review_details', array(
- 'legend' => __('Review Details'),
- 'class' => 'fieldset-wide'
- ));
-
- $fieldset->addField('product_name', 'note', array(
- 'label' => __('Product'),
- 'text' => '' . $this->escapeHtml($product->getName()) . ''
- ));
-
- if ($customer->getId()) {
- $customerText = __('%2 %3 (%4)',
- $this->getUrl('customer/index/edit', array('id' => $customer->getId(), 'active_tab'=>'review')),
- $this->escapeHtml($customer->getFirstname()),
- $this->escapeHtml($customer->getLastname()),
- $this->escapeHtml($customer->getEmail()));
- } else {
- if (is_null($review->getCustomerId())) {
- $customerText = __('Guest');
- } elseif ($review->getCustomerId() == 0) {
- $customerText = __('Administrator');
- }
- }
-
- $fieldset->addField('customer', 'note', array(
- 'label' => __('Posted By'),
- 'text' => $customerText,
- ));
-
- $fieldset->addField('summary_rating', 'note', array(
- 'label' => __('Summary Rating'),
- 'text' => $this->getLayout()->createBlock('Magento\Adminhtml\Block\Review\Rating\Summary')->toHtml(),
- ));
-
- $fieldset->addField('detailed_rating', 'note', array(
- 'label' => __('Detailed Rating'),
- 'required' => true,
- 'text' => ''
- . $this->getLayout()->createBlock('Magento\Adminhtml\Block\Review\Rating\Detailed')->toHtml()
- . '
',
- ));
-
- $fieldset->addField('status_id', 'select', array(
- 'label' => __('Status'),
- 'required' => true,
- 'name' => 'status_id',
- 'values' => $this->_reviewData->getReviewStatusesOptionArray(),
- ));
-
- /**
- * Check is single store mode
- */
- if (!$this->_storeManager->hasSingleStore()) {
- $field = $fieldset->addField('select_stores', 'multiselect', array(
- 'label' => __('Visible In'),
- 'required' => true,
- 'name' => 'stores[]',
- 'values' => $this->_systemStore->getStoreValuesForForm(),
- ));
- $renderer = $this->getLayout()
- ->createBlock('Magento\Backend\Block\Store\Switcher\Form\Renderer\Fieldset\Element');
- $field->setRenderer($renderer);
- $review->setSelectStores($review->getStores());
- } else {
- $fieldset->addField('select_stores', 'hidden', array(
- 'name' => 'stores[]',
- 'value' => $this->_storeManager->getStore(true)->getId()
- ));
- $review->setSelectStores($this->_storeManager->getStore(true)->getId());
- }
-
- $fieldset->addField('nickname', 'text', array(
- 'label' => __('Nickname'),
- 'required' => true,
- 'name' => 'nickname'
- ));
-
- $fieldset->addField('title', 'text', array(
- 'label' => __('Summary of Review'),
- 'required' => true,
- 'name' => 'title',
- ));
-
- $fieldset->addField('detail', 'textarea', array(
- 'label' => __('Review'),
- 'required' => true,
- 'name' => 'detail',
- 'style' => 'height:24em;',
- ));
-
- $form->setUseContainer(true);
- $form->setValues($review->getData());
- $this->setForm($form);
- return parent::_prepareForm();
- }
-}
diff --git a/app/code/Magento/Adminhtml/Block/Review/Grid.php b/app/code/Magento/Adminhtml/Block/Review/Grid.php
deleted file mode 100644
index 34758723c83cf..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Review/Grid.php
+++ /dev/null
@@ -1,381 +0,0 @@
-
- */
-namespace Magento\Adminhtml\Block\Review;
-
-class Grid extends \Magento\Backend\Block\Widget\Grid\Extended
-{
- /**
- * Review action pager
- *
- * @var \Magento\Review\Helper\Action\Pager
- */
- protected $_reviewActionPager = null;
-
- /**
- * Review data
- *
- * @var \Magento\Review\Helper\Data
- */
- protected $_reviewData = null;
-
- /**
- * Core registry
- *
- * @var \Magento\Core\Model\Registry
- */
- protected $_coreRegistry = null;
-
- /**
- * @var \Magento\Review\Model\Resource\Review\Product\CollectionFactory
- */
- protected $_productsFactory;
-
- /**
- * @var \Magento\Review\Model\ReviewFactory
- */
- protected $_reviewFactory;
-
- /**
- * @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\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($context, $coreData, $urlModel, $data);
- }
-
- /**
- * Initialize grid
- */
- protected function _construct()
- {
- parent::_construct();
- $this->setId('reviwGrid');
- $this->setDefaultSort('created_at');
- }
-
- /**
- * Save search results
- *
- * @return \Magento\Backend\Block\Widget\Grid
- */
- protected function _afterLoadCollection()
- {
- /** @var $actionPager \Magento\Review\Helper\Action\Pager */
- $actionPager = $this->_reviewActionPager;
- $actionPager->setStorageId('reviews');
- $actionPager->setItems($this->getCollection()->getResultingIds());
-
- return parent::_afterLoadCollection();
- }
-
- /**
- * Prepare collection
- *
- * @return \Magento\Adminhtml\Block\Review\Grid
- */
- protected function _prepareCollection()
- {
- /** @var $model \Magento\Review\Model\Review */
- $model = $this->_reviewFactory->create();
- /** @var $collection \Magento\Review\Model\Resource\Review\Product\Collection */
- $collection = $this->_productsFactory->create();
-
- if ($this->getProductId() || $this->getRequest()->getParam('productId', false)) {
- $productId = $this->getProductId();
- if (!$productId) {
- $productId = $this->getRequest()->getParam('productId');
- }
- $this->setProductId($productId);
- $collection->addEntityFilter($this->getProductId());
- }
-
- if ($this->getCustomerId() || $this->getRequest()->getParam('customerId', false)) {
- $customerId = $this->getCustomerId();
- if (!$customerId) {
- $customerId = $this->getRequest()->getParam('customerId');
- }
- $this->setCustomerId($customerId);
- $collection->addCustomerFilter($this->getCustomerId());
- }
-
- if ($this->_coreRegistry->registry('usePendingFilter') === true) {
- $collection->addStatusFilter($model->getPendingStatus());
- }
-
- $collection->addStoreData();
-
- $this->setCollection($collection);
- return parent::_prepareCollection();
- }
-
- /**
- * Prepare grid columns
- *
- * @return \Magento\Backend\Block\Widget\Grid
- */
- protected function _prepareColumns()
- {
- $this->addColumn('review_id', array(
- 'header' => __('ID'),
- 'align' => 'right',
- 'width' => '50px',
- 'filter_index' => 'rt.review_id',
- 'index' => 'review_id',
- ));
-
- $this->addColumn('created_at', array(
- 'header' => __('Created'),
- 'align' => 'left',
- 'type' => 'datetime',
- 'width' => '100px',
- 'filter_index' => 'rt.created_at',
- 'index' => 'review_created_at',
- ));
-
- if (!$this->_coreRegistry->registry('usePendingFilter')) {
- $this->addColumn('status', array(
- 'header' => __('Status'),
- 'align' => 'left',
- 'type' => 'options',
- 'options' => $this->_reviewData->getReviewStatuses(),
- 'width' => '100px',
- 'filter_index' => 'rt.status_id',
- 'index' => 'status_id',
- ));
- }
-
- $this->addColumn('title', array(
- 'header' => __('Title'),
- 'align' => 'left',
- 'width' => '100px',
- 'filter_index' => 'rdt.title',
- 'index' => 'title',
- 'type' => 'text',
- 'truncate' => 50,
- 'escape' => true,
- ));
-
- $this->addColumn('nickname', array(
- 'header' => __('Nickname'),
- 'align' => 'left',
- 'width' => '100px',
- 'filter_index' => 'rdt.nickname',
- 'index' => 'nickname',
- 'type' => 'text',
- 'truncate' => 50,
- 'escape' => true,
- ));
-
- $this->addColumn('detail', array(
- 'header' => __('Review'),
- 'align' => 'left',
- 'index' => 'detail',
- 'filter_index' => 'rdt.detail',
- 'type' => 'text',
- 'truncate' => 50,
- 'nl2br' => true,
- 'escape' => true,
- ));
-
- /**
- * Check is single store mode
- */
- if (!$this->_storeManager->isSingleStoreMode()) {
- $this->addColumn('visible_in', array(
- 'header' => __('Visibility'),
- 'index' => 'stores',
- 'type' => 'store',
- 'store_view' => true,
- ));
- }
-
- $this->addColumn('type', array(
- 'header' => __('Type'),
- 'type' => 'select',
- 'index' => 'type',
- 'filter' => 'Magento\Adminhtml\Block\Review\Grid\Filter\Type',
- 'renderer' => 'Magento\Adminhtml\Block\Review\Grid\Renderer\Type'
- ));
-
- $this->addColumn('name', array(
- 'header' => __('Product'),
- 'align' =>'left',
- 'type' => 'text',
- 'index' => 'name',
- 'escape' => true
- ));
-
- $this->addColumn('sku', array(
- 'header' => __('SKU'),
- 'align' => 'right',
- 'type' => 'text',
- 'width' => '50px',
- 'index' => 'sku',
- 'escape' => true
- ));
-
- $this->addColumn('action',
- array(
- 'header' => __('Action'),
- 'width' => '50px',
- 'type' => 'action',
- 'getter' => 'getReviewId',
- 'actions' => array(
- array(
- 'caption' => __('Edit'),
- 'url' => array(
- 'base'=>'catalog/product_review/edit',
- 'params'=> array(
- 'productId' => $this->getProductId(),
- 'customerId' => $this->getCustomerId(),
- 'ret' => $this->_coreRegistry->registry('usePendingFilter') ? 'pending' : null
- )
- ),
- 'field' => 'id'
- )
- ),
- 'filter' => false,
- 'sortable' => false
- ));
-
- $this->addRssList('rss/catalog/review', __('Pending Reviews RSS'));
-
- return parent::_prepareColumns();
- }
-
- /**
- * Prepare grid mass actions
- *
- * @return \Magento\Backend\Block\Widget\Grid|void
- */
- protected function _prepareMassaction()
- {
- $this->setMassactionIdField('review_id');
- $this->setMassactionIdFilter('rt.review_id');
- $this->setMassactionIdFieldOnlyIndexValue(true);
- $this->getMassactionBlock()->setFormFieldName('reviews');
-
- $this->getMassactionBlock()->addItem('delete', array(
- 'label'=> __('Delete'),
- 'url' => $this->getUrl(
- '*/*/massDelete',
- array('ret' => $this->_coreRegistry->registry('usePendingFilter') ? 'pending' : 'index')
- ),
- 'confirm' => __('Are you sure?')
- ));
-
- $statuses = $this->_reviewData->getReviewStatusesOptionArray();
- array_unshift($statuses, array('label'=>'', 'value'=>''));
- $this->getMassactionBlock()->addItem('update_status', array(
- 'label' => __('Update Status'),
- 'url' => $this->getUrl(
- '*/*/massUpdateStatus',
- array('ret' => $this->_coreRegistry->registry('usePendingFilter') ? 'pending' : 'index')
- ),
- 'additional' => array(
- 'status' => array(
- 'name' => 'status',
- 'type' => 'select',
- 'class' => 'required-entry',
- 'label' => __('Status'),
- 'values' => $statuses
- )
- )
- ));
- }
-
- /**
- * Get row url
- *
- * @param \Magento\Review\Model\Review|\Magento\Object $row
- * @return string
- */
- public function getRowUrl($row)
- {
- return $this->getUrl('catalog/product_review/edit', array(
- 'id' => $row->getReviewId(),
- 'productId' => $this->getProductId(),
- 'customerId' => $this->getCustomerId(),
- 'ret' => $this->_coreRegistry->registry('usePendingFilter') ? 'pending' : null,
- ));
- }
-
- /**
- * Get grid url
- *
- * @return string
- */
- public function getGridUrl()
- {
- if ($this->getProductId() || $this->getCustomerId()) {
- return $this->getUrl(
- 'catalog/product_review/' . ($this->_coreRegistry->registry('usePendingFilter') ? 'pending' : ''),
- array(
- 'productId' => $this->getProductId(),
- 'customerId' => $this->getCustomerId(),
- )
- );
- } else {
- return $this->getCurrentUrl();
- }
- }
-}
diff --git a/app/code/Magento/Adminhtml/Block/Review/Grid/Filter/Type.php b/app/code/Magento/Adminhtml/Block/Review/Grid/Filter/Type.php
deleted file mode 100644
index b4ca6552cd53b..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Review/Grid/Filter/Type.php
+++ /dev/null
@@ -1,59 +0,0 @@
-
- */
-
-namespace Magento\Adminhtml\Block\Review\Grid\Filter;
-
-class Type extends \Magento\Adminhtml\Block\Widget\Grid\Column\Filter\Select
-{
- protected function _getOptions()
- {
- return array(
- array('label'=>'', 'value'=>''),
- array('label'=>__('Administrator'), 'value'=>1),
- array('label'=>__('Customer'), 'value'=>2),
- array('label'=>__('Guest'), 'value'=>3)
- );
- }
-
- public function getCondition()
- {
- if ($this->getValue() == 1) {
- return 1;
- } elseif ($this->getValue() == 2) {
- return 2;
- } else {
- return 3;
- }
- }
-}// Class \Magento\Adminhtml\Block\Review\Grid\Filter\Type END
diff --git a/app/code/Magento/Adminhtml/Block/Review/Grid/Renderer/Type.php b/app/code/Magento/Adminhtml/Block/Review/Grid/Renderer/Type.php
deleted file mode 100644
index ea8fa0c7e312d..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Review/Grid/Renderer/Type.php
+++ /dev/null
@@ -1,53 +0,0 @@
-
- */
-
-namespace Magento\Adminhtml\Block\Review\Grid\Renderer;
-
-class Type extends \Magento\Adminhtml\Block\Widget\Grid\Column\Renderer\AbstractRenderer
-{
- public function render(\Magento\Object $row)
- {
-
- if (is_null($row->getCustomerId())) {
- if ($row->getStoreId() == \Magento\Core\Model\AppInterface::ADMIN_STORE_ID) {
- return __('Administrator');
- } else {
- return __('Guest');
- }
- } elseif ($row->getCustomerId() > 0) {
- return __('Customer');
- }
-// return ($row->getCustomerId() ? __('Customer') : __('Guest'));
- }
-}// Class \Magento\Adminhtml\Block\Review\Grid\Renderer\Type END
diff --git a/app/code/Magento/Adminhtml/Block/Review/Product/Grid.php b/app/code/Magento/Adminhtml/Block/Review/Product/Grid.php
deleted file mode 100644
index 38038e6d01046..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Review/Product/Grid.php
+++ /dev/null
@@ -1,172 +0,0 @@
-
- */
-namespace Magento\Adminhtml\Block\Review\Product;
-
-class Grid extends \Magento\Catalog\Block\Adminhtml\Product\Grid
-{
- /**
- * @var \Magento\Core\Model\Resource\Website\CollectionFactory
- */
- protected $_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
- * @param \Magento\Catalog\Model\Product\Type $type
- * @param \Magento\Catalog\Model\Product\Status $status
- * @param \Magento\Catalog\Model\Product\Visibility $visibility
- * @param \Magento\Catalog\Helper\Data $catalogData
- * @param \Magento\Core\Model\Resource\Website\CollectionFactory $websitesFactory
- * @param array $data
- */
- public function __construct(
- \Magento\Backend\Block\Template\Context $context,
- \Magento\Core\Helper\Data $coreData,
- \Magento\Core\Model\Url $urlModel,
- \Magento\Core\Model\WebsiteFactory $websiteFactory,
- \Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory $setsFactory,
- \Magento\Catalog\Model\ProductFactory $productFactory,
- \Magento\Catalog\Model\Product\Type $type,
- \Magento\Catalog\Model\Product\Status $status,
- \Magento\Catalog\Model\Product\Visibility $visibility,
- \Magento\Catalog\Helper\Data $catalogData,
- \Magento\Core\Model\Resource\Website\CollectionFactory $websitesFactory,
- array $data = array()
- ) {
- $this->_websitesFactory = $websitesFactory;
- parent::__construct(
- $context,
- $coreData,
- $urlModel,
- $websiteFactory,
- $setsFactory,
- $productFactory,
- $type,
- $status,
- $visibility,
- $catalogData,
- $data
- );
- }
-
- protected function _construct()
- {
- parent::_construct();
- $this->setRowClickCallback('review.gridRowClick');
- $this->setUseAjax(true);
- }
-
- protected function _prepareColumns()
- {
- $this->addColumn('entity_id', array(
- 'header' => __('ID'),
- 'width' => '50px',
- 'index' => 'entity_id',
- ));
-
- $this->addColumn('name', array(
- 'header' => __('Name'),
- 'index' => 'name',
- ));
-
- if ((int)$this->getRequest()->getParam('store', 0)) {
- $this->addColumn('custom_name', array(
- 'header' => __('Product Store Name'),
- 'index' => 'custom_name'
- ));
- }
-
- $this->addColumn('sku', array(
- 'header' => __('SKU'),
- 'width' => '80px',
- 'index' => 'sku'
- ));
-
- $this->addColumn('price', array(
- 'header' => __('Price'),
- 'type' => 'currency',
- 'index' => 'price'
- ));
-
- $this->addColumn('qty', array(
- 'header' => __('Quantity'),
- 'width' => '130px',
- 'type' => 'number',
- 'index' => 'qty'
- ));
-
- $this->addColumn('status', array(
- 'header' => __('Status'),
- 'width' => '90px',
- 'index' => 'status',
- 'type' => 'options',
- 'source' => 'Magento\Catalog\Model\Product\Status',
- 'options' => $this->_status->getOptionArray(),
- ));
-
- /**
- * Check is single store mode
- */
- if (!$this->_storeManager->isSingleStoreMode()) {
- $this->addColumn('websites',
- array(
- 'header'=> __('Websites'),
- 'width' => '100px',
- 'sortable' => false,
- 'index' => 'websites',
- 'type' => 'options',
- 'options' => $this->_websitesFactory->create()->toOptionHash(),
- ));
- }
- }
-
- public function getGridUrl()
- {
- return $this->getUrl('catalog/*/productGrid', array('_current'=>true));
- }
-
- public function getRowUrl($row)
- {
- return $this->getUrl('catalog/*/jsonProductInfo', array('id' => $row->getId()));
- }
-
- protected function _prepareMassaction()
- {
- return $this;
- }
-}
diff --git a/app/code/Magento/Adminhtml/Block/Shipping/Carrier/Tablerate/Grid.php b/app/code/Magento/Adminhtml/Block/Shipping/Carrier/Tablerate/Grid.php
deleted file mode 100644
index 6798661931b8f..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Shipping/Carrier/Tablerate/Grid.php
+++ /dev/null
@@ -1,198 +0,0 @@
-
- */
-namespace Magento\Adminhtml\Block\Shipping\Carrier\Tablerate;
-
-class Grid extends \Magento\Adminhtml\Block\Widget\Grid
-{
- /**
- * Website filter
- *
- * @var int
- */
- protected $_websiteId;
-
- /**
- * Condition filter
- *
- * @var string
- */
- protected $_conditionName;
-
- /**
- * @var \Magento\Shipping\Model\Carrier\Tablerate
- */
- protected $_tablerate;
-
- /**
- * @var \Magento\Shipping\Model\Resource\Carrier\Tablerate\CollectionFactory
- */
- protected $_collectionFactory;
-
- /**
- * @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\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($context, $coreData, $urlModel, $data);
- }
-
- /**
- * Define grid properties
- *
- * @return void
- */
- protected function _construct()
- {
- parent::_construct();
- $this->setId('shippingTablerateGrid');
- $this->_exportPageSize = 10000;
- }
-
- /**
- * Set current website
- *
- * @param int $websiteId
- * @return \Magento\Adminhtml\Block\Shipping\Carrier\Tablerate\Grid
- */
- public function setWebsiteId($websiteId)
- {
- $this->_websiteId = $this->_storeManager->getWebsite($websiteId)->getId();
- return $this;
- }
-
- /**
- * Retrieve current website id
- *
- * @return int
- */
- public function getWebsiteId()
- {
- if (is_null($this->_websiteId)) {
- $this->_websiteId = $this->_storeManager->getWebsite()->getId();
- }
- return $this->_websiteId;
- }
-
- /**
- * Set current website
- *
- * @param int $websiteId
- * @return \Magento\Adminhtml\Block\Shipping\Carrier\Tablerate\Grid
- */
- public function setConditionName($name)
- {
- $this->_conditionName = $name;
- return $this;
- }
-
- /**
- * Retrieve current website id
- *
- * @return int
- */
- public function getConditionName()
- {
- return $this->_conditionName;
- }
-
- /**
- * Prepare shipping table rate collection
- *
- * @return \Magento\Adminhtml\Block\Shipping\Carrier\Tablerate\Grid
- */
- protected function _prepareCollection()
- {
- /** @var $collection \Magento\Shipping\Model\Resource\Carrier\Tablerate\Collection */
- $collection = $this->_collectionFactory->create();
- $collection->setConditionFilter($this->getConditionName())
- ->setWebsiteFilter($this->getWebsiteId());
-
- $this->setCollection($collection);
-
- return parent::_prepareCollection();
- }
-
- /**
- * Prepare table columns
- *
- * @return \Magento\Adminhtml\Block\Widget\Grid
- */
- protected function _prepareColumns()
- {
- $this->addColumn('dest_country', array(
- 'header' => __('Country'),
- 'index' => 'dest_country',
- 'default' => '*',
- ));
-
- $this->addColumn('dest_region', array(
- 'header' => __('Region/State'),
- 'index' => 'dest_region',
- 'default' => '*',
- ));
-
- $this->addColumn('dest_zip', array(
- 'header' => __('Zip/Postal Code'),
- 'index' => 'dest_zip',
- 'default' => '*',
- ));
-
- $label = $this->_tablerate->getCode('condition_name_short', $this->getConditionName());
- $this->addColumn('condition_value', array(
- 'header' => $label,
- 'index' => 'condition_value',
- ));
-
- $this->addColumn('price', array(
- 'header' => __('Shipping Price'),
- 'index' => 'price',
- ));
-
- return parent::_prepareColumns();
- }
-}
diff --git a/app/code/Magento/Adminhtml/Block/Sitemap/Edit.php b/app/code/Magento/Adminhtml/Block/Sitemap/Edit.php
deleted file mode 100644
index c9d7920924779..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Sitemap/Edit.php
+++ /dev/null
@@ -1,103 +0,0 @@
-
- */
-namespace Magento\Adminhtml\Block\Sitemap;
-
-class Edit extends \Magento\Adminhtml\Block\Widget\Form\Container
-{
- /**
- * Core registry
- *
- * @var \Magento\Core\Model\Registry
- */
- protected $_coreRegistry = null;
-
- /**
- * @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\Backend\Block\Template\Context $context,
- \Magento\Core\Helper\Data $coreData,
- \Magento\Core\Model\Registry $registry,
- array $data = array()
- ) {
- $this->_coreRegistry = $registry;
- parent::__construct($context, $coreData, $data);
- }
-
- /**
- * Init container
- */
- protected function _construct()
- {
- $this->_objectId = 'sitemap_id';
- $this->_controller = 'sitemap';
-
- parent::_construct();
-
- $this->_addButton('generate', array(
- 'label' => __('Save & Generate'),
- 'data_attribute' => array(
- 'mage-init' => array(
- 'button' => array(
- 'event' => 'save',
- 'target' => '#edit_form',
- 'eventData' => array(
- 'action' => array('args' => array(
- 'generate' => '1'
- )),
- ),
- ),
- ),
- ),
- 'class' => 'add',
- ));
- }
-
- /**
- * Get edit form container header text
- *
- * @return string
- */
- public function getHeaderText()
- {
- if ($this->_coreRegistry->registry('sitemap_sitemap')->getId()) {
- return __('Edit Sitemap');
- } else {
- return __('New Sitemap');
- }
- }
-}
diff --git a/app/code/Magento/Adminhtml/Block/Sitemap/Edit/Form.php b/app/code/Magento/Adminhtml/Block/Sitemap/Edit/Form.php
deleted file mode 100644
index 5122754073dbe..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Sitemap/Edit/Form.php
+++ /dev/null
@@ -1,137 +0,0 @@
-
- */
-namespace Magento\Adminhtml\Block\Sitemap\Edit;
-
-class Form extends \Magento\Backend\Block\Widget\Form\Generic
-{
- /**
- * @var \Magento\Core\Model\System\Store
- */
- protected $_systemStore;
-
- /**
- * @param \Magento\Backend\Block\Template\Context $context
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Core\Model\Registry $registry
- * @param \Magento\Data\FormFactory $formFactory
- * @param \Magento\Core\Model\System\Store $systemStore
- * @param array $data
- */
- public function __construct(
- \Magento\Backend\Block\Template\Context $context,
- \Magento\Core\Helper\Data $coreData,
- \Magento\Core\Model\Registry $registry,
- \Magento\Data\FormFactory $formFactory,
- \Magento\Core\Model\System\Store $systemStore,
- array $data = array()
- ) {
- $this->_systemStore = $systemStore;
- parent::__construct($context, $coreData, $registry, $formFactory, $data);
- }
-
- /**
- * Init form
- */
- protected function _construct()
- {
- parent::_construct();
- $this->setId('sitemap_form');
- $this->setTitle(__('Sitemap Information'));
- }
-
-
- protected function _prepareForm()
- {
- $model = $this->_coreRegistry->registry('sitemap_sitemap');
-
- /** @var \Magento\Data\Form $form */
- $form = $this->_formFactory->create(array(
- 'attributes' => array(
- 'id' => 'edit_form',
- 'action' => $this->getData('action'),
- 'method' => 'post',
- ))
- );
-
- $fieldset = $form->addFieldset('add_sitemap_form', array('legend' => __('Sitemap')));
-
- if ($model->getId()) {
- $fieldset->addField('sitemap_id', 'hidden', array(
- 'name' => 'sitemap_id',
- ));
- }
-
- $fieldset->addField('sitemap_filename', 'text', array(
- 'label' => __('Filename'),
- 'name' => 'sitemap_filename',
- 'required' => true,
- 'note' => __('example: sitemap.xml'),
- 'value' => $model->getSitemapFilename()
- ));
-
- $fieldset->addField('sitemap_path', 'text', array(
- 'label' => __('Path'),
- 'name' => 'sitemap_path',
- 'required' => true,
- 'note' => __('example: "sitemap/" or "/" for base path (path must be writeable)'),
- 'value' => $model->getSitemapPath()
- ));
-
- if (!$this->_storeManager->hasSingleStore()) {
- $field = $fieldset->addField('store_id', 'select', array(
- 'label' => __('Store View'),
- 'title' => __('Store View'),
- 'name' => 'store_id',
- 'required' => true,
- 'value' => $model->getStoreId(),
- 'values' => $this->_systemStore->getStoreValuesForForm(),
- ));
- $renderer = $this->getLayout()
- ->createBlock('Magento\Backend\Block\Store\Switcher\Form\Renderer\Fieldset\Element');
- $field->setRenderer($renderer);
- } else {
- $fieldset->addField('store_id', 'hidden', array(
- 'name' => 'store_id',
- 'value' => $this->_storeManager->getStore(true)->getId()
- ));
- $model->setStoreId($this->_storeManager->getStore(true)->getId());
- }
-
- $form->setValues($model->getData());
- $form->setUseContainer(true);
- $this->setForm($form);
-
- return parent::_prepareForm();
- }
-}
diff --git a/app/code/Magento/Adminhtml/Block/Sitemap/Grid/Renderer/Action.php b/app/code/Magento/Adminhtml/Block/Sitemap/Grid/Renderer/Action.php
deleted file mode 100644
index 754750d651e3a..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Sitemap/Grid/Renderer/Action.php
+++ /dev/null
@@ -1,45 +0,0 @@
-getColumn()->setActions(array(array(
- 'url' => $this->getUrl('adminhtml/sitemap/generate', array('sitemap_id' => $row->getSitemapId())),
- 'caption' => __('Generate'),
- )));
- return parent::render($row);
- }
-}
diff --git a/app/code/Magento/Adminhtml/Block/Template.php b/app/code/Magento/Adminhtml/Block/Template.php
deleted file mode 100644
index 972f11b1ef837..0000000000000
--- a/app/code/Magento/Adminhtml/Block/Template.php
+++ /dev/null
@@ -1,40 +0,0 @@
-
- * @deprecated Moved to module Magento_Backend
- */
-namespace Magento\Adminhtml\Block;
-
-class Template extends \Magento\Backend\Block\Template
-{
-
-}
diff --git a/app/code/Magento/Adminhtml/Controller/Newsletter/Problem.php b/app/code/Magento/Adminhtml/Controller/Newsletter/Problem.php
deleted file mode 100644
index e8a921042102c..0000000000000
--- a/app/code/Magento/Adminhtml/Controller/Newsletter/Problem.php
+++ /dev/null
@@ -1,102 +0,0 @@
-
- */
-namespace Magento\Adminhtml\Controller\Newsletter;
-
-class Problem extends \Magento\Backend\App\Action
-{
- public function indexAction()
- {
- $this->_title->add(__('Newsletter Problems Report'));
-
- if ($this->getRequest()->getQuery('ajax')) {
- $this->_forward('grid');
- return;
- }
-
- $this->_view->getLayout()->getMessagesBlock()->setMessages(
- $this->_objectManager->get('Magento\Adminhtml\Model\Session')->getMessages(true)
- );
- $this->_view->loadLayout();
-
- $this->_setActiveMenu('Magento_Newsletter::newsletter_problem');
-
- $this->_addBreadcrumb(__('Newsletter Problem Reports'), __('Newsletter Problem Reports'));
-
- $this->_view->renderLayout();
- }
-
- public function gridAction()
- {
- if($this->getRequest()->getParam('_unsubscribe')) {
- $problems = (array) $this->getRequest()->getParam('problem', array());
- if (count($problems)>0) {
- $collection = $this->_objectManager->create('Magento\Newsletter\Model\Resource\Problem\Collection');
- $collection
- ->addSubscriberInfo()
- ->addFieldToFilter($collection->getResource()->getIdFieldName(),
- array('in'=>$problems))
- ->load();
-
- $collection->walk('unsubscribe');
- }
-
- $this->_objectManager->get('Magento\Adminhtml\Model\Session')
- ->addSuccess(__('We unsubscribed the people you identified.'));
- }
-
- if($this->getRequest()->getParam('_delete')) {
- $problems = (array) $this->getRequest()->getParam('problem', array());
- if (count($problems)>0) {
- $collection = $this->_objectManager->create('Magento\Newsletter\Model\Resource\Problem\Collection');
- $collection
- ->addFieldToFilter($collection->getResource()->getIdFieldName(),
- array('in'=>$problems))
- ->load();
- $collection->walk('delete');
- }
-
- $this->_objectManager->get('Magento\Adminhtml\Model\Session')
- ->addSuccess(__('The problems you identified have been deleted.'));
- }
- $this->_view->getLayout()->getMessagesBlock()->setMessages($this->_objectManager->get('Magento\Adminhtml\Model\Session')->getMessages(true));
-
- $this->_view->loadLayout(false);
- $this->_view->renderLayout();
- }
-
- protected function _isAllowed()
- {
- return $this->_authorization->isAllowed('Magento_Newsletter::problem');
- }
-}
diff --git a/app/code/Magento/Adminhtml/Controller/Newsletter/Subscriber.php b/app/code/Magento/Adminhtml/Controller/Newsletter/Subscriber.php
deleted file mode 100644
index a91f652f1266f..0000000000000
--- a/app/code/Magento/Adminhtml/Controller/Newsletter/Subscriber.php
+++ /dev/null
@@ -1,153 +0,0 @@
-
- */
-namespace Magento\Adminhtml\Controller\Newsletter;
-
-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->add(__('Newsletter Subscribers'));
-
- if ($this->getRequest()->getParam('ajax')) {
- $this->_forward('grid');
- return;
- }
-
- $this->_view->loadLayout();
-
- $this->_setActiveMenu('Magento_Newsletter::newsletter_subscriber');
-
- $this->_addBreadcrumb(__('Newsletter'), __('Newsletter'));
- $this->_addBreadcrumb(__('Subscribers'), __('Subscribers'));
-
- $this->_view->renderLayout();
- }
-
- public function gridAction()
- {
- $this->_view->loadLayout(false);
- $this->_view->renderLayout();
- }
-
- /**
- * Export subscribers grid to CSV format
- */
- public function exportCsvAction()
- {
- $this->_view->loadLayout();
- $fileName = 'subscribers.csv';
- $content = $this->_view->getLayout()->getChildBlock('adminhtml.newslettrer.subscriber.grid', 'grid.export');
-
- return $this->_fileFactory->create($fileName, $content->getCsvFile($fileName));
- }
-
- /**
- * Export subscribers grid to XML format
- */
- public function exportXmlAction()
- {
- $this->_view->loadLayout();
- $fileName = 'subscribers.xml';
- $content = $this->_view->getLayout()->getChildBlock('adminhtml.newslettrer.subscriber.grid', 'grid.export');
- return $this->_fileFactory->create($fileName, $content->getExcelFile($fileName));
- }
-
- public function massUnsubscribeAction()
- {
- $subscribersIds = $this->getRequest()->getParam('subscriber');
- if (!is_array($subscribersIds)) {
- $this->_objectManager->get('Magento\Adminhtml\Model\Session')->addError(__('Please select one or more subscribers.'));
- }
- else {
- try {
- foreach ($subscribersIds as $subscriberId) {
- $subscriber = $this->_objectManager->create('Magento\Newsletter\Model\Subscriber')->load($subscriberId);
- $subscriber->unsubscribe();
- }
- $this->_objectManager->get('Magento\Adminhtml\Model\Session')->addSuccess(
- __('A total of %1 record(s) were updated.', count($subscribersIds))
- );
- } catch (\Exception $e) {
- $this->_objectManager->get('Magento\Adminhtml\Model\Session')->addError($e->getMessage());
- }
- }
-
- $this->_redirect('adminhtml/*/index');
- }
-
- public function massDeleteAction()
- {
- $subscribersIds = $this->getRequest()->getParam('subscriber');
- if (!is_array($subscribersIds)) {
- $this->_objectManager->get('Magento\Adminhtml\Model\Session')->addError(__('Please select one or more subscribers.'));
- }
- else {
- try {
- foreach ($subscribersIds as $subscriberId) {
- $subscriber = $this->_objectManager->create('Magento\Newsletter\Model\Subscriber')->load($subscriberId);
- $subscriber->delete();
- }
- $this->_objectManager->get('Magento\Adminhtml\Model\Session')->addSuccess(
- __('Total of %1 record(s) were deleted', count($subscribersIds))
- );
- } catch (\Exception $e) {
- $this->_objectManager->get('Magento\Adminhtml\Model\Session')->addError($e->getMessage());
- }
- }
-
- $this->_redirect('adminhtml/*/index');
- }
-
- protected function _isAllowed()
- {
- return $this->_authorization->isAllowed('Magento_Newsletter::subscriber');
- }
-}
diff --git a/app/code/Magento/Adminhtml/Controller/Newsletter/Template.php b/app/code/Magento/Adminhtml/Controller/Newsletter/Template.php
deleted file mode 100644
index 53537fe7b0823..0000000000000
--- a/app/code/Magento/Adminhtml/Controller/Newsletter/Template.php
+++ /dev/null
@@ -1,276 +0,0 @@
-
- */
-namespace Magento\Adminhtml\Controller\Newsletter;
-
-class Template extends \Magento\Backend\App\Action
-{
- /**
- * Core registry
- *
- * @var \Magento\Core\Model\Registry
- */
- protected $_coreRegistry = null;
- /**
- * @param \Magento\Backend\App\Action\Context $context
- * @param \Magento\Core\Model\Registry $coreRegistry
- */
- public function __construct(
- \Magento\Backend\App\Action\Context $context,
- \Magento\Core\Model\Registry $coreRegistry
- ) {
- $this->_coreRegistry = $coreRegistry;
- parent::__construct($context);
- }
-
- /**
- * Check is allowed access
- *
- * @return bool
- */
- protected function _isAllowed()
- {
- return $this->_authorization
- ->isAllowed('Magento_Newsletter::template');
- }
-
- /**
- * Set title of page
- *
- * @return \Magento\Adminhtml\Controller\Newsletter\Template
- */
- protected function _setTitle()
- {
- return $this->_title->add(__('Newsletter Templates'));
- }
-
- /**
- * View Templates list
- *
- */
- public function indexAction()
- {
- $this->_setTitle();
-
- if ($this->getRequest()->getQuery('ajax')) {
- $this->_forward('grid');
- return;
- }
- $this->_view->loadLayout();
- $this->_setActiveMenu('Magento_Newsletter::newsletter_template');
- $this->_addBreadcrumb(__('Newsletter Templates'), __('Newsletter Templates'));
- $this->_addContent($this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Newsletter\Template', 'template'));
- $this->_view->renderLayout();
- }
-
- /**
- * JSON Grid Action
- *
- */
- public function gridAction()
- {
- $this->_view->loadLayout();
- $grid = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Newsletter\Template\Grid')
- ->toHtml();
- $this->getResponse()->setBody($grid);
- }
-
- /**
- * Create new Newsletter Template
- *
- */
- public function newAction()
- {
- $this->_forward('edit');
- }
-
- /**
- * Edit Newsletter Template
- *
- */
- public function editAction()
- {
- $this->_setTitle();
-
- $model = $this->_objectManager->create('Magento\Newsletter\Model\Template');
- $id = $this->getRequest()->getParam('id');
- if ($id) {
- $model->load($id);
- }
-
- $this->_coreRegistry->register('_current_template', $model);
-
- $this->_view->loadLayout();
- $this->_setActiveMenu('Magento_Newsletter::newsletter_template');
-
- if ($model->getId()) {
- $breadcrumbTitle = __('Edit Template');
- $breadcrumbLabel = $breadcrumbTitle;
- } else {
- $breadcrumbTitle = __('New Template');
- $breadcrumbLabel = __('Create Newsletter Template');
- }
-
- $this->_title->add($model->getId() ? $model->getTemplateCode() : __('New Template'));
-
- $this->_addBreadcrumb($breadcrumbLabel, $breadcrumbTitle);
-
- // restore data
- $values = $this->_getSession()->getData('newsletter_template_form_data', true);
- if ($values) {
- $model->addData($values);
- }
-
- $editBlock = $this->_view->getLayout()->getBlock('template_edit');
- if ($editBlock) {
- $editBlock->setEditMode($model->getId() > 0);
- }
-
- $this->_view->renderLayout();
- }
-
- /**
- * Drop Newsletter Template
- *
- */
- public function dropAction()
- {
- $this->_view->loadLayout('newsletter_template_preview');
- $this->_view->renderLayout();
- }
-
- /**
- * Save Newsletter Template
- *
- */
- public function saveAction()
- {
- $request = $this->getRequest();
- if (!$request->isPost()) {
- $this->getResponse()->setRedirect($this->getUrl('adminhtml/newsletter_template'));
- }
- $template = $this->_objectManager->create('Magento\Newsletter\Model\Template');
-
- $id = (int)$request->getParam('id');
- if ($id) {
- $template->load($id);
- }
-
- try {
- $template->addData($request->getParams())
- ->setTemplateSubject($request->getParam('subject'))
- ->setTemplateCode($request->getParam('code'))
- ->setTemplateSenderEmail($request->getParam('sender_email'))
- ->setTemplateSenderName($request->getParam('sender_name'))
- ->setTemplateText($request->getParam('text'))
- ->setTemplateStyles($request->getParam('styles'))
- ->setModifiedAt($this->_objectManager->get('Magento\Core\Model\Date')->gmtDate());
-
- if (!$template->getId()) {
- $template->setTemplateType(\Magento\Newsletter\Model\Template::TYPE_HTML);
- }
- if ($this->getRequest()->getParam('_change_type_flag')) {
- $template->setTemplateType(\Magento\Newsletter\Model\Template::TYPE_TEXT);
- $template->setTemplateStyles('');
- }
- if ($this->getRequest()->getParam('_save_as_flag')) {
- $template->setId(null);
- }
-
- $template->save();
-
- $this->_getSession()->addSuccess(__('The newsletter template has been saved.'));
- $this->_getSession()->setFormData(false);
-
- $this->_redirect('adminhtml/*');
- return;
- } catch (\Magento\Core\Exception $e) {
- $this->_getSession()->addError(nl2br($e->getMessage()));
- $this->_getSession()->setData('newsletter_template_form_data',
- $this->getRequest()->getParams());
- } catch (\Exception $e) {
- $this->_getSession()->addException($e,
- __('An error occurred while saving this template.')
- );
- $this->_getSession()->setData('newsletter_template_form_data', $this->getRequest()->getParams());
- }
-
- $this->_forward('new');
- }
-
- /**
- * Delete newsletter Template
- *
- */
- public function deleteAction()
- {
- $template = $this->_objectManager->create('Magento\Newsletter\Model\Template')
- ->load($this->getRequest()->getParam('id'));
- if ($template->getId()) {
- try {
- $template->delete();
- $this->_getSession()->addSuccess(__('The newsletter template has been deleted.'));
- $this->_getSession()->setFormData(false);
- } catch (\Magento\Core\Exception $e) {
- $this->_getSession()->addError($e->getMessage());
- } catch (\Exception $e) {
- $this->_getSession()->addException($e,
- __('An error occurred while deleting this template.')
- );
- }
- }
- $this->_redirect('adminhtml/*');
- }
-
- /**
- * Preview Newsletter template
- *
- */
- public function previewAction()
- {
- $this->_setTitle();
- $this->_view->loadLayout();
-
- $data = $this->getRequest()->getParams();
- if (empty($data) || !isset($data['id'])) {
- $this->_forward('noroute');
- return $this;
- }
-
- // set default value for selected store
- $data['preview_store_id'] = $this->_objectManager->get('Magento\Core\Model\StoreManager')
- ->getDefaultStoreView()->getId();
-
- $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
deleted file mode 100644
index 45ed4c367ed34..0000000000000
--- a/app/code/Magento/Adminhtml/Controller/Report.php
+++ /dev/null
@@ -1,106 +0,0 @@
-
- */
-namespace Magento\Adminhtml\Controller;
-
-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->_view->loadLayout();
- $this->_addBreadcrumb(__('Reports'), __('Reports'));
- return $this;
- }
-
-
- public function searchAction()
- {
- $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'));
- $this->_view->renderLayout();
- }
-
- /**
- * Export search report grid to CSV format
- */
- public function exportSearchCsvAction()
- {
- $this->_view->loadLayout(false);
- $content = $this->_view->getLayout()->getChildBlock('adminhtml.report.search.grid', 'grid.export');
- return $this->_fileFactory->create('search.csv', $content->getCsvFile());
- }
-
- /**
- * Export search report to Excel XML format
- */
- public function exportSearchExcelAction()
- {
- $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()
- {
- switch ($this->getRequest()->getActionName()) {
- case 'search':
- return $this->_authorization->isAllowed('Magento_Reports::report_search');
- break;
- default:
- return $this->_authorization->isAllowed('Magento_Reports::report');
- break;
- }
- }
-}
diff --git a/app/code/Magento/Adminhtml/Controller/Report/Customer.php b/app/code/Magento/Adminhtml/Controller/Report/Customer.php
deleted file mode 100644
index da40a61d283b6..0000000000000
--- a/app/code/Magento/Adminhtml/Controller/Report/Customer.php
+++ /dev/null
@@ -1,199 +0,0 @@
-
- */
-namespace Magento\Adminhtml\Controller\Report;
-
-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();
- if (!$act) {
- $act = 'default';
- }
-
- $this->_view->loadLayout();
- $this->_addBreadcrumb(
- __('Reports'),
- __('Reports')
- );
- $this->_addBreadcrumb(
- __('Customers'),
- __('Customers')
- );
- return $this;
- }
-
- public function accountsAction()
- {
- $this->_title->add(__('New Accounts Report'));
-
- $this->_initAction()
- ->_setActiveMenu('Magento_Reports::report_customers_accounts')
- ->_addBreadcrumb(
- __('New Accounts'),
- __('New Accounts')
- );
- $this->_view->renderLayout();
- }
-
- /**
- * Export new accounts report grid to CSV format
- */
- public function exportAccountsCsvAction()
- {
- $this->_view->loadLayout();
- $fileName = 'new_accounts.csv';
- /** @var \Magento\Backend\Block\Widget\Grid\ExportInterface $exportBlock */
- $exportBlock = $this->_view->getLayout()->getChildBlock('adminhtml.report.grid', 'grid.export');
- return $this->_fileFactory->create($fileName, $exportBlock->getCsvFile());
- }
-
- /**
- * Export new accounts report grid to Excel XML format
- */
- public function exportAccountsExcelAction()
- {
- $this->_view->loadLayout();
- $fileName = 'new_accounts.xml';
- /** @var \Magento\Backend\Block\Widget\Grid\ExportInterface $exportBlock */
- $exportBlock = $this->_view->getLayout()->getChildBlock('adminhtml.report.grid', 'grid.export');
- return $this->_fileFactory->create($fileName, $exportBlock->getExcelFile($fileName));
- }
-
- public function ordersAction()
- {
- $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'));
- $this->_view->renderLayout();
- }
-
- /**
- * Export customers most ordered report to CSV format
- */
- public function exportOrdersCsvAction()
- {
- $this->_view->loadLayout();
- $fileName = 'customers_orders.csv';
- /** @var \Magento\Backend\Block\Widget\Grid\ExportInterface $exportBlock */
- $exportBlock = $this->_view->getLayout()->getChildBlock('adminhtml.report.grid', 'grid.export');
- return $this->_fileFactory->create($fileName, $exportBlock->getCsvFile());
- }
-
- /**
- * Export customers most ordered report to Excel XML format
- */
- public function exportOrdersExcelAction()
- {
- $this->_view->loadLayout();
- $fileName = 'customers_orders.xml';
- /** @var \Magento\Backend\Block\Widget\Grid\ExportInterface $exportBlock */
- $exportBlock = $this->_view->getLayout()->getChildBlock('adminhtml.report.grid', 'grid.export');
- return $this->_fileFactory->create($fileName, $exportBlock->getExcelFile($fileName));
- }
-
- public function totalsAction()
- {
- $this->_title->add(__('Order Total Report'));
-
- $this->_initAction()
- ->_setActiveMenu('Magento_Reports::report_customers_totals')
- ->_addBreadcrumb(__('Customers by Orders Total'),
- __('Customers by Orders Total'));
- $this->_view->renderLayout();
- }
-
- /**
- * Export customers biggest totals report to CSV format
- */
- public function exportTotalsCsvAction()
- {
- $this->_view->loadLayout();
- $fileName = 'customer_totals.csv';
- /** @var \Magento\Backend\Block\Widget\Grid\ExportInterface $exportBlock */
- $exportBlock = $this->_view->getLayout()->getChildBlock('adminhtml.report.grid', 'grid.export');
- return $this->_fileFactory->create($fileName, $exportBlock->getCsvFile());
- }
-
- /**
- * Export customers biggest totals report to Excel XML format
- */
- public function exportTotalsExcelAction()
- {
- $this->_view->loadLayout();
- $fileName = 'customer_totals.xml';
- /** @var \Magento\Backend\Block\Widget\Grid\ExportInterface $exportBlock */
- $exportBlock = $this->_view->getLayout()->getChildBlock('adminhtml.report.grid', 'grid.export');
- return $this->_fileFactory->create($fileName, $exportBlock->getExcelFile($fileName));
- }
-
- protected function _isAllowed()
- {
- switch ($this->getRequest()->getActionName()) {
- case 'accounts':
- return $this->_authorization->isAllowed('Magento_Reports::accounts');
- break;
- case 'orders':
- return $this->_authorization->isAllowed('Magento_Reports::customers_orders');
- break;
- case 'totals':
- return $this->_authorization->isAllowed('Magento_Reports::totals');
- break;
- default:
- return $this->_authorization->isAllowed('Magento_Reports::customers');
- break;
- }
- }
-}
diff --git a/app/code/Magento/Adminhtml/Controller/Report/Product.php b/app/code/Magento/Adminhtml/Controller/Report/Product.php
deleted file mode 100644
index 5365f1e4a9f9b..0000000000000
--- a/app/code/Magento/Adminhtml/Controller/Report/Product.php
+++ /dev/null
@@ -1,261 +0,0 @@
-
- */
-namespace Magento\Adminhtml\Controller\Report;
-
-class Product extends \Magento\Adminhtml\Controller\Report\AbstractReport
-{
- /**
- * Add report/products breadcrumbs
- *
- * @return \Magento\Adminhtml\Controller\Report\Product
- */
- public function _initAction()
- {
- parent::_initAction();
- $this->_addBreadcrumb(
- __('Products'),
- __('Products')
- );
- return $this;
- }
-
- /**
- * Sold Products Report Action
- *
- */
- public function soldAction()
- {
- $this->_title->add(__('Ordered Products Report'));
- $this->_initAction()
- ->_setActiveMenu('Magento_Reports::report_products_sold')
- ->_addBreadcrumb(
- __('Products Ordered'),
- __('Products Ordered')
- );
- $this->_view->renderLayout();
- }
-
- /**
- * Export Sold Products report to CSV format action
- *
- */
- public function exportSoldCsvAction()
- {
- $this->_view->loadLayout();
- $fileName = 'products_ordered.csv';
- /** @var \Magento\Backend\Block\Widget\Grid\ExportInterface $exportBlock */
- $exportBlock = $this->_view->getLayout()->getChildBlock('adminhtml.report.grid', 'grid.export');
- return $this->_fileFactory->create($fileName, $exportBlock->getCsvFile());
- }
-
- /**
- * Export Sold Products report to XML format action
- *
- */
- public function exportSoldExcelAction()
- {
- $this->_view->loadLayout();
- $fileName = 'products_ordered.xml';
- /** @var \Magento\Backend\Block\Widget\Grid\ExportInterface $exportBlock */
- $exportBlock = $this->_view->getLayout()->getChildBlock('adminhtml.report.grid', 'grid.export');
- return $this->_fileFactory->create($fileName, $exportBlock->getExcelFile($fileName));
- }
-
- /**
- * Most viewed products
- *
- */
- public function viewedAction()
- {
- $this->_title->add(__('Product Views Report'));
-
- $this->_showLastExecutionTime(\Magento\Reports\Model\Flag::REPORT_PRODUCT_VIEWED_FLAG_CODE, 'viewed');
-
- $this->_initAction()
- ->_setActiveMenu('Magento_Reports::report_products_viewed')
- ->_addBreadcrumb(
- __('Products Most Viewed Report'),
- __('Products Most Viewed Report')
- );
-
- $gridBlock = $this->_view->getLayout()->getBlock('report_product_viewed.grid');
- $filterFormBlock = $this->_view->getLayout()->getBlock('grid.filter.form');
-
- $this->_initReportAction(array(
- $gridBlock,
- $filterFormBlock
- ));
-
- $this->_view->renderLayout();
- }
-
- /**
- * Export products most viewed report to CSV format
- *
- */
- public function exportViewedCsvAction()
- {
- $fileName = 'products_mostviewed.csv';
- $grid = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Product\Viewed\Grid');
- $this->_initReportAction($grid);
- return $this->_fileFactory->create($fileName, $grid->getCsvFile());
- }
-
- /**
- * Export products most viewed report to XML format
- *
- */
- public function exportViewedExcelAction()
- {
- $fileName = 'products_mostviewed.xml';
- $grid = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Product\Viewed\Grid');
- $this->_initReportAction($grid);
- return $this->_fileFactory->create($fileName, $grid->getExcelFile($fileName));
- }
-
- /**
- * Low stock action
- *
- */
- public function lowstockAction()
- {
- $this->_title->add(__('Low Stock Report'));
-
- $this->_initAction()
- ->_setActiveMenu('Magento_Reports::report_products_lowstock')
- ->_addBreadcrumb(
- __('Low Stock'),
- __('Low Stock')
- );
- $this->_view->renderLayout();
- }
-
- /**
- * Export low stock products report to CSV format
- *
- */
- public function exportLowstockCsvAction()
- {
- $this->_view->loadLayout(false);
- $fileName = 'products_lowstock.csv';
- $exportBlock = $this->_view->getLayout()
- ->getChildBlock('adminhtml.block.report.product.lowstock.grid', 'grid.export');
- return $this->_fileFactory->create($fileName, $exportBlock->getCsvFile());
- }
-
- /**
- * Export low stock products report to XML format
- *
- */
- public function exportLowstockExcelAction()
- {
- $this->_view->loadLayout(false);
- $fileName = 'products_lowstock.xml';
- $exportBlock = $this->_view->getLayout()
- ->getChildBlock('adminhtml.block.report.product.lowstock.grid', 'grid.export');
- return $this->_fileFactory->create($fileName, $exportBlock->getExcelFile());
- }
-
- /**
- * Downloads action
- *
- */
- public function downloadsAction()
- {
- $this->_title->add(__('Downloads Report'));
-
- $this->_initAction()
- ->_setActiveMenu('Magento_Downloadable::report_products_downloads')
- ->_addBreadcrumb(
- __('Downloads'),
- __('Downloads')
- )
- ->_addContent(
- $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Product\Downloads')
- );
- $this->_view->renderLayout();
- }
-
- /**
- * Export products downloads report to CSV format
- *
- */
- public function exportDownloadsCsvAction()
- {
- $fileName = 'products_downloads.csv';
- $content = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Product\Downloads\Grid')
- ->setSaveParametersInSession(true)
- ->getCsv();
-
- return $this->_fileFactory->create($fileName, $content);
- }
-
- /**
- * Export products downloads report to XLS format
- *
- */
- public function exportDownloadsExcelAction()
- {
- $fileName = 'products_downloads.xml';
- $content = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Product\Downloads\Grid')
- ->setSaveParametersInSession(true)
- ->getExcel($fileName);
-
- return $this->_fileFactory->create($fileName, $content);
- }
-
- /**
- * Check is allowed for report
- *
- * @return bool
- */
- protected function _isAllowed()
- {
- switch ($this->getRequest()->getActionName()) {
- case 'viewed':
- return $this->_authorization->isAllowed('Magento_Reports::viewed');
- break;
- case 'sold':
- return $this->_authorization->isAllowed('Magento_Reports::sold');
- break;
- case 'lowstock':
- return $this->_authorization->isAllowed('Magento_Reports::lowstock');
- break;
- default:
- return $this->_authorization->isAllowed('Magento_Reports::report_products');
- break;
- }
- }
-}
diff --git a/app/code/Magento/Adminhtml/Controller/Report/Sales.php b/app/code/Magento/Adminhtml/Controller/Report/Sales.php
deleted file mode 100644
index 4a02b2853ea1b..0000000000000
--- a/app/code/Magento/Adminhtml/Controller/Report/Sales.php
+++ /dev/null
@@ -1,408 +0,0 @@
-
- */
-namespace Magento\Adminhtml\Controller\Report;
-
-class Sales extends \Magento\Adminhtml\Controller\Report\AbstractReport
-{
- /**
- * Add report/sales breadcrumbs
- *
- * @return \Magento\Adminhtml\Controller\Report\Sales
- */
- public function _initAction()
- {
- parent::_initAction();
- $this->_addBreadcrumb(__('Sales'), __('Sales'));
- return $this;
- }
-
- public function salesAction()
- {
- $this->_title->add(__('Sales Report'));
-
- $this->_showLastExecutionTime(\Magento\Reports\Model\Flag::REPORT_ORDER_FLAG_CODE, 'sales');
-
- $this->_initAction()
- ->_setActiveMenu('Magento_Reports::report_salesroot_sales')
- ->_addBreadcrumb(__('Sales Report'), __('Sales Report'));
-
- $gridBlock = $this->_view->getLayout()->getBlock('report_sales_sales.grid');
- $filterFormBlock = $this->_view->getLayout()->getBlock('grid.filter.form');
-
- $this->_initReportAction(array(
- $gridBlock,
- $filterFormBlock
- ));
-
- $this->_view->renderLayout();
- }
-
- public function bestsellersAction()
- {
- $this->_title->add(__('Best Sellers Report'));
-
- $this->_showLastExecutionTime(\Magento\Reports\Model\Flag::REPORT_BESTSELLERS_FLAG_CODE, 'bestsellers');
-
- $this->_initAction()
- ->_setActiveMenu('Magento_Reports::report_products_bestsellers')
- ->_addBreadcrumb(__('Products Bestsellers Report'), __('Products Bestsellers Report'));
-
- $gridBlock = $this->_view->getLayout()->getBlock('report_sales_bestsellers.grid');
- $filterFormBlock = $this->_view->getLayout()->getBlock('grid.filter.form');
-
- $this->_initReportAction(array(
- $gridBlock,
- $filterFormBlock
- ));
-
- $this->_view->renderLayout();
- }
-
- /**
- * Export bestsellers report grid to CSV format
- */
- public function exportBestsellersCsvAction()
- {
- $fileName = 'bestsellers.csv';
- $grid = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Bestsellers\Grid');
- $this->_initReportAction($grid);
- return $this->_fileFactory->create($fileName, $grid->getCsvFile());
- }
-
- /**
- * Export bestsellers report grid to Excel XML format
- */
- public function exportBestsellersExcelAction()
- {
- $fileName = 'bestsellers.xml';
- $grid = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Bestsellers\Grid');
- $this->_initReportAction($grid);
- return $this->_fileFactory->create($fileName, $grid->getExcelFile($fileName));
- }
-
- /**
- * Refresh statistics for last 25 hours
- *
- * @return \Magento\Adminhtml\Controller\Report\Sales
- */
- public function refreshRecentAction()
- {
- return $this->_forward('refreshRecent', 'report_statistics');
- }
-
- /**
- * Refresh statistics for all period
- *
- * @return \Magento\Adminhtml\Controller\Report\Sales
- */
- public function refreshLifetimeAction()
- {
- return $this->_forward('refreshLifetime', 'report_statistics');
- }
-
- /**
- * Export sales report grid to CSV format
- */
- public function exportSalesCsvAction()
- {
- $fileName = 'sales.csv';
- $grid = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Sales\Grid');
- $this->_initReportAction($grid);
- return $this->_fileFactory->create($fileName, $grid->getCsvFile());
- }
-
- /**
- * Export sales report grid to Excel XML format
- */
- public function exportSalesExcelAction()
- {
- $fileName = 'sales.xml';
- $grid = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Sales\Grid');
- $this->_initReportAction($grid);
- return $this->_fileFactory->create($fileName, $grid->getExcelFile($fileName));
- }
-
- public function taxAction()
- {
- $this->_title->add(__('Tax Report'));
-
- $this->_showLastExecutionTime(\Magento\Reports\Model\Flag::REPORT_TAX_FLAG_CODE, 'tax');
-
- $this->_initAction()
- ->_setActiveMenu('Magento_Reports::report_salesroot_tax')
- ->_addBreadcrumb(__('Tax'), __('Tax'));
-
- $gridBlock = $this->_view->getLayout()->getBlock('report_sales_tax.grid');
- $filterFormBlock = $this->_view->getLayout()->getBlock('grid.filter.form');
-
- $this->_initReportAction(array(
- $gridBlock,
- $filterFormBlock
- ));
-
- $this->_view->renderLayout();
- }
-
- /**
- * Export tax report grid to CSV format
- */
- public function exportTaxCsvAction()
- {
- $fileName = 'tax.csv';
- $grid = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Tax\Grid');
- $this->_initReportAction($grid);
- return $this->_fileFactory->create($fileName, $grid->getCsvFile());
- }
-
- /**
- * Export tax report grid to Excel XML format
- */
- public function exportTaxExcelAction()
- {
- $fileName = 'tax.xml';
- $grid = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Tax\Grid');
- $this->_initReportAction($grid);
- return $this->_fileFactory->create($fileName, $grid->getExcelFile($fileName));
- }
-
- public function shippingAction()
- {
- $this->_title->add(__('Shipping Report'));
-
- $this->_showLastExecutionTime(\Magento\Reports\Model\Flag::REPORT_SHIPPING_FLAG_CODE, 'shipping');
-
- $this->_initAction()
- ->_setActiveMenu('Magento_Reports::report_salesroot_shipping')
- ->_addBreadcrumb(__('Shipping'), __('Shipping'));
-
- $gridBlock = $this->_view->getLayout()->getBlock('report_sales_shipping.grid');
- $filterFormBlock = $this->_view->getLayout()->getBlock('grid.filter.form');
-
- $this->_initReportAction(array(
- $gridBlock,
- $filterFormBlock
- ));
-
- $this->_view->renderLayout();
- }
-
- /**
- * Export shipping report grid to CSV format
- */
- public function exportShippingCsvAction()
- {
- $fileName = 'shipping.csv';
- $grid = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Shipping\Grid');
- $this->_initReportAction($grid);
- return $this->_fileFactory->create($fileName, $grid->getCsvFile());
- }
-
- /**
- * Export shipping report grid to Excel XML format
- */
- public function exportShippingExcelAction()
- {
- $fileName = 'shipping.xml';
- $grid = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Shipping\Grid');
- $this->_initReportAction($grid);
- return $this->_fileFactory->create($fileName, $grid->getExcelFile($fileName));
- }
-
- public function invoicedAction()
- {
- $this->_title->add(__('Invoice Report'));
-
- $this->_showLastExecutionTime(\Magento\Reports\Model\Flag::REPORT_INVOICE_FLAG_CODE, 'invoiced');
-
- $this->_initAction()
- ->_setActiveMenu('Magento_Reports::report_salesroot_invoiced')
- ->_addBreadcrumb(__('Total Invoiced'), __('Total Invoiced'));
-
- $gridBlock = $this->_view->getLayout()->getBlock('report_sales_invoiced.grid');
- $filterFormBlock = $this->_view->getLayout()->getBlock('grid.filter.form');
-
- $this->_initReportAction(array(
- $gridBlock,
- $filterFormBlock
- ));
-
- $this->_view->renderLayout();
- }
-
- /**
- * Export invoiced report grid to CSV format
- */
- public function exportInvoicedCsvAction()
- {
- $fileName = 'invoiced.csv';
- $grid = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Invoiced\Grid');
- $this->_initReportAction($grid);
- return $this->_fileFactory->create($fileName, $grid->getCsvFile());
- }
-
- /**
- * Export invoiced report grid to Excel XML format
- */
- public function exportInvoicedExcelAction()
- {
- $fileName = 'invoiced.xml';
- $grid = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Invoiced\Grid');
- $this->_initReportAction($grid);
- return $this->_fileFactory->create($fileName, $grid->getExcelFile($fileName));
- }
-
- public function refundedAction()
- {
- $this->_title->add(__('Refunds Report'));
-
- $this->_showLastExecutionTime(\Magento\Reports\Model\Flag::REPORT_REFUNDED_FLAG_CODE, 'refunded');
-
- $this->_initAction()
- ->_setActiveMenu('Magento_Reports::report_salesroot_refunded')
- ->_addBreadcrumb(__('Total Refunded'), __('Total Refunded'));
-
- $gridBlock = $this->_view->getLayout()->getBlock('report_sales_refunded.grid');
- $filterFormBlock = $this->_view->getLayout()->getBlock('grid.filter.form');
-
- $this->_initReportAction(array(
- $gridBlock,
- $filterFormBlock
- ));
-
- $this->_view->renderLayout();
- }
-
- /**
- * Export refunded report grid to CSV format
- */
- public function exportRefundedCsvAction()
- {
- $fileName = 'refunded.csv';
- $grid = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Refunded\Grid');
- $this->_initReportAction($grid);
- return $this->_fileFactory->create($fileName, $grid->getCsvFile());
- }
-
- /**
- * Export refunded report grid to Excel XML format
- */
- public function exportRefundedExcelAction()
- {
- $fileName = 'refunded.xml';
- $grid = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Refunded\Grid');
- $this->_initReportAction($grid);
- return $this->_fileFactory->create($fileName, $grid->getExcelFile($fileName));
- }
-
- public function couponsAction()
- {
- $this->_title->add(__('Coupons Report'));
-
- $this->_showLastExecutionTime(\Magento\Reports\Model\Flag::REPORT_COUPONS_FLAG_CODE, 'coupons');
-
- $this->_initAction()
- ->_setActiveMenu('Magento_Reports::report_salesroot_coupons')
- ->_addBreadcrumb(__('Coupons'), __('Coupons'));
-
- $gridBlock = $this->_view->getLayout()->getBlock('report_sales_coupons.grid');
- $filterFormBlock = $this->_view->getLayout()->getBlock('grid.filter.form');
-
- $this->_initReportAction(array(
- $gridBlock,
- $filterFormBlock
- ));
-
- $this->_view->renderLayout();
- }
-
- /**
- * Export coupons report grid to CSV format
- */
- public function exportCouponsCsvAction()
- {
- $fileName = 'coupons.csv';
- $grid = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Coupons\Grid');
- $this->_initReportAction($grid);
- return $this->_fileFactory->create($fileName, $grid->getCsvFile());
- }
-
- /**
- * Export coupons report grid to Excel XML format
- */
- public function exportCouponsExcelAction()
- {
- $fileName = 'coupons.xml';
- $grid = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Sales\Coupons\Grid');
- $this->_initReportAction($grid);
- return $this->_fileFactory->create($fileName, $grid->getExcelFile($fileName));
- }
-
- public function refreshStatisticsAction()
- {
- return $this->_forward('index', 'report_statistics');
- }
-
- protected function _isAllowed()
- {
- switch ($this->getRequest()->getActionName()) {
- case 'sales':
- return $this->_authorization->isAllowed('Magento_Reports::salesroot_sales');
- break;
- case 'tax':
- return $this->_authorization->isAllowed('Magento_Reports::tax');
- break;
- case 'shipping':
- return $this->_authorization->isAllowed('Magento_Reports::shipping');
- break;
- case 'invoiced':
- return $this->_authorization->isAllowed('Magento_Reports::invoiced');
- break;
- case 'refunded':
- return $this->_authorization->isAllowed('Magento_Reports::refunded');
- break;
- case 'coupons':
- return $this->_authorization->isAllowed('Magento_Reports::coupons');
- break;
- case 'shipping':
- return $this->_authorization->isAllowed('Magento_Reports::shipping');
- break;
- case 'bestsellers':
- return $this->_authorization->isAllowed('Magento_Reports::bestsellers');
- break;
- default:
- return $this->_authorization->isAllowed('Magento_Reports::salesroot');
- break;
- }
- }
-}
diff --git a/app/code/Magento/Adminhtml/Controller/Report/Shopcart.php b/app/code/Magento/Adminhtml/Controller/Report/Shopcart.php
deleted file mode 100644
index 965d125ad6198..0000000000000
--- a/app/code/Magento/Adminhtml/Controller/Report/Shopcart.php
+++ /dev/null
@@ -1,193 +0,0 @@
-
- */
-namespace Magento\Adminhtml\Controller\Report;
-
-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()
- {
- $this->_view->loadLayout();
- $this->_addBreadcrumb(__('Reports'), __('Reports'));
- $this->_addBreadcrumb(__('Shopping Cart'), __('Shopping Cart'));
- return $this;
- }
-
- public function customerAction()
- {
- $this->_title->add(__('Customer Shopping Carts'));
-
- $this->_initAction()
- ->_setActiveMenu('Magento_Reports::report_shopcart_customer')
- ->_addBreadcrumb(__('Customers Report'), __('Customers Report'))
- ->_addContent(
- $this->_view
- ->getLayout()
- ->createBlock('Magento\Adminhtml\Block\Report\Shopcart\Customer')
- );
- $this->_view->renderLayout();
- }
-
- /**
- * Export shopcart customer report to CSV format
- */
- public function exportCustomerCsvAction()
- {
- $fileName = 'shopcart_customer.csv';
- $content = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Shopcart\Customer\Grid')
- ->getCsvFile();
-
- return $this->_fileFactory->create($fileName, $content);
- }
-
- /**
- * Export shopcart customer report to Excel XML format
- */
- public function exportCustomerExcelAction()
- {
- $fileName = 'shopcart_customer.xml';
- $content = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Shopcart\Customer\Grid')
- ->getExcelFile($fileName);
-
- return $this->_fileFactory->create($fileName, $content);
- }
-
- public function productAction()
- {
- $this->_title->add(__('Products in Carts'));
-
- $this->_initAction()
- ->_setActiveMenu('Magento_Reports::report_shopcart_product')
- ->_addBreadcrumb(__('Products Report'), __('Products Report'))
- ->_addContent(
- $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Shopcart\Product')
- );
- $this->_view->renderLayout();
- }
-
- /**
- * Export products report grid to CSV format
- */
- public function exportProductCsvAction()
- {
- $fileName = 'shopcart_product.csv';
- $content = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Shopcart\Product\Grid')
- ->getCsvFile();
-
- return $this->_fileFactory->create($fileName, $content);
- }
-
- /**
- * Export products report to Excel XML format
- */
- public function exportProductExcelAction()
- {
- $fileName = 'shopcart_product.xml';
- $content = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Shopcart\Product\Grid')
- ->getExcelFile($fileName);
-
- return $this->_fileFactory->create($fileName, $content);
- }
-
- public function abandonedAction()
- {
- $this->_title->add(__('Abandoned Carts'));
-
- $this->_initAction()
- ->_setActiveMenu('Magento_Reports::report_shopcart_abandoned')
- ->_addBreadcrumb(__('Abandoned Carts'), __('Abandoned Carts'))
- ->_addContent(
- $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Shopcart\Abandoned')
- );
- $this->_view->renderLayout();
- }
-
- /**
- * Export abandoned carts report grid to CSV format
- */
- public function exportAbandonedCsvAction()
- {
- $fileName = 'shopcart_abandoned.csv';
- $content = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Shopcart\Abandoned\Grid')
- ->getCsvFile();
-
- return $this->_fileFactory->create($fileName, $content);
- }
-
- /**
- * Export abandoned carts report to Excel XML format
- */
- public function exportAbandonedExcelAction()
- {
- $fileName = 'shopcart_abandoned.xml';
- $content = $this->_view->getLayout()->createBlock('Magento\Adminhtml\Block\Report\Shopcart\Abandoned\Grid')
- ->getExcelFile($fileName);
-
- return $this->_fileFactory->create($fileName, $content);
- }
-
- protected function _isAllowed()
- {
- switch ($this->getRequest()->getActionName()) {
- case 'customer':
- return $this->_authorization->isAllowed(null);
- break;
- case 'product':
- return $this->_authorization->isAllowed('Magento_Reports::product');
- break;
- case 'abandoned':
- return $this->_authorization->isAllowed('Magento_Reports::abandoned');
- break;
- default:
- return $this->_authorization->isAllowed('Magento_Reports::shopcart');
- break;
- }
- }
-}
diff --git a/app/code/Magento/Adminhtml/Helper/Data.php b/app/code/Magento/Adminhtml/Helper/Data.php
deleted file mode 100644
index a51abb6fc5cab..0000000000000
--- a/app/code/Magento/Adminhtml/Helper/Data.php
+++ /dev/null
@@ -1,40 +0,0 @@
-
- * @deprecated Moved to module Magento_Backend
- */
-namespace Magento\Adminhtml\Helper;
-
-class Data extends \Magento\Backend\Helper\Data
-{
-
-}
diff --git a/app/code/Magento/Adminhtml/Model/Newsletter/Renderer/Text.php b/app/code/Magento/Adminhtml/Model/Newsletter/Renderer/Text.php
deleted file mode 100644
index d51fdb7698d05..0000000000000
--- a/app/code/Magento/Adminhtml/Model/Newsletter/Renderer/Text.php
+++ /dev/null
@@ -1,51 +0,0 @@
-
- */
-namespace Magento\Adminhtml\Model\Newsletter\Renderer;
-
-class Text implements \Magento\Data\Form\Element\Renderer\RendererInterface
-{
-
- public function render(\Magento\Data\Form\Element\AbstractElement $element)
- {
- $html = ''."\n";
- if ($element->getLabel()) {
- $html.= ''."\n";
- }
- $html.= ' |
-';
- $html.= ' | |
'."\n";
-
- return $html;
- }
-}
diff --git a/app/code/Magento/Adminhtml/Model/Observer.php b/app/code/Magento/Adminhtml/Model/Observer.php
deleted file mode 100644
index 37ecd6d4c9778..0000000000000
--- a/app/code/Magento/Adminhtml/Model/Observer.php
+++ /dev/null
@@ -1,40 +0,0 @@
-
- * @deprecated Moved to module Magento_Backend
- */
-namespace Magento\Adminhtml\Model;
-
-class Observer extends \Magento\Backend\Model\Observer
-{
-}
diff --git a/app/code/Magento/Adminhtml/Model/Report/Item.php b/app/code/Magento/Adminhtml/Model/Report/Item.php
deleted file mode 100644
index f1ec3887a332c..0000000000000
--- a/app/code/Magento/Adminhtml/Model/Report/Item.php
+++ /dev/null
@@ -1,68 +0,0 @@
-_isEmpty = $flag;
- return $this;
- }
-
- public function getIsEmpty()
- {
- return $this->_isEmpty;
- }
-
- public function hasIsEmpty()
- {}
-
- public function getChildren()
- {
- return $this->_children;
- }
-
- public function setChildren($children)
- {
- $this->_children = $children;
- return $this;
- }
-
- public function hasChildren()
- {
- return (count($this->_children) > 0) ? true : false;
- }
-
- public function addChild($child)
- {
- $this->_children[] = $child;
- return $this;
- }
-}
diff --git a/app/code/Magento/Adminhtml/Model/Search/Customer.php b/app/code/Magento/Adminhtml/Model/Search/Customer.php
deleted file mode 100644
index fa11df0c69b53..0000000000000
--- a/app/code/Magento/Adminhtml/Model/Search/Customer.php
+++ /dev/null
@@ -1,100 +0,0 @@
-
- */
-namespace Magento\Adminhtml\Model\Search;
-
-class Customer extends \Magento\Object
-{
- /**
- * Adminhtml data
- *
- * @var \Magento\Adminhtml\Helper\Data
- */
- protected $_adminhtmlData = null;
-
- /**
- * @var \Magento\Customer\Model\Resource\Customer\CollectionFactory
- */
- protected $_collectionFactory;
-
- /**
- * @param \Magento\Customer\Model\Resource\Customer\CollectionFactory $collectionFactory
- * @param \Magento\Adminhtml\Helper\Data $adminhtmlData
- */
- public function __construct(
- \Magento\Customer\Model\Resource\Customer\CollectionFactory $collectionFactory,
- \Magento\Adminhtml\Helper\Data $adminhtmlData
- ) {
- $this->_collectionFactory = $collectionFactory;
- $this->_adminhtmlData = $adminhtmlData;
- }
-
- /**
- * Load search results
- *
- * @return \Magento\Adminhtml\Model\Search\Customer
- */
- public function load()
- {
- $result = array();
- if (!$this->hasStart() || !$this->hasLimit() || !$this->hasQuery()) {
- $this->setResults($result);
- return $this;
- }
-
- $collection = $this->_collectionFactory->create()
- ->addNameToSelect()
- ->joinAttribute('company', 'customer_address/company', 'default_billing', null, 'left')
- ->addAttributeToFilter(array(
- array('attribute'=>'firstname', 'like' => $this->getQuery().'%'),
- array('attribute'=>'lastname', 'like' => $this->getQuery().'%'),
- array('attribute'=>'company', 'like' => $this->getQuery().'%'),
- ))
- ->setPage(1, 10)
- ->load();
-
- foreach ($collection->getItems() as $customer) {
- $result[] = array(
- 'id' => 'customer/1/'.$customer->getId(),
- 'type' => __('Customer'),
- 'name' => $customer->getName(),
- 'description' => $customer->getCompany(),
- 'url' => $this->_adminhtmlData->getUrl('customer/index/edit', array('id' => $customer->getId())),
- );
- }
-
- $this->setResults($result);
-
- return $this;
- }
-}
diff --git a/app/code/Magento/Adminhtml/etc/adminhtml/events.xml b/app/code/Magento/Adminhtml/etc/adminhtml/events.xml
deleted file mode 100644
index e2cb639c2d64d..0000000000000
--- a/app/code/Magento/Adminhtml/etc/adminhtml/events.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
-
-
-
diff --git a/app/code/Magento/Adminhtml/etc/adminhtml/menu.xml b/app/code/Magento/Adminhtml/etc/adminhtml/menu.xml
deleted file mode 100644
index 27d92ec34c8d4..0000000000000
--- a/app/code/Magento/Adminhtml/etc/adminhtml/menu.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-
-
-
-
-
diff --git a/app/code/Magento/Adminhtml/etc/config.xml b/app/code/Magento/Adminhtml/etc/config.xml
deleted file mode 100644
index bcff89c470e2d..0000000000000
--- a/app/code/Magento/Adminhtml/etc/config.xml
+++ /dev/null
@@ -1,78 +0,0 @@
-
-
-
-
-
-
- 1
-
-
-
-
-
-
- /*/sitemap.xml
-
-
-
-
-
- price
- media_image
- gallery
-
-
-
-
-
-
-
-
- default
-
-
- default
-
-
-
-
-
-
-
-
-
- true
-
-
-
- admin/noroute/index
-
-
-
-
-
diff --git a/app/code/Magento/Adminhtml/etc/di.xml b/app/code/Magento/Adminhtml/etc/di.xml
deleted file mode 100644
index d4a999e0e2e31..0000000000000
--- a/app/code/Magento/Adminhtml/etc/di.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- Magento\App\State::PARAM_INSTALL_DATE
-
-
-
-
-
-
-
-
diff --git a/app/code/Magento/Adminhtml/etc/events.xml b/app/code/Magento/Adminhtml/etc/events.xml
deleted file mode 100644
index 166dcf93fadb0..0000000000000
--- a/app/code/Magento/Adminhtml/etc/events.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
-
-
-
diff --git a/app/code/Magento/Adminhtml/etc/module.xml b/app/code/Magento/Adminhtml/etc/module.xml
index 4c589cb95b45a..d6a5997479c73 100755
--- a/app/code/Magento/Adminhtml/etc/module.xml
+++ b/app/code/Magento/Adminhtml/etc/module.xml
@@ -27,26 +27,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/app/code/Magento/Adminhtml/etc/sales.xml b/app/code/Magento/Adminhtml/etc/sales.xml
deleted file mode 100644
index d18d4b5dfa01b..0000000000000
--- a/app/code/Magento/Adminhtml/etc/sales.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/admin/popup.phtml b/app/code/Magento/Adminhtml/view/adminhtml/admin/popup.phtml
deleted file mode 100644
index 81d21c9c0da93..0000000000000
--- a/app/code/Magento/Adminhtml/view/adminhtml/admin/popup.phtml
+++ /dev/null
@@ -1,81 +0,0 @@
-
-
-
-
-
-getChildHtml('head') ?>
-
-getBodyClass()?' class="'.$this->getBodyClass().'"':'' ?>>
-
-getChildHtml('before_body_end') ?>
-
-
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_newsletter_problem_block.xml b/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_newsletter_problem_block.xml
deleted file mode 100644
index b07f47bd869de..0000000000000
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_newsletter_problem_block.xml
+++ /dev/null
@@ -1,105 +0,0 @@
-
-
-
-
-
-
- problemGrid
- Magento\Newsletter\Model\Resource\Grid\Collection
- true
- true
- 1
-
-
-
- problemGrid
- We found no problems.
-
-
-
- 0
- Magento\Adminhtml\Block\Newsletter\Problem\Grid\Filter\Checkbox
- Magento\Adminhtml\Block\Newsletter\Problem\Grid\Renderer\Checkbox
- col-select
- col-select
-
-
-
-
- ID
- problem_id
- col-id
- col-id
-
-
-
-
- Subscriber
- #$subscriber_id $customer_name ($subscriber_email)
- subscriber_id
- col-subscriber
- col-subscriber
-
-
-
-
- Queue Start Date
- queue_start_at
- true
- datetime
- col-start
- col-start
-
-
-
-
- Queue Subject
- template_subject
- col-subject
- col-subject
-
-
-
-
- Error Code
- problem_error_code
- number
- col-error-code
- col-error-code
-
-
-
-
- Error Text
- problem_error_text
- col-error
- col-error
-
-
-
-
-
-
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_newsletter_problem_grid.xml b/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_newsletter_problem_grid.xml
deleted file mode 100644
index 4da677d02338f..0000000000000
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_newsletter_problem_grid.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
-
-
-
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_newsletter_problem_index.xml b/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_newsletter_problem_index.xml
deleted file mode 100644
index 1042c4f79af8b..0000000000000
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_newsletter_problem_index.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_newsletter_queue_edit.xml b/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_newsletter_queue_edit.xml
deleted file mode 100644
index fdf7afc7ddcb1..0000000000000
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_newsletter_queue_edit.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-
-
-
-
-
-
-
- jquery/fileUploader/css/jquery.fileupload-ui.css
-
-
-
-
- jquery/fileUploader/jquery.fileupload.js
-
-
-
-
- jquery/fileUploader/load-image.min.js
-
-
-
-
- jquery/fileUploader/jquery.fileupload-fp.js
-
-
-
-
-
-
-
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_newsletter_queue_preview.xml b/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_newsletter_queue_preview.xml
deleted file mode 100644
index e68af194f9916..0000000000000
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_newsletter_queue_preview.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
-
- newsletter/preview/iframeswitcher.phtml
-
-
-
-
-
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_newsletter_subscriber_block.xml b/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_newsletter_subscriber_block.xml
deleted file mode 100644
index 2dbf6c7b132a1..0000000000000
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_newsletter_subscriber_block.xml
+++ /dev/null
@@ -1,182 +0,0 @@
-
-
-
-
-
-
- subscriberGrid
- Magento\Newsletter\Model\Resource\Subscriber\Grid\Collection
- subscriber_id
- desc
- 1
-
-
-
- subscriber_id
- subscriber
- 1
-
- -
-
- Unsubscribe
- - adminhtml/*/massUnsubscribe
-
- -
-
- Delete
- - adminhtml/*/massDelete
-
-
-
-
-
-
-
- -
-
- adminhtml/*/exportCsv
- - CSV
-
- -
-
- adminhtml/*/exportXml
- - Excel XML
-
-
-
-
-
-
- problemGrid
-
-
-
- ID
- subscriber_id
- col-id
- col-id
-
-
-
-
- Email
- subscriber_email
- col-email
- ccol-email
-
-
-
-
- Type
- type
- options
-
- -
-
- 1
- - Guest
-
- -
-
- 2
- - Customer
-
-
- col-type
- col-type
-
-
-
-
- Customer First Name
- customer_firstname
- ----
- col-first-name
- col-first-name
-
-
-
-
- Customer Last Name
- customer_lastname
- ----
- col-last-name
- col-last-name
-
-
-
-
- Status
- subscriber_status
- options
-
- - 2
- - Not Activated
-
-
- - 1
- - Subscribed
-
-
- - 3
- - Unsubscribed
-
-
- - 4
- - Unconfirmed
-
- col-status
- col-status
-
-
-
-
- Web Site
- website_id
- options
-
- col-website
- col-website
-
-
-
-
- Store
- group_id
- options
-
- col-store
- col-store
-
-
-
-
- Store View
- store_id
- options
-
- col-store-view
- col-store-view
-
-
-
-
-
-
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_newsletter_subscriber_exportcsv.xml b/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_newsletter_subscriber_exportcsv.xml
deleted file mode 100644
index 43d631c3b09b2..0000000000000
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_newsletter_subscriber_exportcsv.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
-
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_newsletter_subscriber_exportxml.xml b/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_newsletter_subscriber_exportxml.xml
deleted file mode 100644
index 43d631c3b09b2..0000000000000
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_newsletter_subscriber_exportxml.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
-
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_newsletter_subscriber_grid.xml b/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_newsletter_subscriber_grid.xml
deleted file mode 100644
index c44ea19140384..0000000000000
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_newsletter_subscriber_grid.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
-
-
-
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_newsletter_subscriber_index.xml b/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_newsletter_subscriber_index.xml
deleted file mode 100644
index 14e2fbf661c56..0000000000000
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_newsletter_subscriber_index.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_newsletter_template_edit.xml b/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_newsletter_template_edit.xml
deleted file mode 100644
index f3d508d79c899..0000000000000
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_newsletter_template_edit.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-
-
-
-
-
-
-
- jquery/fileUploader/css/jquery.fileupload-ui.css
-
-
-
-
- jquery/fileUploader/jquery.iframe-transport.js
-
-
-
-
- jquery/fileUploader/jquery.fileupload.js
-
-
-
-
- jquery/fileUploader/load-image.min.js
-
-
-
-
- jquery/fileUploader/canvas-to-blob.min.js
-
-
-
-
- jquery/fileUploader/jquery.fileupload-fp.js
-
-
-
-
-
-
-
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_newsletter_template_preview.xml b/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_newsletter_template_preview.xml
deleted file mode 100644
index 263293d5f071a..0000000000000
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_newsletter_template_preview.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
-
- newsletter/preview/iframeswitcher.phtml
-
-
-
-
-
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_report_exportsearchcsv.xml b/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_report_exportsearchcsv.xml
deleted file mode 100644
index 67af5f3b46797..0000000000000
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_report_exportsearchcsv.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
-
-
-
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_report_exportsearchexcel.xml b/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_report_exportsearchexcel.xml
deleted file mode 100644
index 67af5f3b46797..0000000000000
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_report_exportsearchexcel.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
-
-
-
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_report_product_viewed.xml b/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_report_product_viewed.xml
deleted file mode 100644
index 028cf9d17c80e..0000000000000
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_report_product_viewed.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
-
-
-
- This report uses timezone configuration data. Be sure to refresh lifetime statistics any time you change store timezone.
-
-
-
-
-
-
- store_ids
-
-
-
-
- report_type
- 0
-
-
-
-
-
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_report_sales_bestsellers.xml b/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_report_sales_bestsellers.xml
deleted file mode 100644
index 8d6f1a3b59886..0000000000000
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_report_sales_bestsellers.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-
-
-
-
-
-
- store_ids
-
-
-
-
- report_type
- 0
-
-
- show_order_statuses
- 0
-
-
- order_statuses
- 0
-
-
-
-
-
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_report_sales_coupons.xml b/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_report_sales_coupons.xml
deleted file mode 100644
index 52c3082f98dcd..0000000000000
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_report_sales_coupons.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-
-
-
-
-
-
- store_ids
-
-
-
-
- created_at_order
- Order Created Date
-
-
- updated_at_order
- Order Updated Date
-
-
- report_type
- note
- The Order Updated Date report is displayed in real-time, and does not need to be refreshed.
-
-
-
-
-
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_report_sales_invoiced.xml b/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_report_sales_invoiced.xml
deleted file mode 100644
index 3475feb0aa1a2..0000000000000
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_report_sales_invoiced.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
-
-
-
-
-
-
- store_ids
-
-
-
-
- created_at_order
- Order Created Date
-
-
- created_at_invoice
- Last Invoice Created Date
-
-
-
-
-
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_report_sales_refunded.xml b/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_report_sales_refunded.xml
deleted file mode 100644
index c946810836435..0000000000000
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_report_sales_refunded.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
-
-
-
-
-
-
- store_ids
-
-
-
-
- created_at_order
- Order Created Date
-
-
- created_at_refunded
- Last Credit Memo Created Date
-
-
-
-
-
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_report_sales_sales.xml b/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_report_sales_sales.xml
deleted file mode 100644
index 6f2cb45d6607f..0000000000000
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_report_sales_sales.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-
-
-
-
-
-
- store_ids
-
-
-
-
- created_at_order
- Order Created Date
-
-
- updated_at_order
- Order Updated Date
-
-
- report_type
- note
- The Order Updated Date report is displayed in real-time, and does not need to be refreshed.
-
-
-
-
-
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_report_sales_shipping.xml b/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_report_sales_shipping.xml
deleted file mode 100644
index a53b849601307..0000000000000
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_report_sales_shipping.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
-
-
-
-
-
-
- store_ids
-
-
-
-
- created_at_order
- Order Created Date
-
-
- created_at_shipment
- First Invoice Created Date
-
-
-
-
-
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_report_sales_tax.xml b/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_report_sales_tax.xml
deleted file mode 100644
index 8be8ee69c4f28..0000000000000
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_report_sales_tax.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-
-
-
-
-
-
- store_ids
-
-
-
-
- created_at_order
- Order Created Date
-
-
- updated_at_order
- Order Updated Date
-
-
- report_type
- note
- The Order Updated Date report is displayed in real-time, and does not need to be refreshed.
-
-
-
-
-
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_report_search.xml b/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_report_search.xml
deleted file mode 100644
index 4d1e81e94e9d4..0000000000000
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_report_search.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_report_search_block.xml b/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_report_search_block.xml
deleted file mode 100644
index a08d9aa4ab9ac..0000000000000
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/adminhtml_report_search_block.xml
+++ /dev/null
@@ -1,108 +0,0 @@
-
-
-
-
-
-
- searchReportGrid
- Magento\CatalogSearch\Model\Resource\Query\Collection
- query_id
- DESC
-
-
-
-
- -
-
- adminhtml/*/exportSearchCsv
- - CSV
-
- -
-
- adminhtml/*/exportSearchExcel
- - Excel XML
-
-
-
-
-
-
-
- - adminhtml/catalog_search/edit
- -
-
- getId
-
-
-
-
-
- ID
- 0
- query_id
- number
- col-id
- col-id
-
-
-
-
- Search Query
- query_text
- col-query
- col-query
-
-
-
-
- Store
- store_id
- store
- 1
- 0
- col-store
- col-store
-
-
-
-
- Results
- number
- num_results
- col-results
- col-results
-
-
-
-
- Hits
- number
- popularity
- col-hits
- col-hits
-
-
-
-
-
-
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/default.xml b/app/code/Magento/Adminhtml/view/adminhtml/layout/default.xml
deleted file mode 100644
index 8b77671e35619..0000000000000
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/default.xml
+++ /dev/null
@@ -1,301 +0,0 @@
-
-
-
-
-
-
- Magento Admin
-
-
-
- jquery/jquery.js
-
-
-
-
- mage/jquery-no-conflict.js
-
-
-
-
- jquery/jquery-ui.js
-
-
-
-
- head.load.min.js
-
-
-
-
- underscore.js
-
-
-
-
- mage/mage.js
-
-
-
-
- jquery/jquery.tmpl.min.js
-
-
-
-
- jquery/jquery.validate.js
-
-
-
-
- jquery/jquery.hoverIntent.js
-
-
-
-
- mage/translate.js
-
-
-
-
- mage/backend/bootstrap.js
-
-
-
-
- mage/backend/floating-header.js
-
-
-
-
- prototype/prototype.js
-
-
-
-
- prototype/window.js
-
-
-
-
- scriptaculous/builder.js
-
-
-
-
- scriptaculous/effects.js
-
-
-
-
- scriptaculous/dragdrop.js
-
-
-
-
- scriptaculous/controls.js
-
-
-
-
- scriptaculous/slider.js
-
-
-
-
- lib/ccard.js
-
-
-
-
- prototype/validation.js
-
-
-
-
- varien/js.js
-
-
-
-
- mage/adminhtml/hash.js
-
-
-
-
- mage/adminhtml/events.js
-
-
-
-
- mage/adminhtml/varienLoader.js
-
-
-
-
- mage/adminhtml/grid.js
-
-
-
-
- mage/backend/tabs.js
-
-
-
-
- mage/adminhtml/form.js
-
-
-
-
- mage/adminhtml/accordion.js
-
-
-
-
- mage/adminhtml/tools.js
-
-
-
-
- Magento_Catalog::catalog/product.js
-
-
-
-
- lib/ds-sleight.js
-
- - defer
- - lt IE 7
-
-
-
-
-
- mage/calendar.css
-
-
-
-
-
-
-
- jquery/jquery-ui-timepicker-addon.js
-
-
-
-
- mage/calendar.js
-
-
-
-
- extjs/ext-tree.js
-
-
-
- - can_load_ext_js
-
-
-
-
-
- extjs/ext-tree-checkbox.js
-
-
-
- - can_load_ext_js
-
-
-
-
-
- extjs/resources/css/ext-all.css
-
-
-
- - can_load_ext_js
-
-
-
-
-
- extjs/resources/css/ytheme-magento.css
-
-
-
- - can_load_ext_js
-
-
-
-
-
- Magento_Rule::rules.js
-
-
-
- - can_load_rules_js
-
-
-
-
-
- mage/adminhtml/wysiwyg/tiny_mce/setup.js
-
-
-
- - can_load_tiny_mce
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/newsletter_queue_preview.xml b/app/code/Magento/Adminhtml/view/adminhtml/layout/newsletter_queue_preview.xml
deleted file mode 100644
index 596315b0f0cae..0000000000000
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/newsletter_queue_preview.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/layout/newsletter_template_preview.xml b/app/code/Magento/Adminhtml/view/adminhtml/layout/newsletter_template_preview.xml
deleted file mode 100644
index 5fbce706060ee..0000000000000
--- a/app/code/Magento/Adminhtml/view/adminhtml/layout/newsletter_template_preview.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/newsletter/queue/edit.phtml b/app/code/Magento/Adminhtml/view/adminhtml/newsletter/queue/edit.phtml
deleted file mode 100644
index e8aa2497ac387..0000000000000
--- a/app/code/Magento/Adminhtml/view/adminhtml/newsletter/queue/edit.phtml
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
- getBackButtonHtml() ?>
- getPreviewButtonHtml(); ?>
- getIsPreview()): ?>
- getResetButtonHtml() ?>
- getSaveButtonHtml() ?>
-
- getCanResume()): ?>
- getResumeButtonHtml() ?>
-
-
-
-
-
-
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/newsletter/template/edit.phtml b/app/code/Magento/Adminhtml/view/adminhtml/newsletter/template/edit.phtml
deleted file mode 100644
index e8f34e3019bc8..0000000000000
--- a/app/code/Magento/Adminhtml/view/adminhtml/newsletter/template/edit.phtml
+++ /dev/null
@@ -1,191 +0,0 @@
-
-
- getBackButtonHtml(); ?>
- getResetButtonHtml(); ?>
- isTextType()): ?>
- getToPlainButtonHtml(); ?>
- getToHtmlButtonHtml(); ?>
-
- getPreviewButtonHtml(); ?>
- getEditMode()): ?>
- getDeleteButtonHtml(); ?>
-
- getEditMode()): ?>
- getSaveAsButtonHtml(); ?>
-
- getSaveButtonHtml(); ?>
-
-
-
-
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/page/head.phtml b/app/code/Magento/Adminhtml/view/adminhtml/page/head.phtml
deleted file mode 100644
index f630c4acbe0e2..0000000000000
--- a/app/code/Magento/Adminhtml/view/adminhtml/page/head.phtml
+++ /dev/null
@@ -1,63 +0,0 @@
-
-
-
-getTitle())) ?>
-
-
-
-
-
-getCssJsHtml() ?>
-
-getCanLoadExtJs()): ?>
-
-
-
-getCanLoadTinyMce()): // TinyMCE is broken when loaded through index.php ?>
-
-
-
-
-
-getChildHtml('components'); ?>
-getChildHtml('calendar'); ?>
-getChildHtml('optional_zip_countries'); ?>
-helper('Magento\Core\Helper\Js')->getTranslatorScript() ?>
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/page/header.phtml b/app/code/Magento/Adminhtml/view/adminhtml/page/header.phtml
deleted file mode 100644
index 2f772dbc98307..0000000000000
--- a/app/code/Magento/Adminhtml/view/adminhtml/page/header.phtml
+++ /dev/null
@@ -1,53 +0,0 @@
-
-
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/urlrewrite/selector.phtml b/app/code/Magento/Adminhtml/view/adminhtml/urlrewrite/selector.phtml
index 99cb75e01ff63..95e2cc91ba3a9 100644
--- a/app/code/Magento/Adminhtml/view/adminhtml/urlrewrite/selector.phtml
+++ b/app/code/Magento/Adminhtml/view/adminhtml/urlrewrite/selector.phtml
@@ -35,7 +35,7 @@
- helper('Magento\Adminhtml\Helper\Data')->getUrl('adminhtml/*/*')?>
+ helper('Magento\Backend\Helper\Data')->getUrl('adminhtml/*/*')?>