class ProductGroupDiscountUserRepository extends EntityRepository

Class ProductGroupDiscountUserRepository is injected as alligator.product.group.discount.user.repository service. ProductGroupDiscountUserRepository is used for crud operation for entity.

Use this class to work with database.

Traits

Trait JQGridTrait

Constants

ALIAS

USER_ALIAS

GROUP_ALIAS

Methods

jQGridJoinFields(QueryBuilder $qb, JQGridWrapper $jqGridWrapper)

All joins used in select.

jQGridGroupByFields(QueryBuilder $qb, JQGridWrapper $jqGridWrapper)

Should contain group by which jqgrid uses.

array
findAllForJQGRID(int $page, int $offset, array $sortParams, array $additionalParams, JQGridWrapper $jqGridWrapper)

JQGrid function

array
searchForJQGRID(array $searchParams, array $sortParams, bool $isCountSearch = false, array $additionalParams = array(), JQGridWrapper $jqGridWrapper = null)

JQGrid function

mixed
getReference(mixed $id, string $class = ProductGroupDiscountUser::class)

Get reference for class

findByPk(mixed $id)

Get ProductGroupDiscountUser by id

edit(ProductGroupDiscountUser $productGroupDiscountUser)

Edit ProductGroupDiscountUser entity

save(ProductGroupDiscountUser $productGroupDiscountUser)

Save ProductGroupDiscountUser entity

delete(ProductGroupDiscountUser $productGroupDiscountUser)

Delete one ProductGroupDiscountUser

bool
deleteCollection(array $productGroupDiscountUsers)

Delete multiple ProductGroupDiscountUser's

array
getArrayByIds(array $ids)

Gets multiple ProductGroupDiscountUser entities

bool
checkIfDiscountIsValid(ProductGroupDiscountUser $productGroupDiscountUser)

Check if Discount for specified parameters already exists.

bool|string
saveMultiple(array $newGroupDiscounts, array $updatedGroupDiscounts)

Save multiple discounts

array
getDiscountsByValues(array $discountArray)

Get ProductGroupDiscountUser based on discounts array

Details

in JQGridTrait at line 27
jQGridJoinFields(QueryBuilder $qb, JQGridWrapper $jqGridWrapper)

All joins used in select.

Override in the repository class if needed. Should do nothing otherwise

Parameters

QueryBuilder $qb
JQGridWrapper $jqGridWrapper

in JQGridTrait at line 42
jQGridGroupByFields(QueryBuilder $qb, JQGridWrapper $jqGridWrapper)

Should contain group by which jqgrid uses.

Override in the repository class if needed. Should do nothing otherwise

Parameters

QueryBuilder $qb
JQGridWrapper $jqGridWrapper

in JQGridTrait at line 61
array findAllForJQGRID(int $page, int $offset, array $sortParams, array $additionalParams, JQGridWrapper $jqGridWrapper)

JQGrid function

Parameters

int $page
int $offset
array $sortParams
array $additionalParams
JQGridWrapper $jqGridWrapper

Return Value

array

in JQGridTrait at line 94
array searchForJQGRID(array $searchParams, array $sortParams, bool $isCountSearch = false, array $additionalParams = array(), JQGridWrapper $jqGridWrapper = null)

JQGrid function

Parameters

array $searchParams
array $sortParams
bool $isCountSearch
array $additionalParams
JQGridWrapper $jqGridWrapper

Return Value

array

at line 39
mixed getReference(mixed $id, string $class = ProductGroupDiscountUser::class)

Get reference for class

Parameters

mixed $id
string $class

Return Value

mixed

Exceptions

ORMException

at line 53
ProductGroupDiscountUser findByPk(mixed $id)

Get ProductGroupDiscountUser by id

Parameters

mixed $id

Return Value

ProductGroupDiscountUser

Exceptions

NonUniqueResultException

at line 70
ProductGroupDiscountUser edit(ProductGroupDiscountUser $productGroupDiscountUser)

Edit ProductGroupDiscountUser entity

Parameters

ProductGroupDiscountUser $productGroupDiscountUser

Return Value

ProductGroupDiscountUser

at line 89
ProductGroupDiscountUser save(ProductGroupDiscountUser $productGroupDiscountUser)

Save ProductGroupDiscountUser entity

Parameters

ProductGroupDiscountUser $productGroupDiscountUser

Return Value

ProductGroupDiscountUser

at line 110
ProductGroupDiscountUser delete(ProductGroupDiscountUser $productGroupDiscountUser)

Delete one ProductGroupDiscountUser

Parameters

ProductGroupDiscountUser $productGroupDiscountUser

Return Value

ProductGroupDiscountUser

Exceptions

OptimisticLockException

at line 125
bool deleteCollection(array $productGroupDiscountUsers)

Delete multiple ProductGroupDiscountUser's

Parameters

array $productGroupDiscountUsers

Return Value

bool FALSE on error, TRUE otherwise

at line 147
array getArrayByIds(array $ids)

Gets multiple ProductGroupDiscountUser entities

Parameters

array $ids

Return Value

array

at line 163
bool checkIfDiscountIsValid(ProductGroupDiscountUser $productGroupDiscountUser)

Check if Discount for specified parameters already exists.

There can be only one disconunt with specific parameters

Parameters

ProductGroupDiscountUser $productGroupDiscountUser

Return Value

bool

at line 210
bool|string saveMultiple(array $newGroupDiscounts, array $updatedGroupDiscounts)

Save multiple discounts

Parameters

array $newGroupDiscounts
array $updatedGroupDiscounts

Return Value

bool|string TRUE on success else error string

at line 254
array getDiscountsByValues(array $discountArray)

Get ProductGroupDiscountUser based on discounts array

Parameters

array $discountArray

Return Value

array