Interface ProductCategoryLinkerInterface
Interface ProductCategoryLinkerInterface
Methods summary
public
|
#
linkProduct( IdType $productId, IdType $targetCategoryId )
Links a product to a category.
Links a product to a category.
Parameters
- $productId
- Product ID.
- $targetCategoryId
- Target category ID.
Returns
$this|ProductCategoryLinkerInterface Same instance for chained method calls.
|
public
|
#
changeProductLink( IdType $productId, IdType $currentCategoryId, IdType $newCategoryId )
Changes a link to a new category.
Changes a link to a new category.
Parameters
- $productId
- Product ID.
- $currentCategoryId
- Category ID which the product is linked to.
- $newCategoryId
- New category to be linked to.
Returns
$this|ProductCategoryLinkerInterface Same instance for chained method calls.
|
public
|
#
deleteProductLink( IdType $productId, IdType $categoryId )
Removes a link to a category.
Removes a link to a category.
Parameters
- $productId
- Product ID.
- $categoryId
- Category ID which the link should be removed to.
Returns
$this|ProductCategoryLinkerInterface Same instance for chained method calls.
|
public
|
#
deleteProductLinks( IdType $productId )
Removes all links from a product.
Removes all links from a product.
Parameters
Returns
$this|ProductCategoryLinkerInterface Same instance for chained method calls.
|
public
IdCollection
|
#
getProductLinks( IdType $productId )
Returns the category Ids which are linked with given product id.
Returns the category Ids which are linked with given product id.
Parameters
Returns
|
public
ProductRepositoryInterface|ProductCategoryLinkerInterface
|
|
public
ProductRepositoryInterface|ProductCategoryLinkerInterface
|
|