ProductRelationshipExtension
class ProductRelationshipExtension extends Twig_Extension
Class ProductRelationshipExtension is injected as twig.extension.empire_product_relationship_plugin service. ProductRelationshipExtension handles the logic and provides necessary data for managed entity in twig.
Properties
| protected ProductRelationshipManager | $manager | ||
| protected | $relationships | ||
| protected ArrayCollection | $relationshipNames |
Methods
{@inheritdoc}
Get relationship entity for specified product and relationship name
Get all relationship names
Get relationship names for specified product
Get data for products in relationship
Returns the name of the extension.
No description
No description
Details
at line 40
__construct(ProductRelationshipManager $manager)
EmpirePromoProductsExtension constructor.
at line 48
getFunctions()
{@inheritdoc}
at line 67
ProductRelationship|bool
getRelationship(int $productId, string $relationshipName)
Get relationship entity for specified product and relationship name
at line 76
array
getRelationshipNames()
Get all relationship names
at line 91
array
getRelationshipNamesForProduct(int $id)
Get relationship names for specified product
at line 107
array
getRelationshipPagination(int $relationshipId, int $productId)
Get data for products in relationship
at line 118
string
getName()
Returns the name of the extension.