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

Commitc90e822

Browse files
committed
Add docs for Microsoft Teams Options
1 parentee69e5a commitc90e822

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

‎notifier/chatters.rst‎

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,44 @@ to add `message options`_::
218218

219219
$chatter->send($chatMessage);
220220

221+
Adding Options to a Microsoft Teams Message
222+
-------------------------------------------
223+
224+
With a Microsoft Teams message, you can use the
225+
:class:`Symfony\\Component\\Notifier\\Bridge\\MicrosoftTeams\\MicrosoftTeamsOptions` class
226+
to add `options`_::
227+
228+
use Symfony\Component\Notifier\Bridge\MicrosoftTeams\MicrosoftTeamsOptions;
229+
use Symfony\Component\Notifier\Bridge\MicrosoftTeams\Section\Field\Image;
230+
use Symfony\Component\Notifier\Bridge\MicrosoftTeams\Section\Section;
231+
use Symfony\Component\Notifier\Message\ChatMessage;
232+
233+
$chatMessage = new ChatMessage('');
234+
235+
// Create MicrosoftTeams options
236+
$options = (new MicrosoftTeamsOptions())
237+
->title('Hey all!')
238+
->summary('**A big thank you**') // you can use Markdown here
239+
->text('Lets celebrate the release of Symfony 5.3 all together!')
240+
->themeColor('FF0000');
241+
242+
$options->section((new Section())
243+
->image((new Image())
244+
->image('https://symfony.com/logo.png')
245+
->title('The Symfony Logo')
246+
)
247+
);
248+
249+
// Add the custom options to the chat message and send the message
250+
$chatMessage->options($options);
251+
252+
$chatter->send($chatMessage);
253+
254+
..versionadded::5.3
255+
256+
Options for Microsoft Teams were introduced in Symfony 5.3.
257+
221258
.. _`Block elements`:https://api.slack.com/reference/block-kit/block-elements
222259
.. _`Embed elements`:https://discord.com/developers/docs/resources/webhook
223260
.. _`message options`:https://core.telegram.org/bots/api
261+
.. _`options`:https://docs.microsoft.com/en-us/outlook/actionable-messages/message-card-reference

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp