PHP Class Symfony\Component\Form\AbstractType

Author: Bernhard Schussek ([email protected])
Inheritance: implements Symfony\Component\Form\FormTypeInterface
Exibir arquivo Open project: pmjones/php-framework-benchmarks Class Usage Examples

Public Methods

Method Description
buildForm ( FormBuilder $builder, array $options ) Builds the form.
buildForm ( Symfony\Component\Form\FormBuilderInterface $builder, array $options )
buildView ( Symfony\Component\Form\FormView $view, Symfony\Component\Form\FormInterface $form ) Builds the form view.
buildView ( Symfony\Component\Form\FormView $view, Symfony\Component\Form\FormInterface $form, array $options )
buildViewBottomUp ( Symfony\Component\Form\FormView $view, Symfony\Component\Form\FormInterface $form ) Builds the form view.
createBuilder ( string $name, Symfony\Component\Form\FormFactoryInterface $factory, array $options ) : FormBuilder | null Returns a builder for the current type.
finishView ( Symfony\Component\Form\FormView $view, Symfony\Component\Form\FormInterface $form, array $options )
getAllowedOptionValues ( array $options ) : array Returns the allowed option values for each option (if any).
getDefaultOptions ( array $options ) : array Returns the default options for this type.
getExtensions ( ) : array Returns the extensions associated with this type.
getParent ( )
getParent ( array $options ) : string | null Returns the name of the parent type.
setDefaultOptions ( Symfony\Component\OptionsResolver\OptionsResolverInterface $resolver )
setExtensions ( array $extensions ) Adds extensions for this type.

Method Details

buildForm() public method

This method gets called for each type in the hierarchy starting form the top most type. Type extensions can further modify the form.
See also: FormTypeExtensionInterface::buildForm()
public buildForm ( FormBuilder $builder, array $options )
$builder FormBuilder The form builder
$options array The options

buildForm() public method

public buildForm ( Symfony\Component\Form\FormBuilderInterface $builder, array $options )
$builder Symfony\Component\Form\FormBuilderInterface
$options array

buildView() public method

This method gets called for each type in the hierarchy starting form the top most type. Type extensions can further modify the view.
See also: FormTypeExtensionInterface::buildView()
public buildView ( Symfony\Component\Form\FormView $view, Symfony\Component\Form\FormInterface $form )
$view Symfony\Component\Form\FormView The view
$form Symfony\Component\Form\FormInterface The form

buildView() public method

public buildView ( Symfony\Component\Form\FormView $view, Symfony\Component\Form\FormInterface $form, array $options )
$view Symfony\Component\Form\FormView
$form Symfony\Component\Form\FormInterface
$options array

buildViewBottomUp() public method

This method gets called for each type in the hierarchy starting form the top most 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.
See also: FormTypeExtensionInterface::buildViewBottomUp()
public buildViewBottomUp ( Symfony\Component\Form\FormView $view, Symfony\Component\Form\FormInterface $form )
$view Symfony\Component\Form\FormView The view
$form Symfony\Component\Form\FormInterface The form

createBuilder() public method

The builder is retrieved by going up in the type hierarchy when a type does not provide one.
public createBuilder ( string $name, Symfony\Component\Form\FormFactoryInterface $factory, array $options ) : FormBuilder | null
$name string The name of the builder
$factory Symfony\Component\Form\FormFactoryInterface The form factory
$options array The options
return FormBuilder | null A form builder or null when the type does not have a builder

finishView() public method

public finishView ( Symfony\Component\Form\FormView $view, Symfony\Component\Form\FormInterface $form, array $options )
$view Symfony\Component\Form\FormView
$form Symfony\Component\Form\FormInterface
$options array

getAllowedOptionValues() public method

Returns the allowed option values for each option (if any).
public getAllowedOptionValues ( array $options ) : array
$options array
return array The allowed option values

getDefaultOptions() public method

Returns the default options for this type.
public getDefaultOptions ( array $options ) : array
$options array
return array The default options

getExtensions() public method

Returns the extensions associated with this type.
public getExtensions ( ) : array
return array An array of FormTypeExtensionInterface

getParent() public method

public getParent ( )

getParent() public method

Returns the name of the parent type.
public getParent ( array $options ) : string | null
$options array
return string | null The name of the parent type if any otherwise null

setDefaultOptions() public method

public setDefaultOptions ( Symfony\Component\OptionsResolver\OptionsResolverInterface $resolver )
$resolver Symfony\Component\OptionsResolver\OptionsResolverInterface

setExtensions() public method

Adds extensions for this type.
public setExtensions ( array $extensions )
$extensions array An array of FormTypeExtensionInterface