Class

Symfony\Component\Form\Extension\Core\Type\UrlType

class UrlType extends AbstractType

Methods

buildForm(FormBuilder $builder, array $options)

Builds the form.

buildView(FormView $view, FormInterface $form)

Builds the form view.

from AbstractType
buildViewBottomUp(FormView $view, FormInterface $form)

Builds the form view.

from AbstractType
FormBuilder|null createBuilder(string $name, FormFactoryInterface $factory, array $options)

Returns a builder for the current type.

from AbstractType
array getDefaultOptions(array $options)

Returns the default options for this type.

array getAllowedOptionValues(array $options)

Returns the allowed option values for each option (if any).

from AbstractType
string|null getParent(array $options)

Returns the name of the parent type.

setExtensions(array $extensions)

Adds extensions for this type.

from AbstractType
array getExtensions()

Returns the extensions associated with this type.

from AbstractType
string getName()

Returns the name of this type.

Details

at line 23
public buildForm(FormBuilder $builder, array $options)

Builds the form.

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

Parameters

FormBuilder $builder The form builder
array $options The options

in AbstractType at line 52
public buildView(FormView $view, FormInterface $form)

Builds the form view.

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

Parameters

FormView $view The view
FormInterface $form The form

See also

FormTypeExtensionInterface::buildView()

in AbstractType at line 71
public buildViewBottomUp(FormView $view, FormInterface $form)

Builds the form view.

This method gets called for each type in the hierarchy starting from the bottommost type. Type extensions can further modify the view.

Children views have been built while this method gets called so you get a chance to modify them.

Parameters

FormView $view The view
FormInterface $form The form

See also

FormTypeExtensionInterface::buildViewBottomUp()

in AbstractType at line 87
public FormBuilder|null createBuilder(string $name, FormFactoryInterface $factory, array $options)

Returns a builder for the current type.

The builder is retrieved by going up in the type hierarchy when a type does not provide one.

Parameters

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

Return Value

FormBuilder|null A form builder or null when the type does not have a builder

at line 31
public array getDefaultOptions(array $options)

Returns the default options for this type.

Parameters

array $options

Return Value

array The default options

in AbstractType at line 111
public array getAllowedOptionValues(array $options)

Returns the allowed option values for each option (if any).

Parameters

array $options

Return Value

array The allowed option values

at line 41
public string|null getParent(array $options)

Returns the name of the parent type.

Parameters

array $options

Return Value

string|null The name of the parent type if any otherwise null

in AbstractType at line 135
public setExtensions(array $extensions)

Adds extensions for this type.

Parameters

array $extensions An array of FormTypeExtensionInterface

Exceptions

UnexpectedTypeException if any extension does not implement FormTypeExtensionInterface

in AbstractType at line 151
public array getExtensions()

Returns the extensions associated with this type.

Return Value

array An array of FormTypeExtensionInterface

at line 49
public string getName()

Returns the name of this type.

Return Value

string The name of this type