10 use Magento\Eav\Setup\EavSetupFactory;
25 private $moduleDataSetup;
30 private $eavSetupFactory;
39 EavSetupFactory $eavSetupFactory
41 $this->moduleDataSetup = $moduleDataSetup;
48 public function apply()
51 $eavSetup = $this->eavSetupFactory->create([
'setup' => $this->moduleDataSetup]);
53 \
Magento\Catalog\Model\Category::ENTITY,
61 'global' => \
Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_STORE,
62 'group' =>
'General Information',
67 \
Magento\Catalog\Model\Category::ENTITY,
73 'global' => \
Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_STORE,
75 'group' =>
'General Information',
79 \
Magento\Catalog\Model\Product::ENTITY,
87 'global' => \
Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_STORE,
88 'used_in_product_listing' =>
true,
89 'group' =>
'Search Engine Optimization',
90 'is_used_in_grid' =>
true,
91 'is_visible_in_grid' =>
false,
92 'is_filterable_in_grid' =>
true,
96 \
Magento\Catalog\Model\Product::ENTITY,
102 'global' => \
Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_STORE,
__construct(ModuleDataSetupInterface $moduleDataSetup, EavSetupFactory $eavSetupFactory)