Skip to content

Commit bf65ffc

Browse files
authored
Merge pull request #101 from ihorvansach/refactor-code-loginascustomer-ui
Moved all UI from LoginAsCustomer to new LoginAsCustomerUi module
2 parents 60bf50a + 6103998 commit bf65ffc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+125
-64
lines changed

app/code/Magento/LoginAsCustomer/composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"magento/module-customer": "*",
99
"magento/module-sales": "*",
1010
"magento/module-store": "*",
11-
"magento/module-ui": "*",
1211
"magento/module-user": "*"
1312
},
1413
"suggest": {

app/code/Magento/LoginAsCustomer/etc/adminhtml/di.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
9-
<type name="Magento\Backend\Block\Widget\Button\Toolbar">
10-
<plugin name="Magento_LoginAsCustomer::toolbar_button" type="Magento\LoginAsCustomer\Plugin\Button\ToolbarPlugin" />
11-
</type>
129
<type name="Magento\Sales\Model\Order">
1310
<plugin name="lac-admin-order-placement-comment" type="Magento\LoginAsCustomer\Plugin\AdminAddCommentOnOrderPlacementPlugin"/>
1411
</type>

app/code/Magento/LoginAsCustomer/Block/Adminhtml/Login.php renamed to app/code/Magento/LoginAsCustomerUi/Block/Adminhtml/Login.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
declare(strict_types=1);
77

8-
namespace Magento\LoginAsCustomer\Block\Adminhtml;
8+
namespace Magento\LoginAsCustomerUi\Block\Adminhtml;
99

1010
/**
1111
* Login as customer log

app/code/Magento/LoginAsCustomer/Controller/Adminhtml/Login/Grid.php renamed to app/code/Magento/LoginAsCustomerUi/Controller/Adminhtml/Login/Grid.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
declare(strict_types=1);
77

8-
namespace Magento\LoginAsCustomer\Controller\Adminhtml\Login;
8+
namespace Magento\LoginAsCustomerUi\Controller\Adminhtml\Login;
99

1010
use Magento\Framework\Controller\ResultFactory;
1111
use Magento\Framework\Controller\ResultInterface;
@@ -22,7 +22,7 @@ class Grid extends Action implements HttpPostActionInterface
2222
*
2323
* @see _isAllowed()
2424
*/
25-
const ADMIN_RESOURCE = 'Magento_LoginAsCustomer::login_log';
25+
const ADMIN_RESOURCE = 'Magento_LoginAsCustomerUi::login_log';
2626

2727
/**
2828
* Login as customer log ajax grid

app/code/Magento/LoginAsCustomer/Controller/Adminhtml/Login/Index.php renamed to app/code/Magento/LoginAsCustomerUi/Controller/Adminhtml/Login/Index.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
declare(strict_types=1);
77

8-
namespace Magento\LoginAsCustomer\Controller\Adminhtml\Login;
8+
namespace Magento\LoginAsCustomerUi\Controller\Adminhtml\Login;
99

1010
use Magento\Backend\Model\View\Result\Page;
1111
use Magento\Framework\Controller\ResultFactory;
@@ -25,7 +25,7 @@ class Index extends Action implements HttpGetActionInterface, HttpPostActionInte
2525
*
2626
* @see _isAllowed()
2727
*/
28-
const ADMIN_RESOURCE = 'Magento_LoginAsCustomer::login_log';
28+
const ADMIN_RESOURCE = 'Magento_LoginAsCustomerUi::login_log';
2929

3030
/**
3131
* Login As Customer log grid action
@@ -42,7 +42,7 @@ public function execute():ResultInterface
4242

4343
/** @var Page $resultPage */
4444
$resultPage = $this->resultFactory->create(ResultFactory::TYPE_PAGE);
45-
$resultPage->setActiveMenu('Magento_LoginAsCustomer::login_log')
45+
$resultPage->setActiveMenu('Magento_LoginAsCustomerUi::login_log')
4646
->addBreadcrumb(__('Customer'), __('Login As Customer Log'));
4747
$resultPage->getConfig()->getTitle()->prepend(__('Login As Customer Log'));
4848

app/code/Magento/LoginAsCustomer/Controller/Adminhtml/Login/Login.php renamed to app/code/Magento/LoginAsCustomerUi/Controller/Adminhtml/Login/Login.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
declare(strict_types=1);
77

8-
namespace Magento\LoginAsCustomer\Controller\Adminhtml\Login;
8+
namespace Magento\LoginAsCustomerUi\Controller\Adminhtml\Login;
99

1010
use Magento\Framework\Controller\ResultInterface;
1111
use Magento\Framework\App\Action\HttpGetActionInterface;
@@ -28,7 +28,7 @@ class Login extends Action implements HttpGetActionInterface, HttpPostActionInte
2828
*
2929
* @see _isAllowed()
3030
*/
31-
const ADMIN_RESOURCE = 'Magento_LoginAsCustomer::login_button';
31+
const ADMIN_RESOURCE = 'Magento_LoginAsCustomerUi::login_button';
3232

3333
/**
3434
* @var \Magento\Backend\Model\Auth\Session

app/code/Magento/LoginAsCustomer/Controller/Adminhtml/Login/Manual.php renamed to app/code/Magento/LoginAsCustomerUi/Controller/Adminhtml/Login/Manual.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
declare(strict_types=1);
77

8-
namespace Magento\LoginAsCustomer\Controller\Adminhtml\Login;
8+
namespace Magento\LoginAsCustomerUi\Controller\Adminhtml\Login;
99

1010
use Magento\Backend\Model\View\Result\Page;
1111
use Magento\Framework\Controller\ResultFactory;
@@ -23,7 +23,7 @@ class Manual extends Action implements HttpGetActionInterface
2323
*
2424
* @see _isAllowed()
2525
*/
26-
const ADMIN_RESOURCE = 'Magento_LoginAsCustomer::login_button';
26+
const ADMIN_RESOURCE = 'Magento_LoginAsCustomerUi::login_button';
2727

2828
/**
2929
* Chose store view for Login as customer
@@ -34,7 +34,7 @@ public function execute():ResultInterface
3434
{
3535
/** @var Page $resultPage */
3636
$resultPage = $this->resultFactory->create(ResultFactory::TYPE_PAGE);
37-
$resultPage->setActiveMenu('Magento_LoginAsCustomer::login_button')
37+
$resultPage->setActiveMenu('Magento_LoginAsCustomerUi::login_button')
3838
->addBreadcrumb(__('Customer'), __('Login As Customer Log'), __('Store View To Login In'));
3939
$resultPage->getConfig()->getTitle()->prepend(__('Store View To Login In'));
4040

app/code/Magento/LoginAsCustomer/Controller/Login/Index.php renamed to app/code/Magento/LoginAsCustomerUi/Controller/Login/Index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
declare(strict_types=1);
77

8-
namespace Magento\LoginAsCustomer\Controller\Login;
8+
namespace Magento\LoginAsCustomerUi\Controller\Login;
99

1010
use Magento\Framework\App\RequestInterface;
1111
use Magento\Framework\Controller\Result\Redirect;

app/code/Magento/LoginAsCustomer/Controller/Login/Proceed.php renamed to app/code/Magento/LoginAsCustomerUi/Controller/Login/Proceed.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
declare(strict_types=1);
77

8-
namespace Magento\LoginAsCustomer\Controller\Login;
8+
namespace Magento\LoginAsCustomerUi\Controller\Login;
99

1010
use Magento\Backend\Model\View\Result\Page;
1111
use Magento\Framework\Controller\ResultFactory;

app/code/Magento/LoginAsCustomer/CustomerData/LoginAsCustomer.php renamed to app/code/Magento/LoginAsCustomerUi/CustomerData/LoginAsCustomerUi.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
declare(strict_types=1);
77

8-
namespace Magento\LoginAsCustomer\CustomerData;
8+
namespace Magento\LoginAsCustomerUi\CustomerData;
99

1010
use Magento\Customer\CustomerData\SectionSourceInterface;
1111
use Magento\Customer\Model\Session;
@@ -16,7 +16,7 @@
1616
*
1717
* @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
1818
*/
19-
class LoginAsCustomer implements SectionSourceInterface
19+
class LoginAsCustomerUi implements SectionSourceInterface
2020
{
2121
/**
2222
* @var Session
@@ -29,7 +29,7 @@ class LoginAsCustomer implements SectionSourceInterface
2929
private $storeManager;
3030

3131
/**
32-
* LoginAsCustomer constructor.
32+
* LoginAsCustomerUi constructor.
3333
* @param Session $customerSession
3434
* @param StoreManagerInterface $storeManager
3535
*/

0 commit comments

Comments
 (0)