Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
__construct (\Magento\Catalog\Model\ProductTypes\ConfigInterface $config, \Magento\Catalog\Model\Product\Type\Pool $productTypePool, \Magento\Catalog\Model\Product\Type\Price\Factory $priceFactory, \Magento\Framework\Pricing\PriceInfo\Factory $priceInfoFactory) | |
factory ($product) | |
priceFactory ($productType) | |
getPriceInfo (Product $saleableItem) | |
getOptionArray () | |
getAllOption () | |
getAllOptions () | |
getOptions () | |
getOptionText ($optionId) | |
getTypes () | |
getCompositeTypes () | |
getTypesByPriority () | |
toOptionArray () | |
Data Fields | |
const | TYPE_SIMPLE = 'simple' |
const | TYPE_BUNDLE = 'bundle' |
const | TYPE_VIRTUAL = 'virtual' |
const | DEFAULT_TYPE = 'simple' |
const | DEFAULT_TYPE_MODEL = \Magento\Catalog\Model\Product\Type\Simple::class |
const | DEFAULT_PRICE_MODEL = \Magento\Catalog\Model\Product\Type\Price::class |
Protected Attributes | |
$_config | |
$_types | |
$_compositeTypes | |
$_priceModels | |
$_typesPriority | |
$_productTypePool | |
$_priceFactory | |
$_priceInfoFactory | |
__construct | ( | \Magento\Catalog\Model\ProductTypes\ConfigInterface | $config, |
\Magento\Catalog\Model\Product\Type\Pool | $productTypePool, | ||
\Magento\Catalog\Model\Product\Type\Price\Factory | $priceFactory, | ||
\Magento\Framework\Pricing\PriceInfo\Factory | $priceInfoFactory | ||
) |
Construct
\Magento\Catalog\Model\ProductTypes\ConfigInterface | $config | |
\Magento\Catalog\Model\Product\Type\Pool | $productTypePool | |
\Magento\Catalog\Model\Product\Type\Price\Factory | $priceFactory | |
\Magento\Framework\Pricing\PriceInfo\Factory | $priceInfoFactory |
Definition at line 104 of file Type.php.
factory | ( | $product | ) |
Factory to product singleton product type instances
\Magento\Catalog\Model\Product | $product |
Definition at line 122 of file Type.php.
getAllOption | ( | ) |
getAllOptions | ( | ) |
getCompositeTypes | ( | ) |
getOptionArray | ( | ) |
getOptions | ( | ) |
getOptionText | ( | $optionId | ) |
getPriceInfo | ( | Product | $saleableItem | ) |
getTypesByPriority | ( | ) |
priceFactory | ( | $productType | ) |
Product type price model factory
string | $productType |
Definition at line 145 of file Type.php.
toOptionArray | ( | ) |
{Return array of options as value-label pairs
', 'label' => '<label>'), ...)}
Implements OptionSourceInterface.
Definition at line 312 of file Type.php.
const DEFAULT_PRICE_MODEL = \Magento\Catalog\Model\Product\Type\Price::class |
const DEFAULT_TYPE_MODEL = \Magento\Catalog\Model\Product\Type\Simple::class |