为Magento 2创建安装脚本时,哪些类型的值可用于类型和输入部分eavSetup->addAttribute()
?或者我可以在哪里找到答案?
$eavSetup->addAttribute(
\Magento\Catalog\Model\Product::ENTITY,
'some_attr',
[
'type' => '',
'backend' => '',
'frontend' => '',
'label' => 'Test Attribute',
'input' => '',
'class' => '',
'source' => '',
'global' => \Magento\Catalog\Model\Resource\Eav\Attribute::SCOPE_GLOBAL,
'visible' => true,
'required' => false,
'user_defined' => false,
'default' => 0,
'searchable' => false,
'filterable' => false,
'comparable' => false,
'visible_on_front' => false,
'used_in_product_listing' => true,
'unique' => false,
'apply_to' => ''
]
);