class AttributeValueManager implements BasicEntityManagerInterface, JQGridInterface

Class AttributeValueManager is injected as alligator.attribute_value_manager service. AttributeValueManager handles the logic for managed entity.

Traits

Trait JQGridManagerTrait
Class BlockElementManagerTrait. Handles reading data for block elements

Properties

protected AttributeValueRepository $repository

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

array
getEntitiesForBlockElementsExtension(array $ids)

Get entities from database by ids

array
getEntityNamesForIds(array $ids)

Get id and name of entity

__construct(AttributeValueRepository $repository, AttributeEventContainer $eventContainer)

AttributeValueManager constructor.

bool|string
saveMultiple(array $attrValues)

Persist multiple attribute values entities

dispatchGenerateAttributeTranslation(AttributeValue $attributeValue)

Dispatch event to generate new translations

dispatchUpdateAttrTranslationSignal(AttributeValue $val, mixed $content)

Dispatch event to updated translations

array
getAllAttributeValueErpCodes()

Find id and code of all attribute values

array
getAllAttributeValuesNameAndId()

Find id and value of all attribute values

findOneById(int $id)

No description

mixed
findMultipleByErpCode(array $arrayCode)

Find all attribute values that match provided codes

bool|Proxy|null|object|AttributeValue
getReference(int $id, string $class = AttributeValue::class)

Retrieve reference for provided class(attribute value by default)

array
getAllLanguages()

Find all languages

string
translateAttributeEntities(string $value, string $locale)

Translate attribute value for provided id(used in jqgrid on edit attributes)

bool
changeOrder(int $id, int $newIndex, int $attribute)

Change order for attribute values in attribute

editValue(AttributeValue $value)

Update attribute value

updateAttributeValuesTranslations(array $content, int $attributeValueId)

Update translations for attribute

saveValue(AttributeValue $value)

Persist new attribute value

deleteValue($id, $attribute)

No description

array
findAttributeValueIdsByValues(array $values)

Find id of all attribute values that match provided names

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

array getEntitiesForBlockElementsExtension(array $ids)

Get entities from database by ids

Parameters

array $ids

Return Value

array

array getEntityNamesForIds(array $ids)

Get id and name of entity

Parameters

array $ids

Return Value

array

at line 48
__construct(AttributeValueRepository $repository, AttributeEventContainer $eventContainer)

AttributeValueManager constructor.

Parameters

AttributeValueRepository $repository
AttributeEventContainer $eventContainer

at line 63
bool|string saveMultiple(array $attrValues)

Persist multiple attribute values entities

Parameters

array $attrValues

Return Value

bool|string

Exceptions

ORMException

at line 78
dispatchGenerateAttributeTranslation(AttributeValue $attributeValue)

Dispatch event to generate new translations

Parameters

AttributeValue $attributeValue

at line 93
dispatchUpdateAttrTranslationSignal(AttributeValue $val, mixed $content)

Dispatch event to updated translations

Parameters

AttributeValue $val
mixed $content

at line 108
array getAllAttributeValueErpCodes()

Find id and code of all attribute values

Return Value

array

at line 118
array getAllAttributeValuesNameAndId()

Find id and value of all attribute values

Return Value

array

at line 128
AttributeValue|object findOneById(int $id)

Parameters

int $id

Return Value

AttributeValue|object

at line 140
mixed findMultipleByErpCode(array $arrayCode)

Find all attribute values that match provided codes

Parameters

array $arrayCode

Return Value

mixed

at line 155
bool|Proxy|null|object|AttributeValue getReference(int $id, string $class = AttributeValue::class)

Retrieve reference for provided class(attribute value by default)

Parameters

int $id
string $class

Return Value

bool|Proxy|null|object|AttributeValue

Exceptions

ORMException

at line 165
array getAllLanguages()

Find all languages

Return Value

array

at line 177
string translateAttributeEntities(string $value, string $locale)

Translate attribute value for provided id(used in jqgrid on edit attributes)

Parameters

string $value Translation key
string $locale

Return Value

string

at line 191
bool changeOrder(int $id, int $newIndex, int $attribute)

Change order for attribute values in attribute

Parameters

int $id
int $newIndex
int $attribute

Return Value

bool

at line 205
AttributeValue editValue(AttributeValue $value)

Update attribute value

Parameters

AttributeValue $value

Return Value

AttributeValue

Exceptions

ORMException

at line 223
updateAttributeValuesTranslations(array $content, int $attributeValueId)

Update translations for attribute

Parameters

array $content
int $attributeValueId

at line 238
AttributeValue saveValue(AttributeValue $value)

Persist new attribute value

Parameters

AttributeValue $value

Return Value

AttributeValue

Exceptions

ORMException

at line 254
deleteValue($id, $attribute)

Parameters

$id
$attribute

at line 269
array findAttributeValueIdsByValues(array $values)

Find id of all attribute values that match provided names

Parameters

array $values

Return Value

array