Exemple #1
0
 /**
  * @param \Generated\Shared\Transfer\ItemTransfer $wishlistItemTransfer
  *
  * @return \Generated\Shared\Transfer\WishlistChangeTransfer
  */
 protected function createChangeTransfer(ItemTransfer $wishlistItemTransfer)
 {
     $wishlistTransfer = $this->getSession()->getWishlist();
     $wishlistChange = new WishlistChangeTransfer();
     $wishlistChange->setWishlist($wishlistTransfer);
     $wishlistChange->addItem($wishlistItemTransfer);
     $customerTransfer = $this->getCustomerTransfer();
     if ($customerTransfer !== null) {
         $wishlistChange->setCustomer($customerTransfer);
     }
     return $wishlistChange;
 }