ProductEntityRelationshipRepository
class ProductEntityRelationshipRepository extends EntityRepository
Class ProductEntityRelationshipRepository is injected as empire_product_entity_relationship_plugin.repository service. ProductEntityRelationshipRepository is used for crud operation for entity.
Use this class to work with database.
Traits
Constants
| ALIAS |
Alias for main entity |
| PRODUCT_ALIAS |
Alias for product |
| RELATIONSHIPS |
Alias for relationships |
Methods
Delete multiple PrimaryKeyInterface entities by array of ids
Delete multiple PrimaryKeyInterface entities by values of field
Get reference to class
Save multiple entities
Edit multiple entities
Delete multiple enities
Find product relationship by product id
Find product relationship by product and relationship entity id
Find entity relationship name for product id
Details
in BaseRepositoryTrait at line 27
PrimaryKeyInterface
save(PrimaryKeyInterface $object)
Save PrimaryKeyInterface entity
in BaseRepositoryTrait at line 48
PrimaryKeyInterface
edit(PrimaryKeyInterface $object)
Edit PrimaryKeyInterface entity
in BaseRepositoryTrait at line 69
bool
remove(PrimaryKeyInterface $object)
Delete PrimaryKeyInterface entity
in BaseRepositoryTrait at line 88
boolean
deleteMultipleByIds(array $ids)
Delete multiple PrimaryKeyInterface entities by array of ids
in BaseRepositoryTrait at line 101
boolean|string
deleteMultipleByField(string $field, array $values)
Delete multiple PrimaryKeyInterface entities by values of field
in BaseRepositoryTrait at line 130
mixed
getReference(int $id, string|null $class = null)
Get reference to class
in BaseRepositoryTrait at line 143
bool|string
saveMultiple(array $elements, int $flushNumber = 30)
Save multiple entities
in BaseRepositoryTrait at line 178
bool|string
updateMultiple(array $elements, int $flushNumber = 30)
Edit multiple entities
in BaseRepositoryTrait at line 213
bool|string
deleteMultiple(array $elements, int $flushNumber = 30)
Delete multiple enities
at line 50
ProductEntityRelationship
getEntityRelationshipForProduct(int $productId)
Find product relationship by product id
at line 75
array
getSingleEntityRelationshipForProduct(int $productId, int $entityId)
Find product relationship by product and relationship entity id
at line 100
array
getEntityRelationshipNameForProduct(int $productId)
Find entity relationship name for product id