class DeclarationCategoryManager extends CategoryTranslatableManager implements JQGridInterface, BasicEntityManagerInterface

Class DeclarationCategoryManager is injected as empire_declaration_plugin.declaration_category_manager service. DeclarationCategoryManager handles the logic for managed entity.

Traits

Trait JQGridManagerTrait
Class BlockElementManagerTrait. Handles reading data for block elements

Properties

protected DeclarationCategoryRepository $repository
protected DeclarationCategoryContainer $container

Methods

setRepositoryLocale(ContainerInterface|null $container)

Sets the repository request default locale

setRepository(mixed $repository)

No description

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(DeclarationCategoryRepository $repository, DeclarationCategoryContainer $container)

DeclarationCategoryManager constructor.

array|string
getAllTreeCategoriesForCategoryAddTree(string|null $locale = null)

Generate html for frontend

array
getAllCategories()

Find all categories(as array)

array|string
getCatsAsTreeForBackend()

Generate html for frontend

saveDeclarationCategory(DeclarationCategory $category)

Persist new Declaration Category

mixed
saveTreeCategoryForAdd(DeclarationCategory $category)

Persist new declaration category

mixed
editCatTree(DeclarationCategory $newCategory, mixed $positionChanged, string $previous)

No description

int
deleteTreeCategories(array $id)

No description

array|string
getAllCatsForFrontendContent(string $locale)

No description

array
getAllCatsForSidebarTree()

No description

string
getCacheCategoryTree(string $locale)

Retrieve declaration category tree from cache for provided locale

mixed
setCacheCategoryTree(string $data, string $locale)

Set declaration category tree to cache for provided locale

dispatchDecTreeGenerateSignal(string|null $locale)

dispatchSignal

mixed
getLanguageForId(int $id)

Find language locale for category that match provided id. NULL on missing category

deleteResultCaches()

Delete all cached results for declaration categories used in block elements

array
hasRootCategory()

Find root node

setImage(DeclarationCategory $category, Image $image)

Set new image to provided category

Details

setRepositoryLocale(ContainerInterface|null $container)

Sets the repository request default locale

Parameters

ContainerInterface|null $container

Exceptions

InvalidArgumentException if repository is not an instance of TranslatableRepository

setRepository(mixed $repository)

Parameters

mixed $repository

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 46
__construct(DeclarationCategoryRepository $repository, DeclarationCategoryContainer $container)

DeclarationCategoryManager constructor.

at line 59
array|string getAllTreeCategoriesForCategoryAddTree(string|null $locale = null)

Generate html for frontend

Parameters

string|null $locale

Return Value

array|string

at line 89
array getAllCategories()

Find all categories(as array)

Return Value

array

at line 99
array|string getCatsAsTreeForBackend()

Generate html for frontend

Return Value

array|string JSON representation of value

at line 116
DeclarationCategory saveDeclarationCategory(DeclarationCategory $category)

Persist new Declaration Category

Parameters

DeclarationCategory $category

Return Value

DeclarationCategory

Exceptions

ORMException
OptimisticLockException

at line 130
mixed saveTreeCategoryForAdd(DeclarationCategory $category)

Persist new declaration category

Parameters

DeclarationCategory $category

Return Value

mixed

Exceptions

Exception

at line 159
mixed editCatTree(DeclarationCategory $newCategory, mixed $positionChanged, string $previous)

Parameters

DeclarationCategory $newCategory
mixed $positionChanged
string $previous

Return Value

mixed

at line 201
int deleteTreeCategories(array $id)

Parameters

array $id

Return Value

int

Exceptions

ORMException

at line 229
array|string getAllCatsForFrontendContent(string $locale)

Parameters

string $locale

Return Value

array|string

at line 242
array getAllCatsForSidebarTree()

Return Value

array

at line 271
string getCacheCategoryTree(string $locale)

Retrieve declaration category tree from cache for provided locale

Parameters

string $locale

Return Value

string

at line 284
mixed setCacheCategoryTree(string $data, string $locale)

Set declaration category tree to cache for provided locale

Parameters

string $data
string $locale

Return Value

mixed

at line 293
dispatchDecTreeGenerateSignal(string|null $locale)

dispatchSignal

Parameters

string|null $locale

at line 307
mixed getLanguageForId(int $id)

Find language locale for category that match provided id. NULL on missing category

Parameters

int $id

Return Value

mixed

Exceptions

NonUniqueResultException

at line 315
deleteResultCaches()

Delete all cached results for declaration categories used in block elements

at line 325
array hasRootCategory()

Find root node

Return Value

array

at line 336
protected setImage(DeclarationCategory $category, Image $image)

Set new image to provided category

Parameters

DeclarationCategory $category
Image $image