PHP Class Symfony\Component\Form\FormBuilder

Author: Bernhard Schussek ([email protected])
Inheritance: extends Symfony\Component\Form\FormConfigBuilder, implements IteratorAggregate, implements Symfony\Component\Form\FormBuilderInterface
显示文件 Open project: pmjones/php-framework-benchmarks Class Usage Examples

Public Methods

Method Description
__construct ( string $name, string $dataClass, Symfony\Component\EventDispatcher\EventDispatcherInterface $dispatcher, Symfony\Component\Form\FormFactoryInterface $factory, array $options = [] ) Creates a new form builder.
add ( $child, $type = null, array $options = [] )
all ( )
count ( )
create ( $name, $type = null, array $options = [] )
get ( $name )
getForm ( )
getFormFactory ( )
getIterator ( )
getParent ( )
getTypes ( ) : array Returns the types used by this builder.
has ( $name )
hasParent ( )
remove ( $name )
setParent ( Symfony\Component\Form\FormBuilderInterface $parent = null )

Private Methods

Method Description
resolveChild ( string $name ) : FormBuilder Converts an unresolved child into a {@link FormBuilder} instance.
resolveChildren ( ) Converts all unresolved children into {@link FormBuilder} instances.

Method Details

__construct() public method

Creates a new form builder.
public __construct ( string $name, string $dataClass, Symfony\Component\EventDispatcher\EventDispatcherInterface $dispatcher, Symfony\Component\Form\FormFactoryInterface $factory, array $options = [] )
$name string
$dataClass string
$dispatcher Symfony\Component\EventDispatcher\EventDispatcherInterface
$factory Symfony\Component\Form\FormFactoryInterface
$options array

add() public method

public add ( $child, $type = null, array $options = [] )
$options array

all() public method

public all ( )

count() public method

public count ( )

create() public method

public create ( $name, $type = null, array $options = [] )
$options array

get() public method

public get ( $name )

getForm() public method

public getForm ( )

getFormFactory() public method

public getFormFactory ( )

getIterator() public method

public getIterator ( )

getParent() public method

public getParent ( )

getTypes() public method

Returns the types used by this builder.
Deprecation: Deprecated since version 2.1, to be removed in 2.3. Use {@link FormConfigInterface::getType()} instead.
public getTypes ( ) : array
return array An array of FormTypeInterface

has() public method

public has ( $name )

hasParent() public method

public hasParent ( )

remove() public method

public remove ( $name )

setParent() public method

public setParent ( Symfony\Component\Form\FormBuilderInterface $parent = null )
$parent Symfony\Component\Form\FormBuilderInterface