BuyXGetYExtension
class BuyXGetYExtension extends Twig_Extension
Class BuyXGetYExtension is injected as empire_buy_x_get_y_plugin.twig_extension service. BuyXGetYExtension handles the logic and provides necessary data for managed entity in twig.
Properties
| protected BuyXManager | $manager |
Methods
getFunctions()
{@inheritdoc}
array
getAllBuyXGetYOffers()
Find all buy x get y offers
array
getBuyXGetYOfferForProduct(int $id)
Find buy x get y offer for specific product
mixed
getEntitiesForBlockElementsExtension(array $ids)
Find all buy x offers for provided array of ids
string
getName()
Returns the name of the extension.
Details
at line 34
__construct(BuyXManager $manager)
BuyXGetYExtension constructor.
at line 42
getFunctions()
{@inheritdoc}
at line 59
array
getAllBuyXGetYOffers()
Find all buy x get y offers
at line 79
array
getBuyXGetYOfferForProduct(int $id)
Find buy x get y offer for specific product
at line 98
mixed
getEntitiesForBlockElementsExtension(array $ids)
Find all buy x offers for provided array of ids
at line 108
string
getName()
Returns the name of the extension.