PHP Class Symfony\Component\Form\FormFactory

Inheritance: implements Symfony\Component\Form\FormFactoryInterface
Datei anzeigen Open project: pmjones/php-framework-benchmarks Class Usage Examples

Public Methods

Method Description
__construct ( Symfony\Component\Form\FormRegistryInterface $registry, Symfony\Component\Form\ResolvedFormTypeFactoryInterface $resolvedTypeFactory )
addType ( Symfony\Component\Form\FormTypeInterface $type ) Adds a type.
create ( $type = 'form', $data = null, array $options = [], Symfony\Component\Form\FormBuilderInterface $parent = null )
createBuilder ( $type = 'form', $data = null, array $options = [], Symfony\Component\Form\FormBuilderInterface $parent = null )
createBuilderForProperty ( $class, $property, $data = null, array $options = [], Symfony\Component\Form\FormBuilderInterface $parent = null )
createForProperty ( $class, $property, $data = null, array $options = [], Symfony\Component\Form\FormBuilderInterface $parent = null )
createNamed ( $name, $type = 'form', $data = null, array $options = [], Symfony\Component\Form\FormBuilderInterface $parent = null )
createNamedBuilder ( $name, $type = 'form', $data = null, array $options = [], Symfony\Component\Form\FormBuilderInterface $parent = null )
getType ( string $name ) : Symfony\Component\Form\FormTypeInterface Returns a type by name.
hasType ( string $name ) : boolean Returns whether the given type is supported.

Private Methods

Method Description
resolveType ( Symfony\Component\Form\FormTypeInterface $type ) : Symfony\Component\Form\ResolvedFormTypeInterface Wraps a type into a ResolvedFormTypeInterface implementation and connects it with its parent type.

Method Details

__construct() public method

public __construct ( Symfony\Component\Form\FormRegistryInterface $registry, Symfony\Component\Form\ResolvedFormTypeFactoryInterface $resolvedTypeFactory )
$registry Symfony\Component\Form\FormRegistryInterface
$resolvedTypeFactory Symfony\Component\Form\ResolvedFormTypeFactoryInterface

addType() public method

Adds a type.
Deprecation: Deprecated since version 2.1, to be removed in 2.3. Use form extensions or type registration in the Dependency Injection Container instead.
public addType ( Symfony\Component\Form\FormTypeInterface $type )
$type Symfony\Component\Form\FormTypeInterface The type

create() public method

public create ( $type = 'form', $data = null, array $options = [], Symfony\Component\Form\FormBuilderInterface $parent = null )
$options array
$parent Symfony\Component\Form\FormBuilderInterface

createBuilder() public method

public createBuilder ( $type = 'form', $data = null, array $options = [], Symfony\Component\Form\FormBuilderInterface $parent = null )
$options array
$parent Symfony\Component\Form\FormBuilderInterface

createBuilderForProperty() public method

public createBuilderForProperty ( $class, $property, $data = null, array $options = [], Symfony\Component\Form\FormBuilderInterface $parent = null )
$options array
$parent Symfony\Component\Form\FormBuilderInterface

createForProperty() public method

public createForProperty ( $class, $property, $data = null, array $options = [], Symfony\Component\Form\FormBuilderInterface $parent = null )
$options array
$parent Symfony\Component\Form\FormBuilderInterface

createNamed() public method

public createNamed ( $name, $type = 'form', $data = null, array $options = [], Symfony\Component\Form\FormBuilderInterface $parent = null )
$options array
$parent Symfony\Component\Form\FormBuilderInterface

createNamedBuilder() public method

public createNamedBuilder ( $name, $type = 'form', $data = null, array $options = [], Symfony\Component\Form\FormBuilderInterface $parent = null )
$options array
$parent Symfony\Component\Form\FormBuilderInterface

getType() public method

This methods registers the type extensions from the form extensions.
Deprecation: Deprecated since version 2.1, to be removed in 2.3. Use {@link FormRegistryInterface::getType()} instead.
public getType ( string $name ) : Symfony\Component\Form\FormTypeInterface
$name string The name of the type
return Symfony\Component\Form\FormTypeInterface The type

hasType() public method

Returns whether the given type is supported.
Deprecation: Deprecated since version 2.1, to be removed in 2.3. Use {@link FormRegistryInterface::hasType()} instead.
public hasType ( string $name ) : boolean
$name string The name of the type
return boolean Whether the type is supported