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.

25 rindas
695B

  1. <?php
  2. namespace Lc\CaracoleBundle\Factory\User;
  3. use App\Entity\User\UserMerchant;
  4. use Lc\CaracoleBundle\Factory\MerchantFactoryTrait;
  5. use Lc\CaracoleBundle\Model\Merchant\MerchantInterface;
  6. use Lc\CaracoleBundle\Model\User\UserMerchantInterface;
  7. use Lc\SovBundle\Factory\AbstractFactory;
  8. use Lc\SovBundle\Model\User\UserInterface;
  9. class UserMerchantFactory extends AbstractFactory
  10. {
  11. // createUserMerchant
  12. public function create(MerchantInterface $merchant, UserInterface $user = null): UserMerchantInterface
  13. {
  14. $userMerchant = new UserMerchant();
  15. $userMerchant->setMerchant($merchant);
  16. $userMerchant->setUser($user);
  17. return $userMerchant;
  18. }
  19. }