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.

DocumentFactory.php 667B

3 yıl önce
3 yıl önce
3 yıl önce
3 yıl önce
3 yıl önce
3 yıl önce
3 yıl önce
1234567891011121314151617181920212223242526
  1. <?php
  2. namespace Lc\CaracoleBundle\Factory\File;
  3. use Lc\CaracoleBundle\Container\File\DocumentContainer;
  4. use Lc\CaracoleBundle\Model\File\DocumentInterface;
  5. use Lc\CaracoleBundle\Model\Merchant\MerchantInterface;
  6. use Lc\SovBundle\Factory\AbstractFactory;
  7. class DocumentFactory extends AbstractFactory
  8. {
  9. public function create(MerchantInterface $merchant, string $type): DocumentInterface
  10. {
  11. $class = DocumentContainer::getEntityFqcn();
  12. $document = new $class;
  13. $document->setMerchant($merchant);
  14. $document->setType($type);
  15. $document->setTitle('');
  16. $document->setStatus(1);
  17. return $document;
  18. }
  19. }