Skip to content

Commit 568f830

Browse files
committed
Merge branch '2.3-develop' into MC-18963
2 parents 2693e31 + 4b9913f commit 568f830

File tree

15 files changed

+108
-38
lines changed

15 files changed

+108
-38
lines changed

app/code/Magento/Newsletter/view/frontend/templates/subscribe.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
</div>
3131
</div>
3232
<div class="actions">
33-
<button class="action subscribe primary sr-only"
33+
<button class="action subscribe primary"
3434
title="<?= $block->escapeHtmlAttr(__('Subscribe')) ?>"
3535
type="submit"
3636
aria-label="Subscribe">

app/code/Magento/Reports/Controller/Adminhtml/Report/Shopcart.php

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,23 @@
99
*
1010
* @author Magento Core Team <core@magentocommerce.com>
1111
*/
12+
declare(strict_types=1);
13+
1214
namespace Magento\Reports\Controller\Adminhtml\Report;
1315

1416
/**
17+
* Class \Magento\Reports\Controller\Adminhtml\Report\Shopcart
18+
*
19+
* phpcs:disable Magento2.Classes.AbstractApi
1520
* @api
1621
* @since 100.0.2
1722
*/
1823
abstract class Shopcart extends \Magento\Backend\App\Action
1924
{
25+
/**
26+
* Authorization of a shop cart report
27+
*/
28+
const ADMIN_RESOURCE = 'Magento_Reports::shopcart';
2029
/**
2130
* @var \Magento\Framework\App\Response\Http\FileFactory
2231
*/
@@ -46,27 +55,4 @@ public function _initAction()
4655
$this->_addBreadcrumb(__('Shopping Cart'), __('Shopping Cart'));
4756
return $this;
4857
}
49-
50-
/**
51-
* Determine if action is allowed for reports module
52-
*
53-
* @return bool
54-
*/
55-
protected function _isAllowed()
56-
{
57-
switch ($this->getRequest()->getActionName()) {
58-
case 'customer':
59-
return $this->_authorization->isAllowed(null);
60-
break;
61-
case 'product':
62-
return $this->_authorization->isAllowed('Magento_Reports::product');
63-
break;
64-
case 'abandoned':
65-
return $this->_authorization->isAllowed('Magento_Reports::abandoned');
66-
break;
67-
default:
68-
return $this->_authorization->isAllowed('Magento_Reports::shopcart');
69-
break;
70-
}
71-
}
7258
}

app/code/Magento/Reports/Controller/Adminhtml/Report/Shopcart/Abandoned.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,22 @@
44
* Copyright © Magento, Inc. All rights reserved.
55
* See COPYING.txt for license details.
66
*/
7+
declare(strict_types=1);
8+
79
namespace Magento\Reports\Controller\Adminhtml\Report\Shopcart;
810

911
use Magento\Framework\App\Action\HttpGetActionInterface as HttpGetActionInterface;
1012

