File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,11 @@ as the "parent" of your bundle::
32
32
By making this simple change, you can now override several parts of the ``FOSUserBundle ``
33
33
simply by creating a file with the same name.
34
34
35
+ .. note ::
36
+
37
+ Despite the method name, there is no parent/child relationship between
38
+ the bundles, it is just a way to extend and override an existing bundle.
39
+
35
40
Overriding Controllers
36
41
~~~~~~~~~~~~~~~~~~~~~~
37
42
Original file line number Diff line number Diff line change @@ -299,11 +299,11 @@ Extending Bundles
299
299
300
300
If you follow these conventions, then you can use :doc: `bundle inheritance</cookbook/bundles/inheritance> `
301
301
to "override" files, controllers or templates. For example, you can create
302
- a bundle - ``AcmeNewBundle `` - and specify that its parent is ``AcmeDemoBundle ``.
302
+ a bundle - ``AcmeNewBundle `` - and specify that it overrides ``AcmeDemoBundle ``.
303
303
When Symfony loads the ``AcmeDemoBundle:Welcome:index `` controller, it will
304
- first look for the ``WelcomeController `` class in ``AcmeNewBundle `` and then
305
- look inside ``AcmeDemoBundle ``. This means that one bundle can override almost
306
- any part of another bundle!
304
+ first look for the ``WelcomeController `` class in ``AcmeNewBundle `` and, if
305
+ it doesn't exist, then look inside ``AcmeDemoBundle ``. This means that one bundle
306
+ can override almost any part of another bundle!
307
307
308
308
Do you understand now why Symfony2 is so flexible? Share your bundles between
309
309
applications, store them locally or globally, your choice.
You can’t perform that action at this time.
0 commit comments