class CatalogueRepository extends EntityRepository

Class CatalogueRepository is injected as empire_digital_catalogue_plugin.catalogue_repository service. CatalogueRepository is used for crud operation for managed entity.

Use this class to work with database.

Traits

Trait JQGridTrait

Constants

ALIAS

Catalogue alias

CATEGORY_ALIAS

Category alias

PRODUCT_ALIAS

Product alias

IMAGE_FIRST_ALIAS

First page image alias

IMAGE_LAST_ALIAS

Last page image 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
save(Catalogue $object)

Persist object to database

edit(Catalogue $catalogue)

Edit object from database

array
getAllCataloguesWithSelect()

Get all catalogues with custom selected fields

Catalogue|mixed
getDigitalCatalogueById(int $id)

Get catalogue object by id

mixed
getDigitalCatalogueByIdWithSelect(int $id)

Get digital catalogue by id with custom select fields

array
getDigitalCatalogueForPrint(int $catalogueId)

Get digital catalogue for print

array
getDigitalCatalogueForPrintActionProducts(int $catalogueId)

Get digital catalogue products for print

array
getCataloguesArray(array $catalogues)

Get array of catalogues

bool
deleteCatalogues(array $catalogues)

Delete catalogues from array

array
getAllCataloguesIds()

Get all catalogue ids

mixed
getAllCataloguesForCategories(array $categories)

Get all catalogues for categories

bool
changeOrder(int $id, int $newIndex)

Change order of catalogues

int
getCataloguesCount()

Get catalogues count

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 58
mixed save(Catalogue $object)

Persist object to database

Parameters

Catalogue $object

Return Value

mixed

Exceptions

ORMException
OptimisticLockException

at line 75
Catalogue edit(Catalogue $catalogue)

Edit object from database

Parameters

Catalogue $catalogue

Return Value

Catalogue

Exceptions

ORMException
OptimisticLockException

at line 87
array getAllCataloguesWithSelect()

Get all catalogues with custom selected fields

Return Value

array

at line 102
Catalogue|mixed getDigitalCatalogueById(int $id)

Get catalogue object by id

Parameters

int $id

Return Value

Catalogue|mixed

at line 116
mixed getDigitalCatalogueByIdWithSelect(int $id)

Get digital catalogue by id with custom select fields

Parameters

int $id

Return Value

mixed

Exceptions

NoResultException
NonUniqueResultException

at line 149
array getDigitalCatalogueForPrint(int $catalogueId)

Get digital catalogue for print

Parameters

int $catalogueId

Return Value

array

at line 195
array getDigitalCatalogueForPrintActionProducts(int $catalogueId)

Get digital catalogue products for print

Parameters

int $catalogueId

Return Value

array

at line 222
array getCataloguesArray(array $catalogues)

Get array of catalogues

Parameters

array $catalogues

Return Value

array

at line 239
bool deleteCatalogues(array $catalogues)

Delete catalogues from array

Parameters

array $catalogues

Return Value

bool

at line 258
array getAllCataloguesIds()

Get all catalogue ids

Return Value

array

at line 272
mixed getAllCataloguesForCategories(array $categories)

Get all catalogues for categories

Parameters

array $categories

Return Value

mixed

at line 293
bool changeOrder(int $id, int $newIndex)

Change order of catalogues

Parameters

int $id
int $newIndex

Return Value

bool

Exceptions

DBALException
NonUniqueResultException

at line 327
int getCataloguesCount()

Get catalogues count

Return Value

int

Exceptions

NonUniqueResultException