class AttributeSetManager implements BasicEntityManagerInterface, JQGridInterface

Class AttributeSetManager is injected as alligator.attribute_set_manager service. AttributeSetManager handles the logic for managed entity.

Traits

Trait JQGridManagerTrait

Properties

protected AttributeSetRepository $repository
protected AttributeSetEventContainer $eventContainer
protected ProductManager $productManager

Methods

mixed
searchForJQGRID(array $searchParams, array $sortParams = array(), array $additionalParams = array(), JQGridWrapper $jqGridWrapper = null)

No description

mixed
findAllForJQGRID(int $page, int $offset, array $sortParams, array $additionalParams = array(), JQGridWrapper $jqGridWrapper = null)

No description

mixed
getCountForJQGRID(array|null $searchParams = null, array|null $sortParams = null, array|null $additionalParams = array(), JQGridWrapper|null $jqGridWrapper = null)

No description

__construct(AttributeSetRepository $repository, AttributeSetEventContainer $eventContainer, ProductManager $productManager)

No description

array
findAllAttributes()

Find all attributes sorted by id in descending order

array
findAllAttributesWithAttributeValues()

Find all attributes(with attribute values)

AttributeSet|object|null
findAttributeSetByName(string $name)

Finds a attribute set by a name.

array
findAllAttributeSets()

Find all attribute sets

array
getAllAttributeSetErpCodes()

Find id and code of all attribute sets(Used in synchronization with erp)

array
findAllAttributeSetsForProductPage()

Find id and name of all attribute sets

array
findAllAttributeSetsWithAttributes()

Find all attribute sets(with attributes)

findAttributeSetByIdWithAttributes(int $id)

Find attribute set(with attribute and attribute values) by id

array
findAttributeSetByCategoryErpCode(int $categoryErpCode, bool $includeSubCategories = false)

Find attribute set by category erp code

array
findAttributeSet(AttributeSet $attributeSet)

Find attribute set by provided id

saveAttributeSet(AttributeSet $attributeSet)

Persist new attribute set

bool
saveAttributeSets(array $attrSetArray)

Save multiple entities

editAttributeSet(AttributeSet $attributeSet)

Update existing attribute value

bool|string
updateMultiple(array $array)

Update multiple entities

bool|string
saveMultiple(array $array)

Save multiple entities

bool
deleteAttributeSet(mixed $array)

Remove provided entities

getDBAttributeSet(AttributeSet $attributeSet)

Find attribute set by provided id

mixed
getDbProduct(int $id)

Find product by id or slug

array
findAttrSetsArray(array $array)

Finds attribute set by a id.

dispatchGenerateAttrSetTranslationSignal(mixed $attributeSet)

Dispatch event to generate attribute set translations

dispatchRemoveAttributeSetTranslations(mixed $ids)

Dispatch event to remove attribute set translations

getDBCSVAttributeSetForAttributes(string $name)

Find all attribute sets that match provided name

Details

in JQGridManagerTrait at line 26
mixed searchForJQGRID(array $searchParams, array $sortParams = array(), array $additionalParams = array(), JQGridWrapper $jqGridWrapper = null)

Parameters

array $searchParams
array $sortParams
array $additionalParams
JQGridWrapper $jqGridWrapper

Return Value

mixed

in JQGridManagerTrait at line 40
mixed findAllForJQGRID(int $page, int $offset, array $sortParams, array $additionalParams = array(), JQGridWrapper $jqGridWrapper = null)

Parameters

int $page
int $offset
array $sortParams
array $additionalParams
JQGridWrapper $jqGridWrapper

Return Value

mixed

in JQGridManagerTrait at line 53
mixed getCountForJQGRID(array|null $searchParams = null, array|null $sortParams = null, array|null $additionalParams = array(), JQGridWrapper|null $jqGridWrapper = null)

Parameters

array|null $searchParams
array|null $sortParams
array|null $additionalParams
JQGridWrapper|null $jqGridWrapper

