StoreRepository
class StoreRepository extends EntityRepository implements AbstractBlockElementRepositoryInterface
Class StoreRepository is injected as empire_store_locator_plugin.store_locator_repository service. StoreRepository is used for crud operation for entity.
Use this class to work with database.
Traits
Constants
| ADDRESS_ALIAS |
|
| MARKER_ALIAS |
|
| STORE_IMAGE_ALIAS |
|
| JOIN_WITH_ADDRESS |
|
| JOIN_WITH_STORE_IMAGE |
|
| JOIN_WITH_MARKER |
|
| ALIAS |
|
| STORE_LOCATOR_BLOCKS_RESULT_CACHE |
|
Methods
Should contain group by which jqgrid uses.
JQGrid function
JQGrid function
Find Store by id
Delete multiple Store entities
Get Stores from database where id is in array
Get all Stores from database
Get Address from database
Get entities from database by ids Tis method is used to for block elements extension Make sure you order data by ids - ids is array of elements and it is sorted by priority - so add this to select -> ' FIELD('.$this->getAlias().'.id'.', '.implode(', ', $ids).') AS sort_col'); - and order by this field Also make sure you cache this data -> qb->useQueryCache(true)->useResultCache(true, 3600)
Get id and name (field must be name so change it in select) of entity Used in event for block element edit Make sure you order data by ids - ids is array of elements and it is sorted by priority - so add this to select -> ' FIELD('.$this->getAlias().'.id'.', '.implode(', ', $ids).') AS sort_col'); - and order by this field
Get Stores for specified address
Delete all cached results
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
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
in JQGridTrait at line 61
array
findAllForJQGRID(int $page, int $offset, array $sortParams, array $additionalParams, JQGridWrapper $jqGridWrapper)
JQGrid function
in JQGridTrait at line 94
array
searchForJQGRID(array $searchParams, array $sortParams, bool $isCountSearch = false, array $additionalParams = array(), JQGridWrapper $jqGridWrapper = null)
JQGrid function
at line 55
mixed
findStoreByPk(mixed $id)
Find Store by id
at line 91
deleteStores(array $stores)
Delete multiple Store entities
at line 107
array
getStoresArray(array $array)
Get Stores from database where id is in array
at line 122
array
getAllStores()
Get all Stores from database
at line 159
Address
getStoreAddress(int $id)
Get Address from database
at line 184
array
getEntitiesForBlockElementsExtension(array $ids)
Get entities from database by ids Tis method is used to for block elements extension Make sure you order data by ids - ids is array of elements and it is sorted by priority - so add this to select -> ' FIELD('.$this->getAlias().'.id'.', '.implode(', ', $ids).') AS sort_col'); - and order by this field Also make sure you cache this data -> qb->useQueryCache(true)->useResultCache(true, 3600)
at line 225
array
getEntityNamesForIds(array $ids)
Get id and name (field must be name so change it in select) of entity Used in event for block element edit Make sure you order data by ids - ids is array of elements and it is sorted by priority - so add this to select -> ' FIELD('.$this->getAlias().'.id'.', '.implode(', ', $ids).') AS sort_col'); - and order by this field
at line 247
array
getStoreForAddressId(mixed $addressId)
Get Stores for specified address
at line 260
deleteResultCaches()
Delete all cached results