class GiftVoucherPurchasedService implements GiftVoucherPurchasedServiceInterface

Main services related to GiftVoucherPurchased

Properties

private EntityManagerInterface $em Stores EntityManagerInterface
private GiftVoucherEmailInterface $giftVoucherEmail Stores GiftVoucherEmailInterface
private GiftVoucherFormFactoryInterface $giftVoucherFormFactory Stores GiftVoucherFormFactoryInterface
private ServiceToolsInterface $serviceTools Stores ServiceToolsInterface
private Request $request Stores current Request
private Environment $environment Stores Environment

Methods

__construct(EntityManagerInterface $em, GiftVoucherEmailInterface $giftVoucherEmail, GiftVoucherFormFactoryInterface $giftVoucherFormFactory, ServiceToolsInterface $serviceTools, RequestStack $requestStack, Environment $environment)

No description

create(GiftVoucherAvailable $giftVoucherAvailable)

Defines the GitVoucherPurchased from GiftVoucherAvailable

Form
createForm(string $name, GiftVoucherPurchased $giftVoucherPurchased)

Shortcut to call GiftVoucherFormFactory to create Form

string
defineIdentifier()

Defines the identifier of the GiftVoucherPurchased, including the secret code (only capital letters except "o" to avoid confusion with 0)

array
getAll()

Gets all the GiftVoucherPurchased

string
getHtml(GiftVoucherPurchased $giftVoucherPurchased)

Gets xhtml code for GiftVoucherPurchased

getIdentifierFormatted(string $identifier)

Returns the formatted identifier to be displayed, without secret code

register(GiftVoucherPurchased $giftVoucherPurchased, bool $test)

Registers the GiftVoucherPurchased

utilisation(GiftVoucherPurchased $giftVoucherPurchased, DateTime $now)

Marks the GiftVoucherPurchased as used

string|false
validate(Payment $payment)

Validates the GiftVoucherPurchased after its payment

Details

at line 67
__construct(EntityManagerInterface $em, GiftVoucherEmailInterface $giftVoucherEmail, GiftVoucherFormFactoryInterface $giftVoucherFormFactory, ServiceToolsInterface $serviceTools, RequestStack $requestStack, Environment $environment)

Parameters

EntityManagerInterface $em
GiftVoucherEmailInterface $giftVoucherEmail
GiftVoucherFormFactoryInterface $giftVoucherFormFactory
ServiceToolsInterface $serviceTools
RequestStack $requestStack
Environment $environment

at line 87
GiftVoucherPurchased create(GiftVoucherAvailable $giftVoucherAvailable)

Defines the GitVoucherPurchased from GiftVoucherAvailable

Parameters

GiftVoucherAvailable $giftVoucherAvailable

Return Value

GiftVoucherPurchased

at line 106
Form createForm(string $name, GiftVoucherPurchased $giftVoucherPurchased)

Shortcut to call GiftVoucherFormFactory to create Form

Parameters

string $name
GiftVoucherPurchased $giftVoucherPurchased

Return Value

Form

at line 114
string defineIdentifier()

Defines the identifier of the GiftVoucherPurchased, including the secret code (only capital letters except "o" to avoid confusion with 0)

Return Value

string

at line 126
array getAll()

Gets all the GiftVoucherPurchased

Return Value

array

at line 137
string getHtml(GiftVoucherPurchased $giftVoucherPurchased)

Gets xhtml code for GiftVoucherPurchased

Parameters

GiftVoucherPurchased $giftVoucherPurchased

Return Value

string

at line 148
getIdentifierFormatted(string $identifier)

Returns the formatted identifier to be displayed, without secret code

Parameters

string $identifier

at line 156
register(GiftVoucherPurchased $giftVoucherPurchased, bool $test)

Registers the GiftVoucherPurchased

Parameters

GiftVoucherPurchased $giftVoucherPurchased
bool $test

at line 171
utilisation(GiftVoucherPurchased $giftVoucherPurchased, DateTime $now)

Marks the GiftVoucherPurchased as used

Parameters

GiftVoucherPurchased $giftVoucherPurchased
DateTime $now

at line 186
string|false validate(Payment $payment)

Validates the GiftVoucherPurchased after its payment

Parameters

Payment $payment

Return Value

string|false