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

Go to the source code of this file.

Variables

 $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
 
 $productRepository = $objectManager->create(\Magento\Catalog\Api\ProductRepositoryInterface::class)
 
 $installer = $objectManager->create(\Magento\Catalog\Setup\CategorySetup::class)
 
 $entityModel = $objectManager->create(\Magento\Eav\Model\Entity::class)
 
 $attributeSetId = $installer->getAttributeSetId('catalog_product', 'Default')
 
 $entityTypeId = $entityModel->setType(\Magento\Catalog\Model\Product::ENTITY)->getTypeId()
 
 $groupId = $installer->getDefaultAttributeGroupId($entityTypeId, $attributeSetId)
 
 $attribute = $objectManager->create(\Magento\Catalog\Model\ResourceModel\Eav\Attribute::class)
 
 $product = $productRepository->get('simple', true)
 

Variable Documentation

◆ $attribute

$attribute = $objectManager->create(\Magento\Catalog\Model\ResourceModel\Eav\Attribute::class)

Definition at line 23 of file product_simple_with_custom_attribute.php.

◆ $attributeSetId

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

Definition at line 18 of file product_simple_with_custom_attribute.php.

◆ $entityModel

$entityModel = $objectManager->create(\Magento\Eav\Model\Entity::class)

Definition at line 17 of file product_simple_with_custom_attribute.php.

◆ $entityTypeId

$entityTypeId = $entityModel->setType(\Magento\Catalog\Model\Product::ENTITY)->getTypeId()

Definition at line 19 of file product_simple_with_custom_attribute.php.

◆ $groupId

$groupId = $installer->getDefaultAttributeGroupId($entityTypeId, $attributeSetId)

Definition at line 20 of file product_simple_with_custom_attribute.php.

◆ $installer

$installer = $objectManager->create(\Magento\Catalog\Setup\CategorySetup::class)

Definition at line 16 of file product_simple_with_custom_attribute.php.

◆ $objectManager

Definition at line 10 of file product_simple_with_custom_attribute.php.

◆ $product

$product = $productRepository->get('simple', true)

Definition at line 42 of file product_simple_with_custom_attribute.php.

◆ $productRepository

$productRepository = $objectManager->create(\Magento\Catalog\Api\ProductRepositoryInterface::class)

Definition at line 13 of file product_simple_with_custom_attribute.php.