ProductRelationshipNameRepository
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
Get all relationship names
Get relationship names for specified product
Get reference to ProductRelationshipName
Delete cached key
Delete relationship name with specified id
Get Relationship name entity by id
Update relationship name priorities
Decrease priority for all relationship names whose priority is greater than specified
Get reference to ProductRelationshipName
Get all relationship names with specified name
Save multiple names
Merge multiple names
Details
at line 46
array
getRelationshipNames()
Get all relationship names
at line 68
array
getRelationshipNamesForProduct(int $id, bool $withoutMainProduct = false)
Get relationship names for specified product
at line 104
ProductRelationshipName
getRelationshipNameReference(int $id)
Get reference to ProductRelationshipName
at line 117
ProductRelationshipName
save(ProductRelationshipName $relationshipName)
Save new ProductRelationshipName
at line 138
deleteQueryCache(string $key)
Delete cached key
at line 151
bool|array
deleteRelationshipName(int $id)
Delete relationship name with specified id
at line 176
ProductRelationshipName
getRelationshipNameByPk(int $id)
Get Relationship name entity by id
at line 190
ProductRelationshipName
editRelationshipName(ProductRelationshipName $relationshipName)
Merge ProductRelationshipName
at line 209
bool
editRelationshipOrder(array $array)
Update relationship name priorities
at line 232
reorderProductPriorities(int $priority)
Decrease priority for all relationship names whose priority is greater than specified
at line 249
ProductRelationshipName
getReference(int $id)
Get reference to ProductRelationshipName
at line 260
array
getRelationshipNamesByName(string $name)
Get all relationship names with specified name
at line 280
bool|string
saveMultiple(array $relNames, int $flushNumber = 30)
Save multiple names
at line 312
bool|string
updateMultiple(array $relNames, int $flushNumber = 30)
Merge multiple names