This repository was archived by the owner on Apr 29, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed
app/code/Magento/Shipping
Controller/Adminhtml/Order/Shipment Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 7
7
namespace Magento \Shipping \Controller \Adminhtml \Order \Shipment ;
8
8
9
9
use Magento \Backend \App \Action ;
10
+ use Magento \Framework \App \ObjectManager ;
10
11
11
12
class NewAction extends \Magento \Backend \App \Action
12
13
{
@@ -35,10 +36,11 @@ class NewAction extends \Magento\Backend\App\Action
35
36
public function __construct (
36
37
Action \Context $ context ,
37
38
\Magento \Shipping \Controller \Adminhtml \Order \ShipmentLoader $ shipmentLoader ,
38
- \Magento \Shipping \Model \ShipmentProviderInterface $ shipmentProvider
39
+ \Magento \Shipping \Model \ShipmentProviderInterface $ shipmentProvider = null
39
40
) {
40
41
$ this ->shipmentLoader = $ shipmentLoader ;
41
- $ this ->shipmentProvider = $ shipmentProvider ;
42
+ $ this ->shipmentProvider = $ shipmentProvider ?: ObjectManager::getInstance ()
43
+ ->get (\Magento \Shipping \Model \ShipmentProviderInterface::class);
42
44
parent ::__construct ($ context );
43
45
}
44
46
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ public function __construct(RequestInterface $request)
30
30
/**
31
31
* @inheritdoc
32
32
*/
33
- public function getShipment (): array
33
+ public function getShipmentData (): array
34
34
{
35
35
return $ this ->request ->getParam ('shipment ' , []);
36
36
}
Original file line number Diff line number Diff line change 8
8
namespace Magento \Shipping \Model ;
9
9
10
10
/**
11
- * Provide shipment items data from request .
11
+ * Provide shipment items data.
12
12
*
13
13
* @api
14
14
*/
15
15
interface ShipmentProviderInterface
16
16
{
17
17
/**
18
- * Retrieve shipment items from request .
18
+ * Retrieve shipment items.
19
19
*
20
20
* @return array
21
21
*/
22
- public function getShipment (): array ;
22
+ public function getShipmentData (): array ;
23
23
}
You can’t perform that action at this time.
0 commit comments