14
14
use Magento \Framework \App \Action \Action ;
15
15
use Magento \Framework \App \Action \Context as ActionContext ;
16
16
use Magento \Framework \App \Action \HttpGetActionInterface ;
17
- use Magento \Framework \App \RequestInterface ;
18
- use Magento \Framework \App \Response \RedirectInterface ;
19
17
use Magento \Framework \Controller \Result \Redirect as ResultRedirect ;
20
18
use Magento \Framework \Controller \ResultFactory ;
21
19
use Magento \Framework \Escaper ;
22
20
use Magento \Framework \Exception \LocalizedException ;
23
- use Magento \Framework \Message \ManagerInterface as MessageManagerInterface ;
24
21
use Magento \Wishlist \Model \Item ;
25
22
use Magento \Wishlist \Model \Item \OptionFactory ;
26
23
use Magento \Wishlist \Model \ItemFactory ;
@@ -58,59 +55,27 @@ class Cart extends Action implements HttpGetActionInterface
58
55
*/
59
56
private $ escaper ;
60
57
61
- /**
62
- * @var RequestInterface
63
- */
64
- private $ request ;
65
-
66
- /**
67
- * @var RedirectInterface
68
- */
69
- private $ redirect ;
70
-
71
- /**
72
- * @var MessageManagerInterface
73
- */
74
- private $ messageManager ;
75
-
76
- /**
77
- * @var ResultFactory
78
- */
79
- private $ resultFactory ;
80
-
81
58
/**
82
59
* @param ActionContext $context
83
60
* @param CustomerCart $cart
84
61
* @param OptionFactory $optionFactory
85
62
* @param ItemFactory $itemFactory
86
63
* @param CartHelper $cartHelper
87
64
* @param Escaper $escaper
88
- * @param RequestInterface $request
89
- * @param RedirectInterface $redirect
90
- * @param MessageManagerInterface $messageManager
91
- * @param ResultFactory $resultFactory
92
65
*/
93
66
public function __construct (
94
67
ActionContext $ context ,
95
68
CustomerCart $ cart ,
96
69
OptionFactory $ optionFactory ,
97
70
ItemFactory $ itemFactory ,
98
71
CartHelper $ cartHelper ,
99
- Escaper $ escaper ,
100
- RequestInterface $ request ,
101
- RedirectInterface $ redirect ,
102
- MessageManagerInterface $ messageManager ,
103
- ResultFactory $ resultFactory
72
+ Escaper $ escaper
104
73
) {
105
74
$ this ->cart = $ cart ;
106
75
$ this ->optionFactory = $ optionFactory ;
107
76
$ this ->itemFactory = $ itemFactory ;
108
77
$ this ->cartHelper = $ cartHelper ;
109
78
$ this ->escaper = $ escaper ;
110
- $ this ->request = $ request ;
111
- $ this ->redirect = $ redirect ;
112
- $ this ->messageManager = $ messageManager ;
113
- $ this ->resultFactory = $ resultFactory ;
114
79
parent ::__construct ($ context );
115
80
}
116
81
@@ -124,13 +89,13 @@ public function __construct(
124
89
*/
125
90
public function execute ()
126
91
{
127
- $ itemId = (int )$ this ->request ->getParam ('item ' );
92
+ $ itemId = (int )$ this ->getRequest () ->getParam ('item ' );
128
93
129
94
/* @var $item Item */
130
95
$ item = $ this ->itemFactory ->create ()
131
96
->load ($ itemId );
132
97
133
- $ redirectUrl = $ this ->redirect ->getRefererUrl ();
98
+ $ redirectUrl = $ this ->_redirect ->getRefererUrl ();
134
99
135
100
try {
136
101
/** @var OptionCollection $options */
0 commit comments