コード例 #1
0
ファイル: OrderHydrator.php プロジェクト: spryker/Sales
 /**
  * @param \Orm\Zed\Sales\Persistence\SpySalesOrderItem $orderItemEntity
  * @param \Generated\Shared\Transfer\ItemTransfer $itemTransfer
  *
  * @return void
  */
 protected function hydrateStateHistory(SpySalesOrderItem $orderItemEntity, ItemTransfer $itemTransfer)
 {
     foreach ($orderItemEntity->getStateHistories() as $stateHistoryEntity) {
         $itemStateTransfer = new ItemStateTransfer();
         $itemStateTransfer->fromArray($stateHistoryEntity->toArray(), true);
         $itemStateTransfer->setName($stateHistoryEntity->getState()->getName());
         $itemStateTransfer->setIdSalesOrder($orderItemEntity->getFkSalesOrder());
         $itemTransfer->addStateHistory($itemStateTransfer);
     }
 }