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.

32 rindas
860B

  1. <?php
  2. namespace Lc\CaracoleBundle\Factory\Credit;
  3. use App\Entity\Credit\CreditHistory;
  4. use Lc\CaracoleBundle\Model\Credit\CreditHistoryInterface;
  5. use Lc\CaracoleBundle\Model\User\UserMerchantInterface;
  6. use Lc\SovBundle\Factory\AbstractFactory;
  7. use Lc\SovBundle\Model\User\UserInterface;
  8. class CreditHistoryFactory extends AbstractFactory
  9. {
  10. // createCreditHistory
  11. public function create(string $type,UserMerchantInterface $userMerchant ): CreditHistoryInterface
  12. {
  13. $creditHistory = $this->createBase($userMerchant);
  14. $creditHistory->setType($type) ;
  15. return $creditHistory;
  16. }
  17. public function createBase(UserMerchantInterface $userMerchant): CreditHistoryInterface
  18. {
  19. $creditHistory = new CreditHistory();
  20. $creditHistory->setUserMerchant($userMerchant) ;
  21. return $creditHistory;
  22. }
  23. }