Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commitc895d64

Browse files
committed
Merge branch '2.0' into 2.1
2 parents0d5a095 +3ba6ca5 commitc895d64

File tree

7 files changed

+32
-14
lines changed

7 files changed

+32
-14
lines changed

‎components/dom_crawler.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ The crawler supports multiple ways of adding the content::
163163
..note::
164164

165165
When dealing with character sets other than ISO-8859-1, always add HTML
166-
content using the:method:`Symfony\\Component\\DomCrawler\\Crawler::addHTMLContent``
166+
content using the:method:`Symfony\\Component\\DomCrawler\\Crawler::addHTMLContent`
167167
method where you can specify the second parameter to be your target character
168168
set.
169169

‎cookbook/assetic/asset_management.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ You can see an example in the previous section.
143143
..caution::
144144

145145
When using the ``cssrewrite`` filter, don't refer to your CSS files using
146-
the ``@AcmeFooBundle``. See the note in the above section for details.
146+
the ``@AcmeFooBundle`` syntax. See the note in the above section for details.
147147

148148
Combining Assets
149149
~~~~~~~~~~~~~~~~

‎cookbook/bundles/inheritance.rst

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,9 @@ The same goes for routing files, validation configuration and other resources.
9797

9898
..caution::
9999

100-
Translation files do not work in the same way as described above. All
101-
translation files are accumulated into a set of "pools" (one for each)
102-
domain. Symfony loads translation files from bundles first (in the order
103-
that the bundles are initialized) and then from your ``app/Resources``
104-
directory. If the same translation is specified in two resources, the
105-
translation from the resource that's loaded last will win.
100+
Translation files do not work in the same way as described above. Read
101+
:ref:`override-translations` if you want to learn how to override
102+
translations.
106103

107104
.. _`FOSUserBundle`:https://github.com/friendsofsymfony/fosuserbundle
108105

‎cookbook/bundles/override.rst

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Templates
1111
---------
1212

1313
For information on overriding templates, see
14+
1415
*:ref:`overriding-bundle-templates`.
1516
*:doc:`/cookbook/bundles/inheritance`
1617

@@ -31,6 +32,7 @@ Controllers
3132
Assuming the third-party bundle involved uses non-service controllers (which
3233
is almost always the case), you can easily override controllers via bundle
3334
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.
3436

3537
Services & Configuration
3638
------------------------
@@ -94,7 +96,11 @@ like adding a method call - you can only use the compiler pass method.
9496
Entities & Entity mapping
9597
-------------------------
9698

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`_.
98104

99105
Forms
100106
-----
@@ -116,7 +122,22 @@ Validation metadata
116122

117123
In progress...
118124

125+
.. _override-translations:
126+
119127
Translations
120128
------------
121129

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 that the bundle containing *your* translations is loaded after any
138+
bundle whose translations you're overriding. This is done in ``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 last.
142+
143+
.. _`the Doctrine documentation`:http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/inheritance-mapping.html#overrides

‎cookbook/form/data_transformers.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ it's quite easy::
342342
{
343343
$builder
344344
->add('task')
345-
->add('dueDate', null, array('widget' => 'single_text'));
345+
->add('dueDate', null, array('widget' => 'single_text'))
346346
->add('issue', 'issue_selector');
347347
}
348348

‎cookbook/validation/custom_constraint.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ not to the property:
236236
# src/Acme/BlogBundle/Resources/config/validation.yml
237237
Acme\DemoBundle\Entity\AcmeEntity:
238238
constraints:
239-
Acme\DemoBundle\Validator\Constraints\ContainsAlphanumeric:~
239+
-Acme\DemoBundle\Validator\Constraints\ContainsAlphanumeric:~
240240
241241
..code-block::php-annotations
242242

‎reference/dic_tags.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,15 +238,15 @@ For details on creating your own custom data collection, read the cookbook
238238
article: :doc:`/cookbook/profiler/data_collector`.
239239
240240
doctrine.event_listener
241-
--------------
241+
-----------------------
242242
243243
**Purpose**: Add a Doctrine event listener
244244
245245
For details on creating Doctrine event listeners, read the cookbook article:
246246
:doc:`/cookbook/doctrine/event_listeners_subscribers`.
247247
248248
doctrine.event_subscriber
249-
--------------
249+
-------------------------
250250
251251
**Purpose**: Add a Doctrine event subscriber
252252

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp