Du kan inte välja fler än 25 ämnen
Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
|
- <?php
-
- namespace Lc\CaracoleBundle\Factory\Credit;
-
- use App\Entity\Credit\CreditHistory;
- use Lc\CaracoleBundle\Model\Credit\CreditHistoryInterface;
- use Lc\CaracoleBundle\Model\User\UserMerchantInterface;
- use Lc\SovBundle\Factory\AbstractFactory;
- use Lc\SovBundle\Model\User\UserInterface;
-
- class CreditHistoryFactory extends AbstractFactory
- {
- // createCreditHistory
- public function create(string $type,UserMerchantInterface $userMerchant ): CreditHistoryInterface
- {
- $creditHistory = $this->createBase($userMerchant);
-
- $creditHistory->setType($type) ;
-
- return $creditHistory;
- }
-
- public function createBase(UserMerchantInterface $userMerchant): CreditHistoryInterface
- {
- $creditHistory = new CreditHistory();
- $creditHistory->setUserMerchant($userMerchant) ;
-
- return $creditHistory;
- }
-
- }
|