class CompareRepository extends EntityRepository

Class CompareRepository is injected as empire_compare_plugin.compare_repository service. CompareRepository is used for crud operation for managed entity.

Use this class to work with database.

Constants

ALIAS

Alias for compare

JOIN_WITH_PRODUCT_TABLE_NAME

Alias for join with product

COMPARE_LIST_ID_IN_JOIN_TABLE

Name of filed of compare

PRODUCT_ID_IN_JOIN_TABLE

Name of filed of product

Methods

getOneById(int $id)

Find compare list by id

array
getCompareListsForUser(int $userId)

Find all compare lists for specific user

Product|bool|Proxy|null|object
getProductReference(int $id)

Get product reference

Compare|null
save(Compare $compareObject)

Persist new compare list

bool
remove(Compare $compareObject)

Remove compare list

Details

at line 58
Compare getOneById(int $id)

Find compare list by id

Parameters

int $id

Return Value

Compare

at line 69
array getCompareListsForUser(int $userId)

Find all compare lists for specific user

Parameters

int $userId

Return Value

array

at line 86
Product|bool|Proxy|null|object getProductReference(int $id)

Get product reference

Parameters

int $id

Return Value

Product|bool|Proxy|null|object

Exceptions

ORMException

at line 97
Compare|null save(Compare $compareObject)

Persist new compare list

Parameters

Compare $compareObject

Return Value

Compare|null

at line 117
bool remove(Compare $compareObject)

Remove compare list

Parameters

Compare $compareObject

Return Value

bool