@@ -51,8 +51,8 @@ discard block |
||
51 | 51 | $resolver->setDefaults([ |
52 | 52 | 'filter' => 'picture', |
53 | 53 | 'attr' => ['class' => 'selectpicker'], |
54 | - 'choice_attr' => function (Options $options) { |
|
55 | - return function ($choice, $key, $value) use ($options) { |
|
54 | + 'choice_attr' => function(Options $options) { |
|
55 | + return function($choice, $key, $value) use ($options) { |
|
56 | 56 | /** @var Attachment $choice */ |
57 | 57 | $tmp = ['data-subtext' => $choice->getFilename() ?? 'URL']; |
58 | 58 | |
@@ -64,13 +64,13 @@ discard block |
||
64 | 64 | }; |
65 | 65 | }, |
66 | 66 | 'choice_label' => 'name', |
67 | - 'class' => function (Options $options) { |
|
67 | + 'class' => function(Options $options) { |
|
68 | 68 | $short_class_name = (new \ReflectionClass($options['entity']))->getShortName(); |
69 | 69 | //Category becomes CategoryAttachment |
70 | - return 'App\\Entity\\Attachments\\' . $short_class_name . 'Attachment'; |
|
70 | + return 'App\\Entity\\Attachments\\'.$short_class_name.'Attachment'; |
|
71 | 71 | }, |
72 | - 'query_builder' => function (Options $options) { |
|
73 | - return function (EntityRepository $er) use ($options) { |
|
72 | + 'query_builder' => function(Options $options) { |
|
73 | + return function(EntityRepository $er) use ($options) { |
|
74 | 74 | $entity = $options['entity']; |
75 | 75 | if ($entity->getID() === null) { |
76 | 76 | //This query is always false, so we get empty results |