class ResolvedFormType implements ResolvedFormTypeInterface

A wrapper for a form type and its extensions.

Methods

__construct(FormTypeInterface $innerType, array $typeExtensions = array(), ResolvedFormTypeInterface $parent = null)

No description

string
getName()

Returns the name of the type.

string
getBlockPrefix()

Returns the prefix of the template block name for this type.

getParent()

Returns the parent type.

getInnerType()

Returns the wrapped form type.

getTypeExtensions()

Returns the extensions of the wrapped form type.

createBuilder(FormFactoryInterface $factory, string $name, array $options = array())

Creates a new form builder for this type.

createView(FormInterface $form, FormView $parent = null)

Creates a new form view for a form of this type.

buildForm(FormBuilderInterface $builder, array $options)

Configures a form builder for the type hierarchy.

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

Configures a form view for the type hierarchy.

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

Finishes a form view for the type hierarchy.

getOptionsResolver()

Returns the configured options resolver used for this type.

newBuilder(string $name, string $dataClass, FormFactoryInterface $factory, array $options)

Creates a new builder instance.

newView(FormView $parent = null)

Creates a new view instance.

Details

at line 57
__construct(FormTypeInterface $innerType, array $typeExtensions = array(), ResolvedFormTypeInterface $parent = null)

Parameters

FormTypeInterface $innerType
array $typeExtensions
ResolvedFormTypeInterface $parent

at line 108
string getName()

Returns the name of the type.

Return Value

string The type name

at line 118
string getBlockPrefix()

Returns the prefix of the template block name for this type.

Return Value

string The prefix of the template block name

at line 126
ResolvedFormTypeInterface|null getParent()

Returns the parent type.

Return Value

ResolvedFormTypeInterface|null The parent type or null

at line 134
FormTypeInterface getInnerType()

Returns the wrapped form type.

Return Value

FormTypeInterface The wrapped form type

at line 142
FormTypeExtensionInterface[] getTypeExtensions()

Returns the extensions of the wrapped form type.

Return Value

FormTypeExtensionInterface[] An array of {@link FormTypeExtensionInterface} instances

at line 150
FormBuilderInterface createBuilder(FormFactoryInterface $factory, string $name, array $options = array())

Creates a new form builder for this type.

Parameters

FormFactoryInterface $factory The form factory
string $name The name for the builder
array $options The builder options

Return Value

FormBuilderInterface The created form builder

at line 166
FormView createView(FormInterface $form, FormView $parent = null)

Creates a new form view for a form of this type.

Parameters

FormInterface $form The form to create a view for
FormView $parent The parent view or null

Return Value

FormView The created form view

at line 177
buildForm(FormBuilderInterface $builder, array $options)

Configures a form builder for the type hierarchy.

Parameters

FormBuilderInterface $builder The builder to configure
array $options The options used for the configuration

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

Configures a form view for the type hierarchy.

This method is called before the children of the view are built.

Parameters

FormView $view The form view to configure
FormInterface $form The form corresponding to the view
array $options The options used for the configuration

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

Finishes a form view for the type hierarchy.

This method is called after the children of the view have been built.

Parameters

FormView $view The form view to configure
FormInterface $form The form corresponding to the view
array $options The options used for the configuration

at line 240
OptionsResolverInterface getOptionsResolver()

Returns the configured options resolver used for this type.

Return Value

OptionsResolverInterface The options resolver

at line 299
protected FormBuilderInterface newBuilder(string $name, string $dataClass, FormFactoryInterface $factory, array $options)

Creates a new builder instance.

Override this method if you want to customize the builder class.

Parameters

string $name The name of the builder
string $dataClass The data class
FormFactoryInterface $factory The current form factory
array $options The builder options

Return Value

FormBuilderInterface The new builder instance

at line 321
protected FormView newView(FormView $parent = null)

Creates a new view instance.

Override this method if you want to customize the view class.

Parameters

FormView $parent The parent view, if available

Return Value

FormView A new view instance