@param \Symfony\Component\Form\FormBuilderInterface $builder

@return $this
193985
protected function addBankAccount(FormBuilderInterface $builder)
    {
        $builder->add(
            static::FIELD_BANK_ACCOUNT,
            TextType::class,
            [
                'label' => false,
                'required' => true,
                'constraints' => [
                ],
            ]
        );

        return $this;
    }
316109
public function addBuilder(BuilderInterface $builder)
    {
        parent::addBuilder($builder);

        $builder->setVariables(
            $this->mergeParameters(
                $this->getFromYaml('params', array()),
                $this->getFromYaml(sprintf('builders.%s.params', $builder->getYamlKey()), array())
            )
        );
        $builder->setColumnClass($this->getColumnClass());
    }
696282
public function setBuilder($group, ServiceBuilder $builder)
    {
        $this[$group] = $builder;
        $this->removed[$group] = array();
        return $this;
    }
345347
protected function addLabel(FormBuilderInterface $builder)
    {
        $builder->add(
            self::FIELD_PAYMENT_METHOD,
            HiddenType::class,
            [
                'label' => false,
                'required' => false,
                'data' => [],
            ]
        );

        return $this;
    }
1225429
public function buildForm(FormBuilderInterface $builder, array $options)
    {
        parent::buildForm($builder, $options);
        $builder->get('value')->addModelTransformer(new StringToDateTimeTransformer('1'));
    }
1000239
protected function addWithInactive(Builder $builder)
    {
        $builder->macro('withInactive', function (Builder $builder) {

            $this->remove($builder, $builder->getModel());
            return $builder;
        });
    }
200115
protected function buildSubmitAction(FormBuilderInterface $builder): void
    {
        $defaults = [
            'form_type' => SubmitType::class,
            'label' => 'sidus.datagrid.submit.label',
            'attr' => [
                'class' => 'btn-primary',
            ],
        ];
        $options = array_merge($defaults, $this->getSubmitButton());
        $type = $options['form_type'];
        unset($options['form_type']);
        $builder->add('filterSubmitButton', $type, $options);
    }
610578
public function buildForm(FormBuilderInterface $builder, array $options)
	{
		$builder->add('name', TextType::class, array(
			'label' => 'Config name',
			'required' => true
		))
		->add('alias', TextType::class, array(
			'label' => 'Alias (interal use)',
			'required' => true 
		))
		->add('parameters', BaseCollectionType::class, array(
			'entry_type' => ParameterType::class,
			'label' => 'List of parameters',
			'allow_add' => true,
			'allow_delete' => true,
			'prototype' => true,
			'containerId' => 'parameters-collection'
		))
		->add('isDefault', CheckboxType::class, array(
			'label' => 'Configuration par défaut'
		));
	}
376653
public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->addModelTransformer($this)
            ->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) use ($builder, $options) {
                $form = $event->getForm();
                $component = $event->getData();

                // Adds custom "data" component from component type
                $form->add('data', $component->getComponentType()->getFormType(), array_replace_recursive(
                    $options['variation']->getConfiguration(
                        'components',
                        $component->getComponentType()->getName(),
                        'config',
                        array()
                    ),
                    array(
                        'auto_initialize' => false,
                        'label' => false,
                    )
                ));
            })
        ;
    }
963924
public function defineFormBuilder(FormBuilderInterface $formBuilder)
    {
        /** @var AbstractAdmin $admin */
        $admin = $this;

        $mapper = new \Compo\Sonata\AdminBundle\Form\FormMapper($admin->getFormContractor(), $formBuilder, $admin);

        $this->configureFormFields($mapper);

        foreach ($admin->getExtensions() as $extension) {
            $extension->configureFormFields($mapper);
        }

        $this->attachInlineValidator();
    }
827065
public function buildForm(FormBuilderInterface $builder, array $options)
    {
        /**
         * @var Plugin $plugin
         */
        $plugin = $options['plugin'];
        foreach ($plugin->getFields() as $fieldName => $field) {
            $builder
                ->remove($fieldName)
                ->add($fieldName, $field['type'], array_merge([
                    'label' => $field['label'],
                    'data' => $field['data'],
                    'required' => $field['required'],
                    'attr' => $field['attr'],
                ], $field['options']), $field);
        }

        $builder->add('save', 'submit');
    }
661065
protected function addBankBranchCode(FormBuilderInterface $builder)
    {
        $builder->add(
            static::FIELD_BANK_BRANCH_CODE,
            TextType::class,
            [
                'label' => false,
                'required' => true,
                'constraints' => [
                ],
            ]
        );

        return $this;
    }
19243
public function setBuilder(IlluminateEloquentBuilder $builder = null)
    {
        // If no builder was provided,
        // we'll use the one from this repositorys model
        if (empty($builder)) {
            $builder = $this->getModel()->newQuery();
        }

        // Set repository builder
        $this->builder = $builder;

        return $this;
    }
643930
protected function addBIC(FormBuilderInterface $builder)
    {
        $builder->add(
            self::FIELD_BIC,
            TextType::class,
            [
                'label' => false,
                'required' => true,
                'constraints' => [
                    $this->createManageMandateConstraint(),
                ],
            ]
        );

        return $this;
    }
1325525
protected function addBankGroupType(FormBuilderInterface $builder, array $options)
    {
        $builder->add(
            static::FIELD_BANK_GROUP_TYPE,
            ChoiceType::class,
            [
                'label' => false,
                'required' => true,
                'expanded' => false,
                'multiple' => false,
                'placeholder' => false,
                'choices' => $options[static::OPTIONS_FIELD_NAME][static::OPTION_BANK_GROUP_TYPES],
                'constraints' => [],
            ]
        );

        return $this;
    }
1137900
public function buildForm(FormBuilderInterface $builder, array $options)
    {
        if ($this->getParent() === 'hidden') {
            $builder->addModelTransformer($this->transformer);
        }
    }
439466
public function buildForm(FormBuilderInterface $builder, array $options)
    {
        foreach ($options['button_groups'] as $name => $config) {
            $builder->add($name, ButtonGroupType::class, $config);
        }
    }