class PaymentTypeRepository extends EntityRepository

Class PaymentTypeRepository is injected as service. PaymentTypeRepository is used for crud operation for managed entity.

Use this class to work with database.

Traits

Trait JQGridTrait

Constants

ALIAS

Payment type alias

CHECKOUT_SETTINGS_ALIAS

Checkout settings alias

DISABLED_ROLES_ALIAS

Disabled roles alias

DISABLED_GUEST_ROLES_ALIAS

Disabled guest roles alias

ALLOWED_PRICELISTS

Allowed pricelists alias

PAYMENT_TYPE_RESULT_CACHE

Payment type result cache key

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

array
findAllPaymentTypes()

Get all payment types id, name and value

array
findAllPaymentTypesForEdit()

Get all payment types for edit

array
findAllPaymentTypesToCache(int|string|null $checkoutSettingsId = null)

Find all payment types to cache

mixed
findPaymentTypeById(int $id)

Get payment type by id

mixed
getPaymentTypeObjByPk(int $id)

Get payment type object from database by primary key

save(PaymentType $entity)

Persist payment type object to database

edit(PaymentType $entity)

Edit payment type entity

bool
remove(PaymentType $entity)

Remove entity from database

bool
savePaymentTypesFromArray(array $array)

Save payment types from array

bool
removePaymentTypesFromArray(array $array)

Remove multiple payment types from database

mixed
getReference(int $id, string $class = PaymentType::class)

Get object reference by id

array
getPaymentTypeRoleSettingsArray()

Get payment type role settings as array

mixed
getPaymentTypeByName(string $name)

Get payment type by name

deleteResultsCache()

Delete payment type result cache

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 56
array findAllPaymentTypes()

Get all payment types id, name and value

Return Value

array

at line 68
array findAllPaymentTypesForEdit()

Get all payment types for edit

Return Value

array

at line 85
array findAllPaymentTypesToCache(int|string|null $checkoutSettingsId = null)

Find all payment types to cache

Parameters

int|string|null $checkoutSettingsId

Return Value

array

at line 109
mixed findPaymentTypeById(int $id)

Get payment type by id

Parameters

int $id

Return Value

mixed

Exceptions

NonUniqueResultException

at line 127
mixed getPaymentTypeObjByPk(int $id)

Get payment type object from database by primary key

Parameters

int $id

Return Value

mixed

Exceptions

NonUniqueResultException

at line 141
PaymentType|int save(PaymentType $entity)

Persist payment type object to database

Parameters

PaymentType $entity

Return Value

PaymentType|int

at line 162
PaymentType|int edit(PaymentType $entity)

Edit payment type entity

Parameters

PaymentType $entity

Return Value

PaymentType|int

at line 183
bool remove(PaymentType $entity)

Remove entity from database

Parameters

PaymentType $entity

Return Value

bool

at line 202
bool savePaymentTypesFromArray(array $array)

Save payment types from array

Parameters

array $array

Return Value

bool

at line 226
bool removePaymentTypesFromArray(array $array)

Remove multiple payment types from database

Parameters

array $array

Return Value

bool

at line 254
mixed getReference(int $id, string $class = PaymentType::class)

Get object reference by id

Parameters

int $id
string $class

Return Value

mixed

Exceptions

ORMException

at line 263
array getPaymentTypeRoleSettingsArray()

Get payment type role settings as array

Return Value

array

at line 293
mixed getPaymentTypeByName(string $name)

Get payment type by name

Parameters

string $name

Return Value

mixed

Exceptions

NoResultException

at line 316
deleteResultsCache()

Delete payment type result cache