ProductAttributeRepositoryInterface

Extends

Interface ProductAttributeRepositoryInterface

category

System

package

ProductModule

subpackage

Interface

Methods

Adds an product attribute to a product by the given id.

addToProduct(\IdType $productId, \ProductAttributeInterface $productAttribute) : integer

Arguments

$productId

\IdType

Id of product entity that adds the attribute.

$productAttribute

\ProductAttributeInterface

Product attribute entity to add.

Response

integer

Id of added product attribute entity.

Removes a product attribute entity by the given product attribute id.

deleteAttributeById(\IdType $productAttributeId) : \ProductAttributeRepositoryInterface|$this

Arguments

$productAttributeId

\IdType

Id of product attribute entity that should be deleted.

Response

\ProductAttributeRepositoryInterface|$this

Same instance for chained method calls.

Removes product attributes by the given product id.

deleteAttributesByProductId(\IdType $productId) : \ProductAttributeRepositoryInterface|$this

Arguments

$productId

\IdType

Id of product entity of the attributes that should be deleted.

Response

\ProductAttributeRepositoryInterface|$this

Same instance for chained method calls.

Returns a stored product attribute entity by the given product attribute id.

getAttributeById(\IdType $productAttributeId) : \StoredProductAttributeInterface

Arguments

$productAttributeId

\IdType

Id of expected product attribute entity.

Response

\StoredProductAttributeInterface

Expected stored product attribute entity.

Returns a collection with all attribute entities that belongs to a product entity by the given product id.

getAttributesByProductId(\IdType $productId) : \StoredProductAttributeCollection

Arguments

$productId

\IdType

Id of product entity that contain the expected attributes.

Response

\StoredProductAttributeCollection

Collection with all attributes that belongs to the product.

Stores/Updates the passed product attribute entity.

store(\StoredProductAttributeInterface $productAttribute) : \ProductAttributeRepositoryInterface|$this

Arguments

$productAttribute

\StoredProductAttributeInterface

Product attribute entity to store.

Response

\ProductAttributeRepositoryInterface|$this

Same instance for chained method calls.