class EntityRelationshipManager implements BasicEntityManagerInterface

Class EntityRelationshipManager is injected as empire_product_entity_relationship_plugin.manager service. EntityRelationshipManager handles the logic for managed entity.

Properties

protected ProductEntityRelationshipRepository $repository
protected ProductRelationshipEventContainer $container

Methods

getEntityRelationshipForProduct(int $productId)

Find product relationship by product id

array
getSingleEntityRelationshipForProduct(int $productId, int $entityId)

Find product relationship by product and relationship entity id

array
getEntityRelationshipNameForProduct(int $productId)

Find entity relationship name for product id

saveProductEntityRelationship(array $content)

Create references to all foreign entities and save or edit entity relationship

bool|mixed
removeProductEntityRelationship(int $id)

Remove entity relationship by id

Details

at line 49
ProductEntityRelationship getEntityRelationshipForProduct(int $productId)

Find product relationship by product id

Parameters

int $productId

Return Value

ProductEntityRelationship

at line 61
array getSingleEntityRelationshipForProduct(int $productId, int $entityId)

Find product relationship by product and relationship entity id

Parameters

int $productId
int $entityId

Return Value

array

at line 72
array getEntityRelationshipNameForProduct(int $productId)

Find entity relationship name for product id

Parameters

int $productId

Return Value

array

at line 83
PrimaryKeyInterface saveProductEntityRelationship(array $content)

Create references to all foreign entities and save or edit entity relationship

Parameters

array $content

Return Value

PrimaryKeyInterface

at line 129
bool|mixed removeProductEntityRelationship(int $id)

Remove entity relationship by id

Parameters

int $id

Return Value

bool|mixed