File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
app/code/Magento/Shipping/Controller/Adminhtml/Order Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change 27
27
* @method ShipmentLoader setTracking($tracking)
28
28
* @method int getOrderId()
29
29
* @method int getShipmentId()
30
- * @method array getShipment()
31
30
* @method array getTracking()
32
31
*/
33
32
class ShipmentLoader extends DataObject
34
33
{
34
+ const SHIPMENT = 'shipment ' ;
35
+
35
36
/**
36
37
* @var ManagerInterface
37
38
*/
@@ -135,7 +136,7 @@ public function load()
135
136
return false ;
136
137
}
137
138
138
- $ shipmentItems = $ this ->getShipmentItems ($ this ->getShipment () ?: [] );
139
+ $ shipmentItems = $ this ->getShipmentItems ($ this ->getShipment ());
139
140
140
141
$ shipment = $ this ->documentFactory ->create (
141
142
$ order ,
@@ -194,4 +195,14 @@ private function getShipmentItems(array $shipmentData)
194
195
}
195
196
return $ shipmentItems ;
196
197
}
198
+
199
+ /**
200
+ * Retrieve shipment
201
+ *
202
+ * @return array
203
+ */
204
+ public function getShipment ()
205
+ {
206
+ return $ this ->getData (self ::SHIPMENT ) ?: [];
207
+ }
197
208
}
You can’t perform that action at this time.
0 commit comments