class ProductRelationshipNameRepository extends EntityRepository

Class ProductRelationshipNameRepository is injected as empire_product_relationship_name_plugin.repository service. ProductRelationshipNameRepository is used for crud operation for entity.

Use this class to work with database.

Constants

ALIAS

Alias for main entity

RELATIONSHIPS

Alias for relationships

PRODUCT_RELATIONSHIPS_CACHED

Key for data caching

Methods

array
getRelationshipNames()

Get all relationship names

array
getRelationshipNamesForProduct(int $id, bool $withoutMainProduct = false)

Get relationship names for specified product

getRelationshipNameReference(int $id)

Get reference to ProductRelationshipName

save(ProductRelationshipName $relationshipName)

Save new ProductRelationshipName

deleteQueryCache(string $key)

Delete cached key

bool|array
deleteRelationshipName(int $id)

Delete relationship name with specified id

getRelationshipNameByPk(int $id)

Get Relationship name entity by id

editRelationshipName(ProductRelationshipName $relationshipName)

Merge ProductRelationshipName

bool
editRelationshipOrder(array $array)

Update relationship name priorities

reorderProductPriorities(int $priority)

Decrease priority for all relationship names whose priority is greater than specified

getReference(int $id)

Get reference to ProductRelationshipName

array
getRelationshipNamesByName(string $name)

Get all relationship names with specified name

bool|string
saveMultiple(array $relNames, int $flushNumber = 30)

Save multiple names

bool|string
updateMultiple(array $relNames, int $flushNumber = 30)

Merge multiple names

Details

at line 46
array getRelationshipNames()

Get all relationship names

Return Value

array

at line 68
array getRelationshipNamesForProduct(int $id, bool $withoutMainProduct = false)

Get relationship names for specified product

Parameters

int $id
bool $withoutMainProduct

Return Value

array

at line 104
ProductRelationshipName getRelationshipNameReference(int $id)

Get reference to ProductRelationshipName

Parameters

int $id

Return Value

ProductRelationshipName

Exceptions

ORMException

at line 117
ProductRelationshipName save(ProductRelationshipName $relationshipName)

Save new ProductRelationshipName

Parameters

ProductRelationshipName $relationshipName

Return Value

ProductRelationshipName

Exceptions

ConstraintViolationException

at line 138
deleteQueryCache(string $key)

Delete cached key

Parameters

string $key

at line 151
bool|array deleteRelationshipName(int $id)

Delete relationship name with specified id

Parameters

int $id

Return Value

bool|array

Exceptions

ORMException

at line 176
ProductRelationshipName getRelationshipNameByPk(int $id)

Get Relationship name entity by id

Parameters

int $id

Return Value

ProductRelationshipName

Exceptions

NoResultException
NonUniqueResultException

at line 190
ProductRelationshipName editRelationshipName(ProductRelationshipName $relationshipName)

Merge ProductRelationshipName

Parameters

ProductRelationshipName $relationshipName

Return Value

ProductRelationshipName

at line 209
bool editRelationshipOrder(array $array)

Update relationship name priorities

Parameters

array $array

Return Value

bool

at line 232
reorderProductPriorities(int $priority)

Decrease priority for all relationship names whose priority is greater than specified

Parameters

int $priority

Exceptions

DBALException

at line 249
ProductRelationshipName getReference(int $id)

Get reference to ProductRelationshipName

Parameters

int $id

Return Value

ProductRelationshipName

Exceptions

ORMException

at line 260
array getRelationshipNamesByName(string $name)

Get all relationship names with specified name

Parameters

string $name

Return Value

array

at line 280
bool|string saveMultiple(array $relNames, int $flushNumber = 30)

Save multiple names

Parameters

array $relNames
int $flushNumber

Return Value

bool|string

at line 312
bool|string updateMultiple(array $relNames, int $flushNumber = 30)

Merge multiple names

Parameters

array $relNames
int $flushNumber

Return Value

bool|string