class SurveyQuestionManager extends TranslatableManager implements JQGridInterface

Class SurveyQuestionManager is injected as alligator.survey_question_manager service. SurveyQuestionManager handles the logic for managed entity.

Traits

Trait JQGridManagerTrait

Properties

protected SurveyQuestionRepository $repository
protected SurveyRepository $surveyRepository
protected ChoiceRepository $choiceRepository

Methods

setRepositoryLocale(ContainerInterface|null $container)

Sets the repository request default locale

setRepository(mixed $repository)

No description

mixed
getLanguagesForIds(array $ids)

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

__construct(SurveyQuestionRepository $repository, SurveyRepository $surveyRepository, ChoiceRepository $choiceRepository)

No description

array
getAllSurveys(string $locale = null)

Get all surveys

saveSurveyQuestion(Question $question)

Save survey question

editSurveyQuestion(Question $question)

Edit survey question

prepareQuestionForEditNew(Question $question, array $tempArray)

Prepare question for edit new

removeCurrentQuestionsThatAreNotSelectedOnTheFrontEnd(Question $oldQuestion, Question $newQuestion)

Remove current questions that are not elected on the frontend

array
addNewAggregationsForEdit(Question $oldQuestion, Question $newQuestions)

Add new aggregation for edit

array
getAllSurveyQuestions(string $locale)

Get all survey question

deleteSurveyQuestions(array $arrayId)

Delete survey questions

array
findOneByIdForEdit(int $id, null $locale = null)

Find one question by primary key for edit

Details

in TranslatableManager at line 30
setRepositoryLocale(ContainerInterface|null $container)

Sets the repository request default locale

Parameters

ContainerInterface|null $container

Exceptions

InvalidArgumentException if repository is not an instance of TranslatableRepository

in TranslatableManager at line 63
setRepository(mixed $repository)

Parameters

mixed $repository

in TranslatableManager at line 73
mixed getLanguagesForIds(array $ids)

Parameters

array $ids

Return Value

mixed

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 53
__construct(SurveyQuestionRepository $repository, SurveyRepository $surveyRepository, ChoiceRepository $choiceRepository)

Parameters

SurveyQuestionRepository $repository
SurveyRepository $surveyRepository
ChoiceRepository $choiceRepository

at line 67
array getAllSurveys(string $locale = null)

Get all surveys

Parameters

string $locale

Return Value

array

at line 79
Question saveSurveyQuestion(Question $question)

Save survey question

Parameters

Question $question

Return Value

Question

at line 96
Question editSurveyQuestion(Question $question)

Edit survey question

Parameters

Question $question

Return Value

Question

at line 123
prepareQuestionForEditNew(Question $question, array $tempArray)

Prepare question for edit new

Parameters

Question $question
array $tempArray

at line 139
removeCurrentQuestionsThatAreNotSelectedOnTheFrontEnd(Question $oldQuestion, Question $newQuestion)

Remove current questions that are not elected on the frontend

Parameters

Question $oldQuestion
Question $newQuestion

at line 169
array addNewAggregationsForEdit(Question $oldQuestion, Question $newQuestions)

Add new aggregation for edit

Parameters

Question $oldQuestion
Question $newQuestions

Return Value

array

at line 201
array getAllSurveyQuestions(string $locale)

Get all survey question

Parameters

string $locale

Return Value

array

at line 213
Question deleteSurveyQuestions(array $arrayId)

Delete survey questions

Parameters

array $arrayId

Return Value

Question

at line 231
array findOneByIdForEdit(int $id, null $locale = null)

Find one question by primary key for edit

Parameters

int $id
null $locale

Return Value

array