ResolvedFormType
in package
implements
ResolvedFormTypeInterface
A wrapper for a form type and its extensions.
Tags
Interfaces, Classes, Traits and Enums
- ResolvedFormTypeInterface
- A wrapper for a form type and its extensions.
Table of Contents
- $innerType : FormTypeInterface
- $optionsResolver : OptionsResolver
- $parent : ResolvedFormTypeInterface|null
- $typeExtensions : array<string|int, FormTypeExtensionInterface>
- __construct() : mixed
- buildForm() : mixed
- Configures a form builder for the type hierarchy.
- buildView() : mixed
- Configures a form view for the type hierarchy.
- createBuilder() : FormBuilderInterface
- Creates a new form builder for this type.
- createView() : FormView
- Creates a new form view for a form of this type.
- finishView() : mixed
- Finishes a form view for the type hierarchy.
- getBlockPrefix() : string
- Returns the prefix of the template block name for this type.
- getInnerType() : FormTypeInterface
- Returns the wrapped form type.
- getOptionsResolver() : OptionsResolver
- Returns the configured options resolver used for this type.
- getParent() : self|null
- Returns the parent type.
- getTypeExtensions() : array<string|int, FormTypeExtensionInterface>
- Returns the extensions of the wrapped form type.
- newBuilder() : FormBuilderInterface
- Creates a new builder instance.
- newView() : FormView
- Creates a new view instance.
Properties
$innerType
private
FormTypeInterface
$innerType
$optionsResolver
private
OptionsResolver
$optionsResolver
$parent
private
ResolvedFormTypeInterface|null
$parent
$typeExtensions
private
array<string|int, FormTypeExtensionInterface>
$typeExtensions
Methods
__construct()
public
__construct(FormTypeInterface $innerType[, array<string|int, FormTypeExtensionInterface> $typeExtensions = [] ][, ResolvedFormTypeInterface $parent = null ]) : mixed
Parameters
- $innerType : FormTypeInterface
- $typeExtensions : array<string|int, FormTypeExtensionInterface> = []
- $parent : ResolvedFormTypeInterface = null
Return values
mixed —buildForm()
Configures a form builder for the type hierarchy.
public
buildForm(FormBuilderInterface $builder, array<string|int, mixed> $options) : mixed
Parameters
- $builder : FormBuilderInterface
- $options : array<string|int, mixed>
Return values
mixed —buildView()
Configures a form view for the type hierarchy.
public
buildView(FormView $view, FormInterface $form, array<string|int, mixed> $options) : mixed
Parameters
- $view : FormView
- $form : FormInterface
- $options : array<string|int, mixed>
Return values
mixed —createBuilder()
Creates a new form builder for this type.
public
createBuilder(FormFactoryInterface $factory, mixed $name[, array<string|int, mixed> $options = [] ]) : FormBuilderInterface
Parameters
- $factory : FormFactoryInterface
- $name : mixed
-
The name for the builder
- $options : array<string|int, mixed> = []
Return values
FormBuilderInterface —The created form builder
createView()
Creates a new form view for a form of this type.
public
createView(FormInterface $form[, FormView $parent = null ]) : FormView
Parameters
- $form : FormInterface
- $parent : FormView = null
Return values
FormView —The created form view
finishView()
Finishes a form view for the type hierarchy.
public
finishView(FormView $view, FormInterface $form, array<string|int, mixed> $options) : mixed
Parameters
- $view : FormView
- $form : FormInterface
- $options : array<string|int, mixed>
Return values
mixed —getBlockPrefix()
Returns the prefix of the template block name for this type.
public
getBlockPrefix() : string
Return values
string —The prefix of the template block name
getInnerType()
Returns the wrapped form type.
public
getInnerType() : FormTypeInterface
Return values
FormTypeInterface —The wrapped form type
getOptionsResolver()
Returns the configured options resolver used for this type.
public
getOptionsResolver() : OptionsResolver
Return values
OptionsResolver —The options resolver
getParent()
Returns the parent type.
public
getParent() : self|null
Return values
self|null —The parent type or null
getTypeExtensions()
Returns the extensions of the wrapped form type.
public
getTypeExtensions() : array<string|int, FormTypeExtensionInterface>
Return values
array<string|int, FormTypeExtensionInterface> —newBuilder()
Creates a new builder instance.
protected
newBuilder(string $name, string|null $dataClass, FormFactoryInterface $factory, array<string|int, mixed> $options) : FormBuilderInterface
Override this method if you want to customize the builder class.
Parameters
- $name : string
-
The name of the builder
- $dataClass : string|null
-
The data class
- $factory : FormFactoryInterface
- $options : array<string|int, mixed>
Return values
FormBuilderInterface —The new builder instance
newView()
Creates a new view instance.
protected
newView([FormView $parent = null ]) : FormView
Override this method if you want to customize the view class.
Parameters
- $parent : FormView = null
Return values
FormView —A new view instance