SurveyCategoryRepository
class SurveyCategoryRepository extends CategoryTranslatableRepository
Class SurveyCategoryRepository is injected as alligator.survey_category_repository service. SurveyCategoryRepository is used for crud operation for managed entity.
Use this class to work with database.
Traits
Constants
| TRANSLATION_WALKER_HINT |
|
| ALIAS |
Survey category alias |
| PARENT_ALIAS |
Parent alias |
Properties
| protected string | $defaultLocale | from CategoryTranslatableRepository |
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
Find all entities ordered by id descending
Find entities for provided array of entities
Persist array of new entities
Returns translated Doctrine query instance
No description
Get survey category by slug
Get all survey categories
Get all survey categories for delete
Change position of categoy in category tree
Make temporary survey category object for frontend
Update number of items for visible categories
Delete survey categories
Delete survey categories
Update number of items for array
Find categories for cat add
Get category tree
Details
in CategoryTranslatableRepository at line 41
setDefaultLocale(string $locale)
Sets default locale
in CategoryTranslatableRepository 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 CategoryTranslatableRepository at line 71
QueryBuilder
getResult(QueryBuilder $qb, string $locale = null, int $hydrationMode = AbstractQuery::HYDRATE_OBJECT)
Returns translated results for given locale
in CategoryTranslatableRepository at line 84
mixed
getArrayResult(QueryBuilder $qb, string $locale = null)
Returns translated array results for given locale
in CategoryTranslatableRepository at line 101
QueryBuilder
getSingleResult(QueryBuilder $qb, string $locale = null, string $hydrationMode = null)
Returns translated single result for given locale
in CategoryTranslatableRepository at line 114
array
getScalarResult(QueryBuilder $qb, string $locale = null)
Returns translated scalar result for given locale
in CategoryTranslatableRepository at line 129
QueryBuilder
getSingleScalarResult(QueryBuilder $qb, string $locale = null)
Returns translated single scalar result for given locale
in CategoryTranslatableRepository at line 142
PrimaryKeyInterface
save(PrimaryKeyInterface $entity)
Persist new entity to database
in CategoryTranslatableRepository at line 171
remove(mixed $entity)
Remove entity from database
in CategoryTranslatableRepository at line 197
PrimaryKeyInterface
edit(PrimaryKeyInterface $entity)
Merge entity
in CategoryTranslatableRepository at line 220
QueryBuilder
getAll()
Find all entities ordered by id descending
in CategoryTranslatableRepository at line 237
QueryBuilder
getByPrimaryKey(PrimaryKeyInterface $entity, mixed $param = null)
Find entity by primary key
in CategoryTranslatableRepository at line 255
mixed
getById(int $id)
Find entity by id
in CategoryTranslatableRepository at line 270
QueryBuilder|array
getGroupFromDB(mixed $array)
Find entities for provided array of entities
in CategoryTranslatableRepository at line 295
EntityManager
getManager()
Singleton
in CategoryTranslatableRepository at line 314
mixed
saveCollection(array $array)
Persist array of new entities
in CategoryTranslatableRepository at line 341
protected Query
getTranslatedQuery(QueryBuilder $qb, string $locale = null)
Returns translated Doctrine query instance
in CategoryTranslatableRepository at line 349
protected
startTransaction()
Begins transaction over database
in CategoryTranslatableRepository at line 357
protected
commitTransaction()
Commit transaction over database
in CategoryTranslatableRepository at line 365
protected
rollbackTransaction()
Rollback transaction over database
at line 41
string
getAlias()
in EmpireNestedTreeRepositoryTrait at line 23
array
hasRootCategory()
Find root node
at line 55
mixed
getSurveyCategoryBySlug(string $slug)
Get survey category by slug
at line 69
SurveyCategory
saveSurveyCategory(SurveyCategory $surveyCategory)
Save survey category to database
at line 86
array
getAllSurveyCategories()
Get all survey categories
at line 105
array
getAllSurveyCategoriesForDelete(array $surveyCategoriesId)
Get all survey categories for delete
at line 127
mixed
changePosition(SurveyCategory $category, mixed $oldParent)
Change position of categoy in category tree
at line 169
object
makeTemporaryObjectForFrontEnd(SurveyCategory $category)
Make temporary survey category object for frontend
at line 189
updateNumberOfItemsForVisibleItems(SurveyCategory $entity)
Update number of items for visible categories
at line 213
mixed
editFields(SurveyCategory $category)
Edit fields for survey category
at line 254
persistRoot(SurveyCategory $category)
at line 268
int
deleteCats(array $items)
Delete survey categories
at line 298
array
deleteSurveyCategories(array $surveyCategories)
Delete survey categories
at line 316
updateWithoutDates(SurveyCategory $surveyCategory)
Update without dates
at line 345
updateNumberOfItems(SurveyCategory $entity)
Update number of items for survey category
at line 369
updateNumberOfItemsForArray(mixed $array)
Update number of items for array
at line 395
array
findCategoriesForCatAdd()
Find categories for cat add
at line 412
array|string
getCategoryTree(mixed $options, string $locale = null, boolean $frontend = false)
Get category tree