/** * * @param Product $product */ public function syncWithTaxEntity(Product $product) { // $tax = $this->zohoProvider->findTaxByTaxId($product->getTaxOriginId()); if ($tax) { $product->setTax($tax); } return $product; }
/** * * @param Product $product * @param Channel $channel * @return type */ public function getProduct(Product $product, Channel $channel) { $criteria = ['itemId' => $product->getItemId(), 'channel' => $channel]; $result = $this->registry->getRepository('IntegrationZohoInvoicingBundle:Product')->findOneBy($criteria); return $result; }