class SpecialOfferExtension extends Twig_Extension

Class SpecialOfferExtension

Constants

CACHED_SPECIAL_OFFER

Methods

__construct(Client $cache, EventDispatcherInterface $dispatcher, SpecialOfferManager $specialOfferManager)

FooterExtension constructor.

getFunctions()

{@inheritdoc}

bool
getSpecialOfferCache(int $userId, int $number = 3)

No description

mixed
mixed
isProductOnSpecialOffer(int $productId, int|null $productAttrId = null)

No description

float|int|mixed
calculateSpecialOfferDiscount($variable, $specialOffer)

No description

string
getName()

Returns the name of the extension.

Details

at line 41
__construct(Client $cache, EventDispatcherInterface $dispatcher, SpecialOfferManager $specialOfferManager)

FooterExtension constructor.

Parameters

Client $cache
EventDispatcherInterface $dispatcher
SpecialOfferManager $specialOfferManager

at line 51
getFunctions()

{@inheritdoc}

at line 67
bool getSpecialOfferCache(int $userId, int $number = 3)

Parameters

int $userId
int $number

Return Value

bool

at line 75
mixed getAllAvailableProductsOnSpecialOffer()

Return Value

mixed

at line 89
mixed isProductOnSpecialOffer(int $productId, int|null $productAttrId = null)

Parameters

int $productId
int|null $productAttrId

Return Value

mixed

at line 100
float|int|mixed calculateSpecialOfferDiscount($variable, $specialOffer)

Parameters

$variable
$specialOffer

Return Value

float|int|mixed

Exceptions

SpecialOfferException

at line 154
string getName()

Returns the name of the extension.

Return Value

string The extension name