Log in
Factory

CopyConstructorFactory

Magento\Catalog\Model\Product\CopyConstructorFactory

What it does

This factory class creates instances of product copy constructors that implement CopyConstructorInterface.

Developers use it when they need to duplicate products in Magento 2, as it provides a flexible way to instantiate different copy constructor implementations while ensuring type safety through validation.

The factory pattern allows for easy extension and customization of product duplication behavior.

Public Methods

  • create()