選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

ProductPointSaleBuilder.php 826B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace domain\Product\ProductPointSale;
  3. use domain\PointSale\PointSale\PointSale;
  4. use domain\Product\Product\Product;
  5. use domain\_\AbstractBuilder;
  6. class ProductPointSaleBuilder extends AbstractBuilder
  7. {
  8. public function instanciateProductPointSale(): ProductPointSale
  9. {
  10. $productPointSale = new ProductPointSale();
  11. return $productPointSale;
  12. }
  13. public function createProductPointSale(Product $product, PointSale $pointSale, bool $available): ProductPointSale
  14. {
  15. $productPointSale = $this->instanciateProductPointSale();
  16. $productPointSale->populateProduct($product);
  17. $productPointSale->populatePointSale($pointSale);
  18. $productPointSale->available = $available;
  19. $this->saveCreate($productPointSale);
  20. return $productPointSale;
  21. }
  22. }