File tree 3 files changed +29
-3
lines changed
src/Symfony/Component/Notifier/Bridge/ContactEveryone 3 files changed +29
-3
lines changed Original file line number Diff line number Diff line change 15
15
16
16
/**
17
17
* @author gnito-org <https://github.com/gnito-org>
18
+ *
19
+ * @see https://ceo-be.multimediabs.com/attachments/hosted/lightApiManualsFR
18
20
10000
code>
*/
19
21
final class ContactEveryoneOptions implements MessageOptionsInterface
20
22
{
@@ -35,7 +37,7 @@ public function getRecipientId(): ?string
35
37
*/
36
38
public function diffusionName (string $ diffusionName ): static
37
39
{
38
- $ this ->options ['diffusion_name ' ] = $ diffusionName ;
40
+ $ this ->options ['diffusionname ' ] = $ diffusionName ;
39
41
40
42
return $ this ;
41
43
}
@@ -50,6 +52,28 @@ public function category(string $category): static
50
52
return $ this ;
51
53
}
52
54
55
+ /**
56
+ * @param 'fr_FR'|'en_GB' $locale
57
+ *
58
+ * @return $this
59
+ */
60
+ public function locale (string $ locale ): static
61
+ {
62
+ $ this ->options ['locale ' ] = $ locale ;
63
+
64
+ return $ this ;
65
+ }
66
+
67
+ /**
68
+ * @return $this
69
+ */
70
+ public function unicode (bool $ unicode ): static
71
+ {
72
+ $ this ->options ['xcharset ' ] = $ unicode ? 'true ' : 'false ' ;
73
+
74
+ return $ this ;
75
+ }
76
+
53
77
public function toArray (): array
54
78
{
55
79
return $ this ->options ;
Original file line number Diff line number Diff line change @@ -73,7 +73,9 @@ protected function doSend(MessageInterface $message): SentMessage
73
73
}
74
74
75
75
$ options = $ message ->getOptions ()?->toArray() ?? [];
76
- $ options ['xcharset ' ] = 'true ' ;
76
+ $ options ['category ' ] ??= $ this ->category ;
77
+ $ options ['diffusionname ' ] ??= $ this ->diffusionName ;
78
+ $ options ['xcharset ' ] ??= 'true ' ;
77
79
$ options ['token ' ] = $ this ->token ;
78
80
$ options ['to ' ] = $ message ->getPhone ();
79
81
$ options ['msg ' ] = $ message ->getSubject ();
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ public function testContactEveryoneOptions()
24
24
25
25
self ::assertSame ([
26
26
'category ' => 'test_category ' ,
27
- 'diffusion_name ' => 'test_diffusion_name ' ,
27
+ 'diffusionname ' => 'test_diffusion_name ' ,
28
28
], $ contactEveryoneOptions ->toArray ());
29
29
}
30
30
}
You can’t perform that action at this time.
0 commit comments