You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

UserPointSaleFactory.php 735B

2 vuotta sitten
2 vuotta sitten
123456789101112131415161718192021222324
  1. <?php
  2. namespace Lc\CaracoleBundle\Factory\User;
  3. use App\Entity\User\UserPointSale;
  4. use Lc\CaracoleBundle\Container\User\UserPointSaleContainer;
  5. use Lc\CaracoleBundle\Model\PointSale\PointSaleInterface;
  6. use Lc\CaracoleBundle\Model\User\UserPointSaleInterface;
  7. use Lc\SovBundle\Factory\AbstractFactory;
  8. use Lc\SovBundle\Model\User\UserInterface;
  9. class UserPointSaleFactory extends AbstractFactory
  10. {
  11. public function create(UserInterface $user, PointSaleInterface $pointSale): UserPointSaleInterface
  12. {
  13. $class = UserPointSaleContainer::getEntityFqcn();
  14. $userPointSale = new $class;
  15. $userPointSale->setUser($user);
  16. $userPointSale->setPointSale($pointSale);
  17. return $userPointSale;
  18. }
  19. }