custom/plugins/ArboroProductListingLayout/src/ArboroProductListingLayout.php line 8

Open in your IDE?
  1. <?php declare( strict_types );
  2. namespace ArboroProductListingLayout;
  3. use Shopware\Core\Framework\Plugin;
  4. use Shopware\Core\Framework\Plugin\Context\InstallContext;
  5. class ArboroProductListingLayout extends Plugin {
  6.     // @todo: Zusatzfeld via Install-Routine hinzufügen, Standard-Layout zu setzen.
  7.     //    public function install( InstallContext $installContext ): void {
  8.     //        $customFieldSetRepository = $this->container->get( 'custom_field_set.repository' );
  9.     //
  10.     //        $customFieldSetRepository->create( [
  11.     //            [
  12.     //                'name' => 'custom_category_layout_configuration',
  13.     //                'config' => [
  14.     //                    'label' => [
  15.     //                        'de-DE' => 'Layout-Konfiguration',
  16.     //                        'en-GB' => 'Layout configuration'
  17.     //                    ]
  18.     //                ],
  19.     //                'customFields' => [
  20.     //                    'name' => 'defaultLayout',
  21.     //                    'type' => CustomFieldTypes::JSON,
  22.     //                    'config' => [
  23.     //                        'type' => 'select',
  24.     //                        'label' => [
  25.     //                            'de-DE' => 'Standard-Layout',
  26.     //                            'en-GB' => 'Default layout',
  27.     //                        ],
  28.     //                        'componentName' => 'sw-multi-select',
  29.     //                        'customFieldType' => 'select',
  30.     //                        'customFieldPosition' => 0,
  31.     //                        'entity' => 'products',
  32.     //                        'options' => [
  33.     //                            [
  34.     //                                'value' => 'grid',
  35.     //                                'label' => [
  36.     //                                    'de-DE' => "Raster",
  37.     //                                    'en-GB' => "Grid"
  38.     //                                ]
  39.     //                            ],
  40.     //                            [
  41.     //                                'value' => 'list',
  42.     //                                'label' => [
  43.     //                                    'de-DE' => "Liste",
  44.     //                                    'en-GB' => "List"
  45.     //                                ]
  46.     //                            ],
  47.     //                        ]
  48.     //                    ]
  49.     //                ],
  50.     //                'relations' => [
  51.     //                    [
  52.     //                        'entityName' => 'category'
  53.     //                    ]
  54.     //                ]
  55.     //            ]
  56.     //        ], $installContext->getContext() );
  57.     //    }
  58. }