10 use Magento\Catalog\Setup\CategorySetupFactory;
25 private $moduleDataSetup;
30 private $categorySetupFactory;
39 CategorySetupFactory $categorySetupFactory
41 $this->moduleDataSetup = $moduleDataSetup;
42 $this->categorySetupFactory = $categorySetupFactory;
49 public function apply()
52 $categorySetup = $this->categorySetupFactory->create([
'setup' => $this->moduleDataSetup]);
55 $categorySetup->updateAttribute(
62 $categorySetup->updateAttribute(
69 $categorySetup->addAttributeToGroup(
76 $categorySetup->addAttributeToGroup(
83 $categorySetup->addAttributeToGroup(
90 $categorySetup->addAttributeToGroup(
94 'country_of_manufacture',
99 $categorySetup->addAttributeGroup(
105 $categorySetup->updateAttributeGroup(
112 $categorySetup->addAttributeToGroup(
118 $categorySetup->addAttributeToGroup(
127 $groupId = (int)$categorySetup->getAttributeGroupByCode(
133 $categorySetup->addAttributeToGroup(
140 $categorySetup->updateAttributeGroup(
144 'attribute_group_name',
147 $categorySetup->updateAttribute(
153 $categorySetup->updateAttribute(
159 $categorySetup->updateAttribute(
162 'frontend_input_renderer',
167 $categorySetup->updateAttribute(
173 $categorySetup->updateAttribute(
175 'custom_layout_update',
182 $categorySetup->addAttributeGroup(
185 'Schedule Design Update',
188 $categorySetup->updateAttributeGroup(
191 'Schedule Design Update',
195 $categorySetup->addAttributeToGroup(
198 'Schedule Design Update',
199 'custom_design_from',
202 $categorySetup->addAttributeToGroup(
205 'Schedule Design Update',
209 $categorySetup->updateAttribute(
216 $categorySetup->addAttributeToGroup(
219 'Schedule Design Update',
222 $categorySetup->addAttribute(
227 'label' =>
'New Layout',
233 'group' =>
'Schedule Design Update',
234 'is_used_in_grid' =>
true,
235 'is_visible_in_grid' =>
false,
236 'is_filterable_in_grid' =>
false 247 UpdateMediaAttributesBackendTypes::class,
__construct(ModuleDataSetupInterface $moduleDataSetup, CategorySetupFactory $categorySetupFactory)