class AlbumsManager implements JQGridInterface, BasicEntityManagerInterface

Class AlbumsManager is injected as empire_albums_plugin.albums_manager service. AlbumsManager handles the logic for managed entity.

Traits

Trait JQGridManagerTrait
Class BlockElementManagerTrait. Handles reading data for block elements

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 Album entities for block elements

array
getEntityNamesForIds(array $ids)

Get id and name of entity

__construct(AlbumsRepository $repository, AlbumsEventContainer $container)

No description

ArrayCollection
findOneItemForEdit(int $id)

Get Album for edit

mixed
saveItem(Album $item)

Persist new Album object

object
editItem(Album $item)

Edit Album object

mixed
deleteAlbum(int $id)

Delete Album by id

mixed
getAlbumsFromCache(string $theme, string $locale)

Get Albums from cache for theme and locale

mixed
getAlbumsFromDB(null $page = null, null $offset = null, bool $isCount = false)

Get array of albums from database for requested offset and page, if count param is provided retunr only number of items

mixed
setAlbumsToCache(string $data)

Set Album data to cache

dispatchAlbumsCacheSignal(string $theme, string $locale)

Dispatch Album cache event for requested theme and locale

string
setAlbumsForFrontend(string $theme, string $locale)

Cache Albums html for frontend

mixed
findAlbumForFrontend(string $slug)

Get single Album object for frontend by slug

deleteResultCache()

Delete cached results

bool
changeOrder(int $id, int $newIndex)

Reorder Album by id and set to position of newIndex

saveImagesToFileSystemAndSetAggregations(Album $item)

Save image to file and set it to AlbumImageAggregation

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

at line 250
array getEntitiesForBlockElementsExtension(array $ids)

Get Album entities for block elements

Parameters

array $ids

Return Value

array

array getEntityNamesForIds(array $ids)

Get id and name of entity

Parameters

array $ids

Return Value

array

at line 44
__construct(AlbumsRepository $repository, AlbumsEventContainer $container)

Parameters

AlbumsRepository $repository
AlbumsEventContainer $container

at line 56
ArrayCollection findOneItemForEdit(int $id)

Get Album for edit

Parameters

int $id

Return Value

ArrayCollection

at line 69
mixed saveItem(Album $item)

Persist new Album object

Parameters

Album $item

Return Value

mixed

Exceptions

NonUniqueResultException

at line 93
object editItem(Album $item)

Edit Album object

Parameters

Album $item

Return Value

object

at line 134
mixed deleteAlbum(int $id)

Delete Album by id

Parameters

int $id

Return Value

mixed

at line 149
mixed getAlbumsFromCache(string $theme, string $locale)

Get Albums from cache for theme and locale

Parameters

string $theme
string $locale

Return Value

mixed

Exceptions

NoResultException
NonUniqueResultException

at line 171
mixed getAlbumsFromDB(null $page = null, null $offset = null, bool $isCount = false)

Get array of albums from database for requested offset and page, if count param is provided retunr only number of items

Parameters

null $page
null $offset
bool $isCount

Return Value

mixed

Exceptions

NoResultException
NonUniqueResultException

at line 186
mixed setAlbumsToCache(string $data)

Set Album data to cache

Parameters

string $data

Return Value

mixed

at line 197
dispatchAlbumsCacheSignal(string $theme, string $locale)

Dispatch Album cache event for requested theme and locale

Parameters

string $theme
string $locale

at line 212
string setAlbumsForFrontend(string $theme, string $locale)

Cache Albums html for frontend

Parameters

string $theme
string $locale

Return Value

string

Exceptions

NoResultException
NonUniqueResultException

at line 239
mixed findAlbumForFrontend(string $slug)

Get single Album object for frontend by slug

Parameters

string $slug

Return Value

mixed

at line 258
deleteResultCache()

Delete cached results

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

Reorder Album by id and set to position of newIndex

Parameters

int $id
int $newIndex

Return Value

bool

Exceptions

DBALException
NonUniqueResultException

at line 282
protected saveImagesToFileSystemAndSetAggregations(Album $item)

Save image to file and set it to AlbumImageAggregation

Parameters

Album $item