Documentation

FormFactory
in package
implements FormFactoryInterface

Table of Contents

Interfaces

FormFactoryInterface
Allows creating a form based on a name, a class or a property.

Properties

$registry  : mixed

Methods

__construct()  : mixed
create()  : FormInterface
Returns a form.
createBuilder()  : FormBuilderInterface
Returns a form builder.
createBuilderForProperty()  : FormBuilderInterface
Returns a form builder for a property of a class.
createForProperty()  : FormInterface
Returns a form for a property of a class.
createNamed()  : FormInterface
Returns a form.
createNamedBuilder()  : FormBuilderInterface
Returns a form builder.

Properties

Methods

create()

Returns a form.

public create([string $type = FormType::class ][, mixed $data = null ][, array<string|int, mixed> $options = [] ]) : FormInterface
Parameters
$type : string = FormType::class
$data : mixed = null

The initial data

$options : array<string|int, mixed> = []
Return values
FormInterface

createBuilder()

Returns a form builder.

public createBuilder([string $type = FormType::class ][, mixed $data = null ][, array<string|int, mixed> $options = [] ]) : FormBuilderInterface
Parameters
$type : string = FormType::class
$data : mixed = null

The initial data

$options : array<string|int, mixed> = []
Return values
FormBuilderInterface

createBuilderForProperty()

Returns a form builder for a property of a class.

public createBuilderForProperty(string $class, string $property[, mixed $data = null ][, array<string|int, mixed> $options = [] ]) : FormBuilderInterface
Parameters
$class : string

The fully qualified class name

$property : string

The name of the property to guess for

$data : mixed = null

The initial data

$options : array<string|int, mixed> = []
Return values
FormBuilderInterface

createForProperty()

Returns a form for a property of a class.

public createForProperty(string $class, string $property[, mixed $data = null ][, array<string|int, mixed> $options = [] ]) : FormInterface
Parameters
$class : string

The fully qualified class name

$property : string

The name of the property to guess for

$data : mixed = null

The initial data

$options : array<string|int, mixed> = []
Return values
FormInterface

createNamed()

Returns a form.

public createNamed(string $name[, string $type = FormType::class ][, mixed $data = null ][, array<string|int, mixed> $options = [] ]) : FormInterface
Parameters
$name : string
$type : string = FormType::class
$data : mixed = null

The initial data

$options : array<string|int, mixed> = []
Return values
FormInterface

createNamedBuilder()

Returns a form builder.

public createNamedBuilder(string $name[, string $type = FormType::class ][, mixed $data = null ][, array<string|int, mixed> $options = [] ]) : FormBuilderInterface
Parameters
$name : string
$type : string = FormType::class
$data : mixed = null

The initial data

$options : array<string|int, mixed> = []
Return values
FormBuilderInterface

        
On this page

Search results