|
- <?php
-
- namespace Lc\CaracoleBundle\Factory\User;
-
- use App\Entity\User\UserPointSale;
- use Lc\CaracoleBundle\Container\User\UserPointSaleContainer;
- use Lc\CaracoleBundle\Model\PointSale\PointSaleInterface;
- use Lc\CaracoleBundle\Model\User\UserPointSaleInterface;
- use Lc\SovBundle\Factory\AbstractFactory;
- use Lc\SovBundle\Model\User\UserInterface;
-
- class UserPointSaleFactory extends AbstractFactory
- {
- public function create(UserInterface $user, PointSaleInterface $pointSale): UserPointSaleInterface
- {
- $class = UserPointSaleContainer::getEntityFqcn();
- $userPointSale = new $class;
-
- $userPointSale->setUser($user);
- $userPointSale->setPointSale($pointSale);
-
- return $userPointSale;
- }
- }
|