Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
QuoteItem.php
Go to the documentation of this file.
1 <?php
7 
9 use Magento\GiftMessage\Helper\Message as MessageHelper;
12 
13 class QuoteItem
14 {
18  protected $_helper;
19 
23  public function __construct(MessageHelper $helper)
24  {
25  $this->_helper = $helper;
26  }
27 
38  public function afterConvert(
39  ToOrderItem $subject,
42  $additional = []
43  ) {
44  $isAvailable = $this->_helper->isMessagesAllowed('item', $item, $item->getStoreId());
45 
46  $orderItem->setGiftMessageId($item->getGiftMessageId());
47  $orderItem->setGiftMessageAvailable($isAvailable);
48  return $orderItem;
49  }
50 }
$helper
Definition: iframe.phtml:13
$orderItem
Definition: order.php:30
afterConvert(ToOrderItem $subject, OrderItemInterface $orderItem, AbstractItem $item, $additional=[])
Definition: QuoteItem.php:38