class ProductRelationshipEventContainer

Class ProductRelationshipEventContainer is injected as empire_product_relationship_plugin.event_container. This container is connecting ProductRelationshipManager manager to other services

Methods

__construct(ContainerInterface $container)

ProductRelationshipEventContainer constructor.

array
doProductSearch(ProductSearchWrapper $searchWrapper)

Search for products

getProductRelationship(int $productId)

Find product reference by id

array|QueryBuilder
getCategoriesGroup(array|ArrayCollection $categories)

Get database categories from array

array
getProductsCollection(array $products)

Find collection of products

array
getRelationProductsCollection(array|ArrayCollection $products)

Find collection of products

array
getRelationshipNames()

Get all relationship names

array
getRelationshipNamesForProduct(int $id, bool $settings)

Get relationship names for specified product

getRelationshipNameReference(int $id)

Get reference to ProductRelationshipName

array|QueryBuilder
getProductsForCategory(int $id)

Find products by category id

getReferenceForProduct(int $productId)

Create product reference

getReferenceForCategory(int $categoryId)

Create category reference

getReferenceForProductRelationshipName(int $relId)

Create product relationship name reference

bool
getRelationshipSettingsForMainProduct()

Get product relationship settings

bool|Proxy|null|object
getReferenceForProductEntityRelationship(int $id)

Create single entity relationship reference

dispatchReorderProductPriorities(int $priority)

Signal re-order product priorities

bool
dispatchShowUnavailableEvent()

Signal product.relationship.show.unavailable event

array
findProductsMissingFromDbCSVImport(array $productArray)

Find id of products in database for provided array of ids

Details

at line 33
__construct(ContainerInterface $container)

ProductRelationshipEventContainer constructor.

Parameters

ContainerInterface $container

at line 44
array doProductSearch(ProductSearchWrapper $searchWrapper)

Search for products

Parameters

ProductSearchWrapper $searchWrapper

Return Value

array

at line 55
Product getProductRelationship(int $productId)

Find product reference by id

Parameters

int $productId

Return Value

Product

at line 66
array|QueryBuilder getCategoriesGroup(array|ArrayCollection $categories)

Get database categories from array

Parameters

array|ArrayCollection $categories

Return Value

array|QueryBuilder

at line 77
array getProductsCollection(array $products)

Find collection of products

Parameters

array $products

Return Value

array

at line 87
array getRelationProductsCollection(array|ArrayCollection $products)

Find collection of products

Parameters

array|ArrayCollection $products

Return Value

array

at line 101
array getRelationshipNames()

Get all relationship names

Return Value

array

at line 113
array getRelationshipNamesForProduct(int $id, bool $settings)

Get relationship names for specified product

Parameters

int $id
bool $settings

Return Value

array

at line 126
ProductRelationshipName getRelationshipNameReference(int $id)

Get reference to ProductRelationshipName

Parameters

int $id

Return Value

ProductRelationshipName

Exceptions

ORMException

at line 137
array|QueryBuilder getProductsForCategory(int $id)

Find products by category id

Parameters

int $id

Return Value

array|QueryBuilder

at line 149
Product getReferenceForProduct(int $productId)

Create product reference

Parameters

int $productId

Return Value

Product

at line 160
Category getReferenceForCategory(int $categoryId)

Create category reference

Parameters

int $categoryId

Return Value

Category

at line 173
ProductRelationshipName getReferenceForProductRelationshipName(int $relId)

Create product relationship name reference

Parameters

int $relId

Return Value

ProductRelationshipName

Exceptions

ORMException

at line 182
bool getRelationshipSettingsForMainProduct()

Get product relationship settings

Return Value

bool

at line 193
bool|Proxy|null|object getReferenceForProductEntityRelationship(int $id)

Create single entity relationship reference

Parameters

int $id

Return Value

bool|Proxy|null|object

at line 202
dispatchReorderProductPriorities(int $priority)

Signal re-order product priorities

Parameters

int $priority

at line 213
bool dispatchShowUnavailableEvent()

Signal product.relationship.show.unavailable event

Return Value

bool

at line 227
array findProductsMissingFromDbCSVImport(array $productArray)

Find id of products in database for provided array of ids

Parameters

array $productArray

Return Value

array