/**
  * @param int $productId
  * @param int $type
  * @param string $comment
  * @param string $commentCustomer
  * @param QuoteProductRequest[] $requests
  * @param QuoteProductOffer[] $offers
  * @return QuoteProduct
  */
 protected function getQuoteProduct($productId = null, $type = null, $comment = null, $commentCustomer = null, array $requests = [], array $offers = [])
 {
     $product = null;
     if ($productId) {
         $product = $this->getEntity('OroB2B\\Bundle\\ProductBundle\\Entity\\Product', $productId);
         foreach ($this->getProductUnitPrecisions() as $precision) {
             $product->addUnitPrecision($precision);
         }
     }
     $quoteProduct = new QuoteProduct();
     $quoteProduct->setQuote($this->getEntity('OroB2B\\Bundle\\SaleBundle\\Entity\\Quote', $productId))->setProduct($product)->setType($type)->setComment($comment)->setCommentCustomer($commentCustomer);
     foreach ($requests as $request) {
         $quoteProduct->addQuoteProductRequest($request);
     }
     foreach ($offers as $offer) {
         $quoteProduct->addQuoteProductOffer($offer);
     }
     return $quoteProduct;
 }