Symfony2 API
Class

Symfony\Component\Form\Extension\Core\Type\FormType

class FormType extends BaseType

Methods

buildForm(FormBuilderInterface $builder, array $options)

Builds the form.

buildView(FormView $view, FormInterface $form, array $options)

Builds the form view.

setDefaultOptions(OptionsResolverInterface $resolver)

Sets the default options for this type.

__construct(PropertyAccessorInterface $propertyAccessor = null)

finishView(FormView $view, FormInterface $form, array $options)

{@inheritdoc}

getParent()

{@inheritdoc}

getName()

{@inheritdoc}

Details

at line 40
public buildForm(FormBuilderInterface $builder, array $options)

Builds the form.

This method is called for each type in the hierarchy starting form the
top most type. Type extensions can further modify the form.

Parameters

FormBuilderInterface $builder The form builder
array $options The options

at line 69
public buildView(FormView $view, FormInterface $form, array $options)

Builds the form view.

This method is called for each type in the hierarchy starting form the
top most type. Type extensions can further modify the view.

A view of a form is built before the views of the child forms are built.
This means that you cannot access child views in this method. If you need
to do so, move your logic to {@link finishView()} instead.

Parameters

FormView $view The view
FormInterface $form The form
array $options The options

at line 124
public setDefaultOptions(OptionsResolverInterface $resolver)

Sets the default options for this type.

Parameters

OptionsResolverInterface $resolver The resolver for the options.

at line 32
public __construct(PropertyAccessorInterface $propertyAccessor = null)

Parameters

PropertyAccessorInterface $propertyAccessor

at line 107
public finishView(FormView $view, FormInterface $form, array $options)

{@inheritdoc}

Parameters

FormView $view
FormInterface $form
array $options

at line 203
public getParent()

{@inheritdoc}

at line 211
public getName()

{@inheritdoc}