|
4 | 4 | How to Override any Part of a Bundle
|
5 | 5 | ====================================
|
6 | 6 |
|
7 |
| -This article has not been written yet, but will soon. If you're interested |
8 |
| -in writing this entry, see :doc:`/contributing/documentation/overview`. |
9 |
| - |
10 |
| -This topic is meant to show how you can override each and every part of a |
11 |
| -bundle, both from your application and from other bundles. This may include: |
12 |
| - |
13 |
| -* Templates |
14 |
| -* Routing |
15 |
| -* Controllers |
16 |
| -* Services & Configuration |
17 |
| -* Entities & Entity mapping |
18 |
| -* Forms |
19 |
| -* Validation metadata |
20 |
| - |
21 |
| -In some cases, this may talk about the best practices that a bundle must |
22 |
| -use in order for certain pieces to be overridable (or easily overridable). |
23 |
| -We may also talk about how certain pieces *aren't* really overridable, but |
24 |
| -your best approach at solving your problems anyways. |
| 7 | +This document is a quick reference for how to override different parts of |
| 8 | +third-party bundles. |
| 9 | + |
| 10 | +Templates |
| 11 | +--------- |
| 12 | + |
| 13 | +For information on overriding templates, see |
| 14 | +* :ref:`overriding-bundle-templates`. |
| 15 | +* :doc:`/cookbook/bundles/inheritance` |
| 16 | + |
| 17 | +Routing |
| 18 | +------- |
| 19 | + |
| 20 | +Routing is never automatically imported in Symfony2. If you want to include |
| 21 | +the routes from any bundle, then they must be manually imported from somewhere |
| 22 | +in your application (e.g. ``app/config/routing.yml``). |
| 23 | + |
| 24 | +The easiest way to "override" a bundle's routing is to never import it at |
| 25 | +all. Instead of importing a third-party bundle's routing, simply copying |
| 26 | +that routing file into your application, modify it, and import it instead. |
| 27 | + |
| 28 | +Controllers |
| 29 | +----------- |
| 30 | + |
| 31 | +Assuming the third-party bundle involved uses non-service controllers (which |
| 32 | +is almost always the case), you can easily override controllers via bundle |
| 33 | +inheritance. For more information, see :doc:`/cookbook/bundles/inheritance`. |
| 34 | + |
| 35 | +Services & Configuration |
| 36 | +------------------------ |
| 37 | + |
| 38 | +In progress... |
| 39 | + |
| 40 | +Entities & Entity mapping |
| 41 | +------------------------- |
| 42 | + |
| 43 | +In progress... |
| 44 | + |
| 45 | +Forms |
| 46 | +----- |
| 47 | + |
| 48 | +In progress... |
| 49 | + |
| 50 | +Validation metadata |
| 51 | +------------------- |
| 52 | + |
| 53 | +In progress... |
| 54 | + |
| 55 | +Translations |
| 56 | +------------ |
| 57 | + |
| 58 | +In progress... |
0 commit comments