public
|
|
public
integer
|
#
createProduct( ProductInterface $product )
Create Product
Creates a new product and returns the ID of it.
Parameters
- $product
- The product to create.
Returns
integer The ID of the created product.
Throws
InvalidArgumentException Through "linkProduct" method.
Implementation of
|
public
ProductWriteServiceInterface
|
|
public
ProductWriteServiceInterface
|
#
deleteProductById( IdType $productId )
Delete Product
Deletes a specific product, depending on the provided product ID.
Parameters
- $productId
- The product ID of the product to delete.
Returns
Implementation of
|
public
integer
|
#
duplicateProduct( IdType $productId, IdType $targetCategoryId, BoolType $duplicateAttributes = null, BoolType $duplicateSpecials = null, BoolType $duplicateCrossSelling = null )
Duplicate Product
Duplicates a product to a category.
Parameters
- $productId
- The product ID of the product to duplicate.
- $targetCategoryId
- The target category ID of the product to be duplicated to.s
- $duplicateAttributes
- Should the attributes be duplicated also?
- $duplicateSpecials
- Should the specials be duplicated also?
- $duplicateCrossSelling
- Should cross selling be duplicated also?
Returns
integer Returns the ID of the new product.
Throws
InvalidArgumentException If "$newProductId" is not an integer.
Todo
Implement the last three arguments when finished in UML.
Implementation of
|
public
ProductWriteService
|
#
linkProduct( IdType $productId, IdType $targetCategoryId )
Link Product
Links a product to a category.
Parameters
- $productId
- The product ID of the product to link.
- $targetCategoryId
- The target category ID, of the category to be linked to.
Returns
Implementation of
|
public
ProductWriteService
|
#
changeProductLink( IdType $productId, IdType $currentCategoryId, IdType $newCategoryId )
Changes the category link of a product.
Changes the category link of a product.
Parameters
- $productId
- The product ID of the product to move.
- $currentCategoryId
- Old category ID of the product.
- $newCategoryId
- New category ID of the product.
Returns
Implementation of
|
public
ProductWriteService
|
#
deleteProductLink( IdType $productId, IdType $categoryId )
Removes a category link from a product by the given product id.
Removes a category link from a product by the given product id.
Parameters
- $productId
- Id of the product.
- $categoryId
- Id of category from where the product is link is to delete.
Returns
Implementation of
|
public
string
|
#
importProductImageFile( ExistingFile $sourceFile, FilenameStringType $preferredFilename )
Import Product Image File
Import Product Image File
Imports an image for the product.
Parameters
- $sourceFile
- The existing file to import.
- $preferredFilename
- The preferred filename.
Returns
string The new filename.
Throws
InvalidArgumentException If the provided source file or the preferred filename is not valid.
Implementation of
|
public
ProductWriteService
|
#
renameProductImage( FilenameStringType $oldName, FilenameStringType $newName )
Rename Product Image File
Rename Product Image File
Renames a product image file.
Parameters
- $oldName
- The old name of the product image file.
- $newName
- The new name of the product image file.
Returns
Throws
InvalidArgumentException If the provided old name or new name is not valid.
Implementation of
|
public
ProductWriteService
|
#
deleteProductImage( FilenameStringType $filename )
Delete Product Image
Deletes a product image.
Parameters
- $filename
- The filename of the product image to delete.
Returns
Implementation of
|
public
ProductWriteService
|
|
public
ProductWriteService
|
#
deleteProductLinks( IdType $productId )
Removes all category links from a product by given product ID.
Removes all category links from a product by given product ID.
Parameters
- $productId
- ID of product.
Returns
Implementation of
|
protected
ProductImageInterface
|
#
duplicateProductImage( ProductImageInterface $sourceProductImage )
Duplicates a given Product Image and set the properties accordingly to the provided Source Product Image
Duplicates a given Product Image and set the properties accordingly to the provided Source Product Image
Parameters
- $sourceProductImage
- The Product Image to duplicate.
Returns
|