EntityFormBuilder
class EntityFormBuilder implements EntityFormBuilderInterface (View source)
Builds entity forms.
Properties
| protected EntityTypeManagerInterface | $entityTypeManager | The entity type manager service. |
|
| protected FormBuilderInterface | $formBuilder | The form builder. |
Methods
__construct(EntityTypeManagerInterface $entity_type_manager, FormBuilderInterface $form_builder)
Constructs a new EntityFormBuilder.
array
getForm(EntityInterface $entity, string $operation = 'default', array $form_state_additions = [])
Gets the built and processed entity form for the given entity.
Details
__construct(EntityTypeManagerInterface $entity_type_manager, FormBuilderInterface $form_builder)
Constructs a new EntityFormBuilder.
array
getForm(EntityInterface $entity, string $operation = 'default', array $form_state_additions = [])
Gets the built and processed entity form for the given entity.
The form may also be retrieved from the cache if the form was built in a previous page load. The form is then passed on for processing, validation, and submission if there is proper input.