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

Go to the source code of this file.

Variables

 $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
 
 $attributeSet = $objectManager->create(\Magento\Eav\Model\Entity\Attribute\Set::class)
 
 $entityType = $objectManager->create(\Magento\Eav\Model\Entity\Type::class)->loadByCode('catalog_product')
 
 $defaultSetId = $objectManager->create(\Magento\Catalog\Model\Product::class)->getDefaultAttributeSetid()
 
 $data
 
 $attributeData
 
 $attribute = $objectManager->create(\Magento\Catalog\Model\Entity\Attribute::class)
 

Variable Documentation

◆ $attribute

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

Definition at line 41 of file attribute_set_with_image_attribute.php.

◆ $attributeData

$attributeData
Initial value:
= [
'entity_type_id' => $entityType->getId(),
'attribute_code' => 'funny_image',
'frontend_input' => 'media_image',
'frontend_label' => 'Funny image',
'backend_type' => 'varchar',
'is_required' => 0,
'is_user_defined' => 1,
'attribute_set_id' => $attributeSet->getId(),
'attribute_group_id' => $attributeSet->getDefaultGroupId(),
]

Definition at line 28 of file attribute_set_with_image_attribute.php.

◆ $attributeSet

$attributeSet = $objectManager->create(\Magento\Eav\Model\Entity\Attribute\Set::class)

Definition at line 11 of file attribute_set_with_image_attribute.php.

◆ $data

$data
Initial value:
= [
'attribute_set_name' => 'attribute_set_with_media_attribute',
'entity_type_id' => $entityType->getId(),
'sort_order' => 200,
]

Definition at line 16 of file attribute_set_with_image_attribute.php.

◆ $defaultSetId

$defaultSetId = $objectManager->create(\Magento\Catalog\Model\Product::class)->getDefaultAttributeSetid()

Definition at line 14 of file attribute_set_with_image_attribute.php.

◆ $entityType

$entityType = $objectManager->create(\Magento\Eav\Model\Entity\Type::class)->loadByCode('catalog_product')

Definition at line 13 of file attribute_set_with_image_attribute.php.

◆ $objectManager

Definition at line 8 of file attribute_set_with_image_attribute.php.