EntityRelationshipRepository
class EntityRelationshipRepository extends EntityRepository
Class EntityRelationshipRepository is injected as empire_entity_relationship_plugin.repository service. EntityRelationshipRepository is used for crud operation for entity.
Use this class to work with database.
Traits
Constants
| ALIAS |
Alias for main entity |
| ENTITY_ALIAS |
Generic entity alias |
Methods
Should contain group by which jqgrid uses.
JQGrid function
JQGrid function
Delete multiple PrimaryKeyInterface entities by array of ids
Delete multiple PrimaryKeyInterface entities by values of field
Get reference to class
Save multiple entities
Edit multiple entities
Delete multiple enities
Get all entities that implement RelationshipEntityInterface
Get all properties of specified class
Search specified class
Get all specified elements
Check if relationship can be added. One relationship name can only be used in one combination of main and sub entities
Get all distinct relationship names
Get data for relationship based on title and ids
Get all data from database
Get ids of class for specified array of params
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
in BaseRepositoryTrait at line 27
PrimaryKeyInterface
save(PrimaryKeyInterface $object)
Save PrimaryKeyInterface entity
in BaseRepositoryTrait at line 48
PrimaryKeyInterface
edit(PrimaryKeyInterface $object)
Edit PrimaryKeyInterface entity
in BaseRepositoryTrait at line 69
bool
remove(PrimaryKeyInterface $object)
Delete PrimaryKeyInterface entity
in BaseRepositoryTrait at line 88
boolean
deleteMultipleByIds(array $ids)
Delete multiple PrimaryKeyInterface entities by array of ids
in BaseRepositoryTrait at line 101
boolean|string
deleteMultipleByField(string $field, array $values)
Delete multiple PrimaryKeyInterface entities by values of field
in BaseRepositoryTrait at line 130
mixed
getReference(int $id, string|null $class = null)
Get reference to class
in BaseRepositoryTrait at line 143
bool|string
saveMultiple(array $elements, int $flushNumber = 30)
Save multiple entities
in BaseRepositoryTrait at line 178
bool|string
updateMultiple(array $elements, int $flushNumber = 30)
Edit multiple entities
in BaseRepositoryTrait at line 213
bool|string
deleteMultiple(array $elements, int $flushNumber = 30)
Delete multiple enities
at line 53
array
getAllEntities()
Get all entities that implement RelationshipEntityInterface
at line 77
array
getPropertiesForClass(string $class)
Get all properties of specified class
at line 105
array
searchEntity(string $class, string $field, string $view, string $query, int $page = 1, int $offset = 10)
Search specified class
at line 138
array
selectEntity(string $class, string $view, array $ids)
Get all specified elements
at line 162
bool
checkEntityTypesCombination(EntityRelationship $relationship)
Check if relationship can be added. One relationship name can only be used in one combination of main and sub entities
at line 179
array
getEntityRelationshipNames()
Get all distinct relationship names
at line 199
array
getRelationshipData(string $title, array $ids, bool $includeIdsFromSubEntities = false, bool $strictNameCheck = true)
Get data for relationship based on title and ids
at line 253
array
getFromDB(array $data, array $dataForJoin = [])
Get all data from database
at line 285
string|array
getEntityDataForParams(string $class, array $paramBag, bool $selectIdsOnly = false)
Get ids of class for specified array of params