Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

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. }