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

DocumentFactory.php 795B

3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace Lc\CaracoleBundle\Factory\File;
  3. use App\Entity\File\Document;
  4. use Lc\CaracoleBundle\Context\MerchantContextTrait;
  5. use Lc\CaracoleBundle\Model\Address\AddressInterface;
  6. use Lc\CaracoleBundle\Model\File\DocumentInterface;
  7. use Lc\CaracoleBundle\Model\Merchant\MerchantInterface;
  8. use Lc\CaracoleBundle\Model\Section\SectionInterface;
  9. use Lc\SovBundle\Factory\AbstractFactory;
  10. use Lc\SovBundle\Model\User\UserInterface;
  11. class DocumentFactory extends AbstractFactory
  12. {
  13. public function create(MerchantInterface $merchant, string $type): DocumentInterface
  14. {
  15. $document = new Document();
  16. $document->setMerchant($merchant);
  17. $document->setType($type);
  18. $document->setTitle('');
  19. $document->setStatus(1);
  20. return $document;
  21. }
  22. }