@@ -76,21 +76,21 @@ method::
7676 // a callback to return the label for a given choice
7777 // if a placeholder is used, its empty value (null) may be passed but
7878 // its label is defined by its own "placeholder" option
79- 'choice_label' => function(?Category $category) {
79+ 'choice_label' => function (?Category $category) {
8080 return $category ? strtoupper($category->getName()) : '';
8181 },
8282 // returns the html attributes for each option input (may be radio/checkbox)
83- 'choice_attr' => function(?Category $category) {
83+ 'choice_attr' => function (?Category $category) {
8484 return $category ? ['class' => 'category_'.strtolower($category->getName())] : [];
8585 },
8686 // every option can use a string property path or any callable that get
8787 // passed each choice as argument, but it may not be needed
88- 'group_by' => function() {
88+ 'group_by' => function () {
8989 // randomly assign things into 2 groups
9090 return rand(0, 1) == 1 ? 'Group A' : 'Group B';
9191 },
9292 // a callback to return whether a category is preferred
93- 'preferred_choices' => function(?Category $category) {
93+ 'preferred_choices' => function (?Category $category) {
9494 return $category && 100 < $category->getArticleCounts();
9595 },
9696 ]);
@@ -309,5 +309,5 @@ Field Variables
309309
310310.. tip ::
311311
312- It's significantly faster to use the :ref: `form-twig-selectedchoice `
312+ It's significantly faster to use the :ref: `selectedchoice < form-twig-selectedchoice > `
313313 test instead when using Twig.
0 commit comments