class TransactionService implements TransactionServiceInterface

TransactionService class

Properties

private ConfigServiceInterface $configService Stores ConfigServiceInterface
private EntityManagerInterface $em Stores EntityManagerInterface
private Request $request Stores current Request

Methods

__construct(ConfigServiceInterface $configService, EntityManagerInterface $em, RequestStack $requestStack)

No description

add($orderId, $credits, $description, $user)

Adds Transaction + User's credits

addPayment(Payment $payment, $credits, $user)

Adds a Pyment in Transaction

create($orderId = null)

Creates Transaction

mixed
getAll($user)

Gets all the Transaction for the user

persist(Transaction $transaction, $user)

Persists Transaction + User's data

Details

at line 45
__construct(ConfigServiceInterface $configService, EntityManagerInterface $em, RequestStack $requestStack)

Parameters

ConfigServiceInterface $configService
EntityManagerInterface $em
RequestStack $requestStack

at line 59
Transaction add($orderId, $credits, $description, $user)

Adds Transaction + User's credits

Parameters

$orderId
$credits
$description
$user

Return Value

Transaction

at line 75
Transaction addPayment(Payment $payment, $credits, $user)

Adds a Pyment in Transaction

Parameters

Payment $payment
$credits
$user

Return Value

Transaction

at line 83
Transaction create($orderId = null)

Creates Transaction

Parameters

$orderId

Return Value

Transaction

at line 104
mixed getAll($user)

Gets all the Transaction for the user

Parameters

$user

Return Value

mixed

at line 114
persist(Transaction $transaction, $user)

Persists Transaction + User's data

Parameters

Transaction $transaction
$user