Symfony2 API
Class

Symfony\Bridge\Doctrine\Form\Type\EntityType

class EntityType extends DoctrineType

Methods

__construct(ManagerRegistry $registry)

from DoctrineType
buildForm(FormBuilderInterface $builder, array $options)

Builds the form.

from DoctrineType
setDefaultOptions(OptionsResolverInterface $resolver)

Sets the default options for this type.

from DoctrineType
ORMQueryBuilderLoader getLoader(ObjectManager $manager, mixed $queryBuilder, string $class)

Return the default loader object.

string|null|FormTypeInterface getParent()

Returns the name of the parent type.

from DoctrineType
getName()

Details

in DoctrineType at line 37
public __construct(ManagerRegistry $registry)

Parameters

ManagerRegistry $registry

in DoctrineType at line 42
public buildForm(FormBuilderInterface $builder, array $options)

Builds the form.

This method is called for each type in the hierarchy starting form the
top most type. Type extensions can further modify the form.

Parameters

FormBuilderInterface $builder The form builder
array $options The options

in DoctrineType at line 52
public setDefaultOptions(OptionsResolverInterface $resolver)

Sets the default options for this type.

Parameters

OptionsResolverInterface $resolver The resolver for the options.

at line 27
public ORMQueryBuilderLoader getLoader(ObjectManager $manager, mixed $queryBuilder, string $class)

Return the default loader object.

Parameters

ObjectManager $manager
mixed $queryBuilder
string $class

Return Value

ORMQueryBuilderLoader

in DoctrineType at line 163
public string|null|FormTypeInterface getParent()

Returns the name of the parent type.

You can also return a type instance from this method, although doing so
is discouraged because it leads to a performance penalty. The support
for returning type instances may be dropped from future releases.

Return Value

string|null|FormTypeInterface The name of the parent type if any, null otherwise.

at line 36
public getName()