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

Go to the source code of this file.

Variables

 $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
 
 $orderRepository = $objectManager->create(\Magento\Sales\Api\OrderRepositoryInterface::class)
 
 $dateTime
 
 $order = $objectManager->create(Magento\Sales\Model\Order::class)->loadByIncrementId('100000001')
 
 $newOrderCreatedAtTimestamp = $dateTime->timestamp($order->getCreatedAt()) - 864000
 
 $newOrderCreatedDate = $dateTime->date(null, $newOrderCreatedAtTimestamp)
 

Variable Documentation

◆ $dateTime

$dateTime
Initial value:
= $objectManager->create(\Magento\Framework\Stdlib\DateTime\DateTimeFactory::class)
->create()
$objectManager

Definition at line 11 of file order_from_past.php.

◆ $newOrderCreatedAtTimestamp

$newOrderCreatedAtTimestamp = $dateTime->timestamp($order->getCreatedAt()) - 864000

Definition at line 15 of file order_from_past.php.

◆ $newOrderCreatedDate

$newOrderCreatedDate = $dateTime->date(null, $newOrderCreatedAtTimestamp)

Definition at line 16 of file order_from_past.php.

◆ $objectManager

Copyright © Magento, Inc. All rights reserved. See COPYING.txt for license details.

Definition at line 6 of file order_from_past.php.

◆ $order

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

Definition at line 14 of file order_from_past.php.

◆ $orderRepository

$orderRepository = $objectManager->create(\Magento\Sales\Api\OrderRepositoryInterface::class)

Definition at line 9 of file order_from_past.php.