AttributeManager
class AttributeManager implements BasicEntityManagerInterface, CSVManagerInterface, JQGridInterface
Class AttributeManager is injected as alligator.attribute_manager service. AttributeManager handles the logic for managed entity.
Traits
Properties
| protected AttributeRepository | $repository |
Methods
No description
No description
No description
AttributeManager constructor.
Save multiple 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
Retrieve fields for attribute class
We want to save name of category/attribute_set first, then we will call method importFromCsv
Converts to appropriate entities and persists to database
Retrieve new attribute entity
Get entities data and export to CSV file
Export attribute to csv
Persist entities to database
Retrieve attributes with custom fields
Remove attributes that match provided ids and dispatch event to remove translations
Find all attributes that match provided ids
Finds a single attribute by a set of criteria.
Dispatch event to generate translations for entity
Signal event to update search options on product
Dispatch event to re-cache product groups
Find id and code of all attributes(used in synchronization with erp)
Retrieve reference for Attribute
Change priority of attribute entity
Update priority for attributes
Find all attributes(with attribute values)
Details
in JQGridManagerTrait at line 26
mixed
searchForJQGRID(array $searchParams, array $sortParams = array(), array $additionalParams = array(), JQGridWrapper $jqGridWrapper = null)
in JQGridManagerTrait at line 40
mixed
findAllForJQGRID(int $page, int $offset, array $sortParams, array $additionalParams = array(), JQGridWrapper $jqGridWrapper = null)
in JQGridManagerTrait at line 53
mixed
getCountForJQGRID(array|null $searchParams = null, array|null $sortParams = null, array|null $additionalParams = array(), JQGridWrapper|null $jqGridWrapper = null)
at line 55
__construct(AttributeRepository $repository, AttributeEventContainer $eventContainer)
AttributeManager constructor.
at line 91
mixed
saveMultipleWithoutValues(array $attributes, int $batch = 100)
Save multiple attributes
at line 101
array
findAllAttributes()
Find all attributes sorted by id in descending order
at line 111
array
findAllAttributesWithAttributeValues()
Find all attributes(with attribute values)
at line 126
array
findAttributeByIdWithAttributeValues(int $id)
Find attribute(with attribute values) for provided id
at line 136
array
getAllAttributesWithAttributeValueArray()
Find all attributes(with attribute values) as ARRAY
at line 146
array
getAttributesFieldsFromMetadata()
Retrieve fields for attribute class
at line 193
array
importFromCSVWithFileName(String $base64, String $locale, String $fileName)
We want to save name of category/attribute_set first, then we will call method importFromCsv
at line 203
mixed
importFromCSV(mixed $base64Content, mixed $locale)
Converts to appropriate entities and persists to database
at line 213
CSVEntityInterface
getEntityObject()
Retrieve new attribute entity
at line 221
mixed|void
exportToCSV()
Get entities data and export to CSV file
at line 233
mixed|void
exportCustom(array $data)
Export attribute to csv
at line 241
mixed
saveObjectsFromCSV(ArrayCollection $objectList, array $csvRow, array $entityCSVHeaders, array $propertyMappings = array())
Persist entities to database
at line 333
mixed
getCustomAttributeFieldsForExport(array $fields)
Retrieve attributes with custom fields
at line 360
bool
deleteAttribute(array $array)
Remove attributes that match provided ids and dispatch event to remove translations
at line 387
array
findAttributes(array $array)
Find all attributes that match provided ids
at line 399
Attribute|object|null
findAttributeByName(string $code)
Finds a single attribute by a set of criteria.
at line 424
dispatchGenerateAttrTranslationSignal(Attribute $attribute)
Dispatch event to generate translations for entity
at line 434
dispatchAttributeChange(int $id)
Signal event to update search options on product
at line 444
dispatchProductGroupUpdate(array $attrIds)
Dispatch event to re-cache product groups
at line 454
array
getAllAttributeErpCodes()
Find id and code of all attributes(used in synchronization with erp)
at line 468
bool|Proxy|null|object
getReference(int $id)
Retrieve reference for Attribute
at line 482
bool
changeOrder(int $id, int $newIndex, int $attribute)
Change priority of attribute entity
at line 492
bool|string
setMissingPriorities()
Update priority for attributes
at line 502
array
findAllWithValues()
Find all attributes(with attribute values)