MyTeamRepository
class MyTeamRepository extends EntityRepository implements AbstractBlockElementRepositoryInterface
Class MyTeamRepository is injected as empire_my_team_plugin.my_team_repository service. MyTeamRepository is used for crud operation for entity.
Use this class to work with database.
Traits
Constants
| MY_TEAM_CACHE_RESULTS |
|
| ALIAS |
Alias for entity |
| USER_ALIAS |
Alias for user entity |
| AGGREGATION_ALIAS |
Alias for user aggregation entity |
| IMAGE_ALIAS |
Alias for image entity |
Methods
Should contain group by which jqgrid uses.
JQGrid function
JQGrid function
Retrieve entity manager
Find team(as array) for provided id
Find one team for provided id
Find one team(with relationships) for provided id
Find one team(with relationships) for provided id
Find id, name and slug for all teams
Persist new team
Remove array of teams for provided ids
No description
Get entities from database by ids Tis method is used to for block elements extension Make sure you order data by ids - ids is array of elements and it is sorted by priority - so add this to select -> ' FIELD('.self::ALIAS.'.id'.', '.implode(', ', $ids).') AS sort_col'); - and order by this field Also make sure you cache this data -> qb->useQueryCache(true)->useResultCache(true, 3600)
Get id and name (field must be name so change it in select) of entity Used in event for block element edit Make sure you order data by ids - ids is array of elements and it is sorted by priority - so add this to select -> ' FIELD('.self::ALIAS.'.id'.', '.implode(', ', $ids).') AS sort_col'); - and order by this field
Find teams that match provided ids
delete all cached results
Details
in JQGridTrait at line 27
jQGridJoinFields(QueryBuilder $qb, JQGridWrapper $jqGridWrapper)
All joins used in select.
Override in the repository class if needed. Should do nothing otherwise
in JQGridTrait at line 42
jQGridGroupByFields(QueryBuilder $qb, JQGridWrapper $jqGridWrapper)
Should contain group by which jqgrid uses.
Override in the repository class if needed. Should do nothing otherwise
in JQGridTrait at line 61
array
findAllForJQGRID(int $page, int $offset, array $sortParams, array $additionalParams, JQGridWrapper $jqGridWrapper)
JQGrid function
in JQGridTrait at line 94
array
searchForJQGRID(array $searchParams, array $sortParams, bool $isCountSearch = false, array $additionalParams = array(), JQGridWrapper $jqGridWrapper = null)
JQGrid function
at line 65
EntityManager
getEntityManager()
Retrieve entity manager
at line 77
array
getTeamForSort(int $id)
Find team(as array) for provided id
at line 109
array
getTeamByPk(int $id)
Find one team for provided id
at line 127
array
getTeamForFrontendFromDB(int $teamId)
Find one team(with relationships) for provided id
at line 155
array
getForFrontend(string $slug)
Find one team(with relationships) for provided id
at line 174
array
getAllTeamsForFrontend()
Find id, name and slug for all teams
at line 191
mixed
getTeamForEditFromDBTemp(MyTeam $team)
Find one team(with relationships) for provided id
at line 215
mixed
saveItem(mixed $item)
Persist new team
at line 236
mixed
editItem(MyTeam $myTeam)
Update existing team
at line 257
bool
removeTeams(array $arrayOfTeams)
Remove array of teams for provided ids
at line 282
MyTeam
getReference(int $id)
at line 298
array
getEntitiesForBlockElementsExtension(array $ids)
Get entities from database by ids Tis method is used to for block elements extension Make sure you order data by ids - ids is array of elements and it is sorted by priority - so add this to select -> ' FIELD('.self::ALIAS.'.id'.', '.implode(', ', $ids).') AS sort_col'); - and order by this field Also make sure you cache this data -> qb->useQueryCache(true)->useResultCache(true, 3600)
at line 313
array
getEntityNamesForIds(array $ids)
Get id and name (field must be name so change it in select) of entity Used in event for block element edit Make sure you order data by ids - ids is array of elements and it is sorted by priority - so add this to select -> ' FIELD('.self::ALIAS.'.id'.', '.implode(', ', $ids).') AS sort_col'); - and order by this field
at line 335
array
getTeamsForBlock(array $ids)
Find teams that match provided ids
at line 358
deleteResultCaches()
delete all cached results