diff --git a/src/Symfony/Component/Notifier/Bridge/Slack/Block/SlackSectionBlock.php b/src/Symfony/Component/Notifier/Bridge/Slack/Block/SlackSectionBlock.php index 4bda10f90527d..09b2ed46c881e 100644 --- a/src/Symfony/Component/Notifier/Bridge/Slack/Block/SlackSectionBlock.php +++ b/src/Symfony/Component/Notifier/Bridge/Slack/Block/SlackSectionBlock.php @@ -34,6 +34,19 @@ public function text(string $text, bool $markdown = true): self return $this; } + /** + * @return $this + */ + public function field(string $text, bool $markdown = true): self + { + $this->options['fields'][] = [ + 'type' => $markdown ? 'mrkdwn' : 'plain_text', + 'text' => $text, + ]; + + return $this; + } + /** * @return $this */