コード例 #1
0
ファイル: Writer.php プロジェクト: spryker/Price
 /**
  * @param \Generated\Shared\Transfer\PriceProductTransfer $transferPriceProduct
  *
  * @return bool
  */
 protected function isPriceTypeExistingForProductConcrete(PriceProductTransfer $transferPriceProduct)
 {
     $priceType = $this->reader->getPriceTypeByName($transferPriceProduct->getPriceTypeName());
     $priceEntities = $this->queryContainer->queryPriceEntityForProductConcrete($transferPriceProduct->getSkuProduct(), $priceType);
     return $priceEntities->count() > 0;
 }
コード例 #2
0
ファイル: Reader.php プロジェクト: spryker/Price
 /**
  * @param string $sku
  * @param \Orm\Zed\Price\Persistence\SpyPriceType $priceType
  *
  * @return \Orm\Zed\Price\Persistence\SpyPriceProduct
  */
 protected function getPriceEntityForProductConcrete($sku, $priceType)
 {
     return $this->queryContainer->queryPriceEntityForProductConcrete($sku, $priceType)->findOne();
 }