Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit cbdf430

Browse filesBrowse files
committed
Merge pull request symfony#1549 from WouterJ/clearify_extending_bundles
Clearify the goal of Bundle::getParent()
2 parents 7487a77 + e58b98c commit cbdf430
Copy full SHA for cbdf430

File tree

Expand file treeCollapse file tree

2 files changed

+9
-4
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+9
-4
lines changed

‎cookbook/bundles/inheritance.rst

Copy file name to clipboardExpand all lines: cookbook/bundles/inheritance.rst
+5Lines 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

Copy file name to clipboardExpand all lines: quick_tour/the_architecture.rst
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -295,11 +295,11 @@ Extending Bundles
295295

296296
If you follow these conventions, then you can use :doc:`bundle inheritance</cookbook/bundles/inheritance>`
297297
to "override" files, controllers or templates. For example, you can create
298-
a bundle - ``AcmeNewBundle`` - and specify that its parent is ``AcmeDemoBundle``.
298+
a bundle - ``AcmeNewBundle`` - and specify that it overrides ``AcmeDemoBundle``.
299299
When Symfony loads the ``AcmeDemoBundle:Welcome:index`` controller, it will
300-
first look for the ``WelcomeController`` class in ``AcmeNewBundle`` and then
301-
look inside ``AcmeDemoBundle``. This means that one bundle can override almost
302-
any part of another bundle!
300+
first look for the ``WelcomeController`` class in ``AcmeNewBundle`` and, if
301+
not exists, then look inside ``AcmeDemoBundle``. This means that one bundle
302+
can override almost any part of another bundle!
303303

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

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.