class StoreManager implements BasicEntityManagerInterface, JQGridInterface

Class StoreManager is injected as empire_store_locator_plugin.store_locator_manager service. StoreManager handles the logic for entity.

Traits

Trait JQGridManagerTrait
Class BlockElementManagerTrait. Handles reading data for block elements

Properties

protected StoreRepository $repository
protected StoreLocatorEventContainer $eventContainer

Methods

mixed
searchForJQGRID(array $searchParams, array $sortParams = array(), array $additionalParams = array(), JQGridWrapper $jqGridWrapper = null)

No description

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

No description

mixed
getCountForJQGRID(array|null $searchParams = null, array|null $sortParams = null, array|null $additionalParams = array(), JQGridWrapper|null $jqGridWrapper = null)

No description

array
getEntitiesForBlockElementsExtension(array $ids)

Get entities from database by ids

array
getEntityNamesForIds(array $ids)

Get id and name of entity

__construct(StoreRepository $repository, StoreLocatorEventContainer $eventContainer)

No description

mixed
findStoreByPk(mixed $id)

Find Store by id

saveStore(Store $store)

Persist new Store

deleteStore(array $storesArrayDB)

Delete multiple Store entities

array
getStoresArray(array $storesArray)

Get Stores from database where id is in array

array
getAllStores()

Get all Stores from database

editStore(Store $store)

Merge Store entity

editAddress(Address $address)

Get Address from databes and update it

editMarker(Store $store, Store $storeDB)

Edit Store marker image

editStoreImage(Store $store, Store $storeDB)

Edit Store main image

array
getAllStoreHours(array $stores)

Get working hours for stores

array
renderWorkingHours(array $storeHours)

Render working hours for store

string
getReadableStringForStoreHours(array $storeHours)

Get text for working hours

array
getStoreForAddressId(mixed $addressId)

Get Stores for specified address

getCheckoutSettingsFromCache()

Get current checkout settings

setMarker(Store $store)

Add marker image to specified store

setStoreImage(Store $store)

Add store image to specified store

Details

in JQGridManagerTrait at line 26
mixed searchForJQGRID(array $searchParams, array $sortParams = array(), array $additionalParams = array(), JQGridWrapper $jqGridWrapper = null)

Parameters

array $searchParams
array $sortParams
array $additionalParams
JQGridWrapper $jqGridWrapper

Return Value

mixed

in JQGridManagerTrait at line 40
mixed findAllForJQGRID(int $page, int $offset, array $sortParams, array $additionalParams = array(), JQGridWrapper $jqGridWrapper = null)

Parameters

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

Return Value

mixed

in JQGridManagerTrait at line 53
mixed getCountForJQGRID(array|null $searchParams = null, array|null $sortParams = null, array|null $additionalParams = array(), JQGridWrapper|null $jqGridWrapper = null)

Parameters

array|null $searchParams
array|null $sortParams
array|null $additionalParams
JQGridWrapper|null $jqGridWrapper

Return Value

mixed

array getEntitiesForBlockElementsExtension(array $ids)

Get entities from database by ids

Parameters

array $ids

Return Value

array

array getEntityNamesForIds(array $ids)

Get id and name of entity

Parameters

array $ids

Return Value

array

at line 43
__construct(StoreRepository $repository, StoreLocatorEventContainer $eventContainer)

Parameters

StoreRepository $repository
StoreLocatorEventContainer $eventContainer

at line 59
mixed findStoreByPk(mixed $id)

Find Store by id

Parameters

mixed $id

Return Value

mixed

Exceptions

NoResultException
NonUniqueResultException

at line 71
Store saveStore(Store $store)

Persist new Store

Parameters

Store $store

Return Value

Store

at line 105
deleteStore(array $storesArrayDB)

Delete multiple Store entities

Parameters

array $storesArrayDB

Exceptions

ORMException
OptimisticLockException

at line 125
array getStoresArray(array $storesArray)

Get Stores from database where id is in array

Parameters

array $storesArray

Return Value

array

at line 135
array getAllStores()

Get all Stores from database

Return Value

array

at line 149
Store editStore(Store $store)

Merge Store entity

Parameters

Store $store

Return Value

Store

Exceptions

Exception

at line 202
Address editAddress(Address $address)

Get Address from databes and update it

Parameters

Address $address

Return Value

Address

at line 227
Store editMarker(Store $store, Store $storeDB)

Edit Store marker image

Parameters

Store $store
  • New store entity
Store $storeDB
  • Store from database

Return Value

Store

Exceptions

ORMException
OptimisticLockException

at line 257
Store editStoreImage(Store $store, Store $storeDB)

Edit Store main image

Parameters

Store $store
  • New store entity
Store $storeDB
  • Store from database

Return Value

Store

Exceptions

ORMException
OptimisticLockException

at line 282
array getAllStoreHours(array $stores)

Get working hours for stores

Parameters

array $stores

Return Value

array

at line 307
array renderWorkingHours(array $storeHours)

Render working hours for store

Parameters

array $storeHours

Return Value

array

at line 330
string getReadableStringForStoreHours(array $storeHours)

Get text for working hours

Parameters

array $storeHours

Return Value

string

at line 393
array getStoreForAddressId(mixed $addressId)

Get Stores for specified address

Parameters

mixed $addressId

Return Value

array

at line 403
CheckoutSettings getCheckoutSettingsFromCache()

Get current checkout settings

Return Value

CheckoutSettings

at line 415
protected Store setMarker(Store $store)

Add marker image to specified store

Parameters

Store $store

Return Value

Store

at line 439
protected Store setStoreImage(Store $store)

Add store image to specified store

Parameters

Store $store

Return Value

Store