SurveyQuestionAggregationRepository
class SurveyQuestionAggregationRepository extends TranslatableRepository
Class SurveyQuestionAggregationRepository is injected as alligator.survey_question_aggregation_repository service. SurveyQuestionAggregationRepository is used for crud operation for managed entity.
Use this class to work with database.
Constants
| TRANSLATION_WALKER_HINT |
|
| SURVEY_QUESTION_BLOCKS_RESULT_CACHE |
Survey question cache key |
| QUESTION_ALIAS |
Question alias |
| SURVEY_ALIAS |
Survey alias |
| CHOICE_ALIAS |
Choice alias |
| SURVEY_CATEGORY_ALIAS |
Survey category alias |
Properties
| protected string | $defaultLocale | from TranslatableRepository |
Methods
Returns translated one (or null if not found) result for given locale
Returns translated results for given locale
Returns translated array results for given locale
Returns translated single result for given locale
Returns translated scalar result for given locale
Returns translated single scalar result for given locale
Remove entities provided as array
Find all locales for custom ids of entities
Returns translated Doctrine query instance
No description
Get reference for passed class
Delete aggregations
Update positions and required fields
Find aggregations by survey primary key
Find aggregations by survey id for frontend
Delete all cached results
Details
in TranslatableRepository at line 41
setDefaultLocale(string $locale)
Sets default locale
in TranslatableRepository at line 57
QueryBuilder
getOneOrNullResult(QueryBuilder $qb, string $locale = null, string $hydrationMode = null)
Returns translated one (or null if not found) result for given locale
in TranslatableRepository at line 72
mixed
getResult(QueryBuilder $qb, string $locale = null, int $hydrationMode = AbstractQuery::HYDRATE_OBJECT)
Returns translated results for given locale
in TranslatableRepository at line 85
array
getArrayResult(QueryBuilder $qb, string $locale = null)
Returns translated array results for given locale
in TranslatableRepository at line 102
QueryBuilder
getSingleResult(QueryBuilder $qb, string $locale = null, string $hydrationMode = null)
Returns translated single result for given locale
in TranslatableRepository at line 115
array
getScalarResult(QueryBuilder $qb, string $locale = null)
Returns translated scalar result for given locale
in TranslatableRepository at line 130
QueryBuilder
getSingleScalarResult(QueryBuilder $qb, string $locale = null)
Returns translated single scalar result for given locale
in TranslatableRepository at line 142
PrimaryKeyInterface
save(PrimaryKeyInterface $entity)
in TranslatableRepository at line 172
remove(mixed $entity)
Remove entity
in TranslatableRepository at line 200
bool
removeArray(array $arrayOfEntities)
Remove entities provided as array
in TranslatableRepository at line 228
PrimaryKeyInterface
edit(PrimaryKeyInterface $entity)
Sets default locale to entity and merge
in TranslatableRepository at line 253
mixed
getAll()
Find all entities depending on locale
in TranslatableRepository at line 270
mixed
getByPrimaryKey(PrimaryKeyInterface $entity)
Find entity by primary key
in TranslatableRepository at line 291
QueryBuilder
getById(int $id)
Find entity by id
in TranslatableRepository at line 307
QueryBuilder|array
getGroupFromDB(array $array)
Find group od entities
in TranslatableRepository at line 332
EntityManager
getManager()
Singleton
in TranslatableRepository at line 352
mixed
saveCollection(array $array)
Persist collection
in TranslatableRepository at line 379
array
getLanguagesForIds(array $ids)
Find all locales for custom ids of entities
in TranslatableRepository at line 396
protected Query
getTranslatedQuery(QueryBuilder $qb, string $locale = null)
Returns translated Doctrine query instance
in TranslatableRepository at line 404
protected
startTransaction()
Begins transaction over database
in TranslatableRepository at line 412
protected
commitTransaction()
Commit transaction over database
in TranslatableRepository at line 420
protected
rollbackTransaction()
Rollback transaction over database
at line 52
string
getAlias()
at line 65
bool|Proxy|null|object
getReference(int|string $id, string $class = QuestionSurveyAggregation::class)
Get reference for passed class
at line 77
array
deleteAggregations(mixed $aggregations)
Delete aggregations
at line 97
Survey
updatePositionsAndRequiredFields(ArrayCollection $aggregations)
Update positions and required fields
at line 123
update(QuestionSurveyAggregation $aggregation)
Update question survey aggregation
at line 145
array
findAggregationsBySurveyId(int $id)
Find aggregations by survey primary key
at line 176
array
findAggregationsBySurveyIdForFrontEnd(int $id, null $locale = null, bool $useCache = false)
Find aggregations by survey id for frontend
at line 203
deleteResultCaches()
Delete all cached results