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

Go to the source code of this file.

Variables

 $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
 
 $entityTypeId
 
 $attributeData
 
 $attribute = $objectManager->create(\Magento\Eav\Model\Entity\Attribute::class)
 
 $salesRule = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\SalesRule\Model\Rule::class)
 

Variable Documentation

◆ $attribute

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

Definition at line 24 of file rule_custom_product_attribute.php.

◆ $attributeData

$attributeData
Initial value:
= [
'attribute_code' => 'attribute_for_sales_rule_1',
'entity_type_id' => $entityTypeId,
'backend_type' => 'varchar',
'is_required' => 1,
'is_user_defined' => 1,
'is_unique' => 0,
'is_used_for_promo_rules' => 1,
]

Definition at line 13 of file rule_custom_product_attribute.php.

◆ $entityTypeId

$entityTypeId
Initial value:
= $objectManager->create(\Magento\Eav\Model\Entity\Type::class)
->loadByCode('catalog_category')
->getId()

Definition at line 9 of file rule_custom_product_attribute.php.

◆ $objectManager

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

Definition at line 7 of file rule_custom_product_attribute.php.

◆ $salesRule

$salesRule = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\SalesRule\Model\Rule::class)

Definition at line 29 of file rule_custom_product_attribute.php.