Class ProductAttributeService
Class ProductAttributeService
- ProductAttributeService implements ProductAttributeServiceInterface
Package: ProductModule\Interfaces
Category: System
Located at Services/Core/ProductModule/ProductAttributeService.inc.php
Category: System
Located at Services/Core/ProductModule/ProductAttributeService.inc.php
Methods summary
public
__construct( ProductAttributeRepositoryInterface $productAttributeRepo )
Initialize the product attribute service.
public
addAttribute( IdType $productId, ProductAttributeInterface $attribute )
: integer
Adds an product attribute to a product by the given id.
public
updateAttribute( StoredProductAttributeInterface $attribute )
:
Updates the passed product attribute entity.
public
getAttributeById( IdType $productAttributeId )
: StoredProductAttributeInterface
Returns a stored product attribute entity by the given product attribute id.
public
getAttributesByProductId( IdType $productId )
: StoredProductAttributeCollection
Returns a collection with all attribute entities that belongs to a product entity by the given product id.
public
removeAttributeById( IdType $productAttributeId )
: ProductAttributeService|ProductAttributeService
Removes a product attribute entity by the given product attribute id.
public
removeAttributesByProductId( IdType $productId )
: ProductAttributeService|ProductAttributeService
Removes product attributes by the given product id.