13+
/**
14+
* Class \Magento\Reports\Controller\Adminhtml\Report\Shopcart\Abandoned
15+
*/
1116
class Abandoned extends \Magento\Reports\Controller\Adminhtml\Report\Shopcart implements HttpGetActionInterface
1217
{
18+
/**
19+
* Authorization of an abandoned report
20+
*/
21+
const ADMIN_RESOURCE = 'Magento_Reports::abandoned';
22+
1323
/**
1424
* Abandoned carts action
1525
*

app/code/Magento/Reports/Controller/Adminhtml/Report/Shopcart/Customer.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,16 @@
44
* Copyright © Magento, Inc. All rights reserved.
55
* See COPYING.txt for license details.
66
*/
7+
declare(strict_types=1);
8+
79
namespace Magento\Reports\Controller\Adminhtml\Report\Shopcart;
810

9-
class Customer extends \Magento\Reports\Controller\Adminhtml\Report\Shopcart
11+
use Magento\Framework\App\Action\HttpGetActionInterface as HttpGetActionInterface;
12+
13+
/**
14+
* Class \Magento\Reports\Controller\Adminhtml\Report\Shopcart\Customer
15+
*/
16+
class Customer extends \Magento\Reports\Controller\Adminhtml\Report\Shopcart implements HttpGetActionInterface
1017
{
1118
/**
1219
* Customer shopping carts action

app/code/Magento/Reports/Controller/Adminhtml/Report/Shopcart/ExportAbandonedCsv.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,19 @@
44
* Copyright © Magento, Inc. All rights reserved.
55
* See COPYING.txt for license details.
66
*/
7+
declare(strict_types=1);
8+
79
namespace Magento\Reports\Controller\Adminhtml\Report\Shopcart;
810

911
use Magento\Framework\App\ResponseInterface;
1012
use Magento\Framework\App\Filesystem\DirectoryList;
13+
use Magento\Framework\App\Action\HttpGetActionInterface as HttpGetActionInterface;
14+
use Magento\Reports\Controller\Adminhtml\Report\Shopcart\Abandoned as ShopCartAbandoned;
1115

12-
class ExportAbandonedCsv extends \Magento\Reports\Controller\Adminhtml\Report\Shopcart
16+
/**
17+
* Class \Magento\Reports\Controller\Adminhtml\Report\Shopcart\ExportAbandonedCsv
18+
*/
19+
class ExportAbandonedCsv extends ShopCartAbandoned implements HttpGetActionInterface
1320
{
1421
/**
1522
* Export abandoned carts report grid to CSV format

app/code/Magento/Reports/Controller/Adminhtml/Report/Shopcart/ExportAbandonedExcel.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,19 @@
44
* Copyright © Magento, Inc. All rights reserved.
55
* See COPYING.txt for license details.
66
*/
7+
declare(strict_types=1);
8+
79
namespace Magento\Reports\Controller\Adminhtml\Report\Shopcart;
810

911
use Magento\Framework\App\ResponseInterface;
1012
use Magento\Framework\App\Filesystem\DirectoryList;
13+
use Magento\Framework\App\Action\HttpGetActionInterface as HttpGetActionInterface;
14+
use Magento\Reports\Controller\Adminhtml\Report\Shopcart\Abandoned as ShopCartAbandoned;
1115

12-
class ExportAbandonedExcel extends \Magento\Reports\Controller\Adminhtml\Report\Shopcart
16+
/**
17+
* Class \Magento\Reports\Controller\Adminhtml\Report\Shopcart\ExportAbandonedExcel
18+
*/
19+
class ExportAbandonedExcel extends ShopCartAbandoned implements HttpGetActionInterface
1320
{
1421
/**
1522
* Export abandoned carts report to Excel XML format

app/code/Magento/Reports/Controller/Adminhtml/Report/Shopcart/ExportCustomerCsv.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,18 @@
44
* Copyright © Magento, Inc. All rights reserved.
55
* See COPYING.txt for license details.
66
*/
7+
declare(strict_types=1);
8+
79
namespace Magento\Reports\Controller\Adminhtml\Report\Shopcart;
810

911
use Magento\Framework\App\ResponseInterface;
12+
use Magento\Framework\App\Action\HttpGetActionInterface as HttpGetActionInterface;
13+
use Magento\Reports\Controller\Adminhtml\Report\Shopcart\Customer as ShopCartCustomer;
1014

11-
class ExportCustomerCsv extends \Magento\Reports\Controller\Adminhtml\Report\Shopcart
15+
/**
16+
* Class \Magento\Reports\Controller\Adminhtml\Report\Shopcart\ExportCustomerCsv
17+
*/
18+
class ExportCustomerCsv extends ShopCartCustomer implements HttpGetActionInterface
1219
{
1320
/**
1421
* Export shopcart customer report to CSV format

app/code/Magento/Reports/Controller/Adminhtml/Report/Shopcart/ExportCustomerExcel.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,18 @@
44
* Copyright © Magento, Inc. All rights reserved.
55
* See COPYING.txt for license details.
66
*/
7+
declare(strict_types=1);
8+
79
namespace Magento\Reports\Controller\Adminhtml\Report\Shopcart;
810

911
use Magento\Framework\App\ResponseInterface;
12+
use Magento\Framework\App\Action\HttpGetActionInterface as HttpGetActionInterface;
13+
use Magento\Reports\Controller\Adminhtml\Report\Shopcart\Customer as ShopCartCustomer;
1014

11-
class ExportCustomerExcel extends \Magento\Reports\Controller\Adminhtml\Report\Shopcart
15+
/**
16+
* Class \Magento\Reports\Controller\Adminhtml\Report\Shopcart\ExportCustomerExcel
17+
*/
18+
class ExportCustomerExcel extends ShopCartCustomer implements HttpGetActionInterface
1219
{
1320
/**
1421
* Export shopcart customer report to Excel XML format

app/code/Magento/Reports/Controller/Adminhtml/Report/Shopcart/ExportProductCsv.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,19 @@
44
* Copyright © Magento, Inc. All rights reserved.
55
* See COPYING.txt for license details.
66
*/
7+
declare(strict_types=1);
8+
79
namespace Magento\Reports\Controller\Adminhtml\Report\Shopcart;
810

911
use Magento\Framework\App\ResponseInterface;
1012
use Magento\Framework\App\Filesystem\DirectoryList;
13+
use Magento\Framework\App\Action\HttpGetActionInterface as HttpGetActionInterface;
14+
use Magento\Reports\Controller\Adminhtml\Report\Shopcart\Product as ShopCartProduct;
1115

12-
class ExportProductCsv extends \Magento\Reports\Controller\Adminhtml\Report\Shopcart
16+
/**
17+
* Class \Magento\Reports\Controller\Adminhtml\Report\Shopcart\ExportProductCsv
18+
*/
19+
class ExportProductCsv extends ShopCartProduct implements HttpGetActionInterface
1320
{
1421
/**
1522
* Export products report grid to CSV format

app/code/Magento/Reports/Controller/Adminhtml/Report/Shopcart/ExportProductExcel.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,19 @@
44
* Copyright © Magento, Inc. All rights reserved.
55
* See COPYING.txt for license details.
66
*/
7+
declare(strict_types=1);
8+
79
namespace Magento\Reports\Controller\Adminhtml\Report\Shopcart;
810

911
use Magento\Framework\App\ResponseInterface;
1012
use Magento\Framework\App\Filesystem\DirectoryList;
13+
use Magento\Framework\App\Action\HttpGetActionInterface as HttpGetActionInterface;
14+
use Magento\Reports\Controller\Adminhtml\Report\Shopcart\Product as ShopCartProduct;
1115

12-
class ExportProductExcel extends \Magento\Reports\Controller\Adminhtml\Report\Shopcart
16+
/**
17+
* Class \Magento\Reports\Controller\Adminhtml\Report\Shopcart\ExportProductExcel
18+
*/
19+
class ExportProductExcel extends ShopCartProduct implements HttpGetActionInterface
1320
{
1421
/**
1522
* Export products report to Excel XML format

0 commit comments

Comments
 (0)