@@ -206,7 +206,7 @@ constraint.
206
206
}
207
207
}
208
208
209
- If the callback is stored in a different class and is static, for example ``AppBundle \Entity\Genre ``,
209
+ If the callback is stored in a different class and is static, for example ``App \Entity\Genre ``,
210
210
you can pass the class name and the method as an array.
211
211
212
212
.. configuration-block ::
@@ -221,7 +221,7 @@ you can pass the class name and the method as an array.
221
221
class Author
222
222
{
223
223
/**
224
- * @Assert\Choice(callback={"AppBundle \Entity\Genre", "getGenres"})
224
+ * @Assert\Choice(callback={"App \Entity\Genre", "getGenres"})
225
225
*/
226
226
protected $genre;
227
227
}
@@ -232,7 +232,7 @@ you can pass the class name and the method as an array.
232
232
App\Entity\Author :
233
233
properties :
234
234
genre :
235
- - Choice : { callback: [AppBundle \Entity\Genre, getGenres] }
235
+ - Choice : { callback: [App \Entity\Genre, getGenres] }
236
236
237
237
.. code-block :: xml
238
238
@@ -246,7 +246,7 @@ you can pass the class name and the method as an array.
246
246
<property name =" genre" >
247
247
<constraint name =" Choice" >
248
248
<option name =" callback" >
249
- <value >AppBundle \Entity\Genre</value >
249
+ <value >App \Entity\Genre</value >
250
250
<value >getGenres</value >
251
251
</option >
252
252
</constraint >
@@ -259,7 +259,7 @@ you can pass the class name and the method as an array.
259
259
// src/Entity/Author.php
260
260
namespace App\Entity;
261
261
262
- use AppBundle \Entity\Genre;
262
+ use App \Entity\Genre;
263
263
use Symfony\Component\Validator\Mapping\ClassMetadata;
264
264
use Symfony\Component\Validator\Constraints as Assert;
265
265
0 commit comments