您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

UserMerchantFactory.php 696B

3 年前
3 年前
3 年前
1234567891011121314151617181920212223242526
  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. use MerchantFactoryTrait;
  12. // createUserMerchant
  13. public function create(UserInterface $user): UserMerchantInterface
  14. {
  15. $userMerchant = new UserMerchant();
  16. $userMerchant->setMerchant($this->merchant);
  17. $userMerchant->setUser($user);
  18. return $userMerchant;
  19. }
  20. }