Return Value

mixed

at line 51
__construct(AttributeSetRepository $repository, AttributeSetEventContainer $eventContainer, ProductManager $productManager)

Parameters

AttributeSetRepository $repository
AttributeSetEventContainer $eventContainer
ProductManager $productManager

at line 63
array findAllAttributes()

Find all attributes sorted by id in descending order

Return Value

array

at line 73
array findAllAttributesWithAttributeValues()

Find all attributes(with attribute values)

Return Value

array

at line 84
AttributeSet|object|null findAttributeSetByName(string $name)

Finds a attribute set by a name.

Parameters

string $name

Return Value

AttributeSet|object|null

at line 94
array findAllAttributeSets()

Find all attribute sets

Return Value

array

at line 104
array getAllAttributeSetErpCodes()

Find id and code of all attribute sets(Used in synchronization with erp)

Return Value

array

at line 114
array findAllAttributeSetsForProductPage()

Find id and name of all attribute sets

Return Value

array

at line 124
array findAllAttributeSetsWithAttributes()

Find all attribute sets(with attributes)

Return Value

array

at line 138
AttributeSet findAttributeSetByIdWithAttributes(int $id)

Find attribute set(with attribute and attribute values) by id

Parameters

int $id

Return Value

AttributeSet

Exceptions

NoResultException
NonUniqueResultException

at line 152
array findAttributeSetByCategoryErpCode(int $categoryErpCode, bool $includeSubCategories = false)

Find attribute set by category erp code

Parameters

int $categoryErpCode
bool $includeSubCategories

Return Value

array

Exceptions

DBALException

at line 166
array findAttributeSet(AttributeSet $attributeSet)

Find attribute set by provided id

Parameters

AttributeSet $attributeSet

Return Value

array

Exceptions

NoResultException
NonUniqueResultException

at line 177
AttributeSet saveAttributeSet(AttributeSet $attributeSet)

Persist new attribute set

Parameters

AttributeSet $attributeSet

Return Value

AttributeSet

at line 199
bool saveAttributeSets(array $attrSetArray)

Save multiple entities

Parameters

array $attrSetArray

Return Value

bool

Exceptions

ORMException
OptimisticLockException

at line 213
AttributeSet editAttributeSet(AttributeSet $attributeSet)

Update existing attribute value

Parameters

AttributeSet $attributeSet

Return Value

AttributeSet

Exceptions

NoResultException
NonUniqueResultException

at line 271
bool|string updateMultiple(array $array)

Update multiple entities

Parameters

array $array

Return Value

bool|string

at line 282
bool|string saveMultiple(array $array)

Save multiple entities

Parameters

array $array

Return Value

bool|string

at line 293
bool deleteAttributeSet(mixed $array)

Remove provided entities

Parameters

mixed $array

Return Value

bool

at line 307
AttributeSet getDBAttributeSet(AttributeSet $attributeSet)

Find attribute set by provided id

Parameters

AttributeSet $attributeSet

Return Value

AttributeSet

Exceptions

NoResultException
NonUniqueResultException

at line 321
mixed getDbProduct(int $id)

Find product by id or slug

Parameters

int $id

Return Value

mixed

Exceptions

NoResultException
NonUniqueResultException

at line 335
array findAttrSetsArray(array $array)

Finds attribute set by a id.

Parameters

array $array

Return Value

array

at line 344
dispatchGenerateAttrSetTranslationSignal(mixed $attributeSet)

Dispatch event to generate attribute set translations

Parameters

mixed $attributeSet

at line 353
dispatchRemoveAttributeSetTranslations(mixed $ids)

Dispatch event to remove attribute set translations

Parameters

mixed $ids

at line 371
AttributeSet getDBCSVAttributeSetForAttributes(string $name)

Find all attribute sets that match provided name

Parameters

string $name

Return Value

AttributeSet