File tree Expand file tree Collapse file tree 11 files changed +82
-41
lines changed
Controller/Adminhtml/Customer
dev/tests/integration/testsuite/Magento
Customer/Controller/Adminhtml
Review/Controller/Adminhtml/Customer Expand file tree Collapse file tree 11 files changed +82
-41
lines changed Original file line number Diff line number Diff line change @@ -129,16 +129,6 @@ public function getOrdersUrl()
129
129
return '' ;
130
130
}
131
131
132
- /**
133
- * Retrieve the Url for customer reviews.
134
- *
135
- * @return string
136
- */
137
- public function getReviewsUrl ()
138
- {
139
- return $ this ->_urlBuilder ->getUrl ('review/customer/index ' , ['_secure ' => true ]);
140
- }
141
-
142
132
/**
143
133
* Retrieve the Url for managing customer wishlist.
144
134
*
Original file line number Diff line number Diff line change 6
6
namespace Magento \Customer \Controller ;
7
7
8
8
use Magento \Framework \App \Action \Context ;
9
+ use Magento \Framework \App \Action \HttpGetActionInterface ;
9
10
use Magento \Framework \View \Result \PageFactory ;
10
11
11
- class Review extends \Magento \Framework \App \Action \Action
12
+ /**
13
+ * Deprecated class which was in use as general class in Customer Account "My Product Reviews" tab.
14
+ *
15
+ * @deprecated Remove Customer module's dependency on Review. Non-used class.
16
+ * @see \Magento\Review\Controller\Customer
17
+ */
18
+ class Review extends \Magento \Framework \App \Action \Action implements HttpGetActionInterface
12
19
{
13
20
/**
14
21
* @var PageFactory
@@ -28,6 +35,8 @@ public function __construct(
28
35
}
29
36
30
37
/**
38
+ * Main page in Customer Account "My Product Reviews" tab.
39
+ *
31
40
* @return \Magento\Framework\View\Result\Page
32
41
*/
33
42
public function execute ()
Original file line number Diff line number Diff line change 6
6
*/
7
7
namespace Magento \Customer \Controller \Review ;
8
8
9
- class Index extends \Magento \Customer \Controller \Review
9
+ use Magento \Framework \App \Action \HttpGetActionInterface ;
10
+
11
+ /**
12
+ * Deprecated class which was in use as main page in Customer Account "My Product Reviews" tab.
13
+ *
14
+ * @deprecated Remove Customer module's dependency on Review. Non-used class.
15
+ * @see \Magento\Review\Controller\Customer\Index
16
+ */
17
+ class Index extends \Magento \Customer \Controller \Review implements HttpGetActionInterface
10
18
{
11
19
}
Original file line number Diff line number Diff line change 6
6
*/
7
7
namespace Magento \Customer \Controller \Review ;
8
8
9
- class View extends \Magento \Customer \Controller \Review
9
+ use Magento \Framework \App \Action \HttpGetActionInterface ;
10
+
11
+ /**
12
+ * Deprecated class which was in use as view page in Customer Account "My Product Reviews" tab.
13
+ *
14
+ * @deprecated Remove Customer module's dependency on Review. Non-used class.
15
+ * @see \Magento\Review\Controller\Customer\View
16
+ */
17
+ class View extends \Magento \Customer \Controller \Review implements HttpGetActionInterface
10
18
{
11
19
}
Original file line number Diff line number Diff line change 19
19
"magento/module-newsletter" : " *" ,
20
20
"magento/module-page-cache" : " *" ,
21
21
"magento/module-quote" : " *" ,
22
- "magento/module-review" : " *" ,
23
22
"magento/module-sales" : " *" ,
24
23
"magento/module-store" : " *" ,
25
24
"magento/module-tax" : " *" ,
Original file line number Diff line number Diff line change 3
3
* Copyright © Magento, Inc. All rights reserved.
4
4
* See COPYING.txt for license details.
5
5
*/
6
- namespace Magento \Customer \Block \Adminhtml \Edit \Tab ;
6
+ declare (strict_types=1 );
7
+
8
+ namespace Magento \Review \Block \Adminhtml \Edit \Tab ;
7
9
8
10
/**
11
+ * Review tab in adminhtml area.
12
+ *
9
13
* @api
10
- * @since 100.0.2
11
14
*/
12
15
class Reviews extends \Magento \Review \Block \Adminhtml \Grid
13
16
{
14
17
/**
15
- * Hide grid mass action elements
18
+ * Hide grid mass action elements.
16
19
*
17
- * @return \Magento\Customer \Block\Adminhtml\Edit\Tab\Reviews
20
+ * @return \Magento\Review \Block\Adminhtml\Edit\Tab\Reviews
18
21
*/
19
22
protected function _prepareMassaction ()
20
23
{
@@ -28,6 +31,6 @@ protected function _prepareMassaction()
28
31
*/
29
32
public function getGridUrl ()
30
33
{
31
- return $ this ->getUrl ('customer/* /productReviews ' , ['_current ' => true ]);
34
+ return $ this ->getUrl ('review/customer /productReviews ' , ['_current ' => true ]);
32
35
}
33
36
}
Original file line number Diff line number Diff line change 11
11
use Magento \Ui \Component \Layout \Tabs \TabWrapper ;
12
12
13
13
/**
14
- * Class ReviewTab
15
- *
16
- * @package Magento\Review\Block\Adminhtml
14
+ * Review tab block.
17
15
*/
18
16
class ReviewTab extends TabWrapper
19
17
{
@@ -30,8 +28,6 @@ class ReviewTab extends TabWrapper
30
28
protected $ isAjaxLoaded = true ;
31
29
32
30
/**
33
- * Constructor
34
- *
35
31
* @param Context $context
36
32
* @param Registry $registry
37
33
* @param array $data
@@ -67,6 +63,6 @@ public function getTabLabel()
67
63
*/
68
64
public function getTabUrl ()
69
65
{
70
- return $ this ->getUrl ('customer/* /productReviews ' , ['_current ' => true ]);
66
+ return $ this ->getUrl ('review/customer /productReviews ' , ['_current ' => true ]);
71
67
}
72
68
}
Original file line number Diff line number Diff line change 3
3
* Copyright © Magento, Inc. All rights reserved.
4
4
* See COPYING.txt for license details.
5
5
*/
6
- namespace Magento \ Customer \ Controller \ Adminhtml \ Index ;
6
+ declare (strict_types= 1 ) ;
7
7
8
- class ProductReviews extends \Magento \Customer \Controller \Adminhtml \Index
8
+ namespace Magento \Review \Controller \Adminhtml \Customer ;
9
+
10
+ use Magento \Framework \App \Action \HttpPostActionInterface ;
11
+
12
+ /**
13
+ * Customer product reviews page.
14
+ */
15
+ class ProductReviews extends \Magento \Customer \Controller \Adminhtml \Index implements HttpPostActionInterface
9
16
{
10
17
/**
11
- * Get customer's product reviews list
18
+ * Get customer's product reviews list.
12
19
*
13
20
* @return \Magento\Framework\View\Result\Layout
14
21
*/
15
22
public function execute ()
16
23
{
17
- $ customerId = $ this ->initCurrentCustomer ();
24
+ $ customerId = ( int ) $ this ->initCurrentCustomer ();
18
25
$ resultLayout = $ this ->resultLayoutFactory ->create ();
19
26
$ block = $ resultLayout ->getLayout ()->getBlock ('admin.customer.reviews ' );
20
27
$ block ->setCustomerId ($ customerId )->setUseAjax (true );
28
+
21
29
return $ resultLayout ;
22
30
}
23
31
}
Original file line number Diff line number Diff line change 7
7
-->
8
8
<layout xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" urn:magento:framework:View/Layout/etc/layout_generic.xsd" >
9
9
<container name =" root" label =" Root" >
10
- <block class =" Magento\Customer \Block\Adminhtml\Edit\Tab\Reviews" name =" admin.customer.reviews" />
10
+ <block class =" Magento\Review \Block\Adminhtml\Edit\Tab\Reviews" name =" admin.customer.reviews" />
11
11
</container >
12
12
</layout >
Original file line number Diff line number Diff line change @@ -437,17 +437,6 @@ public function testCartAction()
437
437
$ this ->assertContains ('<div id="customer_cart_grid1" ' , $ body );
438
438
}
439
439
440
- /**
441
- * @magentoDataFixture Magento/Customer/_files/customer_sample.php
442
- */
443
- public function testProductReviewsAction ()
444
- {
445
- $ this ->getRequest ()->setParam ('id ' , 1 );
446
- $ this ->dispatch ('backend/customer/index/productReviews ' );
447
- $ body = $ this ->getResponse ()->getBody ();
448
- $ this ->assertContains ('<div id="reviwGrid" ' , $ body );
449
- }
450
-
451
440
/**
452
441
* @magentoDataFixture Magento/Customer/_files/customer.php
453
442
* @magentoDataFixture Magento/Customer/_files/customer_address.php
You can’t perform that action at this time.
0 commit comments