ProductVariantsWriteService
in package
implements
ProductVariantsWriteService
Class ProductVariantsWriteService
Interfaces, Classes and Traits
- ProductVariantsWriteService
- Interface ProductVariantsWriteService
Table of Contents
- $factory : ProductVariantFactory
- $repository : ProductVariantsRepository
- __construct() : mixed
- ProductVariantsWriteService constructor.
- createMultipleProductVariants() : ProductVariantIds
- createProductVariant() : ProductVariantId
- deleteAllProductVariantsByProductId() : void
- deleteProductVariants() : void
- storeProductVariants() : void
Properties
$factory
private
ProductVariantFactory
$factory
$repository
private
ProductVariantsRepository
$repository
Methods
__construct()
ProductVariantsWriteService constructor.
public
__construct(ProductVariantsRepository $repository, ProductVariantFactory $factory) : mixed
Parameters
- $repository : ProductVariantsRepository
- $factory : ProductVariantFactory
Return values
mixed —createMultipleProductVariants()
public
createMultipleProductVariants(array<string|int, mixed> ...$creationArguments) : ProductVariantIds
Parameters
- $creationArguments : array<string|int, mixed>
Tags
Return values
ProductVariantIds —createProductVariant()
public
createProductVariant(int $productId, OptionAndOptionValueIds $combination, int|null $imageListId, ProductCustomization $productCustomization, ProductIdentificationNumbers $productIdentificationNumbers, ProductVariantStock $stock, int $sortOrder) : ProductVariantId
Parameters
- $productId : int
- $combination : OptionAndOptionValueIds
- $imageListId : int|null
- $productCustomization : ProductCustomization
- $productIdentificationNumbers : ProductIdentificationNumbers
- $stock : ProductVariantStock
- $sortOrder : int
Tags
Return values
ProductVariantId —deleteAllProductVariantsByProductId()
public
deleteAllProductVariantsByProductId(int $productId) : void
Parameters
- $productId : int
Tags
Return values
void —deleteProductVariants()
public
deleteProductVariants(int ...$ids) : void
Parameters
- $ids : int
Tags
Return values
void —storeProductVariants()
public
storeProductVariants(ProductVariant ...$productVariants) : void
Parameters
- $productVariants : ProductVariant