Bundle/WidgetBundle/Builder/WidgetFormBuilder.php
public function buildWidgetStyleForm(Widget $widget, $viewReference, $quantum)
    {
        $formFactory = $this->container->get('form.factory');

        $options = [
            'method' => 'POST',
            'action' => $this->container->get('router')->generate(
                'victoire_core_widget_stylize',
                [
                    'id'            => $widget->getId(),
                    'viewReference' => $viewReference,
                    'quantum'       => $quantum,
                ]
            ),
        ];

        $mockForm = $formFactory->create(WidgetStyleType::class, $widget, $options);
        $builder = $formFactory->createNamed(
            sprintf('%s_%s', $quantum, $mockForm->getName()),
            WidgetStyleType::class,
            $widget,
            $options
        );

        return $builder;
    }
public function buildWidgetStyleForm(Widget $widget, $viewReference, $quantum)
    {
        $formFactory = $this->container->get('form.factory');

        $options = [
            'method' => 'POST',
            'action' => $this->container->get('router')->generate(
                'victoire_core_widget_stylize',
                [
                    'id'            => $widget->getId(),
                    'viewReference' => $viewReference,
                    'quantum'       => $quantum,
                ]
            ),
        ];

        $mockForm = $formFactory->create(WidgetStyleType::class, $widget, $options);
        $builder = $formFactory->createNamed(
            sprintf('%s_%s', $quantum, $mockForm->getName()),
            WidgetStyleType::class,
            $widget,
            $options
        );

        return $builder;
    }
public function buildWidgetStyleForm ( Widget $ widget , $ viewReference , $ quantum ) { $ formFactory = $ this -> container -> get ( 'form.factory' ) ; $ options = [ 'method' => 'POST' , 'action' => $ this -> container -> get ( 'router' ) -> generate ( 'victoire_core_widget_stylize' , [ 'id' => $ widget -> getId ( ) , 'viewReference' => $ viewReference , 'quantum' => $ quantum , ] ) , ] ; $ mockForm = $ formFactory -> create ( WidgetStyleType :: class , $ widget , $ options ) ; $ builder = $ formFactory -> createNamed ( sprintf ( '%s_%s' , $ quantum , $ mockForm -> getName ( ) ) , WidgetStyleType :: class , $ widget , $ options ) ; return $ builder ; }
Create style form for given widget.

@param Widget $widget
@param $viewReference
@param $quantum

@throws \Throwable

@return \Symfony\Component\Form\FormInterface
Create style form for given widget .