AttributeRepository
class AttributeRepository extends EntityRepository
Class AttributeRepository is injected as alligator.attribute_repository service. AttributeRepository is used for crud operation for entity.
Use this class to work with database.
Traits
Constants
| ALIAS |
Alias for entity |
| ATTRIBUTE_VALUE_ALIAS |
Alias for attribute value entity |
| JOIN_WITH_ATTR_VALUE |
|
Methods
Should contain group by which jqgrid uses.
JQGrid function
JQGrid function
Returns the ORM metadata descriptor for a class.
Save multiple attributes
Remove all provided attributes
Find all attributes sorted by id in descending order
Find all attributes(with attribute values)
Find attribute(with attribute values) for provided id
Find all attributes(with attribute values) as ARRAY
Find all attributes that match provided ids
Find attribute that match provided id
Custom export
Used in csv import
Used in csv import
Used in csv import
We are controlling transaction from the manager (begin, commit) We will only rollback in case of exception
Find id and code of all attributes(used in synchronization with erp)
Retrieve reference for Attribute
Change priority of attribute entity
Find all attributes(with attribute values)
Update priority for attributes
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 70
ClassMetadata
getCategoryMetadata()
Returns the ORM metadata descriptor for a class.
at line 83
bool|string
saveMultiple(array $attributes, int $flushNumber = 30)
Save multiple attributes
at line 133
bool
remove(array $entities)
Remove all provided attributes
at line 158
array
getAll()
Find all attributes sorted by id in descending order
at line 170
array
findAllAttributesWithAttributeValues()
Find all attributes(with attribute values)
at line 189
array
findAttributeByIdWithAttributeValues(int $id)
Find attribute(with attribute values) for provided id
at line 207
array
getAllAttributesWithAttributeValueArray()
Find all attributes(with attribute values) as ARRAY
at line 223
array
getDBAttributes(array $array)
Find all attributes that match provided ids
at line 246
mixed
findOneByPk(int $id)
Find attribute that match provided id
at line 262
array
getCustomAttributeFieldsForExport(array $fields)
Custom export
at line 292
beginCustomTransaction()
Used in csv import
at line 300
rollbackCustomTransaction()
Used in csv import
at line 308
commitCustomTransaction()
Used in csv import
at line 323
mixed
saveCSV(ArrayCollection $objectList)
We are controlling transaction from the manager (begin, commit) We will only rollback in case of exception
at line 358
array
getAllAttributeErpCodes()
Find id and code of all attributes(used in synchronization with erp)
at line 374
Attribute|Proxy|null|object
getReference(int $id)
Retrieve reference for Attribute
at line 388
bool
changeOrder(int $id, int $newIndex, int $attribute)
Change priority of attribute entity
at line 425
array
findAllWithValues()
Find all attributes(with attribute values)
at line 438
bool|string
setMissingPriorities()
Update priority for attributes