class AlligatorProductExtension extends Twig_Extension

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

Properties

protected ProductManager $productManager

Methods

__construct(ProductManager $productManager)

AlligatorProductExtension constructor.

getFunctions()

{@inheritdoc}

array
getFeatureProducts()

Find featured products

array
getProductPageBuyXGetYOfferForProduct(int $id)

Find buy x get y offer for product by id

getBundledProductsForGroupProduct(int $groupId)

Find bundled products for grouped product id

array
getAllPossibleTicketTypes()

Get all possible ticket types

array
getAllPossibleReclamationStatuses()

Get all possible reclamation statuses

array
getAllPossibleUnitOfMeasureTypes()

Get all possible unit of measure types

string
getName()

Returns the name of the extension.

array
getDefaultSortField()

Find default sort fields

array|bool
getPavImage(array $attrValues, array $attrValuesPavs, array $pavs)

Get product attribute values base image urls

Details

at line 41
__construct(ProductManager $productManager)

AlligatorProductExtension constructor.

Parameters

ProductManager $productManager

at line 49
getFunctions()

{@inheritdoc}

at line 67
array getFeatureProducts()

Find featured products

Return Value

array

at line 82
array getProductPageBuyXGetYOfferForProduct(int $id)

Find buy x get y offer for product by id

Parameters

int $id

Return Value

array

at line 100
GroupProduct getBundledProductsForGroupProduct(int $groupId)

Find bundled products for grouped product id

Parameters

int $groupId

Return Value

GroupProduct

Exceptions

NoResultException
NonUniqueResultException

at line 111
array getAllPossibleTicketTypes()

Get all possible ticket types

Return Value

array

See also

TicketType

at line 122
array getAllPossibleReclamationStatuses()

Get all possible reclamation statuses

Return Value

array

See also

ReclamationStatus

at line 133
array getAllPossibleUnitOfMeasureTypes()

Get all possible unit of measure types

Return Value

array

See also

UnitOfMeasureType

at line 143
string getName()

Returns the name of the extension.

Return Value

string The extension name

at line 152
array getDefaultSortField()

Find default sort fields

Return Value

array

at line 167
array|bool getPavImage(array $attrValues, array $attrValuesPavs, array $pavs)

Get product attribute values base image urls

Parameters

array $attrValues
array $attrValuesPavs
array $pavs

Return Value

array|bool

See also

ProductAttributeValues