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

Go to the source code of this file.

Variables

 $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
 
 $entityType = $objectManager->create(\Magento\Eav\Model\Entity\Type::class)
 
 $entityTypeId = $entityType->getId()
 
 $attributeSet = $objectManager->create(\Magento\Eav\Model\Entity\Attribute\Set::class)
 
 $attributeSetId = $attributeSet->getId()
 
 $attributeGroupId = $attributeSet->getDefaultGroupId($entityType->getDefaultAttributeSetId())
 
 $attributeData
 

Variable Documentation

◆ $attributeData

$attributeData
Initial value:
= [
[
'attribute_code' => 'test_attribute',
'entity_type_id' => $entityTypeId,
'backend_type' => 'varchar',
'is_required' => 1,
'is_user_defined' => 1,
'is_unique' => 0,
'attribute_set_id' => $attributeSetId,
'attribute_group_id' => $attributeGroupId,
],
]
$attributeGroupId
$entityTypeId
$attributeSetId

Definition at line 21 of file custom_attributes.php.

◆ $attributeGroupId

$attributeGroupId = $attributeSet->getDefaultGroupId($entityType->getDefaultAttributeSetId())

Definition at line 19 of file custom_attributes.php.

◆ $attributeSet

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

Definition at line 15 of file custom_attributes.php.

◆ $attributeSetId

$attributeSetId = $attributeSet->getId()

Definition at line 17 of file custom_attributes.php.

◆ $entityType

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

Definition at line 10 of file custom_attributes.php.

◆ $entityTypeId

$entityTypeId = $entityType->getId()

Definition at line 12 of file custom_attributes.php.

◆ $objectManager

Copyright © Magento, Inc. All rights reserved. See COPYING.txt for license details.

Definition at line 7 of file custom_attributes.php.