Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Variables
product_configurable_sku.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()
 
 $registry = Bootstrap::getObjectManager()->get(\Magento\Framework\Registry::class)
 
 try
 
 $itemResource = Bootstrap::getObjectManager()->get(\Magento\Quote\Model\ResourceModel\Quote\Item::class)
 
 $categoryLinkManagement
 

Variable Documentation

◆ $associatedProductIds

$associatedProductIds = []

Definition at line 35 of file product_configurable_sku.php.

◆ $attributeSetId

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

Definition at line 34 of file product_configurable_sku.php.

◆ $attributeValues

$attributeValues = []

Definition at line 33 of file product_configurable_sku.php.

◆ $categoryLinkManagement

$categoryLinkManagement
Initial value:
->create(\Magento\Catalog\Api\CategoryLinkManagementInterface::class)

Definition at line 135 of file product_configurable_sku.php.

◆ $configurableAttributesData

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

Definition at line 84 of file product_configurable_sku.php.

◆ $configurableOptions

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

Definition at line 94 of file product_configurable_sku.php.

◆ $extensionConfigurableAttributes

$extensionConfigurableAttributes = $product->getExtensionAttributes()

Definition at line 96 of file product_configurable_sku.php.

◆ $installer

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

Definition at line 27 of file product_configurable_sku.php.

◆ $itemResource

$itemResource = Bootstrap::getObjectManager()->get(\Magento\Quote\Model\ResourceModel\Quote\Item::class)

Definition at line 112 of file product_configurable_sku.php.

◆ $options

$options = $attribute->getOptions()

Definition at line 31 of file product_configurable_sku.php.

◆ $optionsFactory

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

Definition at line 82 of file product_configurable_sku.php.

◆ $product

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

Definition at line 79 of file product_configurable_sku.php.

◆ $productIds

$productIds = [10, 20]

Definition at line 36 of file product_configurable_sku.php.

◆ $productRepository

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

Definition at line 23 of file product_configurable_sku.php.

◆ $registry

$registry = Bootstrap::getObjectManager()->get(\Magento\Framework\Registry::class)

Definition at line 104 of file product_configurable_sku.php.

◆ try

try
Initial value:
{
$productToDelete = $productRepository->getById(1)

Definition at line 107 of file product_configurable_sku.php.