Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Variables
default_stock_configurable_products.php File Reference

Go to the source code of this file.

Variables

 $productRepository
 
 $installer = Bootstrap::getObjectManager()->create(CategorySetup::class)
 
 $options = $attribute->getOptions()
 
 $attributeValues = []
 
 $attributeSetId = $installer->getAttributeSetId('catalog_product', 'Default')
 
 $associatedProductIds = []
 
 $productIds = [10, 20]
 
 $product = Bootstrap::getObjectManager()->create(Product::class)
 
 $optionsFactory = Bootstrap::getObjectManager()->create(Factory::class)
 
 $configurableAttributesData
 
 $configurableOptions = $optionsFactory->create($configurableAttributesData)
 
 $extensionConfigurableAttributes = $product->getExtensionAttributes()
 

Variable Documentation

◆ $associatedProductIds

$associatedProductIds = []

Definition at line 37 of file default_stock_configurable_products.php.

◆ $attributeSetId

$attributeSetId = $installer->getAttributeSetId('catalog_product', 'Default')

Definition at line 36 of file default_stock_configurable_products.php.

◆ $attributeValues

$attributeValues = []

Definition at line 35 of file default_stock_configurable_products.php.

◆ $configurableAttributesData

$configurableAttributesData
Initial value:
= [
[
'attribute_id' => $attribute->getId(),
'code' => $attribute->getAttributeCode(),
'label' => $attribute->getStoreLabel(),
'position' => '0',
'values' => $attributeValues,
],
]

Definition at line 70 of file default_stock_configurable_products.php.

◆ $configurableOptions

$configurableOptions = $optionsFactory->create($configurableAttributesData)

Definition at line 79 of file default_stock_configurable_products.php.

◆ $extensionConfigurableAttributes

$extensionConfigurableAttributes = $product->getExtensionAttributes()

Definition at line 80 of file default_stock_configurable_products.php.

◆ $installer

$installer = Bootstrap::getObjectManager()->create(CategorySetup::class)

Definition at line 29 of file default_stock_configurable_products.php.

◆ $options

$options = $attribute->getOptions()

Definition at line 33 of file default_stock_configurable_products.php.

◆ $optionsFactory

$optionsFactory = Bootstrap::getObjectManager()->create(Factory::class)

Definition at line 69 of file default_stock_configurable_products.php.

◆ $product

$product = Bootstrap::getObjectManager()->create(Product::class)

Definition at line 67 of file default_stock_configurable_products.php.

◆ $productIds

$productIds = [10, 20]

Definition at line 38 of file default_stock_configurable_products.php.

◆ $productRepository

$productRepository
Initial value:
= Bootstrap::getObjectManager()
->get(ProductRepositoryInterface::class)

Definition at line 25 of file default_stock_configurable_products.php.