Class ProductWriteService
Class ProductWriteService
- ProductWriteService implements ProductWriteServiceInterface
Methods summary
public
__construct( ProductRepositoryInterface $productRepo, AbstractFileStorage $productImageStorage, ProductCategoryLinkerInterface $productLinker, ProductImagePathsSettingsInterface $envProductImagePathsSettings, LanguageProviderInterface $languageProvider, UrlKeywordsRepairerInterface $urlKeywordsRepairer )
ProductWriteService constructor.
public
updateProduct( StoredProductInterface $product )
: ProductWriteServiceInterface
Update Product
public
duplicateProduct( IdType $productId, IdType $targetCategoryId, BoolType $duplicateAttributes = null, BoolType $duplicateSpecials = null, BoolType $duplicateCrossSelling = null )
: integer
Duplicate Product
public
linkProduct( IdType $productId, IdType $targetCategoryId )
: ProductWriteService
Link Product
public
unlinkProduct( IdType $productId, IdCollection $categoryIds )
: ProductWriteServiceInterface|ProductWriteService
Unlink a product. Deletes the product if all category links are removed.
public
changeProductLink( IdType $productId, IdType $currentCategoryId, IdType $newCategoryId )
: ProductWriteService
Changes the category link of a product.
public
deleteProductLink( IdType $productId, IdType $categoryId )
: ProductWriteService
Removes a category link from a product by the given product id.
public
importProductImageFile( ExistingFile $sourceFile, FilenameStringType $preferredFilename )
: string
Import Product Image File
public
renameProductImage( FilenameStringType $oldName, FilenameStringType $newName )
: ProductWriteService
Rename Product Image File
public
deleteProductImage( FilenameStringType $filename )
: ProductWriteService
Delete Product Image
public
processProductImage( FilenameStringType $productImage )
: ProductWriteService
Processes an image for the front end.
public
deleteProductLinks( IdType $productId )
: ProductWriteService
Removes all category links from a product by given product ID.
protected
duplicateProductImage( ProductImageInterface $sourceProductImage )
: ProductImageInterface
Duplicates a given Product Image and set the properties accordingly to the provided Source Product Image
Properties summary
protected
$envProductImagePathsSettings
: ProductImagePathsSettingsInterface
EnvProductImagePathsSettings.
protected
$urlKeywordsRepairer
: UrlKeywordsRepairerInterface
Used for writing and repairing product's url keywords