Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita4a5cce

Browse files
authored
Update notifier.rst
Add options to SmsMessage#17546
1 parent3a8132c commita4a5cce

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

‎notifier.rst‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,13 +183,19 @@ send SMS messages::
183183
#[Route('/login/success')]
184184
public function loginSuccess(TexterInterface $texter)
185185
{
186+
$options = (new ProviderOptions())
187+
->setPriority('high')
188+
;
189+
186190
$sms = new SmsMessage(
187191
// the phone number to send the SMS message to
188192
'+1411111111',
189193
// the message
190194
'A new login was detected!',
191195
// optionally, you can override default "from" defined in transports
192196
'+1422222222',
197+
// you can also add options object implementing MessageOptionsInterface
198+
$options
193199
);
194200

195201
$sentMessage = $texter->send($sms);
@@ -202,6 +208,10 @@ send SMS messages::
202208

203209
The 3rd argument of ``SmsMessage`` (``$from``) was introduced in Symfony 6.2.
204210

211+
..versionadded::6.3
212+
213+
The 4th argument of ``SmsMessage`` (``$options``) was introduced in Symfony 6.3.
214+
205215
The ``send()`` method returns a variable of type
206216
:class:`Symfony\\Component\\Notifier\\Message\\SentMessage` which provides
207217
information such as the message ID and the original message contents.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp