PHP Class Symfony\Component\Form\AbstractType

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

Méthodes publiques

Méthode 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 méthode

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 méthode

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

buildView() public méthode

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 méthode

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 méthode

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 méthode

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
Résultat FormBuilder | null A form builder or null when the type does not have a builder

finishView() public méthode

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 méthode

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

getDefaultOptions() public méthode

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

getExtensions() public méthode

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

getParent() public méthode

public getParent ( )

getParent() public méthode

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

setDefaultOptions() public méthode

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

setExtensions() public méthode

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