moduleDataSetup = $moduleDataSetup; $this->eavSetupFactory = $eavSetupFactory; } /** * @inheritdoc */ public function apply() { /** @var EavSetup $eavSetup */ $this->moduleDataSetup->getConnection()->startSetup(); $eavSetup = $this->eavSetupFactory->create(['setup' => $this->moduleDataSetup]); $eavSetup->removeAttribute(\Magento\Catalog\Model\Product::ENTITY, 'bynder_multi_img'); $eavSetup->addAttribute(\Magento\Catalog\Model\Product::ENTITY, 'bynder_multi_img', [ 'group' => 'Product Details', 'type' => 'text', 'sort_order' => 200, 'backend' => '', 'frontend' => '', 'label' => 'BynderDAM Image and Video', 'input' => 'textarea', 'class' => '', 'source' => '', 'global' => \Magento\Catalog\Model\ResourceModel\Eav\Attribute::SCOPE_GLOBAL, 'visible' => true, 'required' => false, 'user_defined' => false, 'default' => '', 'searchable' => false, 'filterable' => false, 'comparable' => false, 'visible_on_front' => false, 'used_in_product_listing' => true, 'unique' => false, 'apply_to' => '' ]); $eavSetup->removeAttribute(\Magento\Catalog\Model\Product::ENTITY, 'bynder_document'); $eavSetup->addAttribute(\Magento\Catalog\Model\Product::ENTITY, 'bynder_document', [ 'group' => 'Product Details', 'type' => 'text', 'backend' => '', 'frontend' => '', 'sort_order' => 210, 'label' => 'BynderDAM Document', 'input' => 'textarea', 'class' => '', 'source' => '', 'global' => \Magento\Catalog\Model\ResourceModel\Eav\Attribute::SCOPE_GLOBAL, 'visible' => true, 'required' => false, 'user_defined' => false, 'default' => '', 'searchable' => false, 'filterable' => false, 'comparable' => false, 'visible_on_front' => false, 'used_in_product_listing' => true, 'apply_to' => '' ]); $eavSetup->removeAttribute(\Magento\Catalog\Model\Product::ENTITY, 'use_bynder_both_image'); $eavSetup->addAttribute(\Magento\Catalog\Model\Product::ENTITY, 'use_bynder_both_image', [ 'group' => 'Product Details', 'type' => 'int', 'sort_order' => 230, 'backend' => '', 'frontend' => '', 'label' => 'Use BynderDAM Image as well as Local Folder Image', 'input' => 'boolean', 'class' => '', 'source' => \Magento\Eav\Model\Entity\Attribute\Source\Boolean::class, 'global' => \Magento\Catalog\Model\ResourceModel\Eav\Attribute::SCOPE_GLOBAL, 'visible' => true, 'required' => false, 'user_defined' => false, 'user_defined' => true, 'default' => '', 'searchable' => false, 'filterable' => false, 'comparable' => false, 'visible_on_front' => false, 'used_in_product_listing' => true, 'unique' => false, 'apply_to' => '' /* 'attribute_set_id' => '4' */ ]); $eavSetup->removeAttribute(\Magento\Catalog\Model\Product::ENTITY, 'bynder_image_import'); $eavSetup->removeAttribute(\Magento\Catalog\Model\Product::ENTITY, 'use_bynder_cdn'); $eavSetup->addAttribute(\Magento\Catalog\Model\Product::ENTITY, 'use_bynder_cdn', [ 'group' => 'Product Details', 'type' => 'int', 'sort_order' => 250, 'backend' => '', 'frontend' => '', 'label' => 'Use only BynderDAM Image on Front side', 'input' => 'boolean', 'class' => '', 'source' => \Magento\Eav\Model\Entity\Attribute\Source\Boolean::class, 'global' => \Magento\Catalog\Model\ResourceModel\Eav\Attribute::SCOPE_GLOBAL, 'visible' => true, 'required' => false, 'user_defined' => false, 'user_defined' => true, 'default' => 1, 'default_value' => '1', 'searchable' => false, 'filterable' => false, 'comparable' => false, 'visible_on_front' => false, 'used_in_product_listing' => true, 'unique' => false, 'apply_to' => '' /* 'attribute_set_id' => '4' */ ]); $eavSetup->removeAttribute(\Magento\Catalog\Model\Product::ENTITY, 'bynder_isMain'); $eavSetup->addAttribute(\Magento\Catalog\Model\Product::ENTITY, 'bynder_isMain', [ 'group' => 'Product Details', 'type' => 'text', 'backend' => '', 'frontend' => '', 'sort_order' => 220, 'label' => 'Only BynderDAM isMain', 'input' => 'text', 'class' => '', 'global' => \Magento\Catalog\Model\ResourceModel\Eav\Attribute::SCOPE_GLOBAL, 'visible' => true, 'required' => false, 'user_defined' => false, 'default' => '', 'searchable' => false, 'filterable' => false, 'comparable' => false, 'unique' => false, 'visible_on_front' => false, 'used_in_product_listing' => true, 'apply_to' => '' ]); $this->moduleDataSetup->getConnection()->endSetup(); } /** * @inheritdoc */ public static function getDependencies() { return []; } /** * @inheritdoc */ public function getAliases() { return []; } }