@@ -23,7 +23,7 @@ the routes from any bundle, then they must be manually imported from somewhere
23
23
in your application (e.g. ``app/config/routing.yml ``).
24
24
25
25
The easiest way to "override" a bundle's routing is to never import it at
26
- all. Instead of importing a third-party bundle's routing, simply copying
26
+ all. Instead of importing a third-party bundle's routing, simply copy
27
27
that routing file into your application, modify it, and import it instead.
28
28
29
29
Controllers
@@ -68,7 +68,7 @@ in the core FrameworkBundle:
68
68
$container->setParameter('translator.class', 'Acme\HelloBundle\Translation\Translator');
69
69
70
70
Secondly, if the class is not available as a parameter, you want to make sure the
71
- class is always overridden when your bundle is used, or you need to modify
71
+ class is always overridden when your bundle is used, or if you need to modify
72
72
something beyond just the class name, you should use a compiler pass::
73
73
74
74
// src/Acme/DemoBundle/DependencyInjection/Compiler/OverrideServiceCompilerPass.php
@@ -106,7 +106,7 @@ Forms
106
106
-----
107
107
108
108
In order to override a form type, it has to be registered as a service (meaning
109
- it is tagged as " form.type" ). You can then override it as you would override any
109
+ it is tagged as `` form.type `` ). You can then override it as you would override any
110
110
service as explained in `Services & Configuration `_. This, of course, will only
111
111
work if the type is referred to by its alias rather than being instantiated,
112
112
e.g.::
@@ -136,7 +136,7 @@ the constraints to a new validation group:
136
136
.. code-block :: yaml
137
137
138
138
# src/Acme/UserBundle/Resources/config/validation.yml
139
- Fos \UserBundle\Model\User :
139
+ FOS \UserBundle\Model\User :
140
140
properties :
141
141
plainPassword :
142
142
- NotBlank :
@@ -152,10 +152,17 @@ the constraints to a new validation group:
152
152
<?xml version =" 1.0" encoding =" UTF-8" ?>
153
153
<constraint-mapping xmlns =" http://symfony.com/schema/dic/constraint-mapping"
154
154
xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
155
- xsi : schemaLocation =" http://symfony.com/schema/dic/constraint-mapping http://symfony.com/schema/dic/constraint-mapping/constraint-mapping-1.0.xsd" >
155
+ xsi : schemaLocation =" http://symfony.com/schema/dic/constraint-mapping
156
+ http://symfony.com/schema/dic/constraint-mapping/constraint-mapping-1.0.xsd" >
157
+
158
+ <class name =" FOS\UserBundle\Model\User" >
159
+ <property name =" plainPassword" >
160
+ <constraint name =" NotBlank" >
161
+ <option name =" groups" >
162
+ <value >AcmeValidation</value >
163
+ </option >
164
+ </constraint >
156
165
157
- <class name =" Fos\UserBundle\Model\User" >
158
- <property name =" password" >
159
166
<constraint name =" Length" >
160
167
<option name =" min" >6</option >
161
168
<option name =" minMessage" >fos_user.password.short</option >
0 commit comments