PricelistRepository
class PricelistRepository extends EntityRepository
Class PricelistRepository is injected as alligator_pricelist.repository service. PricelistRepository is used for crud operation for entity.
Use this class to work with database.
Constants
| ALIAS |
Alias for main entity |
| USER_SPECIFIC_ALIAS |
Alias for user specific discounts |
| USER_ALIAS |
Alias for user |
| DEFAULT_PRICELIST_CACHED |
Key for caching |
Methods
Get all price lists as array
Get all pricelist for specified user
Get single price list by id
Get reference to object
Delete single Pricelist
Get default pricelist Cache this result
Set Pricelist as default, update currentPrice field for products
Get id and erp code of all pricelists
Get Pricelist from database where id is in specified array
Get single Pricelist with specified code
Details
at line 51
array
getPricelistsForBackend()
Get all price lists as array
at line 65
array
getPricelistsForUser(mixed $id)
Get all pricelist for specified user
at line 87
PriceList
getPricelistById(mixed $id)
Get single price list by id
at line 103
PriceList
getReference(mixed $id)
Get reference to object
at line 154
mixed
delete(mixed $pricelist)
Delete single Pricelist
at line 171
mixed
getDefaultPricelist()
Get default pricelist Cache this result
at line 195
bool
setAsDefault(mixed $id)
Set Pricelist as default, update currentPrice field for products
at line 237
array
getAllPricelists()
Get id and erp code of all pricelists
at line 251
array
getPricelistsArrayFromDB(array $ids)
Get Pricelist from database where id is in specified array
at line 272
Pricelist|null
getPricelistForERPCode(string $code)
Get single Pricelist with specified code