addTab example

'font-size-h5' => '@font-size-base',
        'font-size-h6' => 12,
        'panel-header-font-size' => 14,
        'label-font-size' => 14,
        'input-font-size' => 14,
        'btn-font-size' => 14,
        'btn-icon-size' => 10,
    ];

    public function createConfig(TabContainer $container)
    {
        $container->addTab($this->createMainConfigTab());

        $tab = $this->createTab(
            'responsive_tab',
            '__responsive_colors__'
        );
        $container->addTab($tab);

        $tab->addElement($this->createBottomTabPanel());
    }

    /** * Helper function to merge default theme colors with color schemes. */
/** * @throws InvalidArgumentException * * @return $this */
    public function addElement(Element $element)
    {
        if (!$element instanceof Tab) {
            throw new InvalidArgumentException('$element must be instance of Shopware\Components\Form\Container\Tab');
        }

        return $this->addTab($element);
    }

    /** * @return $this */
    public function addTab(Tab $element)
    {
        return parent::addElement($element);
    }
}
$fieldSet->addElement(
            $this->createMediaField(
                'favicon',
                '__favicon__',
                'frontend/_public/src/img/favicon.ico',
                ['attributes' => ['lessCompatible' => false]]
            )
        );

        $tab->addElement($fieldSet);

        $container->addTab($tab);
    }

    public function createConfigSets(ArrayCollection $collection)
    {
        $set = new ConfigSet();
        $set->setName('__bare_min_appearance__')
            ->setDescription('__bare_min_appearance_description__')
            ->setValues(['color' => '#fff']);
        $collection->add($set);

        $set = new ConfigSet();
        
Home | Imprint | This part of the site doesn't use cookies.