Log in
Model

Type

Magento\Catalog\Model\Product\Type

What it does

This class serves as a factory and registry for all product types in Magento 2 (simple, bundle, virtual, etc.).

Developers use it to get product type instances, price models, and product type metadata like labels and configurations.

It's commonly used when working with products programmatically to determine type-specific behavior or generate product type dropdowns in forms.

Public Methods

  • _resetState()
  • factory()
  • priceFactory()
  • getPriceInfo()
  • getOptionArray()
  • getAllOption()
  • getAllOptions()
  • getOptions()
  • getOptionText()
  • getTypes()
  • getCompositeTypes()
  • getTypesByPriority()
  • toOptionArray()