@@ -11,6 +11,7 @@ Templates
11
11
---------
12
12
13
13
For information on overriding templates, see
14
+
14
15
* :ref: `overriding-bundle-templates `.
15
16
* :doc: `/cookbook/bundles/inheritance `
16
17
@@ -31,6 +32,7 @@ Controllers
31
32
Assuming the third-party bundle involved uses non-service controllers (which
32
33
is almost always the case), you can easily override controllers via bundle
33
34
inheritance. For more information, see :doc: `/cookbook/bundles/inheritance `.
35
+ If the controller is a service, see the next section on how to override it.
34
36
35
37
Services & Configuration
36
38
------------------------
@@ -94,7 +96,11 @@ like adding a method call - you can only use the compiler pass method.
94
96
Entities & Entity mapping
95
97
-------------------------
96
98
97
- In progress...
99
+ Due to the way Doctrine works, it is not possible to override entity mapping
100
+ of a bundle. However, if a bundle provides a mapped superclass (such as the
101
+ ``User `` entity in the FOSUserBundle) one can override attributes and
102
+ associations. Learn more about this feature and its limitations in
103
+ `the Doctrine documentation `_.
98
104
99
105
Forms
100
106
-----
@@ -116,7 +122,22 @@ Validation metadata
116
122
117
123
In progress...
118
124
125
+ .. _override-translations :
126
+
119
127
Translations
120
128
------------
121
129
122
- In progress...
130
+ Translations are not related to bundles, but to domains. That means that you
131
+ can override the translations from any translation file, as long as it is in
132
+ :ref: `the correct domain <translation-domains >`.
133
+
134
+ .. caution ::
135
+
136
+ The last translation file always wins. That mean that you need to make
137
+ sure to load the class which overrides the translation of another bundle
138
+ before that bundle in the ``AppKernel ``.
139
+
140
+ The file that always wins is the one that is placed in
141
+ ``app/Resources/translations ``, as those files are always loaded as last.
142
+
143
+ .. _`the Doctrine documentation` : http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/inheritance-mapping.html#overrides
0 commit comments