createFieldSet example

$set = new ConfigSet();
        $set->setName('__color_scheme_orange__')->setDescription(
            '__color_scheme_orange_description__'
        )->setValues($this->themeColorDefaults);
        $collection->add($set);
    }

    private function createBasicFieldSet(): FieldSet
    {
        $attributes = array_merge($this->fieldSetDefaults, ['height' => 130]);
        $fieldSet = $this->createFieldSet(
            'basic_field_set',
            '__responsive_tab_general_fieldset_base__',
            ['attributes' => $attributes]
        );

        $fieldSet->addElement(
            $this->createColorPickerField(
                'brand-primary',
                '@brand-primary',
                $this->themeColorDefaults['brand-primary']
            )
        );
'entityName' => $entity,
                        ],
                    ],
                ],
            ],
            Context::createDefaultContext()
        );
    }

    private function createMediaCustomField(string $entity): void
    {
        $this->createFieldSet(
            $entity,
            'media_fieldset_' . $entity,
            [
                [
                    'name' => 'custom_field_media_' . $entity,
                    'type' => CustomFieldTypes::MEDIA,
                    'config' => [
                        'label' => [
                            'en-GB' => 'custom_field_media_' . $entity,
                        ],
                        'componentName' => 'sw-media-field',
                        
'bareMain',
            '__bare_tab_header__',
            [
                'attributes' => [
                    'layout' => 'anchor',
                    'autoScroll' => true,
                    'padding' => '0',
                ],
            ]
        );

        $fieldSet = $this->createFieldSet(
            'bareLogos',
            '__logos__',
            [
                'attributes' => [
                    'padding' => '10',
                    'margin' => '5',
                    'layout' => 'anchor',
                    'defaults' => ['labelWidth' => 155, 'anchor' => '100%'],
                ],
            ]
        );

        
Home | Imprint | This part of the site doesn't use cookies.