13 use Magento\Catalog\Block\Adminhtml\Product\Helper\Form\BaseImage;
24 use Magento\Catalog\Model\CategoryFactory;
48 use Magento\Eav\Model\ResourceModel\Entity\Attribute\Group\CollectionFactory;
66 private $categoryFactory;
91 CollectionFactory $attrGroupCollectionFactory,
92 CategoryFactory $categoryFactory
94 $this->categoryFactory = $categoryFactory;
95 parent::__construct(
$setup, $context,
$cache, $attrGroupCollectionFactory);
107 return $this->categoryFactory->create(
$data);
119 'catalog_category' => [
121 'entity_model' => Category::class,
122 'attribute_model' => Attribute::class,
123 'table' =>
'catalog_category_entity',
124 'additional_attribute_table' =>
'catalog_eav_attribute',
125 'entity_attribute_collection' =>
134 'group' =>
'General Information',
138 'label' =>
'Is Active',
140 'source' => Boolean::class,
143 'group' =>
'General Information',
147 'label' =>
'Description',
148 'input' =>
'textarea',
152 'wysiwyg_enabled' =>
true,
153 'is_html_allowed_on_front' =>
true,
154 'group' =>
'General Information',
160 'backend' => Image::class,
164 'group' =>
'General Information',
168 'label' =>
'Page Title',
173 'group' =>
'General Information',
177 'label' =>
'Meta Keywords',
178 'input' =>
'textarea',
182 'group' =>
'General Information',
184 'meta_description' => [
186 'label' =>
'Meta Description',
187 'input' =>
'textarea',
191 'group' =>
'General Information',
195 'label' =>
'Display Mode',
197 'source' => Mode::class,
201 'group' =>
'Display Settings',
205 'label' =>
'CMS Block',
207 'source' => Page::class,
211 'group' =>
'Display Settings',
215 'label' =>
'Is Anchor',
217 'source' => Boolean::class,
220 'group' =>
'Display Settings',
228 'group' =>
'General Information',
232 'label' =>
'Position',
236 'group' =>
'General Information',
243 'group' =>
'General Information',
250 'group' =>
'General Information',
257 'group' =>
'General Information',
261 'label' =>
'Custom Design',
263 'source' => Theme::class,
267 'group' =>
'Custom Design',
269 'custom_design_from' => [
270 'type' =>
'datetime',
271 'label' =>
'Active From',
273 'backend' => Startdate::class,
277 'group' =>
'Custom Design',
279 'custom_design_to' => [
280 'type' =>
'datetime',
281 'label' =>
'Active To',
283 'backend' => Datetime::class,
287 'group' =>
'Custom Design',
291 'label' =>
'Page Layout',
293 'source' => Layout::class,
297 'group' =>
'Custom Design',
299 'custom_layout_update' => [
301 'label' =>
'Custom Layout Update',
302 'input' =>
'textarea',
303 'backend' => Customlayoutupdate::class,
307 'group' =>
'Custom Design',
315 'group' =>
'General Information',
317 'children_count' => [
319 'label' =>
'Children Count',
323 'group' =>
'General Information',
325 'available_sort_by' => [
327 'label' =>
'Available Product Listing Sort By',
328 'input' =>
'multiselect',
329 'source' => Sortby::class,
330 'backend' => SortbyBackendModel::class,
332 'input_renderer' => Available::class,
334 'group' =>
'Display Settings',
336 'default_sort_by' => [
338 'label' =>
'Default Product Listing Sort By',
340 'source' => Sortby::class,
341 'backend' => SortbyBackendModel::class,
344 DefaultSortby::class,
346 'group' =>
'Display Settings',
348 'include_in_menu' => [
350 'label' =>
'Include in Navigation Menu',
352 'source' => Boolean::class,
356 'group' =>
'General Information',
358 'custom_use_parent_settings' => [
360 'label' =>
'Use Parent Category Settings',
362 'source' => Boolean::class,
366 'group' =>
'Custom Design',
368 'custom_apply_to_products' => [
370 'label' =>
'Apply To Products',
372 'source' => Boolean::class,
376 'group' =>
'Custom Design',
378 'filter_price_range' => [
380 'label' =>
'Layered Navigation Price Step',
384 'input_renderer' => Pricestep::class,
386 'group' =>
'Display Settings',
390 'catalog_product' => [
392 'entity_model' => Product::class,
393 'attribute_model' => Attribute::class,
394 'table' =>
'catalog_product_entity',
395 'additional_attribute_table' =>
'catalog_eav_attribute',
396 'entity_attribute_collection' =>
397 Product\Attribute\Collection::class,
403 'frontend_class' =>
'validate-length maximum-length-255',
406 'searchable' =>
true,
407 'visible_in_advanced_search' =>
true,
408 'used_in_product_listing' =>
true,
409 'used_for_sort_by' =>
true,
415 'frontend_class' =>
'validate-length maximum-length-64',
416 'backend' => Sku::class,
419 'searchable' =>
true,
420 'comparable' =>
true,
421 'visible_in_advanced_search' =>
true,
425 'label' =>
'Description',
426 'input' =>
'textarea',
429 'searchable' =>
true,
430 'comparable' =>
true,
431 'wysiwyg_enabled' =>
true,
432 'is_html_allowed_on_front' =>
true,
433 'visible_in_advanced_search' =>
true,
435 'short_description' => [
437 'label' =>
'Short Description',
438 'input' =>
'textarea',
441 'searchable' =>
true,
442 'comparable' =>
true,
443 'wysiwyg_enabled' =>
true,
444 'is_html_allowed_on_front' =>
true,
445 'visible_in_advanced_search' =>
true,
446 'used_in_product_listing' =>
true,
447 'is_used_in_grid' =>
true,
448 'is_visible_in_grid' =>
false,
449 'is_filterable_in_grid' =>
false,
455 'backend' => Price::class,
458 'searchable' =>
true,
459 'filterable' =>
true,
460 'visible_in_advanced_search' =>
true,
461 'used_in_product_listing' =>
true,
462 'used_for_sort_by' =>
true,
463 'apply_to' =>
'simple,virtual',
468 'label' =>
'Special Price',
470 'backend' => Price::class,
474 'used_in_product_listing' =>
true,
475 'apply_to' =>
'simple,virtual',
477 'is_used_in_grid' =>
true,
478 'is_visible_in_grid' =>
false,
479 'is_filterable_in_grid' =>
true,
481 'special_from_date' => [
482 'type' =>
'datetime',
483 'label' =>
'Special Price From Date',
485 'backend' => Startdate::class,
489 'used_in_product_listing' =>
true,
490 'apply_to' =>
'simple,virtual',
492 'is_used_in_grid' =>
true,
493 'is_visible_in_grid' =>
false,
494 'is_filterable_in_grid' =>
false,
496 'special_to_date' => [
497 'type' =>
'datetime',
498 'label' =>
'Special Price To Date',
500 'backend' => Datetime::class,
504 'used_in_product_listing' =>
true,
505 'apply_to' =>
'simple,virtual',
507 'is_used_in_grid' =>
true,
508 'is_visible_in_grid' =>
false,
509 'is_filterable_in_grid' =>
false,
515 'backend' => Price::class,
517 'user_defined' =>
true,
520 'apply_to' =>
'simple,virtual',
522 'is_used_in_grid' =>
true,
523 'is_visible_in_grid' =>
false,
524 'is_filterable_in_grid' =>
true,
530 'backend' => Weight::class,
531 'input_renderer' => WeightFormHelper::class,
533 'apply_to' =>
'simple,virtual',
534 'is_used_in_grid' =>
true,
535 'is_visible_in_grid' =>
false,
536 'is_filterable_in_grid' =>
true,
540 'label' =>
'Manufacturer',
543 'user_defined' =>
true,
544 'searchable' =>
true,
545 'filterable' =>
true,
546 'comparable' =>
true,
547 'visible_in_advanced_search' =>
true,
549 'is_used_in_grid' =>
true,
550 'is_visible_in_grid' =>
false,
551 'is_filterable_in_grid' =>
true,
555 'label' =>
'Meta Title',
560 'group' =>
'Meta Information',
561 'is_used_in_grid' =>
true,
562 'is_visible_in_grid' =>
false,
563 'is_filterable_in_grid' =>
true,
567 'label' =>
'Meta Keywords',
568 'input' =>
'textarea',
572 'group' =>
'Meta Information',
573 'is_used_in_grid' =>
true,
574 'is_visible_in_grid' =>
false,
575 'is_filterable_in_grid' =>
true,
577 'meta_description' => [
579 'label' =>
'Meta Description',
580 'input' =>
'textarea',
582 'note' =>
'Maximum 255 chars',
583 'class' =>
'validate-length maximum-length-255',
586 'group' =>
'Meta Information',
587 'is_used_in_grid' =>
true,
588 'is_visible_in_grid' =>
false,
589 'is_filterable_in_grid' =>
true,
593 'label' =>
'Base Image',
594 'input' =>
'media_image',
595 'frontend' => ImageFrontendModel::class,
596 'input_renderer' => BaseImage::class,
600 'used_in_product_listing' =>
true,
601 'group' =>
'General',
605 'label' =>
'Small Image',
606 'input' =>
'media_image',
607 'frontend' => ImageFrontendModel::class,
611 'used_in_product_listing' =>
true,
616 'label' =>
'Thumbnail',
617 'input' =>
'media_image',
618 'frontend' => ImageFrontendModel::class,
622 'used_in_product_listing' =>
true,
627 'label' =>
'Media Gallery',
628 'input' =>
'gallery',
629 'backend' => Media::class,
634 'old_id' => [
'type' =>
'int',
'required' =>
false,
'sort_order' => 6,
'visible' =>
false],
637 'label' =>
'Tier Price',
639 'backend' => Tierprice::class,
643 'apply_to' =>
'simple,virtual',
651 'user_defined' =>
true,
652 'searchable' =>
true,
653 'filterable' =>
true,
654 'comparable' =>
true,
655 'visible_in_advanced_search' =>
true,
657 'is_used_in_grid' =>
true,
658 'is_visible_in_grid' =>
false,
659 'is_filterable_in_grid' =>
true,
661 'news_from_date' => [
662 'type' =>
'datetime',
663 'label' =>
'Set Product as New from Date',
665 'backend' => Startdate::class,
669 'used_in_product_listing' =>
true,
670 'is_used_in_grid' =>
true,
671 'is_visible_in_grid' =>
false,
672 'is_filterable_in_grid' =>
false,
675 'type' =>
'datetime',
676 'label' =>
'Set Product as New to Date',
678 'backend' => Datetime::class,
682 'used_in_product_listing' =>
true,
683 'is_used_in_grid' =>
true,
684 'is_visible_in_grid' =>
false,
685 'is_filterable_in_grid' =>
false,
689 'label' =>
'Image Gallery',
690 'input' =>
'gallery',
699 'source' => Status::class,
702 'searchable' =>
true,
703 'used_in_product_listing' =>
true,
707 'label' =>
'Minimal Price',
713 'apply_to' =>
'simple,virtual',
718 'label' =>
'Visibility',
720 'source' => Visibility::class,
727 'label' =>
'Custom Design',
729 'source' => Theme::class,
734 'is_used_in_grid' =>
true,
735 'is_visible_in_grid' =>
false,
736 'is_filterable_in_grid' =>
true,
738 'custom_design_from' => [
739 'type' =>
'datetime',
740 'label' =>
'Active From',
742 'backend' => Startdate::class,
747 'is_used_in_grid' =>
true,
748 'is_visible_in_grid' =>
false,
749 'is_filterable_in_grid' =>
false,
751 'custom_design_to' => [
752 'type' =>
'datetime',
753 'label' =>
'Active To',
755 'backend' => Datetime::class,
760 'is_used_in_grid' =>
true,
761 'is_visible_in_grid' =>
false,
762 'is_filterable_in_grid' =>
false,
764 'custom_layout_update' => [
766 'label' =>
'Custom Layout Update',
767 'input' =>
'textarea',
768 'backend' => Customlayoutupdate::class,
776 'label' =>
'Page Layout',
778 'source' => LayoutModel::class,
783 'is_used_in_grid' =>
true,
784 'is_visible_in_grid' =>
false,
785 'is_filterable_in_grid' =>
false,
789 'label' =>
'Categories',
791 'backend' => CategoryBackendAttribute::class,
792 'input_renderer' => CategoryFormHelper::class,
796 'group' =>
'General',
797 'is_used_in_grid' =>
false,
798 'is_visible_in_grid' =>
false,
799 'is_filterable_in_grid' =>
false,
801 'options_container' => [
803 'label' =>
'Display Product Options In',
805 'source' => Container::class,
807 'default' =>
'container2',
812 'required_options' => [
818 'used_in_product_listing' =>
true,
829 'label' =>
'Image Label',
835 'used_in_product_listing' =>
true,
837 'small_image_label' => [
839 'label' =>
'Small Image Label',
845 'used_in_product_listing' =>
true,
847 'thumbnail_label' => [
849 'label' =>
'Thumbnail Label',
855 'used_in_product_listing' =>
true,
869 'country_of_manufacture' => [
871 'label' =>
'Country of Manufacture',
873 'source' => Countryofmanufacture::class,
877 'user_defined' =>
false,
878 'searchable' =>
false,
879 'filterable' =>
false,
880 'comparable' =>
false,
881 'visible_on_front' =>
false,
883 'apply_to' =>
'simple,bundle',
884 'group' =>
'General',
885 'is_used_in_grid' =>
true,
886 'is_visible_in_grid' =>
false,
887 'is_filterable_in_grid' =>
true,
889 'quantity_and_stock_status' => [
890 'group' =>
'General',
892 'backend' => Stock::class,
893 'label' =>
'Quantity',
895 'input_renderer' => StockField::class,
896 'source' => StockSourceModel::class,
898 'default' => StockModel::STOCK_IN_STOCK,
899 'user_defined' =>
false,
902 'searchable' =>
false,
903 'filterable' =>
false,
904 'comparable' =>
false,
const CATALOG_PRODUCT_ENTITY_TYPE_ID
__construct(ModuleDataSetupInterface $setup, Context $context, CacheInterface $cache, CollectionFactory $attrGroupCollectionFactory, CategoryFactory $categoryFactory)
const CATEGORY_ENTITY_TYPE_ID