class GiftCardEventContainer

Class GiftCardEventContainer is injected as empire_gift_card_plugin.event_container. This container is connecting GiftCardManager to other services

Constants

MAIL_TEMPLATE

Path to mail template

Properties

protected ContainerInterface $container

Methods

__construct(ContainerInterface $container)

No description

User|null
getCurrentUser()

Get current user

getGiftCardSettings()

Get current GiftCardSettings

object|Payum
getPayum()

Get Peyum service

array
getAllCurrencies()

Get currency list

float|int
getCurrencyRatioForPair(string $isoFrom, string $isoTo)

Get currency ratio for currencies

string
getCurrentCurrency()

Get current currency

sendCodeByMail(string $from, string $to, string $subject, string $content, GiftCard $card)

Send gift card code by mail

Order|null
getLastUnfinishedOrderForUser()

Get last unfinished order for user

getDBOrder(Order $order)

Get order from database

editOrder(Order $order)

Edit specified order

Details

at line 41
__construct(ContainerInterface $container)

Parameters

ContainerInterface $container

at line 52
User|null getCurrentUser()

Get current user

Return Value

User|null

See also

UserManager

at line 63
GiftCardSettings getGiftCardSettings()

Get current GiftCardSettings

at line 72
object|Payum getPayum()

Get Peyum service

Return Value

object|Payum

at line 83
array getAllCurrencies()

Get currency list

Return Value

array

See also

CurrencyManager

at line 97
float|int getCurrencyRatioForPair(string $isoFrom, string $isoTo)

Get currency ratio for currencies

Parameters

string $isoFrom
string $isoTo

Return Value

float|int

See also

CurrencyManager

at line 106
string getCurrentCurrency()

Get current currency

Return Value

string

at line 120
sendCodeByMail(string $from, string $to, string $subject, string $content, GiftCard $card)

Send gift card code by mail

Parameters

string $from
string $to
string $subject
string $content
GiftCard $card

at line 140
Order|null getLastUnfinishedOrderForUser()

Get last unfinished order for user

Return Value

Order|null

Exceptions

NonUniqueResultException

See also

CheckoutManager

at line 153
Order getDBOrder(Order $order)

Get order from database

Parameters

Order $order

Return Value

Order

See also

CheckoutManager

at line 167
Order editOrder(Order $order)

Edit specified order

Parameters

Order $order

Return Value

Order

See also

OrderManager