File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -370,10 +370,6 @@ you need to. If your application uses global or static variables (not usually a
370
370
good idea), then you can store the object on some static class or do something
371
371
similar.
372
372
373
- Regardless of how you architect your application, remember that you
374
- should only have one form factory and that you'll need to be able to access
375
- it throughout your application.
376
-
377
373
.. _component-form-intro-create-simple-form :
378
374
379
375
Creating a simple Form
@@ -382,7 +378,8 @@ Creating a simple Form
382
378
.. tip ::
383
379
384
380
If you're using the Symfony Framework, then the form factory is available
385
- automatically as a service called ``form.factory ``. Also, the default
381
+ automatically as a service called ``form.factory ``, you can inject it as
382
+ ``Symfony\Component\Form\FormFactoryInterface ``. Also, the default
386
383
base controller class has a :method: `Symfony\\ Bundle\\ FrameworkBundle\\ Controller\\ AbstractController::createFormBuilder `
387
384
method, which is a shortcut to fetch the form factory and call ``createBuilder() ``
388
385
on it.
You can’t perform that action at this time.
0 commit comments