custom/plugins/SmsBecoTechnicCategoryCustomListing/src/SmsBecoTechnicCategoryCustomListing.php line 9

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace SmsBecoTechnicCategoryCustomListing;
  3. use Shopware\Core\Framework\Plugin;
  4. use Shopware\Core\Framework\Plugin\Context\InstallContext;
  5. use Shopware\Core\System\CustomField\CustomFieldTypes;
  6. class SmsBecoTechnicCategoryCustomListing extends Plugin
  7. {
  8.     /**
  9.      * @param InstallContext $installContext
  10.      */
  11.     public function install(InstallContext $installContext): void
  12.     {
  13.         parent::install($installContext);
  14.         //$this->installCustomFields($installContext);
  15.     }
  16.     /**
  17.      * @param InstallContext $installContext
  18.      */
  19.     private function installCustomFields(InstallContext $installContext)
  20.     {
  21. //        $customFieldSetRepository = $this->container->get('custom_field_set.repository');
  22. //        $customFieldSetRepository->create(
  23. //            [
  24. //                [
  25. //                    'name' => 'sms_custom_data',
  26. //                    'config' => [
  27. //                        'label' => [
  28. //                            'en-GB' => 'Custom Fieldset',
  29. //                            'de-DE' => 'Custom Fieldset',
  30. //                        ],
  31. //                    ],
  32. //                    'customFields' => [
  33. //                        [
  34. //                            'name' => 'sms_category_type',
  35. //                            'type' => CustomFieldTypes::TEXT,
  36. //                            'config' => [
  37. //                                'componentName' => 'sw-field',
  38. //                                'customFieldType' => 'text',
  39. //                                'label' => [
  40. //                                    'en-GB' => 'Category Type',
  41. //                                    'de-DE' => 'Kategorie-Typ',
  42. //                                ],
  43. //                            ],
  44. //                        ],
  45. //                    ],
  46. //                    'relations' => [
  47. //                        [
  48. //                            'entityName' => 'category',
  49. //                        ],
  50. //                    ],
  51. //                ],
  52. //            ],
  53. //            $installContext->getContext()
  54. //        );
  55.     }
  56. }