class SurveyCategoryManager extends CategoryTranslatableManager

Class SurveyCategoryManager is injected as alligator.survey_category_manager service. SurveyCategoryManager handles the logic for managed entity.

Properties

protected SurveyCategoryRepository $repository
protected SurveyCategoryEventContainer $container

Methods

setRepositoryLocale(ContainerInterface|null $container)

Sets the repository request default locale

setRepository(mixed $repository)

No description

__construct(SurveyCategoryRepository $repository, SurveyCategoryEventContainer $container)

No description

array
getAllSurveyCategories()

Get all survey categories

int
deleteCats(array $arrayIds)

Delete survey categories

array|string
getAllTreeCategoriesForCategoryAddTree(null $locale = null)

Get all survey categories for tree

mixed
saveSurveyCategoryTree(SurveyCategory $category)

Save survey category to database

array
findCategoriesForCatAdd()

Find al categories for creating new category

saveSurveyCategory(SurveyCategory $surveyCategory)

Save survey category

array
deleteSurveyCategories(array $surveyCategoriesIdArray)

Delete multiple survey categories by id

prepareSurveyCategoryForDelete(SurveyCategory $surveyCategory)

Prepare survey category for delete, remove children nad surveys connected to it

edit(SurveyCategory $surveyCategory, bool $positionChanged, int $previous)

Edit survey category

mixed
getCacheCategoryTree(string $locale)

Get category cache tree

mixed
setCacheCategoryTree(string $data, string $locale)

Set category tree to cache

dispatchSurveyTreeGenerateSignal(string $locale)

Dispatch survey tree generate signal

array|string
getAllCatsForSidebarTree(string $locale)

Get all survey categories from cache

array|string
getCatsAsTreeForBackend()

Get survey categories as tree for backend

mixed
hasRootCategory()

Check if survey has root 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

at line 36
__construct(SurveyCategoryRepository $repository, SurveyCategoryEventContainer $container)

Parameters

SurveyCategoryRepository $repository
SurveyCategoryEventContainer $container

at line 47
array getAllSurveyCategories()

Get all survey categories

Return Value

array

at line 61
int deleteCats(array $arrayIds)

Delete survey categories

Parameters

array $arrayIds

Return Value

int

Exceptions

ORMException

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

Get all survey categories for tree

Parameters

null $locale

Return Value

array|string

at line 107
mixed saveSurveyCategoryTree(SurveyCategory $category)

Save survey category to database

Parameters

SurveyCategory $category

Return Value

mixed

at line 127
array findCategoriesForCatAdd()

Find al categories for creating new category

Return Value

array

at line 139
SurveyCategory saveSurveyCategory(SurveyCategory $surveyCategory)

Save survey category

Parameters

SurveyCategory $surveyCategory

Return Value

SurveyCategory

at line 164
array deleteSurveyCategories(array $surveyCategoriesIdArray)

Delete multiple survey categories by id

Parameters

array $surveyCategoriesIdArray

Return Value

array

at line 179
prepareSurveyCategoryForDelete(SurveyCategory $surveyCategory)

Prepare survey category for delete, remove children nad surveys connected to it

Parameters

SurveyCategory $surveyCategory

at line 198
stdClass edit(SurveyCategory $surveyCategory, bool $positionChanged, int $previous)

Edit survey category

Parameters

SurveyCategory $surveyCategory
bool $positionChanged
int $previous

Return Value

stdClass

at line 235
mixed getCacheCategoryTree(string $locale)

Get category cache tree

Parameters

string $locale

Return Value

mixed

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

Set category tree to cache

Parameters

string $data
string $locale

Return Value

mixed

at line 258
dispatchSurveyTreeGenerateSignal(string $locale)

Dispatch survey tree generate signal

Parameters

string $locale

at line 270
array|string getAllCatsForSidebarTree(string $locale)

Get all survey categories from cache

Parameters

string $locale

Return Value

array|string

at line 316
array|string getCatsAsTreeForBackend()

Get survey categories as tree for backend

Return Value

array|string

at line 328
mixed hasRootCategory()

Check if survey has root category

Return Value

mixed