CategoryTranslatableRepository
abstract class CategoryTranslatableRepository extends NestedTreeRepository
Class CategoryTranslatableRepository should extends every repository whose managed entity has tree structure.
Use this class to work with database.
Constants
| TRANSLATION_WALKER_HINT |
|
Properties
| protected string | $defaultLocale |
Methods
Sets default locale
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 entity from database
Find all entities ordered by id descending
Find entity by id
Find entities for provided array of entities
Singleton
Persist array of new entities
Returns translated Doctrine query instance
Begins transaction over database
Commit transaction over database
Rollback transaction over database
Alias for main entity
Details
at line 41
setDefaultLocale(string $locale)
Sets default locale
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
at line 71
QueryBuilder
getResult(QueryBuilder $qb, string $locale = null, int $hydrationMode = AbstractQuery::HYDRATE_OBJECT)
Returns translated results for given locale
at line 84
mixed
getArrayResult(QueryBuilder $qb, string $locale = null)
Returns translated array results for given locale
at line 101
QueryBuilder
getSingleResult(QueryBuilder $qb, string $locale = null, string $hydrationMode = null)
Returns translated single result for given locale
at line 114
array
getScalarResult(QueryBuilder $qb, string $locale = null)
Returns translated scalar result for given locale
at line 129
QueryBuilder
getSingleScalarResult(QueryBuilder $qb, string $locale = null)
Returns translated single scalar result for given locale
at line 142
PrimaryKeyInterface
save(PrimaryKeyInterface $entity)
Persist new entity to database
at line 171
remove(mixed $entity)
Remove entity from database
at line 197
PrimaryKeyInterface
edit(PrimaryKeyInterface $entity)
Merge entity
at line 220
QueryBuilder
getAll()
Find all entities ordered by id descending
at line 237
QueryBuilder
getByPrimaryKey(PrimaryKeyInterface $entity, mixed $param = null)
Find entity by primary key
at line 255
mixed
getById(int $id)
Find entity by id
at line 270
QueryBuilder|array
getGroupFromDB(mixed $array)
Find entities for provided array of entities
at line 295
EntityManager
getManager()
Singleton
at line 314
mixed
saveCollection(array $array)
Persist array of new entities
at line 341
protected Query
getTranslatedQuery(QueryBuilder $qb, string $locale = null)
Returns translated Doctrine query instance
at line 349
protected
startTransaction()
Begins transaction over database
at line 357
protected
commitTransaction()
Commit transaction over database
at line 365
protected
rollbackTransaction()
Rollback transaction over database
at line 374
abstract protected string
getAlias()
Alias for main entity