PHP Класс Symfony\Component\Form\AbstractType

Автор: Bernhard Schussek ([email protected])
Наследование: implements Symfony\Component\Form\FormTypeInterface
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Описание методов

buildForm() публичный метод

This method gets called for each type in the hierarchy starting form the top most type. Type extensions can further modify the form.
См. также: FormTypeExtensionInterface::buildForm()
public buildForm ( FormBuilder $builder, array $options )
$builder FormBuilder The form builder
$options array The options

buildForm() публичный метод

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

buildView() публичный метод

This method gets called for each type in the hierarchy starting form the top most type. Type extensions can further modify the view.
См. также: 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 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() публичный метод

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.
См. также: 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() публичный метод

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
Результат FormBuilder | null A form builder or null when the type does not have a builder

finishView() публичный метод

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() публичный метод

Returns the allowed option values for each option (if any).
public getAllowedOptionValues ( array $options ) : array
$options array
Результат array The allowed option values

getDefaultOptions() публичный метод

Returns the default options for this type.
public getDefaultOptions ( array $options ) : array
$options array
Результат array The default options

getExtensions() публичный метод

Returns the extensions associated with this type.
public getExtensions ( ) : array
Результат array An array of FormTypeExtensionInterface

getParent() публичный метод

public getParent ( )

getParent() публичный метод

Returns the name of the parent type.
public getParent ( array $options ) : string | null
$options array
Результат string | null The name of the parent type if any otherwise null

setDefaultOptions() публичный метод

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

setExtensions() публичный метод

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