class AlligatorOrderExtension extends Twig_Extension

Class AlligatorOrderExtension is injected as twig.extension.alligator.order service. AlligatorOrderExtension handles the logic and provides necessary data for managed entity in twig.

Properties

protected OrderManager $orderManager
protected CheckoutManager $checkoutManager

Methods

__construct(OrderManager $orderManager, CheckoutManager $checkoutManager)

AlligatorOrderExtension constructor.

getFunctions()

{@inheritdoc}

mixed
loadOrder()

Find last unfinished order for logged user

getOrderById(int $id)

Find order by id

ArrayCollection
getOrderStatsForUser(int $id)

Retrieve summary for order

string
getName()

Returns the name of the extension.

array
getOrderItemPriceChangedArray(array $array)

No description

Details

at line 38
__construct(OrderManager $orderManager, CheckoutManager $checkoutManager)

AlligatorOrderExtension constructor.

Parameters

OrderManager $orderManager
CheckoutManager $checkoutManager

at line 47
getFunctions()

{@inheritdoc}

at line 62
mixed loadOrder()

Find last unfinished order for logged user

Return Value

mixed

at line 76
Order getOrderById(int $id)

Find order by id

Parameters

int $id

Return Value

Order

Exceptions

NoResultException
NonUniqueResultException

at line 87
ArrayCollection getOrderStatsForUser(int $id)

Retrieve summary for order

Parameters

int $id

Return Value

ArrayCollection

at line 97
string getName()

Returns the name of the extension.

Return Value

string The extension name

at line 107
array getOrderItemPriceChangedArray(array $array)

Parameters

array $array

Return Value

array