Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c7f3353

Browse files
committed
Merge branch '2.0'
2 parents bed3527 + dbc85f9 commit c7f3353

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

cookbook/bundles/inheritance.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ as the "parent" of your bundle::
3232
By making this simple change, you can now override several parts of the ``FOSUserBundle``
3333
simply by creating a file with the same name.
3434

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+
3540
Overriding Controllers
3641
~~~~~~~~~~~~~~~~~~~~~~
3742

quick_tour/the_architecture.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -299,11 +299,11 @@ Extending Bundles
299299

300300
If you follow these conventions, then you can use :doc:`bundle inheritance</cookbook/bundles/inheritance>`
301301
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``.
303303
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!
307307

308308
Do you understand now why Symfony2 is so flexible? Share your bundles between
309309
applications, store them locally or globally, your choice.

0 commit comments

Comments
 (0)