ProductAttributeServiceInterface

Extends

Interface ProductAttributeServiceInterface

category

System

package

ProductModule

subpackage

Interfaces

Methods

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

addAttribute(\IdType $productId, \ProductAttributeInterface $attribute) : integer

Arguments

$productId

\IdType

Id of product entity that adds the attribute.

$attribute

\ProductAttributeInterface

Product attribute entity to add.

Response

integer

Id of inserted product attribute.

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.

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

removeAttributeById(\IdType $productAttributeId) : \ProductAttributeServiceInterface|$this

Arguments

$productAttributeId

\IdType

Id of product attribute entity that should be deleted.

Response

\ProductAttributeServiceInterface|$this

Same instance for chained method calls.

Removes product attributes by the given product id.

removeAttributesByProductId(\IdType $productId) : \ProductAttributeServiceInterface|$this

Arguments

$productId

\IdType

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

Response

\ProductAttributeServiceInterface|$this

Same instance for chained method calls.

Updates the passed product attribute entity.

updateAttribute(\StoredProductAttributeInterface $attribute) : $this|\ProductAttributeServiceInterface

Arguments

$attribute

\StoredProductAttributeInterface

Product attribute entity to update.

Response

$this|\ProductAttributeServiceInterface

Same instance for chained method calls.