Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Variables
order_with_shipping_and_invoice.php File Reference

Go to the source code of this file.

Variables

 $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
 
 $order
 
 $invoiceService = $objectManager->create(\Magento\Sales\Api\InvoiceManagementInterface::class)
 
 $transaction = $objectManager->create(\Magento\Framework\DB\Transaction::class)
 
 $invoice = $invoiceService->prepareInvoice($order)
 
 $items = []
 
foreach($order->getItems() as $orderItem) $shipment = $objectManager->get(ShipmentFactory::class)->create($order, $items)
 

Variable Documentation

◆ $invoice

$invoice = $invoiceService->prepareInvoice($order)

Definition at line 37 of file order_with_shipping_and_invoice.php.

◆ $invoiceService

$invoiceService = $objectManager->create(\Magento\Sales\Api\InvoiceManagementInterface::class)

Definition at line 18 of file order_with_shipping_and_invoice.php.

◆ $items

$items = []

Definition at line 42 of file order_with_shipping_and_invoice.php.

◆ $objectManager

Definition at line 11 of file order_with_shipping_and_invoice.php.

◆ $order

$order
Initial value:
= $objectManager->create(\Magento\Sales\Model\Order::class)
->loadByIncrementId('100000001')

Definition at line 14 of file order_with_shipping_and_invoice.php.

◆ $shipment

foreach ( $order->getItems() as $orderItem) $shipment = $objectManager->get(ShipmentFactory::class)->create($order, $items)

Definition at line 46 of file order_with_shipping_and_invoice.php.

◆ $transaction

$transaction = $objectManager->create(\Magento\Framework\DB\Transaction::class)

Definition at line 21 of file order_with_shipping_and_invoice.php.